/* 05 public site. A security-print palette: currency green, a sharp lime highlight, near-black ink, and coral for
   "advisory". Flat colour blocks and engraved fine-line rosettes; no glows, no hard shadows.
   Display and body: Bricolage Grotesque. Terminal and labels: JetBrains Mono. Both self-hosted (see fonts/). */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("/fonts/jetbrains-mono.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #f2f7f2;
  --paper: #ffffff;
  --ink: #0a1511;
  --ink-2: #2a3a33;
  --muted: #53675c;
  --line: rgba(10, 21, 17, .14);
  --line-2: rgba(10, 21, 17, .3);
  --blue: #0f6b47;
  --blue-hi: #2f9e6e;
  --iris: #a9e8c8;
  --blue-ink: #0b5a3b;
  --blue-deep: #08432c;
  --blue-soft: #dcf0e4;
  --tint: #e3f1e8;
  --orange: #ff5a36;
  --orange-hi: #ff7a5c;
  --orange-ink: #b3260a;
  --orange-soft: #ffe6de;
  --yellow: #c8f542;
  --night: #07130e;
  --night-2: #0c1d15;
  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-panel: 24px; --r-closing: 32px;
  --gutter: 32px;
  --section: clamp(56px, 8vw, 112px);
  --container: 1200px;
}
@media (max-width: 640px) { :root { --gutter: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--iris); }
h1, h2, h3, h4 { font-family: var(--font-sans); margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(36px, 5.2vw, 66px); line-height: 1.03; letter-spacing: -.03em; }
h2 { font-weight: 700; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.028em; }
h3 { font-weight: 650; font-size: 20px; line-height: 1.3; letter-spacing: -.012em; }
p { margin: 0 0 1em; text-wrap: pretty; }
code, kbd, pre { font-family: var(--font-mono); }
code { font-size: .88em; background: rgba(10, 21, 17, .06); padding: .1em .38em; border-radius: var(--r-sm); }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-md); }
.skip:focus { top: 12px; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(252, 251, 248, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.02em; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand svg { height: 36px; width: auto; }
.nav-links { display: flex; gap: 2px; margin: 0 auto 0 14px; padding: 0; list-style: none; }
.nav-links li { margin: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 520; border-radius: var(--r-md); position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after, .nav-links a:hover::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 7px; height: 2px; background: var(--orange); border-radius: 2px; }
.header-cta { margin-left: auto; }
.nav-links + .header-cta { margin-left: 0; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-md); font-weight: 560; font-size: 15px; background: var(--paper); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--ink); }
.menu ul { position: absolute; right: 0; top: 52px; width: min(280px, calc(100vw - 2 * var(--gutter))); margin: 0; padding: 8px; list-style: none; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 20px 50px -16px rgba(10, 21, 17, .35); }
.menu li { margin: 0; }
.menu a { display: flex; align-items: center; min-height: 46px; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 560; border-radius: var(--r-md); }
.menu a:hover, .menu a[aria-current="page"] { background: var(--blue-soft); }
@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu { display: block; margin-left: auto; }
  .header-cta { margin-left: 0; }
}
@media (max-width: 520px) { .header-cta .btn-label-long { display: none; } .brand span { font-size: 19px; } }

/* ---- Buttons and chips ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-md); border: 1px solid transparent; font: 600 16px/1 var(--font-sans); text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn-primary { background: var(--orange); color: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 1px 2px rgba(10, 21, 17, .25), 0 8px 16px -8px rgba(10, 21, 17, .35); }
.btn-primary:hover { background: var(--orange-hi); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line-2); font: 500 12.5px/1 var(--font-mono); letter-spacing: .02em; color: var(--ink); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- Sections ---- */
.section { padding-block: var(--section); }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-2); font-size: 18px; margin-top: 16px; margin-bottom: 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }

/* ---- Hero ---- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(40px, 6vw, 80px) clamp(40px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, rgba(255, 90, 54, .45) 62% 92%, transparent 92%); }
.hero .lede { margin-top: 22px; }
.hero-status { margin-top: 22px; font-size: 15px; color: var(--muted); max-width: 34em; }
.window { border-radius: 14px; overflow: hidden; background: #0a1812; box-shadow: 0 0 0 1px rgba(10, 21, 17, .55), 0 2px 6px rgba(10, 21, 17, .18), 0 28px 56px -22px rgba(10, 21, 17, .5); }
.window img { width: 100%; height: auto; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.page-hero { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px); position: relative; isolation: isolate; }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 56px); max-width: 18em; }
.page-hero .lede { margin-top: 20px; }
.crumbs { margin-bottom: 22px; font-size: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; color: var(--muted); }
.crumbs li { margin: 0; display: inline-flex; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }

/* ---- The shift ---- */
.shift { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shift-card { border-radius: var(--r-panel); padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); background: var(--paper); }
.shift-card h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; color: var(--ink-2); margin-bottom: 18px; }
.shift-card ul { list-style: none; padding: 0; margin: 0; }
.shift-card li { position: relative; padding-left: 30px; margin-bottom: 14px; font-size: 18px; line-height: 1.45; }
.shift-card li::before { content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 14px; border-radius: 50%; }
.shift-before li { color: var(--ink-2); }
.shift-before li::before { border: 2px solid var(--line-2); }
.shift-after { background: var(--night-2); border-color: rgba(169, 232, 200, .3); color: #fff; }
.shift-after h3 { color: #dcf0e4; }
.shift-after li::before { background: var(--orange); }
.shift-pull { margin: 28px 0 0; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; letter-spacing: -.018em; font-weight: 600; max-width: 34em; }
@media (max-width: 800px) { .shift { grid-template-columns: 1fr; } }

/* ---- Blue band (Cube "problem" band) ---- */
.band-blue { background: linear-gradient(135deg, #3fb4f1, #0297de 70%); color: var(--ink); padding-block: clamp(48px, 6vw, 88px); }
.band-blue .section-head p { color: #031f30; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.paper-card { background: var(--bg); border-radius: var(--r-lg); padding: 24px; border: 1px solid rgba(10, 21, 17, .1); box-shadow: 0 12px 30px -18px rgba(10, 21, 17, .5); }
.paper-card h3 { margin-bottom: 10px; }
.paper-card p { margin: 0; color: var(--ink-2); font-size: 16.5px; }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }

/* ---- Feature cards ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: rgba(15, 107, 71, .55); box-shadow: 0 18px 40px -22px rgba(15, 107, 71, .6); transform: translateY(-2px); }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.card .tag { display: inline-block; font: 500 11.5px/1 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--blue-ink); margin-bottom: 14px; }
.card a.more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 15.5px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards, .cards.two { grid-template-columns: 1fr; } .card { padding: 22px; } }

/* ---- Diagrams ---- */
.diagram-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(14px, 2.2vw, 28px); box-shadow: 0 30px 60px -40px rgba(10, 21, 17, .35); }
.diagram { width: 100%; height: auto; }
.diagram .v { display: none; }
.diagram-v { display: none; max-width: 440px; margin-inline: auto; }
.diagram text { font-family: var(--font-sans); fill: var(--ink); }
.diagram .mono { font-family: var(--font-mono); }
.d-zone-h { fill: rgba(15, 107, 71, .07); stroke: rgba(15, 107, 71, .4); stroke-width: 1.2; }
.d-zone-a { fill: rgba(255, 90, 54, .08); stroke: rgba(255, 90, 54, .6); stroke-width: 1.2; }
.d-bar-h { fill: var(--blue); }
.d-bar-a { fill: var(--orange); }
.d-zone-label { font-family: var(--font-mono) !important; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.d-zone-label.h { fill: var(--blue-deep); }
.d-zone-label.a { fill: var(--orange-ink); }
.d-node-human { fill: var(--paper); stroke: var(--blue-ink); stroke-width: 2; }
.d-node-agent { fill: var(--orange-soft); stroke: var(--orange); stroke-width: 2; }
.d-node-05 { fill: var(--night); stroke: var(--night); stroke-width: 2; }
.d-node-host { fill: var(--paper); stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 4; }
.d-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.d-sub { font-size: 12.5px; fill: var(--ink-2) !important; }
.d-role { font-family: var(--font-mono) !important; font-size: 12px; font-weight: 600; letter-spacing: .05em; fill: var(--muted) !important; }
.d-on-dark { fill: #fff !important; }
.d-sub.d-on-dark { fill: #cfe5d9 !important; }
.d-role.d-on-dark { fill: #c8f542 !important; }
.d-badge { fill: var(--ink); }
.d-badge-n { font-family: var(--font-mono) !important; font-size: 12px; font-weight: 700; fill: #fff !important; }
.d-arrow { stroke: var(--ink); stroke-width: 2; fill: none; }
.d-arrowhead { fill: var(--ink); }
.d-bypass { stroke: var(--orange); stroke-width: 2.5; stroke-dasharray: 7 5; fill: none; }
.d-bypass-head { fill: var(--orange); }
.d-pill { fill: var(--paper); stroke: var(--orange); stroke-width: 1.5; }
.d-pill-t { font-family: var(--font-mono) !important; font-size: 12px; font-weight: 600; fill: var(--orange-ink) !important; }
.d-legend-t { font-size: 12.5px; fill: var(--ink-2) !important; }
.d-s-adv { fill: var(--orange-soft); stroke: var(--orange); stroke-width: 1.5; }
.d-s-auth { fill: var(--blue-soft); stroke: var(--blue-ink); stroke-width: 1.5; }
.d-s-host { fill: #e4efe7; stroke: var(--muted); stroke-width: 1.5; }
.d-s-later { fill: var(--paper); stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 3; }
.d-box { fill: var(--paper); stroke: var(--line-2); stroke-width: 1.5; }
.d-box-later { fill: var(--bg); stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 7 5; }
.d-box-t { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.d-li { font-size: 13.5px; fill: var(--ink-2) !important; }
.d-strength { font-family: var(--font-mono) !important; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; }
@media (max-width: 1023px) {
  .diagram-h { display: none; }
  .diagram-v { display: block; }
}
.read-as-text { margin-top: 18px; }
details.plain { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
details.plain > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; min-height: 44px; list-style: none; display: flex; align-items: center; gap: 10px; }
details.plain > summary::-webkit-details-marker { display: none; }
details.plain > summary::before { content: "+"; font-family: var(--font-mono); width: 20px; color: var(--orange-ink); }
details.plain[open] > summary::before { content: "\2212"; }
details.plain > div, details.plain > ol { padding: 0 20px 14px 38px; margin: 0; }
details.plain > ol { padding-left: 42px; }

/* ---- Terminal showcase ---- */
.shots { margin-top: 8px; }
.shot-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.shot-tabs button { font: 560 15px/1 var(--font-sans); min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); cursor: pointer; }
.shot-tabs button:hover { border-color: var(--ink); }
.shot-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.shot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 32px; }
.shot { margin: 0; }
.shot figure { margin: 0; }
.shot figcaption { margin-top: 14px; color: var(--ink-2); font-size: 16px; max-width: 52em; }
.shot figcaption strong { color: var(--ink); }
.shots.is-tabbed .shot[hidden] { display: none; }

.measured { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; max-width: 760px; border-top: 1px solid var(--line); }
.measured li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 17px; line-height: 1.5; }
.measured strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; margin-right: .35em; }
.stats-note { font: 500 13px/1.5 var(--font-mono); color: var(--muted); margin-top: 16px; }

/* ---- Strength table ---- */
.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
table.strength { width: 100%; border-collapse: collapse; font-size: 16px; }
.strength caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); text-align: left; padding: 20px 24px 0; font-size: 14.5px; color: var(--muted); }
.strength th, .strength td { text-align: left; vertical-align: top; padding: 18px 24px; border-top: 1px solid var(--line); }
.strength thead th { font: 500 12px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-top: 22px; }
.strength tbody th { font-weight: 650; width: 24%; }
.strength td:nth-child(3) { width: 24%; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font: 600 12.5px/1 var(--font-mono); letter-spacing: .02em; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pill-adv { background: var(--orange-soft); color: var(--orange-ink); border: 1px solid rgba(255, 90, 54, .6); }
.pill-adv::before { background: var(--orange); }
.pill-strong { background: var(--blue-soft); color: var(--blue-deep); border: 1px solid rgba(15, 107, 71, .5); }
.pill-strong::before { background: var(--blue); }
.pill-hard { background: var(--night); color: #fff; border: 1px solid var(--night); }
.pill-hard::before { background: var(--iris); }
.pill-later { background: var(--paper); color: var(--muted); border: 1px dashed var(--muted); }
.pill-later::before { background: var(--muted); }
.strength td small { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
@media (max-width: 760px) {
  .strength thead { display: none; }
  .strength, .strength tbody, .strength tr, .strength th, .strength td { display: block; width: auto !important; }
  .strength tr { padding: 18px 20px; border-top: 1px solid var(--line); }
  .strength tbody tr:first-child { border-top: 0; }
  .strength th, .strength td { padding: 0; border: 0; }
  .strength th { margin-bottom: 10px; font-size: 18px; }
  .strength td { margin-bottom: 10px; }
  .strength td[data-label]::before { content: attr(data-label); display: block; font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
}
.callout { margin-top: 24px; padding: 20px 24px; border-radius: var(--r-lg); background: var(--orange-soft); border: 1px solid rgba(255, 90, 54, .55); font-size: 17px; }
.callout p:last-child { margin-bottom: 0; }

/* ---- Free vs paid, works with ---- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(24px, 3vw, 36px); }
.plan.later { background: transparent; border-style: dashed; border-color: var(--line-2); }
.plan h3 { font-size: 24px; margin: 12px 0 14px; }
.plan ul { padding-left: 1.1em; margin: 0; }
.plan li { margin-bottom: .5em; }
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.works .card h3 { font-size: 22px; }
@media (max-width: 800px) { .works { grid-template-columns: 1fr; } }

/* ---- FAQ ---- */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; min-height: 56px; font-weight: 650; font-size: 18px; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 22px/1 var(--font-mono); color: var(--orange-ink); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] { border-color: var(--line-2); }
.faq .answer { padding: 0 22px 8px; color: var(--ink-2); }

/* ---- Prose (inner pages) ---- */
.prose { max-width: 740px; }
.prose h2 { font-size: clamp(26px, 3vw, 36px); margin: 2.2em 0 .6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose pre { background: var(--night-2); color: #d9ece2; padding: 18px 20px; border-radius: var(--r-lg); overflow-x: auto; font-size: 14px; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.toc { margin: 0 0 40px; padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); max-width: 740px; }
.toc p { margin: 0 0 8px; font-size: 15px; font-weight: 650; color: var(--ink-2); }
.toc ol { margin: 0; padding-left: 1.2em; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 820px; }
.steps li { counter-increment: s; position: relative; padding: 20px 22px 20px 72px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 0; color: var(--ink-2); }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 14px/1 var(--font-mono); }
.steps li strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; letter-spacing: -.01em; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; max-width: 740px; }
.kv dt { font: 500 13px/1.6 var(--font-mono); color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 14px; } }
.codeblock { background: var(--night-2); color: #d9ece2; border-radius: var(--r-lg); padding: 18px 20px; overflow-x: auto; font: 14px/1.6 var(--font-mono); margin: 0 0 1.2em; max-width: 820px; }
.codeblock .dim { color: #8fa89b; }
.codeblock .ok { color: #c8f542; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.related a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s; }
.related a:hover { border-color: var(--blue); transform: translateY(-2px); color: var(--ink); }
.related b { display: block; font-size: 18px; letter-spacing: -.01em; margin-bottom: 4px; }
.related span { color: var(--ink-2); font-size: 15px; line-height: 1.45; display: block; }
@media (max-width: 800px) { .related { grid-template-columns: 1fr; } }

/* ---- Closing CTA (midnight panel with blue and cantaloupe light, as in Cube's closing block) ---- */
.cta-panel { position: relative; isolation: isolate; border-radius: var(--r-closing); padding: clamp(32px, 6vw, 80px); color: #fff; overflow: hidden;
  background: var(--night-2);
  border: 1px solid rgba(169, 232, 200, .35); }
.cta-panel h2 { color: #fff; max-width: 15em; }
.cta-panel p { color: #2a3a33; font-size: 18px; max-width: 36em; margin-top: 16px; }
.cta-panel .cta-row { margin-top: 28px; align-items: center; }
.cta-panel .addr { font: 500 16px/1 var(--font-mono); color: #fff; }
.cta-panel a:not(.btn) { color: #0a1511; }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-dark:hover { border-color: #fff; color: #fff; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); padding-block: 56px 40px; margin-top: var(--section); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font: 500 12px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 2px; }
.footer-grid a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-blurb { font-size: 15px; color: var(--ink-2); max-width: 24em; margin-top: 14px; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-legal p { margin: 0; max-width: 60em; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

.notfound { min-height: 60vh; display: grid; place-content: center; text-align: left; padding-block: 80px; }
.notfound .big { font: 700 clamp(80px, 16vw, 180px)/1 var(--font-sans); letter-spacing: -.05em; color: var(--ink); }
.notfound .big span { color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .card:hover, .btn-primary:hover, .related a:hover { transform: none; }
}
@media print { .site-header, .cta-panel, .hero::before { display: none; } }

/* ---- Late additions ---- */
.header-cta .short { display: none; }
@media (max-width: 520px) { .header-cta .long { display: none; } .header-cta .short { display: inline; } }
.d-badge-n-dark { fill: var(--ink) !important; }
figure.card { margin: 0; }
figure.card figcaption p { margin-top: 14px; }
.cards.two .window { margin-bottom: 4px; }
.nowrap { white-space: nowrap; }
.site-footer { margin-top: 0; }
.strength tbody th { width: 19%; }
.strength td:nth-child(2) { width: 19%; }
.strength td:nth-child(3) { width: 24%; }
.strength caption { display: block; }
@media (max-width: 760px) { .strength caption { padding: 18px 20px 0; } }

/* ---- Refinements: contrast on dark surfaces, measure, browser surfaces ---- */
.steps li, .section-head p, .prose p, .prose li, .answer p, .related span { max-width: 62ch; }
.table-wrap { padding: 4px; }
table, .measured strong { font-variant-numeric: tabular-nums; }


/* ================= Security-print pass ================= */
:root { --rosette: url("/rosette.svg"); }
.site-header { background: rgba(242, 247, 242, .94); }
.menu a:hover, .menu a[aria-current="page"] { background: var(--tint); }
.nav-links a[aria-current="page"]::after, .nav-links a:hover::after { background: var(--orange); height: 3px; border-radius: 3px; }

/* Hero: an engraved rosette behind the terminal, like the guilloche on a banknote. */
.hero::before { content: ""; position: absolute; z-index: -1; width: clamp(640px, 66vw, 1040px); aspect-ratio: 1; right: clamp(-300px, -16vw, -140px); top: 50%; transform: translateY(-50%);
  background: var(--rosette) center / contain no-repeat; opacity: .5; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 56%, var(--yellow) 56% 92%, transparent 92%); padding-inline: .06em; }
.window { background: #0a1812; border-radius: 16px; box-shadow: 0 0 0 1px rgba(10, 21, 17, .7), 0 2px 4px rgba(10, 21, 17, .12), 0 36px 60px -28px rgba(7, 19, 14, .6); }
.page-hero::before { content: ""; position: absolute; z-index: -1; width: clamp(300px, 34vw, 520px); aspect-ratio: 1; right: clamp(-200px, -8vw, -60px); top: -60px; background: var(--rosette) center / contain no-repeat; opacity: .4; }
.page-hero { overflow: hidden; }

.btn-primary { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 16px -10px rgba(7, 19, 14, .5); }
.btn-primary:hover { background: #d8ff63; color: var(--ink); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); }
.btn-ghost:hover { background: var(--tint); }
.chip::before { background: var(--blue); }

/* Colour blocks: currency green and lime, flat. */
.shift-after { background: var(--blue); border-color: var(--blue-deep); color: #fff; }
.shift-after h3 { color: #dcf0e4; }
.shift-after li::before { background: var(--yellow); }
.shift-pull { font-size: clamp(22px, 2.6vw, 34px); }
.band-blue { background: var(--blue); color: #fff; }
.band-blue h2, .band-blue .section-head p { color: #fff; }
.paper-card { background: var(--paper); border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 18px 36px -22px rgba(7, 19, 14, .7); }
.card:hover { border-color: var(--blue); box-shadow: 0 20px 40px -24px rgba(15, 107, 71, .6); transform: translateY(-2px); }
.card .tag { color: var(--blue-ink); }
.related a:hover { border-color: var(--blue); }
.section-alt { background: var(--tint); border-block: 1px solid var(--line); }
.steps li::before { background: var(--blue); color: #fff; }
.shot-tabs button:hover { background: var(--tint); border-color: var(--ink); }
.shot-tabs button[aria-selected="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.callout { background: var(--yellow); border: 1px solid var(--ink); }
.pill-adv { background: var(--orange-soft); border-color: var(--orange); }
.pill-strong { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-deep); }
.pill-strong::before { background: var(--blue); }
.pill-hard::before { background: var(--yellow); }
.faq details[open] { background: #fff; }
a { color: var(--blue-ink); }
a:hover { color: var(--blue-deep); }

/* Closing panel: solid lime. */
.cta-panel { background: var(--yellow); color: var(--ink); border: 1px solid var(--ink); }
.cta-panel h2, .cta-panel p, .cta-panel .addr { color: var(--ink); }
.cta-panel a:not(.btn) { color: var(--ink); text-decoration-thickness: 2px; }
.cta-panel a:not(.btn):hover { color: var(--blue-deep); }
.cta-panel .btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.cta-panel .btn-primary:hover { background: #17302a; color: #fff; }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, .55); color: var(--ink); border-color: var(--ink); }
.site-footer { background: var(--paper); }
code { background: rgba(10, 21, 17, .07); }
.strength caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:root { accent-color: var(--blue); caret-color: var(--blue); scrollbar-color: var(--blue) var(--bg); }
@media (max-width: 900px) {
  .hero::before { width: 120vw; right: -50vw; top: auto; bottom: -30vw; transform: none; opacity: .4; }
  .page-hero::before { width: 260px; right: -90px; top: -50px; }
}
.hero::before, .page-hero::before { -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent 100%); mask-image: radial-gradient(closest-side, #000 52%, transparent 100%); }
/* Inner pages: the reading column lines up with the headline, not the middle of the page. */
.container.prose { margin-left: calc((100% - min(100% - 2 * var(--gutter), var(--container))) / 2); margin-right: auto; }
.prose figure { margin: 28px 0; width: min(1000px, 100vw - 2 * var(--gutter)); max-width: none; }
.prose figure img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px rgba(10, 21, 17, .7), 0 2px 4px rgba(10, 21, 17, .12), 0 28px 50px -28px rgba(7, 19, 14, .55); }
