/* =====================================================================
   Rynth site stylesheet. Plain CSS, no external requests.
   Look: the Claude Design artboards (Main, Features, Commands, Guide, Mobile).

   PAGE SHELL (layout.html)
     header.topbar > .topbar-in > a.brand, nav#site-nav.site-nav,
       .topbar-end (a.version-pill, a.btn.primary.small, button.nav-toggle)
     main#main, footer.footer

   NAV MARKUP (the build writes it from nav.json):
     <ul><li class="current|active|has-children"><a aria-current="page">..</a>
       <ul>..children..</ul></li></ul>
     Current item: white text with a 2px gold underline.

   SHARED COMPONENTS (generated and hand-written pages both use these)
     .wrap          centred column, 1200px max, 32px side padding (16 on phones)
     .page-hero     top of a page: .eyebrow, h1, p.lede, .hero-actions
     .doc           article.prose + nav.toc (or aside.doc-side holding .toc
                    and .related). The toc sits on the right on wide screens.
     .doc-head      guide header inside the article: nav.crumb, .tags, h1, .lede
     .prose         long-form text
     .toc           "On this page" box. <nav class="toc" data-auto></nav>
                    is filled by site.js from the h2s in .prose.
     .related       a box of related links in .doc-side (p.side-title + a's)
     .pager         prev/next links at the end of a guide
     .shot          screenshot placeholder box
     .card          a box; a.card is clickable. Inside: .card-tag, h3, p,
                    .card-cmd, .card-meta, .card-warn
     .grid          auto-fit grid of cards (.grid.two, .grid.three)
     .badge         pill. Plain = grey outline tag (plugin name).
                    .new / .gold = gold fill, .fix / .ok = green, .warn,
                    .violet, .muted
     .cmd           command chip: <code class="cmd">/ra help</code>. Click
                    copies it; data-copy="..." overrides the text copied.
     .kbd           a key
     .search-box    <div class="search-box"><input type="search"></div>
                    (icon drawn by CSS; .big for a larger one)
     .filter-chips  row of <button>s; pressed = aria-pressed="true" or .active
                    (gold fill)
     .table         <div class="table"><table>..</table></div>
     .callout       <div class="callout info|warn|tip"><p>..</p></div>,
                    optional <p class="callout-title">
     .steps         <ol class="steps"> numbered steps
     .btn           .btn.primary (gold), .btn.ghost; .btn.small
     .eyebrow .lede .muted .crumb
     pre            code blocks get a Copy button from site.js
   ===================================================================== */

:root {
  /* colour */
  --bg: #0B0D17;
  --surface: #131729;
  --surface-head: #171B31;
  --inset: #0F1222;
  --inset-2: #10142A;
  --row-hover: #151A30;
  --chip-bg: #1B2038;
  --line: #1E2340;
  --line-card: #23284A;
  --line-input: #2A3052;
  --line-hover: #3B4370;
  --ink: #E8E6F0;
  --ink-head: #F5F3FA;
  --ink-2: #C9CBE0;
  --ink-3: #B9BCD4;
  --ink-4: #D7D9EA;
  --ink-muted: #A6A9C4;
  --white: #FFFFFF;
  --gold: #E2B65C;
  --gold-hover: #F3D58F;
  --on-gold: #15120A;
  --violet: #8B7CF6;
  --cmd-bg: #1E1A3A;
  --cmd-ink: #C4BBFF;
  --warn-bg: #1E1A10;
  --warn-bg-2: #2A2110;
  --warn-line: #5A4520;
  --warn-ink: #F1E3C4;
  --warn-ink-2: #F3C77A;
  --info-bg: #12182E;
  --info-line: #2B3A6A;
  --info-icon: #7FA7FF;
  --fix: #7FD1A8;
  --tip-bg: #0F1F1A;
  --tip-line: #24503F;
  --vital-hp: #E05D5D;
  --vital-mn: #6E8BF5;
  /* type */
  --font-display: Cinzel, "Trajan Pro", Georgia, serif;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  /* shape */
  --r-btn: 10px;
  --r-search: 14px;
  --r-callout: 14px;
  --r-card: 16px;
  --r-panel: 20px;
  --max: 1200px;
  --pad: 32px;
  --topbar-h: 71px;
  --shadow-panel: 0 30px 80px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (max-width: 600px) { :root { --pad: 16px; --topbar-h: 73px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg);
  overflow-x: hidden;
}
main { flex: 1 0 auto; width: 100%; }
img, svg { max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }
::selection { background: rgba(139, 124, 246, .4); color: var(--white); }
:focus { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .cmd:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink-head); line-height: 1.15; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1.1; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--font-mono); }
strong { color: var(--white); font-weight: 600; }
@media (max-width: 860px) { h1 { font-size: 40px; } }
@media (max-width: 600px) { h1 { font-size: 34px; } h2 { font-size: 24px; } }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--on-gold); padding: 8px 14px; border-radius: var(--r-btn); font-weight: 600; }
.skip:focus { top: 12px; color: var(--on-gold); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: var(--max); margin: 0 auto; padding: 18px var(--pad); display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink-head); flex: none; }
.brand:hover { color: var(--white); }
.brand-mark { display: block; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 2px; text-transform: uppercase; }
.topbar-end { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.version-pill {
  font: 13px/1.2 var(--font-mono); color: var(--ink-muted); border: 1px solid var(--line-input);
  border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.version-pill:hover { color: var(--white); border-color: var(--line-hover); }

.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; gap: 24px; align-items: center; }
.site-nav li { position: relative; }
.site-nav a { display: block; color: var(--ink-2); font-size: 15px; font-weight: 500; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--white); }
.site-nav > ul > li > a[aria-current="page"], .site-nav > ul > li.current > a, .site-nav > ul > li.active > a {
  color: var(--white); border-bottom-color: var(--gold);
}
/* children: a dropdown on wide screens */
.site-nav li > ul {
  position: absolute; top: calc(100% + 12px); left: -14px; min-width: 240px; padding: 8px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line-input); border-radius: 14px; box-shadow: var(--shadow-panel);
  opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s;
}
.site-nav li > ul::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.site-nav li:hover > ul, .site-nav li:focus-within > ul { opacity: 1; visibility: visible; }
.site-nav li > ul a { padding: 8px 12px; border: 0; border-radius: 8px; font-size: 15px; }
.site-nav li > ul a:hover { background: var(--row-hover); }
.site-nav li > ul a[aria-current="page"] { color: var(--gold); }

.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  background: var(--surface); border: 1px solid var(--line-input); border-radius: var(--r-btn); color: var(--ink);
}
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: inline; }

@media (max-width: 1100px) { .version-pill { display: none; } .site-nav > ul { gap: 18px; } }
@media (max-width: 960px) {
  .topbar-in { gap: 16px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: fixed; left: 0; right: 0; top: var(--topbar-h); bottom: 0;
    background: var(--bg); border-top: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px var(--pad) 40px;
  }
  .site-nav[data-open] { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li { border-bottom: 1px solid var(--line); }
  .site-nav a { padding: 14px 0; font-size: 17px; white-space: normal; border: 0; }
  .site-nav > ul > li > a[aria-current="page"], .site-nav > ul > li.current > a, .site-nav > ul > li.active > a { color: var(--gold); }
  .site-nav li > ul {
    position: static; opacity: 1; visibility: visible; min-width: 0; padding: 0 0 10px 0; margin: -4px 0 0;
    background: none; border: 0; box-shadow: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .site-nav li > ul::before { display: none; }
  .site-nav li > ul a { padding: 9px 12px 9px 0; font-size: 15px; color: var(--ink-3); }
  .site-nav li > ul a:hover { background: none; color: var(--white); }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 600px) {
  .topbar-in { padding: 14px var(--pad); }
  .brand-mark { width: 28px; height: 28px; }
  .brand-word { font-size: 19px; }
  .topbar-end .btn { display: none; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 48px; }
.footer-in {
  max-width: var(--max); margin: 0 auto; padding: 36px var(--pad);
  display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--ink-muted);
}
.footer-word { font-family: var(--font-display); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--white); }

/* ---------- text helpers ---------- */
.eyebrow { display: block; margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--violet); }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 720px; }
.muted { color: var(--ink-muted); }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; font-size: 14px; color: var(--ink-muted); }
.crumb a { color: var(--ink-muted); }
.crumb a:hover { color: var(--white); }
.crumb [aria-current], .crumb .here { color: var(--ink); }
.center { text-align: center; }

/* ---------- page hero (Commands / Features pattern) ---------- */
.page-hero {
  max-width: var(--max); margin: 0 auto; padding: 64px var(--pad) 40px;
  display: flex; flex-direction: column; gap: 18px; position: relative;
}
.page-hero::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 100vw; height: 1px; transform: translateX(-50%); background: var(--line); }
.page-hero > * { margin: 0; }
.page-hero h1 { max-width: 900px; }
.page-hero .search-box { margin-top: 8px; }
.page-hero .filter-chips { margin: 0; }
@media (max-width: 600px) { .page-hero { padding: 36px var(--pad) 28px; gap: 14px; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; font: 600 16px/1.2 var(--font); cursor: pointer;
  border: 1px solid var(--line-hover); background: transparent; color: var(--ink);
}
.btn:hover { color: var(--white); border-color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); padding: 14px 24px; }
.btn.primary:hover { color: var(--on-gold); filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { font-size: 15px; padding: 10px 18px; border-radius: var(--r-btn); }
.btn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 600px) {
  .hero-actions.stack-mobile { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions.stack-mobile .btn { width: 100%; padding: 14px; }
}

/* ---------- cards and grids ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
@media (min-width: 900px) { .grid.two { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--line-card); color: var(--ink-3);
  transition: border-color .15s;
}
.card > * { margin: 0; }
.card:hover { border-color: var(--line-hover); }
a.card { color: var(--ink); }
a.card:hover { color: var(--ink); }
.card h2, .card h3 { margin: 0; font-family: var(--font); font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--ink-head); }
.card p { font-size: 15px; line-height: 1.55; color: var(--ink-3); }
.card ul { margin: 0; padding-left: 1.2em; font-size: 15px; color: var(--ink-3); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-tag { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); }
.card-kicker { font: 13px/1.3 var(--font-mono); color: var(--gold); }
.card-cmd { margin-top: auto !important; font: 13px/1.4 var(--font-mono); color: var(--cmd-ink); }
.card-meta { font-size: 13px; color: var(--ink-muted); }
.card-warn { font-size: 13px !important; line-height: 1.5; color: var(--warn-ink-2) !important; background: var(--warn-bg-2); border: 1px solid var(--warn-line); border-radius: var(--r-btn); padding: 8px 10px; }
.card .more { margin-top: auto; font-weight: 600; font-size: 15px; color: var(--gold); }
.card.plain { background: transparent; padding: 28px; }
.card.plain h3 { font-size: 21px; }

/* ---------- badges, commands, keys ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font: 600 12px/1.4 var(--font); letter-spacing: 1px; text-transform: uppercase; vertical-align: middle;
  color: var(--ink-muted); border: 1px solid var(--line-input); background: transparent;
}
.badge.new, .badge.gold { color: var(--on-gold); background: var(--gold); border-color: var(--gold); font-weight: 700; font-size: 11px; letter-spacing: .5px; }
.badge.fix, .badge.ok { color: var(--bg); background: var(--fix); border-color: var(--fix); font-weight: 700; font-size: 11px; letter-spacing: .5px; border-radius: 6px; }
.badge.warn { color: var(--warn-ink-2); background: var(--warn-bg-2); border-color: var(--warn-line); }
.badge.violet { color: var(--cmd-ink); background: var(--cmd-bg); border-color: var(--cmd-bg); }
.badge.muted { color: var(--ink-muted); border-color: var(--line-card); letter-spacing: .5px; font-size: 11px; }
.badge.kind { border-radius: 6px; padding: 3px 7px; font-size: 11px; font-weight: 700; letter-spacing: .5px; }

.cmd {
  display: inline; padding: 2px 7px; border-radius: 6px; font: 500 .88em/1.6 var(--font-mono);
  color: var(--cmd-ink); background: var(--cmd-bg); overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cmd[data-copyable] { cursor: copy; }
.cmd[data-copyable]:hover { box-shadow: 0 0 0 1px var(--violet); }
.cmd.copied { box-shadow: 0 0 0 1px var(--fix); }
.copy-btn {
  cursor: pointer; background: transparent; border: 1px solid var(--line-input); border-radius: 8px; color: var(--ink-muted);
  min-width: 44px; min-height: 36px; padding: 0 10px; font: 13px/1 var(--font);
}
.copy-btn:hover { color: var(--white); border-color: var(--line-hover); }
.copy-btn.copied { color: var(--fix); border-color: var(--fix); }
.cmd-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.kbd, kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 7px; border-radius: 6px; text-align: center;
  font: 12px/1.6 var(--font-mono); color: var(--ink-muted); border: 1px solid var(--line-input); background: var(--inset);
}

/* ---------- search and filters ---------- */
.search-box {
  position: relative; display: flex; align-items: center; gap: 10px; max-width: 720px; padding: 0 16px 0 46px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23A6A9C4' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px 50%;
  border: 1px solid var(--line-input); border-radius: var(--r-search);
}
.search-box:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.search-box input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ink); outline: none;
  font: 17px var(--font); padding: 16px 0;
}
.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: var(--ink-muted); }
.search-box .kbd { flex: none; }
@media (hover: none), (max-width: 600px) { .search-box .kbd { display: none; } }
.search-box.small { max-width: 520px; border-radius: 12px; padding-left: 42px; background-position: 14px 50%; background-size: 18px; }
.search-box.small input { font-size: 15px; padding: 14px 0; }
.search-box button { flex: none; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; padding: 0; list-style: none; }
.filter-chips button, .filter-chips a {
  font: 600 14px/1.2 var(--font); cursor: pointer; border-radius: 999px; padding: 9px 16px; min-height: 40px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-input); background: transparent; color: var(--ink-2);
}
.filter-chips button:hover, .filter-chips a:hover { border-color: var(--gold); color: var(--white); }
.filter-chips [aria-pressed="true"], .filter-chips .active { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.filter-chips [aria-pressed="true"]:hover, .filter-chips .active:hover { color: var(--on-gold); }
.filter-chips .count { font: 12px var(--font-mono); opacity: .75; }

/* ---------- tables ---------- */
.table { position: relative; width: 100%; overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line-card); border-radius: var(--r-search); }
.table table, table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
table.table { position: relative; display: block; overflow-x: auto; border: 1px solid var(--line-card); border-radius: var(--r-search); }
.table thead tr, table.table thead tr { background: var(--surface); text-align: left; }
.table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.table td { padding: 14px 16px; vertical-align: top; color: var(--ink-4); line-height: 1.5; border-top: 1px solid var(--line); }
.table tbody tr:hover td { background: var(--row-hover); }
.table td .cmd { background: transparent; padding: 0; font-size: 14px; }
.table td.copy-cell { padding: 8px 12px; text-align: right; width: 72px; }

/* ---------- callouts ---------- */
.callout {
  display: block; position: relative; margin: 0 0 22px; padding: 16px 18px 16px 54px; border-radius: var(--r-callout);
  font-size: 15px; line-height: 1.6; border: 1px solid var(--info-line); background: var(--info-bg); color: var(--ink-4);
}
.callout > * { margin: 0 0 .6em; }
.callout > :last-child { margin-bottom: 0; }
.callout::before {
  content: ""; position: absolute; left: 18px; top: 17px; width: 22px; height: 22px; background-repeat: no-repeat; background-size: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%237FA7FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E");
}
.callout strong { color: var(--white); }
.callout-title { font-weight: 600; color: var(--white); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.callout.warn .callout-title, .callout.warn strong { color: var(--warn-ink-2); }
.callout.warn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23F3C77A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 16H3z'/%3E%3Cpath d='M12 10v4M12 17v.5'/%3E%3C/svg%3E"); }
.callout.tip { background: var(--tip-bg); border-color: var(--tip-line); }
.callout.tip::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%237FD1A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.8.8 1 1.5 1 2.5h6c0-1 .2-1.7 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.callout a { color: var(--gold); }

/* ---------- doc layout (Guide pattern) ---------- */
.doc {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--pad) 48px;
  display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 280px); gap: 48px; justify-content: space-between; align-items: start;
}
.doc > article, .doc > .prose { grid-column: 1; grid-row: 1; min-width: 0; }
.doc > .toc, .doc > .doc-side { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--topbar-h) + 24px); }
.doc.no-toc { grid-template-columns: minmax(0, 760px); }
.doc-side { display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - var(--topbar-h) - 48px); overflow-y: auto; }
.doc-side > .toc { position: static; }
@media (max-width: 960px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
  /* phones: the article first, the side boxes after it (as in Guide.dc.html) */
  .doc > article, .doc > .prose { grid-row: 1; }
  .doc > .toc, .doc > .doc-side { grid-column: 1; grid-row: 2; position: static; max-height: none; }
}

.toc, .related {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line-card); border-radius: var(--r-callout);
  font-size: 15px;
}
.toc { max-height: calc(100vh - var(--topbar-h) - 48px); overflow-y: auto; }
.doc-side .toc { max-height: none; overflow: visible; }
.toc::before { content: "On this page"; }
.toc::before, .side-title { display: block; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-muted); margin: 0; }
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.toc li li a { padding-left: 14px; font-size: 14px; }
.toc a, .related a { color: var(--ink-3); line-height: 1.4; }
.toc a:hover, .related a:hover { color: var(--white); }
.toc a.is-active { color: var(--gold); }
.toc[data-auto]:empty { display: none; }
@media (max-width: 960px) { .toc { max-height: none; } }

.doc-head { display: flex; flex-direction: column; gap: 22px; margin-bottom: 28px; }
.doc-head > * { margin: 0 !important; }
.doc-head h1 { font-size: 46px; line-height: 1.12; }
.doc-head .lede { font-size: 19px; line-height: 1.65; }
.doc-head .crumb { margin: 0; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .doc-head h1 { font-size: 34px; } .doc-head .lede { font-size: 17px; } }

.shot {
  display: flex; align-items: center; justify-content: center; min-height: 260px; margin: 0 0 22px; padding: 24px; text-align: center;
  border: 1px dashed var(--line-hover); border-radius: var(--r-card); background: var(--inset-2); color: var(--ink-muted); font-size: 15px;
}

.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 36px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--line-card); border-radius: 12px; min-width: 220px; color: var(--ink); font-weight: 600; text-decoration: none !important; }
.pager a:hover { border-color: var(--line-hover); color: var(--white); }
.pager a span { font-size: 13px; font-weight: 400; color: var(--ink-muted); }
.pager a.next { text-align: right; margin-left: auto; }
@media (max-width: 600px) { .pager a { min-width: 0; flex: 1 1 100%; } }

/* ---------- prose ---------- */
.prose { color: var(--ink-4); font-size: 17px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 44px 0 14px; font-size: 28px; font-weight: 700; color: var(--ink-head); line-height: 1.2; }
.prose h3 { margin: 30px 0 10px; font-size: 20px; font-weight: 600; color: var(--ink-head); }
.prose h4 { margin: 22px 0 8px; font-size: 17px; color: var(--ink-head); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 0 0 8px; }
.prose li > ul, .prose li > ol { margin: 8px 0 4px; }
.prose li::marker { color: var(--ink-muted); }
.prose hr { border: 0; height: 1px; margin: 36px 0; background: var(--line); }
.prose blockquote { margin: 0 0 18px; padding: 2px 0 2px 18px; border-left: 3px solid var(--violet); color: var(--ink-2); }
.prose a { color: var(--gold); }
.prose a:hover { color: var(--gold-hover); }
.prose :not(pre) > code:not(.cmd) { font-size: .88em; color: var(--cmd-ink); overflow-wrap: anywhere; }
.prose .grid { margin: 0 0 22px; gap: 12px; }
.prose .grid .card { padding: 16px; gap: 6px; border-radius: var(--r-callout); }
.prose .grid .card h3 { font-size: 16px; }
.prose .grid .card p { font-size: 14px; line-height: 1.5; }
.prose .table { font-size: 15px; }
.prose strong .ui, .ui {
  display: inline; font-weight: 600; color: var(--white); background: var(--chip-bg); border: 1px solid var(--line-input); border-radius: 8px; padding: 1px 8px;
}
@media (max-width: 600px) { .prose { font-size: 16px; } .prose h2 { font-size: 24px; margin-top: 36px; } }

pre {
  position: relative; margin: 0 0 22px; padding: 16px 18px; border-radius: var(--r-callout); overflow-x: auto;
  background: var(--inset); border: 1px solid var(--line-card); color: var(--ink); font-size: 14px; line-height: 1.6; tab-size: 4;
}
pre code { font-size: inherit; color: inherit; background: none; padding: 0; }
pre.has-copy { padding-right: 80px; }
pre > .copy-btn { position: absolute; top: 8px; right: 8px; }

.anchor { margin-left: .35em; color: var(--ink-muted); font-weight: 400; text-decoration: none; opacity: 0; transition: opacity .15s; }
h2:hover > .anchor, h3:hover > .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--gold); }
@media (hover: none) { .anchor { display: none; } }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 14px; }
ol.steps > li { counter-increment: step; position: relative; margin: 0; padding: 3px 0 0 48px; min-height: 34px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: var(--r-btn);
  display: grid; place-items: center; font: 700 15px/1 var(--font-display); color: var(--gold); border: 1px solid var(--line-input); background: var(--surface);
}
ol.steps > li > :last-child { margin-bottom: 0; }

dl.where {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 22px; padding: 12px 14px;
  font-size: 15px; line-height: 1.5; color: var(--ink-4); background: var(--inset); border: 1px solid var(--line-card); border-radius: var(--r-btn);
}
dl.where dt { grid-column: 1; }
dl.where dd { grid-column: 2; }
dl.where dt { font-weight: 600; color: var(--ink-muted); font-size: 13px; letter-spacing: .5px; text-transform: uppercase; padding-top: 2px; }
dl.where dd { margin: 0; }
.card dl.where { margin: 0; font-size: 14px; }
@media (max-width: 520px) { dl.where { grid-template-columns: minmax(0, 1fr); gap: 2px; } dl.where dt, dl.where dd { grid-column: 1; } dl.where dd { margin-bottom: 6px; } }

/* ---------- sections (hand-written pages) ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 48px var(--pad); }
.section.first { padding-top: 88px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head > div { display: flex; flex-direction: column; gap: 10px; }
.section-head .eyebrow { margin: 0; }
.section-head h2, .section-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 38px; line-height: 1.15; color: var(--ink-head); }
.section-title { font-size: 34px; margin-bottom: 28px; }
.section-head p { margin: 0; color: var(--ink-3); max-width: 640px; }
.section-head .more { font-weight: 600; font-size: 15px; }
@media (max-width: 600px) { .section { padding: 36px var(--pad); } .section.first { padding-top: 48px; } .section-head h2, .section-title { font-size: 28px; } .section-head { margin-bottom: 24px; } }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-rune { position: absolute; right: -260px; top: -220px; width: 900px; height: 900px; opacity: .35; pointer-events: none; }
.hero-rune .spin { transform-origin: 450px 450px; animation: spin 240s linear infinite; }
.hero-grid {
  position: relative; max-width: var(--max); margin: 0 auto; padding: 96px var(--pad) 104px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-copy > * { margin: 0; }
.hero h1 { font-size: 64px; line-height: 1.05; }
.hero .lede { font-size: 19px; line-height: 1.6; max-width: 560px; }
.hero .search-box { max-width: 520px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding: 56px var(--pad) 56px; }
  .hero h1 { font-size: 44px; }
  .mock { display: none !important; }
}
@media (max-width: 600px) {
  .hero-grid { padding: 32px var(--pad) 32px; }
  .hero-copy { gap: 18px; }
  .hero h1 { font-size: 38px; line-height: 1.08; }
  .hero .lede { font-size: 16px; }
  .hero-rune { width: 520px; height: 520px; right: -260px; top: -160px; }
}

.mock { background: var(--surface); border: 1px solid var(--line-input); border-radius: 18px; box-shadow: var(--shadow-panel); overflow: hidden; }
.mock-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line-input); background: var(--surface-head); font-weight: 600; font-size: 14px; }
.mock-head .ctl { display: flex; gap: 10px; color: var(--ink-muted); }
.mock-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.mock-bar { display: flex; align-items: center; gap: 12px; }
.mock-bar b { width: 26px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.mock-bar .track { flex: 1; height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.mock-bar .fill { height: 10px; border-radius: 5px; }
.mock-bar .fill { display: block; }
.mock-bar .fill.hp { width: 86%; background: var(--vital-hp); }
.mock-bar .fill.st { width: 64%; background: var(--gold); }
.mock-bar .fill.mn { width: 92%; background: var(--vital-mn); }
.mock-bar .pct { font: 12px var(--font-mono); color: var(--ink-2); }
.mock-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.mock-stats div { background: var(--bg); border: 1px solid var(--line-input); border-radius: var(--r-btn); padding: 10px 12px; }
.mock-stats span { display: block; font-size: 11px; color: var(--ink-muted); }
.mock-stats strong { display: block; font-size: 14px; margin-top: 2px; }
.mock-cmds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mock-cmds .cmd { font-size: 12px; padding: 4px 8px; }

.release-panel {
  background: var(--surface); border: 1px solid var(--line-input); border-radius: var(--r-panel); padding: 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px; align-items: start;
}
.release-panel .rp-copy { display: flex; flex-direction: column; gap: 14px; }
.release-panel .rp-copy > * { margin: 0; }
.release-panel .ver { font: 700 34px/1.2 var(--font-mono); color: var(--ink-head); margin: 0; }
.release-panel p { font-size: 16px; line-height: 1.6; color: var(--ink-3); }
.release-panel .more { font-weight: 600; font-size: 15px; }
.change-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.change-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--ink-4); }
.change-list .badge { flex: none; margin-top: 2px; }
@media (max-width: 600px) { .release-panel { padding: 22px; gap: 24px; } .release-panel .ver { font-size: 26px; } }

/* FAQ */
.faq details { border: 1px solid var(--line-card); border-radius: var(--r-callout); background: var(--surface); margin: 0 0 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; position: relative; font-weight: 600; color: var(--ink-head); font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > :not(summary) { padding: 0 18px; font-size: 16px; }
.faq details > :last-child { padding-bottom: 16px; margin-bottom: 0; }

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .footer, .toc, .doc-side, .copy-btn, .hero-rune, .mock { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Screenshot boxes stay hidden until real screenshots are added (remove this rule then). */
.shot{display:none}
