/* Procera site. Tokens follow the product (web/src/ui/tokens.json, docs/05 §7):
   warm neutrals, ink primary buttons, brand red only for the mark, focus and markers.
   Sizes are rem; px only for hairlines, focus rings and shadows. */
@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist-latin-wght-normal.woff2') format('woff2-variations'),
       url('../fonts/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --bg: #F7F7F5; --surface: #FFFFFF; --muted: #F1F1EF;
  --border: #E6E5E1; --border-strong: #8C8A85;
  --text: #2F2E2A; --text-2: #5F5E5A; --text-3: #6F6E69;
  --brand: #EE4136; --link: #C72D26;
  --ink: #2F2E2A; --ink-hover: #45433E; --ink-text: #FFFFFF;
  --ok: #2B6A41; --ok-bg: #EDF3EC; --wip: #7A5C12; --wip-bg: #FBF3DB;
  --plan: #5F5E5A; --plan-bg: #F1F1EF;
  --bar-ok: #3F8A5A; --bar-wip: #D9A93A; --bar-none: #E6E5E1;
  --focus: #EE4136; --phone: #2F2E2A;
  --shadow: 0 1px 2px rgba(40, 36, 30, .05), 0 12px 32px -12px rgba(40, 36, 30, .18);
  --radius: .625rem; --radius-sm: .375rem;
  --wrap: 76rem; --gutter: 1rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1B1B1A; --surface: #222221; --muted: #2A2A28;
    --border: #353532; --border-strong: #77756F;
    --text: #EAEAE7; --text-2: #B8B7B2; --text-3: #A3A29D;
    --link: #F2675D; --ink: #EAEAE7; --ink-hover: #FFFFFF; --ink-text: #191919;
    --ok: #7BC796; --ok-bg: #1E2D23; --wip: #E5BE62; --wip-bg: #36301A;
    --plan: #B8B7B2; --plan-bg: #2A2A28;
    --bar-ok: #5FAE7A; --bar-wip: #C9A043; --bar-none: #3A3A37;
    --focus: #F0574D; --phone: #4A4946;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1B1B1A; --surface: #222221; --muted: #2A2A28;
  --border: #353532; --border-strong: #77756F;
  --text: #EAEAE7; --text-2: #B8B7B2; --text-3: #A3A29D;
  --link: #F2675D; --ink: #EAEAE7; --ink-hover: #FFFFFF; --ink-text: #191919;
  --ok: #7BC796; --ok-bg: #1E2D23; --wip: #E5BE62; --wip-bg: #36301A;
  --plan: #B8B7B2; --plan-bg: #2A2A28;
  --bar-ok: #5FAE7A; --bar-wip: #C9A043; --bar-none: #3A3A37;
  --focus: #F0574D; --phone: #4A4946;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (min-width: 40rem) { :root { --gutter: 1.5rem; } }
@media (min-width: 80rem) { :root { --gutter: 2rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--font); font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--surface); color: var(--text); padding: .5rem .75rem; z-index: 100; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.skip:focus { left: .5rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--border); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--bg); } }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 2.25rem; width: auto; }
.logo .dark { display: none; }
.nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); text-decoration: none; white-space: nowrap; font-size: .9375rem; padding: .5rem .625rem; border-radius: var(--radius-sm); position: relative; }
.nav a:hover { color: var(--text); background: var(--muted); }
.nav a[aria-current='page'] { color: var(--text); }
.nav a[aria-current='page']::after { content: ''; position: absolute; left: .625rem; right: .625rem; bottom: -.8125rem; height: 2px; background: var(--brand); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.theme-toggle { inline-size: 2.5rem; block-size: 2.5rem; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); cursor: pointer; }
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle svg { width: 1.125rem; height: 1.125rem; }
.theme-toggle .moon { display: none; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; inline-size: 2.5rem; block-size: 2.5rem; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 1.125rem; height: 1.125rem; }
.menu nav { position: absolute; right: 0; top: 3rem; min-width: 14rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem; display: grid; }
.menu nav a { padding: .625rem .75rem; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); }
.menu nav a:hover { background: var(--muted); }
.menu nav a[aria-current='page'] { box-shadow: inset 2px 0 0 var(--brand); }
@media (max-width: 74.99rem) {
  .nav { display: none; }
  .menu { display: block; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-gh span { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .625rem 1.125rem; border-radius: var(--radius-sm); font: 500 .9375rem/1.2 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn svg { width: 1.125rem; height: 1.125rem; flex: none; }
.btn-primary { background: var(--ink); color: var(--ink-text); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-sm { min-height: 2.5rem; padding: .5rem .875rem; font-size: .875rem; }
.btn-lg { min-height: 3rem; padding: .75rem 1.375rem; font-size: 1rem; border-radius: .5rem; }
.btn-ghost { color: var(--text); padding-inline: .5rem; }
.btn-ghost:hover { text-decoration: underline; }
.btn .arrow { display: inline-block; }
.btn-primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 1px 2px rgba(0, 0, 0, .12); }

/* Type helpers */
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 500; letter-spacing: .02em; color: var(--text-2); }
.eyebrow::before { content: ''; width: .5rem; height: .5rem; background: var(--brand); border-radius: 1px; }
.lede { font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.55; color: var(--text-2); max-width: 40rem; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.measure { max-width: 42rem; }

/* Sections */
main { display: block; }
.section { padding: clamp(3.5rem, 6vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: grid; gap: .875rem; margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 46rem; }
.section-head h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
.page-head { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); margin: .875rem 0 1rem; max-width: 52rem; }

/* Screenshots */
.shot { margin: 0; }
.shot .frame { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.shot .frame img { position: absolute; top: 0; left: 0; max-width: none; }
.shot.phone .frame { border-radius: 1.5rem; border: 6px solid var(--phone); box-shadow: var(--shadow); }
.shot figcaption { margin-top: .75rem; font-size: .8125rem; color: var(--text-3); }

/* Open-source band */
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 2rem; border-top: 1px solid var(--border); }
.facts div { padding: 1.25rem 1.25rem 1.25rem 0; }
.facts div + div { padding-left: 1.25rem; border-left: 1px solid var(--border); }
.facts strong { display: block; font-size: 1.0625rem; margin-bottom: .25rem; }
.facts p { color: var(--text-2); font-size: .9375rem; }
@media (max-width: 47.99rem) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
}
pre.cmd { margin: 1.5rem 0 0; padding: 1rem 1.25rem; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; font-size: .875rem; line-height: 1.7; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .375rem; font-size: .8125rem; font-weight: 500; padding: .1875rem .5rem; border-radius: var(--radius-sm); white-space: nowrap; line-height: 1.4; }
.badge::before { content: ''; width: .4375rem; height: .4375rem; border-radius: 50%; background: currentColor; flex: none; }
.badge.available { color: var(--ok); background: var(--ok-bg); }
.badge.progress { color: var(--wip); background: var(--wip-bg); }
.badge.progress::before { background: transparent; border: 1.5px solid currentColor; }
.badge.planned { color: var(--plan); background: var(--plan-bg); }
.badge.planned::before { background: transparent; border: 1.5px dashed currentColor; }

/* Features page */
.pillar-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.legend { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: 1.25rem; font-size: .875rem; color: var(--text-2); align-items: center; }
.feature-group { padding: clamp(3rem, 5vw, 4.5rem) 0; }
.feature-group + .feature-group { border-top: 1px solid var(--border); }
.feature-group header { display: grid; gap: .75rem; margin-bottom: 2.25rem; max-width: 44rem; }
.feature-group header h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding: 2rem 0; border-top: 1px solid var(--border); align-items: start; }
.feature.no-shot { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature-text { display: grid; gap: .75rem; }
.feature-text .top { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.feature-text h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
.feature-text ul { margin: 0; padding-left: 1.125rem; color: var(--text-2); display: grid; gap: .3125rem; }
.feature-text li::marker { color: var(--text-3); }
.feature .source { font-size: .8125rem; color: var(--text-3); }
.feature .source code { font-size: .75rem; }
.feature .aside { color: var(--text-2); font-size: .9375rem; border-left: 2px solid var(--border); padding-left: 1rem; }
@media (max-width: 63.99rem) { .feature, .feature.no-shot { grid-template-columns: minmax(0, 1fr); } }

/* Flows */
.flow { padding: clamp(3rem, 5vw, 4.5rem) 0; }
.flow + .flow { border-top: 1px solid var(--border); }
.flow-head { display: grid; gap: .625rem; max-width: 46rem; margin-bottom: 2rem; }
.flow-head h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); }
.flow-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.flow-body.phone-right { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.25rem 1fr; gap: .875rem; padding: .875rem 0; border-top: 1px solid var(--border); }
.steps li:last-child { border-bottom: 1px solid var(--border); }
.steps li::before { content: counter(s); font: 500 .8125rem/1.9rem var(--mono); text-align: center; width: 1.9rem; height: 1.9rem; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text); }
.steps strong { font-weight: 600; }
.steps span { color: var(--text-2); }
.verified { display: flex; gap: .625rem; align-items: flex-start; margin-top: 1.5rem; padding: .875rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .875rem; color: var(--text-2); }
.verified svg { width: 1.125rem; height: 1.125rem; color: var(--ok); flex: none; margin-top: .125rem; }
.verified code { color: var(--text); font-size: .8125rem; }
.flow-shots { display: grid; gap: 1.5rem; }
.flow-shots.with-phone { grid-template-columns: minmax(0, 1fr) 11rem; align-items: end; }
@media (max-width: 63.99rem) {
  .flow-body, .flow-body.phone-right { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 39.99rem) { .flow-shots.with-phone { grid-template-columns: 1fr 7rem; gap: 1rem; } }
.toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 2rem; margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: t; }
.toc li { counter-increment: t; border-top: 1px solid var(--border); }
.toc a { display: flex; gap: .75rem; padding: .75rem 0; color: var(--text); text-decoration: none; }
.toc a::before { content: counter(t, decimal-leading-zero); font: 500 .8125rem/1.6rem var(--mono); color: var(--text-3); }
.toc a:hover { color: var(--link); }

/* Tables (comparison) */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.compare { border-collapse: collapse; width: 100%; min-width: 50rem; font-size: .9375rem; }
.compare caption { text-align: left; padding: 1rem 1.25rem; color: var(--text-2); font-size: .875rem; caption-side: bottom; border-top: 1px solid var(--border); }
.compare th, .compare td { padding: .875rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.compare thead th { font-size: .8125rem; font-weight: 600; color: var(--text-2); background: var(--muted); vertical-align: bottom; }
.compare tbody th { font-weight: 500; width: 26%; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare .us { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.compare thead .us { background: color-mix(in srgb, var(--brand) 9%, var(--muted)); color: var(--text); box-shadow: inset 0 2px 0 var(--brand); }
.mark { display: inline-flex; gap: .375rem; align-items: baseline; }
.mark .sym { font-weight: 600; width: 1rem; display: inline-block; text-align: center; }
.mark.yes .sym { color: var(--ok); }
.mark.part .sym { color: var(--wip); }
.mark.no { color: var(--text-3); }
.mark .note { font-size: .8125rem; color: var(--text-2); }
.notes { margin-top: 2rem; display: grid; gap: .75rem; font-size: .875rem; color: var(--text-2); max-width: 50rem; }
.notes h2 { font-size: 1.125rem; color: var(--text); }

/* Roadmap */
.summary-line { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.625rem); line-height: 1.4; max-width: 50rem; letter-spacing: -0.01em; }
.summary-line strong { font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 2rem; }
.stats div { padding: 1.125rem 1rem 1.125rem 0; }
.stats div + div { padding-left: 1rem; border-left: 1px solid var(--border); }
.stats b { display: block; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats div > span { font-size: .875rem; color: var(--text-2); }
@media (max-width: 47.99rem) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
.releases { display: grid; }
.release { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; padding: 1.75rem 0; border-top: 1px solid var(--border); }
.release:last-child { border-bottom: 1px solid var(--border); }
.release .when { display: grid; gap: .25rem; align-content: start; }
.release .code { font: 600 1.5rem/1 var(--font); letter-spacing: -0.02em; display: flex; align-items: center; gap: .5rem; }
.release .now { font: 500 .75rem var(--font); color: var(--link); border: 1px solid currentColor; border-radius: var(--radius-sm); padding: .0625rem .375rem; letter-spacing: 0; }
.release .dates { font-size: .875rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.release h3 { font-size: 1.25rem; }
.release .scope { color: var(--text-2); font-size: .9375rem; margin: .375rem 0 1rem; max-width: 50rem; }
.bar { display: flex; height: .625rem; border-radius: 999px; overflow: hidden; background: var(--bar-none); max-width: 40rem; }
.bar i { display: block; height: 100%; }
.bar .d { background: var(--bar-ok); }
.bar .p { background: repeating-linear-gradient(135deg, var(--bar-wip) 0 4px, color-mix(in srgb, var(--bar-wip) 60%, transparent) 4px 8px); }
.counts { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .875rem; color: var(--text-2); margin-top: .625rem; font-variant-numeric: tabular-nums; }
.counts span { display: inline-flex; align-items: center; gap: .375rem; }
.counts i { width: .625rem; height: .625rem; border-radius: 2px; display: inline-block; }
.counts .d { background: var(--bar-ok); } .counts .p { background: var(--bar-wip); } .counts .n { background: var(--bar-none); border: 1px solid var(--border-strong); }
.release details { margin-top: 1rem; }
.release summary { cursor: pointer; font-size: .9375rem; font-weight: 500; color: var(--text); padding: .375rem 0; width: fit-content; }
.epics { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; }
.epics li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: .75rem; padding: .5625rem 0; border-top: 1px solid var(--border); align-items: baseline; font-size: .9375rem; }
.epics code { font-size: .8125rem; color: var(--text-3); }
@media (max-width: 47.99rem) {
  .release { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .epics li { grid-template-columns: minmax(0, 1fr) auto; }
  .epics li span { overflow-wrap: anywhere; }
  .epics code { grid-column: 1 / -1; }
}

/* Prose (security, open source) */
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); margin: 0 0 1rem; }
.prose h3 { font-size: 1.125rem; margin: 1.75rem 0 .5rem; letter-spacing: -0.01em; }
.prose p + p { margin-top: 1rem; }
.prose ul { padding-left: 1.125rem; display: grid; gap: .5rem; color: var(--text-2); }
.prose li strong { color: var(--text); font-weight: 600; }
.prose p { color: var(--text-2); }
.prose p strong { color: var(--text); }
.kv { display: grid; border-top: 1px solid var(--border); margin-top: 1rem; }
.kv div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem; padding: .875rem 0; border-bottom: 1px solid var(--border); }
.kv dt { font-weight: 600; }
.kv dd { margin: 0; color: var(--text-2); }
@media (max-width: 39.99rem) { .kv div { grid-template-columns: minmax(0, 1fr); gap: .25rem; } }
.side-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 63.99rem) { .side-grid { grid-template-columns: minmax(0, 1fr); } }
.callout { border-left: 2px solid var(--brand); padding: .25rem 0 .25rem 1rem; color: var(--text-2); font-size: .9375rem; }
.callout strong { color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2.5rem; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-grid h2 { font-size: .8125rem; font-weight: 600; color: var(--text-2); letter-spacing: .02em; margin-bottom: .75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-brand img { height: 1.75rem; width: auto; margin-bottom: 1rem; }
.footer-brand .dark { display: none; }
.footer-brand p { color: var(--text-2); max-width: 22rem; }
.legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-3); font-size: .8125rem; display: grid; gap: .375rem; }
@media (max-width: 47.99rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Theme-dependent assets */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo .light, :root:not([data-theme='light']) .footer-brand .light { display: none; }
  :root:not([data-theme='light']) .logo .dark, :root:not([data-theme='light']) .footer-brand .dark { display: block; }
  :root:not([data-theme='light']) .theme-toggle .sun { display: none; }
  :root:not([data-theme='light']) .theme-toggle .moon { display: block; }
}
:root[data-theme='dark'] .logo .light, :root[data-theme='dark'] .footer-brand .light { display: none; }
:root[data-theme='dark'] .logo .dark, :root[data-theme='dark'] .footer-brand .dark { display: block; }
:root[data-theme='dark'] .theme-toggle .sun { display: none; }
:root[data-theme='dark'] .theme-toggle .moon { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, .theme-toggle { transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out; }
}
@media (forced-colors: active) {
  .badge::before, .bar i, .counts i { forced-color-adjust: none; }
  .shot .frame { border: 1px solid CanvasText; }
}
@media print {
  .site-header, .site-footer, .theme-toggle { display: none; }
  .shot .frame { box-shadow: none; }
}

/* Hero story: real product fragments (tags, avatars, audit rows) assembled in HTML/CSS.
   The markup carries every step class (s0 to s5), so without JS or with reduced motion it shows
   the finished state. motion.js removes them and replays the story in a loop while visible. */
.story { margin: 0; container-type: inline-size; position: relative; }
.story-stage {
  position: relative; font-size: clamp(.5625rem, 1.9cqw, .9375rem); height: 40em;
  border-radius: 1.25rem; border: 1px solid var(--border);
  background-color: var(--muted);
  background-image: radial-gradient(color-mix(in srgb, var(--text) 13%, transparent) 1px, transparent 1.2px);
  background-size: 1.375rem 1.375rem; background-position: .6875rem .6875rem;
}
.sc {
  position: absolute; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: .75em; box-shadow: 0 1px 1px rgba(40, 36, 30, .04), .375em .375em 0 var(--il-shadow);
  line-height: 1.35;
}
.sc-label { font-size: .85em; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.sc b { font-weight: 600; }
.sc code { font-family: var(--mono); font-size: .86em; }

/* positions (desktop composition) */
.doc { left: 3%; top: 4.5%; width: 53%; z-index: 2; }
.review { left: 7%; top: 64%; width: 45%; z-index: 3; padding: 1em 1.1em; display: grid; gap: .6em; }
.camp { left: 60%; top: 4.5%; width: 37%; z-index: 1; padding: 1em 1.1em; }
.audit { left: 56%; top: 38%; width: 41%; z-index: 4; padding: 1em 1.1em; }

/* document card */
.sc-top { display: flex; justify-content: space-between; align-items: center; padding: .6em .9em; border-bottom: 1px solid var(--border); font-size: .85em; color: var(--text-2); }
.crumbs i { font-style: normal; opacity: .5; margin: 0 .25em; }
.crumbs b { color: var(--text); font-weight: 500; }
.dots { display: flex; gap: .3em; }
.dots i { width: .45em; height: .45em; border-radius: 50%; background: var(--border); }
.sc-in { padding: 1em 1.1em 1.2em; display: grid; gap: .7em; }
.doc-kind { display: flex; gap: .4em; align-items: center; }
.doc-title { font-size: 1.6em; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.props { margin: 0; display: grid; gap: .3em; font-size: .9em; }
.props div { display: grid; grid-template-columns: 6.2em 1fr; align-items: center; min-height: 1.6em; }
.props dt { color: var(--text-2); }
.props dd { margin: 0; display: flex; align-items: center; gap: .4em; }
.fp { background: var(--muted); border-radius: .3em; padding: .1em .4em; }
.doc-body { display: grid; gap: .5em; padding-top: .7em; border-top: 1px solid var(--border); }
.doc-body i { display: block; height: .5em; border-radius: .25em; background: var(--border); width: var(--w); }
.doc-body i.h { height: .7em; background: color-mix(in srgb, var(--text) 55%, transparent); margin-top: .3em; }

/* tags and avatars, as in the product */
.tg { display: inline-flex; align-items: center; gap: .35em; font-size: .82em; font-weight: 550; padding: .15em .5em; border-radius: .35em; white-space: nowrap; }
.tg i { width: .45em; height: .45em; border-radius: 50%; background: currentColor; }
.tg-purple { background: var(--c2); color: var(--c2f); } .tg-green { background: var(--c1); color: var(--c1f); }
.tg-yellow { background: var(--c5); color: var(--c5f); } .tg-gray { background: var(--muted); color: var(--text-2); }
.av { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; font: normal 600 .72em/1 var(--font); flex: none; }
.c0 { background: var(--c0); color: var(--c0f); } .c1 { background: var(--c1); color: var(--c1f); }
.c2 { background: var(--c2); color: var(--c2f); } .c3 { background: var(--c3); color: var(--c3f); }
.c4 { background: var(--c4); color: var(--c4f); } .c5 { background: var(--c5); color: var(--c5f); }

/* review card */
.rvw { display: flex; align-items: center; gap: .6em; padding: .55em .6em; border-radius: .5em; background: var(--muted); }
.rvw div { display: grid; flex: 1; min-width: 0; }
.rvw span { font-size: .85em; color: var(--text-2); }
.rvw .av { width: 2.2em; height: 2.2em; font-size: .8em; }
.ic { width: 1.5em; height: 1.5em; border-radius: 50%; flex: none; position: relative; }
.ic-no { border: 1.5px solid var(--il-red); }
.ic-no::after { content: ''; position: absolute; inset: 45% 22%; background: var(--il-red); border-radius: 1px; }
.ic-ok { background: var(--c1); }
.ic-ok::after { content: ''; position: absolute; left: 35%; top: 22%; width: 26%; height: 44%; border: solid var(--c1f); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* campaign card */
.camp-in { display: grid; grid-template-columns: auto 1fr; gap: .9em; align-items: center; margin-top: .7em; }
.ring { position: relative; width: 5.6em; height: 5.6em; }
.ring svg { width: 100%; height: 100%; }
.ring-t { fill: none; stroke: var(--border); stroke-width: 6; }
.ring-p { fill: none; stroke: var(--c1f); stroke-width: 6; stroke-linecap: round; stroke-dasharray: var(--p, 100) 100; }
.ring-n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring-n b { font-size: 1.45em; font-variant-numeric: tabular-nums; }
.ring-n small { font-size: .75em; color: var(--text-2); }
.faces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: .4em; }
.faces li { position: relative; width: 2.7em; height: 2.7em; border-radius: 50%; display: grid; place-items: center; font-size: .66em; font-weight: 600; }
.faces li::after { content: ''; position: absolute; right: -.2em; bottom: -.2em; width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid var(--surface);
  background: var(--c1f) no-repeat center / 70% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7.2 8 3' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* audit card */
.au-head { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: .5em; }
.au { list-style: none; margin: .7em 0 0; padding: 0; display: grid; }
.au li { position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: .6em; padding: .45em 0 .45em 1.4em; border-top: 1px solid var(--border); }
.au li::before { content: ''; position: absolute; left: .25em; top: 50%; width: .55em; height: .55em; margin-top: -.275em; border-radius: 50%; border: 1.5px solid var(--text-3); background: var(--surface); z-index: 1; }
.au li + li::after { content: ''; position: absolute; left: .5em; top: -50%; height: 100%; border-left: 1.5px solid var(--text-3); }
.au li span { grid-column: 1; font-size: .82em; color: var(--text-2); }
.au li code:first-child { color: var(--text); }
.au .h { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--c1f); background: var(--c1); padding: .15em .4em; border-radius: .3em; font-size: .8em; }

/* bar under the stage */
.story-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .875rem; }
.story-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .375rem; font-size: .8125rem; color: var(--text-2); counter-reset: st; }
.story-steps li { counter-increment: st; display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .5rem .25rem .3125rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.story-steps li::before { content: counter(st); font: 600 .6875rem/1.125rem var(--mono); width: 1.125rem; text-align: center; border-radius: 50%; background: var(--muted); color: var(--text-2); }
.story[data-step] .story-steps li { opacity: .7; }
.story[data-step='0'] .k0, .story[data-step='1'] .k1, .story[data-step='2'] .k2, .story[data-step='3'] .k3,
.story[data-step='4'] .k4, .story[data-step='5'] .k4 { opacity: 1; color: var(--text); border-color: var(--border-strong); }
.story[data-step='0'] .k0::before, .story[data-step='1'] .k1::before, .story[data-step='2'] .k2::before,
.story[data-step='3'] .k3::before, .story[data-step='4'] .k4::before, .story[data-step='5'] .k4::before { background: var(--brand); color: #fff; }
.story-toggle { font: 500 .8125rem var(--font); color: var(--text-2); background: none; border: 1px solid var(--border); border-radius: 999px; padding: .3125rem .75rem; cursor: pointer; flex: none; min-height: 2rem; }
.story-toggle:hover { color: var(--text); border-color: var(--border-strong); }

/* step states: what each step reveals. Hidden = not yet happened in this loop. */
.story .review, .story .camp { opacity: 0; transform: translateY(1.2em) scale(.97); }
.story .doc, .story .audit { opacity: 0; transform: translateY(.8em); }
.story.s0 .doc, .story.s0 .audit, .story.s1 .review, .story.s3 .camp { opacity: 1; transform: none; }
.story .st, .story .sw { display: none; }
.story.s0 .st-a, .story.s0 .sw-a { display: inline-flex; }
.story.s1 .st-a { display: none; } .story.s1 .st-b { display: inline-flex; }
.story.s2 .st-b, .story.s2 .sw-a { display: none; } .story.s2 .st-c, .story.s2 .sw-c { display: inline-flex; }
.story .fp { opacity: .25; } .story.s2 .fp { opacity: 1; }
.story .doc-body i { transform: scaleX(0); transform-origin: left; }
.story.s0 .doc-body i { transform: none; }
.story .rvw-ok { opacity: 0; } .story.s1 .rvw-ok { opacity: 1; }
.story .au li { display: none; }
.story.s0 .au-a, .story.s1 .au-b, .story.s2 .au-c, .story.s3 .au-d, .story.s4 .au-e { display: grid; }
.story .au-ok { opacity: 0; } .story.s4 .au-ok { opacity: 1; }
.story .faces li::after { transform: scale(0); } .story .faces li.ok::after, .story:not([data-step]) .faces li::after { transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .story .sc { transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
  .story .doc-body i { transition: transform .9s cubic-bezier(.4, 0, .2, 1); }
  .story.s0 .doc-body i:nth-child(2) { transition-delay: .25s; } .story.s0 .doc-body i:nth-child(3) { transition-delay: .5s; }
  .story.s0 .doc-body i:nth-child(4) { transition-delay: .75s; } .story.s0 .doc-body i:nth-child(5) { transition-delay: 1s; }
  .story.s0 .doc-body i:nth-child(6) { transition-delay: 1.25s; }
  .story .rvw-ok { transition: opacity .4s ease 1.1s; }
  .story .fp, .story .au-ok { transition: opacity .5s ease .2s; }
  .story .ring-p { transition: stroke-dasharray .25s ease; }
  .story .faces li::after { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
  .story .au li { animation: au-in .45s cubic-bezier(.2, .8, .2, 1) both; }
  .story.reset .sc, .story.reset .doc-body i, .story.reset * { transition: none !important; }
}
@keyframes au-in { from { opacity: 0; transform: translateY(-.5em); } }

/* With JS and motion, hold the stage back briefly so the finished state doesn't flash before
   motion.js resets it; if the script never runs, the stage appears anyway. */
@media (prefers-reduced-motion: no-preference) {
  .js .story:not([data-step]) .story-stage { animation: story-wait 1.2s steps(1) both; }
}
@keyframes story-wait { from { visibility: hidden; } }

/* narrow: cards stack in a two-column grid instead of overlapping */
@container (max-width: 34rem) {
  .story-stage { height: auto; font-size: clamp(.625rem, 3.05cqw, .875rem); display: grid; grid-template-columns: 1fr 1fr; gap: .9em; padding: 1em; }
  .sc { position: relative; left: auto; top: auto; width: auto; }
  .doc, .audit { grid-column: 1 / -1; }
  .review { grid-column: 1 / -1; }
  .camp { grid-column: 1 / -1; }
  .camp-in { grid-template-columns: auto 1fr; }
  .faces { grid-template-columns: repeat(6, auto); justify-content: start; }
}

/* Home page v2 sections. */
.tint { background: color-mix(in srgb, var(--muted) 60%, var(--bg)); }
.section.tint + .section, .section + .section.tint { border-top: 1px solid var(--border); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 0; overflow: clip; }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); align-items: center; }
.hero-copy { display: grid; gap: 1.375rem; justify-items: start; }
.hero h1 { font-size: clamp(2.75rem, 1.4rem + 4.2vw, 4.25rem); letter-spacing: -0.045em; line-height: .98; font-weight: 650; }
.hero .lede { max-width: 34rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-visual { min-width: 0; }
@media (min-width: 72rem) {
  .hero-grid { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); }
}

/* Proof numbers */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--border); }
.stat { padding: 1.5rem 1.25rem 1.75rem 0; display: grid; gap: .375rem; align-content: start; }
.stat + .stat { padding-left: 1.25rem; border-left: 1px solid var(--border); }
.stat b { font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat b small { font-size: .5em; color: var(--text-3); letter-spacing: -0.01em; margin-left: .1em; }
.stat > span { font-size: .875rem; color: var(--text-2); max-width: 15rem; }
@media (max-width: 47.99rem) {
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* Links with arrows, ghost buttons */
.more { font-weight: 500; text-decoration: none; display: inline-flex; gap: .375rem; align-items: center; }
.more::after { content: '→'; transition: transform .2s ease; }
.more:hover::after { transform: translateX(.1875rem); }
.more:hover { text-decoration: underline; }

/* Core loop */
.loop { position: relative; margin-top: 1rem; }
.loop-line { position: absolute; overflow: visible; pointer-events: none; }
.loop-line path { fill: none; vector-effect: non-scaling-stroke; }
.loop-path { stroke: var(--text); stroke-width: 1.5; }
.loop-back { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 4 5; }
.loop-line.h { left: 0; right: 0; top: 0; width: 100%; height: 4rem; }
.loop-line.v { display: none; }
.loop-note { position: absolute; left: 16.67%; top: -1.75rem; transform: translateX(-50%); font: 500 .75rem var(--mono); color: var(--link); background: var(--bg); padding: 0 .375rem; white-space: nowrap; }
.loop-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; position: relative; }
.loop-steps li { display: grid; justify-items: center; align-content: start; text-align: center; gap: .875rem; }
.node { width: 3.5rem; height: 3.5rem; margin-top: .25rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--text); box-shadow: .25rem .25rem 0 var(--il-shadow); }
.node svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.loop-steps li:nth-child(2) .node { border-color: var(--brand); }
.loop-steps li:nth-child(2) .node svg { stroke: var(--link); }
.loop-steps b { display: block; font-size: 1.0625rem; font-weight: 600; margin-bottom: .25rem; }
.loop-n { display: block; font: 500 .75rem var(--mono); color: var(--text-3); margin-bottom: .125rem; }
.loop-steps p { font-size: .875rem; color: var(--text-2); max-width: 13rem; margin: 0 auto; }
@media (max-width: 63.99rem) {
  .loop { margin-top: 0; }
  .loop-line.h, .loop-note { display: none; }
  .loop-line.v { display: block; left: 0; top: 0; width: 3.75rem; height: 100%; }
  .loop-steps { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 0; }
  .loop-steps li { grid-template-columns: 3.75rem minmax(0, 1fr); justify-items: start; text-align: left; align-items: center; gap: 1rem; padding: .75rem 0; }
  .node { margin: 0 .125rem; }
  .loop-steps p { margin: 0; max-width: 32rem; }
}

/* Pillars: an asymmetric 2×2 with a plate illustration in each */
.pillars2 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; }
.pillar2 { grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; }
.p-design, .p-improve { grid-column: span 7; } .p-execute, .p-govern { grid-column: span 5; }
.p-execute, .p-govern { grid-template-columns: minmax(0, 1fr); }
.p-execute .pillar2-art, .p-govern .pillar2-art { max-width: 20rem; }
.pillar2-copy { display: grid; gap: .625rem; align-content: start; }
.pillar2 .num { font: 500 .75rem var(--mono); color: var(--text-3); letter-spacing: .02em; }
.pillar2 h3 { font-size: 1.375rem; }
.pillar2 p { font-size: .9375rem; }
.pillar2 ul { margin: .25rem 0 .25rem; padding: 0; list-style: none; display: grid; gap: .3125rem; font-size: .9375rem; }
.pillar2 li { padding-left: 1.375rem; position: relative; }
.pillar2 li::before { content: ''; position: absolute; left: .125rem; top: .4em; width: .375rem; height: .625rem; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@media (max-width: 63.99rem) {
  .pillar2, .p-design, .p-improve, .p-execute, .p-govern { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .p-execute .pillar2-art, .p-govern .pillar2-art { max-width: none; }
}
@media (max-width: 39.99rem) {
  .pillar2, .p-design, .p-improve, .p-execute, .p-govern { grid-template-columns: minmax(0, 1fr); }
}

/* Tour: steps scroll, the frame sticks and swaps screens */
.tour-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 4rem); }
.tour-step { min-height: 72vh; display: grid; gap: .75rem; align-content: center; padding: 2rem 0; position: relative; }
.tour-step:first-child { min-height: 56vh; align-content: start; padding-top: 1rem; }
.tour-step:last-child { min-height: 64vh; }
.tour-num { font: 500 .75rem var(--mono); color: var(--text-3); }
.tour-step h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.025em; }
.tour-step ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .4375rem; color: var(--text-2); }
.tour-step li { padding-left: 1.25rem; position: relative; }
.tour-step li::before { content: ''; position: absolute; left: 0; top: .75em; width: .5rem; height: 1px; background: var(--border-strong); }
.tour-step .muted { max-width: 30rem; }
.tour-inline { display: none; }
.tour-frame { position: sticky; top: calc(50vh - min(19rem, 26vw)); align-self: start; margin-top: 1rem; }
.browser { border-radius: .875rem; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow), .5rem .5rem 0 var(--il-shadow); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: .875rem; padding: .625rem .875rem; border-bottom: 1px solid var(--border); background: var(--muted); }
.browser-bar .dots, .term-bar .dots { display: flex; gap: .375rem; }
.browser-bar .dots i, .term-bar .dots i { width: .625rem; height: .625rem; border-radius: 50%; background: var(--border); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }
.url { flex: 1; max-width: 26rem; margin: 0 auto; font: 400 .75rem var(--mono); color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: .375rem; padding: .25rem .625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.url b { font-weight: 400; color: var(--text); }
.browser-view { position: relative; aspect-ratio: 2880 / 1800; overflow: hidden; }
.layer { position: absolute; inset: 0; opacity: 0; transform: scale(1.015); }
.layer.on { opacity: 1; transform: none; }
.layer img { height: auto; }
.tour-dots { list-style: none; display: flex; gap: .375rem; justify-content: center; margin: 1rem 0 0; padding: 0; }
.tour-dots li { width: 1.5rem; height: .25rem; border-radius: 999px; background: var(--border); }
.tour-dots li.on { background: var(--text); }
@media (max-width: 63.99rem) {
  .tour-grid { grid-template-columns: minmax(0, 1fr); }
  .tour-frame { display: none; }
  .tour-step, .tour-step:first-child, .tour-step:last-child { min-height: 0; padding: 1.75rem 0; border-top: 1px solid var(--border); }
  .tour-inline { display: block; margin-top: .75rem; }
}

/* Personas */
.ptabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.ptab { font: 500 .9375rem var(--font); color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .5rem 1rem; min-height: 2.75rem; cursor: pointer; }
.ptab:hover { color: var(--text); border-color: var(--border-strong); }
.ptab[aria-selected='true'] { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.ppanel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; padding: clamp(1.25rem, 3vw, 2.25rem); }
.ppanel[hidden] { display: none; }
.ppanel:focus-visible { outline-offset: 4px; border-radius: 1.25rem; }
.ppanel-copy { display: grid; gap: .875rem; align-content: start; }
.ppanel-copy h3 { font-size: clamp(1.375rem, 1.15rem + .8vw, 1.75rem); letter-spacing: -0.025em; }
.pts { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .9375rem; }
.pts li { display: flex; flex-wrap: wrap; gap: .375rem .5rem; align-items: baseline; padding-left: 1.5rem; position: relative; }
.pts li .ok { position: absolute; left: .25rem; top: .3em; width: .375rem; height: .6875rem; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pts li:not(:has(.ok))::before { content: ''; position: absolute; left: .125rem; top: .55em; width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px dashed var(--text-3); }
.pnext { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .875rem; color: var(--text-2); padding-top: .875rem; border-top: 1px dashed var(--border-strong); }
/* the persona's illustration with the real screen laid over its corner */
.ppanel-visual { position: relative; padding-bottom: 29%; }
.ppanel-art { width: 70%; }
.ppanel-shot { position: absolute; right: 0; bottom: 0; width: 58%; }
.ppanel-visual.is-phone { padding-bottom: 0; }
.ppanel-visual.is-phone .ppanel-art { width: 78%; }
.ppanel-visual.is-phone .ppanel-shot { width: 30%; bottom: -8%; }
@media (max-width: 47.99rem) {
  .ppanel { grid-template-columns: minmax(0, 1fr); }
  .ppanel-visual { order: -1; padding-bottom: 0; }
  .ppanel-art { width: 100%; }
  .ppanel-shot { position: relative; width: 88%; margin: -16% 0 0 auto; }
  .ppanel-visual.is-phone .ppanel-art { width: 100%; }
  .ppanel-visual.is-phone .ppanel-shot { position: absolute; width: 34%; bottom: -6%; right: 2%; margin: 0; }
}

/* Leads + hash chain demo */
.leads-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.leads { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.leads li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.lead-n { font: 500 .8125rem/1.75rem var(--mono); color: var(--link); }
.leads h3 { font-size: 1.125rem; margin-bottom: .25rem; letter-spacing: -0.01em; }
.leads p { font-size: .9375rem; }
.chain { position: sticky; top: 6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.25rem; box-shadow: .5rem .5rem 0 var(--il-shadow); }
.chain-cap { font-size: .8125rem; color: var(--text-2); margin-bottom: 1rem; }
.chain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.blk { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; padding: .875rem 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--bg); transition: border-color .3s, background-color .3s; }
.blk + .blk::before { content: ''; position: absolute; left: 1.75rem; top: -1.3125rem; height: 1.25rem; border-left: 2px solid var(--ok); }
.blk-top { display: contents; }
.blk-n { font: 600 .875rem var(--mono); }
.blk-h { font-size: .75rem; color: var(--c1f); background: var(--c1); padding: .0625rem .375rem; border-radius: .25rem; justify-self: end; }
.blk-e { font-size: .8125rem; color: var(--text); }
.blk-who { font-size: .8125rem; color: var(--text-2); justify-self: end; }
.blk-p { grid-column: 1 / -1; font-size: .75rem; color: var(--text-3); }
.blk-p code { font-size: .75rem; }
.blk.changed { border-color: var(--wip); background: var(--wip-bg); }
.blk.changed .blk-h { color: var(--wip); background: transparent; border: 1px dashed var(--wip); }
.blk.broken { border-color: var(--link); }
.blk.broken::before { border-left-style: dashed !important; border-color: var(--link) !important; }
.blk.broken .blk-p code { color: var(--link); text-decoration: line-through; }
.blk.after { border-style: dashed; }
.chain-ctl { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.chain-status { font-size: .875rem; display: inline-flex; gap: .5rem; align-items: center; color: var(--ok); font-weight: 500; }
.chain-status .ok { width: .375rem; height: .6875rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-.125rem); }
.chain-status.bad { color: var(--link); }
.chain-status.bad .ok { width: .625rem; height: .625rem; border: 0; transform: none; background: currentColor; border-radius: 50%; }
@media (max-width: 63.99rem) { .leads-grid { grid-template-columns: minmax(0, 1fr); } .chain { position: static; } }
@media (max-width: 39.99rem) { .leads li { grid-template-columns: 2rem minmax(0, 1fr); } .lead-st { grid-column: 2; } }

/* Release timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 1.0625rem; border-top: 1.5px solid var(--border-strong); transform-origin: left; }
.timeline li { position: relative; display: grid; gap: .375rem; align-content: start; padding: 2.5rem 1rem 0 0; }
.timeline li::before { content: ''; position: absolute; left: 0; top: .6875rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--text); }
.timeline li:first-child::before { background: var(--brand); border-color: var(--brand); }
.tl-code { font: 600 1.25rem/1 var(--font); letter-spacing: -0.02em; }
.tl-when { font-size: .8125rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.timeline b { font-weight: 500; font-size: .9375rem; line-height: 1.35; min-height: 2.6em; }
.tl-bar { display: block; height: .375rem; border-radius: 999px; background: var(--bar-none); overflow: hidden; margin-top: .25rem; }
.tl-bar i { display: block; height: 100%; width: var(--w); background: var(--bar-ok); border-radius: inherit; }
.tl-state { font-size: .8125rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 63.99rem) {
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.5rem; }
}
@media (max-width: 39.99rem) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Dark band: ink in both themes */
.dark-band { background: #1F1E1B; color: #EDECE8; border-top: 0; --text: #EDECE8; --text-2: #B9B7B0; --text-3: #A3A19B; --border: #3A3935; --link: #FF8A80; --surface: #282724; --muted: #2F2E2B; }
.dark-band .eyebrow { color: #B9B7B0; }
.oss-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.oss-grid h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); margin: .875rem 0 1rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.5rem 0 0; }
.chips li { font: 500 .8125rem var(--mono); padding: .375rem .625rem; border: 1px solid var(--border); border-radius: .375rem; color: var(--text); }
.btn-light { background: #FFFFFF; color: #1F1E1B; }
.btn-light:hover { background: #E9E8E4; }
.btn-outline-light { color: #EDECE8; border-color: #5A5852; }
.btn-outline-light:hover { border-color: #EDECE8; }
.term { background: #161614; border: 1px solid #3A3935; border-radius: .875rem; overflow: hidden; }
.term-bar { display: flex; gap: .75rem; align-items: center; padding: .5625rem .875rem; border-bottom: 1px solid #3A3935; font: .75rem var(--mono); color: #A3A19B; }
.term-bar .dots i { background: #3A3935; border-color: #4A4944; }
.term pre { margin: 0; padding: 1.125rem 1.25rem; overflow-x: auto; font-size: .875rem; line-height: 1.8; color: #EDECE8; }
.term .pr { color: #FF8A80; user-select: none; }
.term .cm { color: #A3A19B; }
.term-facts { margin: 0; display: grid; border-top: 1px solid #3A3935; }
.term-facts div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid #2C2B28; font-size: .875rem; }
.term-facts div:last-child { border-bottom: 0; }
.term-facts dt { font-weight: 600; }
.term-facts dd { margin: 0; color: #B9B7B0; }
@media (max-width: 63.99rem) { .oss-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 39.99rem) { .term-facts div { grid-template-columns: minmax(0, 1fr); gap: .125rem; } }

/* Final CTA */
.final-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.final-art { width: clamp(5rem, 12vw, 9rem); }
.final-art .rb { fill: var(--brand); } .final-art .rs { fill: #C72D26; }
.final h2 { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem); letter-spacing: -0.035em; max-width: 22ch; margin-bottom: 1rem; }
@media (max-width: 39.99rem) { .final-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 .stop { color: var(--brand); }

/* Illustrations and product-fragment pastels. The pastels are the product's avatar and tag
   colours (web/src/ui/shell.css); every pairing keeps text at 4.5:1 or better. */
:root {
  --c0: #E7F3F8; --c0f: #1F5E8C; --c1: #EDF3EC; --c1f: #2B6A41; --c2: #F3EEF8; --c2f: #6940A5;
  --c3: #FBECDD; --c3f: #8A4A16; --c4: #FAEEF4; --c4f: #9B2C66; --c5: #FBF3DB; --c5f: #6E520F;
  --pl0: #E3EEF4; --pl1: #E4EDE2; --pl2: #EDE7F4; --pl3: #F7E6D6; --pl4: #F5E5ED; --pl5: #F5ECCF;
  --il-ink: #2F2E2A; --il-paper: #FFFFFF; --il-paper-2: #F4F3EF; --il-line: #DAD8D2;
  --il-shadow: rgba(47, 46, 42, .13); --il-red: #EE4136; --il-red-2: #C72D26;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --c0: #1E3445; --c0f: #9CCBF2; --c1: #22362A; --c1f: #9AD4AE; --c2: #352B45; --c2f: #C9B2EE;
    --c3: #44301F; --c3f: #F0BE8C; --c4: #452637; --c4f: #F0A9CC; --c5: #423820; --c5f: #EBCF7C;
    --pl0: #1C2A33; --pl1: #1D2A21; --pl2: #2A2433; --pl3: #33281D; --pl4: #33222B; --pl5: #322C1C;
    --il-ink: #D9D8D3; --il-paper: #2A2A28; --il-paper-2: #232321; --il-line: #4A4945;
    --il-shadow: rgba(0, 0, 0, .45); --il-red: #F0574D; --il-red-2: #C72D26;
  }
}
:root[data-theme='dark'] {
  --c0: #1E3445; --c0f: #9CCBF2; --c1: #22362A; --c1f: #9AD4AE; --c2: #352B45; --c2f: #C9B2EE;
  --c3: #44301F; --c3f: #F0BE8C; --c4: #452637; --c4f: #F0A9CC; --c5: #423820; --c5f: #EBCF7C;
  --pl0: #1C2A33; --pl1: #1D2A21; --pl2: #2A2433; --pl3: #33281D; --pl4: #33222B; --pl5: #322C1C;
  --il-ink: #D9D8D3; --il-paper: #2A2A28; --il-paper-2: #232321; --il-line: #4A4945;
  --il-shadow: rgba(0, 0, 0, .45); --il-red: #F0574D; --il-red-2: #C72D26;
}

.il { width: 100%; height: auto; display: block; overflow: visible; }
.il text { font-family: var(--font); fill: var(--il-ink); }
.il text.mono { font-family: var(--mono); }
.il .k, .il .pp, .il .ps, .il .rk, .il .track, .il .prog, .il .f1s, .il .wk, .il [class^='cf'] {
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.il .k { fill: none; stroke: var(--il-ink); }
.il .k.soft { stroke: var(--il-line); }
.il .k.thick { stroke-width: 3; }
.il .k.ring { stroke-width: 1; opacity: .25; }
.il .pp { fill: var(--il-paper); stroke: var(--il-ink); }
.il .ps { fill: var(--il-paper-2); stroke: var(--il-ink); }
.il .dash, .il .pp.dash { stroke-dasharray: 4 4; fill: none; }
.il .sh { fill: var(--il-shadow); }
.il .ln { fill: var(--il-line); }
.il .ln0 { fill: color-mix(in srgb, var(--c0f) 30%, transparent); }
.il .kx { fill: var(--il-ink); }
.il .kd { fill: var(--il-ink); opacity: .45; }
.il .kt { fill: var(--il-ink); }
.il .kt2, .il .kt3 { fill: var(--il-ink); opacity: .72; }
.il text.wt { fill: var(--il-paper); }
.il .wk { fill: none; stroke: #FFFFFF; }
.il .rd { fill: var(--il-red); }
.il .rk { fill: none; stroke: var(--il-red); stroke-width: 2.25; }
.il .rb { fill: var(--il-red); }
.il .rs { fill: var(--il-red-2); }
.il .caret { fill: var(--il-red); }
.il .track { fill: none; stroke: var(--il-line); stroke-width: 4; }
.il .prog { fill: none; stroke: var(--il-ink); stroke-width: 4; }
.il .f1s { fill: none; stroke: var(--c1f); stroke-width: 2; }
.il .f0bg { fill: var(--c0f); }
.il .badge { stroke: var(--il-paper); stroke-width: 1.5; }
.il .t0 { fill: var(--c0); } .il .t1 { fill: var(--c1); } .il .t2 { fill: var(--c2); }
.il .t3 { fill: var(--c3); } .il .t4 { fill: var(--c4); } .il .t5 { fill: var(--c5); }
.il .f0, .il .d0 { fill: var(--c0f); } .il .f1, .il .d1 { fill: var(--c1f); } .il .f2, .il .d2 { fill: var(--c2f); }
.il .f3, .il .d3 { fill: var(--c3f); } .il .f4, .il .d4 { fill: var(--c4f); } .il .f5, .il .d5 { fill: var(--c5f); }
.il [class^='cf'] { fill: none; stroke-width: 2.4; }
.il .cf0 { stroke: var(--c0f); } .il .cf1 { stroke: var(--c1f); } .il .cf2 { stroke: var(--c2f); }
.il .cf3 { stroke: var(--c3f); } .il .cf4 { stroke: var(--c4f); } .il .cf5 { stroke: var(--c5f); }
.il .pl0 { fill: var(--pl0); } .il .pl1 { fill: var(--pl1); } .il .pl2 { fill: var(--pl2); }
.il .pl3 { fill: var(--pl3); } .il .pl4 { fill: var(--pl4); } .il .pl5 { fill: var(--pl5); }

@media (prefers-reduced-motion: no-preference) {
  .il .blink { animation: il-blink 1.1s steps(1) infinite; }
  .il .flowdash { animation: il-flow 1.6s linear infinite; }
  .in .il .pop, .il.in .pop { animation: il-pop .5s cubic-bezier(.3, 1.5, .5, 1) both; }
  .in .il .pop:nth-of-type(2n) { animation-delay: .15s; }
  .in .il .pop:nth-of-type(3n) { animation-delay: .3s; }
}
@keyframes il-blink { 50% { opacity: 0; } }
@keyframes il-flow { to { stroke-dashoffset: -14; } }
@keyframes il-pop { from { transform: scale(.4); opacity: 0; } }
.il .pop { transform-box: fill-box; transform-origin: center; }
@media (forced-colors: active) {
  .il * { forced-color-adjust: auto; }
}

/* Inner pages, plus all scroll motion. Motion rules only apply under html.motion, which
   motion.js sets when JS runs and the visitor hasn't asked for reduced motion; without it
   every element sits in its final state. */

/* Page heads with an illustration */
.page-head.has-art .wrap:first-child { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.page-head .head-art { max-width: 24rem; justify-self: end; width: 100%; }
@media (max-width: 63.99rem) {
  .page-head.has-art .wrap:first-child { grid-template-columns: minmax(0, 1fr); }
  .page-head .head-art { justify-self: start; max-width: 18rem; }
}

/* Features: pillar header with its illustration; sticky pillar nav */
.group-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 2rem; align-items: center; max-width: none !important; }
.group-head > div:first-child { display: grid; gap: .75rem; max-width: 44rem; }
.group-art { max-width: 20rem; justify-self: end; width: 100%; }
@media (max-width: 47.99rem) { .group-head { grid-template-columns: minmax(0, 1fr); } .group-art { justify-self: start; max-width: 15rem; } }
.pillar-nav.sticky { display: block; position: sticky; top: 4rem; z-index: 10; background: color-mix(in srgb, var(--bg) 94%, transparent); padding: .625rem 0; margin-top: 0; border-bottom: 1px solid var(--border); }
.pillar-nav.sticky .wrap { display: flex; flex-wrap: wrap; gap: .5rem; }
.diagram + p, .chain-inline .chain { margin-top: 1.5rem; }
.chain-inline .chain { position: static; }
.pillar-nav a[aria-current='true'] { border-color: var(--text); color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }

/* Security diagram */
.diagram { margin: 1.5rem 0 0; max-width: 26rem; }
.diagram figcaption { font-size: .8125rem; color: var(--text-3); margin-top: .5rem; }

/* 404 */
.lost { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 3rem; align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
.lost .cta-row { margin-top: 1.5rem; }
@media (max-width: 47.99rem) { .lost { grid-template-columns: minmax(0, 1fr); } }

/* Header reading progress (scroll-driven, no JS) */
.site-header { position: sticky; }
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; opacity: 0; }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @supports (animation-timeline: scroll()) {
    .site-header::after { opacity: 1; animation: grow-x linear both; animation-timeline: scroll(root); }
  }
  /* hover depth */
  .pillar2, .ppanel, .chain, .browser, .shot .frame, .node, .ptab, .btn { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, background-color .15s, border-color .15s, color .15s; }
  .pillar2:hover { transform: translate(-.125rem, -.125rem); box-shadow: .5rem .5rem 0 var(--il-shadow); }
  .shot .frame:hover { transform: translateY(-.1875rem); }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: none; }
  .loop-steps li:hover .node { transform: translate(-.125rem, -.125rem); box-shadow: .375rem .375rem 0 var(--il-shadow); }
}
@keyframes grow-x { to { transform: scaleX(1); } }

/* reveals */
.motion .rv { transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.motion .rv:not(.in) { opacity: 0; transform: translateY(1.5rem); }
.motion .pillar2.rv:not(.in) { transform: translateY(2rem) scale(.98); }

/* the core loop draws itself: scrubbed by scroll where supported, otherwise once on reveal */
.motion .loop-path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.motion .loop-back, .motion .loop-note { opacity: 0; transition: opacity .6s ease 1.2s; }
.motion .loop.in .loop-back, .motion .loop.in .loop-note { opacity: 1; }
@supports not (animation-timeline: view()) {
  .motion .loop-path { transition: stroke-dashoffset 1.8s cubic-bezier(.4, 0, .2, 1); }
  .motion .loop.in .loop-path { stroke-dashoffset: 0; }
}
@supports (animation-timeline: view()) {
  .motion .loop { view-timeline: --loop block; }
  .motion .loop-path { animation: draw linear both; animation-timeline: --loop; animation-range: entry 10% contain 35%; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* tour frame swaps */
.motion .layer { transition: opacity .5s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.motion .tour-dots li { transition: background-color .3s; }
.motion .url b { transition: opacity .2s; }

/* persona panels */
.motion .ppanel.on { animation: panel-in .45s cubic-bezier(.2, .8, .2, 1); }
.motion .ppanel.on .ppanel-art { animation: panel-in .6s cubic-bezier(.2, .8, .2, 1) .05s both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(.75rem); } }

/* timelines and bars fill on reveal */
.motion .timeline::before { transform: scaleX(0); transition: transform 1.4s cubic-bezier(.4, 0, .2, 1); }
.motion .timeline.in::before { transform: none; }
.motion .tl-bar i, .motion .bar i { transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.4, 0, .2, 1) .3s; }
.motion .in .tl-bar i, .motion .in .bar i, .motion .bar.in i { transform: none; }

/* flows: steps arrive one by one */
.motion .steps.rv li { transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.motion .steps.rv:not(.in) li { opacity: 0; transform: translateX(-.75rem); }
.motion .steps.rv:not(.in) { opacity: 1; transform: none; }
.motion .steps li:nth-child(2) { transition-delay: .08s; } .motion .steps li:nth-child(3) { transition-delay: .16s; }
.motion .steps li:nth-child(4) { transition-delay: .24s; } .motion .steps li:nth-child(5) { transition-delay: .32s; }
.motion .steps li:nth-child(6) { transition-delay: .4s; }

@media print {
  .motion .rv:not(.in) { opacity: 1; transform: none; }
  .tour-frame, .story-bar { display: none; }
}
html:has(.pillar-nav.sticky) { scroll-padding-top: 8.5rem; }
.lost-h { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); margin: .875rem 0 1rem; letter-spacing: -0.035em; }

/* Get started: the self-hosting guides rendered from docs/guides/*.md */
.guide-section .wrap { max-width: 52rem; }
.guide-quick { margin: 0 0 3rem; }
.guide.prose { max-width: none; }
.guide h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); margin: 0 0 1.25rem; letter-spacing: -0.025em; }
.guide h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); margin: 3rem 0 .75rem; letter-spacing: -0.015em; }
.guide h4 { font-size: 1.0625rem; margin: 2rem 0 .5rem; }
.guide h2, .guide h3, .guide h4 { scroll-margin-top: 5rem; }
.guide h3 code, .guide h4 code { font-size: .9em; }
.guide p { margin: 1rem 0 0; }
.guide h2 + p, .guide h3 + p, .guide h4 + p { margin-top: 0; }
.guide ul, .guide ol { margin: 1rem 0 0; padding-left: 1.375rem; display: grid; gap: .5rem; color: var(--text-2); }
.guide li > ul, .guide li > ol { margin-top: .5rem; }
.guide ol { list-style: decimal; }
.guide li strong, .guide td strong { color: var(--text); font-weight: 600; }
.guide code { font-family: var(--mono); font-size: .875em; overflow-wrap: anywhere; }
.guide :not(pre) > code { background: var(--muted); border: 1px solid var(--border); border-radius: .25rem; padding: .0625rem .3125rem; }
.guide pre.cmd { margin-top: 1rem; }
.guide pre.cmd code { overflow-wrap: normal; white-space: pre; }
.guide .table-wrap { margin-top: 1.25rem; }
table.guide-table { border-collapse: collapse; width: 100%; font-size: .875rem; line-height: 1.55; }
.guide-table th, .guide-table td { padding: .75rem .875rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.guide-table thead th { font-size: .8125rem; font-weight: 600; color: var(--text-2); background: var(--muted); }
.guide-table td { color: var(--text-2); }
.guide-table td:first-child { color: var(--text); }
.guide-table tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 47.99rem) { table.guide-table { min-width: 40rem; } }
.guide-note { margin-top: 1.25rem; padding: .875rem 1.125rem; border: 1px solid var(--border); border-left: .1875rem solid var(--brand); border-radius: var(--radius-sm); background: var(--surface); }
.guide-note p { margin: 0; }
.guide-source { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .875rem; }

/* Developer docs (developers.html, docs-*.html): a sidebar, the article and an on-page index. */
.docs { display: grid; grid-template-columns: 14rem minmax(0, 1fr) 13rem; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; padding-top: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.docs-menu { display: none; }
.docs-nav, .docs-toc { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow: auto; font-size: .875rem; }
.docs-nav ul, .docs-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .125rem; }
.docs-nav a { display: block; padding: .375rem .625rem; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; }
.docs-nav a:hover { color: var(--text); background: var(--muted); }
.docs-nav a[aria-current='page'] { color: var(--text); background: var(--muted); font-weight: 600; box-shadow: inset .1875rem 0 0 var(--brand); }
.docs-home { font-weight: 600; color: var(--text) !important; margin-bottom: .5rem; }
.docs-group { margin: 1.25rem 0 .375rem; padding: 0 .625rem; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.docs-body { max-width: 46rem; min-width: 0; }
.docs-body h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); margin: .75rem 0 .75rem; letter-spacing: -0.02em; }
.docs-body > .lede { margin-bottom: 2rem; }
.docs-body h2 { margin-top: 2.5rem; scroll-margin-top: 5rem; }
.docs-body h3, .docs-body h4 { scroll-margin-top: 5rem; }
.docs-body .area:first-of-type h2 { margin-top: 2rem; }
.docs-body code { font-family: var(--mono); font-size: .875em; background: var(--muted); padding: .0625rem .3125rem; border-radius: .25rem; }
.docs-body pre code { background: none; padding: 0; font-size: .8125rem; }
.docs-body ol { padding-left: 1.25rem; display: grid; gap: .5rem; color: var(--text-2); }
.docs-edit { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .875rem; color: var(--text-3); }
.docs-toc p { margin: 0 0 .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.docs-toc a { display: block; padding: .25rem 0 .25rem .75rem; border-left: 1px solid var(--border); color: var(--text-2); text-decoration: none; line-height: 1.4; }
.docs-toc a:hover { color: var(--text); border-left-color: var(--text); }
/* The API reference */
.area-intro { font-size: .9375rem; }
.docs-body ul.ops { list-style: none; display: block; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--border); }
.op { padding: .875rem 0; border-bottom: 1px solid var(--border); scroll-margin-top: 5rem; }
.op-head { display: flex; align-items: center; gap: .625rem; margin: 0; flex-wrap: wrap; }
.op-path { font-size: .875rem !important; background: none !important; padding: 0 !important; color: var(--text); overflow-wrap: anywhere; }
.verb { flex: none; display: inline-block; min-width: 3.75rem; text-align: center; padding: .125rem .375rem; border-radius: .25rem; font: 600 .6875rem/1.5 var(--mono); letter-spacing: .03em; border: 1px solid currentColor; }
.verb-get { color: var(--ok); background: var(--ok-bg); }
.verb-post { color: var(--wip); background: var(--wip-bg); }
.verb-put, .verb-patch { color: var(--text); background: var(--muted); }
.verb-delete { color: var(--link); background: var(--surface); }
.op-sum { margin: .375rem 0 0 !important; font-size: .9375rem; }
.op-notes { margin: .25rem 0 0 !important; font-size: .8125rem; color: var(--text-3) !important; }
/* The hub */
.dev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.dev-card { display: flex; flex-direction: column; gap: .75rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.dev-card h2 { font-size: 1.25rem; margin: 0; }
.dev-card > p { margin: 0; color: var(--text-2); }
.dev-card ul { list-style: none; margin: auto 0 0; padding: 0; border-top: 1px solid var(--border); }
.dev-card li { border-bottom: 1px solid var(--border); }
.dev-card li:last-child { border-bottom: 0; }
.dev-card li a { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .625rem 0; color: var(--text); text-decoration: none; font-weight: 500; }
.dev-card li a:hover { color: var(--link); }
.dev-card li a .badge { font-weight: 500; }
.dev-try { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.dev-try h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); margin: .5rem 0 .75rem; }
.dev-try p { color: var(--text-2); }
@media (max-width: 71.99rem) { .docs { grid-template-columns: 13rem minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 63.99rem) { .dev-grid { grid-template-columns: minmax(0, 1fr); } .dev-try { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 47.99rem) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-top: 1.25rem; }
  .docs > .docs-nav { display: none; }
  .docs-menu { display: block; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .docs-menu summary { padding: .75rem 1rem; font-weight: 600; cursor: pointer; }
  .docs-menu .docs-nav { position: static; max-height: none; padding: 0 .75rem .75rem; }
}
