/* =============================================================================
   Cairn Integrity - site.css
   Survey Mark identity v1.0. Tokens are exact; do not eyeball tints.
   ============================================================================= */

/* ---------- Fonts (self-hosted IBM Plex, latin subset) ---------- */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --ink: #14191E; --slate: #263541; --signal: #177BA8; --signal-on-ink: #3EA3D7; --signal-hover: #005D89;
  --paper: #E9EBEE; --card: #FCFDFF; --panel: #F7F8FA; --rule: #D8DBDF; --rule-light: #E6E8EA;
  --text: #161B20; --body: #34383D; --data: #2A2E33; --secondary: #4E5358; --muted: #5F6469; --descriptor: #6D7277; --label: #7C8186;
  --on-ink-text: #F1F2F3; --on-ink-body: #A0A5AB; --on-ink-muted: #8E9398;
  --allow: #1D7635; --hold: #B46D10; --deny: #B33736; /* product UI states only */
  --allow-on-ink: #4FA868; --hold-on-ink: #D08A2E; --deny-on-ink: #D0605E; /* verdict words on Ink, product UI only */
  --on-ink-data: #C9CDD1; --signal-on-ink-hover: #7CC4E6;
  --tint-signal: #F1F6F9; --tint-neutral: #F4F5F7; --tint-amber: #F9F5EC;
  /* Derived dark-surface neutrals (hue 250, near-zero chroma) for hairlines and panels on Ink */
  --ink-panel: #1A2026; --ink-panel-2: #1F262D; --ink-rule: #2B333B; --ink-rule-2: #232B33;

  --sans: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Semantic (Paper theme) */
  --bg: var(--paper);
  --surface: var(--card);
  --surface-2: var(--panel);
  --line: var(--rule);
  --line-2: var(--rule-light);
  --fg: var(--text);
  --fg-body: var(--body);
  --fg-data: var(--data);
  --fg-2: var(--secondary);
  --fg-muted: var(--muted);
  --fg-label: var(--label);
  --accent: var(--signal);
  --accent-hover: var(--signal-hover);
  --accent-underline: rgba(23, 123, 168, .35);
  --course: var(--slate);
  --btn-fg: var(--on-ink-text);

  /* Type scale (1240px reference) */
  --fs-display: clamp(2.5rem, 1.55rem + 3.1vw, 4.5rem);   /* 40 -> 72, hero cover only */
  --fs-h1: clamp(2.125rem, 1.75rem + 1.2vw, 2.75rem);      /* 34 -> 44 */
  --fs-h2: 1.625rem;                                       /* 26 */
  --fs-h3: 1.3125rem;                                      /* 21 */
  --fs-lead: 1.0625rem;                                    /* 17 */
  --fs-body: 1rem;                                         /* 16 */
  --fs-small: .875rem;                                     /* 14 */
  --fs-data: .8125rem;                                     /* 13 */
  --fs-label: .6875rem;                                    /* 11 */

  /* Layout */
  --col: 1240px;
  --pad: 72px;
  --header-h: 68px;
  --gap: 24px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-inout: cubic-bezier(.83, 0, .17, 1);
  --dur: .6s;
}

[data-theme="ink"] {
  --bg: var(--ink);
  --surface: var(--ink-panel);
  --surface-2: var(--ink-panel-2);
  --line: var(--ink-rule);
  --line-2: var(--ink-rule-2);
  --fg: var(--on-ink-text);
  --fg-body: var(--on-ink-body);
  --fg-data: var(--on-ink-data);
  --fg-2: var(--on-ink-body);
  --fg-muted: var(--on-ink-muted);
  --fg-label: var(--on-ink-muted);
  --accent: var(--signal-on-ink);
  --accent-hover: var(--signal-on-ink-hover);
  --accent-underline: rgba(62, 163, 215, .4);
  --course: var(--rule-light);
  --btn-fg: var(--on-ink-text);
  color: var(--fg-body);
  background: var(--bg);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--fg-body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
strong, b { font-weight: 600; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-underline); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--signal); color: var(--on-ink-text); }
[data-theme="ink"] ::selection { background: var(--signal-on-ink); color: var(--ink); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 2000; padding: 10px 14px; background: var(--ink); color: var(--on-ink-text); text-decoration: none; font-size: var(--fs-small); }
.skip:focus { top: 16px; }

/* ---------- Type roles ---------- */
.display, .h1, .h2, .h3 { font-family: var(--sans); font-weight: 600; color: var(--fg); text-wrap: balance; }
.display { font-size: var(--fs-display); line-height: 1.06; letter-spacing: -.025em; }
.h1 { font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -.025em; }
.h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -.015em; }
.h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.015em; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--fg-2); max-width: 32em; }
.body { font-size: var(--fs-body); line-height: 1.55; color: var(--fg-body); max-width: 32em; }
.small { font-size: var(--fs-small); line-height: 1.5; color: var(--fg-muted); }
.measure { max-width: 32em; }
p + p { margin-top: 1em; }

.mono, .kicker, .num, code, kbd, .data { font-family: var(--mono); font-weight: 400; }
.kicker {
  display: inline-block;
  font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase; line-height: 1.4;
  color: var(--fg-label);
}
[data-theme="ink"] .kicker { color: var(--accent); }
.kicker--fg { color: var(--fg-label) !important; }
.num { font-size: var(--fs-label); letter-spacing: .18em; color: var(--accent); line-height: 1; }
.data { font-size: var(--fs-data); color: var(--fg-data); }
code { font-size: .9em; color: var(--fg-data); }

/* ---------- The mark and lockups ---------- */
.mark { width: 22px; height: auto; flex: none; overflow: visible; }
.mark__c1 { fill: var(--accent); }
.mark__c2, .mark__c3, .mark__c4 { fill: var(--course); }
.lockup { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--fg); }
.lockup .mark { width: 22px; }
.lockup__word { font-family: var(--sans); font-weight: 600; font-size: 17px; letter-spacing: .04em; line-height: 1; color: var(--fg); text-transform: uppercase; }
.lockup--stacked { flex-direction: column; align-items: flex-start; gap: 14px; }
.lockup--stacked .mark { width: 42px; }
.lockup--stacked .lockup__word { font-size: 30px; letter-spacing: .025em; }
.lockup:hover { color: var(--fg); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--col); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { position: relative; background: var(--bg); color: var(--fg-body); }
.section > .container { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.section--pad > .container { padding-top: clamp(72px, 9vw, 128px); padding-bottom: clamp(72px, 9vw, 128px); }
.section--rule-top { border-top: 1px solid var(--line); }
.section--rule-bottom { border-bottom: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--gap); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.start-7 { grid-column: 7 / 13; } .start-8 { grid-column: 8 / 13; } .start-9 { grid-column: 9 / 13; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.hr--draw { transform-origin: left center; }
.rule-signal { display: block; width: 56px; height: 3px; background: var(--accent); transform-origin: left center; }

/* Section head: mono number and heading on one baseline */
.section-head { display: grid; grid-template-columns: 72px 1fr; column-gap: var(--gap); align-items: baseline; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .num { line-height: inherit; }
.section-head .sub { margin-top: 12px; font-size: var(--fs-lead); color: var(--fg-muted); max-width: 32em; }
.section-head .rule-signal { margin-top: 20px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 900; height: var(--header-h);
  color: var(--fg);
  transition: background-color .35s var(--ease-out), border-color .35s, transform .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.header[data-theme="ink"] { background: transparent; }
.header.is-scrolled { background: var(--bg); border-bottom-color: var(--line); }
.header.is-hidden { transform: translateY(-100%); }
.header__inner { max-width: var(--col); margin: 0 auto; padding: 0 var(--pad); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav { display: flex; gap: 32px; }
.nav__link, .header .btn--ghost { color: var(--fg-2); }
.nav__link { position: relative; text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; color: var(--fg-2); transition: color .2s; }
.nav__link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right center; transition: transform .35s var(--ease-out); }
.nav__link:hover { color: var(--fg); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left center; }
.nav__link.is-active { color: var(--fg); }
.header__actions { display: flex; align-items: center; gap: 16px; }
.burger { display: none; width: 44px; height: 44px; position: relative; margin-right: -10px; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--fg); transition: transform .4s var(--ease-inout), top .4s var(--ease-inout); }
.burger span:nth-child(1) { top: 18px; } .burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

/* Menu overlay (mobile and narrow) */
.menu { position: fixed; inset: 0; z-index: 850; background: var(--ink); color: var(--on-ink-body); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .6s var(--ease-inout), visibility 0s .6s; }
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .6s var(--ease-inout), visibility 0s; }
.menu__inner { height: 100%; max-width: var(--col); margin: 0 auto; padding: calc(var(--header-h) + 24px) var(--pad) 32px; display: flex; flex-direction: column; justify-content: space-between; }
.menu__nav { display: flex; flex-direction: column; }
.menu__link { display: flex; align-items: baseline; gap: 20px; padding: 18px 0; border-top: 1px solid var(--ink-rule); text-decoration: none; color: var(--on-ink-text); font-size: clamp(28px, 6vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; opacity: 0; transform: translateY(16px); }
.menu__link:last-child { border-bottom: 1px solid var(--ink-rule); }
.menu.is-open .menu__link { opacity: 1; transform: none; transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); }
.menu.is-open .menu__link:nth-child(1) { transition-delay: .18s; } .menu.is-open .menu__link:nth-child(2) { transition-delay: .24s; }
.menu.is-open .menu__link:nth-child(3) { transition-delay: .30s; } .menu.is-open .menu__link:nth-child(4) { transition-delay: .36s; } .menu.is-open .menu__link:nth-child(5) { transition-delay: .42s; }
.menu__link:hover { color: var(--signal-on-ink); }
.menu__num { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .18em; color: var(--signal-on-ink); font-weight: 400; }
.menu__foot { display: flex; flex-direction: column; gap: 22px; font-size: var(--fs-data); color: var(--on-ink-muted); }
.menu__contact { display: flex; flex-direction: column; gap: 8px; }
.menu__contact a { color: var(--signal-on-ink); }
.menu__cta { align-self: flex-start; }
.menu__link { position: relative; }
.menu__link.is-current::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px; background: var(--signal-on-ink); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; font-weight: 500; font-size: 15px; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: 0; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color .25s var(--ease-out), border-color .25s var(--ease-out), background-color .25s var(--ease-out);
}
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: right center; transition: transform .45s var(--ease-inout); }
.btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--primary { background: var(--signal); color: var(--on-ink-text); border-color: var(--signal); }
.btn--primary::before { background: var(--signal-hover); }
[data-theme="ink"] .btn--primary::before { background: var(--signal-on-ink); }
[data-theme="ink"] .btn--primary:hover { color: var(--ink); }
.btn--ghost { background: transparent; color: var(--slate); border-color: var(--slate); }
.btn--ghost::before { background: var(--slate); }
.btn--ghost:hover { color: var(--on-ink-text); }
[data-theme="ink"] .btn--ghost { color: var(--on-ink-text); border-color: var(--ink-rule); }
[data-theme="ink"] .btn--ghost::before { background: var(--on-ink-text); }
[data-theme="ink"] .btn--ghost:hover { color: var(--ink); border-color: var(--on-ink-text); }
.header .btn--ghost { border-color: var(--line); color: var(--fg); }
.header .btn--ghost::before { background: var(--fg); }
.header .btn--ghost:hover { color: var(--bg); border-color: var(--fg); }
.btn__arrow { display: inline-block; width: 14px; height: 1.5px; background: currentColor; position: relative; transition: transform .35s var(--ease-out); }
.btn__arrow::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateY(-.5px) rotate(45deg); transform-origin: center; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.textlink { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--fg); text-decoration: none; }
.textlink .btn__arrow { color: var(--accent); }
.textlink:hover { color: var(--accent); }

/* ---------- Cards, callouts, lists ---------- */
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); padding: 28px; position: relative; }
.card--pad-lg { padding: 36px; }
.card .kicker { display: block; margin-bottom: 14px; }
.card .h3 { margin-bottom: 12px; }
.card .body, .card p { color: var(--fg-body); }
.card .body + .card__meta, .card p + .card__meta { margin-top: auto; }
.card > .body:last-of-type, .card > p:last-of-type { margin-bottom: 18px; }
.card--hover { transition: transform .5s var(--ease-out), border-color .3s; }
.card--hover::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top center; transition: transform .45s var(--ease-out); }
.card--hover:hover::after { transform: scaleY(1); }
.card__meta { display: block; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-label); }

.callout { border-left: 3px solid var(--slate); background: var(--tint-neutral); padding: 16px 20px; font-size: var(--fs-small); color: #44484D; max-width: 32em; }
.callout--signal { border-left-color: var(--signal); background: var(--tint-signal); color: #353E47; }
.callout--amber { border-left-color: #986438; background: var(--tint-amber); color: #453B32; }
[data-theme="ink"] .callout { background: var(--ink-panel); color: var(--on-ink-body); border-left-color: var(--on-ink-muted); }
[data-theme="ink"] .callout--signal { border-left-color: var(--signal-on-ink); }

.list-rules { border-top: 1px solid var(--line); }
.list-rules > li { display: grid; grid-template-columns: 72px 1fr; column-gap: var(--gap); padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.list-rules .num { line-height: inherit; }
.list-rules .h3 { margin-bottom: 6px; }
.list-rules p { max-width: 32em; }

.list-numbered { counter-reset: item; }
.list-numbered > li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; padding: 10px 0; }
.list-numbered > li::before { counter-increment: item; content: counter(item, decimal-leading-zero); font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .18em; color: var(--accent); padding-top: .5em; }

.stat { border-top: 1px solid var(--line); padding-top: 18px; }
.stat__value { font-family: var(--mono); font-size: clamp(28px, 3vw, 40px); color: var(--fg); letter-spacing: -.01em; line-height: 1; }
.stat__label { display: block; margin-top: 10px; font-size: var(--fs-small); color: var(--fg-muted); }

/* ---------- Tag (small mono flag, e.g. "sample data") ---------- */
.tag { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 2px 6px; border: 1px solid var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted); line-height: 1.3; }
.tag--ink { border-color: var(--ink-rule); color: var(--on-ink-muted); }

/* ---------- Data tables ---------- */
.table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: var(--fs-data); color: var(--fg-data); }
.table th { text-align: left; font-weight: 400; font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); padding: 0 16px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.console .table td, .card .table td { border-bottom-color: var(--line-2); }
.table td.sans { font-family: var(--sans); white-space: normal; }
.table tr:last-child td { border-bottom: 0; }
.verdict { font-family: var(--mono); }
.verdict--allow { color: var(--allow); } .verdict--hold { color: var(--hold); } .verdict--deny { color: var(--deny); }
[data-theme="ink"] .verdict--allow, .console__bar .verdict--allow { color: var(--allow-on-ink); } [data-theme="ink"] .verdict--hold { color: var(--hold-on-ink); } [data-theme="ink"] .verdict--deny { color: var(--deny-on-ink); }
.hash { color: var(--descriptor); }
[data-theme="ink"] .hash { color: var(--on-ink-muted); }

/* ---------- Console mock ---------- */
.console { position: relative; border: 1px solid var(--line); background: var(--panel); color: var(--data); font-family: var(--mono); font-size: var(--fs-data); overflow: hidden; }
.console__bar { display: flex; align-items: center; gap: 28px; height: 58px; padding: 0 20px; background: var(--ink); color: var(--on-ink-body); }
.console__bar .lockup { gap: 9px; }
.console__bar .lockup .mark { width: 18px; }
.console__bar .mark__c1 { fill: var(--signal-on-ink); }
.console__bar .mark__c2, .console__bar .mark__c3, .console__bar .mark__c4 { fill: var(--rule-light); }
.console__bar .lockup__word { font-size: 15px; letter-spacing: .05em; color: var(--on-ink-text); }
.console__nav { display: flex; gap: 22px; height: 100%; }
.console__tab { position: relative; display: inline-flex; align-items: center; height: 100%; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--on-ink-body); text-decoration: none; background: none; }
.console__tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--signal-on-ink); transform: scaleX(0); transition: transform .35s var(--ease-out); }
.console__tab.is-active { color: var(--on-ink-text); }
.console__tab.is-active::after { transform: scaleX(1); }
.console__status { margin-left: auto; color: var(--on-ink-muted); font-size: 12px; }
.console__user { width: 26px; height: 26px; background: var(--slate); color: var(--rule-light); font-family: var(--sans); font-weight: 600; font-size: 11px; display: grid; place-items: center; }
.console__body { padding: 20px 20px 8px; min-height: 300px; overflow-x: auto; overflow-y: hidden; }
.console__body .table th { color: var(--muted); }
.console__pane { display: none; }
.console__pane.is-active { display: block; }
.console__actions { display: flex; gap: 8px; }
.console__action { height: 28px; padding: 0 10px; font-family: var(--sans); font-size: 12px; font-weight: 500; border: 1px solid var(--slate); color: var(--slate); background: transparent; }
.console__action--primary { background: var(--signal); border-color: var(--signal); color: var(--on-ink-text); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: var(--fs-small); font-weight: 500; color: var(--fg); }
.field .hint { font-size: 13px; color: var(--fg-muted); }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; color: var(--fg); font-size: 15px; transition: border-color .2s; -webkit-appearance: none; appearance: none; }
.textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--signal); }
.select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23263541' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: calc(100% - 14px) center; background-size: 12px 8px; background-repeat: no-repeat; }
.field.is-invalid .input, .field.is-invalid .textarea, .field.is-invalid .select { border-color: #986438; }
.field__error { font-family: var(--mono); font-size: 12px; color: #986438; display: none; }
.field.is-invalid .field__error { display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--on-ink-body); border-top: 1px solid var(--ink-rule); }
.footer__inner { border-left: 1px solid var(--ink-rule); border-right: 1px solid var(--ink-rule); padding-top: 72px; padding-bottom: 40px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px var(--gap); }
.footer__line { margin-top: 24px; max-width: 26em; color: var(--on-ink-body); }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col .kicker { margin-bottom: 8px; color: var(--on-ink-muted); }
.footer__col a { color: var(--on-ink-body); text-decoration: none; font-size: 15px; }
.footer__col a:hover { color: var(--on-ink-text); }
.footer__col .mono { font-size: 13px; color: var(--on-ink-body); }
.footer__col a.mono:hover { color: var(--signal-on-ink); }
.footer__legal { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--ink-rule); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-muted); }

/* ---------- Curtain (page transitions and first load) ---------- */
.curtain { position: fixed; inset: 0; z-index: 1500; background: var(--ink); display: grid; place-items: center; pointer-events: none; clip-path: inset(0 0 0 0); }
.curtain.is-idle { clip-path: inset(100% 0 0 0); }
.curtain__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.curtain__mark .mark { width: 64px; }
.curtain__label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-ink-muted); min-height: 1.4em; }
.curtain__mark .mark__c1 { fill: var(--signal-on-ink); }
.curtain__mark .mark__c2, .curtain__mark .mark__c3, .curtain__mark .mark__c4 { fill: var(--rule-light); }
.curtain__mark .mark__c { transform-box: fill-box; transform-origin: left center; }
.no-js .curtain { display: none; }
.no-js .nav { display: flex !important; }
.no-js .burger { display: none !important; }
.no-js .readout { display: none; }

/* ---------- Scroll readout (desktop) ---------- */
.readout { position: fixed; right: 22px; bottom: 32px; z-index: 800; display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--fg-label); pointer-events: none; opacity: 0; transition: opacity .6s .4s; writing-mode: vertical-rl; transform: rotate(180deg); }
.readout.is-on { opacity: 1; }
.readout__bar { width: 1px; height: 72px; background: var(--line); position: relative; overflow: hidden; }
.readout__fill { position: absolute; inset: 0; background: var(--accent); transform-origin: center top; transform: scaleY(0); }
.readout__pct::after { content: '%'; }
.readout[data-theme="ink"] { background: transparent; color: var(--on-ink-muted); --line: var(--ink-rule); --accent: var(--signal-on-ink); }

/* ---------- Crosshair (survey cursor on Ink heroes) ---------- */
.xhair { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .4s; }
.xhair.is-on { opacity: 1; }
.xhair__h, .xhair__v { position: absolute; background: var(--ink-rule); }
.xhair__h { left: 0; right: 0; height: 1px; top: 0; }
.xhair__v { top: 0; bottom: 0; width: 1px; left: 0; }
.xhair__read { position: absolute; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--on-ink-muted); transform: translate(12px, 10px); white-space: nowrap; }

/* ---------- Reveal system (JS adds .is-in; without JS everything shows) ---------- */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-in { opacity: 1; }
.js [data-reveal="up"] { transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.js [data-reveal="up"].is-in { transform: none; }
.js [data-reveal="fade"] { transition: opacity .9s var(--ease-out); }
.js [data-reveal="draw"] { opacity: 1; transform: scaleX(0); transform-origin: left center; transition: transform 1s var(--ease-inout); }
.js [data-reveal="draw"].is-in { transform: scaleX(1); }
.js [data-reveal="draw-y"] { opacity: 1; transform: scaleY(0); transform-origin: top center; transition: transform 1s var(--ease-inout); }
.js [data-reveal="draw-y"].is-in { transform: scaleY(1); }
.js [data-reveal="frame"] { opacity: 1; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease-inout); }
.js [data-reveal="frame"].is-in { clip-path: inset(0 0 0 0); }
/* stagger children */
.js [data-reveal-group] > * { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); }
.js [data-reveal-group].is-in > * { opacity: 1; transform: none; }
.js [data-reveal-group].is-in > *:nth-child(1) { transition-delay: 0s; } .js [data-reveal-group].is-in > *:nth-child(2) { transition-delay: .08s; }
.js [data-reveal-group].is-in > *:nth-child(3) { transition-delay: .16s; } .js [data-reveal-group].is-in > *:nth-child(4) { transition-delay: .24s; }
.js [data-reveal-group].is-in > *:nth-child(5) { transition-delay: .32s; } .js [data-reveal-group].is-in > *:nth-child(6) { transition-delay: .40s; }
.js [data-reveal-group].is-in > *:nth-child(7) { transition-delay: .48s; } .js [data-reveal-group].is-in > *:nth-child(8) { transition-delay: .56s; }
/* line-split headings: JS wraps lines in .line > .line__in */
.js [data-split] { opacity: 1; }
.js [data-split] .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.js [data-split] .line__in { display: block; transform: translateY(110%); transition: transform 1s var(--ease-out); }
.js [data-split].is-in .line__in { transform: none; }
.js [data-split].is-in .line:nth-child(2) .line__in { transition-delay: .09s; }
.js [data-split].is-in .line:nth-child(3) .line__in { transition-delay: .18s; }
.js [data-split].is-in .line:nth-child(4) .line__in { transition-delay: .27s; }
.js [data-split].is-in .line:nth-child(5) .line__in { transition-delay: .36s; }

/* ---------- Hero cover block (Ink) ---------- */
.cover { position: relative; background: var(--ink); color: var(--on-ink-body); overflow: hidden; }
.cover > .container { position: relative; border-left: 1px solid var(--ink-rule); border-right: 1px solid var(--ink-rule); min-height: 100svh; padding-top: calc(var(--header-h) + 56px); padding-bottom: 56px; display: flex; flex-direction: column; justify-content: flex-end; }
.cover .display { color: var(--on-ink-text); letter-spacing: -.02em; line-height: 1.12; }
.cover .kicker { color: var(--signal-on-ink); }
.cover .lead { color: var(--on-ink-body); }
.cover .btn--ghost { color: var(--on-ink-text); border-color: var(--ink-rule); }
.cover .btn--ghost:hover { color: var(--ink); border-color: var(--on-ink-text); }
.cover .btn--ghost::before { background: var(--on-ink-text); }
.cover__grid { position: absolute; inset: 0; pointer-events: none; opacity: .32;
  background-image: linear-gradient(var(--ink-rule-2) 1px, transparent 1px), linear-gradient(90deg, var(--ink-rule-2) 1px, transparent 1px);
  background-size: 96px 96px; background-position: 0 0; }

/* Paper hero (inner pages) */
.hero { background: var(--paper); }
.hero > .container { padding-top: calc(var(--header-h) + clamp(56px, 8vw, 112px)); padding-bottom: clamp(56px, 7vw, 96px); }
.hero .kicker { display: block; margin-bottom: 22px; }
.hero .lead { margin-top: 24px; }
.hero .btn-row { margin-top: 32px; }

/* Closing CTA block */
.close { background: var(--ink); color: var(--on-ink-body); }
.close > .container { border-color: var(--ink-rule); padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.close .h1 { color: var(--on-ink-text); }
.close .kicker { color: var(--signal-on-ink); }
.close .mono { color: var(--on-ink-muted); }

/* ---------- Utilities ---------- */
.u-hide { display: none !important; }
.u-mt-1 { margin-top: 8px; } .u-mt-2 { margin-top: 16px; } .u-mt-3 { margin-top: 24px; } .u-mt-4 { margin-top: 32px; } .u-mt-5 { margin-top: 48px; } .u-mt-6 { margin-top: 64px; }
.u-mb-1 { margin-bottom: 8px; } .u-mb-2 { margin-bottom: 16px; } .u-mb-3 { margin-bottom: 24px; } .u-mb-4 { margin-bottom: 32px; } .u-mb-5 { margin-bottom: 48px; }
.u-fg { color: var(--fg); }
.u-muted { color: var(--fg-muted); }
.u-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sticky { position: sticky; top: calc(var(--header-h) + 24px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --pad: 48px; }
}
@media (max-width: 1340px) {
  .readout { display: none; }
}
@media (max-width: 900px) {
  :root { --pad: 24px; --header-h: 60px; }
  .nav { display: none; }
  .header__actions .btn { display: none; }
  .burger { display: block; }
  .section > .container, .cover > .container, .footer__inner, .close > .container { border-left: 0; border-right: 0; }
  .section-head { grid-template-columns: 1fr; row-gap: 12px; }
  .list-rules > li { grid-template-columns: 1fr; row-gap: 8px; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .start-7, .start-8, .start-9 { grid-column: span 12; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .readout { display: none; }
  .cover > .container { min-height: 92svh; }
  .sticky { position: static; }
}
@media (max-width: 560px) {
  :root { --pad: 20px; }
  .console__bar { gap: 16px; padding: 0 14px; }
  .console__bar .lockup__word, .console__status { display: none; }
  .console__nav { gap: 14px; }
  .console__tab { font-size: 13px; }
  .footer__cols { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .menu__link { padding: 14px 0; }
  .card, .card--pad-lg { padding: 22px; }
}
@media (hover: none), (pointer: coarse) {
  .xhair { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-reveal-group] > *, .js [data-split] .line__in { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .curtain { display: none !important; }
}


/* ===== pages/assurance.css ===== */
/* ---------- Assurance: shared ---------- */
.as-ok { color: var(--signal-on-ink); }
.as-strong { color: var(--on-ink-text); }
.as-nowrap { white-space: nowrap; }
.as-bar__lead { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.as-tag { display: inline-block; padding: 2px 6px; border: 1px solid var(--line); font-size: 10px; letter-spacing: .08em; line-height: 1.4; color: var(--fg-muted); white-space: nowrap; }

/* ---------- Assurance: hero ---------- */
.as-hero .display { max-width: 16em; }
.as-hero__grid { align-items: end; row-gap: 40px; margin-top: 28px; }
.as-hero__text { align-self: start; }
.as-hero__grid .lead { margin-top: 0; }
.as-hero__text { min-width: 0; }
.as-hero__link { margin-top: 28px; }
.as-hero__panel { margin: 0; border-top: 1px solid var(--line); font-size: var(--fs-data); }
.as-hero__panel > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.as-hero__panel dt { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-label); }
.as-hero__panel dd { margin: 0; color: var(--fg-2); }
.as-hero__panel #hero-head { color: var(--fg-data); }

/* ---------- Assurance: 01 chain ---------- */
.as-chain-grid { align-items: start; }
.as-chain-facts { margin-top: 24px; }
@media (min-width: 901px) {
  .as-chain-grid { grid-template-rows: auto 1fr; }
  .as-chain-grid .as-chain-demo { grid-row: 1 / 3; }
  .as-chain-grid .as-chain-facts { grid-column: 1 / 6; grid-row: 2; align-self: start; }
}

.as-chain { background: var(--card); border: 1px solid var(--line); }
.as-chain__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 46px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.as-chain__bar .kicker { color: var(--fg-label); }
.as-chain__meta { font-size: 11px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.as-chain__ctl { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px 0; }
.as-chain__ctl .btn { height: 34px; padding: 0 14px; font-size: 13px; border-color: var(--slate); color: var(--slate); transition: color .25s var(--ease-out), border-color .25s var(--ease-out), opacity .25s; }
.as-chain__ctl .btn::before { background: var(--slate); }
.as-chain__ctl .btn:hover { color: var(--card); }
.as-chain__ctl .btn[disabled] { opacity: .35; cursor: default; pointer-events: none; }

.as-chain__stack { position: relative; padding: 22px 18px 4px; }
.as-chain__links { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; opacity: 0; transition: opacity .4s; }
.as-chain__links.is-on { opacity: 1; }
.as-chain__links path { fill: none; stroke: var(--slate); stroke-width: 1; }
.as-chain__links path.is-broken { stroke-dasharray: 3 3; }
.as-chain__links path.is-unverified { stroke-dasharray: 3 3; stroke: var(--label); }
.as-chain__links path.as-strike { stroke: var(--slate); stroke-width: 1.5; stroke-dasharray: none; }
.as-chain__links rect { fill: var(--slate); }
.as-chain__links rect.is-unverified { fill: var(--label); }

.as-chain__list > * + * { margin-top: 26px; }
.as-chain__entry { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 11px 14px 12px; overflow: hidden; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--data); }
.as-chain__entry.is-removed { display: none; }
.as-chain__entry::before { content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 2px; background: var(--slate); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease-out); }
.as-chain__entry.is-altered::before { transform: scaleY(1); }
.as-chain__r1, .as-chain__r2 { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; }
.as-chain__r2 { margin-top: 5px; }
.as-chain__seq { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.as-chain__action { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-chain__prev, .as-chain__hash { white-space: nowrap; }
.as-chain__lbl { font-size: 11px; letter-spacing: .06em; color: var(--label); }
.as-chain__prev .as-chain__val { color: var(--descriptor); }
.as-chain__val--genesis { letter-spacing: .04em; }
.as-chain__hash .as-chain__val { color: var(--data); }
.as-chain__flag { display: inline-block; margin-left: 10px; font-size: 11px; letter-spacing: .08em; color: var(--deny); }
.as-chain__flag--unverified { color: var(--muted); }
.as-chain__flag[hidden] { display: none; }
.as-chain__gap { border: 1px dashed var(--rule); padding: 7px 14px; font-size: 11px; letter-spacing: .08em; color: var(--muted); line-height: 1.5; overflow: hidden; white-space: nowrap; }
.as-chain__gap[hidden] { display: none; }

.as-chain__verify { margin: 18px; padding: 11px 16px; min-height: 66px; background: var(--ink); border: 1px solid var(--ink-rule); color: var(--on-ink-body); font-size: 12.5px; line-height: 1.75; }
.as-chain__cmd { display: block; color: var(--on-ink-text); min-height: 1.75em; }
.as-chain__status { display: block; min-height: 1.75em; }
.as-chain__status b { font-weight: 400; }
.as-chain__status .as-bad { color: var(--deny-on-ink, #D0605E); }
.as-chain__cursor { display: inline-block; width: 7px; height: 13px; margin-left: 1px; background: var(--on-ink-body); vertical-align: -2px; animation: term-blink 1s steps(1) infinite; }

/* ---------- Assurance: 02 replay ---------- */
.as-replay-grid { align-items: start; }
.as-replay { background: var(--card); border: 1px solid var(--line); }
.as-replay__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 46px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.as-replay__bar .kicker { color: var(--fg-label); }
.as-replay__meta { font-size: 11px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.as-replay__track { position: relative; height: 76px; margin: 14px 18px 0; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.as-replay__track:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.as-replay__rail { position: absolute; left: calc(100% / 18); right: calc(100% / 18); top: 30px; height: 1px; background: var(--rule); }
.as-replay__fill { position: absolute; left: calc(100% / 18); top: 30px; height: 1px; width: 0; background: var(--signal); }
.as-replay__ticks { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); height: 100%; }
.as-replay__tick { display: flex; flex-direction: column; align-items: center; padding-top: 24px; min-width: 0; }
.as-replay__tick::before { content: ''; display: block; width: 1px; height: 13px; background: var(--slate); }
.as-replay__lbl { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--label); transition: color .3s; }
.as-replay__tick.is-active .as-replay__lbl { color: var(--fg); }
.as-replay__marker { position: absolute; left: 0; top: 23px; width: 7px; height: 15px; margin-left: -3.5px; background: var(--signal); pointer-events: none; }
.as-replay__hint { margin: 2px 18px 0; font-size: 13px; line-height: 1.5; color: var(--fg-muted); }

.as-replay__panel { margin: 14px 18px 0; border-top: 1px solid var(--line); }
.as-replay__panel > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
.as-replay__panel dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--label); padding-top: 2px; }
.as-replay__panel dd { margin: 0; color: var(--data); overflow-wrap: anywhere; }
.as-replay__panel .as-replay__hash { color: var(--descriptor); }
.as-replay__line { margin: 18px; padding: 11px 16px; background: var(--ink); border: 1px solid var(--ink-rule); color: var(--on-ink-body); font-size: 12.5px; line-height: 1.7; }
.as-replay__cmd { color: var(--on-ink-text); }
.as-replay__sep { color: var(--on-ink-muted); margin: 0 4px; }
.as-replay__line .verdict--allow { color: var(--allow-on-ink, #4FA868); }
.as-replay__line .verdict--hold { color: var(--hold-on-ink, #D08A2E); }
.as-replay__line .verdict--deny { color: var(--deny-on-ink, #D0605E); }

/* ---------- Assurance: 03 threat model ---------- */
.as-threats { row-gap: 48px; }
.as-threats__head { padding-bottom: 14px; border-bottom: 1px solid var(--slate); }
.as-threats__list > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.as-threats__list .num { padding-top: .5em; }
.as-threats__list p { max-width: 32em; color: var(--fg-body); }
.as-threats__list strong { font-weight: 600; color: var(--fg); }
.as-threats__callout { margin-top: 56px; padding: 18px 22px; line-height: 1.5; }

/* ---------- Assurance: 04 standards ---------- */
.as-standards { overflow-x: auto; }
.as-standards__tbl th { padding: 0 24px 12px 0; }
.as-standards__tbl th:last-child { padding-right: 0; }
.as-standards__tbl td { padding: 20px 24px 20px 0; white-space: normal; line-height: 1.5; border-bottom: 1px solid var(--line); }
.as-standards__tbl td:last-child { padding-right: 0; }
.as-standards__tbl tr:last-child td { border-bottom: 1px solid var(--line); }
.as-standards__c1 { width: 26%; } .as-standards__c2 { width: 37%; } .as-standards__c3 { width: 37%; }
.as-standards__tbl td.as-standards__fw { font-family: var(--sans); font-weight: 500; font-size: 15px; color: var(--fg); }
.as-standards__tbl td.as-standards__fw--code { font-family: var(--mono); font-weight: 400; font-size: 12.5px; color: var(--fg-data); }
.as-standards__tbl td.sans { font-size: 15px; color: var(--fg-body); }
.as-standards__note { margin-top: 20px; max-width: 32em; }

/* ---------- Assurance: 05 independence ---------- */
.as-indep { align-items: start; }
.as-indep__facts { margin-top: 32px; }
.as-indep__term .term__body { min-height: 150px; font-size: 12.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .as-standards__tbl td.sans, .as-standards__tbl td.as-standards__fw { font-size: 14px; }
  .as-indep__term .term__body { font-size: 12px; }
  .as-chain__verify, .as-replay__line { font-size: 12px; padding: 11px 14px; }
}
@media (max-width: 900px) {
  .as-hero__grid { row-gap: 40px; }
  .as-hero__panel { max-width: 30em; }
  .as-chain-facts { margin-top: 16px; }
  .as-threats { row-gap: 40px; }
  .as-threats__callout { margin-top: 40px; }
}
@media (max-width: 560px) {
  .as-hero__panel > div { grid-template-columns: 80px minmax(0, 1fr); }
  .as-chain__bar, .as-replay__bar { height: auto; min-height: 46px; padding: 12px 16px; flex-wrap: wrap; row-gap: 8px; }
  .as-chain__ctl { padding: 14px 14px 0; }
  .as-chain__stack { padding: 20px 14px 2px; }
  .as-chain__entry { padding: 10px 11px 11px; font-size: 12px; }
  .as-chain__r1, .as-chain__r2 { grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 8px; }
  .as-chain__lbl { letter-spacing: .03em; }
  .as-chain__flag { margin-left: 8px; letter-spacing: 0; }
  .as-chain__verify, .as-replay__line { margin: 14px; padding: 10px 14px; font-size: 12px; }
  .as-replay__track { margin: 12px 8px 0; }
  .as-replay__lbl { font-size: 10px; letter-spacing: 0; }
  .as-replay__hint { margin: 4px 14px 0; }
  .as-replay__panel { margin: 12px 14px 0; }
  .as-replay__panel > div { grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; font-size: 12px; }
  .as-standards__tbl thead { display: none; }
  .as-standards__tbl, .as-standards__tbl tbody, .as-standards__tbl tr, .as-standards__tbl td { display: block; width: auto; }
  .as-standards__tbl tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .as-standards__tbl tr:first-child { border-top: 1px solid var(--line); }
  .as-standards__tbl td { padding: 0; border-bottom: 0; }
  .as-standards__tbl tr:last-child td { border-bottom: 0; }
  .as-standards__tbl td.as-standards__fw { font-size: 15px; }
  .as-standards__tbl td.sans { margin-top: 12px; font-size: 15px; }
  .as-standards__tbl td.sans::before { content: attr(data-label); display: block; margin-bottom: 4px; font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
}


/* ===== pages/company.css ===== */
/* ---------- Company: hero (text left, company panel bottom-right) ---------- */
.co-hero__grid { align-items: start; }
.co-hero__link { margin-top: 28px; }
.co-hero__panel { align-self: end; margin: 0; }
.co-hero__row { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: 1.5; }
.co-hero__row:last-child { border-bottom: 1px solid var(--line); }
.co-hero__row dt { color: var(--fg-muted); }
.co-hero__row dd { margin: 0; color: var(--fg-data); }
.co-hero__row dd.mono { font-size: var(--fs-data); }

/* ---------- Company: 01 the name (the mark built course by course) ----------
   The stage is the mark's own 14u x 11u box. Leaders and labels are placed in
   percentages of that box, so they track the geometry at any width:
   course centres at 1u, 4u, 7u, 10u of 11u; right edges at 7u, 11u, 13u, 14u of 14u. */
.co-name__visual { margin: 0; padding-top: 6px; }
.co-name__stage { position: relative; width: min(320px, calc(100% - 176px)); }
.co-name__stage .mark { width: 100%; height: auto; }
.co-name__stage .mark__c { transform-box: fill-box; transform-origin: left center; }
.co-name__lead { position: absolute; height: 1px; background: var(--fg-label); transform-origin: left center; pointer-events: none; }
.co-name__lead[data-course="1"] { top: 9.0909%; left: calc(50% + 8px); width: calc(50% + 20px); }
.co-name__lead[data-course="2"] { top: 36.3636%; left: calc(78.5714% + 8px); width: calc(21.4286% + 20px); }
.co-name__lead[data-course="3"] { top: 63.6364%; left: calc(92.8571% + 8px); width: calc(7.1429% + 20px); }
.co-name__lead[data-course="4"] { top: 90.9091%; left: calc(100% + 8px); width: 20px; }
.co-name__label { position: absolute; left: calc(100% + 36px); margin-top: -.5em; font-size: 12px; line-height: 1; letter-spacing: .04em; color: var(--fg-muted); white-space: nowrap; }
.co-name__label[data-course="1"] { top: 9.0909%; }
.co-name__label[data-course="2"] { top: 36.3636%; }
.co-name__label[data-course="3"] { top: 63.6364%; }
.co-name__label[data-course="4"] { top: 90.9091%; }
.co-name__label--head { color: var(--accent); }
.co-name__caption { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .08em; color: var(--fg-label); }

/* ---------- Company: 02 principles (numeral, first sentence, second sentence on one baseline) ---------- */
.co-principles > li { grid-template-columns: 72px minmax(0, 5fr) minmax(0, 6fr); align-items: baseline; padding: 26px 0; }
.co-principles .num { padding-top: 0; }
.co-principles .h3 { margin-bottom: 0; }
.co-principles .body { margin-top: 0; max-width: 32em; }

/* ---------- Company: 03 founders ---------- */
.co-founder { display: flex; flex-direction: column; }
.co-founder__head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.co-founder__initials { flex: none; width: 56px; height: 56px; background: var(--slate); color: var(--rule-light); font-family: var(--sans); font-weight: 600; font-size: 22px; letter-spacing: .02em; line-height: 1; display: grid; place-items: center; }
.co-founder .co-founder__name { margin-bottom: 4px; }
.co-founder .co-founder__role { color: var(--fg-muted); }
.co-founder__bio { margin-bottom: 22px; }
.co-founder .card__meta { margin-top: auto; }

/* ---------- Company: 04 where and how (facts table on Paper; row headers sans, values sans, email mono) ---------- */
.co-facts { border-top: 1px solid var(--line); font-family: var(--sans); }
.co-facts th, .co-facts td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); white-space: normal; vertical-align: baseline; line-height: 1.5; }
.co-facts th { width: 148px; text-align: left; font-family: var(--sans); font-weight: 400; font-size: var(--fs-small); letter-spacing: 0; text-transform: none; color: var(--fg-muted); }
.co-facts td { padding-right: 0; font-size: var(--fs-small); color: var(--fg-body); }
.co-facts td.co-facts__mono { font-family: var(--mono); font-size: var(--fs-data); }
.co-facts tr:last-child th, .co-facts tr:last-child td { border-bottom: 1px solid var(--line); }
.co-facts a { color: var(--accent); }

/* ---------- Company: close ---------- */
.co-close__mail { font-size: 13px; color: var(--on-ink-muted); text-decoration: none; margin-left: 8px; }
.co-close__mail:hover { color: var(--signal-on-ink); }

/* ---------- Company: responsive ---------- */
@media (max-width: 1100px) {
  .co-hero__row { grid-template-columns: 84px minmax(0, 1fr); column-gap: 12px; }
}
@media (max-width: 900px) {
  .co-hero__row { grid-template-columns: 92px minmax(0, 1fr); column-gap: 16px; }
  .co-hero__panel { margin-top: 24px; }
  .co-name__col { order: -1; }
  .co-name__visual { padding-top: 0; margin-bottom: 8px; }
  .co-principles > li { grid-template-columns: 1fr; row-gap: 6px; padding: 22px 0; }
  .co-principles .num { margin-bottom: 4px; }
  .co-principles .body { margin-top: 2px; }
}
@media (max-width: 560px) {
  .co-name__stage { width: min(320px, calc(100% - 158px)); }
  .co-name__label { left: calc(100% + 26px); font-size: 11px; letter-spacing: .02em; }
  .co-name__lead[data-course="1"] { width: calc(50% + 10px); }
  .co-name__lead[data-course="2"] { width: calc(21.4286% + 10px); }
  .co-name__lead[data-course="3"] { width: calc(7.1429% + 10px); }
  .co-name__lead[data-course="4"] { width: 10px; }
  .co-name__caption { gap: 6px 20px; }
  .co-founder__head { gap: 16px; }
  .co-facts th { width: 104px; }
  .co-close__mail { margin-left: 0; }
}


/* ===== pages/contact.css ===== */
/* ---------- Contact: hero (Paper, shorter than the other inner pages) ---------- */
.contact-hero > .container { padding-top: calc(var(--header-h) + clamp(48px, 6vw, 88px)); padding-bottom: clamp(40px, 5vw, 72px); }
.contact-hero__grid { align-items: end; }
.contact-hero .lead { max-width: 30em; }

/* Direct panel: hairline rows, bottom-aligned with the lead */
.contact-hero__panel .kicker { display: block; margin-bottom: 14px; }
.contact-hero__rows { margin: 0; border-bottom: 1px solid var(--line); }
.contact-hero__row { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-hero__row dt { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-label); }
.contact-hero__row dd { margin: 0; font-size: var(--fs-data); color: var(--fg-data); overflow-wrap: anywhere; }
.contact-hero__row .contact-hero__sans { font-family: var(--sans); font-size: var(--fs-small); color: var(--fg-2); }
.contact-hero__mail { color: var(--fg); text-decoration: none; transition: color .2s; }
.contact-hero__mail:hover { color: var(--accent); }

/* ---------- Contact: form and aside ---------- */
/* Vertical padding sits on the container so the section rule and hairlines stay put. */
.contact-main > .container { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(72px, 9vw, 128px); }
/* Warning colour for the failure status line: the amber callout border from the brand sheet. Verdict colours never appear on this page. */
.contact-main { --contact-warn: #986438; }

.contact-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 18px; margin-bottom: 28px; border-bottom: 1px solid var(--line-2); }
.contact-card__head .kicker { margin-bottom: 0; }
.contact-card__head .kicker b { font-weight: 400; color: var(--fg-2); }

.contact-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.contact-form__grid .field--full { grid-column: 1 / -1; }
.contact-form .field label { transition: color .2s var(--ease-out); }
.contact-form .field:focus-within label { color: var(--accent); }
.contact-form .field__opt { font-weight: 400; font-size: 13px; color: var(--fg-muted); margin-left: 6px; }
.contact-form .input::placeholder, .contact-form .textarea::placeholder { color: var(--fg-label); opacity: 1; }
.contact-form .textarea { min-height: 148px; }
.contact-form .field.is-invalid .input:focus, .contact-form .field.is-invalid .select:focus, .contact-form .field.is-invalid .textarea:focus { border-color: var(--signal); }
.contact-form .field__error { letter-spacing: .02em; }
.contact-form__hp { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }

.contact-form__fail { margin-top: 24px; max-width: 32em; }
.contact-form__fail-code { display: block; font-size: 12px; letter-spacing: .06em; margin-bottom: 6px; color: var(--contact-warn); }
.contact-form__fail-code b { font-weight: 400; }
.contact-card .contact-form__fail p { color: inherit; font-size: var(--fs-small); max-width: 32em; }

.contact-form__actions { margin-top: 28px; }
.contact-form__note { margin-top: 14px; }
.contact-form__note .mono { font-size: 13px; color: var(--fg-2); }
.contact-form__privacy { margin-top: 6px; }
.contact-form__privacy a, .contact-done__again { font-size: var(--fs-small); font-weight: 500; color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--accent-underline); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.contact-form__privacy a:hover, .contact-done__again:hover { color: var(--accent); text-decoration-color: currentColor; }
.contact-form .btn:disabled { cursor: default; }
.contact-form .btn.is-busy { border-color: var(--signal-hover); background: var(--signal-hover); }
.contact-form .btn.is-busy .btn__arrow { animation: contact-blink 1s steps(1) infinite; }
@keyframes contact-blink { 50% { opacity: .25; } }

/* Success states (endpoint: Received; mailto: Handed to your mail client) */
.contact-done .kicker { display: block; margin-bottom: 18px; }
.contact-done__heading { margin-bottom: 18px; max-width: 16em; }
.contact-done__heading:focus { outline: none; }
.contact-done .body { max-width: 32em; }
.contact-done__ref { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: var(--fs-data); color: var(--fg-muted); letter-spacing: .04em; }
.contact-done__ref b { font-weight: 400; color: var(--fg-data); }
.contact-done__again { display: inline-block; margin-top: 24px; }
.contact-handed__msg { margin: 24px 0 0; padding: 16px 18px; max-height: 420px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-data); line-height: 1.7; color: var(--fg-data); white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-handed__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }
.contact-handed__copied { font-size: 12px; letter-spacing: .06em; color: var(--fg-muted); }

/* Aside */
.contact-aside__block { padding: 24px 0 28px; border-top: 1px solid var(--line); }
.contact-aside__block:last-child { border-bottom: 1px solid var(--line); }
.contact-aside .kicker { display: block; margin-bottom: 16px; }
.contact-aside__list > li { font-size: var(--fs-small); color: var(--fg-body); padding: 8px 0; grid-template-columns: 32px 1fr; column-gap: 12px; }
.contact-aside__list > li:first-child { padding-top: 0; }
.contact-aside__list > li:last-child { padding-bottom: 0; }
.contact-aside__list > li::before { padding-top: .45em; }
.contact-aside__text { max-width: 30em; }
.contact-aside__pick { margin-top: 14px; font-size: var(--fs-small); }

/* ---------- Contact: Ink strip ---------- */
.contact-strip > .container { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.contact-strip__grid { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; column-gap: var(--gap); align-items: baseline; }
.contact-strip__mail { position: relative; display: inline-block; font-size: clamp(1.125rem, .55rem + 1.65vw, 1.75rem); line-height: 1.2; letter-spacing: -.01em; color: var(--fg); text-decoration: none; transition: color .25s var(--ease-out); }
.contact-strip__mail::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right center; transition: transform .45s var(--ease-inout); }
.contact-strip__mail:hover { color: var(--accent); }
.contact-strip__mail:hover::after { transform: scaleX(1); transform-origin: left center; }
.contact-strip__loc { font-size: var(--fs-data); color: var(--fg-muted); white-space: nowrap; }

/* ---------- Contact: responsive ---------- */
@media (max-width: 900px) {
  .contact-hero__panel { margin-top: 8px; }
  .contact-aside { margin-top: 16px; }
  .contact-aside__block:first-child { border-top: 0; padding-top: 0; }
  .contact-strip__grid { grid-template-columns: 1fr; row-gap: 12px; }
  .contact-strip__loc { white-space: normal; }
}
@media (max-width: 560px) {
  .contact-form__grid { grid-template-columns: 1fr; gap: 18px; }
  .contact-form__actions .btn { width: 100%; }
  .contact-handed__actions .btn { width: 100%; }
  .contact-handed__msg { max-height: none; }
}


/* ===== pages/docs.css ===== */
/* Customer guides: Cairn typography, readable navigation and print branding. */
.docs-cover > .container { padding-top: 154px; padding-bottom: 54px; }
.docs-cover__layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; gap: 64px; }
.docs-cover .display { margin-top: 24px; max-width: 15ch; }
.docs-cover .lead { margin-top: 24px; max-width: 31em; }
.docs-cover .btn-row { margin-top: 32px; }
.docs-cover__edition { border-top: 2px solid var(--slate); border-bottom: 1px solid var(--rule); padding: 26px 0; }
.docs-cover__edition .lockup { margin-bottom: 24px; }
.docs-cover__edition-title { font-size: 20px; font-weight: 500; color: var(--text); }
.docs-cover__edition > p + p { margin-top: 8px; font-size: 14px; }
.docs-cover__edition dl { margin: 24px 0 0; }
.docs-cover__edition dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.docs-cover__edition dt { color: var(--muted); }
.docs-cover__edition dd { margin: 0; color: var(--text); }
.docs-status-note { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 14px; }
.docs-status-note strong { color: var(--text); font-weight: 500; }
.docs-status-note p { max-width: 65ch; margin: 0; }
.docs-directory > .container { padding-top: 52px; padding-bottom: 80px; }
.docs-group + .docs-group { margin-top: 48px; }
.docs-group > header { display: flex; gap: 18px; align-items: baseline; margin-bottom: 22px; }
.docs-guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.docs-guide-card { display: flex; flex-direction: column; min-width: 0; padding: 25px; border: 1px solid var(--rule); background: var(--card); text-decoration: none; color: var(--body); transition: border-color .2s, background-color .2s; }
.docs-guide-card:hover { border-color: var(--slate); background: var(--panel); color: var(--body); }
.docs-guide-card .h3 { font-size: 21px; margin-bottom: 14px; }
.docs-guide-card > p { font-size: 15px; line-height: 1.65; }
.docs-guide-card__link { display: flex; gap: 14px; align-items: center; margin-top: auto; padding-top: 24px; font-size: 14px; font-weight: 500; color: var(--signal); }
.docs-contact-strip > .container { padding-top: 44px; padding-bottom: 44px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.docs-contact-strip .h2 { margin-top: 12px; }
.docs-contact-strip p { margin-top: 12px; }
.docs-contact-strip .btn { flex: none; }
.docs-shell > .container { padding-top: 112px; padding-bottom: 72px; }
.docs-breadcrumb { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; color: var(--muted); font-size: 13px; }
.docs-breadcrumb a { color: var(--body); text-decoration-color: var(--rule); }
.docs-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 42px; align-items: start; }
.docs-sidebar { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100svh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; padding-right: 10px; padding-bottom: 10px; }
.docs-nav__home { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; }
.docs-nav__label { color: var(--muted); font-size: 12px; padding: 0 12px; margin-top: 28px; margin-bottom: 8px; }
.docs-nav__link { display: block; padding: 10px 12px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--body); text-decoration: none; }
.docs-nav__link:hover { color: var(--text); background: var(--panel); }
.docs-nav__link[aria-current="page"] { border-left-color: var(--signal); background: var(--card); font-weight: 500; color: var(--text); }
.docs-sidebar__contact { margin-top: 30px; padding: 22px 12px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.docs-sidebar__contact p { color: var(--text); font-weight: 500; margin-bottom: 8px; }
.docs-sidebar__contact a { font-size: 13px; }
.docs-mobile-nav { display: none; }
.docs-main { min-width: 0; }
.docs-article { position: relative; overflow: hidden; min-width: 0; padding: 40px 44px 26px; border: 1px solid var(--rule); background: var(--card); }
.docs-article > :not(.docs-article__watermark) { position: relative; z-index: 1; }
.docs-article__watermark { position: absolute; z-index: 0; width: 220px; right: -38px; bottom: 100px; pointer-events: none; opacity: .035; }
.docs-article__watermark .mark { width: 100%; }
.docs-article__head { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--rule); padding-bottom: 24px; margin-bottom: 36px; }
.docs-article__head .lockup__word { font-size: 15px; }
.docs-article__head .mark { width: 20px; }
.docs-edition { font-size: 12px; color: var(--muted); margin: 0; }
.docs-article > .h1 { margin-top: 16px; font-size: clamp(30px, 3vw, 40px); line-height: 1.12; }
.docs-summary { max-width: 60ch; font-size: 18px; color: var(--secondary); line-height: 1.6; margin-top: 18px; margin-bottom: 26px; }
.docs-outline { display: grid; gap: 9px; margin: 28px 0 30px; padding: 20px 22px; border: 1px solid var(--rule); font-size: 14px; background: var(--panel); }
.docs-outline > p { margin: 0 0 3px; color: var(--text); font-weight: 500; }
.docs-outline a { text-decoration: none; }
.docs-prose { max-width: 72ch; font-size: 16px; line-height: 1.8; color: var(--body); overflow-wrap: break-word; }
.docs-prose p { margin-top: 0; margin-bottom: 20px; }
.docs-prose h2, .docs-prose h3, .docs-prose h4 { color: var(--text); font-weight: 600; line-height: 1.25; scroll-margin-top: calc(var(--header-h) + 30px); }
.docs-prose h2 { font-size: 24px; margin-top: 38px; margin-bottom: 16px; letter-spacing: -.02em; }
.docs-prose h3 { font-size: 20px; margin-top: 30px; margin-bottom: 12px; }
.docs-prose ul, .docs-prose ol { margin: 4px 0 24px; padding-left: 25px; }
.docs-prose ul { list-style: disc; }
.docs-prose ol { list-style: decimal; }
.docs-prose li { margin: 9px 0; padding-left: 4px; }
.docs-prose li::marker { color: var(--muted); }
.docs-prose blockquote { margin: 28px 0; border-left: 3px solid var(--signal); padding: 2px 0 2px 20px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.docs-prose blockquote p { margin: 0; }
.docs-prose code { font-size: .85em; overflow-wrap: anywhere; }
.docs-prose pre { padding: 18px; border: 1px solid var(--rule); background: var(--panel); overflow-x: auto; }
.docs-prose pre code { white-space: pre; overflow-wrap: normal; }
.docs-table-wrap { width: 100%; overflow-x: auto; margin: 26px 0; -webkit-overflow-scrolling: touch; }
.docs-prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
.docs-prose th { text-align: left; color: var(--text); font-weight: 500; border-top: 1px solid var(--slate); border-bottom: 1px solid var(--slate); padding: 13px 16px 13px 0; vertical-align: top; }
.docs-prose td { border-bottom: 1px solid var(--rule); padding: 14px 16px 14px 0; vertical-align: top; }
.docs-prose th:first-child, .docs-prose td:first-child { width: 31%; }
.docs-prose td:last-child, .docs-prose th:last-child { padding-right: 0; }
.docs-prose hr { border: 0; border-top: 1px solid var(--rule); margin: 30px 0; }
.docs-article__foot { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding-top: 20px; margin-top: 38px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 11px; }
.docs-article__foot span:first-child { letter-spacing: .08em; font-weight: 500; }
.docs-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.docs-pagination a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--rule); padding: 20px; }
.docs-pagination a:hover { border-color: var(--slate); }
.docs-pagination a > span:first-child { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.docs-pagination strong { font-size: 15px; font-weight: 500; }
.docs-pagination a > span:last-child { color: var(--signal); }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; } .docs-article { padding: 30px; } .docs-cover__layout { gap: 40px; } .docs-guide-card { padding: 22px; } }
@media (max-width: 900px) {
  .docs-cover > .container { padding-top: 116px; padding-bottom: 36px; }
  .docs-cover__layout { grid-template-columns: 1fr; gap: 32px; }
  .docs-cover__edition { max-width: 100%; }
  .docs-status-note { grid-template-columns: 1fr; gap: 10px; margin-top: 32px; }
  .docs-guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-shell > .container { padding-top: 92px; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-sidebar { display: none; }
  .docs-mobile-nav { display: block; margin-bottom: 18px; border: 1px solid var(--rule); background: var(--card); }
  .docs-mobile-nav summary { cursor: pointer; color: var(--text); font-size: 14px; font-weight: 500; padding: 15px 18px; }
  .docs-mobile-nav nav { padding: 0 10px 18px; }
  .docs-mobile-nav .docs-nav__label { margin-top: 20px; }
  .docs-mobile-nav .docs-nav__link { padding-top: 12px; padding-bottom: 12px; }
  .docs-article { padding: 28px; }
  .docs-contact-strip > .container { flex-direction: column; align-items: flex-start; gap: 26px; }
}
@media (max-width: 560px) {
  .docs-cover .display { font-size: 42px; }
  .docs-cover .btn-row { gap: 24px; }
  .docs-guide-cards { grid-template-columns: 1fr; }
  .docs-directory > .container { padding-top: 36px; padding-bottom: 48px; }
  .docs-guide-card { padding: 24px; }
  .docs-shell > .container { padding-bottom: 40px; }
  .docs-breadcrumb { font-size: 12px; gap: 8px; margin-bottom: 18px; }
  .docs-article { padding: 24px 20px; }
  .docs-article__head { gap: 12px; padding-bottom: 20px; margin-bottom: 28px; }
  .docs-edition { font-size: 11px; }
  .docs-article > .h1 { font-size: 31px; }
  .docs-summary { font-size: 17px; }
  .docs-prose { max-width: 72ch; font-size: 16px; line-height: 1.75; }
  .docs-prose h2 { font-size: 22px; }
  .docs-prose th:first-child, .docs-prose td:first-child { width: 37%; }
  .docs-prose th, .docs-prose td { padding-right: 12px; font-size: 13px; }
  .docs-prose blockquote { padding-left: 15px; }
  .docs-pagination { grid-template-columns: minmax(0, 1fr); }
  .docs-pagination > span:empty { display: none; }
  .menu__inner { overflow-y: auto; }
  .menu__foot { margin-top: 24px; }
}
@media print {
  body[data-page="docs"] { background: white; }
  body[data-page="docs"] .header, body[data-page="docs"] > .footer, body[data-page="docs"] .readout, body[data-page="docs"] .docs-sidebar, body[data-page="docs"] .docs-mobile-nav, body[data-page="docs"] .docs-pagination, body[data-page="docs"] .docs-breadcrumb, body[data-page="docs"] .docs-outline { display: none !important; }
  body[data-page="docs"] .container { max-width: none; padding: 0; border: 0; }
  .docs-layout { display: block; }
  .docs-article { padding: 20px; border: 0; overflow: visible; }
  .docs-article__head { margin-bottom: 28px; }
  .docs-article__watermark { position: fixed; width: 180px; bottom: 55px; right: 20px; opacity: .045; }
  .docs-prose { font-size: 11pt; line-height: 1.55; }
  .docs-prose h2, .docs-prose h3 { break-after: avoid; }
  .docs-prose table tr { break-inside: avoid; }
  .docs-article__foot { break-inside: avoid; }
}


/* ===== pages/help.css ===== */
/* Cairn help hub: same precise, square design system as the product. */
.help-hero .display { max-width: 16ch; }
.help-search { margin-top: 36px; max-width: 600px; }
.help-search label { display: block; margin-bottom: 10px; font-size: 14px; color: var(--fg-2); }
.help-search__field { background: var(--card); border: 1px solid var(--slate); display: flex; align-items: center; gap: 14px; padding: 0 18px; }
.help-search__field:focus-within { outline: 2px solid var(--signal); outline-offset: 3px; }
.help-search__field svg { width: 20px; flex: none; color: var(--muted); }
.help-search input { min-width: 0; width: 100%; border: 0; background: transparent; padding: 18px 0; font: inherit; color: var(--text); outline: 0; }
.help-routes > .container { padding-top: 48px; padding-bottom: 48px; }
.help-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.help-card { text-decoration: none; background: var(--card); padding: 28px; border: 1px solid var(--rule); display: flex; align-items: flex-start; flex-direction: column; color: var(--body); transition: border-color .2s, background-color .2s; }
.help-card:hover { background: var(--panel); border-color: var(--slate); color: var(--body); }
.help-card .num { margin-bottom: 26px; }
.help-card h2 { margin-bottom: 12px; }
.help-card p { font-size: 15px; line-height: 1.6; }
.help-card .textlink { margin-top: auto; padding-top: 28px; font-size: 14px; }
.help-routes__note { margin-top: 20px; }
.help-faq-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; }
.help-faq-intro .kicker { margin-bottom: 20px; }
.help-faq-intro .h1 { max-width: 11ch; }
.help-faq-intro .body { margin-top: 24px; }
.help-faq-intro .textlink { margin-top: 24px; }
.help-faqs details { border-top: 1px solid var(--slate); }
.help-faqs details:last-of-type { border-bottom: 1px solid var(--slate); }
.help-faqs summary { padding: 24px 36px 24px 0; color: var(--text); font-size: 18px; font-weight: 500; cursor: pointer; position: relative; list-style: none; }
.help-faqs summary::-webkit-details-marker { display: none; }
.help-faqs summary::after { content: '+'; position: absolute; right: 6px; top: 20px; font-weight: 400; font-size: 24px; color: var(--signal); }
.help-faqs details[open] summary::after { content: '−'; }
.help-faqs details p { margin: 0; padding: 0 32px 26px 0; line-height: 1.65; }
.help-faqs details[hidden] { display: none; }
.help-no-results { padding: 24px 0; }
@media (max-width: 900px) { .help-faq-layout { grid-template-columns: 1fr; gap: 36px; } .help-faq-intro .h1 { max-width: 100%; } .help-cards { gap: 12px; } .help-card { padding: 20px; } }
@media (max-width: 560px) { .help-cards { grid-template-columns: 1fr; } .help-card .num { margin-bottom: 16px; } .help-card .textlink { padding-top: 20px; } .help-search input { font-size: 16px; } }


/* ===== pages/home.css ===== */
/* ---------- Home: cover ---------- */
.cover__layout { display: grid; grid-template-columns: minmax(0, 13fr) minmax(0, 11fr); column-gap: 48px; align-items: end; }
.cover .display { font-size: clamp(2.5rem, 1.6rem + 2.9vw, 4.125rem); }
.cover__kicker { display: block; margin-bottom: 28px; min-height: 1.4em; }
.cover__text .lead { margin-top: 28px; max-width: 30em; }
.cover__text .btn-row { margin-top: 36px; }
.cover__strip { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--ink-rule); font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); }
.cover__strip b { font-weight: 400; color: var(--on-ink-text); text-transform: none; letter-spacing: .04em; }

/* Live ledger */
.ledger { border: 1px solid var(--ink-rule); background: var(--ink-panel); font-size: 12px; color: var(--on-ink-body); overflow: hidden; }
.ledger__title { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--ink-rule); }
.ledger__title .kicker { color: var(--on-ink-muted); letter-spacing: .14em; }
.ledger__head { font-size: 11px; color: var(--on-ink-muted); }
.ledger__head b { font-weight: 400; color: var(--signal-on-ink); }
.ledger__cols, .ledger__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.35fr) 44px 64px; column-gap: 12px; padding: 0 16px; align-items: center; }
.ledger__cols { height: 30px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-muted); border-bottom: 1px solid var(--ink-rule-2); }
.ledger__rows { position: relative; height: 334px; overflow: hidden; }
.ledger__row { position: relative; height: 38px; border-bottom: 1px solid var(--ink-rule-2); white-space: nowrap; overflow: hidden; }
.ledger__row > span { overflow: hidden; text-overflow: ellipsis; }
.ledger__row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--signal-on-ink); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--ease-out); }
.ledger__row.is-new::before { transform: scaleY(1); }
.ledger__row.is-new .ledger__seq { color: var(--signal-on-ink); }
.ledger__seq { color: var(--on-ink-muted); }
.ledger__hash { color: var(--on-ink-muted); }
.ledger__row.is-new .ledger__hash { color: var(--on-ink-body); }
.ledger__rows::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(180deg, transparent, var(--ink-panel)); pointer-events: none; }
.ledger { position: relative; }
.ledger__seal { position: absolute; width: 1px; background: var(--signal-on-ink); transform-origin: bottom center; transform: scaleY(0); opacity: 0; pointer-events: none; }
.ledger__seal::before, .ledger__seal::after { content: ''; position: absolute; left: -1px; width: 3px; height: 3px; background: var(--signal-on-ink); }
.ledger__seal::before { top: -1px; } .ledger__seal::after { bottom: -1px; }
.ledger__title .tag { margin-left: 8px; }

/* ---------- Home: how it works (pinned) ---------- */
.how > .container { padding-top: clamp(72px, 9vw, 128px); }
.how__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 48px; align-items: start; }
.how__steps { padding-bottom: 10vh; }
.how__step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 8vh 0; opacity: .28; transition: opacity .5s var(--ease-out); }
.how__step.is-active { opacity: 1; }
.how__step:first-child { min-height: 34vh; padding-top: 0; }
.how__step .num { display: block; margin-bottom: 18px; }
.how__step .h2 { margin-bottom: 14px; }
.how__stage { position: sticky; top: calc(var(--header-h) + 24px); height: calc(100vh - var(--header-h) - 48px); display: flex; align-items: center; }
.how__pin { width: 100%; }
.flow { margin: 0; background: var(--card); border: 1px solid var(--line); padding: 20px 20px 16px; }
.flow__svg { width: 100%; height: auto; font-family: var(--mono); }
.flow__box { fill: var(--panel); stroke: var(--rule); stroke-width: 1; }
.flow__box--cairn { stroke: var(--slate); stroke-width: 1.5; fill: var(--card); }
.flow__label { font-size: 10.5px; letter-spacing: 2px; fill: var(--label); }
.flow__val { font-size: 12.5px; fill: var(--data); }
.flow__val--muted { fill: var(--muted); }
.flow__verdict { font-size: 14px; fill: var(--rule); }
.flow__mark { fill: var(--signal); }
.flow__line { fill: none; stroke: var(--slate); stroke-width: 1; }
.flow__hair { stroke: var(--rule); stroke-width: 1; }
.flow__token { fill: var(--ink); }
.flow__token-text { font-size: 11px; fill: var(--on-ink-text); }
.flow__entry-bg { fill: var(--tint-signal); }
.flow__chain { fill: none; stroke: var(--signal); stroke-width: 2; }
.flow__caption { display: grid; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); min-height: 2.2em; }
.flow__cap { grid-area: 1 / 1; display: flex; gap: 14px; align-items: baseline; opacity: 0; transition: opacity .4s; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.flow__cap b { font-weight: 400; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--label); white-space: nowrap; }
.flow__cap code { font-size: 12px; color: var(--data); }
.flow__cap.is-on { opacity: 1; }

/* ---------- Home: console ---------- */
.console--home .console__table td, .console--home .console__table th { padding-right: 18px; }
.console__caption { font-family: var(--sans); font-size: var(--fs-small); color: var(--muted); margin-top: 18px; padding: 0 0 12px; }
.console__code { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--data); white-space: pre; overflow-x: auto; }
.console__code .c-k { color: var(--signal); } .console__code .c-v { color: var(--data); } .console__code .c-m { color: var(--label); }
.console__code .c-hold { color: var(--hold); } .console__code .c-deny { color: var(--deny); } .console__code .c-allow { color: var(--allow); }
.console__pane .table { min-width: 720px; }

/* ---------- Home: terminal ---------- */
.term { background: var(--ink); border: 1px solid var(--ink-rule); color: var(--on-ink-body); }
.term__bar { display: flex; justify-content: space-between; align-items: center; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--ink-rule); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); }
.term__dot { width: 7px; height: 7px; background: var(--signal-on-ink); }
.term__bar .tag { margin-left: 8px; }
@keyframes term-blink { 50% { opacity: .15; } }
.term__body { margin: 0; padding: 18px 16px 22px; min-height: 236px; font-size: 13px; line-height: 1.75; white-space: pre-wrap; color: var(--on-ink-body); }
.term__body .t-cmd { color: var(--on-ink-text); }
.term__body .t-ok { color: var(--signal-on-ink); }
.term__body .t-dim { color: var(--on-ink-muted); }
.term__cursor { display: inline-block; width: 7px; height: 14px; background: var(--on-ink-body); vertical-align: -2px; animation: term-blink 1s steps(1) infinite; }

/* ---------- Home: close ---------- */
.close__mark { display: flex; justify-content: flex-end; align-items: flex-end; }
.close__mark .mark { width: min(100%, 210px); }
.close__mark .mark__c { transform-box: fill-box; transform-origin: left center; }
.close__mail { font-size: 13px; color: var(--on-ink-muted); text-decoration: none; margin-left: 8px; }
.close__mail:hover { color: var(--signal-on-ink); }

@media (max-width: 1100px) {
  .ledger__cols, .ledger__row { grid-template-columns: 48px 1fr 1.3fr 50px 72px; }
}
@media (max-width: 900px) {
  .cover__layout { grid-template-columns: 1fr; row-gap: 40px; }
  .cover__ledger { order: 2; }
  .ledger__rows { height: 268px; }
  .cover__strip { margin-top: 40px; }
  .how__layout { grid-template-columns: minmax(0, 1fr); }
  .how__stage, .how__pin, .flow { min-width: 0; }
  .how__stage { position: relative; top: auto; height: auto; order: -1; margin-bottom: 24px; }
  .how__step { min-height: 0; padding: 24px 0; opacity: 1; border-top: 1px solid var(--line); }
  .how__steps { padding-bottom: 0; }
  .close__mark { display: none; }
}
@media (max-width: 560px) {
  .ledger__cols, .ledger__row { grid-template-columns: 44px 1fr 1fr 44px; }
  .ledger__cols span:nth-child(5), .ledger__row .ledger__hash { display: none; }
  .ledger__head { display: none; }
  .ledger__seal { display: none; }
  .cover__strip { gap: 10px 24px; }
  .flow { padding: 14px 12px 12px; }
  .flow__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0 12px; }
  .flow__svg { min-width: 520px; }
  .flow__cap { flex-direction: column; gap: 4px; }
  /* Console panes at phone width: keep the columns that carry the story */
  .console__pane .table { min-width: 0; width: 100%; }
  .console__table td, .console__table th { white-space: normal; padding-right: 10px; }
  [data-pane="ledger"] .console__table th:nth-child(2), [data-pane="ledger"] .console__table td:nth-child(2),
  [data-pane="ledger"] .console__table th:nth-child(3), [data-pane="ledger"] .console__table td:nth-child(3),
  [data-pane="ledger"] .console__table th:nth-child(5), [data-pane="ledger"] .console__table td:nth-child(5),
  [data-pane="ledger"] .console__table th:nth-child(7), [data-pane="ledger"] .console__table td:nth-child(7) { display: none; }
  [data-pane="approvals"] .console__table th:nth-child(1), [data-pane="approvals"] .console__table td:nth-child(1),
  [data-pane="approvals"] .console__table th:nth-child(3), [data-pane="approvals"] .console__table td:nth-child(3),
  [data-pane="approvals"] .console__table th:nth-child(5), [data-pane="approvals"] .console__table td:nth-child(5),
  [data-pane="approvals"] .console__table th:nth-child(7), [data-pane="approvals"] .console__table td:nth-child(7) { display: none; }
  [data-pane="range"] .console__table th:nth-child(5), [data-pane="range"] .console__table td:nth-child(5) { display: none; }
  .console__status { display: none; }
}

/* Launch edition: a compact editorial cover, visible evidence and usable motion. */
.cover > .container { min-height: min(850px, 100svh); padding-top: clamp(146px, 16vh, 192px); padding-bottom: 48px; justify-content: center; }
.cover__layout { grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); align-items: center; gap: 48px; }
.cover .display { font-size: clamp(2.7rem, 1.5rem + 3.55vw, 4.6rem); line-height: 1.03; max-width: 12ch; letter-spacing: -.035em; }
.cover__text .lead { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; max-width: 29em; }
.cover__stage { margin-top: 20px; font-size: 13px; color: var(--on-ink-muted); }
.cover__strip { gap: 20px 36px; font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 13px; margin-top: 60px; }
.cover__strip span { display: flex; gap: 12px; align-items: baseline; }
.cover__strip b { font-family: var(--sans); font-weight: 400; letter-spacing: 0; }
.ledger { border-color: var(--ink-rule); }
.ledger__title { flex-wrap: wrap; gap: 8px; }
.ledger__title .kicker { letter-spacing: .09em; }
.ledger__cols, .ledger__row { column-gap: 10px; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.2fr) 52px 58px; padding-left: 14px; padding-right: 14px; }
.ledger__rows { height: 304px; }
.ledger__foot { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-top: 1px solid var(--ink-rule); font-family: var(--sans); font-size: 11px; color: var(--on-ink-muted); }
.ledger__foot button { color: var(--signal-on-ink); white-space: nowrap; min-height: 24px; text-decoration: underline; text-underline-offset: 3px; }
.how__step { min-height: 42vh; padding: 5vh 0; }
.how__step:first-child { min-height: 26vh; }
.how__stage { height: calc(75vh - var(--header-h)); }
@media (min-width: 1101px) { .cover > .container { min-height: 780px; } }
@media (max-width: 1100px) and (min-width: 901px) { .cover__layout { gap: 28px; } .ledger__cols, .ledger__row { grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1.3fr) 42px; } .ledger__cols span:nth-child(5), .ledger__row .ledger__hash { display: none; } .ledger__head { display: none; } }
@media (max-width: 900px) { .cover > .container { min-height: 0; padding-top: 132px; } .cover__layout { grid-template-columns: 1fr; gap: 44px; } .cover .display { max-width: 13ch; font-size: clamp(2.75rem, 7vw, 4.4rem); } .cover__text .lead { max-width: 32em; } .cover__strip { margin-top: 32px; } .how__step, .how__step:first-child { min-height: 0; padding: 24px 0; } .how__stage { height: auto; } }
@media (max-width: 560px) { .cover > .container { padding-top: 118px; padding-bottom: 32px; } .cover .display { max-width: 11ch; } .cover__kicker { margin-bottom: 24px; } .cover__text .lead { margin-top: 24px; } .cover__text .btn-row { margin-top: 28px; gap: 10px; } .cover__strip { flex-direction: column; gap: 12px; } .ledger__cols, .ledger__row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.1fr) 44px; font-size: 10px; gap: 8px; } .ledger__foot { font-size: 10px; } .ledger__rows { height: 228px; } }
@media (prefers-reduced-motion: reduce) { .how__step, .how__step:first-child { min-height: 0; opacity: 1; padding: 28px 0; } .how__stage { position: sticky; height: auto; padding-top: 28px; } .how__steps { padding-bottom: 40px; } }


/* ===== pages/product.css ===== */
/* ---------- Product: shared bits ---------- */
.prod-tag { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; line-height: 1; padding: 4px 6px 3px; border: 1px solid var(--line); color: var(--fg-muted); white-space: nowrap; vertical-align: middle; }
.prod-tag--ink { border-color: var(--ink-rule); color: var(--on-ink-muted); }

/* ---------- Product: hero ---------- */
.prod-hero__grid { align-items: end; }
.prod-hero .display { font-size: clamp(2.5rem, 1.5rem + 2.9vw, 4.125rem); }
.prod-hero__display { max-width: 19ch; }
.prod-hero__link { margin-top: 28px; }
.prod-hero__index { display: flex; flex-direction: column; }
.prod-hero__index-kicker { display: block; margin-bottom: 14px; }
.prod-hero__rows { border-top: 1px solid var(--line); }
.prod-hero__row { position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: baseline; padding: 14px 0 13px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg-2); transition: color .25s; }
.prod-hero__row .num { padding-top: 0; }
.prod-hero__label { font-family: var(--sans); font-size: 15px; font-weight: 500; line-height: 1.2; }
.prod-hero__row::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right center; transition: transform .4s var(--ease-out); }
.prod-hero__row:hover, .prod-hero__row:focus-visible { color: var(--fg); }
.prod-hero__row:hover::after, .prod-hero__row:focus-visible::after { transform: scaleX(1); transform-origin: left center; }

/* ---------- Product: 01 Ledger (sticky stage) ---------- */
.prod-led__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 48px; align-items: start; }
.prod-led__text { padding-bottom: 2vh; }
.prod-led__notes { margin-top: 10vh; }
.prod-led__note { min-height: 38vh; display: flex; flex-direction: column; justify-content: center; padding: 5vh 0; opacity: .3; transition: opacity .5s var(--ease-out); }
.prod-led__note.is-active { opacity: 1; }
.prod-led__note .num { display: block; margin-bottom: 14px; }
.prod-led__key { display: block; font-family: var(--mono); font-size: 15px; letter-spacing: .01em; color: var(--fg); margin-bottom: 10px; }
.prod-led__stage { position: sticky; top: calc(var(--header-h) + 24px); height: calc(100vh - var(--header-h) - 48px); display: flex; align-items: center; }
.prod-led__pin { width: 100%; }
.prod-led__callout { margin-top: 6vh; }

/* Anatomy of an entry */
.prod-entry { margin: 0; background: var(--surface); border: 1px solid var(--line); }
.prod-entry__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.prod-entry__title { display: inline-flex; align-items: center; gap: 12px; }
.prod-entry__bar .kicker { letter-spacing: .14em; }
.prod-entry__file { font-size: 11px; letter-spacing: .04em; color: var(--fg-muted); white-space: nowrap; }
.prod-entry__rows { margin: 0; font-size: var(--fs-data); }
.prod-entry__row { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 10px 20px; border-bottom: 1px solid var(--line-2); transition: background-color .4s var(--ease-out); }
.prod-entry__row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top center; transition: transform .45s var(--ease-out); }
.prod-entry__row.is-on { background: var(--surface-2); }
.prod-entry__row.is-on::before { transform: scaleY(1); }
.prod-entry__row dt { color: var(--fg-muted); transition: color .35s; }
.prod-entry__row dd { margin: 0; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .35s; }
.prod-entry__row dd.prod-entry__hash { color: var(--descriptor); }
.prod-entry__row.is-on dt { color: var(--fg-data); }
.prod-entry__row.is-on dd, .prod-entry__row.is-on dd.prod-entry__hash { color: var(--fg); }
.prod-entry__row.is-read dt { color: var(--accent); }
/* The linked next entry: the approval seals 18204 */
.prod-entry__next { position: relative; padding: 14px 20px 14px 36px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.prod-entry__stem { position: absolute; left: 20px; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.prod-entry__stem::after { content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 1px; background: var(--rule); }
.prod-entry__next.is-on .prod-entry__stem, .prod-entry__next.is-on .prod-entry__stem::after { background: var(--accent); }
.prod-entry__next-kicker { display: block; margin-bottom: 6px; letter-spacing: .12em; }
.prod-entry__next-line { font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-entry__next-line b { font-weight: 400; color: var(--descriptor); transition: color .35s; }
.prod-entry__next.is-on .prod-entry__chain { color: var(--accent); }
.prod-entry__next.is-on .prod-entry__hash { color: var(--fg); }
.prod-entry__caption { display: grid; padding: 12px 20px 13px; font-size: 11px; letter-spacing: .06em; color: var(--fg-muted); min-height: 2.6em; }
.prod-entry__cap { grid-area: 1 / 1; opacity: 0; transition: opacity .4s; }
.prod-entry__cap.is-on { opacity: 1; }

/* ---------- Product: 02 Policy ---------- */
.prod-pol__panel { background: var(--surface); border: 1px solid var(--line); }
.prod-pol__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 42px; padding: 0 20px; border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .06em; color: var(--fg-muted); white-space: nowrap; overflow: hidden; }
.prod-pol__bar span:last-child { color: var(--fg-label); }
.prod-pol__code { padding: 16px 8px 18px; }
.prod-pol__block { position: relative; display: block; padding: 4px 12px; isolation: isolate; }
.prod-pol__block + .prod-pol__block { margin-top: 1.7em; }
.prod-pol__block::before { content: ''; position: absolute; inset: 0; background: var(--tint-signal); transform: scaleX(0); transform-origin: left center; transition: transform .6s var(--ease-inout); z-index: -1; }
.prod-pol__block::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top center; transition: transform .45s var(--ease-out) .1s; }
.prod-pol__block.is-on::before { transform: scaleX(1); }
.prod-pol__block.is-on::after { transform: scaleY(1); }
.prod-pol__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(40px, 5vw, 64px); }
.prod-pol__tile { position: relative; padding: 28px; }
.prod-pol__tile::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top center; transition: transform .45s var(--ease-out); }
.prod-pol__tile.is-on::after { transform: scaleY(1); }
.prod-pol__tile .kicker { margin-bottom: 18px; }
.prod-pol__word { display: block; font-family: var(--mono); font-size: 26px; line-height: 1; letter-spacing: -.01em; color: var(--fg); margin-bottom: 16px; }
.prod-pol__def { font-size: var(--fs-small); line-height: 1.5; color: var(--fg-body); max-width: 30em; }
.prod-pol__callout { margin-top: clamp(24px, 3vw, 40px); }

/* ---------- Product: 03 Approvals ---------- */
.prod-apr__console { margin-top: clamp(48px, 6vw, 72px); }
.prod-apr__console .console__body { overflow-x: auto; }
.prod-apr__console .console__body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.prod-apr__tag { margin-left: 4px; }
.prod-apr__table td { vertical-align: middle; }
.prod-apr__table th, .prod-apr__table td { padding-right: 20px; }
.prod-apr__table th:first-child, .prod-apr__table td:first-child { padding-left: 14px; border-left: 2px solid transparent; transition: border-color .35s; }
.prod-apr__row.is-open td:first-child { border-left-color: var(--accent); }
.prod-apr__seq { color: var(--descriptor); }
.prod-apr__row.is-done { color: var(--fg-2); }
.prod-apr__row.has-rec td { border-bottom: 0; }
.prod-apr__detail { display: block; margin-top: 3px; font-family: var(--sans); font-size: 12.5px; color: var(--fg-muted); white-space: nowrap; }
.prod-apr__table th:last-child, .prod-apr__cell { width: 150px; min-width: 150px; }
.prod-apr__row:not(.is-open) .console__actions { display: none; }
.prod-apr__console .console__actions { justify-content: flex-end; }
.prod-apr__rec td { padding: 0 20px 12px 14px; border-left: 2px solid transparent; border-bottom: 1px solid var(--line-2); }
.prod-apr__recline { display: inline-block; font-size: 12px; letter-spacing: .02em; color: var(--descriptor); white-space: nowrap; }
.prod-apr__recline:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prod-apr__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.prod-apr__reset, .prod-rng__reset { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--accent-underline); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.prod-apr__reset { padding-bottom: 12px; }
.prod-apr__reset:hover, .prod-rng__reset:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- Product: 04 Range ---------- */
.prod-rng__legend { border-top: 1px solid var(--line); margin: 0; }
.prod-rng__legend > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.prod-rng__legend dt { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); padding-top: .4em; }
.prod-rng__legend dd { margin: 0; font-size: var(--fs-small); line-height: 1.5; color: var(--fg-body); }
.prod-rng__panel { margin-top: clamp(48px, 6vw, 72px); background: var(--surface); border: 1px solid var(--line); }
.prod-rng__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.prod-rng__meta { display: flex; flex-direction: column; gap: 7px; }
.prod-rng__title { display: inline-flex; align-items: center; gap: 12px; }
.prod-rng__meta .kicker { letter-spacing: .14em; }
.prod-rng__id { font-size: 11px; letter-spacing: .04em; color: var(--fg-muted); }
.prod-rng__ctl { display: flex; align-items: center; gap: 22px; }
.prod-rng__ctl .btn:disabled { opacity: .45; cursor: default; pointer-events: none; }
.prod-rng__scroll { position: relative; overflow-x: auto; padding: 10px 20px 0; }
.prod-rng__scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.prod-rng__table { min-width: 720px; }
.prod-rng__table th { padding-right: 24px; }
.prod-rng__table td { padding: 15px 24px 15px 0; vertical-align: middle; }
.prod-rng__row.has-rec td { border-bottom: 0; }
.prod-rng__name { color: var(--fg-data); }
.prod-rng__n { width: 92px; color: var(--fg-label); transition: color .3s; }
.prod-rng__row.is-running .prod-rng__n, .prod-rng__row.is-done .prod-rng__n { color: var(--fg-data); }
.prod-rng__result { min-width: 250px; color: var(--fg-body); }
.prod-rng__result.is-pending { font-family: var(--mono); color: var(--fg-label); }
.prod-rng__act { width: 1%; text-align: right; padding-right: 0 !important; }
.prod-rng__run:disabled { color: var(--fg-label); border-color: var(--line); cursor: default; }
.prod-rng__run { min-width: 82px; white-space: nowrap; }
.prod-rng__rec td { padding: 0 0 12px; border-bottom: 1px solid var(--line-2); }
.prod-rng__recline { display: inline-block; font-size: 12px; letter-spacing: .02em; color: var(--descriptor); white-space: nowrap; }
.prod-rng__recline b { font-weight: 400; color: var(--fg-2); }
.prod-rng__prog { position: absolute; left: 20px; width: calc(100% - 40px); top: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; opacity: 0; pointer-events: none; }
.prod-rng__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 32px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
.prod-rng__foot-lines { display: grid; font-size: 12px; letter-spacing: .02em; color: var(--fg-muted); }
.prod-rng__foot-line { grid-area: 1 / 1; transition: opacity .5s var(--ease-out); }
.prod-rng__foot b { font-weight: 400; color: var(--fg-data); }
.js .prod-rng__foot-line--done, .js .prod-rng__foot.is-on .prod-rng__foot-line--pending { opacity: 0; }
.prod-rng__foot-line--pending, .js .prod-rng__foot.is-on .prod-rng__foot-line--done { opacity: 1; }
html:not(.js) .prod-rng__foot-line--pending { display: none; }
.prod-rng__note { margin: 0; font-size: 13px; }
.prod-rng__callout { margin-top: clamp(24px, 3vw, 40px); }

/* ---------- Product: 05 Integration ---------- */
.prod-int__figure { grid-row: 1 / span 2; }
.prod-int__facts { align-self: start; margin-top: 8px; }
.prod-int__facts .list-rules > li { padding: 18px 0; }
.prod-arch { margin: 0; background: var(--surface); border: 1px solid var(--line); padding: 20px 20px 16px; }
.prod-arch__svg { width: 100%; height: auto; font-family: var(--mono); }
.prod-arch__box { fill: var(--panel); stroke: var(--rule); stroke-width: 1; }
.prod-arch__box--cairn { fill: var(--card); stroke: var(--slate); stroke-width: 1.5; }
.prod-arch__box--ext { fill: var(--card); stroke: var(--rule); stroke-dasharray: 3 3; }
.prod-arch__label { font-size: 11px; letter-spacing: 2px; fill: var(--label); }
.prod-arch__val { font-size: 13px; fill: var(--data); }
.prod-arch__val--muted { fill: var(--muted); }
.prod-arch__line { fill: none; stroke: var(--slate); stroke-width: 1; }
.prod-arch__caption { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); max-width: 32em; }

/* ---------- Product: close ---------- */
.prod-close__mark { display: flex; justify-content: flex-end; align-items: flex-end; }
.prod-close__mark .mark { width: min(100%, 210px); }
.prod-close__mark .mark__c { transform-box: fill-box; transform-origin: left center; }
.prod-close__mail { font-size: 13px; color: var(--on-ink-muted); text-decoration: none; margin-left: 8px; }
.prod-close__mail:hover { color: var(--signal-on-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .prod-led__layout { column-gap: 32px; }
  .prod-entry__row { grid-template-columns: 112px minmax(0, 1fr); }
  .prod-pol__tiles { gap: 16px; }
  .prod-pol__tile { padding: 22px; }
  .prod-pol__word { font-size: 22px; }
}
@media (max-width: 900px) {
  .prod-hero__grid { row-gap: 40px; }
  .prod-hero__index { margin-top: 8px; }
  .prod-led__layout { grid-template-columns: 1fr; }
  .prod-led__stage { position: relative; top: auto; height: auto; order: -1; margin-bottom: 32px; }
  .prod-led__text { padding-bottom: 0; }
  .prod-led__notes { margin-top: 32px; border-top: 1px solid var(--line); }
  .prod-led__note { min-height: 0; padding: 22px 0; opacity: 1; border-bottom: 1px solid var(--line); }
  .prod-led__note .num { margin-bottom: 10px; }
  .prod-led__callout { margin-top: 32px; }
  .prod-pol__tiles { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
  .prod-pol__word { font-size: 24px; }
  .prod-rng__legend { margin-top: 8px; }
  .prod-int__figure { grid-row: auto; }
  .prod-int__facts { margin-top: 0; }
  .prod-close__mark { display: none; }
}
@media (max-width: 560px) {
  .prod-entry__row { grid-template-columns: 96px minmax(0, 1fr); padding: 10px 16px; }
  .prod-entry__bar { padding: 12px 16px; }
  .prod-entry__file { display: none; }
  .prod-entry__next { padding: 12px 16px 12px 30px; }
  .prod-entry__stem { left: 16px; }
  .prod-entry__next-line { white-space: normal; }
  .prod-entry__caption { padding: 12px 16px 13px; }
  .prod-pol__bar { padding: 0 16px; }
  .prod-pol__bar span:last-child { display: none; }
  .prod-arch { padding: 14px 14px 12px; }
  .prod-arch__label { font-size: 11.5px; letter-spacing: 1.8px; }

  /* Approvals console: bar and stacked rows */
  .prod-apr__console .console__bar { gap: 16px; padding: 0 16px; }
  .prod-apr__console .console__status, .prod-apr__console .lockup__word, .prod-apr__tag { display: none; }
  .prod-apr__console .console__nav { gap: 14px; }
  .prod-apr__console .console__tab { font-size: 13px; }
  .prod-apr__console .console__body { padding: 4px 16px 8px; overflow: visible; }
  .prod-apr__table, .prod-apr__table tbody { display: block; min-width: 0; width: 100%; }
  .prod-apr__table thead { display: none; }
  .prod-apr__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px 0 16px 12px; border-left: 2px solid transparent; border-bottom: 1px solid var(--line-2); transition: border-color .35s; }
  .prod-apr__row.is-open { border-left-color: var(--accent); }
  .prod-apr__row.has-rec { border-bottom: 0; padding-bottom: 8px; }
  .prod-apr__row td { display: block; padding: 0 !important; border: 0 !important; white-space: normal; width: auto; min-width: 0; }
  .prod-apr__row td[data-label]::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 4px; }
  .prod-apr__row td[data-label="status"] { order: 3; }
  .prod-apr__row .prod-apr__action { order: 4; grid-column: 1 / -1; }
  .prod-apr__row td[data-label="policy"] { order: 5; grid-column: 1 / -1; }
  .prod-apr__detail { white-space: normal; }
  .prod-apr__row .prod-apr__cell { order: 6; grid-column: 1 / -1; }
  .prod-apr__row:not(.is-open) .prod-apr__cell { display: none; }
  .prod-apr__console .console__actions { justify-content: flex-start; gap: 10px; }
  .prod-apr__console .console__action { min-height: 44px; padding: 0 20px; font-size: 13px; }
  .prod-apr__rec { display: block; }
  .prod-apr__rec td { display: block; padding: 0 0 14px 14px; border-bottom: 1px solid var(--line-2); }
  .prod-apr__recline { white-space: normal; }
  .prod-apr__foot { flex-wrap: wrap; }

  /* Range panel: bar and stacked rows */
  .prod-rng__bar { padding: 14px 16px; }
  .prod-rng__ctl { width: 100%; justify-content: space-between; }
  .prod-rng__scroll { padding: 4px 16px 0; overflow: visible; }
  .prod-rng__table, .prod-rng__table tbody { display: block; min-width: 0; width: 100%; }
  .prod-rng__table thead { display: none; }
  .prod-rng__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 12px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
  .prod-rng__row.has-rec { border-bottom: 0; padding-bottom: 8px; }
  .prod-rng__row td { display: block; padding: 0 !important; border: 0 !important; white-space: normal; width: auto; min-width: 0; }
  .prod-rng__row td[data-label]::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 4px; }
  .prod-rng__name, .prod-rng__result, .prod-rng__act { grid-column: 1 / -1; }
  .prod-rng__act { text-align: left; }
  .prod-rng__run { min-height: 44px; min-width: 0; padding: 0 20px; font-size: 13px; }
  .prod-rng__rec { display: block; }
  .prod-rng__rec td { display: block; padding: 0 0 14px; border-bottom: 1px solid var(--line-2); }
  .prod-rng__recline { white-space: normal; }
  .prod-rng__prog { left: 16px; width: calc(100% - 32px); }
  .prod-rng__foot { padding: 12px 16px; }
}
