/* Serhard Brandbook v2. Edit the source in packages/brand. */

@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: light-dark(#eaf4f0, #0a211e);
  --sheet: light-dark(#ffffff, #13352f);
  --rule: light-dark(#c4dcd4, #31564b);
  --ink: light-dark(#103831, #e6f6f0);
  --ink-soft: light-dark(#31584d, #bbd9ce);
  --muted: light-dark(#49685f, #a3c4b9);
  --brand: light-dark(#103831, #82e3c5);
  --brand-hover: light-dark(#1b4d41, #a7efda);
  --on-brand: light-dark(#ffffff, #0a211e);
  --on-brand-soft: light-dark(#d2e9df, #103831);
  --steel: light-dark(#c3e1d5, #31564b);
  --signal: light-dark(#007161, #82e3c5);
  --focus: light-dark(#00614f, #9decd5);
  --row-rule: light-dark(#e4efea, #23483d);
  --control-border: light-dark(#5f847a, #628a7e);
  --flag: light-dark(#a32120, #ff8a7e);
  --flag-bg: light-dark(#fbe9e7, #3b1f22);
  --match: light-dark(#1d6b45, #8bdfb3);
  --shadow-panel: 0 1px 0 var(--rule), 0 18px 40px -28px rgb(0 0 0 / 45%);
  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-14: 56px; --space-18: 72px;
  --radius-sm: 2px; --radius-md: 6px; --radius-lg: 10px;
  --measure: 66ch;
  --font-display: var(--font-sans);
  color-scheme: light;
}

:root[data-serhard-theme="ledger"] {
  --paper: light-dark(#f2f5f8, #0d1526);
  --sheet: light-dark(#ffffff, #15213a);
  --rule: light-dark(#d5dce5, #2a3854);
  --ink: light-dark(#13213c, #e8edf5);
  --ink-soft: light-dark(#3c4a63, #b9c4d6);
  --muted: light-dark(#5d6a80, #a4b2c9);
  --brand: light-dark(#13213c, #9bb9f0);
  --brand-hover: light-dark(#1f3360, #bad0fa);
  --on-brand: light-dark(#ffffff, #0d1526);
  --on-brand-soft: light-dark(#c9d2e3, #13213c);
  --steel: light-dark(#c9d2e3, #2b3d63);
  --signal: light-dark(#b3261e, #ff8a7e);
  --focus: light-dark(#2457c5, #8fb0ff);
  --row-rule: light-dark(#edf0f4, #22304b);
  --control-border: light-dark(#748198, #7183a2);
  --flag: light-dark(#a32120, #ff8a7e);
  --flag-bg: light-dark(#fbe9e7, #3b1f22);
  --match: light-dark(#1d6b45, #8bdfb3);
  --shadow-panel: 0 1px 0 var(--rule), 0 18px 40px -28px rgb(0 0 0 / 45%);
}

:root[data-serhard-theme="register"] {
  --paper: light-dark(#f8f2e8, #211e1a);
  --sheet: light-dark(#ffffff, #342d26);
  --rule: light-dark(#dcd0c0, #584a3f);
  --ink: light-dark(#242421, #f8f2e8);
  --ink-soft: light-dark(#50453b, #e0d2c4);
  --muted: light-dark(#65574b, #c5b5a5);
  --brand: light-dark(#242421, #f3aa7f);
  --brand-hover: light-dark(#453b32, #f7c4a5);
  --on-brand: light-dark(#ffffff, #211e1a);
  --on-brand-soft: light-dark(#ece1d4, #32251c);
  --steel: light-dark(#e5d4c3, #584a3f);
  --signal: light-dark(#984320, #f3aa7f);
  --focus: light-dark(#984320, #f3aa7f);
  --row-rule: light-dark(#f2ece3, #463b31);
  --control-border: light-dark(#86766a, #9b8979);
  --flag: light-dark(#a32120, #ff8a7e);
  --flag-bg: light-dark(#fbe9e7, #3b1f22);
  --match: light-dark(#1d6b45, #8bdfb3);
  --shadow-panel: 0 1px 0 var(--rule), 0 18px 40px -28px rgb(0 0 0 / 45%);
  --font-display: Georgia, "Times New Roman", serif;
}

/* Follow the device unless a page supplies an explicit appearance. Print stays light. */
@media screen {
  :root { color-scheme: light dark; }
  :root[data-serhard-mode="light"] { color-scheme: light; }
  :root[data-serhard-mode="dark"] { color-scheme: dark; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-family: var(--font-display); }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--space-6), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-6), env(safe-area-inset-right, 0px));
}

/* Header: brand, navigation, appearance. Sticks to the top; its paper extends to both edges of the window. */
.site-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--space-2) var(--space-4); flex-wrap: wrap;
  min-height: 64px; padding-block: var(--space-2);
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.site-head::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--paper); }
html { overflow-x: clip; }
.brand { display: inline-flex; line-height: 0; margin-right: auto; border-radius: var(--radius-md); }
.brand img { height: 30px; width: auto; }
.site-head nav { display: flex; gap: var(--space-1); }
.site-head nav a {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 12px;
  border-radius: var(--radius-md); font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  transition: background-color .15s, color .15s;
}
.site-head nav a:hover { background: var(--sheet); color: var(--ink); }
.site-head nav a[aria-current="page"] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.site-head nav .icon { color: var(--signal); }
:root { --head-h: 64px; }
html { scroll-padding-top: calc(var(--head-h) + 24px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Icons: 24px line icons from icons.svg or inline, sized to the text */
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }

/* Buttons: primary, secondary, quiet; icons sit before the label */
.btn, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--brand); color: var(--on-brand); text-decoration: none; cursor: pointer;
  font: 600 1rem/1.25 var(--font-sans); transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--sheet); color: var(--ink); border-color: var(--control-border); }
.btn-secondary:hover { background: var(--row-rule); border-color: var(--ink); }
.btn:active, .btn-secondary:active { transform: translateY(1px); }
.btn:disabled, .btn-secondary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.92rem; }
.btn-quiet { display: inline-block; color: var(--ink); padding: 14px 4px; margin-left: 14px; font-weight: 600; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.actions .btn-quiet { margin-left: 4px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--space-14); align-items: center; padding-block: 56px 88px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  line-height: 1; letter-spacing: -0.045em; font-weight: 800;
  margin: 0 0 22px; max-width: 14ch;
}
.hero p.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; margin: 0 0 30px; }

/* Ledger: the brand's signature image */
.ledger {
  margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: 22px 22px 16px; box-shadow: var(--shadow-panel); min-width: 0;
}
.ledger-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: 12px; }
.ledger-title strong { font-size: 0.98rem; }
.ledger-title span { font-size: 0.85rem; color: var(--muted); }
.ledger table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.ledger th { font-family: var(--font-sans); font-weight: 600; font-size: 0.8rem; color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.ledger th.num, .ledger td.num { text-align: right; }
.ledger td { padding: 9px 8px; border-bottom: 1px solid var(--row-rule); white-space: nowrap; }
.ledger td.ok { color: var(--match); font-family: var(--font-sans); font-size: 0.8rem; }
.ledger tr.miss td { background: var(--flag-bg); color: var(--flag); }
.ledger tr.miss td.ok { color: var(--flag); font-weight: 600; }
.ledger tfoot td { border-bottom: 0; padding-top: 12px; font-family: var(--font-sans); font-size: 0.9rem; color: var(--ink); }
.ledger tfoot .diff { color: var(--flag); font-weight: 600; font-family: var(--font-mono); }
.ledger tfoot .zero { color: var(--match); font-weight: 600; font-family: var(--font-mono); }
.ledger-note { margin: 12px 2px 0; font-size: 0.86rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .ledger tr.miss td { animation: flag 1.6s ease-out 0.6s both; }
  @keyframes flag { from { background: transparent; color: var(--ink); } to { background: var(--flag-bg); color: var(--flag); } }
  .ledger tr.fixed td { animation: fixed 1.4s ease-out 0.8s both; }
  @keyframes fixed { from { background: var(--flag-bg); color: var(--flag); } to { background: transparent; color: var(--ink); } }
  .ledger tr.fixed td.ok { animation-name: fixed-ok; }
  @keyframes fixed-ok { from { background: var(--flag-bg); color: var(--flag); } to { background: transparent; color: var(--match); } }
}

/* Sections */
section.block { padding-block: var(--space-18); border-top: 1px solid var(--rule); }
.block h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.035em; line-height: 1.15; margin: 0 0 14px; max-width: 24ch; }
.block p.intro { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 36px; }

.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.checks li { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 22px 22px 24px; }
.checks li h3::before { content: ""; display: block; width: 28px; height: 3px; margin-bottom: 14px; border-radius: 2px; background: var(--signal); }
.checks li h3 { font-size: 1.05rem; margin: 0 0 6px; }
.checks li p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10); }
.steps li { counter-increment: step; position: relative; padding-top: 44px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.steps .when { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 8px; }

/* Services: the offer list on the introduction page */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.services li {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: var(--space-6) var(--space-10); padding-block: 28px; border-bottom: 1px solid var(--rule); align-items: start;
}
.services h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.services .for { display: block; margin-top: 6px; font-size: 0.92rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.services p { margin: 0; color: var(--ink-soft); }
.services .terms { margin: 0; font-size: 0.95rem; }
.services .terms strong { display: block; font-size: 1.05rem; }
.services .terms span { display: block; color: var(--muted); }
.services .terms a { display: inline-block; margin-top: 10px; font-weight: 600; }
.services li.flagship h3::after {
  content: "Most asked for"; display: block; width: fit-content; margin-top: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em; color: var(--on-brand);
  background: var(--brand); padding: 3px 9px; border-radius: var(--radius-md);
}

/* Domains: where the experience comes from */
.domains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-10); margin: 0; }
.domains div { padding-block: 16px; border-top: 1px solid var(--rule); }
.domains dt { font-weight: 700; }
.domains dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.98rem; }

.offer { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-14); align-items: start; }
.price { background: var(--brand); color: var(--on-brand); border-radius: var(--radius-lg); padding: 30px; }
.price .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 4px; }
.price p { margin: 0 0 18px; color: var(--on-brand-soft); }
.price ul { margin: 0 0 24px; padding-left: 18px; }
.price li { margin-bottom: 6px; }
.price .btn { background: var(--sheet); color: var(--ink); }
.price .btn:hover { background: var(--paper); }
.price :focus-visible { outline-color: var(--on-brand); }

.deliver { margin: 0; padding-left: 20px; max-width: var(--measure); }
.deliver li { margin-bottom: 10px; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-14); }
.about p { max-width: var(--measure); margin: 0 0 14px; }
.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; }

.lead { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.lead h2 { margin-bottom: 8px; }
.lead p { margin: 0; color: var(--ink-soft); max-width: 52ch; }

.contact p { max-width: var(--measure); }
.contact .mail { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }

footer { padding-block: 36px 48px; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }
footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero, .offer, .about { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-block: 24px 64px; }
  .checks, .steps { grid-template-columns: 1fr 1fr; }
  .services li { grid-template-columns: 1fr 1fr; }
  .services li > p { grid-column: 1 / -1; grid-row: 2; }
  .lead { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .wrap {
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
  }
  .brand img { height: 26px; }
  .site-head nav { gap: 16px; }
  .site-head nav a.hide-sm { display: none; }
  .checks, .steps, .domains { grid-template-columns: 1fr; }
  .services li { grid-template-columns: 1fr; gap: var(--space-3); }
  .services li > p { grid-column: auto; grid-row: auto; }
  .ledger { padding: 16px 12px 12px; }
  .ledger table { font-size: 0.76rem; }
  .ledger td, .ledger th { padding: 8px 5px; }
  .ledger .hide-sm { display: none; }
  section.block { padding-block: var(--space-14); }
  .actions { flex-direction: column; align-items: flex-start; }
  .btn-quiet { display: block; width: fit-content; margin: 8px 0 0; padding: 10px 0; }
  .lead { padding: 24px; }
}

/* Status words for projects: always a word, colour only supports it */
.status { display: inline-block; font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; padding: 2px 9px; border-radius: var(--radius-md); border: 1px solid var(--rule); color: var(--ink-soft); white-space: nowrap; }
.status--live { color: var(--match); border-color: currentColor; }
.status--building { color: var(--ink); }
.status--planned { color: var(--muted); }

/* Projects ledger on the hub */
.ledger.projects td { white-space: normal; vertical-align: top; }
.ledger.projects td a { font-family: var(--font-sans); font-weight: 600; text-decoration: none; }
.ledger.projects td a:hover { text-decoration: underline; }
.ledger.projects .addr { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.ledger.projects td.st { text-align: right; }

/* Placeholder pages for projects in progress */
.soon { padding-block: 48px 88px; max-width: 760px; }
.soon .status { margin-bottom: 18px; }
.soon h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); line-height: 1; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 18px; }
.soon .lede { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 32px; max-width: 46ch; }
.soon h2 { font-size: 1.15rem; margin: 0 0 10px; }
.soon ul.plan { margin: 0 0 36px; padding-left: 20px; max-width: var(--measure); }
.soon ul.plan li { margin-bottom: 8px; }
.soon .addr { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }

/* Appearance menu (theme.js): colour mode and palette */
.appearance { position: relative; z-index: 2; margin: 0; padding: 0; border: 0; }
.appearance summary, .appearance[open] summary { margin: 0; }
.appearance summary {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 12px;
  border: 1px solid var(--control-border); border-radius: var(--radius-md); background: var(--sheet);
  color: var(--ink); font-size: 0.875rem; font-weight: 600; cursor: pointer; list-style: none; user-select: none;
}
.appearance summary::-webkit-details-marker { display: none; }
.appearance summary:hover { border-color: var(--ink); }
.appearance-now { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.appearance summary .icon:last-child { transition: transform .15s; }
.appearance[open] summary .icon:last-child { transform: rotate(180deg); }
.appearance-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(288px, calc(100vw - 32px));
  padding: var(--space-4); background: var(--sheet); border: 1px solid var(--control-border);
  border-radius: var(--radius-lg); box-shadow: 0 18px 40px -24px rgb(0 0 0 / 45%);
}
@media (prefers-reduced-motion: no-preference) {
  .appearance[open] .appearance-panel { animation: appearance-in .14s ease-out; }
  @keyframes appearance-in { from { opacity: 0; transform: translateY(-4px); } }
}
.appearance fieldset { border: 0; margin: 0 0 var(--space-4); padding: 0; min-width: 0; }
.appearance fieldset:last-child { margin-bottom: 0; }
.appearance legend { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); margin-bottom: var(--space-2); padding: 0; }
.mode-options, .palette-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1); padding: var(--space-1); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-md); }
.mode-options label, .palette-options label {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 56px; padding: 4px;
  margin: 0; border: 1px solid transparent; border-radius: var(--radius-md); color: var(--ink-soft); font-size: 0.78rem; font-weight: 700; cursor: pointer;
}
.mode-options input, .palette-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-options label:has(:checked), .palette-options label:has(:checked) { background: var(--sheet); border-color: var(--control-border); color: var(--ink); }
.mode-options label:has(:focus-visible), .palette-options label:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.mode-options .icon { width: 18px; height: 18px; }
.palette-chip { display: flex; width: 34px; height: 18px; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 18%); }
.palette-chip i { flex: 1; }
.palette-chip.chip-signal i:nth-child(1) { background: #eaf4f0; } .palette-chip.chip-signal i:nth-child(2) { background: #103831; } .palette-chip.chip-signal i:nth-child(3) { background: #007161; }
.palette-chip.chip-ledger i:nth-child(1) { background: #f2f5f8; } .palette-chip.chip-ledger i:nth-child(2) { background: #13213c; } .palette-chip.chip-ledger i:nth-child(3) { background: #b3261e; }
.palette-chip.chip-register i:nth-child(1) { background: #f8f2e8; } .palette-chip.chip-register i:nth-child(2) { background: #242421; } .palette-chip.chip-register i:nth-child(3) { background: #984320; }

/* Surfaces */
.panel, .card { min-width: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.card { padding: clamp(20px, 3vw, 28px); }
.card-head { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.card-head h3 { margin: 0; font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.01em; }
.card-icon {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--paper); color: var(--signal);
}
.card-icon .icon { width: 20px; height: 20px; }
.kicker { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 600; margin-bottom: 2px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--control-border); border-radius: var(--radius-md); color: var(--ink); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }
:where(.card) > p { margin: 0; color: var(--ink-soft); }
.link-card { padding: 0; transition: border-color .15s, transform .15s, box-shadow .15s; }
.link-card > a { display: flex; flex-direction: column; height: 100%; padding: clamp(20px, 3vw, 28px); color: inherit; text-decoration: none; border-radius: inherit; }
.link-card .go { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: auto; padding-top: var(--space-4); font-weight: 700; color: var(--ink); }
.link-card:hover { border-color: var(--control-border); box-shadow: 0 14px 30px -24px rgb(0 0 0 / 50%); }
.link-card:hover .go .icon { transform: translateX(3px); }
.link-card .go .icon { transition: transform .15s; }
@media (prefers-reduced-motion: no-preference) { .link-card:hover { transform: translateY(-2px); } }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-4); }

/* Console: the dark instrument surface. Tokens flip to their dark values inside it, in every palette. */
@media screen { .console, .hero .ledger { color-scheme: dark; } }
.console { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.hero .ledger { background: var(--sheet); color: var(--ink); }
.hero .ledger a { color: var(--ink); }

@media (max-width: 720px) {
  :root { --head-h: 112px; }
  .site-head nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: -8px; padding-bottom: 2px; }
  .site-head nav a { padding: 0 8px; white-space: nowrap; }
  .appearance-label, .appearance-now { display: none; }
  .appearance summary { min-width: 44px; min-height: 44px; justify-content: center; padding: 0 10px; }
}
@media print {
  .appearance, .theme-picker { display: none; }
  .site-head { position: static; }
}
