/* Raftel site. One stylesheet, no build step.
   Design rules: the "Taste" rule set (see the founder's brief), with the purple-dusk
   palette, the sunset and the theme toggle as deliberate brand exceptions.
   Tokens first; light is the default, dark follows the OS unless the visitor picks a theme.

   Radius scale (sharp): 4 / 6 / 8 px.  Spacing: 4 8 12 16 24 32 48 64 96 128.
   Buttons: one filled primary (the nav's "Request a free scan"), every other button is tonal. */

:root {
  /* neutrals */
  --bg: #f5f3f2;
  --bg-2: #ece9e8;
  --surface: #ffffff;
  --ink: #19171b;
  --ink-2: #2f2c33;          /* reading text: 12.9:1 on bg */
  --muted: #5e5a63;          /* secondary text: 6.1:1 on bg, 5.6:1 on bg-2 */
  --line: #e0dcdf;
  --line-2: #ccc7cc;
  /* the one accent: primary button, focus ring, links */
  --accent: #5b2e8f;
  --accent-ink: #ffffff;
  --accent-soft: #efe8f8;
  /* verdicts */
  --pass: #12703f;
  --pass-soft: #def1e6;
  --warn: #8f5400;
  --warn-soft: #f9edd5;
  --fail: #bf2a1d;
  --fail-soft: #fae3df;
  /* terminal panels are always dark, so these are the same in both themes */
  --term-bg: #0e0c13;
  --term-bar: #15121b;
  --term-ink: #d5d1dc;
  --term-muted: #9a95a6;
  --term-line: #262230;
  --term-pass: #5bd394;
  --term-warn: #f1b54d;
  --term-fail: #ff7b6c;
  --term-accent: #c7a6ff;
  /* the sunset: only ever inside a sun. The same in both themes. */
  --sun-top: #8b4fd6;
  --sun-mid: #d2509b;
  --sun-low: #f6a46e;
  --sunset: linear-gradient(180deg, var(--sun-top) 0%, var(--sun-mid) 28%, var(--sun-low) 50%);
  /* the dusk ground of the brand bands (landing hero, footer); the favicon tile colour */
  --dusk: #17121f;

  /* type: desktop / phone sizes, fluid between 390 and 1024 px */
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-h1: clamp(38px, 17.1px + 5.363vw, 72px);
  --fs-h2: clamp(30px, 18.93px + 2.839vw, 48px);
  --fs-h3: clamp(24px, 21.54px + .631vw, 28px);
  --fs-lead: clamp(18px, 16.77px + .3155vw, 20px);
  --measure: 27.5em;         /* about 62 characters of Hanken Grotesk */

  /* layout */
  --wrap: 1280px;
  --gutter: 24px;
  --col-gap: 24px;
  --nav-h: 56px;
  --head-gap: 32px;          /* heading block to content */

  /* radius: sharp scale */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* motion */
  --t-in: 150ms;
  --t-out: 120ms;
  --t-press: 90ms;
  --t-panel: 200ms;
  --ease-ui: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);

  color-scheme: light;
}
@media (min-width: 640px) { :root { --gutter: 48px; --nav-h: 72px; --head-gap: 48px; } }
@media (min-width: 1024px) { :root { --col-gap: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 80px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0d14;
    --bg-2: #16131d;
    --surface: #1b1723;
    --ink: #f1eef5;
    --ink-2: #d8d3df;
    --muted: #a59fb0;
    --line: #2a2533;
    --line-2: #3a3445;
    --accent: #c7a6ff;
    --accent-ink: #120f17;
    --accent-soft: #261c3d;
    --pass: #56cf8c;
    --pass-soft: #0f2a1b;
    --warn: #efb24b;
    --warn-soft: #2d210b;
    --fail: #ff7a6b;
    --fail-soft: #331512;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0d14;
  --bg-2: #16131d;
  --surface: #1b1723;
  --ink: #f1eef5;
  --ink-2: #d8d3df;
  --muted: #a59fb0;
  --line: #2a2533;
  --line-2: #3a3445;
  --accent: #c7a6ff;
  --accent-ink: #120f17;
  --accent-soft: #261c3d;
  --pass: #56cf8c;
  --pass-soft: #0f2a1b;
  --warn: #efb24b;
  --warn-soft: #2d210b;
  --fail: #ff7a6b;
  --fail-soft: #331512;
  color-scheme: dark;
}

/* Brand band: the dusk ground in both themes (landing hero, footer). */
.dusk {
  --bg: var(--dusk);
  --bg-2: #1d1727;
  --surface: #221c2d;
  --ink: #f1eef5;
  --ink-2: #dcd7e3;
  --muted: #a9a3b4;          /* 7.2:1 on dusk */
  --line: #2f2839;
  --line-2: #4a4256;
  --accent: #c7a6ff;
  --accent-ink: #120f17;
  --accent-soft: #2a2040;
  /* verdicts: the dark-theme set, so form errors and states read on dusk in both themes */
  --pass: #56cf8c;
  --pass-soft: #0f2a1b;
  --warn: #efb24b;
  --warn-soft: #2d210b;
  --fail: #ff7a6b;
  --fail-soft: #331512;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/26px var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--mono); font-size: max(13px, .875em); }
pre code { font-size: inherit; }
:not(pre) > code {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border-radius: var(--r-sm);
  padding: .1em .35em;
  color: var(--ink);
  white-space: nowrap;
}
::selection { background: var(--accent); color: var(--accent-ink); }
/* focus: a 2 px ring in the accent, never animated */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: var(--gutter); top: 8px; z-index: 100;
  transform: translateY(-200%);
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r-md);
  font-weight: 500; text-decoration: none;
}
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.04em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); line-height: 1.22; letter-spacing: -0.015em; }
.title { font-size: var(--fs-lead); line-height: 1.4; letter-spacing: -0.005em; font-weight: 500; color: var(--ink); }
p { margin: 0; max-width: var(--measure); color: var(--ink-2); text-wrap: pretty; }
.lead { font-size: var(--fs-lead); line-height: 1.5; max-width: var(--measure); color: var(--ink-2); }
.small { font-size: 14px; line-height: 22px; }
.label { display: block; font: 500 13px/20px var(--sans); color: var(--muted); }
strong, b { font-weight: 500; color: var(--ink); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nobr { white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.stack > .lead + p { margin-top: 24px; }

/* links: prose links are underlined; UI links draw their underline left to right */
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color var(--t-out) var(--ease-ui); }
.draw { position: relative; color: inherit; text-decoration: none; }
.draw::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform var(--t-out) var(--ease-ui);
}
.draw:focus-visible::after, .draw[aria-current="page"]::after { transform: scaleX(1); }
.arrow { display: inline-block; transition: transform var(--t-out) var(--ease-ui); }
@media (hover: hover) and (pointer: fine) {
  :where(a):hover { color: color-mix(in srgb, var(--accent), var(--ink) 14%); transition-duration: var(--t-in); }
  .draw:hover::after { transform: scaleX(1); transition-duration: var(--t-in); }
  a:hover .arrow, button:hover .arrow { transform: translateX(3px); transition-duration: var(--t-in); }
}
a:focus-visible .arrow, button:focus-visible .arrow { transform: translateX(3px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 24px; border: 0; border-radius: var(--r-md);
  font: 500 16px/1 var(--sans); letter-spacing: -0.005em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform var(--t-out) var(--ease-ui), background-color var(--t-out) var(--ease-ui), color var(--t-out) var(--ease-ui);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
/* tonal: 7% ink over whatever ground it sits on */
.btn-tonal { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); transition-duration: var(--t-in); }
  .btn-primary:hover { background: color-mix(in srgb, var(--accent), var(--ink) 14%); color: var(--accent-ink); }
  /* 7% ink stepped 14% toward ink = 20% ink */
  .btn-tonal:hover { background: color-mix(in srgb, var(--ink) 20%, transparent); color: var(--ink); }
}
.btn:focus-visible { transform: translateY(-1px); }
.btn-primary:focus-visible { background: color-mix(in srgb, var(--accent), var(--ink) 14%); }
.btn-tonal:focus-visible { background: color-mix(in srgb, var(--ink) 20%, transparent); }
.btn:active { transform: translateY(1px) scale(.985); transition-duration: var(--t-press); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 639px) {
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
}

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none;
  border: 0; border-radius: var(--r-md); cursor: pointer;
  background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink);
  transition: transform var(--t-out) var(--ease-ui), background-color var(--t-out) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: color-mix(in srgb, var(--ink) 20%, transparent); transform: translateY(-1px); transition-duration: var(--t-in); }
}
.icon-btn:focus-visible { background: color-mix(in srgb, var(--ink) 20%, transparent); }
.icon-btn:active { transform: translateY(1px) scale(.985); transition-duration: var(--t-press); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

/* ---------- nav: fixed, full width, opaque, one hairline ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; flex: none; }
/* wordmark: RAFTEL in ink; the sun (.rf-sun) keeps its inline sunset gradient */
.brand svg { height: 20px; width: auto; }
.brand .rf-ink { fill: var(--ink); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font: 500 15px/1 var(--sans); color: var(--ink-2); white-space: nowrap; }
.nav-links a.draw::after { left: 10px; right: 10px; bottom: 11px; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; }
.mobile-menu { display: none; }
.menu-btn .close { display: none; }
.menu-btn[aria-expanded="true"] .open { display: none; }
.menu-btn[aria-expanded="true"] .close { display: block; }

@media (max-width: 899px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  /* full-screen sheet under the nav */
  .mobile-menu {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 49;
    background: var(--bg);
    padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--t-panel) var(--ease-ui), transform var(--t-panel) var(--ease-ui), visibility 0s linear var(--t-panel);
  }
  .mobile-menu.open {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity var(--t-panel) var(--ease-ui), transform var(--t-panel) var(--ease-ui), visibility 0s;
  }
  .mobile-menu .sheet-links a {
    display: flex; align-items: center; justify-content: space-between; min-height: 64px;
    font: 500 24px/1.2 var(--sans); letter-spacing: -0.015em; color: var(--ink); text-decoration: none;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu .sheet-links a[aria-current="page"] { color: var(--accent); }
  .mobile-menu .sheet-foot { margin-top: auto; padding-top: 32px; display: grid; gap: 16px; }
  .mobile-menu .sheet-foot .btn { width: 100%; }
  .mobile-menu .sheet-foot p { font-size: 14px; color: var(--muted); }
  html.menu-open { overflow: hidden; }
}
@media (min-width: 640px) { .mobile-menu .sheet-foot .btn { display: none; } }
@media (max-width: 639px) {
  .nav-cta { display: none; }
  .brand svg { height: 18px; }
}

/* ---------- sections ---------- */
.section { padding: 120px 0 72px; }
.section.alt { background: var(--bg-2); }
@media (max-width: 1023px) { .section { padding: 96px 0 48px; } }

/* 12-column grid; the split line is always the start of column 7 */
.split, .section-head, .hero-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start;
}
.split > .col-text { grid-column: 1 / span 5; }
.split > .col-visual { grid-column: 7 / -1; }
.section-head { align-items: baseline; margin-bottom: var(--head-gap); }
.section-head > h2 { grid-column: 1 / span 5; }
.section-head > .head-aside { grid-column: 7 / -1; }
@media (max-width: 1279px) {
  .split > .col-text { grid-column: 1 / span 6; padding-right: 16px; }
  .section-head > h2 { grid-column: 1 / span 6; }
}
@media (max-width: 1023px) {
  .split > .col-text, .split > .col-visual, .section-head > h2, .section-head > .head-aside { grid-column: 1 / -1; padding-right: 0; }
  .split > .col-visual { margin-top: var(--head-gap); }
  .section-head > .head-aside { margin-top: 24px; }
}
.col-text > h2 + .lead, .col-text > h2 + p { margin-top: 24px; }
.col-text > .lead + p { margin-top: 16px; }
.block { margin-top: var(--head-gap); }
.block-sm { margin-top: 32px; }
.block-xs { margin-top: 16px; }
.research { margin-top: 96px; }
.research .label { margin-bottom: 8px; }
@media (max-width: 639px) { .research { margin-top: 64px; } }

/* ---------- the sun: a disc cut flat by its horizon, gradient on the visible half only ---------- */
.horizon-sun {
  position: absolute; aspect-ratio: 1; border-radius: 50%;
  background: var(--sunset);
  clip-path: inset(0 0 50% 0);
  pointer-events: none;
}

/* ---------- landing hero: the dusk brand band with the arm on the horizon ---------- */
.hero { position: relative; overflow: clip; }
.hero-home { --horizon: 82%; min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; }
.hero-home .hero-grid { flex: 1 1 auto; row-gap: 0; align-items: stretch; }
.hero-copy { grid-column: 1 / span 6; display: grid; grid-template-rows: minmax(0, 82fr) minmax(0, 18fr); }
.hero-text { align-self: center; padding: 48px 0; }
.hero-text h1 { max-width: 12em; }
.hero-text .lead { margin-top: 24px; }
.hero-text .btn-row { margin-top: 32px; }
.hero-copy .facts { align-self: start; padding-top: 24px; }
.hero-home .arm-stage { grid-column: 7 / -1; align-self: stretch; }

.facts { display: flex; flex-wrap: wrap; gap: 8px 32px; font: 400 14px/22px var(--mono); color: var(--muted); }
.facts li { white-space: nowrap; }
.facts b { font-weight: 500; color: var(--ink); }

/* 3D arm slot (filled by arm-viewer.js). The stage is the reference frame:
   the arm stands on the horizon at --horizon of the stage height, centred. */
.arm-stage { --horizon: 82%; position: relative; min-height: 320px; transform-origin: 50% var(--horizon); }
.arm-stage::before { /* the horizon line, spanning the band (the hero clips it) */
  content: ""; position: absolute; z-index: 0; top: var(--horizon); left: -100vw; right: -100vw; height: 1px;
  background: var(--line-2); pointer-events: none;
}
.arm-sun {
  /* A box that ends on the horizon; the half-disc is contained in it, so the sun is at most
     80% of the stage width (and 560 px) and its radius at most 30% of the stage height.
     Same sunset stops as the logo, spanning exactly the visible half. */
  position: absolute; z-index: 1; left: 50%; top: calc(var(--horizon) - 30%);
  width: min(80%, 560px); height: 30%;
  transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%238b4fd6'/%3E%3Cstop offset='.55' stop-color='%23d2509b'/%3E%3Cstop offset='1' stop-color='%23f6a46e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 100A100 100 0 0 1 200 100Z' fill='url(%23s)'/%3E%3C/svg%3E") 50% 100% / contain no-repeat;
  pointer-events: none;
}
.arm-poster {
  position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: 50% var(--horizon);
  transition: opacity 600ms var(--ease-enter);
}
.arm-stage.is-live .arm-poster { opacity: 0; }
.arm-stage > canvas { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; display: block; }
img.is-missing { visibility: hidden; }

@media (min-width: 1024px) {
  .hero-home { height: calc(100svh - var(--nav-h)); min-height: 620px; }
}
@media (max-width: 1023px) {
  .hero-home .hero-grid { display: flex; flex-direction: column; }
  .hero-copy { display: block; }
  .hero-text { padding: 48px 0 0; }
  .hero-copy .facts { padding-top: 24px; }
  .hero-home .arm-stage { flex: 1 1 auto; margin-top: 16px; min-height: 300px; }
}
@media (max-width: 639px) {
  .hero-text { padding-top: 32px; }
  .hero-text .lead { margin-top: 16px; }
  .hero-text .btn-row { margin-top: 24px; }
  .hero-copy .facts { gap: 4px 24px; padding-top: 16px; }
  .hero-home .arm-stage { min-height: 280px; }
}

/* ---------- hero entrance: once, on load ---------- */
.line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line-inner { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-hero] :is([data-enter], .arm-stage) { opacity: 0; }
  .js [data-hero] [data-enter="lines"].is-split { opacity: 1; }
  /* if the script never runs, show everything after 2.5 s */
  .js [data-hero]:not(.is-entering):not(.is-entered) :is([data-enter], .arm-stage) { animation: enter-failsafe 1ms linear 2.5s forwards; }
  .js [data-hero].is-entering .line-inner { animation: enter-line 700ms var(--ease-enter) both; animation-delay: calc(var(--l, 0) * 80ms); }
  .js [data-hero].is-entering [data-enter="fade"] { animation: enter-fade 520ms var(--ease-enter) both; animation-delay: calc(var(--enter-base, 400ms) + var(--i, 0) * 60ms); }
  .js [data-hero].is-entering :is([data-enter="settle"], .arm-stage) { animation: enter-settle 1100ms var(--ease-enter) both; }
  .js [data-hero].is-entered :is([data-enter], .arm-stage) { opacity: 1; }
}
@keyframes enter-line { from { transform: translateY(110%); } to { transform: none; } }
@keyframes enter-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes enter-settle { from { opacity: 0; transform: scale(1.05); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes enter-failsafe { to { opacity: 1; } }

/* ---------- landing: ARM-01 ---------- */
.modules { border-top: 1px solid var(--line); counter-reset: mod; }
.modules li {
  display: grid; grid-template-columns: 40px minmax(0, 9em) minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 24px;
}
.modules li::before { counter-increment: mod; content: counter(mod, decimal-leading-zero); font: 400 13px/24px var(--mono); color: var(--muted); }
.modules .mod-name { font-weight: 500; color: var(--ink); white-space: nowrap; }
.modules .mod-what { color: var(--muted); font-size: 14px; }
@media (max-width: 639px) {
  .modules li { grid-template-columns: 32px minmax(0, 1fr); row-gap: 0; }
  .modules .mod-what { grid-column: 2; }
}
.figure-box {
  position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden;
  background: color-mix(in srgb, var(--ink) 4%, var(--bg));
}
.figure-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* rows: specs, facts, rules */
.rows { border-top: 1px solid var(--line); }
.rows > li, .rows > div { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows .k { color: var(--muted); font-size: 14px; }
.rows.rows-code > li { grid-template-columns: 40px minmax(0, 1fr); }
.rows .v { color: var(--ink); }
@media (max-width: 479px) { .rows > li, .rows > div { grid-template-columns: minmax(0, 1fr); } }

/* stacked rules: the first title top-aligns with the h2 beside it */
.rules > li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.rules > li:first-child { padding-top: 0; }
.rules > li:last-child { border-bottom: 0; padding-bottom: 0; }
.rules .title + p { margin-top: 8px; }

/* ---------- instrument: the scan (the "moment") ---------- */
.instrument {
  margin: 0; position: relative; z-index: 1;
  background: var(--term-bg); color: var(--term-ink);
  border: 1px solid var(--term-line); border-radius: var(--r-lg);
  overflow: hidden;
  font: 400 13px/18px var(--mono);
  container: inst / inline-size;
}
.inst-bar {
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  padding: 12px 20px; background: var(--term-bar); border-bottom: 1px solid var(--term-line);
}
.inst-cmd { color: var(--term-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 240px; }
.inst-cmd .ps { color: var(--term-accent); margin-right: 8px; }
.inst-cmd .fl { color: var(--term-muted); }
.inst-info { color: var(--term-muted); display: flex; gap: 16px; flex-wrap: wrap; }
.inst-info b { color: var(--term-ink); font-weight: 500; }
.inst-body { position: relative; padding: 4px 20px 8px; }
.inst-head, .lane { display: grid; grid-template-columns: 76px minmax(0, 1fr) 124px; align-items: center; gap: 16px; }
.inst-head { color: var(--term-muted); padding: 8px 0; border-bottom: 1px dashed var(--term-line); }
.inst-head .axis { display: flex; justify-content: space-between; gap: 8px; }
.inst-head .short, .marker .lbl .short { display: none; }
.lane { padding: 6px 0; border-bottom: 1px dashed var(--term-line); }
.lane:last-child { border-bottom: 0; }
.lane-id { color: var(--term-ink); }
.lane-id small { display: block; color: var(--term-muted); font-size: 13px; }
.lane-track { position: relative; height: 40px; }
.lane-reveal { position: absolute; inset: 0; clip-path: inset(0 calc((1 - var(--p, 1)) * 100%) 0 0); }
.lane-trace { position: absolute; left: 0; right: 0; top: 0; height: 26px; width: 100%; overflow: visible; }
.lane-trace path { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.lane-trace .j1 { stroke: #cdc8d6; }
.lane-trace .j2 { stroke: #7d7891; }
.lane-trace .j3 { stroke: #565068; }
.lane-frames { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.lane-frames i { display: block; border-radius: 2px; background: #3f3a4c; }
.lane-frames i.black { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 123, 108, .6); }
.region {
  position: absolute; top: -3px; height: 32px; border-radius: var(--r-sm);
  background: rgba(241, 181, 77, .12);
  border: 1px solid rgba(241, 181, 77, .45);
}
.marker {
  position: absolute; top: -3px; width: 0; height: 32px; z-index: 2; pointer-events: none;
  opacity: 0; transform: translateY(4px);
  transition: opacity 300ms var(--ease-ui), transform 300ms var(--ease-ui);
}
.marker.on { opacity: 1; transform: none; }
.marker .tick { position: absolute; left: -1px; top: 0; width: 2px; height: 32px; border-radius: 1px; background: var(--term-fail); }
.marker.warn .tick { background: var(--term-warn); }
.marker .lbl {
  position: absolute; top: 4px; left: 7px;
  font-size: 13px; line-height: 1; padding: 4px 6px; border-radius: var(--r-sm); white-space: nowrap;
  background: #2b1411; color: var(--term-fail); border: 1px solid rgba(255, 123, 108, .5);
}
.marker.warn .lbl { background: #2a1f0e; color: var(--term-warn); border-color: rgba(241, 181, 77, .5); }
.marker.lbl-left .lbl { left: auto; right: 7px; }
.marker.at-end { left: auto; right: 0; width: auto; }
.marker.at-end .lbl { position: relative; left: auto; top: 4px; display: inline-block; }
.lane-verdict { display: flex; align-items: center; gap: 8px; color: var(--term-muted); }
.v-pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 52px;
  padding: 3px 8px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  border: 1px solid var(--term-line); color: var(--term-muted);
  transition: background-color 300ms var(--ease-ui), color 300ms var(--ease-ui), border-color 300ms var(--ease-ui);
}
.lane.done .v-pill.pass { background: rgba(91, 211, 148, .12); color: var(--term-pass); border-color: rgba(91, 211, 148, .35); }
.lane.done .v-pill.warn { background: rgba(241, 181, 77, .12); color: var(--term-warn); border-color: rgba(241, 181, 77, .35); }
.lane.done .v-pill.fail { background: rgba(255, 123, 108, .12); color: var(--term-fail); border-color: rgba(255, 123, 108, .35); }
.lane-verdict code { color: var(--term-ink); opacity: 0; transition: opacity 300ms var(--ease-ui); background: none; padding: 0; font-size: 13px; }
.lane.done .lane-verdict code { opacity: 1; }
.scanline {
  position: absolute; top: 0; bottom: 0; width: 2px; left: 0; z-index: 3;
  background: var(--term-accent);
  opacity: 0; pointer-events: none;
}
.instrument.scanning .scanline { opacity: .9; }
.noscript { padding: 16px 0; color: var(--term-ink); max-width: none; }
.noscript a { color: var(--term-accent); }
.inst-foot {
  display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap;
  padding: 10px 20px; border-top: 1px solid var(--term-line); background: var(--term-bar);
}
.count { display: inline-flex; align-items: baseline; gap: 8px; color: var(--term-muted); }
.count b { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--term-ink); }
.count.pass b { color: var(--term-pass); }
.count.warn b { color: var(--term-warn); }
.count.fail b { color: var(--term-fail); }
.inst-foot .spacer { flex: 1; }
.inst-foot .inst-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inst-foot a, .inst-foot button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  font: 500 13px/1 var(--mono); color: var(--term-ink); text-decoration: none;
  background: rgba(255, 255, 255, .07); border: 0; border-radius: var(--r-md); cursor: pointer;
  transition: transform var(--t-out) var(--ease-ui), background-color var(--t-out) var(--ease-ui), color var(--t-out) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) {
  .inst-foot a:hover, .inst-foot button:hover { background: rgba(255, 255, 255, .2); color: #fff; transform: translateY(-1px); transition-duration: var(--t-in); }
}
.inst-foot a:focus-visible, .inst-foot button:focus-visible { background: rgba(255, 255, 255, .2); color: #fff; outline-color: var(--term-accent); }
.inst-foot a:active, .inst-foot button:active { transform: translateY(1px) scale(.985); transition-duration: var(--t-press); }
@container inst (max-width: 600px) {
  .inst-head, .lane { grid-template-columns: 40px minmax(0, 1fr) 56px; gap: 10px; }
  .lane-id small { display: none; }
  .lane-verdict code { display: none; }
  .v-pill { min-width: 0; width: 100%; padding: 3px 0; }
  .inst-info { display: none; }
  .marker .lbl .long, .inst-head .long { display: none; }
  .marker .lbl .short, .inst-head .short { display: inline; }
  .inst-head .axis .mid { display: none; }
  .inst-body, .inst-bar, .inst-foot { padding-left: 14px; padding-right: 14px; }
  .inst-foot .spacer { display: none; }
  .inst-foot .inst-actions { width: 100%; }
}

/* ---------- assay hero ---------- */
.hero-assay { min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center; padding: 48px 0; }
.hero-assay .hero-grid { align-items: center; }
.hero-assay .hero-copy { display: block; grid-column: 1 / span 6; }
.hero-assay .hero-copy .label { margin-bottom: 24px; }
.hero-assay .hero-copy .lead { margin-top: 24px; }
.hero-assay .hero-copy .btn-row { margin-top: 32px; }
.hero-assay .hero-copy .facts { margin-top: 32px; }
.assay-visual { --sun-r: clamp(64px, 7.2vw, 108px); grid-column: 7 / -1; position: relative; padding-top: var(--sun-r); }
.assay-visual .horizon-sun { top: 0; right: 10%; width: calc(var(--sun-r) * 2); z-index: 0; }
@media (max-width: 1279px) {
  .hero-assay { min-height: 0; padding: 64px 0 72px; }
  .hero-assay .hero-copy, .assay-visual { grid-column: 1 / -1; }
  .hero-assay .hero-copy h1 { max-width: 14em; }
  .assay-visual { margin-top: 48px; }
}
@media (max-width: 639px) {
  .hero-assay { padding: 32px 0 48px; }
  .hero-assay .hero-copy .label { margin-bottom: 16px; }
  .hero-assay .hero-copy .lead { margin-top: 16px; }
  .hero-assay .hero-copy .btn-row { margin-top: 24px; }
  .hero-assay .hero-copy .facts { margin-top: 24px; gap: 4px 24px; }
  .assay-visual { margin-top: 32px; }
}

/* ---------- cards: one recipe, flat ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
@media (max-width: 639px) { .card { padding: 24px; } }
a.card { display: block; color: inherit; text-decoration: none; transition: transform var(--t-out) var(--ease-ui), border-color var(--t-out) var(--ease-ui); }
@media (hover: hover) and (pointer: fine) { a.card:hover { transform: translateY(-2px); border-color: var(--line-2); transition-duration: var(--t-in); } }
a.card:focus-visible { transform: translateY(-2px); }

/* ---------- assay: problem + calculator ---------- */
.defects { border-top: 1px solid var(--line); }
.defects li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.defects code { justify-self: start; }
.code-fail { background: var(--fail-soft) !important; color: var(--fail) !important; }
.code-warn { background: var(--warn-soft) !important; color: var(--warn) !important; }
.calc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.field label { display: flex; justify-content: space-between; gap: 8px; font: 500 13px/20px var(--sans); color: var(--muted); margin-bottom: 8px; }
.field .val { font: 500 13px/20px var(--mono); color: var(--ink); }
.field input[type="number"] {
  width: 100%; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg);
  padding: 0 12px 0 28px; font: 500 16px/1 var(--mono); color: var(--ink);
}
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--mono); }
input[type="range"] { width: 100%; height: 44px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.hours { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-top: 24px; }
.hours i { aspect-ratio: 1; border-radius: 2px; background: var(--pass); opacity: .85; transition: background-color 200ms var(--ease-ui), opacity 200ms var(--ease-ui); }
.hours i.bad { background: var(--fail); opacity: 1; }
.hours-legend { display: flex; justify-content: space-between; margin-top: 8px; font: 400 13px/20px var(--mono); color: var(--muted); }
.hours-legend b { color: var(--ink); }
.calc-result { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.calc-result .big { font: 500 var(--fs-h3)/1.1 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.calc-result .big.fail { color: var(--fail); }
.calc-result p { margin-top: 8px; font-size: 14px; line-height: 22px; color: var(--muted); }
.calc-formula { margin-top: 16px; font: 400 13px/20px var(--mono); color: var(--muted); }
@media (max-width: 479px) { .calc-fields, .calc-result { grid-template-columns: minmax(0, 1fr); } }

/* ---------- assay: how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.step { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 32px; }
.step > :not(.step-fig) { margin-left: 16px; margin-right: 16px; }
.step .step-n { margin-top: 12px; font: 500 13px/20px var(--mono); color: var(--muted); }
.step pre {
  margin-top: auto; margin-bottom: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--term-bg); color: var(--term-ink);
  font-size: 13px; overflow-x: auto; white-space: pre;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chips span { font: 500 13px/1 var(--mono); padding: 8px 10px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
@media (max-width: 1023px) { .steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) { .step { padding: 12px 12px 24px; } .step > :not(.step-fig) { margin-left: 12px; margin-right: 12px; } }

/* the small picture at the top of each step: an inset panel of the same height */
.step-fig {
  height: 196px; padding: 20px 24px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  display: flex; flex-direction: column; justify-content: center; gap: 14px; overflow: hidden;
}
.tree li {
  font: 400 13px/22px var(--mono); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tree .dir { color: var(--ink); }
.tree .in1 { padding-left: 18px; }
.tree .in2 { padding-left: 36px; }
.tree .in1::before, .tree .in2::before { content: "└ "; color: var(--line-2); }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.check-grid span {
  display: grid; place-items: center; height: 34px; border-radius: var(--r-sm);
  font: 500 13px/1 var(--mono); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2);
}
.check-grid .vid { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.check-grid .ds { background: transparent; border-style: dashed; color: var(--muted); }
.check-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 400 12px/18px var(--sans); color: var(--muted); }
.check-key li { display: inline-flex; align-items: center; gap: 6px; }
.check-key i { width: 10px; height: 10px; border-radius: 2px; background: var(--surface); border: 1px solid var(--line-2); }
.check-key .k-vid { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.check-key .k-ds { background: transparent; border-style: dashed; }
.verdict-bar { display: flex; gap: 3px; height: 30px; }
.verdict-bar i { flex: var(--n) 1 0; border-radius: var(--r-sm); }
.verdict-bar .pass, .keep-strip i.on { background: var(--pass); }
.verdict-bar .warn { background: var(--warn); }
.verdict-bar .fail { background: var(--fail); }
.verdict-legend { display: flex; gap: 16px; font: 400 13px/20px var(--mono); color: var(--muted); }
.verdict-legend b { font-weight: 500; }
.verdict-legend .pass b { color: var(--pass); }
.verdict-legend .warn b { color: var(--warn); }
.verdict-legend .fail b { color: var(--fail); }
.keep-strip { display: grid; grid-template-columns: auto repeat(8, minmax(0, 1fr)); gap: 4px; align-items: center; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.keep-strip .k { font: 400 13px/20px var(--mono); color: var(--muted); margin-right: 8px; }
.keep-strip i { height: 14px; border-radius: 2px; border: 1px solid var(--line-2); }
.keep-strip i.on { border-color: transparent; opacity: .85; }

/* node-and-arrow pipeline diagram (static) */
.pipeline-card { margin-top: var(--col-gap); }
.pipeline { display: grid; row-gap: 20px; }
.pipe-flow { display: flex; gap: 32px; }
.pipe-flow .node {
  position: relative; flex: 1 1 0; min-width: 0; padding: 12px 14px;
  border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg);
}
.pipe-flow .node b { display: block; font: 500 14px/20px var(--mono); color: var(--ink); }
.pipe-flow .node span { display: block; font-size: 13px; line-height: 20px; color: var(--muted); }
.pipe-flow .node.core { border-color: var(--accent); background: var(--accent-soft); }
.pipe-flow .node.core b { color: var(--accent); }
/* the arrow sits in the gap before each node */
.pipe-flow .node + .node::before { content: ""; position: absolute; left: -29px; top: 50%; width: 24px; height: 1px; background: var(--line-2); }
.pipe-flow .node + .node::after {
  content: ""; position: absolute; left: -7px; top: calc(50% - 4px);
  border-left: 6px solid var(--line-2); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.pipeline p { font-size: 14px; line-height: 22px; color: var(--muted); max-width: 44em; }
@media (max-width: 767px) {
  .pipe-flow { flex-direction: column; gap: 22px; }
  .pipe-flow .node { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
  .pipe-flow .node + .node::before { left: 24px; top: -19px; width: 1px; height: 16px; }
  .pipe-flow .node + .node::after { left: 20.5px; top: -8px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 6px solid var(--line-2); border-bottom: 0; }
}

/* ---------- assay: the nine checks, one illustrated tile each ---------- */
.check-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.check-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.check-tile > :not(.ct-fig) { margin-left: 12px; margin-right: 12px; }
.ct-fig { padding: 18px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.ct-fig svg { width: 100%; height: auto; overflow: visible; }
.ct-head { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }
.ct-code { font: 500 18px/24px var(--mono); letter-spacing: 0; color: var(--ink); }
.ct-name { font: 400 14px/24px var(--mono); color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.ct-sevs { margin-left: auto; display: flex; gap: 6px; flex: none; }
.check-tile p { font-size: 15px; line-height: 24px; }
.check-tile .ct-meta { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 8px; font: 400 13px/20px var(--mono); color: var(--muted); }
.ct-meta::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 2px; }
.ct-meta.vid::before { background: var(--accent); }
.ct-meta.ds::before { border: 1px dashed var(--muted); }
@media (max-width: 1279px) { .check-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .check-tiles { grid-template-columns: minmax(0, 1fr); } }
/* the drawings inside the tiles: theme colours, so they read in light and dark */
.ct-fig .f-cell { fill: var(--line-2); }
.ct-fig .f-miss { fill: none; stroke: var(--fail); stroke-width: 1.2; stroke-dasharray: 3 2.5; }
.ct-fig .f-line { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ct-fig .f-soft { stroke: var(--line-2); }
.ct-fig .f-bad { fill: none; stroke: var(--fail); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ct-fig .f-dot { fill: var(--muted); }
.ct-fig .f-dot-bad { fill: var(--fail); }
.ct-fig .f-black { fill: #000; stroke: var(--fail); stroke-width: 1.2; }
.ct-fig .f-horizon { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.ct-fig .f-sun-dot { fill: var(--muted); opacity: .6; }
.ct-fig .f-warn-zone { fill: var(--warn-soft); stroke: color-mix(in srgb, var(--warn) 55%, transparent); stroke-width: 1; }
.ct-fig .f-txt { font: 500 9.5px var(--mono); fill: var(--muted); }
.ct-fig .f-code { font: 400 11px var(--mono); fill: var(--ink-2); }
.ct-fig .f-fail-t { fill: var(--fail); }
.ct-fig .f-warn-t { fill: var(--warn); }
.sev { display: inline-block; font: 500 13px/1 var(--mono); padding: 4px 6px; border-radius: var(--r-sm); vertical-align: 1px; }
.sev-fail { background: var(--fail-soft); color: var(--fail); }
.sev-warn { background: var(--warn-soft); color: var(--warn); }
.sev-info { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.sev-pass { background: var(--pass-soft); color: var(--pass); }
.more { margin-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
.more p { color: var(--muted); }

/* ---------- assay: principles grid of rules, numbered ---------- */
.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); counter-reset: rule; }
.rule-grid > li { padding: 24px 0 40px; border-top: 1px solid var(--line); counter-increment: rule; }
.rule-grid > li::before {
  content: counter(rule, decimal-leading-zero); display: block; margin-bottom: 16px;
  font: 500 13px/20px var(--mono); color: var(--accent);
}
.rule-grid .title + p { margin-top: 8px; }
@media (max-width: 1023px) { .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .rule-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- assay: sample report ---------- */
.browser { overflow: hidden; padding: 0; }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser-bar .url { flex: 1; min-width: 0; font: 400 13px/1 var(--mono); color: var(--muted); background: var(--bg); border-radius: var(--r-sm); padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser iframe { display: block; width: 100%; height: 680px; border: 0; background: var(--bg); }
@media (max-width: 767px) { .browser iframe { height: 560px; } }
.planted { border-top: 1px solid var(--line); }
.planted li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.planted .ep { font: 400 13px/20px var(--mono); color: var(--muted); }
.file-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.file-links a { display: inline-flex; align-items: center; min-height: 44px; font: 400 14px/1 var(--mono); }
.file-links a.draw { color: var(--accent); }
.file-links a.draw::after { bottom: 12px; }

/* ---------- assay: install, code tabs ---------- */
.code-card { background: var(--term-bg); border: 1px solid var(--term-line); border-radius: var(--r-lg); overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 8px; background: var(--term-bar); border-bottom: 1px solid var(--term-line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; font: 500 13px/1 var(--mono); color: var(--term-muted); background: transparent; border: 0;
  min-height: 44px; padding: 0 14px; border-radius: var(--r-md); cursor: pointer;
  transition: color var(--t-out) var(--ease-ui), background-color var(--t-out) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--term-ink); background: rgba(255, 255, 255, .05); transition-duration: var(--t-in); } }
.tab:focus-visible { outline-color: var(--term-accent); outline-offset: -2px; color: var(--term-ink); background: rgba(255, 255, 255, .05); }
.tab[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: #fff; }
.panel { position: relative; }
.panel[hidden] { display: none; }
.panel pre { margin: 0; padding: 24px; overflow-x: auto; color: var(--term-ink); font-size: 13px; line-height: 22px; white-space: pre; max-height: 520px; }
.copy {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  font: 500 13px/1 var(--mono); color: var(--term-ink); background: rgba(255, 255, 255, .07);
  border: 0; border-radius: var(--r-md); padding: 0 14px; min-height: 44px; cursor: pointer;
  transition: color var(--t-out) var(--ease-ui), background-color var(--t-out) var(--ease-ui), transform var(--t-out) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) { .copy:hover { color: #fff; background: rgba(255, 255, 255, .2); transform: translateY(-1px); transition-duration: var(--t-in); } }
.copy:focus-visible { outline-color: var(--term-accent); background: rgba(255, 255, 255, .2); }
.copy:active { transform: translateY(1px) scale(.985); transition-duration: var(--t-press); }
.copy.ok { color: var(--term-pass); }
.c-ps { color: var(--term-accent); user-select: none; }
.c-com { color: var(--term-muted); }
.c-str { color: #b5d78a; }
.c-key { color: var(--term-accent); }
.c-num { color: #f2a76a; }
.c-kw { color: #f0a3cb; }
.t-pass { color: var(--term-pass); }
.t-warn { color: var(--term-warn); }
.t-fail { color: var(--term-fail); }
.t-info, .t-dim { color: var(--term-muted); }
.note { margin-top: 16px; font-size: 14px; line-height: 22px; color: var(--muted); max-width: none; }
.note + .note { margin-top: 8px; }
.status-ok { color: var(--pass) !important; }

/* ---------- assay: prompts for coding agents ---------- */
.agent-lib { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.agent-tabs { grid-column: 1 / span 4; display: grid; gap: 4px; }
.agent-tab {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: baseline;
  width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-radius: var(--r-md); box-shadow: inset 2px 0 0 transparent;
  transition: background-color var(--t-out) var(--ease-ui), box-shadow var(--t-out) var(--ease-ui);
}
.agent-tab .at-n { font: 500 13px/24px var(--mono); color: var(--muted); }
.agent-tab b { display: block; font-size: 16px; line-height: 24px; color: var(--ink); }
.agent-tab .at-sub { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .agent-tab:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); transition-duration: var(--t-in); } }
.agent-tab:focus-visible { outline-offset: -2px; }
.agent-tab[aria-selected="true"] { background: var(--surface); box-shadow: inset 2px 0 0 var(--accent), inset 0 0 0 1px var(--line); }
.agent-tab[aria-selected="true"] .at-n { color: var(--accent); }
.agent-panels { grid-column: 5 / -1; min-width: 0; }
.agent-panel { background: var(--term-bg); border: 1px solid var(--term-line); border-radius: var(--r-lg); overflow: hidden; }
.agent-panel[hidden] { display: none; }
.ap-bar, .file-bar {
  display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 8px 8px 8px 20px;
  background: var(--term-bar); border-bottom: 1px solid var(--term-line);
  font: 500 13px/20px var(--mono); color: var(--term-ink);
}
.ap-bar .ap-hint { color: var(--term-muted); font-weight: 400; }
.ap-bar .copy, .file-bar .copy { position: static; margin-left: auto; flex: none; }
.ap-prompt {
  margin: 0; padding: 24px; min-height: 300px;
  font: 400 14px/24px var(--mono); color: var(--term-ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
mark.ph { color: var(--term-accent); background: rgba(199, 166, 255, .12); border-radius: 3px; padding: 1px 3px; }
.ap-runs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 14px 20px 16px; border-top: 1px dashed var(--term-line);
}
.ap-runs .ap-runs-k { font: 500 13px/20px var(--sans); color: var(--term-muted); }
.ap-runs code {
  background: rgba(255, 255, 255, .06); color: var(--term-ink);
  font-size: 13px; line-height: 20px; padding: 3px 8px; white-space: normal; overflow-wrap: anywhere;
}
.agents-md { margin-top: 96px; }
.agents-md h3 { font-size: var(--fs-h3); }
.agents-md h3 + p { margin-top: 16px; }
.md-snippet { margin: 0; padding: 24px; overflow-x: auto; color: var(--term-ink); font-size: 13px; line-height: 22px; white-space: pre; }
@media (max-width: 1023px) {
  .agent-tabs { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .agent-tab { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; background: color-mix(in srgb, var(--ink) 5%, transparent); box-shadow: none; }
  .agent-tab .at-n, .agent-tab .at-sub { display: none; }
  .agent-tab b { font-size: 15px; line-height: 22px; }
  .agent-tab[aria-selected="true"] { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
  .agent-tab[aria-selected="true"] b { color: var(--accent); }
  .agent-panels { grid-column: 1 / -1; }
  .ap-prompt { min-height: 0; }
  .agents-md { margin-top: 72px; }
}
@media (max-width: 639px) {
  .ap-bar .ap-hint { display: none; }
  .ap-prompt { padding: 20px 16px; font-size: 13px; line-height: 22px; }
  .ap-runs { padding: 12px 16px 14px; }
  .md-snippet { padding: 20px 16px; }
}

/* ---------- assay: audits, price rows ---------- */
.checklist { border-top: 1px solid var(--line); }
.checklist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.checklist svg { width: 18px; height: 18px; flex: none; color: var(--pass); margin-top: 4px; }
.process { counter-reset: proc; border-top: 1px solid var(--line); }
.process li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.process li::before { counter-increment: proc; content: counter(proc, decimal-leading-zero); font: 400 13px/26px var(--mono); color: var(--muted); grid-row: 1 / span 2; }
.process h4 { font-size: 16px; line-height: 26px; letter-spacing: 0; font-weight: 500; }
.process p { font-size: 14px; line-height: 22px; color: var(--muted); }
.prices { border-top: 1px solid var(--line-2); }
.price-row {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 16px var(--col-gap); align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line);
}
.price-row .plan .tag { display: block; margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--accent); }
.price-row .amt { font: 500 var(--fs-h3)/1.1 var(--sans); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.price-row .amt small { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.price-row .incl { font-size: 14px; line-height: 22px; color: var(--muted); }
.price-row .btn { justify-self: end; }
@media (max-width: 1023px) {
  .price-row { grid-template-columns: minmax(0, 1fr) auto; }
  .price-row .incl { grid-column: 1 / -1; }
  .price-row .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 639px) { .price-row .btn { width: 100%; } }
.partner { margin-top: 32px; display: flex; gap: 16px 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------- roadmap ---------- */
/* a timeline: one rail, a node per release, the current one lit and the rail lit up to the next */
.roadmap { --node: 13px; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); }
.roadmap::before { content: ""; position: absolute; top: calc(var(--node) / 2); left: 0; right: 0; height: 1px; background: var(--line-2); }
.road { position: relative; padding-top: calc(var(--node) + 24px); }
/* the lit stretch of rail, from the current release to the next node */
.road.now::after {
  content: ""; position: absolute; top: calc(var(--node) / 2); left: 0; width: calc(100% + var(--col-gap)); height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--line-2));
}
.road::before {
  content: ""; position: absolute; top: 0; left: 0; z-index: 1; width: var(--node); height: var(--node); border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-2);
}
.section.alt .road::before { background: var(--bg-2); }
.road.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.road .ver { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 500 20px/1.2 var(--mono); color: var(--ink); }
.road .st { font: 500 13px/20px var(--sans); color: var(--muted); }
.road.now .st { color: var(--accent); }
.road ul { margin-top: 16px; display: grid; gap: 8px; }
.road li { font-size: 14px; line-height: 22px; color: var(--ink-2); }
@media (max-width: 1023px) {
  /* the rail turns vertical */
  .roadmap { grid-template-columns: minmax(0, 1fr); row-gap: 32px; padding-left: 36px; }
  .roadmap::before { top: 6px; bottom: 6px; left: calc(var(--node) / 2); right: auto; width: 1px; height: auto; }
  .road { padding-top: 0; }
  .road::before { left: -36px; top: 4px; }
  .road.now::after { top: calc(4px + var(--node) / 2); bottom: -36px; left: calc(-36px + var(--node) / 2); width: 1px; height: auto; background: linear-gradient(180deg, var(--accent), var(--line-2)); }
  .road .ver { justify-content: flex-start; gap: 16px; }
}
.toc { counter-reset: toc; border-top: 1px solid var(--line); }
.toc li { counter-increment: toc; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.toc li::before { content: counter(toc, decimal-leading-zero); font: 400 13px/26px var(--mono); color: var(--muted); }

/* ---------- FAQ: fully open list ---------- */
.faq { border-top: 1px solid var(--line-2); }
.faq-item { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding: 24px 0; border-bottom: 1px solid var(--line); }
.faq-item h3 { grid-column: 1 / span 5; font-size: var(--fs-lead); line-height: 1.4; letter-spacing: -0.005em; }
.faq-item p { grid-column: 7 / -1; }
@media (max-width: 1279px) { .faq-item h3 { grid-column: 1 / span 6; padding-right: 16px; } }
@media (max-width: 1023px) {
  .faq-item h3, .faq-item p { grid-column: 1 / -1; padding-right: 0; }
  .faq-item p { margin-top: 8px; }
}

/* ---------- footer: closing block, link columns, legal row ---------- */
.footer { padding: 120px 0 32px; overflow: clip; }
.foot-close { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
.foot-close .foot-text { grid-column: 1 / span 6; }
.foot-close .lead { margin-top: 24px; }
/* the closing action ("Book a call"), with email as the plain second option under it */
.foot-cta { display: inline-flex; align-items: center; gap: 12px; margin-top: 32px; min-height: 44px; font: 500 var(--fs-h3)/1.2 var(--sans); letter-spacing: -0.015em; color: var(--accent); }
.foot-cta.draw { color: var(--accent); }
.foot-cta.draw::after { bottom: 4px; right: 40px; }
.foot-alt { margin-top: 8px; color: var(--muted); }
.foot-alt a { display: inline-block; padding-block: 9px; margin-block: -9px; } /* 26 px line + 18 = a 44 px target */
.foot-close :is(.capture, .capture-done) { margin-top: 32px; }
.foot-next { margin-top: 16px; }
.foot-horizon { position: relative; height: 1px; margin-top: 96px; }
.foot-horizon::before { content: ""; position: absolute; top: 0; left: -100vw; right: -100vw; height: 1px; background: var(--line-2); }
.foot-horizon .horizon-sun { width: 176px; bottom: -88px; right: 8%; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 32px; padding-top: 48px; }
.foot-about { grid-column: 1 / span 4; }
.foot-about p { margin-top: 16px; font-size: 14px; line-height: 22px; color: var(--muted); max-width: 30ch; }
.foot-col { grid-column: span 2; }
.foot-about + .foot-col { grid-column: 7 / span 2; }
.foot-col .foot-h { font: 500 13px/20px var(--sans); color: var(--muted); margin-bottom: 8px; }
.foot-col li { display: flex; align-items: center; min-height: 36px; font-size: 14px; line-height: 22px; color: var(--muted); }
.foot-col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink-2); }
.foot-col a.draw::after { bottom: 6px; }
.foot-col .soon { margin-left: 8px; font: 400 13px/1 var(--mono); color: var(--muted); }
.foot-legal { margin-top: 64px; display: flex; justify-content: space-between; gap: 8px 32px; flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--muted); }
.foot-legal p { font-size: 13px; line-height: 20px; color: var(--muted); max-width: none; }
.foot-legal a { display: inline-block; padding-block: 12px; margin-block: -12px; color: var(--ink-2); } /* 20 px line + 24 = 44 px */
@media (max-width: 1279px) {
  .foot-about { grid-column: 1 / span 6; }
  .foot-col, .foot-about + .foot-col { grid-column: span 2; }
}
@media (max-width: 1023px) {
  .footer { padding-top: 96px; }
  .foot-close .foot-text { grid-column: 1 / -1; }
  .foot-horizon { margin-top: 112px; }
  .foot-horizon .horizon-sun { width: 144px; bottom: -72px; }
  .foot-about { grid-column: 1 / -1; }
  .foot-col, .foot-about + .foot-col { grid-column: span 4; }
}
@media (max-width: 639px) {
  .foot-horizon { margin-top: 96px; }
  .foot-horizon .horizon-sun { width: 120px; bottom: -60px; right: 0; }
  .foot-col, .foot-about + .foot-col { grid-column: span 6; }
  .foot-col:last-child { grid-column: 1 / -1; }
  .foot-legal { margin-top: 48px; }
}

/* ---------- email sign-up: a labelled email field and a tonal button on one row ----------
   form.capture[data-capture="<topic>"]; site.js posts it to /api/requests and swaps the
   form for .capture-done on success. Stacks on phones. It cannot work without JavaScript,
   so it is hidden then, and a <noscript> line beside it gives the address instead. */
.capture { position: relative; max-width: 32rem; }
html:not(.js) .capture { display: none; }
.capture-label { display: block; margin-bottom: 8px; font: 500 14px/22px var(--sans); color: var(--ink); }
.capture-row { display: flex; gap: 8px; }
.capture-input {
  flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface);
  font: 400 16px/1 var(--sans); color: var(--ink);
  transition: border-color var(--t-out) var(--ease-ui);
}
.capture-input::placeholder { color: var(--muted); opacity: 1; }
.capture-input:focus { border-color: var(--accent); }
.capture .btn { flex: none; }
.capture .btn:disabled { cursor: progress; opacity: .7; transform: none; }
.capture-msg { margin-top: 8px; font-size: 14px; line-height: 22px; color: var(--muted); max-width: none; }
.capture-msg:empty { margin-top: 0; }
.capture-msg a { color: inherit; }
.capture.is-error .capture-input { border-color: var(--fail); }
.capture.is-error .capture-msg { color: var(--fail); }
/* the honeypot: off screen, out of the tab order and the accessibility tree */
.capture-hp { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.capture-done { display: flex; gap: 10px; align-items: flex-start; max-width: 32rem; color: var(--ink-2); }
.capture-done svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--pass); }
.capture-done b { overflow-wrap: anywhere; }
.capture-done:focus { outline: none; } /* focused only so screen readers read it out */
.capture-note { margin-top: 16px; }
@media (max-width: 639px) {
  .capture-row { flex-direction: column; }
  .capture .btn { width: 100%; }
}

/* ---------- reference page (checks.html) ---------- */
.ref-hero { padding: 96px 0 64px; }
.ref-hero .label { margin-bottom: 24px; }
.ref-hero .lead { margin-top: 24px; }
.ref-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding-bottom: 72px; }
.ref-nav { grid-column: 1 / span 3; position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; display: grid; gap: 0; }
.ref-nav .label { margin-bottom: 8px; }
.ref-nav a {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: var(--r-md);
  color: var(--ink-2); font-size: 14px; text-decoration: none;
  transition: background-color var(--t-out) var(--ease-ui), color var(--t-out) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) { .ref-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); transition-duration: var(--t-in); } }
.ref-nav a.active, .ref-nav a:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ref-nav a b { font: 500 13px/1 var(--mono); color: var(--muted); width: 24px; }
.ref-content { grid-column: 4 / -1; min-width: 0; }
.ref-content h2 { font-family: var(--mono); font-size: var(--fs-h3); letter-spacing: -0.02em; margin: 0 0 16px; }
.ref-content h2 a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .ref-content h2 a:hover { color: var(--accent); } }
.ref-content p, .ref-content li { color: var(--ink-2); font-size: 16px; line-height: 26px; }
.ref-content p { margin: 0 0 16px; }
.ref-content ul { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; list-style: disc; max-width: calc(var(--measure) + 20px); }
/* long formulas in prose must wrap, or they push the page wider than a phone */
.ref-content p > code, .ref-content li > code { white-space: normal; overflow-wrap: break-word; }
.ref-intro { padding-bottom: 32px; }
.ref-section { padding: 48px 0 16px; }
.table-wrap { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; }
.table-wrap th { text-align: left; font: 500 13px/20px var(--sans); color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td.code-cell { font: 500 13px/22px var(--mono); color: var(--ink); white-space: nowrap; }
.table-wrap tr:target td { background: var(--accent-soft); }
.table-wrap td code { white-space: normal; }
.table-wrap td a { display: inline-block; padding-block: 13px; margin-block: -13px; }
@media (max-width: 1023px) {
  .ref-hero { padding: 64px 0 48px; }
  .ref-nav { grid-column: 1 / -1; position: static; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
  .ref-nav .label { width: 100%; margin-bottom: 0; }
  .ref-nav a { min-height: 44px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
  .ref-content { grid-column: 1 / -1; }
}

/* ---------- 404 ---------- */
.notfound { min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center; padding: 64px 0; }
.notfound .label { margin-bottom: 24px; }
.notfound .lead { margin-top: 24px; }
.notfound .btn-row { margin-top: 32px; }

/* ---------- wide instrument (the landing scan spans the content width) ---------- */
@container inst (min-width: 1000px) {
  .inst-head, .lane { grid-template-columns: 96px minmax(0, 1fr) 168px; gap: 24px; }
  .inst-bar, .inst-body, .inst-foot { padding-left: 28px; padding-right: 28px; }
  .lane-track { height: 44px; }
  .lane-trace { height: 30px; }
}

/* =====================================================================
   Landing page only (index.html, body.page-home): the elegance pass.
   Subtraction, varied rhythm (split hero, centred Assay, three columns),
   larger section heads, more air, no rules or boxes inside sections.
   ===================================================================== */
.page-home { --fs-h2: clamp(36px, 18.78px + 4.416vw, 64px); }
.page-home h2 { line-height: 1.04; letter-spacing: -0.035em; }
.page-home .section { padding: 160px 0 112px; }
@media (max-width: 1023px) { .page-home .section { padding: 120px 0 72px; } }
@media (max-width: 639px) { .page-home .section { padding: 96px 0 64px; } }

/* hero: a larger headline, text in columns 1-5, the stage takes columns 6-12 */
.page-home .hero-home h1 { font-size: clamp(42px, 19.9px + 5.67vw, 88px); line-height: 1; letter-spacing: -0.045em; max-width: none; }
.page-home .hero-copy { grid-column: 1 / span 5; }
.page-home .hero-home .arm-stage { grid-column: 6 / -1; }
.page-home .hero-text .lead { margin-top: 32px; max-width: 26em; }
.page-home .hero-text .btn-row { margin-top: 40px; align-items: center; column-gap: 32px; }
.page-home .hero-home .facts b { font-weight: 400; color: inherit; }
/* a bigger sun: radius up to 36% of the stage height, still a half-disc on the horizon */
.page-home .hero-home .arm-sun { width: min(88%, 720px); height: 36%; top: calc(var(--horizon) - 36%); }
@media (max-width: 1279px) {
  .page-home .hero-copy { grid-column: 1 / span 6; }
  .page-home .hero-home .arm-stage { grid-column: 7 / -1; }
}
@media (max-width: 639px) {
  .page-home .hero-text .lead { margin-top: 16px; }
  .page-home .hero-text .btn-row { margin-top: 24px; }
}

/* a quiet text link beside a button (the hero's second action) */
.link-cta { display: inline-flex; align-items: center; min-height: 44px; font: 500 16px/1 var(--sans); color: var(--ink); text-decoration: none; white-space: nowrap; }
.link-cta.draw { color: var(--ink); }
.link-cta.draw::after { bottom: 11px; }
@media (max-width: 639px) { .btn-row .link-cta { align-self: center; } }

/* Raftel Assay: centred head, the scan full width, one quiet dock of facts + the CTA */
.page-home .assay-intro { display: grid; justify-items: center; text-align: center; }
.page-home .assay-intro .lead { margin-top: 24px; }
.page-home .assay-panel { margin-top: 64px; }
.page-home .assay-dock { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.page-home .assay-panel .inst-info .keep b { color: var(--term-ink); }
@container inst (max-width: 600px) {
  .page-home .assay-panel .inst-info { display: flex; gap: 4px 16px; }
  .page-home .assay-panel .inst-info > :not(.keep) { display: none; }
}
@media (max-width: 639px) {
  .page-home .assay-panel { margin-top: 48px; }
  .page-home .assay-dock { flex-direction: column; align-items: stretch; }
  .page-home .assay-dock .btn { width: 100%; }
}

/* How Raftel works: the heading spans, three equal columns below, space instead of rules */
.page-home .how-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--col-gap); margin-top: 64px; }
.page-home .how-cols h3 { font-size: var(--fs-lead); line-height: 1.4; letter-spacing: -0.005em; }
.page-home .how-cols p { margin-top: 8px; font-size: var(--fs-lead); line-height: 1.5; max-width: 22em; }
@media (max-width: 1023px) { .page-home .how-cols { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 48px; } }

/* closing block: centred, more air above, the small sun centred on its horizon as the hero's bookend */
.page-home .footer { padding-top: 192px; }
.page-home .foot-close { text-align: center; }
.page-home .foot-close .foot-text { grid-column: 3 / span 8; display: grid; justify-items: center; }
.page-home .foot-cta { font-size: var(--fs-lead); }
.page-home .foot-cta.draw::after { right: 32px; }
.page-home .foot-horizon { margin-top: 176px; }
.page-home .foot-horizon .horizon-sun { right: auto; left: calc(50% - 88px); }
@media (max-width: 1023px) {
  .page-home .footer { padding-top: 144px; }
  .page-home .foot-close .foot-text { grid-column: 1 / -1; }
  .page-home .foot-horizon { margin-top: 144px; }
  .page-home .foot-horizon .horizon-sun { left: calc(50% - 72px); }
}
@media (max-width: 639px) {
  .page-home .footer { padding-top: 112px; }
  .page-home .foot-horizon { margin-top: 120px; }
  .page-home .foot-horizon .horizon-sun { left: calc(50% - 60px); }
}

/* ---------- reduced motion: final states, no transitions ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
