/* MediaWright — hand-maintained stylesheet (not generated).
 *
 * Design idea: a "wright" is a maker, so the site borrows from engineering
 * drawings — title blocks, dimension-style rules, mono labels — and gives
 * each of the four doors (Enterprise, Business, Non-profits, Personal
 * sales) its own accent, used consistently wherever that door appears.
 *
 * Contrast, computed from relative luminance (WCAG 2.1), not eyeballed:
 *   light  ink/bg 15.5  soft/bg 7.0  np/bg 6.2  co/bg 7.1  ps/bg 5.1  en/bg 6.66
 *          white on np 6.7 / co 7.7 / ps 5.6 / en 7.23 / ink 16.8
 *   dark   ink/bg 15.4  soft/bg 8.2  np/bg 9.3  co/bg 8.7  ps/bg 8.9  en/bg 8.11
 *          bg on np 9.3 / co 8.7 / ps 8.9 / en 8.11 / ink 15.4
 *   washes light: soft on np/co/ps/en-wash 6.5/6.3/6.3/6.18, own accent on own wash 5.8/6.4/4.7/5.9
 *   washes dark:  soft on washes 7.0/7.2/7.4/7.4, own accent on own wash 7.8/7.6/8.0/7.29
 *   terminal (both themes): text 15.3, green 10.8, dim 7.0
 *   .callout-aside reuses ink on bg (body text); no new pairs.
 *   .more and .jump (PCC page) reuse ink on bg (15.5 light / 15.4 dark) and ink on surface; no new pairs.
 * --rule and --rule-strong are decorative only, never text.
 * Any new text/background pair must be computed and added here.
 */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-var.woff2') format('woff2-variations'), url('/fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/fonts/atkinson-next-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/fonts/atkinson-next-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/fonts/atkinson-next-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; src: url('/fonts/atkinson-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; src: url('/fonts/atkinson-mono-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F4F6F3;
  --surface: #FFFFFF;
  --ink: #132019;
  --soft: #4A5750;
  --rule: #C9D1CB;
  --rule-strong: #8A968F;
  --np: #17684A;
  --co: #1F4FA8;
  --ps: #B93E0B;
  --en: #6E3FA3;
  --np-wash: #E3F0E9;
  --co-wash: #E4EBF8;
  --ps-wash: #F9E7DE;
  --en-wash: #EDE5F5;
  --on-accent: #FFFFFF;
  --term-bg: #0B1410;
  --term-ink: #C9F2D9;
  --term-ok: #7FD6A6;
  --term-dim: #8FA39A;
  --term-rule: #22332B;
  --shadow: 0 18px 40px -24px rgba(10, 20, 15, .45);

  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --accent: var(--ink);
  --accent-wash: var(--surface);
  --wrap: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0E1512;
    --surface: #16201B;
    --ink: #E4ECE7;
    --soft: #A3B0A9;
    --rule: #2A3630;
    --rule-strong: #5C6B63;
    --np: #5FCB9C;
    --co: #8DB1FF;
    --ps: #FF9A62;
    --en: #C49BE8;
    --np-wash: #15271F;
    --co-wash: #16203A;
    --ps-wash: #2C1A10;
    --en-wash: #241A2E;
    --on-accent: #0E1512;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
  }
}

body.door-np { --accent: var(--np); --accent-wash: var(--np-wash); }
body.door-co { --accent: var(--co); --accent-wash: var(--co-wash); }
body.door-ps { --accent: var(--ps); --accent-wash: var(--ps-wash); }
body.door-en { --accent: var(--en); --accent-wash: var(--en-wash); }
.accent-np { --c: var(--np); --w: var(--np-wash); }
.accent-co { --c: var(--co); --w: var(--co-wash); }
.accent-ps { --c: var(--ps); --w: var(--ps-wash); }
.accent-en { --c: var(--en); --w: var(--en-wash); }
.accent-ink { --c: var(--ink); --w: var(--bg); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-stretch: 118%; font-weight: 800; line-height: 1.08; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--co); outline-offset: 3px; border-radius: 2px; }
code { font-family: var(--mono); font-size: .88em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }

.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: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.label { font-family: var(--mono); font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.lead { font-size: 1.2rem; color: var(--soft); max-width: 46ch; }
.lead strong { color: var(--ink); }
.muted { color: var(--soft); }
.stack { display: grid; gap: 16px; }

.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; padding: 12px 20px; border: 2px solid var(--ink); border-radius: 3px; background: var(--ink); color: var(--bg); }
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: transparent; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 64px; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.header-cta { font-weight: 700; text-decoration: none; background: var(--ink); color: var(--bg); padding: 7px 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 3px; border: 2px solid var(--ink); }
.header-cta:hover { background: transparent; color: var(--ink); }
.header-cta[aria-current="page"] { background: transparent; color: var(--ink); }
.menu-toggle { display: none; align-items: center; gap: 8px; font: 700 1rem var(--body); background: none; color: var(--ink); border: 2px solid var(--ink); border-radius: 3px; padding: 6px 12px; min-height: 44px; cursor: pointer; }

.mainnav { border-top: 1px solid var(--rule); }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 26px; }
.mainnav a { display: block; padding: 10px 0; font-weight: 700; font-size: .98rem; text-decoration: none; border-bottom: 3px solid transparent; }
.mainnav a:hover { border-bottom-color: var(--rule-strong); }
.mainnav a.d-np { color: var(--np); }
.mainnav a.d-co { color: var(--co); }
.mainnav a.d-ps { color: var(--ps); }
.mainnav a.d-en { color: var(--en); }
.mainnav a[aria-current="page"] { border-bottom-color: currentColor; }
.mainnav .mobile-only { display: none; }

.header-search { position: relative; width: min(260px, 32vw); }
.header-search form { position: relative; }
.header-search .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
#site-search-input { width: 100%; font: 1rem var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 3px; padding: 7px 10px 7px 34px; min-height: 44px; }
#site-search-input::placeholder { color: var(--soft); opacity: 1; }
.site-search-results { position: absolute; right: 0; top: calc(100% + 6px); width: min(420px, 90vw); list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--rule-strong); box-shadow: var(--shadow); z-index: 30; max-height: 70vh; overflow-y: auto; }
.site-search-results a { display: grid; gap: 2px; padding: 8px 10px; text-decoration: none; border-radius: 2px; }
.site-search-results a:hover, .site-search-results a:focus { background: var(--bg); outline-offset: -3px; }
.site-search-heading { font-weight: 700; }
.site-search-page { font-size: .85rem; color: var(--soft); }
.site-search-empty { padding: 8px 10px; color: var(--soft); }

@media (max-width: 1000px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .header-row { flex-wrap: wrap; }
  .header-search { order: 3; width: 100%; padding-bottom: 6px; }
  .mainnav { display: none; }
  .js .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; padding-block: 6px 12px; }
  .mainnav .mobile-only { display: list-item; }
  .mainnav a { padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .mainnav a[aria-current="page"] { border-bottom: 1px solid var(--rule); text-decoration: underline; text-decoration-thickness: 3px; }
}
/* Without JavaScript the menu button can't work, so show the nav instead. */
@media (max-width: 1000px) { html:not(.js) .mainnav { display: block; } html:not(.js) .menu-toggle { display: none; } }

/* ---------- Sections ---------- */
.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--rule); }
.section-surface { background: var(--surface); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head p { max-width: 48ch; color: var(--soft); }
.section-head .label { display: block; margin-bottom: 10px; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.split > * { min-width: 0; }
.split .intro p { margin-top: 16px; color: var(--soft); max-width: 46ch; }
.split h2 + .lead { margin-top: 16px; }
.split .intro p strong { color: var(--ink); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Hero ---------- */
.hero { padding-block: 72px 60px; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: end; }
.hero-grid > * { min-width: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { margin-top: 16px; }
.hero h1 em { font-style: normal; color: var(--soft); font-weight: 600; }
.hero .lead { margin-top: 24px; }
.tb-caption { margin-top: 10px; font-size: .9rem; color: var(--soft); }

/* Door page hero — tinted with the door's own accent. */
.door-hero { background: var(--accent-wash); border-bottom: 1px solid var(--rule); padding-block: 64px 56px; }
.crumb { font-family: var(--mono); font-size: 1rem; color: var(--soft); }
.crumb a { color: var(--accent); font-weight: 600; display: inline-block; padding: 12px 4px; margin-block: -12px; }
.door-hero h1 { margin-top: 18px; max-width: 18ch; font-size: clamp(1.9rem, 5.6vw, 4.4rem); }
.door-hero .lead { margin-top: 20px; max-width: 52ch; }

/* ---------- Title block ---------- */
.titleblock { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); background: var(--surface); font-family: var(--mono); font-size: .84rem; }
.titleblock > div { min-width: 0; padding: 8px 12px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.titleblock > div:nth-child(2n) { border-right: 0; }
.titleblock > .full { grid-column: 1 / -1; border-right: 0; }
.titleblock > .full ~ div:nth-child(2n) { border-right: 1px solid var(--ink); }
.titleblock > .full ~ div:nth-child(2n+1) { border-right: 0; }
.titleblock > div:nth-last-child(-n+2) { border-bottom: 0; }
.titleblock .k { display: block; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.titleblock .v { display: block; font-weight: 600; font-size: 1rem; overflow-wrap: anywhere; }
.titleblock .ok .v { color: var(--np); }
.titleblock .big .v { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 1.35rem; }
.titleblock-small { font-size: .76rem; }
.titleblock-small .v { font-size: .86rem; }

/* ---------- Doors ---------- */
.door-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .door-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .door-grid { grid-template-columns: 1fr; } }
.door { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.door:hover, .door:focus-within { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c); }
.door-shot { position: relative; background: var(--w); border-bottom: 1px solid var(--rule); aspect-ratio: 16 / 10; overflow: hidden; }
@media (max-width: 560px) { .door-shot { aspect-ratio: 16 / 7; } }
.credit { margin-top: 20px; font-size: .9375rem; color: var(--soft); }
.credit a { display: inline-block; padding-block: 8px; }
.door-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.door-shot .tag { position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: .875rem; font-weight: 600; background: var(--surface); color: var(--ink); padding: 4px 8px; border: 1px solid var(--rule-strong); }
.door-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.door .who { font-family: var(--mono); font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; color: var(--c); }
.door h3 { font-size: 1.7rem; }
.door h3 a { text-decoration: none; }
/* The whole card is clickable via the heading link's stretched hit area. */
.door h3 a::after { content: ""; position: absolute; inset: 0; }
.door p { color: var(--soft); font-size: 1rem; }
.door .example { font-family: var(--mono); font-size: .9375rem; color: var(--ink); }
.door-foot { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--rule-strong); display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.go { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 2px solid var(--c); border-radius: 3px; font-weight: 700; color: var(--c); }
.door:hover .go, .door:focus-within .go { background: var(--c); color: var(--on-accent); }
.door:focus-within { outline: 3px solid var(--co); outline-offset: 3px; }

/* ---------- Terminal ---------- */
.terminal { background: var(--term-bg); color: var(--term-ink); font-family: var(--mono); font-size: .88rem; line-height: 1.7; border-radius: 4px; padding: 20px 22px; overflow-x: auto; }
.terminal .dim { color: var(--term-dim); }
.terminal .ok { color: var(--term-ok); }
.terminal .row { display: flex; gap: 14px; }
.terminal .row .t { flex: 1; min-width: 0; }
.terminal .sum { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--term-rule); }

/* ---------- Proof strip ---------- */
.proof { background: var(--ink); color: var(--bg); padding-block: 60px; }
.proof .label { color: var(--bg); }
.proof-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.proof-head h2 { max-width: 24ch; }
.proof-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--rule-strong); }
@media (max-width: 900px) { .proof-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 22px 16px 0 0; }
.stat .n { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .d { margin-top: 8px; font-size: .92rem; max-width: 20ch; }

/* ---------- SiteAdmin ---------- */
.checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .5em; width: 13px; height: 13px; border: 2px solid var(--np); border-radius: 50%; }
.ship { background: var(--surface); border: 1px solid var(--rule); padding: 22px; display: grid; gap: 12px; }
.ship-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ship-title { font-family: var(--mono); font-stretch: 100%; font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; color: var(--soft); }
.replay { font: 600 .82rem var(--mono); background: none; color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 3px; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 12px; border: 1px solid var(--rule); border-radius: 4px; transition: border-color .3s, background-color .3s; }
.step .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--rule-strong); font: 600 .82rem var(--mono); color: var(--soft); background: var(--surface); transition: background-color .3s, border-color .3s, color .3s; }
.step .what { font-weight: 700; }
.step .detail { font-size: 1rem; color: var(--soft); margin-top: 2px; }
.bubble { margin-top: 8px; background: var(--np-wash); border-radius: 12px 12px 12px 2px; padding: 10px 14px; font-size: .96rem; }
.step.active { border-color: var(--np); background: var(--np-wash); }
.step.active .detail { color: var(--ink); }
.step.active .dot, .step.done .dot { background: var(--np); border-color: var(--np); color: var(--on-accent); }
.ship .note { font-size: .9rem; color: var(--soft); }

/* ---------- Rules & AI ---------- */
ol.rules { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: rule; border-top: 1px solid var(--rule); }
ol.rules li { counter-increment: rule; display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
ol.rules li::before { content: counter(rule, decimal-leading-zero); font-family: var(--mono); color: var(--soft); font-size: .92rem; padding-top: 2px; }
ol.rules strong { display: block; }
ol.rules span { color: var(--soft); font-size: .95rem; }
.ai-box { border: 2px solid var(--ink); background: var(--surface); padding: 20px 22px; }
.ai-box h3 { font-size: 1.2rem; }
.ai-box > p { margin-top: 8px; color: var(--soft); font-size: .98rem; }
.ai-box dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .95rem; }
.ai-box dt { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); padding-top: 3px; }
.ai-box dd { margin: 0; }

/* ---------- Cards & grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .card-grid, .card-grid.two { grid-template-columns: 1fr; } }
.card-grid > div { background: var(--surface); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 22px; }
.card-grid h3 { font-family: var(--body); font-stretch: 100%; font-size: 1.08rem; font-weight: 700; letter-spacing: 0; }
.card-grid p { margin-top: 6px; font-size: 1.0625rem; color: var(--soft); }
.card-grid code { color: var(--ink); }
.card-grid .card-link { margin-top: 10px; font-weight: 700; }
.card-grid .card-link a { color: var(--accent); }

.scale-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .scale-grid { grid-template-columns: 1fr; } }
.scale-card { border: 1px solid var(--rule); background: var(--surface); padding: 24px; }
.scale-card p { margin-top: 10px; color: var(--soft); }
.churches { display: flex; gap: 10px; margin-top: 18px; color: var(--accent); }
.churches svg { width: 38px; height: 44px; }

/* Case-study cards (rendered from src/portfolio.config.mjs). */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .case-grid { grid-template-columns: 1fr; } }
.case-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); min-width: 0; }
.case-shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--w); }
.case-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.case-card:hover .case-shot img { transform: scale(1.02); }
.case-body { padding: 24px; display: grid; gap: 10px; }
.case-url { font-family: var(--mono); font-size: .86rem; font-weight: 600; color: var(--c); }
.case-body h3 { font-size: 1.5rem; }
.case-body p:not(.case-url) { color: var(--soft); }
.case-link { font-weight: 700; color: var(--c); }
/* "Demo" badge on a kind: 'demo' portfolio card. --on-accent on the card's
 * door accent: the same pairs as the header comment's "white on np/co/ps/ink"
 * (light) and "bg on np/co/ps/ink" (dark), so nothing new to compute. */
.case-badge { display: inline-block; margin-right: 8px; padding: 1px 8px; background: var(--c); color: var(--on-accent); font-family: var(--mono); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
/* minmax(0, 1fr), not 1fr: a bare 1fr can't shrink below its content, so on a 320px phone three figures pushed the whole page sideways. */
.case-facts { list-style: none; margin: auto 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.case-facts li { padding: 14px 16px; border-right: 1px solid var(--rule); font-size: .84rem; color: var(--soft); overflow-wrap: anywhere; }
.case-facts li:last-child { border-right: 0; }
.case-facts b { display: block; font-family: var(--display); font-stretch: 118%; font-size: 1.35rem; color: var(--ink); }
/* The narrowest phones: less padding and a slightly smaller figure so "100%" fits its cell without breaking. */
@media (max-width: 400px) {
  .case-facts li { padding: 12px 10px; }
  .case-facts b { font-size: 1.2rem; }
}

.ticks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ticks li { position: relative; padding: 12px 0 12px 30px; border-bottom: 1px solid var(--rule); }
.ticks li::before { content: "✓"; position: absolute; left: 4px; top: 12px; font-family: var(--mono); font-weight: 600; color: var(--accent); }
body.door-none .ticks li::before { color: var(--np); }

/* Process steps (a real sequence, so they're numbered). */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }
.process li { counter-increment: step; background: var(--surface); border: 1px solid var(--rule); padding: 20px; }
.process li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 .85rem var(--mono); margin-bottom: 12px; }
body.door-none .process li::before { background: var(--ink); color: var(--bg); }
.process-stack { grid-template-columns: 1fr; }
.process-three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .process-three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-three { grid-template-columns: 1fr; } }
.process h3 { font-family: var(--body); font-stretch: 100%; font-size: 1.05rem; letter-spacing: 0; }
.process p { margin-top: 6px; color: var(--soft); font-size: 1.0625rem; }

.callout { border: 2px solid var(--ink); background: var(--surface); padding: 20px 22px; }
.callout p + p { margin-top: 10px; }
.callout p { max-width: 70ch; }
/* A callout (or pair) that follows a card or step grid needs its own gap. */
.callout-after { margin-top: 24px; }
.callout-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 800px) { .callout-pair { grid-template-columns: 1fr; } }

/* Homepage "Pick the one that fits you" door links: white (--on-accent) on each door colour, pairs already in the table above. */
.hero-home h1 { font-size: clamp(1.75rem, 4.4vw, 3.4rem); }
/* Phone: heading, then the four door links, then the paragraph. Desktop: heading and paragraph left, links right. */
.hero-home .hero-grid { grid-template-areas: "head choose" "lead choose"; align-items: start; row-gap: 24px; }
.hero-head { grid-area: head; }
.hero-choose { grid-area: choose; }
.hero-lead { grid-area: lead; }
@media (max-width: 900px) { .hero-home .hero-grid { grid-template-areas: "head" "choose" "lead"; gap: 24px; } }
.choose { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.choose a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 18px; border: 2px solid var(--c); border-radius: 3px; background: var(--c); color: var(--on-accent); font-size: 1.1rem; font-weight: 700; text-decoration: none; }
.choose a:hover { background: transparent; color: var(--c); }
.proof-more { margin-top: 20px; }
.proof-more a { display: inline-block; padding-block: 11px; color: var(--bg); font-weight: 700; }

/* On a phone the test-run box repeats the proof figures just below it, so it is left out. */
@media (max-width: 560px) { .terminal[role="img"] { display: none; } }
.legal a { display: inline-block; padding-block: 11px; }

/* Product cards (Products page): the whole card is the link, as on the homepage doors. Colours reuse the door accents (--c) already in the table above. */
.product-card { position: relative; display: flex; flex-direction: column; gap: 10px; }
.product-card h2 { font-family: var(--body); font-stretch: 100%; font-size: 1.5rem; font-weight: 700; letter-spacing: 0; }
.product-card h2 a { text-decoration: none; }
.product-card h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product-card .for { color: var(--ink); font-weight: 600; }
.product-card .checklist { margin-top: 4px; }
.product-card .go { margin-top: auto; align-self: flex-start; }
.product-card:hover .go, .product-card:focus-within .go { background: var(--c); color: var(--on-accent); }
.product-card:focus-within { outline: 3px solid var(--co); outline-offset: -3px; }

/* A calmer note beside the main content: a rule on the left, no box. Ink on bg, as body text. */
.callout.callout-aside { border: 0; border-left: 4px solid var(--rule-strong); background: transparent; padding: 4px 0 4px 18px; }
/* Stacked buttons are easier to hit when they fill the width on a phone. */
@media (max-width: 560px) { .actions .btn { width: 100%; justify-content: center; } }

/* "Show the rest" expanders (native <details>, no script) and the jump-link row. Both keep 44px+ targets. */
.more { margin-top: 24px; }
.more > summary { display: flex; align-items: center; width: fit-content; max-width: 100%; min-height: 48px; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 3px; background: var(--bg); color: var(--ink); font-weight: 700; cursor: pointer; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "+"; margin-right: 12px; font: 700 1.3rem var(--mono); }
.more[open] > summary::before { content: "-"; }
.more > .card-grid { margin-top: 20px; }
.jump { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; padding: 0; }
.jump a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 3px; color: var(--ink); font-weight: 700; text-decoration: none; }
.jump a:hover { background: var(--ink); color: var(--bg); }
.cta-band { text-align: center; }
.cta-band .section-head { justify-content: center; text-align: center; }
.cta-band .actions { justify-content: center; }
.cta-band p { margin-inline: auto; }

/* Listing mock-up on the Personal sales page. */
.listing { background: var(--surface); border: 1px solid var(--rule); }
.listing-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.listing-top b { font-family: var(--display); font-stretch: 118%; }
.listing-price { font-family: var(--mono); font-weight: 600; color: var(--ps); }
.listing-sections { list-style: none; margin: 0; padding: 0; display: grid; }
.listing-sections li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.listing-sections li:last-child { border-bottom: 0; }
.listing-sections span { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); padding-top: 3px; }

/* ---------- Contact CTA ---------- */
.cta { border-top: 1px solid var(--rule); padding-block: 72px; }
.cta-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr; } }
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); }
.cta p { margin-top: 14px; color: var(--soft); max-width: 44ch; }
.contact-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-lines a { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; padding: 14px 18px; border: 1px solid var(--rule-strong); background: var(--surface); text-decoration: none; font-weight: 700; }
.contact-lines a span { font-family: var(--mono); font-weight: 400; font-size: .88rem; color: var(--soft); }
.contact-lines a:hover { border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 2px solid var(--ink); padding-block: 40px 28px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr 1.3fr; gap: 32px; align-items: start; }
@media (max-width: 1000px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 1.15rem; }
.foot-about p + p { margin-top: 8px; color: var(--soft); }
.site-footer ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.site-footer ul a { display: inline-block; padding-block: 11px; text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.legal { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--soft); }

/* ---------- Updates & 404 ---------- */
.current-build { margin-top: 16px; font-family: var(--mono); }
.changelog { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 80ch; }
.changelog li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.changelog-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--mono); font-size: .84rem; color: var(--soft); margin-bottom: 6px; }
.changelog-build { color: var(--ink); font-weight: 600; }
.not-found { padding-block: 96px; }
.not-found p { margin-top: 16px; max-width: 44ch; color: var(--soft); }

/* ---------- Motion ---------- */
.js .reveal { transition: opacity .6s ease, transform .6s ease; }
.js .reveal.pending:not(.in) { opacity: 0; transform: translateY(16px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal.pending:not(.in) { opacity: 1; transform: none; }
  .door:hover, .door:focus-within { transform: none; }
}
