/* Ogun: forge, iron, vellum and ink. A Renaissance workshop treatise, typeset for engineers.
   Dark "forge" is the default; "vellum" (light) follows the system setting or the toggle. Plates are always vellum.
   Rules: no third-party requests, no inline styles (CSP), every animation has a reduced-motion fallback. */

@font-face { font-family: 'EB Garamond'; src: url('/fonts/eb-garamond-vf.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'EB Garamond'; font-style: italic; src: url('/fonts/eb-garamond-vf-italic.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('/fonts/ibm-plex-sans-vf.woff2') format('woff2'); font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* forge (dark) */
  --bg: #13110F;
  --bg-2: #181512;
  --surface: #1C1916;
  --raised: #2A2520;
  --line: rgba(233, 225, 208, .12);
  --line-2: rgba(233, 225, 208, .22);
  --text: #E9E1D0;
  --text-2: #A99F8C;
  --text-3: #8F8573;
  --accent: #E8662E;
  --accent-text: #E8662E;
  --accent-ink: #13110F;
  --brass: #B89157;
  --brass-text: #B89157;
  --ok: #5FAE9C;
  --info: #7AA6CF;
  --bad: #E0604A;
  --glow: rgba(232, 102, 46, .22);
  --code-bg: #0E0C0B;
  --plate: #F1E9D8;
  --plate-ink: #1E1A16;
  --plate-ink-2: #57503F;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;

  --font-display: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1: clamp(1.18rem, 1.1rem + .4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + .8vw, 2rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.5vw, 2.85rem);
  --step-4: clamp(2.3rem, 1.8rem + 2.6vw, 4.1rem);
  --step-5: clamp(2.8rem, 2rem + 4vw, 5.6rem);
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4rem; --space-9: 6rem; --space-10: 8rem;
  --radius: 6px; --radius-sm: 4px; --radius-lg: 10px;
  --wrap: 1200px;
  --gutter: clamp(24px, 7vw, 128px); /* one fluid side margin for header, sections, cards and footer: about 90 px at 1280, 96 at 1366, growing to the 1200 px column cap */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-mech: cubic-bezier(.45, 0, .55, 1);
  --dur-1: 140ms; --dur-2: 260ms; --dur-3: 520ms; --dur-4: 820ms;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #F1E9D8; --bg-2: #ECE3D0; --surface: #F8F2E4; --raised: #E4D8BF;
    --line: rgba(30, 26, 22, .14); --line-2: rgba(30, 26, 22, .26);
    --text: #1E1A16; --text-2: #57503F; --text-3: #665D4B;
    --accent: #B5521E; --accent-text: #9C4419; --accent-ink: #FFF8EC; --brass: #7A5A22; --brass-text: #7A5A22;
    --ok: #2F6E61; --info: #2C5D86; --bad: #A63A24; --glow: rgba(181, 82, 30, .14); --code-bg: #1E1A16;
    --shadow: 0 1px 2px rgba(30, 26, 22, .08), 0 14px 34px rgba(30, 26, 22, .12);
    color-scheme: light;
  }
}
:root[data-theme='light'] {
  --bg: #F1E9D8; --bg-2: #ECE3D0; --surface: #F8F2E4; --raised: #E4D8BF;
  --line: rgba(30, 26, 22, .14); --line-2: rgba(30, 26, 22, .26);
  --text: #1E1A16; --text-2: #57503F; --text-3: #665D4B;
  --accent: #B5521E; --accent-text: #9C4419; --accent-ink: #FFF8EC; --brass: #7A5A22; --brass-text: #7A5A22;
  --ok: #2F6E61; --info: #2C5D86; --bad: #A63A24; --glow: rgba(181, 82, 30, .14); --code-bg: #1E1A16;
  --shadow: 0 1px 2px rgba(30, 26, 22, .08), 0 14px 34px rgba(30, 26, 22, .12);
  color-scheme: light;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--step-0)/1.62 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: background var(--dur-3), color var(--dur-3); }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(900px 520px at 78% -8%, var(--glow), transparent 62%), linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 64px; opacity: .9; mask-image: linear-gradient(#000, transparent 70%); -webkit-mask-image: linear-gradient(#000, transparent 70%); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.04; letter-spacing: -.01em; margin: 0 0 var(--space-4); text-wrap: balance; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: 1.15; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent-text); }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: .88em; }
:not(pre) > code { background: var(--surface); border: 1px solid var(--line); padding: .06em .36em; border-radius: 3px; color: var(--text); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 4px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 800px); margin-inline: auto; }
.lede { font-size: var(--step-1); color: var(--text-2); max-width: 52ch; line-height: 1.5; }
.muted { color: var(--text-2); }
.small { font-size: var(--step--1); }
.center { text-align: center; margin-inline: auto; }
.mono { font-family: var(--font-mono); }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background var(--dur-2), border-color var(--dur-2); }
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: var(--space-5); height: 66px; }
.brand { display: inline-flex; color: var(--text); text-decoration: none; }
.lockup { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; color: var(--text); }
.logo-mark .gear-ring { transform-box: fill-box; transform-origin: center; }
.brand:hover .logo-mark { animation: spin 3s linear infinite; }
.logo-word { height: 17px; width: auto; }
.status-pill { font: 500 .68rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-text); border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); padding: .42em .6em; border-radius: 3px; white-space: nowrap; }
.nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-4); }
.nav-menu { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.nav-menu a { white-space: nowrap; color: var(--text-2); text-decoration: none; font-size: .92rem; font-weight: 500; padding: .3rem 0; transition: color var(--dur-1); position: relative; }
.nav-menu a:hover, .nav-menu a[aria-current='page'] { color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 4px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; transition: border-color var(--dur-1), background var(--dur-1); }
.icon-btn:hover { border-color: var(--accent); background: var(--surface); }
.icon-btn .icon { width: 18px; height: 18px; }
.theme-toggle .icon--sun { display: none; }
:root[data-theme='light'] .theme-toggle .icon--sun { display: block; }
:root[data-theme='light'] .theme-toggle .icon--moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .theme-toggle .icon--sun { display: block; } :root:not([data-theme]) .theme-toggle .icon--moon { display: none; } }
.nav-toggle { display: none; }
@media (max-width: 1160px) {
  .nav-toggle { display: inline-grid; }
  .nav-menu { position: fixed; inset: 66px 0 auto 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1rem 1.2rem; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2); }
  .nav-menu a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav.is-open .nav-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav .btn--header { display: none; }
}

/* ------------------------------------------------------------------ buttons */
.btn { position: relative; display: inline-flex; align-items: center; gap: .55em; min-height: 46px; padding: .75rem 1.2rem; border-radius: 4px; border: 1px solid transparent; font: 500 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform var(--dur-2) var(--ease-out), background var(--dur-2), color var(--dur-2), border-color var(--dur-2), box-shadow var(--dur-2); }
.btn .icon { width: 17px; height: 17px; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .icon--arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--ember { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--ember::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120px 60px at var(--hx, 50%) var(--hy, 50%), rgba(255, 220, 160, .55), transparent 70%); opacity: 0; transition: opacity var(--dur-2); }
.btn--ember:hover::before { opacity: 1; }
.btn--ember:hover { color: var(--accent-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent), 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.btn--small { min-height: 38px; padding: .5rem .9rem; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.btn .kbd { font: 500 .72rem/1 var(--font-mono); padding: .25em .4em; border: 1px solid currentColor; border-radius: 3px; opacity: .7; }

/* ------------------------------------------------------------------ sections */
.section { position: relative; padding-block: var(--space-10); }
.section--tight { padding-block: var(--space-8); }
.section--band { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: var(--space-8); }
.section-head.center { text-align: center; }
.section-head.center .lede { margin-inline: auto; }
.rule { display: flex; align-items: center; gap: 1rem; color: var(--text-3); font-family: var(--font-display); }
.rule::before, .rule::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.rule span { font-size: 1.3rem; color: var(--brass); }

/* ------------------------------------------------------------------ hero */
.cmd { display: flex; align-items: center; gap: .8rem; width: fit-content; max-width: 100%; margin-top: var(--space-5); padding: .6rem .6rem .6rem 1rem; border: 1px solid var(--line-2); border-radius: 4px; background: var(--code-bg); color: #E9E1D0; font: 400 .9rem/1.3 var(--font-mono); overflow-x: auto; }
.cmd .prompt { color: #F4894A; user-select: none; }
.cmd code { background: none; border: 0; padding: 0; color: inherit; white-space: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cmd .copy-btn { position: static; flex: none; }
.plate-wrap { position: relative; box-shadow: var(--shadow); border-radius: 2px; transform: rotate(-.6deg); transition: transform var(--dur-4) var(--ease-out); }
.plate-wrap:hover { transform: rotate(0); }
.plate-svg { width: 100%; height: auto; }
.plate-title { font: 600 10px var(--font-display); letter-spacing: .32em; fill: var(--plate-ink); }
.plate-caption { font: italic 13.5px var(--font-display); fill: var(--plate-ink-2); }
.plate-label, .plate-key { font: italic 14px var(--font-display); fill: var(--plate-ink); }
@media (max-width: 760px) {
  .pipeline { overflow-x: auto; padding-bottom: .5rem; }
  .pipeline-svg { min-width: 860px; }
  .figure--wide .plate-wrap, .arch-wrap { overflow-x: auto; }
  .lineage-svg { min-width: 760px; }
  .arch-svg { min-width: 760px; }
  .stage-panel { position: sticky; left: 0; }
}

/* ------------------------------------------------------------------ answer box */
.answer { position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); padding: var(--space-6); }
.answer h2 { font-size: var(--step-2); margin-bottom: var(--space-3); }
.answer p:last-child { margin-bottom: 0; }
.answer dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; margin: var(--space-4) 0 0; font-size: var(--step--1); }
.answer dt { font: 500 .78rem/1.5 var(--font-mono); letter-spacing: .04em; color: var(--text-3); text-transform: uppercase; }
.answer dd { margin: 0; color: var(--text); }
@media (max-width: 600px) { .answer dl { grid-template-columns: 1fr; } .answer dd { margin-bottom: .4rem; } }

/* ------------------------------------------------------------------ cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cards--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card { --mx: 50%; --my: 50%; position: relative; background: var(--bg); padding: var(--space-6); transition: background var(--dur-2); }
.card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(360px 180px at var(--mx) var(--my), var(--glow), transparent 70%); opacity: 0; transition: opacity var(--dur-2); pointer-events: none; }
.card:hover::before { opacity: 1; }
.card:hover { background: var(--bg-2); }
.card h3, .card h2.h3-like { position: relative; font-size: var(--step-2); margin-bottom: var(--space-3); }
.card p { position: relative; color: var(--text-2); margin-bottom: 0; }
.card .card-icon { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 4px; color: var(--accent-text); margin-bottom: var(--space-5); transition: transform var(--dur-3) var(--ease-out), border-color var(--dur-2); }
.card:hover .card-icon { transform: rotate(-8deg); border-color: var(--accent); }
.card .card-icon .icon { width: 22px; height: 22px; }
.card-link { position: relative; display: inline-flex; gap: .4em; align-items: center; margin-top: var(--space-4); font-weight: 500; text-decoration: none; }
.card-link .icon { width: 15px; height: 15px; transition: transform var(--dur-2) var(--ease-out); }
.card:hover .card-link .icon { transform: translateX(4px); }
.cards + p.center, .table-wrap + p.center, .faq + p.center, .steps + p.center { margin-top: var(--space-7); }

/* ------------------------------------------------------------------ plates (figures) */
.figure { margin: 0; }
.figure figcaption { margin-top: var(--space-3); font: italic 1.02rem/1.4 var(--font-display); color: var(--text-2); }
.figure figcaption b { font-style: normal; font: 500 .74rem var(--font-mono); letter-spacing: .14em; color: var(--brass-text); margin-right: .6em; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); align-items: center; }
.split--top { align-items: start; }
.split > * { min-width: 0; }
.section-split { margin-top: var(--space-7); }
.figure--wide .plate-wrap { transform: none; box-shadow: none; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ------------------------------------------------------------------ pipeline (Fig. III) */
.pipeline { position: relative; }
.pipeline-svg { width: 100%; height: auto; overflow: visible; }
.pipe-outer { fill: none; stroke: var(--text); stroke-width: 12; opacity: .9; }
.pipe-inner { fill: none; stroke: var(--bg); stroke-width: 8; }
.pipe-flow { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-dasharray: 4 12; animation: flow 1.6s linear infinite; }
.station { cursor: pointer; outline: none; }
.station-ring { fill: var(--bg); stroke: var(--brass); stroke-width: 1.5; transition: stroke var(--dur-2), stroke-width var(--dur-2); }
.station-face { fill: var(--surface); stroke: var(--text); stroke-width: 1; transition: fill var(--dur-2); }
.station-icon { stroke: var(--text); transition: stroke var(--dur-2); }
.station-name { font: 500 14px var(--font-body); fill: var(--text); }
.station:hover .station-ring, .station:focus-visible .station-ring, .station.is-active .station-ring { stroke: var(--accent); stroke-width: 3; }
.station:hover .station-face, .station.is-active .station-face { fill: var(--raised); }
.station:hover .station-icon, .station.is-active .station-icon { stroke: var(--accent); }
.stage-panel { display: grid; grid-template-columns: auto 1fr; gap: var(--space-5); align-items: start; border: 1px solid var(--line-2); border-radius: var(--radius); padding: var(--space-5); margin-top: var(--space-6); background: var(--surface); min-height: 112px; }
.stage-panel h3 { margin-bottom: .3rem; }
.stage-panel p { margin: 0; color: var(--text-2); }

/* ------------------------------------------------------------------ code tabs */
.tabs { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--code-bg); color: #E9E1D0; }
.tablist { position: relative; display: flex; gap: 0; border-bottom: 1px solid rgba(233, 225, 208, .14); overflow-x: auto; }
.tablist button { flex: none; display: inline-flex; gap: .45rem; align-items: center; background: none; border: 0; color: #A99F8C; font: 500 .82rem/1 var(--font-mono); padding: .95rem 1.1rem; cursor: pointer; transition: color var(--dur-1); }
.tablist button .icon { width: 15px; height: 15px; }
.tablist button[aria-selected='true'] { color: #E9E1D0; }
.tab-ink { position: absolute; bottom: -1px; left: 0; height: 2px; background: #E8662E; transition: transform var(--dur-3) var(--ease-out), width var(--dur-3) var(--ease-out); }
.tabpanel { position: relative; }
.tabpanel pre { margin: 0; padding: var(--space-5); overflow-x: auto; font: 400 .86rem/1.7 var(--font-mono); }
.tabpanel .copy-btn { position: absolute; top: .7rem; right: .7rem; }
.tok-k { color: #E8662E; } .tok-s { color: #9FC7A0; } .tok-c { color: #9C927F; font-style: italic; } .t-cmd { color: #F3ECDC; font-weight: 500; } .t-exit { color: #9C927F; } .tok-n { color: #7AA6CF; } .tok-p { color: #B89157; }
.copy-btn { display: inline-flex; align-items: center; gap: .35rem; font: 500 .72rem/1 var(--font-mono); color: #A99F8C; background: #1C1916; border: 1px solid rgba(233, 225, 208, .18); padding: .45rem .65rem; border-radius: 3px; cursor: pointer; transition: color var(--dur-1), border-color var(--dur-1); }
.copy-btn .icon { width: 13px; height: 13px; }
.copy-btn:hover { color: #E9E1D0; border-color: #E8662E; }
.copy-btn.is-copied { color: #5FAE9C; border-color: #5FAE9C; }
.code-block { position: relative; background: var(--code-bg); color: #E9E1D0; border: 1px solid var(--line-2); border-radius: var(--radius); padding: var(--space-5); font: 400 .86rem/1.7 var(--font-mono); overflow-x: auto; }
.code-block pre { margin: 0; }
.code-block--tall pre { max-height: 34rem; overflow: auto; }
.code-block .copy-btn { position: absolute; top: .7rem; right: .7rem; }

/* ------------------------------------------------------------------ run simulation (Studio preview) */

/* ------------------------------------------------------------------ backfill partition grid */
.backfill { border: 1px solid var(--line-2); border-radius: var(--radius); padding: var(--space-5); background: var(--surface); }
.backfill-head { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-4); font: 500 .82rem/1.4 var(--font-mono); color: var(--text-2); }
.backfill-head code { color: var(--text); }
.grid-cells { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.grid-cells i { aspect-ratio: 1; border-radius: 2px; background: var(--line); transition: transform var(--dur-2) var(--ease-out); position: relative; }
.grid-cells i[data-s='run'] { background: var(--accent); }
.grid-cells i[data-s='ok'] { background: var(--ok); }
.grid-cells i[data-s='fail'] { background: var(--bad); }
.grid-cells i[data-s='retry'] { background: var(--brass); }
.grid-cells i:hover { transform: scale(1.35); z-index: 1; }
.backfill-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: var(--space-4); font: 400 .74rem/1 var(--font-mono); color: var(--text-3); }
.backfill-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; background: var(--line); }
.backfill-legend .l-ok::before { background: var(--ok); } .backfill-legend .l-run::before { background: var(--accent); } .backfill-legend .l-fail::before { background: var(--bad); } .backfill-legend .l-retry::before { background: var(--brass); }
.backfill-status { margin-top: var(--space-3); font: 400 .8rem/1.5 var(--font-mono); color: var(--text-2); min-height: 1.5em; }
.backfill-actions { margin-top: var(--space-4); display: flex; gap: .6rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ lineage, architecture */
.lineage-svg, .arch-svg { width: 100%; height: auto; overflow: visible; }
.lin-edge path { fill: none; stroke: var(--text-3); stroke-width: 1.4; transition: stroke var(--dur-2), stroke-width var(--dur-2); }
.lin-op { font: italic 14px var(--font-display); fill: var(--brass); paint-order: stroke; stroke: var(--bg); stroke-width: 7px; stroke-linejoin: round; }
.section--band .lin-op { stroke: var(--bg-2); }
.lin-node rect { fill: var(--surface); stroke: var(--text); stroke-width: 1.2; transition: stroke var(--dur-2), fill var(--dur-2); }
.lin-node { cursor: pointer; outline: none; }
.lin-node:focus-visible rect { stroke: var(--accent); stroke-width: 2.6; }
.lin-label { font: 500 12px var(--font-body); fill: var(--text); }
.lin-hash { font: 400 10.5px var(--font-mono); fill: var(--accent-text); }
.lineage-svg.has-focus .lin-node rect { stroke: var(--line-2); }
.lineage-svg.has-focus .lin-edge path { stroke: var(--line); }
.lineage-svg .lin-node.is-lit rect { stroke: var(--accent); fill: var(--raised); }
.lineage-svg .lin-edge.is-lit path { stroke: var(--accent); stroke-width: 2.2; }
.arch-node rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.arch-node--core rect { stroke: var(--accent); }
.arch-node--engine rect { stroke: var(--brass); }
.arch-node--zeus rect { stroke: var(--info); }
.arch-title { font: 500 16px var(--font-display); fill: var(--text); }
.arch-sub { font: 400 11.5px var(--font-body); fill: var(--text-2); }
.arch-zone { fill: none; stroke: var(--line-2); stroke-dasharray: 4 5; }
.arch-zone--zeus { stroke: color-mix(in srgb, var(--info) 60%, transparent); }
.arch-zone-title { font: 500 11px var(--font-mono); letter-spacing: .12em; fill: var(--text-3); text-transform: uppercase; }
.arch-edge { fill: none; stroke: var(--text-2); stroke-width: 1.3; }
.arch-edge--bridge { stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 6 5; animation: flow 1.4s linear infinite; }
.arch-edge--faint { stroke: var(--line-2); stroke-dasharray: 3 4; }
.arch-arrow { fill: var(--text-2); }
.arch-label { font: italic 13.5px var(--font-display); fill: var(--brass); paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round; }

/* ------------------------------------------------------------------ formulas, metrics, matrices */
.formula { max-width: 100%; font-family: var(--font-display); font-size: 1.3rem; padding: var(--space-4) var(--space-5); border-left: 2px solid var(--accent); background: var(--surface); margin: var(--space-4) 0; overflow-x: auto; white-space: nowrap; }
.formula var { font-style: italic; }
.formula sub { font-size: .65em; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-5); }
.metric { border-top: 1px solid var(--line-2); padding-top: var(--space-4); }
.metric h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.metric p { color: var(--text-2); font-size: .95rem; }
.matrix td, .matrix thead th { text-align: center; }
.matrix thead th:first-child { text-align: left; }
.table-wrap + .metrics, .metrics + p.center { margin-top: var(--space-7); }
.metric .formula { font-size: 1.12rem; color: var(--text); margin: .6rem 0 .8rem; }
.matrix th[scope='row'] { text-align: left; }
.matrix td { font: 500 .78rem/1 var(--font-mono); color: var(--text-3); }
.matrix td.cell-planned::before { content: '○'; margin-right: .35em; color: var(--brass); }
.matrix tbody tr:hover, .matrix .is-col { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
caption { text-align: left; padding: var(--space-4) var(--space-5) var(--space-2); font: italic 1.05rem var(--font-display); color: var(--text-2); caption-side: top; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); background: var(--surface); }
tbody tr { transition: background var(--dur-1); }
tbody tr:hover { background: var(--surface); }
tbody th { font-weight: 500; color: var(--text); }
td code, th code { font-size: .82em; }
td .yes, td .no, td .part { display: inline-flex; gap: .3em; align-items: center; font-weight: 500; }
td .yes { color: var(--ok); } td .no { color: var(--bad); } td .part { color: var(--brass-text); }
td .icon { width: 16px; height: 16px; }
.col-zeus { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.state-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .5em; vertical-align: 1px; background: var(--text-3); }
.st-running { background: var(--accent); } .st-ok { background: var(--ok); } .st-bad { background: var(--bad); } .st-brass { background: var(--brass); } .st-info { background: var(--info); }

/* ------------------------------------------------------------------ checklist, notes, kv, chips */
.checklist { list-style: none; padding: 0; margin: var(--space-5) 0; display: grid; gap: .65rem; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; }
.checklist .icon { width: 18px; height: 18px; color: var(--ok); margin-top: 4px; }
.checklist--x .icon { color: var(--bad); }
.note { display: grid; grid-template-columns: 22px 1fr; gap: .8rem; padding: var(--space-4) var(--space-5); border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); background: color-mix(in srgb, var(--brass) 8%, transparent); border-radius: var(--radius); margin: var(--space-5) 0; font-size: .95rem; }
.note .icon { width: 20px; height: 20px; color: var(--brass-text); }
.note p:last-child { margin: 0; }
.kv { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: .5rem 1.5rem; margin: var(--space-4) 0; }
.kv dt { font: 500 .8rem/1.6 var(--font-mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.kv dd { margin: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .6rem; } }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: var(--space-5) 0 0; }
.chips li { font: 500 .78rem/1 var(--font-mono); padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: 3px; color: var(--text-2); transition: border-color var(--dur-1), color var(--dur-1), transform var(--dur-2) var(--ease-out); }
.chips li:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.footnote-ref { font: 500 .7em var(--font-mono); vertical-align: super; color: var(--accent-text); text-decoration: none; margin-left: .1em; }
.footnotes { margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: .85rem; color: var(--text-2); }
.footnotes ol { padding-left: 1.2rem; margin: 0; }
.footnotes li:target { color: var(--text); background: var(--glow); }
.quote { font: italic var(--step-3)/1.15 var(--font-display); max-width: 26ch; margin: 0; }

/* ------------------------------------------------------------------ timeline (roadmap) */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 var(--space-6) var(--space-6); }
.timeline li::before { content: ''; position: absolute; left: -6px; top: .4rem; width: 11px; height: 11px; border-radius: 2px; background: var(--bg); border: 1px solid var(--line-2); transform: rotate(45deg); }
.timeline li.is-now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.timeline li.is-done::before { background: var(--ok); border-color: var(--ok); }
.timeline .when { font: 500 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-text); }
.timeline h3 { margin: .4rem 0 .3rem; }
.timeline p { color: var(--text-2); margin: 0; }

/* ------------------------------------------------------------------ faq, glossary */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 0; display: grid; grid-template-columns: 1fr 24px; gap: var(--space-4); align-items: center; font-weight: 500; font-size: 1.05rem; transition: color var(--dur-1); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-text); }
.faq summary .chev { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 3px; transition: transform var(--dur-3) var(--ease-out), border-color var(--dur-2); }
.faq summary .chev .icon { width: 12px; height: 12px; }
.faq details[open] summary .chev { transform: rotate(135deg); border-color: var(--accent); }
.faq .faq-body { padding: 0 0 1.2rem; color: var(--text-2); max-width: 70ch; }
.faq .faq-body p:last-child { margin: 0; }
.faq-group + .faq-group { margin-top: var(--space-8); }
.faq-group h2 { font-size: var(--step-3); }
.alpha { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: var(--space-6); }
.alpha a { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 3px; text-decoration: none; color: var(--text); font: 500 1.1rem var(--font-display); transition: border-color var(--dur-1), background var(--dur-1); }
.alpha a:hover { border-color: var(--accent); background: var(--surface); }
.terms { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.term { padding: var(--space-5) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; display: grid; grid-template-columns: minmax(180px, 30%) 1fr; gap: var(--space-5); }
.term:target { background: var(--glow); }
.term dt { font: 500 var(--step-1)/1.3 var(--font-display); }
.term dd { margin: 0; color: var(--text-2); }
.term .aka { display: block; font: 400 .74rem/1.4 var(--font-mono); color: var(--text-3); margin-top: .2rem; }
@media (max-width: 700px) { .term { grid-template-columns: 1fr; gap: .4rem; } }

/* ------------------------------------------------------------------ prose (legal, articles) */
.page-head { padding-block: var(--space-8) var(--space-6); }
.page-head h1 { font-size: var(--step-5); }
.page-head .lede { max-width: 62ch; }
.crumbs { font: 400 .8rem/1 var(--font-mono); color: var(--text-3); margin-bottom: var(--space-5); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: '/'; margin-right: .4rem; color: var(--line-2); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.doc-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font: 400 .78rem/1.4 var(--font-mono); color: var(--text-3); margin-top: var(--space-4); }
.doc-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--space-8); align-items: start; padding-bottom: var(--space-10); }
@media (max-width: 960px) { .doc-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } }
.toc { position: sticky; top: 88px; font-size: .88rem; }
.toc h2 { font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--space-3); }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; display: grid; gap: .1rem; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 2.2em 1fr; padding: .3rem 0; color: var(--text-2); text-decoration: none; transition: color var(--dur-1); }
.toc a::before { content: counter(toc) '.'; font: 400 .78rem/1.6 var(--font-mono); color: var(--text-3); }
.toc a:hover, .toc a.is-active { color: var(--text); }
.toc a.is-active::before { color: var(--accent); }
@media (max-width: 960px) { .toc { position: static; } .toc ol { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }
.prose { max-width: 74ch; counter-reset: sec; }
.prose > section { counter-increment: sec; }
.prose > section + section { margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.6rem, 1.35rem + 1vw, 2.2rem); margin-top: 0; scroll-margin-top: 90px; }
.prose h2::before { content: counter(sec) '.'; font: 400 .9rem var(--font-mono); color: var(--accent-text); vertical-align: .35em; margin-right: .4rem; }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-5); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 var(--space-4); }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--accent-text); }
.prose .table-wrap { margin: var(--space-4) 0 var(--space-5); }

/* ------------------------------------------------------------------ cta (the forge) */

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--space-9) var(--space-6); font-size: .9rem; color: var(--text-2); background: var(--bg); }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: var(--space-6); }
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand p { margin-top: var(--space-4); max-width: 36ch; }
.footer-col h2 { font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.sibling { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; border: 1px solid var(--line-2); border-radius: var(--radius); padding: var(--space-5); margin-bottom: var(--space-8); background: linear-gradient(90deg, rgba(200, 160, 74, .1), transparent); }
.sibling p { margin: 0; color: var(--text); }
.sibling a { font-weight: 500; color: var(--brass-text); display: inline-flex; gap: .4rem; align-items: center; }
.sibling .icon { width: 16px; height: 16px; }
.endorse { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.legal-line { font: 400 .76rem/1.5 var(--font-mono); color: var(--text-3); margin: 0; max-width: 80ch; }
.made-by { display: inline-flex; align-items: center; gap: .65rem; margin-left: auto; color: var(--text) !important; text-decoration: none !important; white-space: nowrap; }
.made-by-label { font: 500 .7rem/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.made-by-name { font: 600 1.08rem/1 var(--font-display); color: var(--text); letter-spacing: .01em; }
.verne-logo { width: 22px; height: 21px; flex: none; overflow: visible; transition: transform var(--dur-3) var(--ease-out), filter var(--dur-2); }
.made-by:hover .verne-logo { transform: translateY(-1px) rotate(-6deg); filter: drop-shadow(0 0 6px rgba(0, 180, 220, .5)); }
.made-by:hover .made-by-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ------------------------------------------------------------------ brand page */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.swatch { background: var(--bg); }
.swatch i { display: block; height: 84px; }
.swatch div { padding: .7rem .9rem; font-size: .84rem; }
.swatch strong { display: block; font-weight: 500; }
.swatch code { background: none; border: 0; padding: 0; color: var(--text-2); }
.sw-13110f { background: #13110F; } .sw-1c1916 { background: #1C1916; } .sw-f1e9d8 { background: #F1E9D8; } .sw-1e1a16 { background: #1E1A16; }
.sw-e8662e { background: #E8662E; } .sw-b89157 { background: #B89157; } .sw-5fae9c { background: #5FAE9C; } .sw-7aa6cf { background: #7AA6CF; } .sw-e0604a { background: #E0604A; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-4); }
.asset { display: grid; gap: .5rem; border: 1px solid var(--line-2); border-radius: var(--radius); padding: var(--space-3); color: var(--text); text-decoration: none; transition: border-color var(--dur-1), transform var(--dur-2) var(--ease-out); }
.asset:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.asset img { height: 120px; width: 100%; object-fit: contain; background: #F1E9D8; border-radius: 3px; padding: 10px; }
.asset--dark img { background: #13110F; }
.asset span { font: 500 .8rem var(--font-mono); }
.type-specimen .disp { font: 500 var(--step-4)/1 var(--font-display); }
.type-specimen .disp em { color: var(--accent-text); }
.type-specimen .body { font-size: var(--step-1); }
.type-specimen .code { font: 400 1rem var(--font-mono); color: var(--text-2); }

/* ------------------------------------------------------------------ 404 */
.lost { text-align: center; padding-block: var(--space-9); }
.lost .btn-row { justify-content: center; }
.lost h1 { font-size: var(--step-4); }

/* ------------------------------------------------------------------ reveal, progress */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out); transition-delay: var(--delay, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.scroll-progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); background: var(--accent); z-index: 60; pointer-events: none; }

/* ------------------------------------------------------------------ keyframes */
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flow { to { stroke-dashoffset: -32; } }
@keyframes hammer { 0% { transform: rotate(20deg); } 30% { transform: rotate(32deg); } 62% { transform: rotate(-1deg); } 100% { transform: rotate(20deg); } }
@keyframes impact { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes hoist { from { transform: translateY(0); } to { transform: translateY(-104px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes arm { 0%, 100% { box-shadow: 0 0 0 0 var(--glow); } 50% { box-shadow: 0 0 0 5px var(--glow); } }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .gear-spin, .windlass-drum, .windlass-load, .pipe-flow, .arch-edge--bridge { animation: none !important; }
  .js [data-reveal], .hero h1 .line { opacity: 1 !important; transform: none !important; }
  .js .hero-plate .construct-layer path { stroke-dashoffset: 0 !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .toc, .btn, .scroll-progress, .hero-figure, .cta { display: none !important; }
  :root { --bg: #fff; --text: #000; --text-2: #222; }
  body { font-size: 11pt; }
  body::before { display: none; }
  .doc-grid { grid-template-columns: 1fr; }
  .prose a[href^='http']::after { content: ' (' attr(href) ')'; font-size: .85em; }
}

/* Release checksums on the get-started page */
code.sha { font-size: .74rem; word-break: break-all; }

/* ------------------------------------------------------------------ downloads (src/download.mjs; same markup on the Zeus and Asten sites) */
.dl { --dl-surface: var(--surface); --dl-tile: var(--raised); --dl-line: var(--line); --dl-line-strong: var(--line-2); --dl-hover: color-mix(in srgb, var(--text) 6%, transparent); --dl-text: var(--text); --dl-text-2: var(--text-2); --dl-accent: var(--accent); --dl-accent-hover: color-mix(in srgb, var(--accent) 86%, var(--text)); --dl-accent-active: color-mix(in srgb, var(--accent) 76%, var(--text)); --dl-accent-ink: var(--accent-ink); --dl-accent-text: var(--accent-text); --dl-link: var(--accent-text); --dl-focus: var(--accent); --dl-shadow: var(--shadow); --dl-radius: var(--radius-lg); --dl-btn-radius: var(--radius); --dl-font-head: var(--font-display); --dl-font-body: var(--font-body); --dl-font-mono: var(--font-mono); }
.btn .dl-icon { width: 17px; height: 17px; }
.dl { display: grid; gap: var(--space-4); max-width: 980px; margin-inline: auto; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--space-4); }
.dl-card { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; padding: var(--space-5); background: var(--dl-surface); border: 1px solid var(--dl-line); border-radius: var(--dl-radius); transition: border-color var(--dur-2), box-shadow var(--dur-2); }
.dl-card.is-detected { border-color: var(--dl-accent); box-shadow: 0 0 0 1px var(--dl-accent), var(--dl-shadow); }
.dl-card-head { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.dl-logo-tile { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--dl-btn-radius); background: var(--dl-tile); color: var(--dl-text); }
.dl-logo { width: 26px; height: 26px; }
.dl-card-title { flex: 1; min-width: 0; }
.dl-card-title h3 { margin: 0; font-family: var(--dl-font-head); font-size: 1.3rem; line-height: 1.2; color: var(--dl-text); }
.dl-req { margin: .15rem 0 0; font-size: .88rem; line-height: 1.4; color: var(--dl-text-2); }
.dl-badge { flex: none; align-self: flex-start; padding: .2rem .55rem; border-radius: 999px; font: 600 .72rem/1.3 var(--dl-font-body); letter-spacing: .02em; color: var(--dl-accent-text); background: color-mix(in srgb, var(--dl-accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--dl-accent) 40%, transparent); }
.dl-badge[hidden] { display: none; }

.dl-icon { flex: none; width: 20px; height: 20px; }
.dl-icon--sm { width: 16px; height: 16px; }
.dl-btn { display: flex; align-items: center; gap: .8rem; min-height: 48px; padding: .7rem 1.1rem; border-radius: var(--dl-btn-radius); border: 1px solid transparent; font: 600 1rem/1.2 var(--dl-font-body); text-decoration: none; cursor: pointer; transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1), box-shadow var(--dur-1); }
.dl-btn:focus-visible { outline: 2px solid var(--dl-focus); outline-offset: 3px; box-shadow: none; }
.dl-btn--primary { width: 100%; min-height: 60px; background: var(--dl-accent); color: var(--dl-accent-ink); border-color: var(--dl-accent); }
.dl-btn--primary:hover { background: var(--dl-accent-hover); border-color: var(--dl-accent-hover); color: var(--dl-accent-ink); }
.dl-btn--primary:active { background: var(--dl-accent-active); }
.dl-btn-text { display: grid; min-width: 0; text-align: left; }
.dl-btn-label { overflow-wrap: anywhere; }
.dl-btn-sub { font-weight: 400; font-size: .82rem; opacity: .96; overflow-wrap: anywhere; }
.dl-btn--secondary { display: inline-flex; background: transparent; color: var(--dl-text); border-color: var(--dl-line-strong); }
.dl-btn--secondary:hover { background: var(--dl-hover); border-color: var(--dl-text-2); color: var(--dl-text); }

.dl-more { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dl-line); }
.dl-more li { margin: 0; padding: 0; border-bottom: 1px solid var(--dl-line); }
.dl-more li::before { content: none; }
.dl-more a { display: flex; align-items: center; gap: .7rem; min-height: 52px; padding: .45rem .5rem; color: var(--dl-text); text-decoration: none; border-radius: var(--dl-btn-radius); transition: background-color var(--dur-1); }
.dl-more a:hover { background: var(--dl-hover); color: var(--dl-text); }
.dl-more a:hover .dl-more-kind { text-decoration: underline; text-underline-offset: 3px; }
.dl-more a:focus-visible { outline: 2px solid var(--dl-focus); outline-offset: 0; box-shadow: none; }
.dl-more .dl-icon { color: var(--dl-text-2); }
.dl-more-text { flex: 1; display: grid; min-width: 0; }
.dl-more-kind { font-size: .93rem; font-weight: 500; line-height: 1.3; }
.dl-more-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: .74rem/1.4 var(--dl-font-mono); color: var(--dl-text-2); }
.dl-more-size { flex: none; font-size: .84rem; color: var(--dl-text-2); font-variant-numeric: tabular-nums; }

.dl-card--planned { flex-direction: row; padding: var(--space-4) var(--space-5); background: transparent; border-style: dashed; }
.dl-card--planned .dl-logo-tile { width: 40px; height: 40px; background: transparent; border: 1px solid var(--dl-line); color: var(--dl-text-2); }
.dl-card--planned .dl-logo { width: 20px; height: 20px; }
.dl-card--planned h3 { font-size: 1.05rem; color: var(--dl-text-2); }
.dl-card--planned.is-detected { box-shadow: none; }

.dl-foot { display: grid; gap: var(--space-2); padding-top: var(--space-3); }
.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-2); }
.dl-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: var(--dl-link); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.dl-link:hover { color: var(--dl-link); text-decoration-color: currentColor; }
.dl-link:focus-visible { outline: 2px solid var(--dl-focus); outline-offset: 2px; box-shadow: none; }
.dl-note { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--dl-text-2); overflow-wrap: anywhere; }
.dl-note code { font-size: .82rem; white-space: nowrap; }
.dl-hero-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
@media (max-width: 480px) {
  .dl-card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem .75rem; }
  .dl-card-title { display: contents; }
  .dl-req { grid-column: 1 / -1; margin: 0; }
  .dl-logo-tile { width: 40px; height: 40px; }
  .dl-logo { width: 22px; height: 22px; }
  .dl-card-title h3 { grid-row: 1; grid-column: 2; justify-self: start; text-align: left; }
  .dl-badge { grid-row: 1; grid-column: 3; align-self: center; }
  .dl-card { padding: var(--space-4); }
  .dl-card--planned { padding: var(--space-3) var(--space-4); }
  .dl-note code { white-space: normal; }
  .dl-actions .dl-btn--secondary { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .dl-card, .dl-btn, .dl-more a { transition: none; } }
.dl-after { margin-top: var(--space-6); }

.tabpanel pre { max-height: 30rem; overflow: auto; }

@media (max-width: 400px) {
  .header-inner { gap: var(--space-3); }
  .status-pill { font-size: .6rem; letter-spacing: .06em; padding: .38em .45em; }
  .nav { gap: var(--space-2); }
  .logo-word { height: 15px; }
}

.brand svg { overflow: hidden; }

.lede, p, li, dd { overflow-wrap: anywhere; }

@media (max-width: 420px) {
  .made-by { flex-wrap: wrap; white-space: normal; margin-left: 0; gap: .4rem .65rem; }
  .endorse { justify-content: flex-start; }
}
.arch-wrap { transform: none; }
@media (max-width: 420px) { .plate-wrap { transform: none; } }

/* every command and terminal is readable in full: long lines wrap instead of running under the copy button or out of the box */
.hero .cmd { align-items: flex-start; }
.cmd code { white-space: normal; overflow-wrap: anywhere; overflow: visible; min-width: 0; flex: 1 1 auto; line-height: 1.5; }
.cmd .copy-btn { align-self: flex-start; }
.code-block pre, .tabpanel pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.code-block:has(> .copy-btn) { padding-top: 3rem; }
.tabpanel:has(> .copy-btn) pre { padding-top: 3rem; }

/* the tab labels always fit their box */
.tablist button { padding: .95rem .85rem; font-size: .78rem; }
@media (max-width: 560px) { .tablist button { padding: .85rem .6rem; font-size: .74rem; } .tablist button .icon { display: none; } }
@media (max-width: 1100px) { .tablist button { padding: .85rem .65rem; } .tablist button .icon { display: none; } }
@media (max-width: 440px) { .tablist button { padding: .8rem .5rem; font-size: .7rem; } }
