/* ─────────────────────────────────────────────────────────────
   edkursiss.com — design system
   World: a drawn plan. Drafting-paper white, ink-navy linework,
   one cobalt accent for what you can act on, a dimension line
   under the one phrase that matters. Shared by every page; page-only
   styles live in css/<page>.css.
   ───────────────────────────────────────────────────────────── */

/* ─── Fonts: self-hosted variable subsets, no third-party font origin ─── */
@font-face {
  font-family: 'Archivo'; src: url('fonts/archivo.woff2') format('woff2');
  font-weight: 400 800; font-stretch: 100% 112%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Golos Text'; src: url('fonts/golos-cyrillic.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0400-052F, U+1C80-1C88, U+2DE0-2DFF, U+A640-A69F, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono'; src: url('fonts/jbmono.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono'; src: url('fonts/jbmono-cyrillic.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}

/* ─── Fallback faces: until the web fonts arrive, the system font takes the same room ───
   Arial (Apple, Windows) and Roboto (Android) resized to the measured width of
   Archivo (Latin) and Golos Text (Cyrillic), one face per weight/width band the
   site uses. Nothing is downloaded. The bands must stay complete: a family that
   had only the wide bold faces would be picked for body text too. */
@font-face { font-family: 'Archivo Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 400 499; size-adjust: 98.2%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 500 599; size-adjust: 100%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 800; size-adjust: 96.5%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 800; font-stretch: 105% 110%; size-adjust: 108.5%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 800; font-stretch: 111% 112%; size-adjust: 113%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 400 599; size-adjust: 107%; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 800; size-adjust: 101%; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 800; font-stretch: 105% 110%; size-adjust: 101%; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: 'Archivo Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 800; font-stretch: 111% 112%; size-adjust: 101%; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto'); font-weight: 400 499; size-adjust: 98.4%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto Medium'), local('Roboto-Medium'), local('Roboto'); font-weight: 500 599; size-adjust: 100.7%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto'); font-weight: 600 800; size-adjust: 102.5%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto'); font-weight: 600 800; font-stretch: 105% 110%; size-adjust: 116%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto'); font-weight: 600 800; font-stretch: 111% 112%; size-adjust: 119.5%; unicode-range: U+0020-024F, U+2010-2027, U+20AC; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto'); font-weight: 400 599; size-adjust: 104.5%; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto'); font-weight: 600 800; size-adjust: 105.5%; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto'); font-weight: 600 800; font-stretch: 105% 110%; size-adjust: 105.5%; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: 'Archivo Fallback Android'; src: local('Roboto Bold'), local('Roboto-Bold'), local('Roboto'); font-weight: 600 800; font-stretch: 111% 112%; size-adjust: 105.5%; unicode-range: U+0400-04FF, U+2116; }

:root {
  color-scheme: light;

  --paper: #f6f7f4;
  --paper-2: #eef0ec;
  --sheet: #ffffff;
  --ink: #0f1828;
  --ink-2: #3b4557;
  --ink-3: #5e6878;
  --line: #d8dce2;
  --line-2: #c3c9d2;
  --grid: rgba(15, 24, 40, 0.055);
  --grid-strong: rgba(15, 24, 40, 0.1);

  --accent: #2445e0;
  --accent-hover: #1a35b8;
  --accent-wash: #e9eeff;
  --accent-on-ink: #a5e4ff;
  --ok: #18794e;
  --ok-wash: #e3f4ea;
  --warn: #b3401f;
  --warn-wash: #fbe9e2;

  --ink-band: #173894;
  --ink-band-2: #1d43aa;
  --on-ink: #f3f5f8;
  --on-ink-2: #c9d3ee;
  --on-ink-line: rgba(255, 255, 255, 0.22);
  --bp-grid: rgba(255, 255, 255, 0.06);
  --bp-grid-strong: rgba(255, 255, 255, 0.105);

  --font: 'Archivo', 'Golos Text', 'Archivo Fallback', 'Archivo Fallback Android', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.45rem, 1.1rem + 1vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  --step-4: clamp(2.6rem, 1rem + 4.15vw, 4.75rem);
  --hero-pad: clamp(36px, 5.5vw, 76px);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);

  --shadow-sheet: 0 1px 2px rgba(15, 24, 40, 0.05), 0 18px 40px -18px rgba(15, 24, 40, 0.22);

  /* Motion. Ink moves, words don't: lines are ruled, labels set, sheets laid, a stamp lands. */
  --t-tap: 120ms;    /* a press */
  --t-ui: 180ms;     /* hover, colour, focus */
  --t-set: 240ms;    /* a label settles, a panel opens */
  --t-lay: 320ms;    /* a sheet arrives */
  --t-rule: 700ms;   /* a line is ruled */
  --t-scan: 800ms;   /* the Plan-view scan, the one long move */
  --stagger: 55ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);     /* arriving */
  --ease-pen: cubic-bezier(0.65, 0, 0.35, 1);    /* ruling a line */
  /* damped spring, about 5% overshoot: stamps and confirmations only */
  --ease-stamp: linear(0, 0.135 6.2%, 0.399 12.5%, 0.659 18.8%, 0.855 25%, 0.976 31.2%, 1.035 37.5%, 1.053 43.8%, 1.048 50%, 1.035 56.2%, 1.021 62.5%, 1.009 68.8%, 1.002 75%, 0.999 81.2%, 1);

  /* Three pens */
  --pen-1: 1px;      /* hairline: rows, grid, dimension lines */
  --pen-2: 1.5px;    /* object: frames, plates, title blocks, ticks */
  --pen-3: 2.5px;    /* cut line: the heaviest stroke on a sheet */

  --rake: rgba(255, 255, 255, 0.8);
}

/* ─── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  position: relative;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono, [class*="price"], .pt-time, .titleblock dd, .tl-when { font-variant-numeric: tabular-nums; }
p, li, dd, figcaption, summary { text-wrap: pretty; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: rgba(36, 69, 224, 0.2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.section--ink :focus-visible { outline-color: var(--accent-on-ink); }

/* ─── The sheet itself ─────────────────────────────────────────
   Light rakes in from the left edge; the drafting grid shows in the
   margins and is gone behind the text column. It scrolls with the
   page, because it is the paper. Plan view has its own full grid. */
body::before {
  --m: max(0px, (100vw - 1280px) / 2);
  --ml: var(--m); --mr: var(--m);
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1100px 760px at 0 440px, var(--rake), transparent 66%),
    linear-gradient(90deg, transparent var(--ml), var(--paper) calc(var(--ml) + var(--gutter) + 64px), var(--paper) calc(100% - var(--mr) - var(--gutter) - 64px), transparent calc(100% - var(--mr))),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}
@media (max-width: 720px) {
  body::before { background-image: radial-gradient(520px 540px at 0 430px, var(--rake), transparent 66%); background-size: auto; background-repeat: no-repeat; background-position: 0 0; }
}
/* From 1100px the page wears a drawing-sheet border: object line outside, hairline inside, zones A–F along the top */
@media (min-width: 1100px) {
  body::after {
    content: "A B C D E F"; position: absolute; inset: 70px 6px 6px; z-index: 20; pointer-events: none;
    padding: 5px calc(100% / 12 - 4px) 0;
    border: var(--pen-2) solid var(--ink); outline: var(--pen-1) solid var(--line-2); outline-offset: -6px;
    font: 500 0.75rem/18px var(--mono); color: var(--ink-3);
    text-align: justify; text-align-last: justify;
    background:
      linear-gradient(var(--line-2), var(--line-2)) 0 23px / 100% 1px no-repeat,
      linear-gradient(90deg, transparent calc(100% - 1px), var(--line-2) calc(100% - 1px)) 0 5px / calc(100% / 6) 18px repeat-x;
  }
  main { padding-top: 10px; }   /* the zone strip gets its own breathing room on every sheet */
}

html { scrollbar-color: var(--line-2) var(--paper); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--paper); border-radius: 10px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--on-ink); padding: 10px 14px; border-radius: var(--r-sm);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ─── Type ─────────────────────────────────────────────────── */
.display {
  font-size: var(--step-4);
  font-weight: 760;
  font-stretch: 112%;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h2 {
  font-size: var(--step-3);
  font-weight: 720;
  font-stretch: 110%;
  line-height: 1.04;
  letter-spacing: -0.028em;
}
.h3 {
  font-size: var(--step-1);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.lede { font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem); color: var(--ink-2); line-height: 1.55; max-width: 38em; }
.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.01em; font-weight: 500; }
.hl { color: var(--ink); font-weight: 640; }
.section--ink .hl { color: var(--on-ink); }
/* In a headline the phrase gets a dimension line, with an optional note in the gap (data-note).
   The line sits 0.26em under the line box so descenders never touch it; it ends in 45° ticks
   centred on the first and last letter. */
.display .hl, .h2 .hl {
  --tk: 16px; --dim-pen: var(--pen-3);
  position: relative; display: inline-block; font-weight: inherit; padding-bottom: calc(0.26em + var(--tk) / 2);
}
.h2 .hl { --tk: 12px; --dim-pen: var(--pen-2); }
.display .hl[data-note], .h2 .hl[data-note] { margin-bottom: calc(var(--tk) / 2 + 2px); }
.display .hl::before, .h2 .hl::before {
  --tick: transparent calc(50% - var(--dim-pen) / 2 - 0.5px), currentColor calc(50% - var(--dim-pen) / 2), currentColor calc(50% + var(--dim-pen) / 2), transparent calc(50% + var(--dim-pen) / 2 + 0.5px);
  content: ""; position: absolute; left: calc(0.02em - var(--tk) / 2); bottom: 0;
  width: calc(var(--hl-w, calc(100% - 0.04em)) + var(--tk)); height: var(--tk);
  background:
    linear-gradient(to bottom right, var(--tick)) left center / var(--tk) var(--tk) no-repeat,
    linear-gradient(to bottom right, var(--tick)) right center / var(--tk) var(--tk) no-repeat,
    linear-gradient(currentColor, currentColor) center / calc(100% - var(--tk)) var(--dim-pen) no-repeat;
  transform-origin: left center; pointer-events: none;
}
.display .hl[data-note]::after, .h2 .hl[data-note]::after {
  content: attr(data-note); position: absolute; left: calc(0.02em + var(--hl-w, 100%) / 2); bottom: calc(var(--tk) / 2); transform: translate(-50%, 50%);
  padding: 0 10px; background: var(--hl-bg, var(--paper)); white-space: nowrap;
  font: 500 0.8125rem/1.2 var(--mono); letter-spacing: 0.02em; color: var(--ink-2);
}
.section--sheet { --hl-bg: var(--sheet); }
.section--ink { --hl-bg: var(--ink-band); }
.section--ink .hl[data-note]::after { color: var(--on-ink-2); }
/* The line is ruled left to right once the headline is on screen, then its note is set
   (pages that load site.js opt in from <head>) */
.hl-anim .display .hl::before, .hl-anim .h2 .hl::before { transform: scaleX(0); transition: transform var(--t-rule) var(--ease-pen) 150ms; }
.hl-anim .display .hl[data-note]::after, .hl-anim .h2 .hl[data-note]::after { opacity: 0; transition: opacity var(--t-set) ease calc(var(--t-rule) + 100ms); }
.hl-anim .hl.is-drawn::before { transform: none; }
.hl-anim .hl.is-drawn[data-note]::after { opacity: 1; }

/* ─── Layout ───────────────────────────────────────────────── */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; position: relative; }
.section--tight { padding: calc(var(--section) * 0.6) 0; }
.section--sheet { background: var(--sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--ink {
  background-color: var(--ink-band); color: var(--on-ink);
  background-image:
    linear-gradient(var(--bp-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px),
    linear-gradient(var(--bp-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid-strong) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px;
}
/* registration marks in the corners of every blueprint sheet */
.section--ink > .wrap { position: relative; }
.section--ink::before, .section--ink::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
  border: 0 solid rgba(255, 255, 255, 0.55);
}
.section--ink::before { top: 18px; left: 18px; border-top-width: 1px; border-left-width: 1px; }
.section--ink::after { bottom: 18px; right: 18px; border-bottom-width: 1px; border-right-width: 1px; }
@media (min-width: 1100px) {
  .section--ink::before { top: 26px; left: 26px; }
  .section--ink::after { bottom: 26px; right: 26px; }
}
.section--ink h2, .section--ink h3 { color: var(--on-ink); }
.section--ink .lede, .section--ink .muted { color: var(--on-ink-2); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--split { max-width: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; gap: 24px 64px; }
@media (max-width: 860px) { .section-head--split { grid-template-columns: 1fr; } }

/* ─── Buttons & links ──────────────────────────────────────── */
.btn {
  --b-bg: var(--accent); --b-fg: #fff; --b-bd: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  border-radius: var(--r-md);
  font-weight: 620; font-size: 1rem; letter-spacing: -0.005em; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease, color var(--t-ui) ease, transform var(--t-tap) var(--ease-out);
}
.btn:hover { --b-bg: var(--accent-hover); --b-bd: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--t-set) var(--ease-out); }
@media (hover: hover) { .btn:hover svg { transform: translateX(3px); } }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn--ghost { --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--line-2); }
.btn--ghost:hover { --b-bg: var(--sheet); --b-fg: var(--ink); --b-bd: var(--ink); }
.btn--light { --b-bg: var(--on-ink); --b-fg: var(--ink); --b-bd: var(--on-ink); }
.btn--light:hover { --b-bg: #fff; --b-fg: var(--ink); --b-bd: #fff; }
.btn--outline-light { --b-bg: transparent; --b-fg: var(--on-ink); --b-bd: var(--on-ink-line); }
.btn--outline-light:hover { --b-bg: var(--ink-band-2); --b-fg: var(--on-ink); --b-bd: var(--on-ink-2); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

/* Hit area grows to ≥44px without changing layout */
.link::after { content: ""; position: absolute; inset: -12px -4px; }
.link {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent;
}
/* the underline is ruled in from the left */
.link::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: currentColor; pointer-events: none;
  transform: scaleX(0); transform-origin: left center; transition: transform var(--t-ui) var(--ease-out);
}
.link:hover::before, .link:focus-visible::before { transform: none; }
.link svg { width: 16px; height: 16px; transition: transform var(--t-set) var(--ease-out); }
@media (hover: hover) { .link:hover svg { transform: translateX(3px); } }
.section--ink .link { color: var(--accent-on-ink); }

/* ─── Header ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 247, 244, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-ui) ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-weight: 720; font-stretch: 108%; font-size: 1.0625rem; letter-spacing: -0.015em; white-space: nowrap; }
.nav-main { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  font-size: 0.9375rem; font-weight: 520; color: var(--ink-2); text-decoration: none;
  transition: color var(--t-ui) ease, background-color var(--t-ui) ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav-cta { margin-left: 8px; }
/* The header button can be renamed by the section in view. site.js stacks every label it may show
   in one grid cell, so the button is always as wide as its longest label and the header never jumps. */
@media (min-width: 961px) { .nav-cta.is-sized { display: inline-grid; justify-items: center; } }
.nav-cta.is-sized > span { grid-area: 1 / 1; }
.nav-cta.is-sized > .cta-size { visibility: hidden; height: 0; overflow: hidden; pointer-events: none; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--sheet); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle:hover { border-color: var(--ink-3); }
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: 68px; padding: 12px var(--gutter) 20px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(15, 24, 40, .25);
  }
  .nav.is-open .nav-links a { display: flex; width: 100%; height: 48px; font-size: 1.0625rem; }
  .nav.is-open .nav-links .nav-links-cta { display: block; margin-top: 10px; }
  .nav.is-open .nav-links .nav-links-cta .btn { width: 100%; }
}
.nav-links-cta { display: none; }
.nav-links a.btn, .nav-links a.btn:hover { color: var(--b-fg); background: var(--b-bg); justify-content: center; font-weight: 620; }

/* ─── Dimension line (measurement annotation) ─────────────── */
.dim {
  --dim-c: var(--line-2); --tick-c: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--ink-3);
  letter-spacing: 0.02em; white-space: nowrap;
}
/* two arms: a hairline that ends in a 45° tick drawn with the object pen */
.dim::before, .dim::after {
  --tick: transparent calc(50% - var(--pen-2) / 2 - 0.5px), var(--tick-c) calc(50% - var(--pen-2) / 2), var(--tick-c) calc(50% + var(--pen-2) / 2), transparent calc(50% + var(--pen-2) / 2 + 0.5px);
  content: ""; flex: 1; height: 9px; min-width: 18px;
  background:
    linear-gradient(to bottom right, var(--tick)) left center / 9px 9px no-repeat,
    linear-gradient(var(--dim-c), var(--dim-c)) right center / calc(100% - 4.5px) var(--pen-1) no-repeat;
  transform-origin: right center;
}
.dim::after { background-position: right center, left center; transform-origin: left center; }
.section--ink .dim { --dim-c: var(--on-ink-line); --tick-c: var(--on-ink-2); color: var(--on-ink-2); }

/* ─── Title block (drawing metadata) ──────────────────────── */
.titleblock {
  display: grid; grid-template-columns: repeat(var(--tb-cols, 5), minmax(0, auto));
  border: var(--pen-2) solid var(--ink); border-radius: 2px; background: var(--sheet);
  font-size: 0.8125rem; line-height: 1.25;
}
.titleblock > div { padding: 7px 12px 8px; border-left: var(--pen-1) solid var(--ink); min-width: 0; }
.titleblock > div:first-child { border-left: 0; }
.titleblock dt, .titleblock .tb-k { display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.titleblock dd, .titleblock .tb-v { display: block; margin: 0; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ─── Tags ────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 0.8125rem; font-weight: 520; color: var(--ink-2); background: var(--sheet); white-space: nowrap;
}
.tag--concept { border-style: dashed; color: var(--ink-3); background: transparent; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.tag--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ─── Concept plate (concept sites and screenshots) ───────────
   No browser chrome: the plate is framed like a photo plate and its label is a drawing
   caption strip. The three <i> dots stay in the HTML and are simply not drawn. */
.browser { border: var(--pen-2) solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--sheet); }
.browser-bar {
  display: flex; align-items: center; height: 32px; padding: 0 12px;
  border-bottom: var(--pen-1) solid; border-bottom-color: inherit; background: var(--sheet);
}
.browser-bar i { display: none; }
.browser-bar span {
  font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Spec list (rows instead of cards) ───────────────────── */
.spec { list-style: none; border-top: 1px solid var(--line-2); }
.spec > li { border-bottom: 1px solid var(--line-2); }
.section--ink .spec, .section--ink .spec > li { border-color: var(--on-ink-line); }

/* ─── Checklist ───────────────────────────────────────────── */
.checks { list-style: none; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; color: var(--ink-2); }
.checks li::before {
  content: ""; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230f1828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.section--ink .checks li { color: var(--on-ink-2); }
.section--ink .checks li::before { background-color: rgba(159, 178, 255, .16); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239fb2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5'/%3E%3C/svg%3E"); }

/* ─── FAQ ─────────────────────────────────────────────────── */
.faq { list-style: none; border-top: 1px solid var(--line-2); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 28px; gap: 24px; align-items: center;
  padding: 22px 0; font-weight: 620; font-size: 1.125rem; letter-spacing: -0.01em; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='%230f1828' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M9 14h10M14 9v10'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: transform var(--t-set) var(--ease-out), background-color var(--t-ui) ease;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--sheet); }
.faq summary:hover { color: var(--accent); }
.faq .faq-a { padding: 0 52px 24px 0; color: var(--ink-2); max-width: 68ch; display: grid; gap: 10px; }
/* The answer opens to its own height where the browser can animate to auto; elsewhere it opens at once */
.faq { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size var(--t-set) var(--ease-out), content-visibility var(--t-set) allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* ─── Forms (shared primitives) ───────────────────────────── */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.input, .field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]), .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  font: inherit; font-size: 1rem; line-height: 1.4;
  transition: border-color var(--t-ui) ease, box-shadow var(--t-ui) ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #6b7483; }
.input:hover, .field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-3); }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
input, textarea, select { caret-color: var(--accent); accent-color: var(--accent); }

/* ─── Footer ──────────────────────────────────────────────── */
.footer { background: var(--paper); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer .footer-h { font-size: 0.8125rem; font-weight: 650; margin-bottom: 14px; color: var(--ink); }
.footer ul { list-style: none; display: grid; gap: 0; }
.footer li > a, .footer li > span { display: inline-block; padding: 7px 0; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-about p { color: var(--ink-2); max-width: 30ch; margin-top: 14px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.8125rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ─── Sticky mobile CTA ───────────────────────────────────── */
.mobile-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  display: none; transform: translateY(140%); visibility: hidden;
  transition: transform var(--t-lay) var(--ease-out), visibility 0s linear var(--t-lay);
}
.mobile-cta .btn { width: 100%; box-shadow: 0 10px 30px -10px rgba(15, 24, 40, .45); }
.mobile-cta.is-visible { transform: none; visibility: visible; transition-delay: 0s; }
@media (max-width: 720px) { .mobile-cta { display: block; } }

/* ─── Shared icon sizing ──────────────────────────────────── */
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Shared closing band (every inner page) ─────────────── */
.cta-band { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 28px 64px; align-items: end; }
.cta-band .lede { margin-top: 16px; }
.cta-band-actions { display: grid; justify-items: start; gap: 16px; }
.cta-band-mail { color: var(--on-ink-2); font-size: var(--step--1); }
.cta-band-mail a { color: var(--on-ink); }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } }

/* Small sans labels for words; mono stays for numbers, times, code */
.label { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0; color: var(--ink-3); }
.section--ink .label { color: var(--on-ink-2); }

/* Keep compound words whole (fixed-price, e-invoicing) */
.nw { display: inline !important; white-space: nowrap; margin: 0 !important; }

/* Room for the sticky phone CTA under the footer */
@media (max-width: 720px) { .footer { padding-bottom: 104px; } }

/* ─── Footer title block: every page is a sheet of the same drawing ─── */
.footer-tb { margin-top: 48px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.footer-tb dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .footer-tb { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-tb > div:nth-child(3), .footer-tb > div:nth-child(5) { display: none; }
}
@media (max-width: 380px) {
  .footer-tb > div { padding-left: 8px; padding-right: 8px; }
  .footer-tb dt { letter-spacing: 0.04em; }
}

/* ─── Photo plate: every photograph sits in the drawing as a captioned plate ─── */
.photo { margin: 0; border: var(--pen-2) solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--sheet); }
.photo picture, .photo img { display: block; width: 100%; height: auto; }
.photo figcaption {
  display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px;
  border-top: var(--pen-1) solid var(--ink); background: var(--sheet);
  font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.section--ink .photo { border-color: rgba(255, 255, 255, 0.5); }
.section--ink .photo figcaption { background: var(--ink-band-2); color: var(--on-ink-2); border-color: rgba(255, 255, 255, 0.35); }

/* ═════════════════════════════════════════════════════════════
   Ink. Lines are ruled when their block comes on screen; words
   never move. <html class="ink"> is set in <head>; site.js adds
   .is-inked once to every [data-ink], every main > section and
   the shared components below. Finished is the default:
     html.ink [data-ink]:not(.is-inked) …   holds the start state.
   Under html.ink each ruled border is drawn by a pseudo-element
   that inherits the border it stands in for, so any colour or
   pen a page sets on the border still applies.
   ═════════════════════════════════════════════════════════════ */

/* Spec lists and FAQs: the top rule first, then every row in turn, like ruling a ledger */
html.ink :is(.spec, .faq), html.ink :is(.spec > li, .faq details) { position: relative; border-image: linear-gradient(transparent, transparent) 1; }
html.ink :is(.spec, .faq)::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 0; border-top: inherit; pointer-events: none;
  transform-origin: left center; transition: transform var(--t-rule) var(--ease-pen);
}
html.ink :is(.spec > li, .faq details)::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 0; border-bottom: inherit; pointer-events: none;
  transform-origin: left center; transition: transform var(--t-rule) var(--ease-pen) calc(var(--i, 0) * var(--stagger) + 120ms);
}
html.ink :is(.spec, .faq):not(.is-inked)::before,
html.ink .spec:not(.is-inked) > li::after,
html.ink .faq:not(.is-inked) details::after { transform: scaleX(0); }

/* Dimension annotations: both arms extend outward from the figure */
html.ink .dim::before, html.ink .dim::after { transition: transform var(--t-rule) var(--ease-out) 120ms; }
html.ink .dim:not(.is-inked)::before, html.ink .dim:not(.is-inked)::after { transform: scaleX(0); }

/* Title blocks: the frame is ruled, then each cell is divided off */
html.ink .titleblock, html.ink .titleblock > div { position: relative; border-image: linear-gradient(transparent, transparent) 1; }
html.ink .titleblock::before, html.ink .titleblock::after { content: ""; position: absolute; pointer-events: none; border-radius: inherit; }
html.ink .titleblock::before {
  inset: calc(-1 * var(--pen-2)); border-top: inherit; border-bottom: inherit;
  transform-origin: left center; transition: transform var(--t-rule) var(--ease-pen);
}
html.ink .titleblock::after {
  inset: 0 calc(-1 * var(--pen-2)); border-left: inherit; border-right: inherit;
  transform-origin: center top; transition: transform var(--t-set) var(--ease-pen) calc(var(--t-rule) * 0.6);
}
html.ink .titleblock > div::before, html.ink .titleblock > div::after { content: ""; position: absolute; pointer-events: none; }
html.ink .titleblock > div::before {
  top: 0; bottom: 0; right: 100%; width: 0; border-left: inherit;
  transform-origin: center top; transition: transform var(--t-set) var(--ease-pen) calc(var(--i, 0) * var(--stagger) + var(--t-rule) * 0.6);
}
html.ink .titleblock > div::after {
  left: 0; right: 0; bottom: 100%; height: 0; border-top: inherit;
  transform-origin: left center; transition: transform var(--t-set) var(--ease-pen) calc(var(--i, 0) * var(--stagger) + var(--t-rule) * 0.6);
}
html.ink .titleblock:not(.is-inked)::before, html.ink .titleblock:not(.is-inked) > div::after { transform: scaleX(0); }
html.ink .titleblock:not(.is-inked)::after, html.ink .titleblock:not(.is-inked) > div::before { transform: scaleY(0); }

/* ═════════════════════════════════════════════════════════════
   Wayfinding. The site is one set of drawings: every page is a
   sheet, every section a numbered part of it.
   ═════════════════════════════════════════════════════════════ */

/* Plan-view switch (used in the rail, the dock, the contents panel and About) */
.pv-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px 0 10px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--sheet); color: var(--ink);
  font: 600 0.875rem/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: border-color var(--t-ui) ease, background-color var(--t-ui) ease;
}
.pv-btn:hover { border-color: var(--ink); }
.pv-sw { position: relative; width: 30px; height: 18px; flex: none; border-radius: 99px; background: var(--line-2); transition: background-color var(--t-set) ease; }
.pv-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--sheet); box-shadow: 0 1px 2px rgba(15, 24, 40, .3); transition: transform var(--t-set) var(--ease-out);
}
.pv-btn[aria-pressed="true"] .pv-sw { background: var(--accent); }
.pv-btn[aria-pressed="true"] .pv-sw::after { transform: translateX(12px); background: var(--ink-band); }
.pv-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 6px; }
.pv-invite[hidden] { display: none; }
.pv-invite p { color: var(--ink-2); font-size: var(--step--1); max-width: 40ch; }

/* Rail: the page's sections down the left edge, always named (wide screens only).
   A ruler with one tick per section; the whole row, tick and name, is the link.
   Where the margin is too narrow for it, the sheet steps right by the rail's width. */
:root { --rail-w: 196px; --rail-room: 212px; }
.rail { display: none; }
@media (min-width: 1400px) {
  .rail {
    position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 30;
    display: grid; justify-items: stretch; gap: 12px; width: var(--rail-w); max-height: calc(100vh - 140px); overflow-y: auto;
    padding: 12px 12px 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--paper);
    scrollbar-width: thin;
  }
}
@media (min-width: 1400px) and (max-width: 1703.98px) {
  body:has(main > section[data-nav] ~ section[data-nav] ~ section[data-nav]) .wrap {
    max-width: calc(var(--wrap) + var(--gutter) * 2 + var(--rail-room)); padding-left: calc(var(--gutter) + var(--rail-room));
  }
  body:has(main > section[data-nav] ~ section[data-nav] ~ section[data-nav])::before {
    --mr: max(0px, (100vw - 1280px - var(--rail-room)) / 2); --ml: calc(var(--mr) + var(--rail-room));
  }
}
.rail-count { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rail-count b { color: var(--ink); font-weight: 600; }
.rail-list { list-style: none; position: relative; display: grid; }
.rail-list::before, .rail-list::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; pointer-events: none; }
.rail-list::before { bottom: 0; background: var(--line-2); }
.rail-list::after { height: calc(var(--prog, 0) * 100%); background: var(--ink); }
.rail-list a {
  position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 8px; align-items: start;
  padding: 5px 4px 5px 0; border-radius: 6px; text-decoration: none; color: var(--ink-3);
}
.rail-list i { display: block; width: 18px; height: var(--pen-1); margin-top: 8px; background: var(--line-2); transform: scaleX(0.5); transform-origin: left center; transition: transform var(--t-set) var(--ease-out), background-color var(--t-ui) ease; }
.rail-list span { font: 560 0.8125rem/17px var(--font); color: var(--ink-3); transition: color var(--t-ui) ease; }
.rail-list a:hover i { transform: scaleX(0.85); background: var(--ink-2); }
.rail-list a:hover span { color: var(--ink); }
.rail-list a.is-on i { height: var(--pen-3); margin-top: 7px; transform: none; background: var(--ink); }
.rail-list a.is-on span { color: var(--ink); font-weight: 680; }
.rail .pv-btn { width: 100%; justify-content: flex-start; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 0.8125rem; }

/* Dock: the same index bottom-left; the rail replaces it on wide screens, the sticky bar on phones */
.dock {
  position: fixed; left: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 4px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--sheet) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -14px rgba(15, 24, 40, .35);
}
@media (min-width: 1100px) { .dock { left: 26px; bottom: 26px; } }
@media (min-width: 1400px) { .dock.has-rail { display: none; } }
@media (max-width: 720px) {
  .dock.has-bar { display: none; }
  .dock { left: 12px; bottom: 12px; }
  .dock .ix-btn span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.dock .pv-btn { border-color: transparent; min-height: 36px; background: transparent; }
.ix-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); font: 600 0.875rem/1 var(--font); cursor: pointer;
}
.ix-btn:hover, .dock .pv-btn:hover { background: var(--paper-2); }
.ix-btn svg { width: 18px; height: 18px; }
.ix-btn b { font: 500 0.75rem/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Phones: the index button sits beside the sticky call to action */
@media (max-width: 720px) {
  .mobile-cta { display: flex; gap: 8px; }
  .mobile-cta .btn { flex: 1; min-width: 0; }
  .mobile-cta .ix-btn {
    flex: none; flex-direction: column; justify-content: center; gap: 3px; width: 56px; min-height: 56px; padding: 0;
    border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--sheet);
    box-shadow: 0 10px 30px -10px rgba(15, 24, 40, .45);
  }
  .mobile-cta .ix-btn span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Contents panel: a <dialog>. On phones it opens as a modal bottom sheet (focus trapped, page inert);
   on larger screens it is a small panel anchored to the dock. */
.ix {
  position: fixed; z-index: 70; inset: auto auto 72px 16px; margin: 0;
  width: min(340px, calc(100vw - 32px)); max-width: none; height: auto; max-height: min(74vh, 660px); overflow: auto;
  padding: 14px 16px 18px; border: var(--pen-2) solid var(--ink); border-radius: 14px; background: var(--sheet); color: var(--ink);
  box-shadow: 0 30px 60px -22px rgba(15, 24, 40, .5); overscroll-behavior: contain;
  transform-origin: left bottom;
  transition: opacity var(--t-ui) ease, transform var(--t-set) var(--ease-out), display var(--t-ui) allow-discrete, overlay var(--t-ui) allow-discrete;
}
.ix:not([open]) { display: none; opacity: 0; transform: translateY(10px); }
@starting-style { .ix[open] { opacity: 0; transform: translateY(10px); } }
.ix::backdrop { background: rgba(15, 24, 40, .34); transition: opacity var(--t-ui) ease, display var(--t-ui) allow-discrete, overlay var(--t-ui) allow-discrete; }
@starting-style { .ix[open]::backdrop { opacity: 0; } }
@media (min-width: 1100px) { .ix { left: 26px; bottom: 82px; } }
@media (max-width: 720px) {
  .ix { inset: auto 8px 8px 8px; width: auto; max-height: 80vh; max-height: 80dvh; border-radius: 16px; padding-bottom: 14px; transform-origin: center bottom; }
}
html:has(.ix:modal, .sheet-dialog:modal) { overflow: hidden; }

/* A sheet laid over the page (the example plan opens in one) */
.sheet-dialog {
  width: min(760px, calc(100vw - 24px)); max-width: none; max-height: 88vh; max-height: 88dvh; margin: auto; padding: 0; overflow: auto;
  border: var(--pen-2) solid var(--ink); border-radius: 14px; background: var(--sheet); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(15, 24, 40, .55); overscroll-behavior: contain;
  transition: opacity var(--t-ui) ease, transform var(--t-lay) var(--ease-out), display var(--t-ui) allow-discrete, overlay var(--t-ui) allow-discrete;
}
.sheet-dialog:not([open]) { display: none; opacity: 0; transform: translateY(14px); }
@starting-style { .sheet-dialog[open] { opacity: 0; transform: translateY(14px); } }
.sheet-dialog::backdrop { background: rgba(15, 24, 40, .4); transition: opacity var(--t-ui) ease, display var(--t-ui) allow-discrete, overlay var(--t-ui) allow-discrete; }
@starting-style { .sheet-dialog[open]::backdrop { opacity: 0; } }
.sd-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 18px;
  border-bottom: var(--pen-1) solid var(--ink); background: var(--sheet);
}
.sd-head .ix-title { margin-right: auto; }
.sd-head .link { font-size: 0.9375rem; }
.sd-body { padding: 16px; }
.sd-body .mail { box-shadow: none; }
@media (max-width: 720px) {
  .sheet-dialog { width: auto; margin: auto 8px 8px; max-height: 90vh; max-height: 90dvh; border-radius: 16px; }
  .sd-body { padding: 10px; }
}
.ix-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ix-title { font-weight: 720; font-stretch: 108%; font-size: 1.0625rem; }
.ix-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.ix-close:hover { background: var(--paper-2); }
.ix-close svg { width: 18px; height: 18px; }
.ix .label { margin: 12px 0 4px; }
.ix ol, .ix ul { list-style: none; display: grid; }
.ix li a {
  display: grid; grid-template-columns: 30px 1fr; align-items: center; min-height: 40px; padding: 0 8px; border-radius: 8px;
  color: var(--ink-2); text-decoration: none; font-weight: 560;
}
.ix li a:hover { background: var(--paper-2); color: var(--ink); }
.ix li a[aria-current] { color: var(--ink); font-weight: 680; background: var(--paper); }
.ix li .mono { font-size: 0.75rem; color: var(--ink-3); }
.ix .pv-btn { width: 100%; justify-content: flex-start; margin: 2px 0 4px; min-height: 48px; border-radius: 12px; }
.ix .pv-btn small { margin-left: auto; font-weight: 500; font-size: 0.75rem; color: var(--ink-3); white-space: normal; text-align: right; }

/* Footer title block: the next sheet in the set */
.tb-next a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; }
.tb-next a:hover { text-decoration: underline; }
.tb-next svg { width: 14px; height: 14px; flex: none; }

/* ═════════════════════════════════════════════════════════════
   Plan view: the same page as its blueprint. Tokens flip to
   white linework on blue, photos become placeholders, every
   section shows why it is there.
   ═════════════════════════════════════════════════════════════ */
html.plan-view {
  color-scheme: dark;
  --paper: #1b3f9e; --paper-2: #2449a9; --sheet: #1e43a4;
  --ink: #f5f8ff; --ink-2: #d6dff8; --ink-3: #c3cff2;
  --line: rgba(255, 255, 255, 0.2); --line-2: rgba(255, 255, 255, 0.36);
  --grid: rgba(255, 255, 255, 0.05); --grid-strong: rgba(255, 255, 255, 0.1);
  --accent: #a5e4ff; --accent-hover: #d2f2ff; --accent-wash: rgba(165, 228, 255, 0.18);
  --ink-band: #112d7a; --ink-band-2: #16378f;
  --ok: #5fe0a0; --warn: #ffb199;
  --ok-wash: rgba(71, 212, 143, 0.18); --warn-wash: rgba(255, 154, 122, 0.18);
  --shadow-sheet: none;
  --rake: rgba(255, 255, 255, 0.08);
}
html.plan-view body::before { background-image: radial-gradient(1100px 760px at 0 440px, var(--rake), transparent 66%); background-size: auto; background-repeat: no-repeat; background-position: 0 0; }
html.plan-view body {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px;
}
.plan-view .nav { background: rgba(27, 63, 158, 0.9); }
.plan-view .section--sheet { background-color: transparent; --hl-bg: var(--paper); }
.plan-view .btn { --b-fg: #0c2263; }
.plan-view .btn--ghost, .plan-view .btn--outline-light { --b-fg: var(--ink); }
.plan-view .btn--light, .plan-view .btn--light:hover { --b-fg: #0c2263; }
.plan-view main > section { outline: 1px dashed rgba(255, 255, 255, 0.16); outline-offset: -10px; }
/* inside the sheet border on wide screens; the first section is bounded by the border and its zone strip */
@media (min-width: 1100px) {
  .plan-view main > section { outline-offset: -22px; }
  .plan-view main > section:first-child { outline: 0; }
}
.plan-view picture { position: relative; display: block; }
.plan-view picture img { opacity: 0.12; filter: grayscale(1); }
.plan-view picture::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255, 255, 255, 0.5);
  --x: transparent calc(50% - 0.6px), rgba(255, 255, 255, 0.45) calc(50% - 0.6px), rgba(255, 255, 255, 0.45) calc(50% + 0.6px), transparent calc(50% + 0.6px);
  background: linear-gradient(to top right, var(--x)), linear-gradient(to bottom right, var(--x));
}
.plan-view .checks li::before {
  background-color: rgba(159, 178, 255, .16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23a5e4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5'/%3E%3C/svg%3E");
}
.plan-view .faq summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='%23f5f8ff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M9 14h10M14 9v10'/%3E%3C/svg%3E");
}

/* Why-notes: one per section, only in plan view */
.why-wrap { display: none; }
.plan-view .why-wrap { display: block; }
.why {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: baseline;
  max-width: 820px; margin: 0 0 clamp(22px, 3vw, 34px); padding: 11px 16px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.6); border-radius: 8px; background: rgba(8, 26, 84, 0.42);
}
.why-k { font: 600 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.why p { font-size: 0.9375rem; line-height: 1.5; color: #f5f8ff; }
@media (max-width: 720px) { .why { grid-template-columns: minmax(0, 1fr); } }

/* Crosshair with live coordinates, plan view on a mouse only */
.xh { position: fixed; inset: 0; z-index: 45; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) { .plan-view .xh.is-on { display: block; } }
.xh i { position: absolute; background: rgba(255, 255, 255, 0.32); }
.xh-x { left: 0; right: 0; top: 0; height: 1px; transform: translateY(var(--cy, -10px)); }
.xh-y { top: 0; bottom: 0; left: 0; width: 1px; transform: translateX(var(--cx, -10px)); }
.xh-read {
  position: absolute; left: 0; top: 0; transform: translate(calc(var(--cx, 0px) + 12px), calc(var(--cy, 0px) + 12px));
  padding: 2px 6px; border-radius: 4px; background: rgba(8, 26, 84, 0.85);
  font: 500 0.75rem/1.3 var(--mono); color: #f5f8ff; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ─── Page changes: the next sheet is laid down, the header stays put ───
   The sheets are numbered. Going to a later sheet, it comes in from the right; going back, from
   the left. site.js writes the direction just before leaving (sessionStorage 'ek-dir') and adds it
   as a view-transition type on arrival; without that the sheet simply rises into place. */
@view-transition { navigation: auto; }
.nav { view-transition-name: site-nav; }
::view-transition-old(root) { animation: 160ms ease-in both ek-out; }
::view-transition-new(root) { animation: var(--t-lay) var(--ease-out) both ek-in; }
@keyframes ek-out { to { opacity: 0; } }
@keyframes ek-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes ek-in-fwd { from { opacity: 0; transform: translateX(24px); } }
@keyframes ek-in-back { from { opacity: 0; transform: translateX(-24px); } }
@keyframes ek-out-fwd { to { opacity: 0; transform: translateX(-12px); } }
@keyframes ek-out-back { to { opacity: 0; transform: translateX(12px); } }
html:active-view-transition-type(fwd)::view-transition-new(root) { animation-name: ek-in-fwd; }
html:active-view-transition-type(back)::view-transition-new(root) { animation-name: ek-in-back; }
html:active-view-transition-type(fwd)::view-transition-old(root) { animation-name: ek-out-fwd; }
html:active-view-transition-type(back)::view-transition-old(root) { animation-name: ek-out-back; }
/* The form loads no site.js, so nothing can name the direction there. Nearly every sheet that leads to it
   is an earlier one: it comes in from the right. */
html:has(.apply-main)::view-transition-new(root) { animation-name: ek-in-fwd; }
html:has(.apply-main)::view-transition-old(root) { animation-name: ek-out-fwd; }

/* Morphs: <a data-morph="NAME"> travels to [data-morph-target="NAME"] on the next sheet.
   The link is named by site.js on the click that leaves the page (and un-named afterwards);
   the target is named here, so it works on sheets that do not load site.js. One line per name. */
[data-morph-target="apply-title"] { view-transition-name: apply-title; }
[data-morph-target="websites-board"] { view-transition-name: websites-board; }
[data-morph-target] { view-transition-class: morph; }
::view-transition-group(*.morph) { animation-duration: 420ms; animation-timing-function: var(--ease-out); }
/* both ends keep their own size and share the top-left corner of the moving box: nothing is stretched */
::view-transition-old(*.morph), ::view-transition-new(*.morph) { width: 100%; height: 100%; object-fit: none; object-position: left top; }
/* a target nobody travelled to, or a link whose target is missing, behaves like the rest of its sheet */
::view-transition-new(*.morph):only-child { animation: var(--t-lay) var(--ease-out) both ek-in; }
::view-transition-old(*.morph):only-child { animation: 160ms ease-in both ek-out; }
html:active-view-transition-type(fwd)::view-transition-new(*.morph):only-child { animation-name: ek-in-fwd; }
html:active-view-transition-type(back)::view-transition-new(*.morph):only-child { animation-name: ek-in-back; }
html:active-view-transition-type(fwd)::view-transition-old(*.morph):only-child { animation-name: ek-out-fwd; }
html:active-view-transition-type(back)::view-transition-old(*.morph):only-child { animation-name: ek-out-back; }
html:has(.apply-main)::view-transition-new(*.morph):only-child { animation-name: ek-in-fwd; }
html:has(.apply-main)::view-transition-old(*.morph):only-child { animation-name: ek-out-fwd; }

/* Switching plan view: the blueprint is scanned down over the page, a bright edge riding the scan */
html.vt-wipe::view-transition-old(root) { animation: none; }
html.vt-wipe::view-transition-new(root) { animation: ek-wipe var(--t-scan) var(--ease-pen) both; }
@keyframes ek-wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
html.vt-wipe [data-morph-target] { view-transition-name: none; }
.scan {
  position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 90; pointer-events: none; display: none;
  background: linear-gradient(90deg, transparent, #a5e4ff 12%, #fff 50%, #a5e4ff 88%, transparent);
}
html.vt-wipe .scan { display: block; view-transition-name: scan; }
html.vt-wipe::view-transition-group(scan) { animation: ek-scan var(--t-scan) var(--ease-pen) both; }
html.vt-wipe::view-transition-old(scan), html.vt-wipe::view-transition-new(scan) { animation: none; }
@keyframes ek-scan { from { transform: translateY(0); } to { transform: translateY(100vh); } }

/* ─── Reading ruler: a cut line under the header that fills as the sheet is read ───
   Below 1400px there is no rail, so this is the phone and laptop version of it. Scroll-linked
   on the compositor where the browser can; the rail keeps its script fallback, the header
   simply has no ruler. */
@supports (animation-timeline: scroll()) {
  @media (max-width: 1399px) {
    .nav::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--pen-3) + 1px); height: var(--pen-3); pointer-events: none;
      background: var(--ink); transform: scaleX(0); transform-origin: left center;
      animation: ek-ruler-x linear both; animation-timeline: scroll(root block);
    }
  }
  .rail-list::after { height: 100%; transform-origin: center top; animation: ek-ruler-y linear both; animation-timeline: scroll(root block); }
  @keyframes ek-ruler-x { to { transform: scaleX(1); } }
  @keyframes ek-ruler-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

/* Samples stay paper: the concept homepages are pinned onto the blueprint, not redrawn */
.plan-view :is(.board, .concept .browser, .shot, .oldnew, .wsample) {
  color-scheme: light; color: #0f1828;
  --paper: #f6f7f4; --paper-2: #eef0ec; --sheet: #ffffff;
  --ink: #0f1828; --ink-2: #3b4557; --ink-3: #5e6878;
  --line: #d8dce2; --line-2: #c3c9d2;
  --accent: #2445e0; --accent-hover: #1a35b8; --accent-wash: #e9eeff;
  --ink-band: #173894; --ink-band-2: #1d43aa;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 26px 50px -24px rgba(0, 0, 0, 0.55);
}
.plan-view :is(.board, .concept, .shot, .oldnew, .wsample) picture img { opacity: 1; filter: none; }
.plan-view :is(.board, .concept, .shot, .oldnew, .wsample) picture::after { display: none; }
.plan-view .hero-title::before, .plan-view .hero-title::after { border-top-color: rgba(165, 228, 255, 0.45); }
.plan-view .guide { color: var(--accent); }
/* Ink-filled chips turn white in plan view; their text goes navy so it stays readable */
.plan-view :is(.case-flow li.is-end, .lp-pipe li.is-end, .nodes li.is-end, .box.is-ink, .bub.me, .bub--out, .seg-tab[aria-selected="true"]) { color: #0c2263; }
@media (max-width: 720px) { .footer-tb .tb-next dd { white-space: normal; } }


/* ═════════════════════════════════════════════════════════════
   Reduced motion: one switch. Every token goes to zero, nothing
   waits its turn, sheets change without a transition. Whatever a
   page draws with these tokens is finished the moment it appears.
   ═════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  :root { --t-tap: 0ms; --t-ui: 0ms; --t-set: 0ms; --t-lay: 0ms; --t-rule: 0ms; --t-scan: 0ms; --stagger: 0ms; }
  html { scroll-behavior: auto; }
  *, *::before, *::after, ::backdrop { transition-delay: 0s !important; transition-duration: 0.01ms !important; animation-delay: 0s !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .scan, .nav::after { display: none !important; }
}
