/* Help docs (/docs) and the blog: a reading layout inside the site's dark Space theme.
   Sidebar on the left, the article in a readable measure, "On this page" on the right. */

/* ---------- Search box (sidebar, help home) ---------- */
.ds { position: relative; }
.ds-box { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px; border-radius: 12px; background: var(--hull); box-shadow: 0 0 0 1px rgba(214, 224, 255, 0.12); color: var(--dust); cursor: text; transition: box-shadow .16s; }
.ds-box:focus-within { box-shadow: 0 0 0 1.5px var(--accent); }
.ds-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--moonlight); font: 500 15px/1 var(--body); }
.ds-box input::placeholder { color: var(--dust); }
.ds-box input::-webkit-search-cancel-button { display: none; }
.ds-box .key { height: 22px; min-width: 22px; font-size: 11.5px; }
.ds-results { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: max(100%, 420px); max-width: calc(100vw - 2 * var(--gutter)); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--hull); box-shadow: 0 0 0 1px rgba(214, 224, 255, 0.12), 0 30px 60px -20px rgba(0, 0, 0, .8); }
.ds-results a { display: grid; gap: 3px; padding: 11px 12px; border-radius: 11px; color: var(--moonlight); }
.ds-results a[aria-selected="true"], .ds-results a:hover { background: var(--crater); }
.ds-results a small { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.ds-results a b { font-weight: 600; font-size: 15px; }
.ds-results a span { font-size: 13.5px; color: var(--dust); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-results mark { background: none; color: var(--accent-glow); font-weight: 600; }
.ds-results .none { padding: 14px; color: var(--dust); font-size: 14.5px; }

/* ---------- Docs shell ---------- */
.docs { background: var(--space); color: var(--moonlight); }
.docs-col { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.dn { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 28px 4px 40px 0; scrollbar-width: thin; }
.dn .ds { margin-bottom: 18px; }
.dn-home { display: block; padding: 8px 10px; margin-bottom: 6px; border-radius: 9px; color: var(--moonlight); font-weight: 600; font-size: 14.5px; }
.dn-home:hover { background: rgba(238, 241, 248, .06); }
.dn-sec { border-top: 1px solid rgba(214, 224, 255, 0.08); }
.dn-head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 11px 10px; border: 0; background: none; cursor: pointer; color: var(--moonlight); font: 600 14px/1.3 var(--body); text-align: left; }
.dn-head .i { width: 14px; height: 14px; color: var(--dust); transition: transform .2s var(--ease); }
.dn-sec.open .dn-head .i { transform: rotate(180deg); }
.dn-sec ul { list-style: none; margin: 0 0 10px; padding: 0; display: none; }
.dn-sec.open ul { display: block; }
.dn-sec a { display: block; padding: 7px 10px 7px 14px; border-radius: 9px; color: var(--dust); font-size: 14.5px; line-height: 1.35; border-left: 2px solid transparent; }
.dn-sec a:hover { color: var(--moonlight); background: rgba(238, 241, 248, .05); }
.dn-sec a[aria-current="page"] { color: var(--moonlight); background: color-mix(in srgb, var(--accent) 14%, transparent); border-left-color: var(--accent); font-weight: 600; }

.docs .doc { min-width: 0; max-width: 760px; padding: 32px 0 96px; }
.crumbs { font-size: 13.5px; color: var(--dust); display: flex; gap: 8px; align-items: center; }
.crumbs a, .docs .doc .crumbs a { color: var(--dust); text-decoration: none; }
.crumbs a:hover { color: var(--moonlight); }
.docs .doc h1 { font: 600 clamp(32px, 4vw, 48px)/1.08 var(--display); letter-spacing: -0.04em; margin-top: 14px; }
.doc-lede { font-size: 19px; color: var(--dust); margin-top: 16px; max-width: 36em; text-wrap: pretty; }
.docs .doc h2 { font: 600 clamp(22px, 2.2vw, 27px)/1.2 var(--display); letter-spacing: -0.03em; margin-top: 52px; scroll-margin-top: 88px; }
.docs .doc h3 { font: 600 18.5px/1.3 var(--body); margin-top: 32px; }
.docs .doc p, .docs .doc li { color: #d3d8e4; font-size: 16.5px; line-height: 1.68; }
.docs .doc p { margin-top: 16px; max-width: 40em; }
.docs .doc ul, .docs .doc ol { margin: 16px 0 0; padding-left: 22px; max-width: 40em; }
.docs .doc li + li { margin-top: 8px; }
.docs .doc li::marker { color: var(--dust); }
.docs .doc strong, .docs .doc b { color: var(--moonlight); font-weight: 600; }
.docs .doc a { color: var(--accent-glow); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.docs .doc a:hover { text-decoration-color: var(--accent-glow); }
.docs .doc code { font: 500 .88em/1 var(--mono); padding: 3px 6px; border-radius: 6px; background: var(--crater); color: var(--moonlight); }
.docs .doc pre { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--hull); box-shadow: 0 0 0 1px rgba(214, 224, 255, 0.1); overflow-x: auto; }
.docs .doc pre code { padding: 0; background: none; font-size: 14px; line-height: 1.6; }
.docs .doc kbd, .docs .doc .key { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; font: 500 12.5px/1 var(--mono); color: var(--moonlight); border-radius: 7px; background: var(--crater-2); border: 1px solid rgba(214, 224, 255, 0.18); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); vertical-align: 1px; }
.docs .doc .ui { color: var(--moonlight); font-weight: 600; }
.docs .doc ol.steps-list { list-style: none; padding: 0; counter-reset: s; }
.docs .doc ol.steps-list > li { counter-increment: s; position: relative; padding-left: 44px; min-height: 30px; }
.docs .doc ol.steps-list > li + li { margin-top: 14px; }
.docs .doc ol.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 13.5px/1 var(--body); color: var(--accent-ink); background: var(--accent); }
.docs .doc figure { margin: 28px 0 0; }
.docs .doc figure img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--hull); box-shadow: 0 0 0 1px rgba(214, 224, 255, 0.1), 0 40px 90px -50px color-mix(in srgb, var(--moon) 40%, transparent); }
.docs .doc figure.narrow { max-width: 460px; }
.docs .doc figcaption { margin-top: 10px; font-size: 13.5px; color: var(--dust); }
.docs .doc .note { margin-top: 24px; padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--hull)); box-shadow: inset 3px 0 0 var(--accent); }
.docs .doc .note p { margin: 0; font-size: 15.5px; }
.docs .doc .note p + p { margin-top: 8px; }
.docs .doc .note.warn { background: color-mix(in srgb, #f0b14a 9%, var(--hull)); box-shadow: inset 3px 0 0 #f0b14a; }
.docs .doc table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 15px; }
.docs .doc th, .docs .doc td { text-align: left; padding: 11px 12px; border-bottom: 1px solid rgba(214, 224, 255, 0.1); vertical-align: top; color: #d3d8e4; }
.docs .doc th { color: var(--moonlight); font-weight: 600; }
.docs .doc dl { margin-top: 18px; }
.docs .doc dt { margin-top: 22px; font-weight: 600; color: var(--moonlight); font-size: 17px; }
.docs .doc dd { margin: 6px 0 0; color: #d3d8e4; line-height: 1.65; max-width: 40em; }
.docs .doc .short-answer { margin-top: 28px; padding: 20px 22px; border-radius: 14px; background: var(--hull); box-shadow: 0 0 0 1px rgba(214, 224, 255, 0.12); }
.docs .doc .short-answer b:first-child { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.docs .doc .short-answer p { margin: 0; }
.docs .doc details { margin-top: 0; border-top: 1px solid rgba(214, 224, 255, 0.12); }
.docs .doc details:last-of-type { border-bottom: 1px solid rgba(214, 224, 255, 0.12); }
.docs .doc details summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--moonlight); list-style: none; }
.docs .doc details summary::-webkit-details-marker { display: none; }
.docs .doc details summary::after { content: '+'; float: right; color: var(--dust); font-weight: 400; }
.docs .doc details[open] summary::after { content: '–'; }
.docs .doc details p { margin: 0 0 16px; }
.doc-updated { margin-top: 56px !important; font-size: 13.5px !important; color: var(--dust) !important; }
.dn-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.dn-pn a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(214, 224, 255, 0.12); color: var(--moonlight); text-decoration: none; transition: box-shadow .16s, background .16s; }
.dn-pn a:hover { box-shadow: 0 0 0 1.5px var(--accent); background: var(--hull); }
.dn-pn a span { font-size: 13px; color: var(--dust); }
.dn-pn a b { font-weight: 600; }
.dn-pn a.next { text-align: right; grid-column: 2; }
.otp { position: sticky; top: 80px; padding-top: 40px; font-size: 13.5px; }
.otp b { display: block; color: var(--moonlight); font-weight: 600; margin-bottom: 10px; }
.otp ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(214, 224, 255, 0.12); }
.otp a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--dust); line-height: 1.4; }
.otp a:hover { color: var(--moonlight); }
.otp a.on { color: var(--moonlight); border-left-color: var(--accent); }
.dn-toggle { display: none; }

@media (max-width: 1120px) {
  .docs-col { grid-template-columns: 240px minmax(0, 1fr); }
  .otp { display: none; }
}
@media (max-width: 860px) {
  .docs-col { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dn { position: static; max-height: none; padding: 16px 0 0; overflow: visible; }
  .dn > :not(.ds):not(.dn-toggle) { display: none; }
  .dn.open > :not(.ds):not(.dn-toggle) { display: block; }
  .dn-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; margin-top: 10px; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--hull); color: var(--moonlight); font: 600 15px/1 var(--body); cursor: pointer; }
  .docs .doc { padding-top: 20px; }
  .dn-pn { grid-template-columns: 1fr; }
  .dn-pn a.next { grid-column: 1; }
}

/* ---------- Help home ---------- */
.help-hero { padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px); text-align: center; background: radial-gradient(50% 40% at 50% 0%, color-mix(in srgb, var(--moon) 20%, transparent), transparent 70%), var(--space); }
.help-hero h1 { font: 600 clamp(38px, 5.6vw, 72px)/1.02 var(--display); letter-spacing: -0.045em; }
.help-hero h1 span { color: var(--accent); }
.help-hero .lede { margin: 18px auto 0; }
.help-hero .ds { max-width: 560px; margin: 32px auto 0; text-align: left; }
.help-hero .ds-box { height: 56px; border-radius: 16px; }
.help-hero .ds-box input { font-size: 17px; }
.help-hero .ds-results { width: 100%; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: clamp(88px, 10vw, 140px); }
@media (max-width: 960px) { .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .help-grid { grid-template-columns: 1fr; } }
.help-card { padding: 22px 22px 18px; border-radius: 18px; background: var(--hull); box-shadow: 0 0 0 1px rgba(214, 224, 255, 0.1); }
.help-card h2 { font: 600 19px/1.25 var(--display); letter-spacing: -0.025em; display: flex; align-items: center; gap: 10px; }
.help-card h2 .i { width: 20px; height: 20px; color: var(--accent); }
.help-card p { color: var(--dust); font-size: 14.5px; margin-top: 8px; }
.help-card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.help-card li a { display: block; padding: 6px 0; color: var(--moonlight); font-size: 15px; }
.help-card li a:hover { color: var(--accent-glow); }

/* ---------- Blog ---------- */
.post-hero { padding-block: clamp(48px, 6vw, 88px) 0; background: radial-gradient(50% 40% at 50% 0%, color-mix(in srgb, var(--moon) 18%, transparent), transparent 70%), var(--space); }
.post-hero .col, .post-wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.post-hero .meta { font-size: 14px; color: var(--dust); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.post-hero h1 { font: 600 clamp(34px, 4.8vw, 60px)/1.05 var(--display); letter-spacing: -0.04em; max-width: 18em; margin-top: 14px; }
.post-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.post-wrap .doc { max-width: 760px; }
.post-wrap .otp { padding-top: 32px; }
@media (max-width: 1020px) { .post-wrap { grid-template-columns: minmax(0, 1fr); } .post-wrap .otp { display: none; } }
.blog-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-bottom: clamp(88px, 10vw, 140px); }
@media (max-width: 960px) { .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .blog-list { grid-template-columns: 1fr; } }
.blog-card { display: grid; gap: 10px; color: var(--moonlight); }
.blog-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 14px; background: var(--hull); }
.blog-card small { color: var(--accent); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.blog-card b { font: 600 19px/1.25 var(--display); letter-spacing: -0.025em; }
.blog-card span { color: var(--dust); font-size: 14.5px; }

.cl-date { display: block; margin-top: 6px; font: 500 14px/1.3 var(--body); letter-spacing: 0; color: var(--dust); }
.article-wrap { padding-top: clamp(24px, 4vw, 56px); }
.article-wrap .doc { padding-top: 24px; }
.post-hero .post-img { display: block; width: 100%; max-width: 1180px; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin-top: clamp(28px, 4vw, 48px); border-radius: 18px; background: var(--hull); }
@media (max-width: 640px) { .docs .doc table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } .docs .doc th, .docs .doc td { min-width: 140px; } }
.docs .doc .short-answer ul { margin-top: 6px; }
