/* ============================================================
   DPVault public site, on top of operator.css.
   Everything the four pages and the 404 share. A marketing page is
   prose, so type is larger and there is more air than in the console,
   but every colour, radius and border is an Operator token: the dark
   and light themes both work, and nothing here names a colour.

   The few frame classes the hero's app rendition needs (.rail, .kv,
   .state, .secret, .stats) mirror ui/frame.css, which the site does
   not load.
   ============================================================ */

:root {
  color-scheme: dark;
  --page-w: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --bar-h: 48px;
  --t-body: 15px;
  --t-small: 14px;
}
[data-theme="light"] { color-scheme: light; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 20px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: var(--t-body);
  line-height: 1.6;
  overflow-wrap: break-word;
}
body.site > main { flex: 1; min-width: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-1); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.wrap { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 8px 12px; background: var(--bg-3); color: var(--fg-0);
  border: 1px solid var(--line-3); border-radius: var(--r-2); font-size: var(--t-small);
}
.skip:focus { top: 8px; }

/* ---- Type ---- */
h1, h2, h3, p { margin: 0; }
.t-eyebrow { color: var(--fg-2); }
.display {
  font-size: clamp(34px, 4.6vw, 50px); line-height: 1.06; font-weight: 600;
  letter-spacing: -0.025em; color: var(--fg-0);
}
.page-title {
  font-size: clamp(28px, 3.6vw, 38px); line-height: 1.12; font-weight: 600;
  letter-spacing: -0.02em; color: var(--fg-0);
}
.lede { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; color: var(--fg-1); max-width: 64ch; }
.sec-title { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; color: var(--fg-0); }
.sub-title { font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--fg-0); }
.site b, .site strong { font-weight: 600; color: var(--fg-0); }
.prose { color: var(--fg-1); max-width: 74ch; }
.muted { color: var(--fg-2); }
.mono, .site code { font-family: var(--ff-mono); font-size: 0.92em; }
.site :not(pre) > code {
  padding: 1px 5px; background: var(--bg-3); border: 1px solid var(--line-1);
  border-radius: var(--r-1); color: var(--fg-0); overflow-wrap: anywhere;
}

/* Links in prose: ink with an accent underline, so they pass contrast in both themes. */
.site main a:not(.btn):not(.dl-row):not(.toc-link):not(.go) {
  color: var(--fg-0); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.site main a:not(.btn):not(.dl-row):not(.toc-link):not(.go):hover { text-decoration-thickness: 2px; }

/* ---- Buttons at page size ---- */
a.btn, a.btn:hover { text-decoration: none; }
.btn.xl { height: 40px; padding: 0 18px; font-size: var(--t-body); font-weight: 500; border-radius: var(--r-3); }
.btn .arrow { font-family: var(--ff-mono); }

/* ---- Header: the console's app bar, set as a page header ---- */
.site-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-1); border-bottom: 1px solid var(--line-1);
}
.site-bar .appbar {
  height: auto; min-height: var(--bar-h); max-width: var(--page-w); margin: 0 auto;
  padding: 0 var(--gutter); background: none; border: none; flex-wrap: wrap; gap: 0 var(--s-5);
}
.site-bar .brand, .site-bar .brand:hover { text-decoration: none; height: var(--bar-h); font-size: var(--t-md); }
.site-bar .navlinks { align-self: stretch; }
.site-bar .navlink { font-size: var(--t-small); min-height: var(--bar-h); text-decoration: none; margin-bottom: -1px; }
.site-bar .navlink:hover { text-decoration: none; }
.site-bar .navlink:focus-visible { outline-offset: -2px; }
.site-bar .bar-end { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; height: var(--bar-h); }
.site-bar .btn { height: 30px; padding: 0 12px; font-size: var(--t-md); }
.site-bar .btn.icon { width: 30px; padding: 0; font-size: var(--t-lg); }
/* The theme button needs JavaScript; without it the page stays on the default theme. */
.theme-toggle { display: none; }
.js .theme-toggle { display: inline-flex; }

@media (max-width: 720px) {
  :root { --bar-h: 44px; }
  html { scroll-padding-top: calc(var(--bar-h) + 40px + 16px); }
  .site-bar .navlinks { order: 3; flex: 0 0 100%; height: 40px; border-top: 1px solid var(--line-1); margin: 0 calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - var(--s-4)); width: auto; flex-basis: calc(100% + var(--gutter) * 2); }
  .site-bar .navlink { min-height: 40px; }
}

/* ---- Bands ---- */
.band { padding: 56px 0; border-bottom: 1px solid var(--line-1); }
.band:last-child { border-bottom: none; }
.band.tight { padding: 40px 0; }
.band-head { margin-bottom: 24px; }
.band-head .t-eyebrow { display: block; margin-bottom: 10px; }
.band-head p { margin-top: 10px; }
.hero { background-color: var(--bg-0); }
.title-band { padding: 48px 0 40px; border-bottom: 1px solid var(--line-1); background-color: var(--bg-0); }
.title-band .t-eyebrow { display: block; margin-bottom: 12px; }
.title-band .lede { margin-top: 14px; }

/* ---- Landing hero ---- */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px; align-items: center;
}
.hero-copy .t-eyebrow { display: block; margin-bottom: 16px; }
.hero-copy .lede { margin-top: 18px; max-width: 44ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero .stats { margin-top: 48px; }
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-copy .lede { max-width: 60ch; }
}

/* ---- Stat strip (mirrors ui/frame.css) ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 14px 16px 15px; border-right: 1px solid var(--line-1); min-width: 0; }
.stat:last-child { border-right: none; }
.stat-k { font: 500 var(--t-xs)/1.4 var(--ff-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2); }
.stat-v { margin-top: 6px; font-family: var(--ff-mono); font-size: var(--t-lg); font-weight: 500; color: var(--fg-0); line-height: 1.3; overflow-wrap: anywhere; }
.stat-d { margin-top: 4px; font-size: var(--t-md); color: var(--fg-2); line-height: 1.45; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-1); }
}
@media (max-width: 440px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { border-right: none; }
  .stat + .stat { border-top: 1px solid var(--line-1); }
}

/* ---- The app, drawn from the real frame classes ---- */
.mock {
  font-size: var(--t-md); line-height: 1.4; overflow: hidden;
  border-color: var(--line-2); box-shadow: var(--shadow-2);
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.mock .appbar { height: 36px; gap: var(--s-4); z-index: auto; }
.mock .search { position: relative; display: flex; align-items: center; flex: 1; max-width: 240px; min-width: 0; }
.mock .search .input { display: flex; align-items: center; padding-left: 24px; color: var(--fg-3); height: 24px; white-space: nowrap; overflow: hidden; }
.mock .search .icon-l { position: absolute; left: 7px; color: var(--fg-3); font-family: var(--ff-mono); font-size: var(--t-sm); }
.mock .search .kbd { position: absolute; right: 4px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-4); color: var(--fg-0); font: 600 10px/22px var(--ff-mono); text-align: center; flex: none; }
.mock-body { display: grid; grid-template-columns: 148px 184px minmax(0, 1fr); min-height: 318px; }
.rail { background: var(--bg-1); border-right: 1px solid var(--line-1); padding: 2px 0 10px; }
.rail-group { display: flex; align-items: center; padding: 12px 12px 6px; font: 500 var(--t-xxs)/1 var(--ff-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.rail-link { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px 0 10px; color: var(--fg-2); font-size: var(--t-sm); border-left: 2px solid transparent; white-space: nowrap; }
.rail-link.active { background: var(--bg-2); color: var(--fg-0); border-left-color: var(--accent); }
.rail-link.active .gly { color: var(--accent); }
.rail-link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-link .meta { margin-left: auto; font: 500 var(--t-xs)/1 var(--ff-mono); color: var(--fg-3); }
.mock-list { border-right: 1px solid var(--line-1); background: var(--bg-0); min-width: 0; }
.mock-list .panel-header, .mock-detail .panel-header { height: 30px; background: var(--bg-1); }
.mock-list .list-row { height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line-1); gap: 8px; }
.mock-list .list-row .label { display: flex; flex-direction: column; line-height: 1.25; }
.mock-list .list-row .label small { font: 400 var(--t-xs)/1.3 var(--ff-mono); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; }
.mock-list .list-row.selected .label small { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.mock-detail { min-width: 0; background: var(--bg-1); display: flex; flex-direction: column; }
.mock-detail .head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.mock-detail .head b { font-size: var(--t-lg); font-weight: 600; color: var(--fg-0); }
.mock-detail .kv { padding: 2px 14px 12px; }
.mock-detail .foot { margin-top: auto; padding: 8px 14px; border-top: 1px solid var(--line-1); font-size: var(--t-sm); color: var(--fg-2); }
.mock .statusbar { gap: var(--s-5); overflow: hidden; white-space: nowrap; }
.mock .statusbar > span { display: inline-flex; align-items: center; gap: 6px; }
.mock .statusbar .note { color: var(--amber); }
@media (max-width: 620px) {
  .mock-body { grid-template-columns: 168px minmax(0, 1fr); }
  .mock .rail { display: none; }
  .mock .statusbar > span:nth-child(n+3):not(.spacer):not(.note) { display: none; }
}
@media (max-width: 480px) {
  .mock-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .mock-list { border-right: none; border-bottom: 1px solid var(--line-1); }
  .mock-list .list-row:nth-child(n+4) { display: none; }
  .mock .search .kbd, .mock .who { display: none; }
  .mock .statusbar > span:nth-child(n+2):not(.spacer):not(.note) { display: none; }
}

/* ---- Key and value list (mirrors ui/frame.css) ---- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: var(--t-sm); }
.kv dt { color: var(--fg-2); }
.kv dd { margin: 0; color: var(--fg-1); min-width: 0; overflow-wrap: anywhere; }
.kv dd.mono, .kv .mono { font-family: var(--ff-mono); font-size: inherit; color: var(--fg-0); }
.kv .masked { letter-spacing: 0.16em; color: var(--fg-2); }
.kv .cipher { color: var(--fg-2); }
.kv .acts { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }

/* ---- State: a shape and a word, never colour alone (mirrors ui/frame.css) ---- */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-md); color: var(--fg-1); white-space: nowrap; }
.state::before { content: ''; width: 8px; height: 8px; flex: none; box-sizing: border-box; }
.state.done::before { border-radius: 50%; background: var(--teal); }
.state.wait::before { border-radius: 1px; background: var(--amber); }
.state.ready::before { border-radius: 50%; border: 2px solid var(--fg-2); }
.tag { white-space: nowrap; }

/* ---- Panels at page size ---- */
.panel-header { height: auto; min-height: 38px; padding: 6px 14px; flex-wrap: wrap; gap: 4px var(--s-3); }
.mock .panel-header { min-height: 0; padding: 0 var(--s-4); flex-wrap: nowrap; }
.panel-header .hint { color: var(--fg-2); font-size: var(--t-md); }
.panel-header .panel-title { color: var(--fg-1); }
.panel-body { padding: 16px; }
.panel-body > * + * { margin-top: 12px; }
.card-t { font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--fg-0); }
.card p, .panel-body p { color: var(--fg-1); font-size: var(--t-small); line-height: 1.6; }
.grid { display: grid; gap: 12px; align-items: stretch; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .g-2, .g-4 { grid-template-columns: minmax(0, 1fr); } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.site .tags .tag { height: auto; min-height: 22px; padding: 2px 8px; white-space: normal; line-height: 1.4; }

/* ---- Lifecycle cards (landing) ---- */
.life { display: flex; flex-direction: column; }
.life .panel-header .n { font: 500 var(--t-xs) var(--ff-mono); color: var(--fg-2); }
.life .panel-header .tag { margin-left: auto; }
.life .panel-body { flex: 1; }
.life .kv { font-size: var(--t-md); gap: 8px 14px; }
.life .kv dt { font: 500 var(--t-xs)/1.7 var(--ff-mono); letter-spacing: 0.1em; }
.life .cap { padding: 10px 16px; border-top: 1px solid var(--line-1); font-size: var(--t-md); color: var(--fg-1); }

/* ---- Link cards ---- */
a.go { display: flex; flex-direction: column; gap: 6px; padding: 16px; color: var(--fg-1); text-decoration: none; transition: var(--transition); }
a.go:hover { background: var(--bg-2); border-color: var(--line-3); text-decoration: none; }
a.go .card-t { display: flex; align-items: center; gap: 8px; }
a.go .card-t .arrow { margin-left: auto; font-family: var(--ff-mono); color: var(--fg-2); }
a.go:hover .card-t .arrow { color: var(--accent); }
a.go p { font-size: var(--t-small); color: var(--fg-1); }

/* ---- Numbered steps ---- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-1); font-size: var(--t-small); color: var(--fg-1); line-height: 1.55;
}
.steps > li:last-child { border-bottom: none; }
.steps > li::before {
  content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px;
  font: 500 var(--t-xs)/1 var(--ff-mono); color: var(--fg-1); background: var(--bg-3);
  border: 1px solid var(--line-2); border-radius: var(--r-2);
}

/* The how-it-works sequence: larger numbered panels joined by a line */
.seq { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.seq > li { display: grid; grid-template-columns: 64px minmax(0, 1fr); }
.seq .n {
  display: flex; align-items: flex-start; justify-content: center; padding-top: 18px;
  font: 500 var(--t-lg)/1 var(--ff-mono); color: var(--fg-2);
  border-right: 1px solid var(--line-1); background: var(--bg-2); border-radius: var(--r-3) 0 0 var(--r-3);
}
.seq .body { padding: 16px 18px 18px; }
.seq .body > * + * { margin-top: 10px; }
.seq .body p { color: var(--fg-1); max-width: 78ch; }
@media (min-width: 1000px) {
  .seq .body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 10px 40px; align-items: start; }
  .seq .body > * + * { margin-top: 0; }
  .seq .body .tags { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-start; padding-top: 3px; }
}
.seq > li.key { border-left: 2px solid var(--accent); }
.seq > li.key .n { color: var(--fg-0); }
@media (max-width: 560px) {
  .seq > li { grid-template-columns: minmax(0, 1fr); }
  .seq .n { justify-content: flex-start; padding: 8px 16px; border-right: none; border-bottom: 1px solid var(--line-1); border-radius: var(--r-3) var(--r-3) 0 0; font-size: var(--t-md); }
}

/* ---- Tables at page size ---- */
.tbl-wrap { overflow-x: auto; }
.site .tbl { font-size: var(--t-small); }
.site .tbl thead th { position: static; color: var(--fg-2); padding: 8px 14px; }
.site .tbl tbody td { padding: 10px 14px; white-space: normal; vertical-align: top; line-height: 1.55; }
.site .tbl tbody tr:last-child td { border-bottom: none; }
.site .tbl tbody tr:hover td { background: none; }
.site .tbl tbody th { text-align: left; font-weight: 600; color: var(--fg-0); padding: 10px 14px; vertical-align: top; border-bottom: 1px solid var(--line-1); border-right: 1px solid var(--line-1); white-space: nowrap; line-height: 1.55; }
.site .tbl tbody tr:last-child th { border-bottom: none; }
@media (max-width: 640px) {
  .site .tbl.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .site .tbl.stack, .site .tbl.stack tbody, .site .tbl.stack tr, .site .tbl.stack th, .site .tbl.stack td { display: block; }
  .site .tbl.stack tbody th { border: none; padding: 12px 14px 0; white-space: normal; }
  .site .tbl.stack tbody td { border: none; padding: 4px 14px 0; }
  .site .tbl.stack tbody td:last-child { padding-bottom: 12px; }
  .site .tbl.stack tbody tr { border-bottom: 1px solid var(--line-1); }
  .site .tbl.stack tbody tr:last-child { border-bottom: none; }
  .site .tbl.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--fg-2); font: 500 var(--t-xs) var(--ff-mono); text-transform: uppercase; letter-spacing: 0.08em; }
}

/* ---- Callouts at page size ---- */
.site .callout { padding: 14px 16px; font-size: var(--t-small); line-height: 1.6; }
.site .callout .ttl { font-size: var(--t-body); margin-bottom: 4px; }

/* ---- Code ---- */
pre.code { margin: 0; font-size: var(--t-md); line-height: 1.6; tab-size: 2; }
.code .com { color: var(--fg-2); font-style: normal; }
.code .key { color: var(--fg-0); font-weight: 500; }
.codeblock { position: relative; }
.codeblock .copy { position: absolute; top: 7px; right: 7px; }
.js .codeblock pre.code { padding-right: 74px; }
.codeblock.one pre.code { padding: 9px 12px; }
.js .codeblock.one pre.code { padding-right: 74px; }
.codeblock.one .copy { top: 50%; transform: translateY(-50%); }

/* Values a provider asks for: label on the left, value on the right */
.vals { margin: 0; }
.vals > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-1); }
.vals > div:last-child { border-bottom: none; }
.vals dt { font-size: var(--t-small); color: var(--fg-2); }
.vals dd { margin: 0; min-width: 0; font-size: var(--t-small); color: var(--fg-1); }
@media (max-width: 680px) { .vals > div { grid-template-columns: minmax(0, 1fr); } }

/* ---- Downloads ---- */
.dl-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-1); }
.dl-list li + li { border-top: 1px solid var(--line-1); }
a.dl-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 64px 44px 20px; gap: 14px; align-items: center;
  min-height: 48px; padding: 8px 16px; color: var(--fg-1); text-decoration: none; font-size: var(--t-small);
  transition: background var(--transition);
}
a.dl-row:hover { background: var(--bg-2); text-decoration: none; }
a.dl-row:focus-visible { outline-offset: -2px; }
.dl-row .os { font-weight: 600; color: var(--fg-0); }
.dl-row .os small { font-weight: 400; font-size: var(--t-md); color: var(--fg-2); margin-left: 6px; }
.dl-row .size { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; font-size: var(--t-md); text-align: right; color: var(--fg-1); white-space: nowrap; }
.dl-row .get { font-family: var(--ff-mono); color: var(--fg-2); text-align: right; }
a.dl-row:hover .get { color: var(--accent); }
@media (max-width: 400px) {
  a.dl-row { gap: 10px; padding: 8px 14px; }
  .dl-row .os small { display: block; margin-left: 0; }
}
.app-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.app-head .card-t { font-size: 18px; }
.app-head .spacer { flex: 1; }
.dl-card { display: flex; flex-direction: column; }
.dl-card .panel-body { flex: 1; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.split-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 18px 20px; }
.split-row .t { font-size: 17px; font-weight: 600; color: var(--fg-0); line-height: 1.3; }
.split-row .s { margin-top: 3px; font-size: var(--t-small); color: var(--fg-1); }
.stack-12 > * + * { margin-top: 12px; }
.stack-24 > * + * { margin-top: 24px; }

/* ---- Docs ---- */
.doc { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 48px; padding-top: 32px; padding-bottom: 64px; align-items: start; }
.toc { position: sticky; top: calc(var(--bar-h) + 24px); max-height: calc(100vh - var(--bar-h) - 48px); overflow: auto; }
.toc .t-eyebrow { display: block; padding: 0 0 8px 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.toc-link {
  display: block; padding: 5px 12px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--fg-2); font-size: var(--t-small); line-height: 1.4; text-decoration: none;
}
.toc-link:hover { color: var(--fg-0); background: var(--bg-2); text-decoration: none; }
.toc-link.active { color: var(--fg-0); border-left-color: var(--accent); background: var(--bg-2); }
.toc-link:focus-visible { outline-offset: -2px; }
.doc-main { min-width: 0; max-width: 880px; }
.doc-sec { padding: 8px 0 44px; margin-bottom: 36px; border-bottom: 1px solid var(--line-1); }
.doc-sec > * + * { margin-top: 16px; }
.doc-sec > .sub-title { margin-top: 32px; }
.doc-sec > .sec-lede { margin-top: 10px; font-size: 16px; color: var(--fg-1); max-width: 74ch; }
.doc-sec .sec-title .t-eyebrow { display: block; margin-bottom: 8px; letter-spacing: 0.12em; }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 20px; }
  .toc { position: static; max-height: none; padding: 12px 14px; background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-3); }
  .toc .t-eyebrow { padding-left: 0; }
  .toc ul { border-left: none; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc-link { margin: 0; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); }
  .toc-link.active { border-color: var(--line-2); border-left-color: var(--line-2); }
}

/* ---- Footer ---- */
.site-foot { border-top: 1px solid var(--line-1); background: var(--bg-1); }
.site-foot .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; min-height: 52px; padding-top: 12px; padding-bottom: 12px; font: 400 var(--t-sm)/1.4 var(--ff-mono); color: var(--fg-2); }
.site-foot .logo, .nf .logo { width: 14px; height: 14px; flex: none; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.site-foot .tagline { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0.04em; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
.site-foot a { color: var(--fg-2); text-decoration: none; }
.site-foot a:hover { color: var(--fg-0); text-decoration: underline; }
@media (max-width: 560px) { .site-foot nav { margin-left: 0; } }

/* ---- 404 ---- */
.nf { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 48px var(--gutter); background-color: var(--bg-0); }
.nf-card { width: 440px; max-width: 100%; border-color: var(--line-2); }
.nf-card .panel-header { gap: 10px; }
.nf-card .panel-header .code-n { margin-left: auto; font: 500 var(--t-xs) var(--ff-mono); letter-spacing: 0.08em; color: var(--fg-2); }
.nf-card h1 { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; color: var(--fg-0); }
