/*
 * Project Octoryn Cortex — cortex.octopusresearch.org
 * ---------------------------------------------------
 * This is an Octopus Research Institute project site, so it uses the Institute
 * identity: cool graphite/slate ink with a single restrained azure "signal"
 * accent on cool neutral paper, Source Serif 4 display over Inter text, tight
 * technical radii, and the research grid/node motifs.
 *
 * It deliberately does NOT use the Octopus Foundation's warm identity (warm
 * off-white canvas, deep teal, coral) that auslan.octopuscommunity.org carries.
 * Those are different arms of the family and are meant to read differently.
 *
 * Tokens mirror octopus-research-institue/src/app/globals.css. When that file
 * changes, this one follows.
 */

/* Latin subsets lifted from the Institute's own next/font build, so both sites
   render from byte-identical files. Inter and Source Serif 4 are variable fonts;
   IBM Plex Mono ships static weights, so 400 and 500 are separate faces — with
   synthesis disabled below, nothing here may ask for a mono weight that is not
   one of those two. CJK is not in these subsets and falls through to the system
   faces named in the stacks. */
@font-face{font-family:"Inter Web";src:url(/assets/fonts/inter-latin.woff2) format("woff2");
  font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Source Serif Web";src:url(/assets/fonts/source-serif-4-latin.woff2) format("woff2");
  font-weight:200 900;font-style:normal;font-display:swap}
@font-face{font-family:"Plex Mono Web";src:url(/assets/fonts/ibm-plex-mono-400-latin.woff2) format("woff2");
  font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Plex Mono Web";src:url(/assets/fonts/ibm-plex-mono-500-latin.woff2) format("woff2");
  font-weight:500;font-style:normal;font-display:swap}

:root{
  /* --- Type ------------------------------------------------------------- */
  --font-sans:"Inter Web",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,
    "Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  --font-display:"Source Serif Web",Georgia,Cambria,"Songti SC","Noto Serif SC",serif;
  --font-mono:"Plex Mono Web",ui-monospace,"SF Mono","JetBrains Mono","Fira Code",
    "Cascadia Code","Noto Sans Mono CJK SC",monospace;

  --text-xs:.75rem; --text-sm:.875rem; --text-base:1rem; --text-lg:1.125rem;
  --text-xl:1.25rem; --text-2xl:1.5rem;
  --text-3xl:clamp(1.7rem,1.4rem + 1.5vw,2.15rem);
  --text-4xl:clamp(2rem,1.55rem + 2.2vw,2.85rem);
  --text-5xl:clamp(2.45rem,1.8rem + 3.2vw,3.6rem);
  --text-6xl:clamp(2.8rem,1.9rem + 4.6vw,4.4rem);

  /* --- Radius (tighter, more technical than the Foundation) ------------- */
  --radius-xs:.1875rem; --radius-sm:.3125rem; --radius-md:.5rem;
  --radius-lg:.75rem; --radius-xl:1.125rem; --radius-2xl:1.5rem; --radius-full:9999px;

  /* --- Shadows (cool, restrained) --------------------------------------- */
  --shadow-xs:0 1px 2px rgba(16,20,27,.06);
  --shadow-sm:0 1px 3px rgba(16,20,27,.08),0 1px 2px rgba(16,20,27,.05);
  --shadow-md:0 4px 12px rgba(16,20,27,.08),0 2px 4px rgba(16,20,27,.05);

  /* --- Layout ------------------------------------------------------------ */
  --spacing-section:clamp(3.5rem,2.5rem + 4vw,6rem);
  --container:72rem;
  --container-wide:80rem;
  --container-prose:46rem;

  /* --- Semantic tokens: light (default) ---------------------------------- */
  color-scheme:light;
  --surface:#f7f8fa; --surface-raised:#fff; --surface-muted:#eef1f4; --surface-inverse:#182130;
  --fg:#161b23; --fg-muted:#3e4553; --fg-subtle:#55606e; --fg-inverse:#f7f8fa;
  --border:#e0e4ea; --border-strong:#c8cfd8;
  --brand:#2f4160; --brand-strong:#26344d; --brand-soft:#e4e9f1; --on-brand:#fff;
  --accent:#0f6197; --accent-strong:#0e4d78; --accent-soft:#cbe6f6; --on-accent:#fff;
  --ring:#167ab4;
}

@media (prefers-color-scheme:dark){
  :root{
    color-scheme:dark;
    --surface:#10141b; --surface-raised:#1b2029; --surface-muted:#1f2530; --surface-inverse:#e0e4ea;
    --fg:#eef1f4; --fg-muted:#c8cfd8; --fg-subtle:#97a1b0; --fg-inverse:#161b23;
    --border:#2f3745; --border-strong:#3e4553;
    --brand:#8497b8; --brand-strong:#b3c0d7; --brand-soft:#26344d; --on-brand:#0d131d;
    --accent:#5aafde; --accent-strong:#97cdec; --accent-soft:#103f61; --on-accent:#0a2233;
    --ring:#5aafde;
  }
}
:root[data-theme=light]{
  color-scheme:light;
  --surface:#f7f8fa; --surface-raised:#fff; --surface-muted:#eef1f4; --surface-inverse:#182130;
  --fg:#161b23; --fg-muted:#3e4553; --fg-subtle:#55606e; --fg-inverse:#f7f8fa;
  --border:#e0e4ea; --border-strong:#c8cfd8;
  --brand:#2f4160; --brand-strong:#26344d; --brand-soft:#e4e9f1; --on-brand:#fff;
  --accent:#0f6197; --accent-strong:#0e4d78; --accent-soft:#cbe6f6; --on-accent:#fff;
  --ring:#167ab4;
}
:root[data-theme=dark]{
  color-scheme:dark;
  --surface:#10141b; --surface-raised:#1b2029; --surface-muted:#1f2530; --surface-inverse:#e0e4ea;
  --fg:#eef1f4; --fg-muted:#c8cfd8; --fg-subtle:#97a1b0; --fg-inverse:#161b23;
  --border:#2f3745; --border-strong:#3e4553;
  --brand:#8497b8; --brand-strong:#b3c0d7; --brand-soft:#26344d; --on-brand:#0d131d;
  --accent:#5aafde; --accent-strong:#97cdec; --accent-soft:#103f61; --on-accent:#0a2233;
  --ring:#5aafde;
}

/* ------------------------------------------------------------------- base */

*,*::before,*::after{box-sizing:border-box;border-color:var(--border)}
html{background:var(--surface);scroll-behavior:smooth;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--surface);color:var(--fg);font-family:var(--font-sans);
  font-size:var(--text-base);line-height:1.6;font-synthesis-weight:none;
  /* matches the Institute: never fake a weight that was not shipped */
  text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale}
h1,h2,h3,h4{font-family:var(--font-display);font-weight:560;line-height:1.15;
  letter-spacing:-.011em;text-wrap:balance;margin:0}
p{margin:0;text-wrap:pretty}
a{color:var(--accent);text-underline-offset:2px}
:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-radius:var(--radius-xs)}
::selection{background-color:var(--accent-soft);color:var(--accent-strong)}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;
    transition-duration:.001ms!important;scroll-behavior:auto!important}
}

.container{margin-inline:auto;width:100%;max-width:var(--container);padding-inline:1.25rem}
.container-wide{max-width:var(--container-wide)}
@media (min-width:640px){.container{padding-inline:1.5rem}}
@media (min-width:1024px){.container{padding-inline:2rem}}
.prose{max-width:var(--container-prose)}

.skip{position:absolute;left:-9999px;top:0;z-index:100}
.skip:focus{left:1.25rem;top:.75rem;padding:.625rem 1.25rem;border-radius:var(--radius-md);
  background:var(--brand);color:var(--on-brand);font-weight:600;text-decoration:none}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap;border:0}

/* --------------------------------------------------------- branded motifs */

.bg-grid{background-image:
  linear-gradient(to right,color-mix(in srgb,var(--border) 55%,transparent) 1px,transparent 1px),
  linear-gradient(to bottom,color-mix(in srgb,var(--border) 55%,transparent) 1px,transparent 1px);
  background-size:44px 44px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 0%,#000 30%,transparent 75%)}
.bg-signal{background-image:
  radial-gradient(circle at 12% 18%,color-mix(in srgb,var(--accent) 9%,transparent) 0,transparent 40%),
  radial-gradient(circle at 88% 12%,color-mix(in srgb,var(--brand) 8%,transparent) 0,transparent 42%)}

/* -------------------------------------------------------------- primitives */

.eyebrow{color:var(--accent);font-size:var(--text-sm);font-weight:600;
  letter-spacing:.025em;text-transform:uppercase}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  border-radius:var(--radius-md);border:1px solid transparent;font-weight:600;
  font-size:var(--text-sm);padding:.625rem 1.25rem;text-decoration:none;
  transition:background-color .15s,border-color .15s,color .15s}
@media (min-width:640px){.btn{font-size:var(--text-base)}}
.btn-primary{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
.btn-primary:hover{background:var(--brand-strong);border-color:var(--brand-strong)}
.btn-secondary{background:var(--surface-raised);color:var(--fg);border-color:var(--border-strong)}
.btn-secondary:hover{border-color:var(--accent);color:var(--accent)}
.btn-row{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;margin-top:2rem}

.badge{display:inline-flex;align-items:center;gap:.375rem;border-radius:var(--radius-full);
  padding:.25rem .625rem;font-size:var(--text-xs);font-weight:600;line-height:1.4}
.badge-neutral{background:var(--surface-muted);color:var(--fg-muted)}
.badge-accent{background:var(--accent-soft);color:var(--accent-strong)}
.badge-brand{background:var(--brand-soft);color:var(--brand-strong)}
.badge .dot{width:.375rem;height:.375rem;border-radius:50%;background:currentColor;flex:none}

.card{display:flex;flex-direction:column;gap:.5rem;border:1px solid var(--border);
  border-radius:var(--radius-lg);background:var(--surface-raised);padding:1.25rem}
.card h3{font-size:var(--text-lg);font-family:var(--font-sans);font-weight:600;letter-spacing:-.005em}
.card p{color:var(--fg-muted);font-size:var(--text-sm);line-height:1.65}
.grid-cards{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(16.5rem,1fr))}

/* ------------------------------------------------------------------ header */

header.site{position:sticky;top:0;z-index:50;border-bottom:1px solid var(--border);
  background:color-mix(in srgb,var(--surface) 85%,transparent);backdrop-filter:blur(12px)}
header.site .bar{margin-inline:auto;display:flex;height:4.5rem;max-width:var(--container-wide);
  align-items:center;justify-content:space-between;gap:1rem;padding-inline:1.25rem}
@media (min-width:640px){header.site .bar{padding-inline:1.5rem}}
@media (min-width:1024px){header.site .bar{padding-inline:2rem}}
.logo{display:inline-flex;align-items:center;gap:.625rem;text-decoration:none;flex:none}
.logo img{width:2rem;height:2rem;flex:none}
.logo .wordmark{font-family:var(--font-display);color:var(--fg);font-size:1.05rem;
  line-height:1;font-weight:600;letter-spacing:-.01em}
.logo .wordmark em{color:var(--fg-muted);font-weight:500;font-style:normal}
.head-right{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;justify-content:flex-end}
.crumb{color:var(--fg-subtle);font-size:var(--text-sm);white-space:nowrap}
.langs{display:flex;align-items:center;gap:.375rem;font-size:var(--text-sm)}
.langs a{color:var(--fg-muted);text-decoration:none;padding:.25rem .5rem;border-radius:var(--radius-sm)}
.langs a:hover{background:var(--surface-muted);color:var(--fg)}
.langs a[aria-current=true]{background:var(--brand-soft);color:var(--brand-strong);font-weight:600}
.langs .sep{color:var(--border-strong)}
@media (max-width:720px){
  header.site .bar{height:auto;flex-wrap:wrap;padding-block:.75rem}
  .crumb{display:none}
}

/* ---------------------------------------------------------------- sections */

section.band{padding-block:var(--spacing-section)}
section.muted{background:var(--surface-muted)}
section.bordered{border-top:1px solid var(--border)}

.hero{position:relative;overflow:hidden;border-bottom:1px solid var(--border)}
.hero .motif{position:absolute;inset:0;pointer-events:none}
.hero .motif .grid{position:absolute;inset:0;opacity:.4}
.hero .inner{position:relative;padding-block:5rem}
@media (min-width:640px){.hero .inner{padding-block:7rem}}
.hero h1{margin-top:1rem;font-size:var(--text-4xl);max-width:18ch}
@media (min-width:640px){.hero h1{font-size:var(--text-5xl)}}
@media (min-width:1024px){.hero h1{font-size:var(--text-6xl)}}
.hero .lede{margin-top:1.5rem;max-width:44rem;color:var(--fg-muted);
  font-size:var(--text-lg);line-height:1.7}
@media (min-width:640px){.hero .lede{font-size:var(--text-xl)}}

.section-head{display:flex;flex-direction:column;gap:.75rem;margin-bottom:2.75rem}
.section-head h2{font-size:var(--text-3xl);max-width:22ch}
.section-head p{color:var(--fg-muted);max-width:42rem;font-size:var(--text-lg);line-height:1.7}

.subhead{margin-top:3.5rem;margin-bottom:1.5rem;display:flex;flex-direction:column;gap:.5rem}
.subhead h3{font-family:var(--font-display);font-size:var(--text-2xl);font-weight:560}
.subhead p{color:var(--fg-muted);max-width:42rem;font-size:var(--text-sm)}

/* ------------------------------------------------------------- status card */

.standing{margin-top:2.5rem;border:1px solid var(--border);border-radius:var(--radius-xl);
  background:var(--surface-raised);padding:1.75rem}
@media (min-width:640px){.standing{padding:2.25rem}}
.standing h2{font-size:var(--text-2xl);margin-top:.75rem}
.standing > p{margin-top:.75rem;color:var(--fg-muted);max-width:52rem;font-size:var(--text-sm);line-height:1.7}
.metrics{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(11.5rem,1fr));
  margin-top:1.75rem;padding-top:1.5rem;border-top:1px solid var(--border)}
.metric .value{font-family:var(--font-display);font-size:2.15rem;font-weight:560;line-height:1;
  letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--brand-strong)}
.metric .value.nil{color:var(--accent)}
.metric .label{margin-top:.5rem;color:var(--fg-subtle);font-size:var(--text-sm);line-height:1.5}

/* -------------------------------------------------------------- numbered */

.numbered{display:grid;gap:2rem 2.5rem;grid-template-columns:repeat(auto-fit,minmax(16.5rem,1fr))}
.numbered .index{display:grid;place-items:center;width:2rem;height:2rem;
  border-radius:var(--radius-sm);background:var(--accent-soft);color:var(--accent-strong);
  font-size:var(--text-sm);font-weight:600;font-variant-numeric:tabular-nums;margin-bottom:.875rem}
.numbered h3{font-family:var(--font-sans);font-size:var(--text-lg);font-weight:600;margin-bottom:.5rem}
.numbered p{color:var(--fg-muted);font-size:var(--text-sm);line-height:1.65}

/* ---------------------------------------------------------------- layers */

.layers{display:grid;gap:.75rem}
.layer{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1.25rem;align-items:start;
  border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-raised);
  padding:1.5rem}
.layer .tag{font-family:var(--font-mono);font-size:var(--text-xs);font-weight:500;
  letter-spacing:.02em;color:var(--brand-strong);background:var(--brand-soft);
  padding:.3125rem .625rem;border-radius:var(--radius-sm);white-space:nowrap}
.layer h3{font-family:var(--font-sans);font-size:var(--text-lg);font-weight:600;margin-bottom:.375rem}
.layer p{color:var(--fg-muted);font-size:var(--text-sm);line-height:1.65}
.note{margin-top:1.25rem;color:var(--fg-subtle);font-size:var(--text-sm);
  max-width:46rem;line-height:1.65}
@media (max-width:640px){.layer{grid-template-columns:1fr;gap:.875rem}.layer .tag{justify-self:start}}

/* ------------------------------------------------------------------ table */

.table-scroll{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface-raised)}
table.arms{width:100%;border-collapse:collapse;font-size:var(--text-sm)}
table.arms th,table.arms td{padding:.75rem 1.125rem;text-align:left;
  border-bottom:1px solid var(--border);vertical-align:top}
table.arms thead th{background:var(--surface-muted);color:var(--fg);font-size:var(--text-xs);
  font-weight:600;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
table.arms tbody tr:last-child td{border-bottom:none}
table.arms td:first-child{font-family:var(--font-mono);color:var(--fg-muted);white-space:nowrap;
  font-variant-numeric:tabular-nums}
table.arms td{color:var(--fg-muted)}
table.arms tr[data-highlight=true] td{background:var(--brand-soft);color:var(--fg);font-weight:500}
table.arms tr[data-highlight=true] td:first-child{color:var(--brand-strong);font-weight:500}
.table-note{margin-top:.875rem;color:var(--fg-subtle);font-size:var(--text-sm);line-height:1.6}

/* ---------------------------------------------------------------- callout */

.callout{display:grid;gap:.625rem;margin-top:2.25rem;padding:1.5rem 1.75rem;
  border:1px solid var(--accent-soft);border-left:3px solid var(--accent);
  border-radius:var(--radius-md);background:color-mix(in srgb,var(--accent-soft) 40%,transparent)}
.callout h3{font-family:var(--font-sans);font-size:var(--text-lg);font-weight:600;color:var(--accent-strong)}
.callout p{color:var(--fg-muted);font-size:var(--text-sm);line-height:1.7}

.position-prose{display:grid;gap:1.125rem;max-width:var(--container-prose)}
.position-prose p{color:var(--fg-muted);line-height:1.75}

/* ----------------------------------------------------------------- footer */

footer.site{border-top:1px solid var(--border);background:var(--surface-muted)}
footer.site .inner{margin-inline:auto;max-width:var(--container-wide);
  padding:3.5rem 1.25rem}
@media (min-width:640px){footer.site .inner{padding-inline:1.5rem}}
@media (min-width:1024px){footer.site .inner{padding-inline:2rem}}
.foot-grid{display:grid;gap:2.5rem}
@media (min-width:1024px){.foot-grid{grid-template-columns:1.6fr 1fr 1fr 1fr}}
.foot-about{max-width:20rem}
.foot-about p{margin-top:1rem;color:var(--fg-muted);font-size:var(--text-sm);line-height:1.65}
.foot-grid h2{font-family:var(--font-sans);font-size:var(--text-sm);font-weight:600;color:var(--fg)}
.foot-grid ul{list-style:none;margin:1rem 0 0;padding:0;display:flex;flex-direction:column;gap:.625rem}
.foot-grid a{color:var(--fg-muted);font-size:var(--text-sm);text-decoration:none}
.foot-grid a:hover{color:var(--accent)}
.foot-eco{margin-top:3rem;padding-top:2rem;border-top:1px solid var(--border)}
.foot-eco h2{font-family:var(--font-sans);font-size:var(--text-sm);font-weight:600;color:var(--fg)}
.foot-eco p{margin-top:.5rem;color:var(--fg-muted);max-width:48rem;font-size:var(--text-sm);line-height:1.65}
.foot-base{margin-top:2rem;padding-top:1.5rem;border-top:1px solid var(--border);
  color:var(--fg-subtle);font-size:var(--text-xs);line-height:1.7;max-width:70rem}

/* ------------------------------------------------------------- header nav */

.subnav{display:flex;align-items:center;gap:.125rem;flex-wrap:wrap}
.subnav a{padding:.375rem .625rem;border-radius:var(--radius-sm);color:var(--fg-muted);
  font-size:var(--text-sm);font-weight:500;text-decoration:none;white-space:nowrap;
  transition:background-color .15s,color .15s}
.subnav a:hover{background:var(--surface-muted);color:var(--fg)}
.subnav a[aria-current=page]{background:var(--brand-soft);color:var(--brand-strong);font-weight:600}
@media (max-width:900px){
  header.site .bar{height:auto;flex-wrap:wrap;padding-block:.75rem;row-gap:.5rem}
  .subnav{order:3;width:100%;overflow-x:auto;scrollbar-width:none}
  .subnav::-webkit-scrollbar{display:none}
}

/* ---------------------------------------------------------- status strip */

.statusbar{border-bottom:1px solid var(--border);background:var(--surface-muted)}
.statusbar .inner{margin-inline:auto;max-width:var(--container-wide);
  padding:.625rem 1.25rem;display:flex;gap:.5rem 1.25rem;flex-wrap:wrap;align-items:baseline;
  color:var(--fg-subtle);font-size:var(--text-xs);line-height:1.6}
@media (min-width:640px){.statusbar .inner{padding-inline:1.5rem}}
@media (min-width:1024px){.statusbar .inner{padding-inline:2rem}}
.statusbar strong{color:var(--fg-muted);font-weight:600}

/* -------------------------------------------------------------- page head */

.page-head{border-bottom:1px solid var(--border);padding-block:3.5rem 3rem}
.breadcrumb{color:var(--fg-subtle);font-size:var(--text-sm);margin-bottom:1rem}
.breadcrumb a{color:var(--fg-muted);text-decoration:none}
.breadcrumb a:hover{color:var(--accent)}
.breadcrumb .sep{padding-inline:.375rem;color:var(--border-strong)}
.page-head h1{font-size:var(--text-4xl);max-width:20ch;margin-top:.75rem}
.page-head .lede{margin-top:1.25rem;max-width:44rem;color:var(--fg-muted);
  font-size:var(--text-lg);line-height:1.7}

.toc{margin-top:2rem;display:flex;flex-wrap:wrap;gap:.5rem}
.toc a{padding:.375rem .75rem;border:1px solid var(--border-strong);border-radius:var(--radius-full);
  color:var(--fg-muted);font-size:var(--text-sm);text-decoration:none}
.toc a:hover{border-color:var(--accent);color:var(--accent)}

/* ---------------------------------------------------- spec / key-value list */

.spec{display:grid;gap:0;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface-raised);overflow:hidden;margin:0}
.spec > div{display:grid;grid-template-columns:minmax(10rem,16rem) minmax(0,1fr);
  gap:1.25rem;padding:1rem 1.25rem;border-bottom:1px solid var(--border)}
.spec > div:last-child{border-bottom:none}
.spec dt{color:var(--fg);font-size:var(--text-sm);font-weight:600;margin:0}
.spec dd{color:var(--fg-muted);font-size:var(--text-sm);line-height:1.65;margin:0}
.spec code,code.tok{font-family:var(--font-mono);font-size:.9em;background:var(--surface-muted);
  padding:.1em .35em;border-radius:var(--radius-xs);color:var(--fg)}
@media (max-width:640px){.spec > div{grid-template-columns:1fr;gap:.375rem}}

/* ------------------------------------------------------------- checklists */

.checklist{list-style:none;margin:0;padding:0;display:grid;gap:.625rem}
.checklist li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem;
  align-items:start;font-size:var(--text-sm);color:var(--fg-muted);line-height:1.65}
.checklist .mark{display:grid;place-items:center;width:1.25rem;height:1.25rem;
  border-radius:var(--radius-xs);font-size:.7rem;font-weight:700;flex:none;margin-top:.15rem}
.checklist .mark.done{background:var(--accent-soft);color:var(--accent-strong)}
.checklist .mark.open{background:var(--surface-muted);color:var(--fg-subtle);
  border:1px solid var(--border-strong)}

/* ------------------------------------------------------------- milestones */

.milestones{display:grid;gap:.75rem;counter-reset:none}
.milestone{border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface-raised);padding:1.375rem 1.5rem}
.milestone .top{display:flex;flex-wrap:wrap;gap:.75rem;align-items:baseline;
  justify-content:space-between;margin-bottom:.5rem}
.milestone h3{font-family:var(--font-sans);font-size:var(--text-lg);font-weight:600}
.milestone .cap{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--fg-subtle);
  font-variant-numeric:tabular-nums;white-space:nowrap}
.milestone p{color:var(--fg-muted);font-size:var(--text-sm);line-height:1.65}
.milestone .gate{margin-top:.75rem;padding-top:.75rem;border-top:1px solid var(--border);
  color:var(--fg-subtle);font-size:var(--text-sm);line-height:1.6}
.milestone .gate b{color:var(--fg-muted);font-weight:600}

/* --------------------------------------------------------- ownership split */

.owns{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(19rem,1fr))}
.owns section{border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface-raised);padding:1.5rem}
.owns h3{font-family:var(--font-sans);font-size:var(--text-lg);font-weight:600;margin-bottom:.875rem}
.owns ul{list-style:none;margin:0;padding:0;display:grid;gap:.5rem}
.owns li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.625rem;
  color:var(--fg-muted);font-size:var(--text-sm);line-height:1.6}
.owns li::before{content:"";width:.375rem;height:.375rem;border-radius:50%;margin-top:.55rem}
.owns .in li::before{background:var(--accent)}
.owns .out li::before{background:var(--border-strong)}
.owns .out h3{color:var(--fg-muted)}

/* ------------------------------------------------------------ prose blocks */

.prose-block{display:grid;gap:1rem;max-width:var(--container-prose)}
.prose-block p{color:var(--fg-muted);line-height:1.75}
.prose-block ul{margin:0;padding-left:1.25rem;display:grid;gap:.5rem;
  color:var(--fg-muted);font-size:var(--text-sm);line-height:1.65}

.next-links{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(16.5rem,1fr));
  margin-top:1rem}
.next-links a{display:grid;gap:.375rem;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface-raised);padding:1.25rem;text-decoration:none;transition:border-color .15s}
.next-links a:hover{border-color:var(--accent)}
.next-links strong{color:var(--fg);font-size:var(--text-base);font-weight:600}
.next-links span{color:var(--fg-muted);font-size:var(--text-sm);line-height:1.6}

/* -------------------------------------------------------- language hub at / */

.hub{min-height:100vh;display:grid;place-items:center;padding:3rem 1.5rem;text-align:center}
.hub h1{font-size:var(--text-3xl);margin-top:1rem}
.hub p{margin-top:.75rem;color:var(--fg-muted)}
.hub .btn-row{justify-content:center}

/* --------------------------------------------------- Chinese typography */

:lang(zh) body,body:lang(zh){line-height:1.85}
:lang(zh) h1,:lang(zh) h2,:lang(zh) h3,:lang(zh) h4{letter-spacing:0}
:lang(zh) .hero h1{max-width:20ch}
:lang(zh) .section-head h2{max-width:24ch}
:lang(zh) .eyebrow{letter-spacing:.08em}
:lang(zh) .card p,:lang(zh) .layer p,:lang(zh) .numbered p{line-height:1.8}
