/* Reading pages on the new site (T0404, 2026-09-26): the guides under /docs/
   and the legal pages (terms, privacy, refunds).
   Their markup keeps its old class names on purpose: docs.js filters by .cmd
   and .docs-h, scripts/sync_terms.py extracts `div.wrap.legal`, and the admin
   copy editor and design studio write back through data-t / data-w. So the
   old look is replaced here rather than carried over: every selector sits
   under .doc-scope (only <main> on those pages has it) and uses the site's own
   tokens. Buttons, the FAQ accordion, tiles and the CTA panel are site.css's
   own parts and get no rules here. */

/* ---------- the dark header section ---------- */
.doc-scope .doc-top { padding-bottom: clamp(56px, 9vh, 104px); }
.doc-scope .doc-top .head:last-child { margin-bottom: 0; }
.doc-scope .doc-join { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.doc-scope .srv-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-d); font: 600 12.5px/1.25 var(--body); color: #fff; }
.doc-scope .srv-status .ss-dot { width: 9px; height: 9px; background: #6b7280; }
.doc-scope .srv-status.on .ss-dot { background: #6fd58a; }
.doc-scope .srv-status.off .ss-dot { background: var(--red); }

.doc-scope .docs-gate { max-width: 680px; margin-bottom: 28px; padding: 20px 24px; border: 1px solid var(--line-d); border-left: 4px solid var(--red); background: var(--night-2); }
.doc-scope .docs-gate > b { display: block; margin-bottom: 6px; font: 600 16px/1.35 var(--display); letter-spacing: -.015em; }
.doc-scope .docs-gate p { margin: 0; }
.doc-scope .docs-search { max-width: 680px; }
.doc-scope .docs-search input { width: 100%; min-height: 52px; padding: 0 18px; border: 1px solid var(--line-d); border-radius: 0; background: var(--night-2); color: var(--paper); font: 400 16px/1.2 var(--body); }
.doc-scope .docs-search input::placeholder { color: rgba(255, 255, 255, .45); }
.doc-scope .docs-search input:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.doc-scope .docs-search .micro { margin: 10px 0 0; font: 500 12px/1.4 var(--mono); color: rgba(255, 255, 255, .55); }

/* ---------- jump links: stick to the top while the body scrolls ---------- */
.doc-scope .docs-nav { position: sticky; top: 0; z-index: 30; padding: 0 var(--pad); background: var(--night); border-block: 1px solid var(--line-d); }
.doc-scope .docs-nav .wrap { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.doc-scope .docs-nav .wrap::-webkit-scrollbar { display: none; }
.doc-scope .docs-nav a { flex: none; padding: 8px 12px; border: 1px solid var(--line-d); color: rgba(255, 255, 255, .72); font: 600 12.5px/1.25 var(--body); text-decoration: none; transition: color .2s ease, border-color .2s ease; }
@media (hover: hover) and (pointer: fine) { .doc-scope .docs-nav a:hover { color: #fff; border-color: var(--red); } }

/* ---------- the paper body ---------- */
.doc-scope .doc-body { padding-top: clamp(64px, 10vh, 120px); }
.doc-scope .doc-body > .wrap { max-width: 920px; }
.doc-scope .inline-link { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.doc-scope code { padding: 1px 5px; background: rgba(17, 17, 17, .06); font: 500 .86em/1.4 var(--mono); overflow-wrap: anywhere; }
.doc-scope .dark code { background: rgba(255, 255, 255, .1); }

.doc-scope .docs-h { margin: 88px 0 12px; font: 700 clamp(26px, 2.6vw, 40px)/1.08 var(--display); letter-spacing: -.03em; scroll-margin-top: 72px; }
.doc-scope .docs-h:first-child { margin-top: 0; }
.doc-scope .docs-sub { max-width: 62ch; margin: 0 0 24px; color: var(--ink-2); }
.doc-scope .docs-empty { padding: 48px 0; text-align: center; color: var(--mute); }

/* commands: ruled rows, like the site's tiles */
.doc-scope .cmds { display: grid; margin: 0 0 32px; border-top: 1px solid var(--line); }
.doc-scope .cmd { padding: 18px 0; border-bottom: 1px solid var(--line); }
.doc-scope .cmd.danger { padding-left: 16px; border-left: 4px solid var(--red); }
.doc-scope .cmd p { max-width: 70ch; margin: 8px 0 0; color: var(--ink-2); font-size: 16px; }
.doc-scope .cmd .c-n { margin-right: 8px; padding: 0; background: none; font: 500 15px/1.4 var(--mono); color: var(--red); }
.doc-scope .cmd .c-u { display: inline-block; padding: 0; background: none; font: 400 12.5px/1.5 var(--mono); color: var(--mute); }
.doc-scope .c-t { display: block; font: 600 17px/1.3 var(--display); letter-spacing: -.015em; }

/* notes and callouts: a card with the red edge */
.doc-scope .docs-note, .doc-scope .sg-callout { margin: 0 0 32px; padding: 22px 26px; border: 1px solid var(--line); border-left: 4px solid var(--red); background: var(--card); }
.doc-scope .sg-callout { margin-top: 24px; }
.doc-scope .docs-note > b { display: block; margin-bottom: 8px; font: 600 16px/1.35 var(--display); letter-spacing: -.015em; }
.doc-scope .docs-note p, .doc-scope .sg-callout p { margin: 0; color: var(--ink-2); }
.doc-scope .docs-note ul { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.doc-scope .docs-note li + li { margin-top: 6px; }

.doc-scope .srv-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); margin: 0 0 24px; }
@media (min-width: 640px) { .doc-scope .sg-two { grid-template-columns: 1fr 1fr; } }
.doc-scope .srv-card { padding: 24px; border: 1px solid var(--line); background: var(--card); }
.doc-scope .srv-card.is-star { border-top: 4px solid var(--red); }
.doc-scope .srv-card > b { display: block; margin-bottom: 8px; font: 600 17px/1.3 var(--display); letter-spacing: -.015em; }
.doc-scope .srv-card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.doc-scope .sg-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }

/* ⚠️ NOT display:flex on the <li> (the old docs pages learned this on phones):
   a flex item per <b>/<code> shattered each step into fragments. The number is
   positioned, so the sentence stays ordinary inline flow. */
.doc-scope .sg-steps { display: grid; gap: 14px; margin: 16px 0 24px; padding: 0; list-style: none; counter-reset: s; }
.doc-scope .sg-steps li { position: relative; min-height: 28px; padding-left: 44px; color: var(--ink-2); line-height: 1.55; }
.doc-scope .sg-steps li b { color: var(--ink); }
.doc-scope .sg-steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; background: var(--red); color: #fff; font: 700 13px/1 var(--display); }

.doc-scope .faq { margin-bottom: 32px; }
.doc-scope .wrap > .cta:first-child { margin-top: 0; }
.doc-scope .cta p { margin: 12px 0 0; color: rgba(255, 255, 255, .7); }
.doc-scope .cta p a { color: inherit; }

/* ---------- legal pages ----------
   site.css styles `.legal` as the footer's one-line strip (flex, small grey
   type). The terms body must keep that class for sync_terms.py, so it is
   turned back into a column of prose here. */
.doc-scope .wrap.legal { display: block; max-width: 760px; padding: 0; border: 0; font: inherit; color: var(--ink-2); }
.doc-scope .legal h2 { margin: 56px 0 14px; font: 600 clamp(20px, 1.8vw, 26px)/1.25 var(--display); letter-spacing: -.02em; color: var(--ink); }
.doc-scope .legal h3 { margin: 28px 0 8px; font: 600 17px/1.35 var(--display); color: var(--ink); }
.doc-scope .legal p, .doc-scope .legal li { line-height: 1.7; }
.doc-scope .legal ul { margin: 12px 0 20px; padding-left: 1.2rem; }
.doc-scope .legal li { margin-bottom: 8px; }
.doc-scope .legal li::marker { color: var(--red); }
.doc-scope .legal a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.doc-scope .legal strong, .doc-scope .legal b { color: var(--ink); font-weight: 600; }
.doc-scope .lg-tldr { margin-bottom: 36px; padding: 22px 26px; border: 1px solid var(--line); border-left: 4px solid var(--red); background: var(--card); }
