/*
 * sitodns.com styles. One file, no build step.
 *
 * Tokens come from the Sito web UI (light and dark). The theme follows the system
 * preference; the header toggle sets data-theme on <html> to override it.
 * Pages carry no inline styles: the CSP in _headers forbids them.
 */

/* ---------- Tokens ---------- */

:root {
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --fg: #1d1d1f;
  --bg: #fafafa;
  --card: #ffffff;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #2f6f4f;
  --accent-fg: #ffffff;
  --accent-soft: #e7f0ea;
  --blocked: #c0453b;
  --answered: #4f9a72;
  --code-bg: #f5f5f7;
  --t-key: #1d1d1f;
  --t-str: #9a4a12;
  --t-com: #6e6e73;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .07);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg: #ececec;
    --bg: #161616;
    --card: #1f1f20;
    --muted: #9a9a9f;
    --line: #3a3a3c;
    --line-soft: #2a2a2c;
    --accent: #6fbf8f;
    --accent-fg: #0d2117;
    --accent-soft: #1c2b22;
    --blocked: #e0726a;
    --answered: #6fbf8f;
    --code-bg: #111112;
    --t-key: #ececec;
    --t-str: #e2b07a;
    --t-com: #8e8e93;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --fg: #ececec;
  --bg: #161616;
  --card: #1f1f20;
  --muted: #9a9a9f;
  --line: #3a3a3c;
  --line-soft: #2a2a2c;
  --accent: #6fbf8f;
  --accent-fg: #0d2117;
  --accent-soft: #1c2b22;
  --blocked: #e0726a;
  --answered: #6fbf8f;
  --code-bg: #111112;
  --t-key: #ececec;
  --t-str: #e2b07a;
  --t-com: #8e8e93;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 { margin: 0; color: var(--fg); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

:not(pre) > code {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--code-bg);
  border: 1px solid var(--line-soft);
  padding: .1em .38em;
  border-radius: 5px;
}

[hidden] { display: none !important; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
}
.skip:focus { top: 12px; }

.muted { color: var(--muted); }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1360px; }
.wrap-narrow { max-width: 880px; }

.sec { padding: 104px 0; }
.sec-rule { border-top: 1px solid var(--line-soft); }
.sec-alt { background: var(--card); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.sec-head { display: flex; flex-direction: column; gap: 12px; max-width: 660px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(27px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -.022em; }
.sec-head p { font-size: 17px; color: var(--muted); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-head { display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: clamp(34px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.03em; }
.page-head .lede { font-size: 18px; color: var(--muted); }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line-soft); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  min-height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fg); text-decoration: none; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.brand-tag {
  font: 12px/1 var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.logo .shield { fill: var(--accent); }
.logo .sieve { fill: none; stroke: var(--accent-fg); stroke-width: 2.6; stroke-linecap: round; }

.nav-links { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }
.navlink { color: var(--fg); text-decoration: none; font-size: 15px; padding: 10px 2px; }
.navlink:hover { color: var(--accent); }
.navlink[aria-current="page"] { color: var(--accent); font-weight: 600; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--muted); }

/* Show the icon for the theme the button switches to. */
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}

.stroke-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--card); }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.site-footer a:hover { color: var(--fg); }

.footer-main { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-top: 56px; padding-bottom: 32px; }
.footer-about { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.footer-about .brand-name { font-size: 18px; }
.footer-about p { font-size: 14.5px; color: var(--muted); max-width: 26em; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title { font-size: 13px; font-weight: 600; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- Buttons, badges, chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: var(--card); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 13px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font-size: 13.5px;
  text-decoration: none;
}
.badge:hover { border-color: var(--muted); }

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chip, .tag-planned {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
}
.tag-planned { border-style: dashed; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-lg .chip { height: 26px; padding: 0 10px; font-size: 12.5px; }

/* ---------- Code ---------- */

.code { font: 13.5px/1.8 var(--mono); overflow-x: auto; padding: 14px 0; }
.code-lg { padding: 18px 0; }
/* Block, not flex: flex drops whitespace-only text between spans, and code needs it. */
.cl { display: block; min-width: max-content; min-height: 1.8em; padding-right: 24px; white-space: pre; }
.cl.p { padding-left: 20px; }
.cl .mk { display: inline-flex; width: 34px; justify-content: center; vertical-align: middle; }
.cl .n { display: inline-block; width: 22px; margin-right: 18px; text-align: right; color: var(--muted); user-select: none; }

.t-sec { color: var(--accent); font-weight: 600; }
.t-key { color: var(--t-key); }
.t-str { color: var(--t-str); }
.t-pun { color: var(--muted); }
.t-com { color: var(--t-com); font-style: italic; }
.t-ps { color: var(--muted); user-select: none; }
.t-blk { color: var(--blocked); }

.codecard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.codecard-raised { border-radius: 14px; box-shadow: var(--shadow); }
.codecard-inset { background: var(--bg); }
.codehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 8px 0 18px;
  border-bottom: 1px solid var(--line-soft);
  font: 12.5px/1 var(--mono);
  color: var(--muted);
}

.snippet { background: var(--code-bg); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 0; }

.copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font: 500 12.5px/1 var(--sans);
  cursor: pointer;
}
.copy::after { content: ""; position: absolute; inset: -6px; }
.copy:hover { color: var(--fg); border-color: var(--muted); }

.mkc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font: 600 11.5px/1 var(--sans);
}

/* ---------- Tabs (enhanced by site.js; stacked panels without JS) ---------- */

.tabs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 10px 0 8px;
  border-bottom: 1px solid var(--line-soft);
}
.tablist { display: flex; gap: 4px; overflow-x: auto; }
.tab {
  appearance: none;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: 500 14px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tabpanel + .tabpanel { border-top: 1px solid var(--line-soft); }
.tabpanel-title { padding: 14px 20px 0; font: 600 13px/1 var(--mono); color: var(--muted); }
.js-tabs .tabpanel + .tabpanel { border-top: 0; }
.js-tabs .tabpanel-title { display: none; }

/* ---------- Callout ---------- */

.callout { display: flex; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.callout-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.callout-icon svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.callout-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.callout-body strong { font-size: 15.5px; }
.callout-body p { color: var(--muted); }
.callout-plain p { color: var(--fg); }

/* ---------- Home: hero ---------- */

.hero { padding-top: 88px; padding-bottom: 80px; }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 56px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.06; letter-spacing: -.032em; font-weight: 700; }
.hero h1 span { color: var(--muted); }
.hero-lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 32em; }
.hero-note { font-size: 15px; color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 28px 32px;
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.facts > div { display: flex; flex-direction: column; gap: 6px; }
.facts dt { font-size: 28px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.facts dd { font-size: 14.5px; color: var(--muted); }

/* ---------- Home: sample dashboard ---------- */

.dash { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.dash-bar { display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.dash-brand { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.dash-nav { display: flex; gap: 16px; color: var(--muted); }
.dash-nav b { color: var(--fg); font-weight: 600; }
.dash-sample {
  margin-left: auto;
  padding: 3px 9px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  font: 11.5px/1.4 var(--mono);
  color: var(--muted);
}
.dash-body { padding: 18px; display: flex; flex-direction: column; gap: 20px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; }
.tile dt { font-size: 11.5px; color: var(--muted); }
.tile dd { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile dd.is-blocked { color: var(--blocked); }

.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.chart-head b { font-weight: 600; }
.legend { display: flex; gap: 14px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend .sw-a { background: var(--answered); }
.legend .sw-b { background: var(--blocked); }

.chart { display: block; width: 100%; height: 132px; border-bottom: 1px solid var(--line); }
.chart .a { fill: var(--answered); }
.chart .b { fill: var(--blocked); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 10px; font: 11px/1 var(--mono); color: var(--muted); }

.top-title { font-size: 12.5px; font-weight: 600; }
.top-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.top-list li { display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 4px 12px; font-size: 12.5px; }
.top-list .dom { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list .cnt { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.top-list svg { grid-column: 1 / -1; display: block; width: 100%; height: 4px; }
.top-list .track { fill: var(--line-soft); }
.top-list .fill { fill: var(--blocked); }

.dash-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.dash-foot .state { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.dash-foot .fake-btn { padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; }

/* ---------- Home: cards ---------- */

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.why-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.why-card .num { font: 600 13px/1 var(--mono); color: var(--muted); }
.why-card h3 { font-size: 21px; letter-spacing: -.015em; }
.why-card > p { font-size: 15.5px; color: var(--muted); }
.why-card .detail { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.why-card .detail p { font-size: 13px; color: var(--muted); }

/* ---------- Home: annotated config ---------- */

.config-row { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.config-file { flex: 1.7 1 600px; min-width: 0; }
.config-file figcaption { font: 13px/1 var(--mono); color: var(--muted); }
.notes { flex: 1 1 320px; display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.notes li { display: flex; gap: 14px; }
.notes .mkc { margin-top: 2px; }
.notes div { display: flex; flex-direction: column; gap: 4px; }
.notes h3 { font-size: 16px; }
.notes p { font-size: 15px; color: var(--muted); }

/* ---------- Home: query flow ---------- */

.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; }
.flow > li { position: relative; display: flex; }
.flow > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -21px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
}
.step-card { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.step-card .num { font: 600 12px/1 var(--mono); color: var(--muted); }
.step-card h3 { font-size: 16px; }
.step-card p { font-size: 14px; color: var(--muted); }
.step-card.is-block { border-color: var(--blocked); }
.step-card.is-block .num { color: var(--blocked); }
.step-card.is-up { border-color: var(--accent); }
.step-card.is-up .num { color: var(--accent); }

.flow-note {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 16px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 15px;
}
.flow-note svg { color: var(--accent); }

/* ---------- Home: features ---------- */

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.feature-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.feature h3 { font-size: 15.5px; }
.feature p { font-size: 14px; color: var(--muted); }
.after-note { margin-top: 24px; font-size: 14.5px; color: var(--muted); }

/* ---------- Tables ---------- */

.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }

.cmp { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 15px; }
.cmp th, .cmp td { padding: 14px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.cmp thead th { font-size: 14px; font-weight: 600; border-bottom-color: var(--line); }
.cmp tbody th { font-weight: 500; }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp .me { background: var(--accent-soft); }
.cmp thead .me { color: var(--accent); }

.yes, .no { display: inline-flex; align-items: center; gap: 7px; }
.yes svg { color: var(--accent); }
.no { color: var(--muted); }
.mark { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Home: FAQ ---------- */

.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 32px 56px; }
.faq dt { font-size: 17px; font-weight: 600; }
.faq dd { margin-top: 6px; font-size: 15.5px; color: var(--muted); }

/* ---------- Home: quickstart ---------- */


.qs { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.qs-copy { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.qs-copy h2 { font-size: clamp(27px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -.022em; }
.qs-copy .lede { font-size: 17px; color: var(--muted); }
.qs-card { flex: 1.5 1 520px; min-width: 0; }

/* ---------- Get started ---------- */

.guide { display: flex; gap: 64px; align-items: flex-start; padding-top: 72px; padding-bottom: 112px; }
.guide-body { flex: 1 1 0; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 56px; }
.guide-section { display: flex; flex-direction: column; gap: 28px; }
.guide-step-title { display: flex; align-items: center; gap: 14px; }
.guide-step-title h2 { font-size: 27px; letter-spacing: -.02em; }
.step {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--card);
  font: 600 13px/1 var(--mono);
}
.guide-item { display: flex; flex-direction: column; gap: 12px; }
.guide-item h3 { font-size: 19px; scroll-margin-top: 24px; }
.guide-item > p { color: var(--muted); }
.guide-item .small { font-size: 14.5px; }
.guide-list { display: flex; flex-direction: column; gap: 28px; }

.next-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.next-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--fg); text-decoration: none; }
.next-card:hover { border-color: var(--muted); }
.next-card .k { font-size: 13px; color: var(--muted); }
.next-card strong { font-size: 16.5px; }
.next-card .d { font-size: 14.5px; color: var(--muted); }

.toc { flex: 0 0 200px; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; }
.toc-guide { padding-top: 112px; }
.toc-title { margin-bottom: 6px; font-size: 12.5px; font-weight: 600; }
.toc a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--fg); }
.toc .sub { padding-left: 14px; }

/* ---------- Docs ---------- */

.docs { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; padding-top: 40px; padding-bottom: 112px; }
.side { flex: 1 1 232px; max-width: 260px; display: flex; flex-direction: column; gap: 26px; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-title { margin: 0 0 4px; padding: 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side a { display: flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; color: var(--fg); text-decoration: none; font-size: 14.5px; }
.side a:hover { background: var(--line-soft); }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side .mono { font-family: var(--mono); font-size: 13.5px; }

.docs-main { flex: 999 1 560px; min-width: 0; max-width: 800px; display: flex; flex-direction: column; gap: 32px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.docs-title { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.docs-title.mono { font-family: var(--mono); }
.docs-foot { display: flex; flex-direction: column; gap: 20px; padding-top: 28px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.docs-foot a { color: var(--muted); }
.toc-docs { flex: 0 0 188px; padding-top: 4px; }

/* Long-form text rendered from Markdown. */
.prose { display: flex; flex-direction: column; gap: 16px; line-height: 1.65; }
.prose h2 { margin-top: 28px; font-size: 24px; letter-spacing: -.015em; scroll-margin-top: 24px; }
.prose h3 { margin-top: 12px; font-size: 18px; scroll-margin-top: 24px; }
.prose ul { list-style: disc; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.prose ol { list-style: decimal; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.prose pre {
  position: relative;
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: 13.5px/1.8 var(--mono);
}
.prose pre code { font: inherit; }
.prose pre .copy { position: absolute; top: 8px; right: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.prose thead th { font-size: 13px; font-weight: 600; color: var(--muted); border-bottom-color: var(--line); background: var(--card); }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose td:first-child { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; }
.prose .table-box { border-radius: 12px; }
.prose .table-box table { min-width: 680px; }

/* ---------- Roadmap ---------- */

.roadmap { padding-top: 72px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 56px; }

.tl > li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 22px; padding-bottom: 36px; }
.tl > li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--line); }
.tl-mark { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 600 12px/1 var(--mono); }
.tl-mark.done { background: var(--accent); color: var(--accent-fg); }
.tl-mark.current { background: var(--card); border: 2px solid var(--accent); color: var(--accent); }
.tl-mark.planned { background: var(--bg); border: 2px dashed var(--line); color: var(--muted); }

.tl-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tl-card.current { border-color: var(--accent); gap: 14px; }
.tl-card h2 { font-size: 22px; letter-spacing: -.015em; }
.tl-card > p { color: var(--muted); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tl-meta .label { font: 13px/1 var(--mono); color: var(--muted); }

.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font: 500 12px/1 var(--mono); }
.status.current { background: var(--accent-soft); color: var(--accent); }
.status.current::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.planned { border: 1px dashed var(--line); color: var(--muted); }
.status.done { background: var(--accent); color: var(--accent-fg); }

.tl-items { display: flex; flex-direction: column; gap: 8px; }
.tl-items.planned { color: var(--muted); }
.tl-items li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.tl-items svg { flex: none; margin-top: 4px; }
.tl-items .done svg, .tl-items .doing svg { color: var(--accent); }
.i-planned { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 3 3; }
.i-doing circle { fill: none; stroke: currentColor; stroke-width: 2.2; }
.i-doing path { fill: currentColor; }

.aside-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.aside-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.aside-card.dashed { border-style: dashed; background: none; }
.aside-card h2 { font-size: 18px; }
.aside-card ul { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.aside-card.dashed ul { color: var(--muted); }

/* ---------- 404 ---------- */

.notfound { padding-top: 120px; padding-bottom: 120px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .toc-docs { display: none; }
}

@media (max-width: 960px) {
  .toc-guide { display: none; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .flow > li:not(:last-child)::after { top: auto; right: auto; bottom: -21px; left: 30px; transform: rotate(135deg); }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .sec { padding: 72px 0; }
  .hero { padding-top: 56px; }
  .facts { margin-top: 56px; }
  .nav-links { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 12px; }
  .theme-btn { margin-left: auto; }
  .hide-sm { display: none; }
  .guide { padding-top: 48px; }
  .side { max-width: none; }
  .tl > li { gap: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
