/* usbdac documentation site, Duplex brand system 1.0.
   Tokens: branding/tokens/usbdac.css. Light is the base; dark applies with the system
   preference unless the reader picked a theme ([data-theme] on <html>). */

@font-face { font-family: Manrope; src: url(fonts/Manrope.woff) format("woff"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/IBMPlexMono-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }

:root {
  --dac-canvas: #F2F5FA; --dac-surface: #FFFFFF; --dac-raised: #E7EDF5;
  --dac-text: #152237; --dac-muted: #4E6078;
  --dac-primary: #2367C9; --dac-onPrimary: #FFFFFF; --dac-primarySoft: #E1EDFF; --dac-secondary: #344E70;
  --dac-border: #ACB9CA; --dac-line: #D5DDE8; --dac-controlBorder: #6C809B;
  --dac-success: #17634D; --dac-successSoft: #DDF4EA;
  --dac-warning: #76500B; --dac-warningSoft: #FFF0D2;
  --dac-danger: #A02945; --dac-dangerSoft: #FCE5EC;
  --dac-focus: #1358B7;
  --mark-ink: #152237; --mark-accent: #2367C9;
  --code-bg: #EDF1F7; --shadow: 0 1px 2px rgba(21, 34, 55, .06), 0 8px 24px rgba(21, 34, 55, .06);
  --hl-keyword: #6A35B8; --hl-string: #17634D; --hl-comment: #6B7A8F; --hl-number: #A0510B; --hl-func: #1C5DB8; --hl-type: #0E6A7A;
  --font: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 8px; --panel-radius: 16px; --header-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --dac-canvas: #11151C; --dac-surface: #1A212C; --dac-raised: #252F3D;
    --dac-text: #F3F5F7; --dac-muted: #B2C0D2;
    --dac-primary: #78B5FF; --dac-onPrimary: #101E32; --dac-primarySoft: #213753; --dac-secondary: #CADCF3;
    --dac-border: #415169; --dac-line: #2B3646; --dac-controlBorder: #7386A1;
    --dac-success: #87DFC2; --dac-successSoft: #203D34;
    --dac-warning: #F1CA83; --dac-warningSoft: #413723;
    --dac-danger: #FFABB8; --dac-dangerSoft: #442C36;
    --dac-focus: #A3CDFF;
    --mark-ink: #F3F5F7; --mark-accent: #65A9FF;
    --code-bg: #151B24; --shadow: none;
    --hl-keyword: #C7A6FF; --hl-string: #87DFC2; --hl-comment: #8494AA; --hl-number: #F1CA83; --hl-func: #78B5FF; --hl-type: #7FD6E6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --dac-canvas: #11151C; --dac-surface: #1A212C; --dac-raised: #252F3D;
  --dac-text: #F3F5F7; --dac-muted: #B2C0D2;
  --dac-primary: #78B5FF; --dac-onPrimary: #101E32; --dac-primarySoft: #213753; --dac-secondary: #CADCF3;
  --dac-border: #415169; --dac-line: #2B3646; --dac-controlBorder: #7386A1;
  --dac-success: #87DFC2; --dac-successSoft: #203D34;
  --dac-warning: #F1CA83; --dac-warningSoft: #413723;
  --dac-danger: #FFABB8; --dac-dangerSoft: #442C36;
  --dac-focus: #A3CDFF;
  --mark-ink: #F3F5F7; --mark-accent: #65A9FF;
  --code-bg: #151B24; --shadow: none;
  --hl-keyword: #C7A6FF; --hl-string: #87DFC2; --hl-comment: #8494AA; --hl-number: #F1CA83; --hl-func: #78B5FF; --hl-type: #7FD6E6;
  color-scheme: dark;
}

/* ---- base ---------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--dac-canvas); color: var(--dac-text); font: 400 16px/1.65 var(--font); font-feature-settings: "ss01"; }
a { color: var(--dac-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--dac-focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--dac-surface); padding: 8px 12px; border-radius: var(--radius); }
.mark .a { fill: var(--mark-accent); }
.mark .b { fill: var(--mark-ink); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dac-muted); margin: 0 0 12px; }

/* ---- header -------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--dac-canvas) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--dac-line); }
.header-inner { max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--dac-text); text-decoration: none; font-weight: 750; font-size: 22px; letter-spacing: -.02em; flex: none; }
.brand svg { width: 30px; height: 30px; }
.brand .version { font: 500 12px/1 var(--mono); letter-spacing: 0; color: var(--dac-muted); border: 1px solid var(--dac-line); border-radius: 999px; padding: 4px 8px; margin-left: 2px; }
.top-nav { display: flex; gap: 4px; align-items: center; flex: 1; min-width: 0; }
.top-nav a { color: var(--dac-muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: var(--radius); white-space: nowrap; transition: color .12s var(--ease), background .12s var(--ease); }
.top-nav a:hover { color: var(--dac-text); background: var(--dac-raised); }
.top-nav a[aria-current] { color: var(--dac-primary); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--dac-line); background: var(--dac-surface); color: var(--dac-text); cursor: pointer; text-decoration: none; transition: border-color .12s var(--ease); }
.icon-btn:hover { border-color: var(--dac-controlBorder); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun, .theme-btn .i-moon, .theme-btn .i-auto { display: none; }
.theme-btn[data-mode="light"] .i-sun, .theme-btn[data-mode="dark"] .i-moon, .theme-btn[data-mode="system"] .i-auto, .theme-btn:not([data-mode]) .i-auto { display: block; }

/* search */
.search { position: relative; width: min(320px, 32vw); }
.search input { width: 100%; height: 40px; border: 1px solid var(--dac-line); border-radius: var(--radius); background: var(--dac-surface); color: var(--dac-text); font: 500 14px var(--font); padding: 0 44px 0 36px; }
.search input::placeholder { color: var(--dac-muted); }
.search input:focus { outline: 2px solid var(--dac-focus); outline-offset: 1px; border-color: transparent; }
.search .glass { position: absolute; left: 11px; top: 11px; width: 18px; height: 18px; color: var(--dac-muted); pointer-events: none; }
.search kbd { position: absolute; right: 9px; top: 9px; font: 500 12px/20px var(--mono); padding: 0 7px; border: 1px solid var(--dac-line); border-radius: 6px; color: var(--dac-muted); pointer-events: none; }
.search-results { position: absolute; top: 46px; right: 0; width: min(560px, 92vw); max-height: min(70vh, 560px); overflow: auto; background: var(--dac-surface); border: 1px solid var(--dac-border); border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, .28); padding: 6px; display: none; }
.search-results.open { display: block; }
.search-results a { display: block; padding: 10px 12px; border-radius: var(--radius); color: var(--dac-text); text-decoration: none; }
.search-results a[aria-selected="true"], .search-results a:hover { background: var(--dac-primarySoft); }
.search-results .r-title { font-weight: 650; font-size: 15px; }
.search-results .r-page { font-size: 12px; color: var(--dac-muted); letter-spacing: .02em; }
.search-results .r-text { font-size: 13px; color: var(--dac-muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-results mark { background: none; color: var(--dac-primary); font-weight: 700; }
.search-results .empty { padding: 14px; color: var(--dac-muted); font-size: 14px; }
.no-js .search { display: none; }

/* ---- landing ------------------------------------------------------------------------- */
.home { max-width: 1240px; margin: 0 auto; padding: 72px 24px 24px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 78px); line-height: 1.04; letter-spacing: -.045em; font-weight: 750; margin: 0 0 24px; }
.hero h1 span { display: block; color: var(--dac-primary); }
.hero .lead { font-size: 19px; line-height: 1.6; color: var(--dac-muted); max-width: 36em; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--radius); font: 650 15px var(--font); text-decoration: none; border: 1px solid var(--dac-controlBorder); color: var(--dac-text); background: transparent; transition: transform .12s var(--ease), background .12s var(--ease), border-color .12s var(--ease); }
.btn:hover { background: var(--dac-raised); text-decoration: none; }
.btn.primary { background: var(--dac-primary); border-color: var(--dac-primary); color: var(--dac-onPrimary); }
.btn.primary:hover { filter: brightness(1.06); }
.btn svg { width: 18px; height: 18px; }
.meta-line { color: var(--dac-muted); font-size: 15px; margin: 0; }
.meta-line code { font-size: 13px; }

.path-card { background: var(--dac-surface); border: 1px solid var(--dac-border); border-radius: var(--panel-radius); box-shadow: var(--shadow); overflow: hidden; }
.path-card header { display: flex; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--dac-line); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dac-muted); }
.path-card .figure { display: grid; justify-items: center; gap: 28px; padding: 36px 20px 28px; }
.path-card .figure svg.mark { width: 112px; height: 112px; }
.flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.flow .node { font: 600 13px var(--font); padding: 7px 12px; border-radius: var(--radius); background: var(--dac-raised); }
.flow .node.on { background: var(--dac-primarySoft); color: var(--dac-primary); }
.flow .wire { width: 36px; height: 2px; background: var(--dac-primary); border-radius: 2px; }
.facts { margin: 0; padding: 4px 20px 12px; }
.facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--dac-line); font-size: 14px; }
.facts dt { color: var(--dac-muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

.chip { display: inline-flex; align-items: center; gap: 6px; font: 650 12px/1 var(--font); padding: 6px 9px; border-radius: 6px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.info { color: var(--dac-primary); background: var(--dac-primarySoft); }
.chip.ok { color: var(--dac-success); background: var(--dac-successSoft); }
.chip.warn { color: var(--dac-warning); background: var(--dac-warningSoft); }
.chip.muted { color: var(--dac-muted); background: var(--dac-raised); }

.section-head { margin: 96px 0 24px; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -.03em; line-height: 1.15; margin: 0; font-weight: 750; }
.section-head p { margin: 0; color: var(--dac-muted); max-width: 34em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--dac-surface); border: 1px solid var(--dac-border); border-radius: var(--panel-radius); padding: 24px; box-shadow: var(--shadow); color: var(--dac-text); text-decoration: none; transition: border-color .18s var(--ease), transform .18s var(--ease); }
a.card:hover { border-color: var(--dac-primary); transform: translateY(-2px); text-decoration: none; }
.card .eyebrow { margin-bottom: 10px; }
.card h3 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 700; }
.card p { margin: 0 0 16px; color: var(--dac-muted); font-size: 15px; line-height: 1.6; }
.card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card code { font: 400 13px var(--mono); color: var(--dac-primary); background: none; padding: 0; }
.card .arrow { color: var(--dac-primary); font-weight: 700; }
.card .links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-weight: 600; }

.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: var(--dac-surface); border: 1px solid var(--dac-border); border-radius: var(--panel-radius); padding: 20px 22px; }
.stat strong { display: block; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; font-weight: 750; }
.stat span { display: block; color: var(--dac-muted); font-size: 14px; margin-top: 6px; }
.fineprint { color: var(--dac-muted); font-size: 14px; margin-top: 16px; max-width: 60em; }

.devices { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--dac-surface); border: 1px solid var(--dac-border); border-radius: var(--panel-radius); overflow: hidden; font-size: 14px; }
.devices th, .devices td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--dac-line); vertical-align: middle; }
.devices tr:last-child td { border-bottom: 0; }
.devices th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dac-muted); font-weight: 600; background: var(--dac-raised); }
.devices td code { font-size: 13px; }

.validator-band { margin-top: 96px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; background: var(--dac-surface); border: 1px solid var(--dac-border); border-radius: 24px; padding: 40px; }
.validator-band h2 { font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -.03em; line-height: 1.15; margin: 0 0 12px; }
.validator-band p { color: var(--dac-muted); margin: 0 0 20px; }
.platforms { display: grid; gap: 12px; }
.platform { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 12px; background: var(--dac-raised); }
.platform img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.platform strong { display: block; font-size: 16px; }
.platform span { color: var(--dac-muted); font-size: 14px; }

.docs-divider { max-width: 1240px; margin: 96px auto 0; padding: 0 24px; }
.docs-divider hr { border: 0; border-top: 1px solid var(--dac-line); margin: 0; }

/* ---- documentation layout ------------------------------------------------------------- */
.layout { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 272px minmax(0, 1fr) 232px; gap: 0 40px; padding: 0 24px; }
.sidebar { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 28px 8px 48px 0; font-size: 14px; scrollbar-width: thin; }
.sidebar details.menu > summary { display: none; }
.sidebar .group { margin: 22px 0 6px 12px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dac-muted); }
.sidebar .group:first-child { margin-top: 0; }
.sidebar a { display: block; padding: 6px 12px; border-radius: var(--radius); color: var(--dac-text); text-decoration: none; line-height: 1.4; transition: background .12s var(--ease); }
.sidebar a:hover { background: var(--dac-raised); }
.sidebar a[aria-current] { background: var(--dac-primarySoft); color: var(--dac-primary); font-weight: 650; }
.sidebar .page-toc { display: none; margin: 4px 0 8px 14px; border-left: 1px solid var(--dac-line); }
.sidebar .page-toc a { font-size: 13px; color: var(--dac-muted); padding: 4px 10px; border-radius: 0 var(--radius) var(--radius) 0; }
.sidebar .ext::after { content: " ↗"; color: var(--dac-muted); }

main.doc { min-width: 0; padding: 40px 0 96px; }
.doc-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.doc-meta .eyebrow { margin: 0; color: var(--dac-primary); }
.doc-meta a { font-size: 13px; font-weight: 600; color: var(--dac-muted); text-decoration: none; }
.doc-meta a:hover { color: var(--dac-primary); }
article { max-width: 820px; }
article h1 { font-size: clamp(32px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -.035em; font-weight: 750; margin: 0 0 20px; }
article h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; font-weight: 720; margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--dac-line); }
article h3 { font-size: 19px; letter-spacing: -.01em; font-weight: 700; margin: 36px 0 10px; }
article h4 { font-size: 16px; font-weight: 700; margin: 28px 0 8px; }
article h2 .anchor, article h3 .anchor { margin-left: 8px; color: var(--dac-border); text-decoration: none; opacity: 0; transition: opacity .12s var(--ease); font-weight: 500; }
article h2:hover .anchor, article h3:hover .anchor { opacity: 1; }
article p, article li { color: var(--dac-text); }
article li { margin: 4px 0; }
article li::marker { color: var(--dac-primary); }
article strong { font-weight: 700; }
article hr { border: 0; border-top: 1px solid var(--dac-line); margin: 40px 0; }
code { font: 400 .875em var(--mono); background: var(--code-bg); border: 1px solid var(--dac-line); padding: .08em .35em; border-radius: 5px; overflow-wrap: anywhere; }
pre { position: relative; background: var(--code-bg); border: 1px solid var(--dac-line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
pre code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }
.copy { position: absolute; top: 8px; right: 8px; font: 600 12px var(--font); color: var(--dac-muted); background: var(--dac-surface); border: 1px solid var(--dac-line); border-radius: 6px; padding: 4px 8px; cursor: pointer; opacity: 0; transition: opacity .12s var(--ease); }
pre:hover .copy, .copy:focus-visible { opacity: 1; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--dac-line); border-radius: 12px; background: var(--dac-surface); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.5; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--dac-line); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { background: var(--dac-raised); font-weight: 650; font-size: 13px; white-space: nowrap; }
.table-wrap td code { white-space: nowrap; }
blockquote { margin: 24px 0; padding: 14px 18px; background: var(--dac-primarySoft); border: 1px solid color-mix(in srgb, var(--dac-primary) 30%, transparent); border-left: 4px solid var(--dac-primary); border-radius: 0 12px 12px 0; }
blockquote > :first-child { margin-top: 0; }
blockquote > :last-child { margin-bottom: 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; max-width: 820px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--dac-border); border-radius: 12px; text-decoration: none; color: var(--dac-text); background: var(--dac-surface); transition: border-color .12s var(--ease); }
.pager a:hover { border-color: var(--dac-primary); }
.pager small { display: block; color: var(--dac-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pager strong { font-weight: 650; }
.pager .next { text-align: right; grid-column: 2; }

.toc { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 44px 0 40px; font-size: 13px; }
.toc .label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dac-muted); margin: 0 0 10px; }
.toc a { display: block; color: var(--dac-muted); text-decoration: none; padding: 5px 0 5px 12px; border-left: 2px solid var(--dac-line); line-height: 1.4; }
.toc a:hover { color: var(--dac-text); }
.toc a.active { color: var(--dac-primary); border-left-color: var(--dac-primary); font-weight: 600; }

/* Pygments (codehilite) tokens */
.hl .k, .hl .kd, .hl .kn, .hl .kr, .hl .kc, .hl .kp, .hl .ow { color: var(--hl-keyword); }
.hl .s, .hl .s1, .hl .s2, .hl .sb, .hl .sc, .hl .sd, .hl .se, .hl .sh, .hl .si, .hl .sx, .hl .sa, .hl .dl { color: var(--hl-string); }
.hl .c, .hl .c1, .hl .cm, .hl .cs, .hl .ch, .hl .cp, .hl .cpf { color: var(--hl-comment); font-style: italic; }
.hl .m, .hl .mi, .hl .mf, .hl .mh, .hl .mb, .hl .mo, .hl .il { color: var(--hl-number); }
.hl .nf, .hl .fm, .hl .nd, .hl .bp { color: var(--hl-func); }
.hl .nc, .hl .kt, .hl .nn, .hl .nb { color: var(--hl-type); }
.hl .na, .hl .nt { color: var(--hl-func); }
.hl .gp { color: var(--dac-muted); user-select: none; }

/* ---- footer -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--dac-line); background: var(--dac-surface); }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; font-size: 14px; }
.footer-inner .brand { font-size: 20px; }
.footer-inner p { color: var(--dac-muted); margin: 12px 0 0; }
.footer-inner h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dac-muted); }
.footer-inner ul { list-style: none; margin: 0; padding: 0; }
.footer-inner li { margin: 6px 0; }
.footer-inner li a { color: var(--dac-text); text-decoration: none; }
.footer-inner li a:hover { color: var(--dac-primary); }

/* ---- responsive ---------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); }
  .toc { display: none; }
  .sidebar a[aria-current] + .page-toc { display: block; }
}
@media (max-width: 1100px) { .top-nav { display: none; } }
@media (max-width: 900px) {
  .hero, .validator-band { grid-template-columns: 1fr; }
  .validator-band { padding: 28px; }
  .home { padding-top: 48px; }
  .layout { display: block; }
  .sidebar { position: static; max-height: none; padding: 16px 0 0; }
  .sidebar details.menu > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; padding: 12px 14px; border: 1px solid var(--dac-line); border-radius: 12px; background: var(--dac-surface); font-weight: 650; }
  .sidebar details.menu > summary::-webkit-details-marker { display: none; }
  .sidebar details.menu > summary::after { content: "▾"; color: var(--dac-muted); }
  .sidebar details.menu[open] > summary { margin-bottom: 12px; }
  .sidebar details.menu:not([open]) > nav { display: none; }
  main.doc { padding-top: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .search { width: auto; flex: 1; }
  .search kbd { display: none; }
  .brand .version { display: none; }
}
@media (max-width: 560px) {
  .header-inner { padding: 0 16px; gap: 12px; }
  .brand span.word { display: none; }
  .home, .layout, .docs-divider { padding-left: 16px; padding-right: 16px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .devices .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; } }
@media print { .site-header, .sidebar, .toc, .pager, .site-footer { display: none; } .layout { display: block; } }
article h1 .anchor { display: none; }
.card code { border: 0; }
.card p code { color: var(--dac-text); background: var(--code-bg); padding: .05em .3em; border-radius: 4px; }
.card .links { flex-direction: column; gap: 0; }
.card .links a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--dac-line); color: var(--dac-text); text-decoration: none; font-weight: 600; }
.card .links a:first-child { border-top: 0; padding-top: 2px; }
.card .links a::after { content: "→"; color: var(--dac-primary); }
.card .links a:hover { color: var(--dac-primary); }
.card .foot .links span { color: var(--dac-text); }
.meta-line code { white-space: nowrap; }
@media (max-width: 560px) { .hero .lead { font-size: 17px; } .cta .btn { flex: 1 1 auto; justify-content: center; } }

/* Theme-matched images: .only-dark / .only-light follow the active theme. */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: block; } :root:not([data-theme="light"]) .only-light { display: none; } }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

/* Validator screenshots: the Mac window with the phone in front of it. */
.validator-band .platforms { margin-top: 28px; }
.shots { position: relative; margin: 0; padding: 0 0 48px; }
.shots .mac { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--dac-border); box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.shots .phone { position: absolute; right: -12px; bottom: 0; width: 30%; height: auto; border-radius: 22px; border: 6px solid #0B0E13; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
@media (max-width: 900px) { .shots .phone { right: 8px; width: 34%; } }
