/* ==========================================================================
   NotProvided design system
   Stylesheet of the static site (static/build.mjs copies it to /theme/css/).
   1. Tokens  2. Base  3. Layout frame  4. Header / nav  5. Buttons & chips
   6. Heroes  7. Section furniture  8. Components  9. Mocks (code windows)
   10. Blog  11. Prose  12. Forms  13. Footer  14. Post content  15. Motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallbacks. Until the web fonts arrive the page renders in a local
   font scaled to Inter / Geist Mono's widths and line box, so the swap does not reflow
   the text. Ratios measured against the shipped files (Inter 4, unitsPerEm 2048,
   ascender 1984, descender 494). Arial maps 500 to its regular cut, 600+ to bold,
   hence one face per range. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans");
  font-weight: 100 449;
  size-adjust: 105.86%; ascent-override: 91.51%; descent-override: 22.79%; line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans");
  font-weight: 450 549;
  size-adjust: 106.85%; ascent-override: 90.66%; descent-override: 22.57%; line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arimo Bold"), local("Liberation Sans Bold");
  font-weight: 550 900;
  size-adjust: 100.84%; ascent-override: 96.07%; descent-override: 23.92%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Mono Fallback";
  src: local("Courier New"), local("CourierNewPSMT"), local("Cousine"), local("Liberation Mono");
  size-adjust: 100%; ascent-override: 100.5%; descent-override: 29.5%; line-gap-override: 0%;
}

:root {
  color-scheme: light;

  /* Surfaces: North Sea sand */
  --page-bg: #f3f2ec;
  --card: #faf9f5;
  --elevated: #e8e6dd;
  --code-bg: #10181c;
  --code-ink: #e6ecea;

  /* Ink */
  --ink: #11181b;
  --ink-2: #51595b;
  --ink-3: #636b6d;
  --mute: color-mix(in oklab, var(--ink) 58%, transparent);

  /* Lines */
  --divide: color-mix(in oklab, var(--ink) 12%, transparent);
  --divide-strong: color-mix(in oklab, var(--ink) 22%, transparent);
  --row: color-mix(in oklab, var(--ink) 5%, transparent);

  /* Accent: deep North Sea blue; signal: dune-orange for badges only */
  --accent: #0b5d7c;
  --accent-hover: #074258;
  --accent-soft: color-mix(in oklab, var(--accent) 10%, transparent);
  --signal: #a8410e;
  --ok: #0b703a;
  --warn: #8a5705;
  --bad: #b62923;

  --btn-bg: #131b1e;
  --btn-fg: #f8f7f2;
  --btn-hover: #263135;

  --shadow-lift: 0 30px 70px -36px rgb(17 24 27 / 0.28);
  --shadow-card: 0 24px 48px -24px rgb(17 24 27 / 0.2), 0 2px 6px rgb(0 0 0 / 0.03);

  --font-sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --wrap: 77.5rem;
  --gutter: 1rem;
  --pad-x: 1rem;
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #0e1214;
  --card: #151b1d;
  --elevated: #1b2225;
  --code-bg: #090d0f;
  --code-ink: #dfe7e5;
  --ink: #f1f0ea;
  --ink-2: #a6adad;
  --ink-3: #8f9797;
  --accent: #7fcbe8;
  --accent-hover: #b4e2f3;
  --signal: #f0915f;
  --ok: #4cc47e;
  --warn: #e0b057;
  --bad: #f2716a;
  --btn-bg: #f6f5ef;
  --btn-fg: #0e1214;
  --btn-hover: #dfddd3;
  --shadow-lift: 0 30px 70px -30px rgb(0 0 0 / 0.7);
  --shadow-card: 0 30px 60px -28px rgb(0 0 0 / 0.8);
}

@media (min-width: 40rem) { :root { --pad-x: 2rem; } }
@media (min-width: 64rem) { :root { --pad-x: 3.5rem; } }

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--divide); margin: 0; }
::selection { background: color-mix(in oklab, var(--accent) 24%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.screen-reader-text, .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 100; width: auto; height: auto; clip: auto;
  padding: 0.6rem 1rem; background: var(--btn-bg); color: var(--btn-fg); border-radius: 999px;
}

.mono { font-family: var(--font-mono); letter-spacing: 0; }
.muted { color: var(--ink-2); }
.link {
  color: var(--accent); font-weight: 500; font-size: 0.9375rem;
  display: inline-flex; align-items: center; gap: 0.3em;
}
.link::after { content: "›"; transition: transform 0.2s ease; }
.link:hover { color: var(--accent-hover); }
.link:hover::after { transform: translateX(3px); }
.link--plain::after { content: none; }

/* 3. Layout frame ---------------------------------------------------------- */
.site { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.site-main { flex: 1; display: flex; flex-direction: column; }

/* Sections draw a full-width hairline; the frame inside draws the two verticals. */
.section { border-top: 1px solid var(--divide); scroll-margin-top: 5rem; }
.section--flush { border-top: 0; }
.frame { width: 100%; max-width: var(--wrap); margin-inline: auto; }
@media (min-width: 64rem) { .frame { border-inline: 1px solid var(--divide); } }
.pad { padding: var(--section-y) var(--pad-x); }
.pad-x { padding-inline: var(--pad-x); }
.pad-sm { padding: clamp(2rem, 4vw, 3.5rem) var(--pad-x); }
.rule { border-top: 1px solid var(--divide); }

/* 4. Header / nav ---------------------------------------------------------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 30; padding: 0.75rem 1rem; }
@media (min-width: 40rem) { .site-header { padding: 1rem 1.5rem; } }
.site-header__bar {
  max-width: var(--wrap); margin-inline: auto; height: 2.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.02em; flex: none; }
.brand__mark { width: 1.125rem; height: 1.125rem; flex: none; }
.brand__tld { color: var(--ink-3); }

.nav {
  display: none; align-items: center; gap: 1.5rem;
  padding: 0.5rem 1.25rem; border: 1px solid var(--divide); border-radius: 999px;
  background: color-mix(in oklab, var(--card) 72%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 0.8125rem; font-weight: 500;
}
.nav a { color: var(--ink); opacity: 0.86; transition: opacity 0.15s ease; white-space: nowrap; }
.nav a:hover, .nav a[aria-current], .nav .current-menu-item > a, .nav .current_page_item > a, .nav .current-menu-ancestor > a { opacity: 1; }
.nav a[aria-current], .nav .current-menu-item > a, .nav .current_page_item > a, .nav .current_page_parent > a, .nav .current-menu-parent > a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em; }
.nav ul { display: flex; align-items: center; gap: 1.5rem; }
.nav li { position: relative; }
.nav .sub-menu {
  position: absolute; top: calc(100% + 0.9rem); left: -1rem; min-width: 12rem; display: none; flex-direction: column;
  align-items: stretch; gap: 0; padding: 0.4rem; border: 1px solid var(--divide); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-card);
}
.nav .sub-menu::before { content: ""; position: absolute; inset: -1rem 0 100% 0; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: flex; }
.nav .sub-menu a { display: block; padding: 0.45rem 0.65rem; border-radius: 0.4rem; color: var(--ink); }
.nav .sub-menu a:hover { background: var(--row); }
@media (min-width: 70rem) { .nav { display: flex; } }   /* eight items need about 1070px; below that, the menu button */

.header-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px;
  color: inherit; opacity: 0.8; transition: opacity 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { opacity: 1; background: var(--row); }
.icon-btn svg { width: 1.0625rem; height: 1.0625rem; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.header-link { display: none; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; opacity: 0.86; }
.header-link:hover { opacity: 1; }
.header-link svg { width: 1.0625rem; height: 1.0625rem; }
@media (min-width: 40rem) { .header-link { display: inline-flex; } }
.nav-toggle { display: inline-grid; }
@media (min-width: 70rem) { .nav-toggle { display: none; } }

/* Header sitting on top of the painting: light-on-image */
.has-image-hero .site-header { color: #f6f5ef; }
.has-image-hero .site-header .brand__tld { color: rgb(246 245 239 / 0.7); }
.has-image-hero .nav { border-color: rgb(246 245 239 / 0.16); background: rgb(14 40 62 / 0.42); }
.has-image-hero .nav a { color: #f6f5ef; }
.has-image-hero .nav .sub-menu a { color: var(--ink); }
.has-image-hero .site-header .btn--primary { background: #f6f5ef; color: #11181b; }
.has-image-hero .site-header .btn--primary:hover { background: #fff; }
.has-image-hero .icon-btn:hover { background: rgb(255 255 255 / 0.14); }

/* Mobile menu */
.mobile-nav {
  position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column;
  background: var(--page-bg); color: var(--ink); padding: 0.75rem 1rem 2rem; overflow-y: auto;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav__top { display: flex; align-items: center; justify-content: space-between; height: 2.25rem; }
.mobile-nav > ul { margin-top: 2rem; border-top: 1px solid var(--divide); counter-reset: nav; }
.mobile-nav > ul > li > a::after { counter-increment: nav; content: counter(nav, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.mobile-nav li a { display: flex; justify-content: space-between; padding: 1rem 0.25rem; border-bottom: 1px solid var(--divide); font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; }
.mobile-nav .sub-menu { margin: 0; border: 0; padding-left: 1rem; }
.mobile-nav .sub-menu a { font-size: 1rem; padding: 0.7rem 0.25rem; color: var(--ink-2); }
.mobile-nav .btn { margin-top: 1.5rem; align-self: flex-start; }
body.nav-open { overflow: hidden; }

/* 5. Buttons & chips ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.75rem; padding: 0 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 1rem; height: 1rem; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--btn-hover); }
.btn--ghost { background: color-mix(in oklab, var(--card) 80%, transparent); border-color: var(--divide-strong); color: var(--ink); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: var(--card); border-color: color-mix(in oklab, var(--ink) 36%, transparent); }
.btn--sm { height: 2.25rem; padding: 0 0.9rem; font-size: 0.8125rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.5; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--signal);
}
.eyebrow--quiet { color: var(--ink-3); }
.eyebrow--code { text-transform: none; letter-spacing: 0; font-size: 0.75rem; color: var(--ink-3); }
.eyebrow--code b { font-weight: 400; color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; height: 1.5rem; padding: 0 0.6rem;
  border: 1px solid var(--divide-strong); border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap;
}
a.chip:hover { color: var(--ink); border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
.chip--accent { color: var(--signal); border-color: color-mix(in oklab, var(--signal) 45%, transparent); }
.chip--live { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 40%, transparent); }
.chip--beta { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 45%, transparent); }
.chip--soon { color: var(--ink-3); }
.dot { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; flex: none; }

.announce {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.25rem 0.85rem 0.25rem 0.3rem;
  border: 1px solid var(--divide); border-radius: 999px; background: color-mix(in oklab, var(--card) 78%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 0.8125rem; font-weight: 500; max-width: 100%;
}
.announce__tag { padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--signal); color: #fff; font-size: 0.6875rem; font-weight: 600; flex: none; }
.announce__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce svg { width: 0.75rem; height: 0.75rem; flex: none; opacity: 0.6; }
.announce:hover { border-color: var(--divide-strong); }

/* 6. Heroes ---------------------------------------------------------------- */
.display-1 { font-size: clamp(2.5rem, 6.2vw, 4.5rem); line-height: 1; letter-spacing: -0.045em; font-weight: 500; }
.display-2 { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.03; letter-spacing: -0.045em; font-weight: 500; }
.display-3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.035em; font-weight: 500; }
.two-tone > span:first-child, .two-tone .tone { color: var(--mute); }
.lead { font-size: clamp(1rem, 1.3vw, 1.0625rem); line-height: 1.65; color: var(--ink-2); }

/* 6a. Home hero: the painting rendered in code */
.hero-code { position: relative; isolation: isolate; overflow-x: clip; padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.hero-code__art {
  position: absolute; inset: 0 0 auto 0; height: min(64rem, 118vh); z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(40% 40% at 50% 41%, transparent 0%, transparent 55%, rgb(0 0 0 / 0.55) 78%, #000 100%), linear-gradient(#000 60%, transparent 100%);
  mask-image: radial-gradient(40% 40% at 50% 41%, transparent 0%, transparent 55%, rgb(0 0 0 / 0.55) 78%, #000 100%), linear-gradient(#000 60%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.hero-code__art canvas { width: 100%; height: 100%; }
.hero-code__copy { max-width: 56rem; margin-inline: auto; padding: clamp(7.5rem, 16vw, 13.5rem) var(--gutter) 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-code__copy .display-1 { margin-top: 1.75rem; }
.hero-code__copy .lead { margin-top: 1.5rem; max-width: 34rem; font-size: 1rem; color: var(--ink-2); }
.hero-code__copy .btn-row { margin-top: 2rem; justify-content: center; }
.hero-code__meta { margin-top: 1.1rem; font-size: 0.8125rem; color: var(--ink-2); }
.hero-code__meta b { color: var(--ink); font-weight: 500; }
.hero-code__stage { position: relative; max-width: calc(var(--wrap) - 2 * 3.5rem + 2rem); margin: clamp(3.5rem, 6vw, 5rem) auto 0; padding-inline: var(--gutter); }
.hero-code__pill { position: absolute; z-index: 3; right: calc(var(--gutter) + 1.25rem); top: -1.15rem; }
.hero-code__card { right: calc(var(--gutter) + 1.25rem); top: 2rem; }
@media (min-width: 52rem) { .window__pane.window__pane--under-card { padding-top: 13.5rem; } }
@media (max-width: 51.99rem) {
  .hero-code__stage .hero-code__pill { position: static; margin-bottom: 0.75rem; }
  .hero-code__stage .hero-code__card { position: static; width: auto; margin-bottom: 0.75rem; box-shadow: var(--shadow-card); }
}

/* 6b. Inner hero: the painting itself, text laid over the calm side */
.hero-image { position: relative; isolation: isolate; overflow: hidden; color: #f6f5ef; }
.hero-image__media { position: absolute; inset: 0; z-index: -2; }
.hero-image__media img, .hero-image__media picture { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-image__fade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(85% 95% at 0% 20%, rgb(8 34 58 / 0.62) 0%, rgb(8 34 58 / 0.36) 45%, transparent 80%),
    linear-gradient(rgb(8 30 52 / 0.38) 0%, transparent 22%),
    linear-gradient(transparent 0%, transparent 58%, color-mix(in oklab, var(--page-bg) 8%, transparent) 66%, color-mix(in oklab, var(--page-bg) 26%, transparent) 74%, color-mix(in oklab, var(--page-bg) 52%, transparent) 82%, color-mix(in oklab, var(--page-bg) 80%, transparent) 91%, var(--page-bg) 100%);
}
.hero-image__inner { max-width: var(--wrap); margin-inline: auto; padding: clamp(6.5rem, 11vw, 8.5rem) var(--pad-x) clamp(7rem, 12vw, 9rem); text-shadow: 0 1px 10px rgb(10 34 87 / 0.14); }
.hero-image__copy { max-width: 42rem; }
.hero-image .eyebrow { color: rgb(246 245 239 / 0.8); }
.hero-image .display-2 { margin-top: 0.9rem; color: #f6f5ef; }
.hero-image .two-tone > span:first-child { color: rgb(246 245 239 / 0.62); }
.hero-image .lead { margin-top: 1.25rem; max-width: 30rem; color: rgb(246 245 239 / 0.88); font-size: 1.0625rem; }
.hero-image__chips { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-image .pill {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; border-radius: 999px;
  border: 1px solid rgb(246 245 239 / 0.22); background: rgb(246 245 239 / 0.12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 0.75rem; font-weight: 500; text-shadow: none; color: #f6f5ef;
}
.hero-image .pill .mono { font-size: 0.6875rem; opacity: 0.85; }
.hero-image .btn-row { margin-top: 1.75rem; text-shadow: none; }
.hero-image .btn--primary { background: #f6f5ef; color: #11181b; }
.hero-image .btn--primary:hover { background: #fff; }
.hero-image .btn--ghost { background: rgb(246 245 239 / 0.12); border-color: rgb(246 245 239 / 0.3); color: #f6f5ef; }
.hero-image .btn--ghost:hover { background: rgb(246 245 239 / 0.22); }
.hero-image--compact .hero-image__inner { padding-bottom: clamp(5rem, 9vw, 7rem); }
.hero-image__credit { position: absolute; right: 1rem; bottom: 0.6rem; font-family: var(--font-mono); font-size: 0.625rem; color: var(--ink-3); opacity: 0.8; text-shadow: none; }
.hero-image__credit a:hover { color: var(--ink); }

/* 7. Section furniture ----------------------------------------------------- */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: end; }
.section-head .eyebrow { margin-bottom: 1rem; }
.section-head .display-2 { max-width: 46rem; }
.section-head__aside { color: var(--ink-2); font-size: 1rem; line-height: 1.7; max-width: 26rem; }
.section-head__aside .link { margin-top: 0.75rem; }
@media (min-width: 56rem) { .section-head--split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; } .section-head--split .section-head__aside { justify-self: end; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4rem; } .split--even { grid-template-columns: 1fr 1fr; } .split--wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); } }
/* Sticky only when .split is two columns; stacked on mobile it would overlay the content below it. */
@media (min-width: 56rem) { .sticky { position: sticky; top: 2rem; align-self: start; } }

/* 8. Components ------------------------------------------------------------ */

/* Logo / text strip */
.strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem 2.25rem; }
.strip__label { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); margin-right: 0.5rem; }
.strip__item { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; }
.strip__item b { font-weight: 500; color: var(--ink); }

/* Hairline cell grid (products, skills, pillars) */
.cells { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--divide); }
.cells > * { border-bottom: 1px solid var(--divide); }
@media (min-width: 40rem) {
  .cells--2, .cells--3, .cells--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells--2 > :nth-child(odd), .cells--3 > :nth-child(odd), .cells--4 > :nth-child(odd) { border-right: 1px solid var(--divide); }
}
@media (min-width: 64rem) {
  .cells--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cells--3 > * { border-right: 1px solid var(--divide); }
  .cells--3 > :nth-child(3n) { border-right: 0; }
  .cells--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cells--4 > * { border-right: 1px solid var(--divide); }
  .cells--4 > :nth-child(4n) { border-right: 0; }
}
/* Logo wall: brand logos as single-colour masks in the page ink (files: assets/img/logos/) */
.logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--divide); list-style: none; margin: 0; padding: 0; }
.logos > li { display: flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 6.5rem; padding: 1.25rem 1rem; border-bottom: 1px solid var(--divide); border-right: 1px solid var(--divide); }
.logos > li:nth-child(2n) { border-right: 0; }
.logo { display: block; flex: none; max-width: 100%; background: var(--ink); opacity: 0.74; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; transition: opacity 0.2s ease; }
.logos > li:hover .logo { opacity: 1; }
.logo__suffix { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.logos__note { grid-column: span 2; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); }
@media (min-width: 40rem) {
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logos > li:nth-child(2n) { border-right: 1px solid var(--divide); }
  .logos > li:nth-child(3n) { border-right: 0; }
  .logos__note { border-right: 0 !important; }
}
@media (min-width: 64rem) {
  .logos { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .logos > li:nth-child(3n) { border-right: 1px solid var(--divide); }
  .logos > li:nth-child(6n), .logos > li:last-child { border-right: 0; }
  .logos > li:nth-last-child(-n+5) { border-bottom: 0; }
}

.cell { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: clamp(1.5rem, 3vw, 2.25rem) var(--pad-x); transition: background 0.2s ease; }
@media (min-width: 64rem) { .cells--3 .cell, .cells--4 .cell { padding-inline: clamp(1.5rem, 2.4vw, 2.25rem); } .cells--3 .cell:nth-child(3n+1), .cells--4 .cell:nth-child(4n+1) { padding-left: var(--pad-x); } }
a.cell:hover, .cell--link:hover { background: var(--row); }
.cell__index { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); letter-spacing: 0.04em; }
.cell__icon { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border: 1px solid var(--divide); border-radius: 50%; background: var(--card); color: var(--ink); margin-bottom: 0.6rem; }
.cell__icon svg { width: 1.125rem; height: 1.125rem; }
.cell__glyph { font-family: var(--font-mono); font-size: 1.5rem; line-height: 1; color: var(--accent); margin-bottom: 0.9rem; letter-spacing: -0.05em; }
.cell__title { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.03em; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.cell__meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); }
.cell__text { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.65; }
.cell__foot { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cell--lg { padding-block: clamp(2rem, 4vw, 3rem); gap: 0.85rem; }
.cell--lg .cell__title { font-size: 1.5rem; letter-spacing: -0.035em; }
.cell ul.ticks { margin-top: 0.4rem; }

/* Numbered step rows */
.steps { border-top: 1px solid var(--divide); }
.steps > li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem; padding: 1rem 0; border-bottom: 1px solid var(--divide); color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; }
.steps > li::before { content: counter(step, decimal-leading-zero); counter-increment: step; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); padding-top: 0.3em; }
.steps { counter-reset: step; }
.steps b, .steps strong { color: var(--ink); font-weight: 500; }

/* Tick list */
.ticks { display: grid; gap: 0.55rem; }
.ticks li { position: relative; padding-left: 1.5rem; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; }
.ticks li::before { content: "→"; position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.95; color: var(--accent); }
.ticks b, .ticks strong { color: var(--ink); font-weight: 500; }

/* Feature rows: big number, copy left, mock right */
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; padding: clamp(3rem, 6vw, 5rem) var(--pad-x); border-top: 1px solid var(--divide); }
@media (min-width: 60rem) { .feature { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4.5rem; } .feature--flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); } .feature--flip > :first-child { order: 2; } }
.feature__num { font-size: clamp(2.5rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -0.05em; color: color-mix(in oklab, var(--ink) 50%, transparent); font-weight: 500; }
.feature__title { margin-top: 1.5rem; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.12; letter-spacing: -0.04em; }
.feature__text { margin-top: 1rem; color: var(--ink-2); line-height: 1.7; max-width: 26rem; }
.feature .link { margin-top: 1.25rem; }
.feature .ticks { margin-top: 1.25rem; max-width: 26rem; }
.feature__stage { position: relative; border-radius: 1rem; padding: clamp(1rem, 3vw, 2.25rem); background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 9%, var(--elevated)), var(--elevated) 60%); border: 1px solid var(--divide); overflow: hidden; }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats > * { padding: clamp(1.5rem, 3vw, 2.5rem) var(--pad-x); border-bottom: 1px solid var(--divide); }
.stats > :nth-child(odd) { border-right: 1px solid var(--divide); }
@media (min-width: 56rem) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats > * { border-right: 1px solid var(--divide); border-bottom: 0; padding-inline: clamp(1.5rem, 2.4vw, 2.25rem); }
  .stats > :first-child { padding-left: var(--pad-x); }
  .stats > :last-child { border-right: 0; }
}
.stat__value { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -0.05em; font-weight: 500; }
.stat__value small { font-size: 0.5em; letter-spacing: -0.02em; color: var(--ink-3); margin-left: 0.1em; }
.stat__label { margin-top: 0.75rem; color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; max-width: 15rem; }
.stat__key { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); margin-bottom: 1rem; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--divide); border-radius: var(--radius); padding: clamp(1.25rem, 2.5vw, 1.75rem); }
.card--lift { box-shadow: var(--shadow-lift); }

/* Pull quote */
.pull { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -0.04em; font-weight: 500; max-width: 52rem; text-wrap: balance; }
.pull span { color: var(--mute); }
.pull-by { margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); }

/* Source line under a claim, and the list of sources at the end of a page */
.cite { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.7; color: var(--ink-3); max-width: 46rem; }
.cite a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.cite a:hover { color: var(--accent); }
.cite--list { display: grid; gap: 0.4rem; max-width: none; }
@media (min-width: 56rem) { .cite--list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; } }

/* Timeline */
.timeline { border-top: 1px solid var(--divide); }
.timeline > li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--divide); }
@media (min-width: 40rem) { .timeline > li { grid-template-columns: 7rem minmax(0, 1fr); } }
.timeline__when { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); padding-top: 0.25em; }
.timeline__what { font-weight: 500; letter-spacing: -0.03em; font-size: 1.0625rem; }
.timeline__more { margin-top: 0.3rem; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; }

/* FAQ */
.faq { border-top: 1px solid var(--divide); }
.faq details { border-bottom: 1px solid var(--divide); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.25rem 0; cursor: pointer; font-weight: 500; font-size: 1rem; letter-spacing: -0.025em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 0.5rem; height: 0.5rem; flex: none; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq summary:hover { color: var(--accent); }
.faq__body { padding: 0 2.5rem 1.5rem 0; color: var(--ink-2); line-height: 1.7; font-size: 0.9375rem; }
.faq__body p + p { margin-top: 0.75rem; }
.faq__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }

/* Final call to action */
.cta { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: clamp(5rem, 11vw, 9rem) var(--pad-x); }
.cta__copy { position: relative; max-width: 46rem; margin-inline: auto; }
.cta .lead { margin: 1.5rem auto 0; max-width: 30rem; }
.cta .btn-row { margin-top: 2rem; justify-content: center; }
.cta__note { margin-top: 1rem; font-size: 0.8125rem; color: var(--ink-2); }
.cta__tokens { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.token {
  position: absolute; padding: 0.55rem 0.8rem; border-radius: 0.9rem; background: var(--card); border: 1px solid var(--divide);
  box-shadow: 0 18px 40px -22px rgb(17 24 27 / 0.35); font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); white-space: nowrap;
  animation: bob 9s ease-in-out infinite;
}
.token b { font-weight: 500; color: var(--accent); }
.token:nth-child(2n) { animation-duration: 11s; animation-delay: -3s; }
.token:nth-child(3n) { animation-duration: 13s; animation-delay: -6s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(var(--r, 0deg)); } }
@media (max-width: 60rem) { .cta__tokens { display: none; } }
.cta__art { position: absolute; inset: auto 0 0 0; height: 70%; z-index: -2; opacity: 0.55; -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%); }
.cta__art canvas { width: 100%; height: 100%; }

/* Section progress ticks (home) */
.ticks-nav { position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%); z-index: 20; display: none; flex-direction: column; }
/* each tick is a 24px-tall tap target (WCAG 2.5.8); the visible 2px bar is drawn inside it */
.ticks-nav a { position: relative; display: block; width: 2.25rem; height: 1.5rem; margin-left: auto; }
.ticks-nav a::before { content: ""; position: absolute; right: 0; top: 50%; width: 0.9rem; height: 2px; margin-top: -1px; background: color-mix(in oklab, var(--ink) 30%, transparent); border-radius: 2px; transition: width 0.2s ease, background 0.2s ease; }
.ticks-nav a:hover::before { background: var(--ink); }
.ticks-nav a.is-active::before { width: 1.9rem; background: var(--ink); }
@media (min-width: 90rem) { .ticks-nav { display: flex; } }

/* 9. Mocks: code windows, terminals, report cards --------------------------- */
.window { position: relative; border-radius: 0.9rem; background: var(--card); border: 1px solid var(--divide); box-shadow: var(--shadow-card); overflow: hidden; font-size: 0.8125rem; text-align: left; }
.window__bar { display: flex; align-items: center; gap: 0.75rem; height: 2.5rem; padding: 0 0.9rem; border-bottom: 1px solid var(--divide); color: var(--ink-3); font-family: var(--font-mono); font-size: 0.6875rem; }
.window__dots { display: flex; gap: 0.4rem; flex: none; }
.window__dots i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: color-mix(in oklab, var(--ink) 16%, transparent); }
.window__dots i:nth-child(1) { background: #ec6a5e; } .window__dots i:nth-child(2) { background: #f4bf4f; } .window__dots i:nth-child(3) { background: #61c554; }
.window__tabs { display: flex; gap: 0.25rem; min-width: 0; overflow: hidden; }
.window__tab { padding: 0.25rem 0.6rem; border-radius: 0.4rem; white-space: nowrap; }
.window__tab.is-active { background: var(--row); color: var(--ink); }
.window__body { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 20rem; }
@media (min-width: 52rem) { .window__body--3 { grid-template-columns: 14rem minmax(0, 1fr) minmax(0, 0.9fr); } .window__body--2 { grid-template-columns: 13rem minmax(0, 1fr); } }
.window__side { display: none; border-right: 1px solid var(--divide); padding: 0.9rem 0.6rem; }
@media (min-width: 52rem) { .window__side { display: block; } }
.window__pane { padding: 1rem 1.1rem; min-width: 0; }
.window__pane + .window__pane { border-top: 1px solid var(--divide); }
@media (min-width: 52rem) { .window__pane + .window__pane { border-top: 0; border-left: 1px solid var(--divide); } }
.side-label { padding: 0.4rem 0.5rem; font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.side-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: 0.4rem; color: var(--ink-2); font-size: 0.78rem; white-space: nowrap; overflow: hidden; }
.side-item.is-active { background: var(--row); color: var(--ink); font-weight: 500; }
.side-item small { margin-left: auto; font-family: var(--font-mono); font-size: 0.625rem; color: var(--ink-3); }

.code { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.75; letter-spacing: 0; color: var(--ink-2); white-space: pre; overflow-x: auto; tab-size: 2; }
.code .c { color: var(--ink-3); }                     /* comment */
.code .k { color: var(--accent); }                    /* keyword */
.code .s { color: var(--signal); }                    /* string */
.code .n { color: var(--ink); }                       /* name */
.code .ok { color: var(--ok); } .code .warn { color: var(--warn); } .code .bad { color: var(--bad); }
.code .ln { display: inline-block; width: 1.75rem; color: var(--ink-3); user-select: none; }

.terminal { background: var(--code-bg); color: var(--code-ink); border-color: rgb(255 255 255 / 0.08); }
.terminal .window__bar { border-color: rgb(255 255 255 / 0.08); color: rgb(230 236 234 / 0.5); }
.terminal .code { color: rgb(230 236 234 / 0.72); }
.terminal .code .n { color: #f1f5f4; } .terminal .code .k { color: #7fcbe8; } .terminal .code .s { color: #f0a274; }
.terminal .code .c { color: rgb(230 236 234 / 0.55); } .terminal .code .ok { color: #5fd08d; } .terminal .code .warn { color: #e6bb63; } .terminal .code .bad { color: #f2837c; }
.terminal .code .ln { color: rgb(230 236 234 / 0.5); }
.cursor { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: text-bottom; background: currentColor; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.float-card { position: absolute; z-index: 2; width: min(19rem, 78%); padding: 1rem; border-radius: 0.9rem; background: var(--card); border: 1px solid var(--divide); box-shadow: var(--shadow-lift); text-align: left; }
.float-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); }
.float-card__head span:last-child { color: var(--ink-3); letter-spacing: 0; text-transform: none; font-family: var(--font-sans); font-size: 0.75rem; }
.float-card p { margin-top: 0.6rem; font-size: 0.875rem; line-height: 1.45; color: var(--ink); }
.float-card code { display: block; margin-top: 0.7rem; padding: 0.5rem 0.65rem; border-radius: 0.5rem; background: var(--row); font-family: var(--font-mono); font-size: 0.71rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.float-card .btn-row { margin-top: 0.8rem; justify-content: flex-end; gap: 0.4rem; }
.status-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem; border-radius: 999px; background: var(--card); border: 1px solid var(--divide); box-shadow: 0 12px 30px -18px rgb(17 24 27 / 0.4); font-size: 0.8125rem; font-weight: 500; }
.status-pill small { font-weight: 400; color: var(--ink-2); font-size: inherit; }
.status-pill .dot { color: var(--ok); width: 0.5rem; height: 0.5rem; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 22%, transparent); }

/* Data rows inside mocks */
.rows { display: grid; }
.rows > * { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.75rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--divide); font-size: 0.78rem; }
.rows > :last-child { border-bottom: 0; }
.rows .path { font-family: var(--font-mono); font-size: 0.71rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .num { font-family: var(--font-mono); font-size: 0.71rem; color: var(--ink); text-align: right; }
.rows .delta { font-family: var(--font-mono); font-size: 0.68rem; padding: 0.1rem 0.4rem; border-radius: 0.3rem; }
.delta--up { color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, transparent); }
.delta--down { color: var(--bad); background: color-mix(in oklab, var(--bad) 12%, transparent); }
.delta--flat { color: var(--ink-3); background: var(--row); }
.rows--head > :first-child { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 3.5rem; }
.spark i { flex: 1; background: color-mix(in oklab, var(--accent) 55%, transparent); border-radius: 2px 2px 0 0; min-height: 3px; }
.spark i.is-hot { background: var(--signal); }
.meter { height: 0.35rem; border-radius: 999px; background: var(--row); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.kpi { padding: 0.75rem; border: 1px solid var(--divide); border-radius: 0.6rem; }
.kpi__k { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.kpi__v { margin-top: 0.35rem; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.04em; }

/* 10. Blog ----------------------------------------------------------------- */
.index { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .index { grid-template-columns: 15.5rem minmax(0, 1fr); } }
.index__aside { display: none; border-right: 1px solid var(--divide); }
@media (min-width: 52rem) { .index__aside { display: block; } }
.index__nav { position: sticky; top: 0; max-height: 100vh; max-height: 100svh; overflow-y: auto; padding: 2.5rem 1rem 2.5rem var(--pad-x); scrollbar-width: none; }
.index__nav::-webkit-scrollbar { display: none; }
.index__nav + .index__nav { padding-top: 0; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 0.6rem; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.side-head span:last-child { letter-spacing: 0; }
.side-list { margin-top: 0.75rem; display: grid; gap: 1px; }
.side-list + .side-head { margin-top: 2rem; }
.side-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0.6rem; border-radius: 0.4rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); transition: background 0.15s ease, color 0.15s ease; }
.side-list a span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list a span:last-child { font-size: 0.6875rem; flex: none; }
.side-list a:hover, .side-list a[aria-current], .side-list .current-cat > a, .side-list a.is-active { background: var(--row); color: var(--ink); }
.side-list a[aria-current], .side-list .current-cat > a, .side-list a.is-active { font-weight: 500; }

.entries { min-width: 0; }
.entry { display: block; padding: clamp(2rem, 4vw, 3rem) var(--pad-x); border-bottom: 1px solid var(--divide); transition: background 0.2s ease; }
@media (min-width: 52rem) { .entry { padding-inline: clamp(2rem, 4vw, 3rem) var(--pad-x); } }
.entry:last-child { border-bottom: 0; }
.entry__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.entry__title { margin-top: 0.9rem; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.12; letter-spacing: -0.04em; max-width: 40rem; }
.entry__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.3s ease; }
.entry:hover .entry__title a { background-size: 100% 1px; }
.entry__excerpt { margin-top: 0.9rem; color: var(--ink-2); line-height: 1.7; max-width: 40rem; }
.entry .link { margin-top: 1.1rem; }
.entry--featured .entry__title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.entry__thumb { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--divide); max-width: 40rem; aspect-ratio: 16 / 9; background: var(--elevated); }
.entry__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Compact post rows (home, related, search) */
.post-rows { border-top: 1px solid var(--divide); }
.post-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem 2rem; padding: 1.35rem var(--pad-x); border-bottom: 1px solid var(--divide); transition: background 0.2s ease; align-items: baseline; }
@media (min-width: 52rem) { .post-row { grid-template-columns: 7.5rem minmax(0, 1fr) auto; } }
.post-row:hover { background: var(--row); }
.post-row__date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); }
.post-row__title { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.3; }
.post-row__excerpt { grid-column: 2; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; max-width: 44rem; }
@media (max-width: 51.99rem) { .post-row__excerpt { grid-column: 1; } }
.post-row__cat { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem; padding: 2rem var(--pad-x); border-top: 1px solid var(--divide); font-family: var(--font-mono); font-size: 0.8125rem; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem; padding: 0 0.6rem; border-radius: 0.5rem; color: var(--ink-2); }
.pagination .page-numbers:hover { background: var(--row); color: var(--ink); }
.pagination .current { background: var(--btn-bg); color: var(--btn-fg); }

/* Single post */
.post-head { max-width: 50rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; }
.post-meta a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .post-layout { grid-template-columns: 15.5rem minmax(0, 1fr); } }
.post-layout__aside { display: none; border-right: 1px solid var(--divide); }
@media (min-width: 64rem) { .post-layout__aside { display: block; } }
.post-layout__body { min-width: 0; padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x) clamp(3rem, 6vw, 5rem); }
@media (min-width: 64rem) { .post-layout__body { padding-inline: clamp(2.5rem, 5vw, 4.5rem) var(--pad-x); } }
.toc a { display: block; padding: 0.35rem 0.6rem; border-radius: 0.4rem; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); border-left: 0; }
.toc a:hover, .toc a.is-active { color: var(--ink); background: var(--row); }
.toc .toc-h3 { padding-left: 1.35rem; font-size: 0.78rem; }
.toc ol { margin-top: 0.75rem; display: grid; gap: 1px; }
.share { margin-top: 2rem; display: grid; gap: 1px; }

.author-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: 3.5rem; padding: 1.5rem; border: 1px solid var(--divide); border-radius: var(--radius); background: var(--card); max-width: 44rem; }
.author-card img, .avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; background: var(--elevated); }
.avatar--mono { display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-2); border: 1px solid var(--divide); }
.author-card__name { font-weight: 500; letter-spacing: -0.03em; }
.author-card__bio { margin-top: 0.35rem; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; }
.author-card .link { margin-top: 0.6rem; }

.post-nav { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .post-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .post-nav > :first-child { border-right: 1px solid var(--divide); } .post-nav > :last-child { text-align: right; } }
.post-nav a { display: block; padding: 2rem var(--pad-x); transition: background 0.2s ease; }
.post-nav a:hover { background: var(--row); }
.post-nav small { display: block; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.post-nav span { display: block; margin-top: 0.5rem; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.3; }
@media (max-width: 39.99rem) { .post-nav > * + * { border-top: 1px solid var(--divide); } }

.form-submit { margin: 0; }

/* 11. Prose ---------------------------------------------------------------- */
.prose { max-width: 44rem; font-size: 1.0625rem; line-height: 1.75; color: color-mix(in oklab, var(--ink) 86%, transparent); letter-spacing: -0.015em; }
.prose > * + * { margin-top: 1.35em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4em; font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.04em; color: var(--ink); scroll-margin-top: 2rem; }
.prose h3 { margin-top: 2em; font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.03em; color: var(--ink); scroll-margin-top: 2rem; }
.prose h4 { margin-top: 1.8em; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--ink); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.8em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent); text-underline-offset: 0.2em; }
.prose a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.prose strong, .prose b { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; display: grid; gap: 0.5em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: "–"; position: absolute; left: -1.4em; color: var(--ink-3); font-family: var(--font-mono); font-size: 0.8em; line-height: 2.2; }
.prose ol { list-style: decimal; }
.prose ol > li::marker { font-family: var(--font-mono); font-size: 0.8em; color: var(--ink-3); }
.prose li > ul, .prose li > ol { margin-top: 0.5em; }
.prose blockquote { margin-inline: 0; padding: 0.25em 0 0.25em 1.4em; border-left: 2px solid var(--accent); font-size: 1.1875rem; line-height: 1.55; letter-spacing: -0.025em; color: var(--ink); }
.prose blockquote cite { display: block; margin-top: 0.75em; font-family: var(--font-mono); font-size: 0.75rem; font-style: normal; color: var(--ink-3); }
.prose :not(pre) > code { font-family: var(--font-mono); font-size: 0.86em; letter-spacing: 0; padding: 0.15em 0.4em; border-radius: 0.35rem; background: var(--row); border: 1px solid var(--divide); color: var(--ink); }
.prose pre { position: relative; margin-inline: 0; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--code-bg); color: var(--code-ink); font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.7; letter-spacing: 0; overflow-x: auto; tab-size: 2; border: 1px solid rgb(255 255 255 / 0.06); }
.prose pre code { font: inherit; background: none; border: 0; padding: 0; color: inherit; }
.prose pre[data-lang]::before { content: attr(data-lang); display: block; margin: -0.35rem 0 0.75rem; font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(230 236 234 / 0.45); }
.copy-btn { position: absolute; top: 0.6rem; right: 0.6rem; padding: 0.25rem 0.55rem; border-radius: 0.35rem; border: 1px solid rgb(255 255 255 / 0.14); font-family: var(--font-mono); font-size: 0.625rem; color: rgb(230 236 234 / 0.7); background: rgb(255 255 255 / 0.04); opacity: 0; transition: opacity 0.15s ease; }
.prose pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: #fff; border-color: rgb(255 255 255 / 0.3); }
.prose img, .prose video, .prose iframe { border-radius: var(--radius); border: 1px solid var(--divide); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* Click-to-load embeds (static/theme/js/embed.js): nothing loads from YouTube, SlideShare or Google until clicked */
.embed { position: relative; display: grid; place-items: center; align-content: center; gap: 0.75rem; width: 100%; max-height: 80vh; padding: 1rem; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--divide); background: var(--code-bg); color: var(--code-ink); }
.prose .embed__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; border: 0; border-radius: 0; }
.embed__play { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.25rem; border: 0; border-radius: 999px; background: var(--btn-fg); color: var(--btn-bg); font: 500 0.9375rem/1.2 var(--font-sans); letter-spacing: -0.02em; cursor: pointer; box-shadow: var(--shadow-lift); transition: transform 0.2s ease; }
.embed__play:hover { transform: scale(1.03); }
.embed__play svg { width: 1.1rem; height: 1.1rem; flex: none; }
.prose .embed__note { position: relative; margin: 0; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0; color: color-mix(in oklab, var(--code-ink) 75%, transparent); text-align: center; }
.prose .embed__note a { color: inherit; text-decoration-color: currentColor; }
.prose .embed.is-loaded { padding: 0; }
.prose .embed.is-loaded iframe { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.prose figure { margin-inline: 0; }
.prose figcaption, .wp-caption-text { margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); letter-spacing: 0; }
.prose hr { margin-block: 2.5em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.5; }
.prose .wp-block-table, .prose .table-wrap { overflow-x: auto; }
.prose th { text-align: left; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; color: var(--ink-3); }
.prose th, .prose td { padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--divide); vertical-align: top; }
.prose .callout { padding: 1.1rem 1.25rem; border: 1px solid var(--divide); border-left: 2px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--card); font-size: 0.9375rem; line-height: 1.65; }
.prose .callout > * + * { margin-top: 0.6em; }
.prose .callout__label { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.prose--wide { max-width: 52rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 2.5rem; }

/* 12. Forms ---------------------------------------------------------------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
@media (min-width: 40rem) { .form-row--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
.field label { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

.input, .field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--divide-strong);
  background: var(--card); color: var(--ink); font-size: 0.9375rem; line-height: 1.4; transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.8rem) 50%; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; padding-right: 2.25rem; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
::placeholder { color: var(--ink-3); opacity: 0.75; }
.field__hint { font-size: 0.8125rem; color: var(--ink-3); }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: inline-flex; align-items: center; height: 2.25rem; padding: 0 0.9rem; border-radius: 999px; border: 1px solid var(--divide-strong); font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all 0.15s ease; }
.choice input:checked + span { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; height: 2.75rem; padding: 0 1.25rem; border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); font-size: 0.9375rem; font-weight: 500; cursor: pointer; width: auto; transition: background 0.15s ease;
}
input[type="submit"]:hover { background: var(--btn-hover); }

.searchbox { position: relative; max-width: 36rem; }
.searchbox input { padding-left: 2.6rem; height: 3.25rem; border-radius: 999px; font-family: var(--font-mono); font-size: 0.875rem; }
.searchbox svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--ink-3); pointer-events: none; }

/* Contact detail rows */
.kv { border-top: 1px solid var(--divide); }
.kv > * { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--divide); font-size: 0.9375rem; align-items: baseline; }
.kv dt { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); }
.kv dd a { color: var(--accent); }
.kv dd a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.kv dd small { display: block; color: var(--ink-2); font-size: 0.875rem; margin-top: 0.15rem; }

/* 13. Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--divide); }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x) 2rem; }
@media (min-width: 52rem) { .site-footer__inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.site-footer__tagline { margin-top: 0.9rem; color: var(--ink-2); font-size: 0.9375rem; max-width: 22rem; }
.site-footer__by { margin-top: 0.9rem; color: var(--ink-3); font-size: 0.875rem; }
.site-footer__by a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
@media (min-width: 40rem) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-col__title { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.footer-col ul { margin-top: 1rem; display: grid; gap: 0.7rem; }
.footer-col a { font-size: 0.875rem; color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding: 1.25rem var(--pad-x); border-top: 1px solid var(--divide); font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); }
.site-footer__base a:hover { color: var(--ink); }

/* 404 */
.notfound { text-align: center; padding: clamp(8rem, 18vw, 13rem) var(--pad-x) clamp(4rem, 8vw, 7rem); }
.notfound__code { font-family: var(--font-mono); font-size: clamp(5rem, 18vw, 12rem); line-height: 0.9; letter-spacing: -0.06em; color: color-mix(in oklab, var(--ink) 14%, transparent); font-weight: 500; }
.notfound .display-2 { margin-top: 1.5rem; }
.notfound .lead { margin: 1.25rem auto 0; max-width: 30rem; }
.notfound .terminal { max-width: 34rem; margin: 2.5rem auto 0; }
.notfound .searchbox { margin: 2rem auto 0; }

/* 14. Post content: blocks and classes WordPress puts in posts ------------ */
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.alignwide { width: min(60rem, calc(100vw - 2 * var(--pad-x))); max-width: none; }
.alignfull { max-width: none; }
.wp-caption { max-width: 100%; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem; }
.wp-block-button__link { display: inline-flex; align-items: center; height: 2.75rem; padding: 0 1.15rem; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg) !important; text-decoration: none !important; font-size: 0.9375rem; font-weight: 500; }
.wp-block-pullquote { padding: 0; border: 0; text-align: left; }
.wp-block-separator { border: 0; border-top: 1px solid var(--divide); }
.wp-block-code { padding: 1.1rem 1.25rem; }
.wp-block-embed iframe { width: 100%; }

/* 15. Motion --------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .token, .cursor { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
@media print {
  .site-header, .site-footer, .ticks-nav, .cta, .post-layout__aside, .hero-image__media, .hero-image__fade { display: none !important; }
  .hero-image { color: #000; }
  body { background: #fff; }
}

/* Sidebar search (blog index) */
.side-search { margin-top: 0.75rem; padding: 0 0.1rem; }
.side-search .input { font-size: 0.78rem; padding: 0.55rem 0.7rem; }

/* People: the real photo, and the same face drawn in code */
.avatar--sm { width: 1.75rem; height: 1.75rem; border: 1px solid var(--divide); }
.hero-code__meta { display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.byline { display: flex; align-items: center; gap: 0.9rem; margin-top: 1.75rem; }
.byline .avatar { width: 3.25rem; height: 3.25rem; border: 1px solid var(--divide); }
.byline b { display: block; font-weight: 500; letter-spacing: -0.03em; }
.byline span { display: block; color: var(--ink-2); font-size: 0.875rem; }
.byline + .link { margin-top: 1.25rem; }
.code-portrait { position: relative; aspect-ratio: 1 / 1; background: var(--card); overflow: hidden; }
.code-portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.code-portrait__foot { border-top: 1px solid var(--divide); }
.portrait { margin: 0 0 2rem; }
.portrait img { width: 100%; max-width: 22rem; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--divide); background: var(--elevated); }
.photo { margin: 0 0 2.5rem; }
.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--divide); background: var(--elevated); }
.portrait figcaption, .photo figcaption { margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); }

/* 404: the boat from the header painting, sunk. Sky block with the message, then the sea in code. */
.wreck__sky { max-width: 46rem; margin-inline: auto; padding: clamp(6.5rem, 12vw, 9rem) var(--gutter) clamp(2rem, 4vw, 3rem); text-align: center; }
.wreck__sky .notfound__code { font-size: clamp(4rem, 12vw, 8rem); }
.wreck__sky .display-2 { margin-top: 1rem; }
.wreck__sky .lead { margin: 1.25rem auto 0; max-width: 32rem; }
.wreck__sky .searchbox { margin: 2rem auto 0; }
.wreck__sky .btn-row { margin-top: 1.25rem; justify-content: center; }
.wreck__sea { position: relative; height: clamp(21rem, 38vw, 34rem); overflow: hidden; }
.wreck__art { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(#000 82%, transparent 100%); mask-image: linear-gradient(#000 82%, transparent 100%); }
.wreck__art canvas { width: 100%; height: 100%; }
.wreck__log { position: absolute; left: max(var(--gutter), calc(50% - var(--wrap) / 2 + var(--pad-x))); bottom: 18%; width: min(21rem, 42vw); }
@media (max-width: 47.99rem) { .wreck__log { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.25rem; width: auto; } .wreck__log .code { font-size: 0.6875rem; } .wreck__sea { height: 34rem; } .wreck__art { inset: 0 0 13rem 0; } }

/* Very narrow screens and side panels */
@media (max-width: 22rem) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .btn { white-space: normal; height: auto; min-height: 2.75rem; padding-block: 0.6rem; text-align: center; }
}

/* Contact form status line */
.form-notice { padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--divide-strong); font-size: 0.9375rem; }
.form-notice--ok { border-color: color-mix(in oklab, var(--ok) 45%, transparent); background: color-mix(in oklab, var(--ok) 8%, transparent); }
.form-notice--bad { border-color: color-mix(in oklab, var(--bad) 45%, transparent); background: color-mix(in oklab, var(--bad) 8%, transparent); }

/* Mobile polish: header fit, tap targets, footer columns ------------------------ */
.site-header .brand { padding-block: 0.55rem; }
.icon-btn { position: relative; }
.icon-btn::after { content: ""; position: absolute; inset: -2px; }
@media (max-width: 26rem) {
  .site-header__bar { gap: 0.5rem; }
  .header-actions { gap: 0.25rem; }
  .header-actions .btn--sm { padding-inline: 0.75rem; }
}
@media (max-width: 22.4375rem) { .header-actions .btn { display: none; } }

@media (max-width: 39.99rem) {
  .btn--sm { height: 2.5rem; }
  .choice span { height: 2.5rem; }
  .pagination .page-numbers { min-width: 2.5rem; height: 2.5rem; }
  .float-card code { white-space: normal; overflow-wrap: anywhere; }
  .hero-image__credit a { display: inline-block; padding-block: 0.5rem; }
}
@media (max-width: 51.99rem) {
  .footer-col a { display: inline-block; padding-block: 0.7rem; }
  .footer-col ul { margin-top: 0.4rem; gap: 0; }
}
@media (max-width: 39.99rem) {
  .footer-col:nth-child(3) { grid-column: 1 / -1; }
  .footer-col:nth-child(3) ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
}
@media (max-width: 22rem) { .footer-col:nth-child(3) ul { display: grid; gap: 0; } }

/* Home hero art: on phones the code-painting would sit right behind the copy, so keep it as a faint texture. */
@media (max-width: 39.99rem) {
  .hero-code__art { opacity: 0.3; }
}

/* Painting hero on phones: the copy is tall, so push the paper fade below the pills and buttons. */
@media (max-width: 39.99rem) {
  .hero-image__inner, .hero-image--compact .hero-image__inner { padding-bottom: 7.5rem; }
  .hero-image__fade {
    background:
      radial-gradient(120% 90% at 0% 25%, rgb(8 34 58 / 0.6) 0%, rgb(8 34 58 / 0.36) 50%, transparent 85%),
      linear-gradient(rgb(8 30 52 / 0.38) 0%, transparent 18%),
      linear-gradient(transparent 0%, transparent 80%, color-mix(in oklab, var(--page-bg) 10%, transparent) 84%, color-mix(in oklab, var(--page-bg) 40%, transparent) 90%, color-mix(in oklab, var(--page-bg) 80%, transparent) 96%, var(--page-bg) 100%);
  }
}

@media (max-width: 39.99rem) {
  .mobile-nav li a { align-items: baseline; }
  
  
}

/* Mobile polish, round 2 */
.kpi { min-width: 0; }
.kpi__v { overflow-wrap: anywhere; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 39.99rem) {
  .window__tabs { -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent); mask-image: linear-gradient(90deg, #000 78%, transparent); }
  .site-footer__by a, .site-footer__base a { display: inline-block; padding-block: 0.65rem; }
  .site-footer .brand { padding-block: 0.55rem; }
  .footer-col a { min-width: 2.5rem; }
}
@media (max-width: 24rem) {
  .kv > * { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}
@media (max-width: 22rem) {
  .kpi { padding: 0.6rem; }
  .kpi__v { font-size: 1rem; }
  .announce { border-radius: 1rem; }
  .announce__text { white-space: normal; overflow: visible; text-overflow: clip; }
}
.timeline__more { max-width: 44rem; }

/* Blog index on phones: the sidebar is hidden there, so categories become a scrolling chip row */
.index__chips { display: flex; gap: 0.4rem; overflow-x: auto; padding: 1rem var(--pad-x); border-bottom: 1px solid var(--divide); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.index__chips::-webkit-scrollbar { display: none; }
.index__chips .chip { height: 2.25rem; padding: 0 0.8rem; flex: none; }
.index__chips .chip span { color: var(--ink-3); }
.index__chips .chip[aria-current] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.index__chips .chip[aria-current] span { color: inherit; opacity: 0.7; }
@media (min-width: 52rem) { .index__chips { display: none; } }

/* 16. Static site only: search suggestions (static/search.js) ----------------- */
.suggest { position: absolute; z-index: 60; display: grid; gap: 1px; padding: 0.35rem; max-height: min(26rem, 70vh); overflow-y: auto; border: 1px solid var(--divide-strong); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-card); text-align: left; }
.suggest[hidden] { display: none; }
.suggest__opt { display: grid; gap: 0.2rem; padding: 0.55rem 0.7rem; border-radius: 0.4rem; color: var(--ink); cursor: pointer; }
.suggest__opt:hover, .suggest__opt[aria-selected="true"] { background: var(--row); }
.suggest__title { font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.suggest__meta { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.suggest__all { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); border-top: 1px solid var(--divide); border-radius: 0 0 0.4rem 0.4rem; }
.suggest mark, .post-row mark { background: var(--accent-soft); color: inherit; border-radius: 0.2em; padding: 0 0.1em; }
.form-notice[hidden] { display: none; }
