/* udaydave.in rebuild — warm editorial theme.
   Ivory paper, espresso ink, one vermilion accent, and three soft tints
   (blush, butter, sage) that give each decision its own stage. */

/* Fonts: self-hosted (SIL Open Font License). Latin first; latin-ext only downloads when a character needs it. */
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(../fonts/instrument-sans-latin-wdth-normal.woff2) format('woff2'); 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: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-latin-400-normal.woff2) format('woff2'); 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: 'Instrument Sans'; font-style: italic; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(../fonts/instrument-sans-latin-wdth-italic.woff2) format('woff2'); 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: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-latin-400-italic.woff2) format('woff2'); 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: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); 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: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); 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: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(../fonts/instrument-sans-latin-ext-wdth-normal.woff2) format('woff2'); 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: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-latin-ext-400-normal.woff2) format('woff2'); 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: 'Instrument Sans'; font-style: italic; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(../fonts/instrument-sans-latin-ext-wdth-italic.woff2) format('woff2'); 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: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-latin-ext-400-italic.woff2) format('woff2'); 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: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext-400-normal.woff2) format('woff2'); 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: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext-500-normal.woff2) format('woff2'); 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; }

:root {
  --bg-ground: #F5EFE6;
  --bg-surface: #FBF7F0;
  --bg-raised: #FFFFFF;
  --bg-inverse: #1E1915;
  --bg-inverse-raised: #2A231D;
  --bg-placeholder: #EADFD0;
  --text-primary: #1E1915;
  --text-secondary: #3A312A;
  --text-muted: #5C5147;
  --text-inverse: #F5EFE6;
  --text-inverse-muted: #BDB0A1;
  --border-default: #E2D6C5;
  --border-strong: #1E1915;
  --border-dashed: #BCAE9C;
  --border-inverse: #3A3129;
  --accent: #A9341D;
  --accent-tint: #F6DCCF;
  --on-accent: #FFFFFF;
  --live: #FF8A65;
  --ok: #3F8F5E;
  --inverse-edge: transparent;

  --blush: #F6DCCF;
  --butter: #F3E4B8;
  --sage: #DCE5D2;
  --blush-ink: #A9341D;
  --butter-ink: #76560F;
  --sage-ink: #3E5A43;
  --arch-1: #F7B091;
  --arch-2: #E0593A;
  --arch-3: #A9341D;
  --contact-bg: #B23A21;
  --ivory: #FBF7F0;
  --ink: #1E1915;

  --shadow-sm: 0 1px 2px rgba(60, 40, 20, .06), 0 4px 14px rgba(60, 40, 20, .05);
  --shadow-lg: 0 2px 6px rgba(60, 40, 20, .06), 0 28px 60px -20px rgba(60, 40, 20, .28);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --max: 1200px;
  --pad: clamp(20px, 5vw, 48px);
  --header-h: 76px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-ground: #14110E;
    --bg-surface: #1B1713;
    --bg-raised: #241F1A;
    --bg-inverse: #0B0907;
    --bg-inverse-raised: #1A1612;
    --bg-placeholder: #2A231D;
    --text-primary: #F2EBE0;
    --text-secondary: #D6CBBC;
    --text-muted: #A6998A;
    --text-inverse: #F2EBE0;
    --text-inverse-muted: #A6998A;
    --border-default: #2F2821;
    --border-strong: #F2EBE0;
    --border-dashed: #5C5045;
    --border-inverse: #2A231D;
    --accent: #F27A5B;
    --accent-tint: #3A2219;
    --on-accent: #1A0F0B;
    --live: #FF9C7A;
    --ok: #7CC79A;
    --inverse-edge: #2E2620;
    --blush: #33201A;
    --butter: #2F2817;
    --sage: #1F2820;
    --blush-ink: #F27A5B;
    --butter-ink: #E2C67C;
    --sage-ink: #A8C6A6;
    --arch-1: #E0704E;
    --arch-2: #B4472C;
    --arch-3: #6E2414;
    --contact-bg: #8A2E19;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .2);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 60px -20px rgba(0, 0, 0, .65);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg-ground: #14110E;
  --bg-surface: #1B1713;
  --bg-raised: #241F1A;
  --bg-inverse: #0B0907;
  --bg-inverse-raised: #1A1612;
  --bg-placeholder: #2A231D;
  --text-primary: #F2EBE0;
  --text-secondary: #D6CBBC;
  --text-muted: #A6998A;
  --text-inverse: #F2EBE0;
  --text-inverse-muted: #A6998A;
  --border-default: #2F2821;
  --border-strong: #F2EBE0;
  --border-dashed: #5C5045;
  --border-inverse: #2A231D;
  --accent: #F27A5B;
  --accent-tint: #3A2219;
  --on-accent: #1A0F0B;
  --live: #FF9C7A;
  --ok: #7CC79A;
  --inverse-edge: #2E2620;
  --blush: #33201A;
  --butter: #2F2817;
  --sage: #1F2820;
  --blush-ink: #F27A5B;
  --butter-ink: #E2C67C;
  --sage-ink: #A8C6A6;
  --arch-1: #E0704E;
  --arch-2: #B4472C;
  --arch-3: #6E2414;
  --contact-bg: #8A2E19;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .2);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 60px -20px rgba(0, 0, 0, .65);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--bg-ground);
  color: var(--text-primary);
  font: 440 17px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Thin antialiasing only helps light-on-dark; on the ivory page it makes body text look grey. */
:root[data-theme="dark"] body { -webkit-font-smoothing: antialiased; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { -webkit-font-smoothing: antialiased; }
}
.section--ink, .contact, .site-footer, .now, .box--result, .video { -webkit-font-smoothing: antialiased; }
p { margin: 0; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .25s ease; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 18px; border-radius: 999px; background: var(--text-primary); color: var(--bg-ground); text-decoration: none; }
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }

/* Theme switch: a circle grows out of the toggle (see site.js). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Reading progress, fixed to the top edge */
.progress { position: fixed; inset: 0 0 auto 0; z-index: 70; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* ---------- Type ---------- */
.display { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 8.2vw, 116px); line-height: .94; letter-spacing: -0.025em; }
.display em, .h2 em, .h3 em { font-style: italic; color: var(--accent); }
.display, .h2, .h3, .h4 { text-wrap: balance; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.4vw, 72px); line-height: 1; letter-spacing: -0.02em; }
.h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; letter-spacing: -0.012em; }
.h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.12; letter-spacing: -0.005em; }
.question { margin: 0; display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.3; color: var(--accent); }
.question::before { content: ""; width: 32px; height: 1px; background: currentColor; flex: none; }
.body-l { font-size: 20px; line-height: 1.55; }
.small { font-size: 14.5px; line-height: 1.5; }
.mono { font-family: var(--mono); font-weight: 500; font-size: 11.5px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.mono-s { font-family: var(--mono); font-weight: 500; font-size: 11px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.num { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.strong-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; padding-bottom: 3px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; transition: color .25s ease, background-size .4s var(--ease-out); }
.strong-link:hover { background-size: 0% 1.5px; background-position: 100% 100%; }
.arrow { display: inline-block; transition: transform .4s var(--ease-out); }
a:hover .arrow, .btn:hover .arrow { transform: translateX(5px); }
a:hover .arrow--down, .btn:hover .arrow--down { transform: translateY(4px); }
a:hover .arrow--up { transform: translateY(-4px); }
a:hover .arrow--back { transform: translateX(-5px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-ground) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border-default); box-shadow: 0 10px 30px -24px rgba(40, 25, 10, .5); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 16px; }
/* Brand lockup, as on the live site: the UD mark in ink beside the name in bold condensed sans. */
.logo, .footer-brand { display: inline-flex; align-items: center; gap: 10px; font: 700 21px/1 var(--sans); font-stretch: 80%; letter-spacing: 0; white-space: nowrap; text-decoration: none; }
.logo:hover { color: var(--text-primary); }
.logo-mark { width: 30px; height: 30px; flex: none; fill: currentColor; transition: transform .7s var(--ease-out), fill .3s ease; }
.logo:hover .logo-mark { fill: var(--accent); transform: rotate(-28deg); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 30px; }
.nav > a { position: relative; padding-block: 6px; text-decoration: none; font-size: 15.5px; font-weight: 500; }
.nav > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--ease-out); }
.nav > a:hover { color: var(--text-primary); }
.nav > a:hover::after, .nav > a.is-active::after, .nav > a[aria-current="page"]::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.nav-tools .btn { min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 999px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-primary);
  cursor: pointer; transition: border-color .2s ease, transform .5s var(--ease-out);
}
.theme-toggle:hover { border-color: var(--border-strong); transform: rotate(-20deg); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
@media (max-width: 760px) {
  .nav .nav-extra { display: none; }
  .nav { gap: 8px 20px; }
}
@media (max-width: 560px) {
  .site-header .wrap { padding-block: 12px; }
  .logo { font-size: 19px; gap: 8px; }
  .logo .logo-mark { width: 26px; height: 26px; }
  .nav { gap: 6px 16px; }
  .nav > a { font-size: 15px; }
  .nav-tools .btn { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15.5px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color .4s var(--ease-out), border-color .4s ease, transform .3s var(--ease-out);
}
.btn::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; transform: translateY(102%); transition: transform .5s var(--ease-out); }
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--text-primary); color: var(--bg-ground); }
.btn-primary::before { background: var(--accent); }
.btn-primary:hover { color: var(--on-accent); }
.btn-secondary { border-color: var(--border-strong); color: var(--text-primary); }
.btn-secondary::before { background: var(--text-primary); }
.btn-secondary:hover { color: var(--bg-ground); }
.btn-ondark { background: var(--ivory); color: var(--ink); }
.btn-ondark::before { background: var(--ink); }
.btn-ondark:hover { color: var(--ivory); }
.btn-ondark-outline { border-color: rgba(251, 247, 240, .6); color: var(--ivory); }
.btn-ondark-outline::before { background: var(--ivory); }
.btn-ondark-outline:hover { color: var(--contact-bg); border-color: var(--ivory); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(40px, 6vw, 72px) clamp(88px, 10vw, 128px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); gap: 56px clamp(48px, 7vw, 104px); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 13px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-secondary); }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(3); opacity: 0; } }
.hero .display { margin-top: 30px; }
.display .ln { display: block; overflow: hidden; padding: 0 .12em .08em 0; margin-bottom: -.08em; }
.display .ln > span { display: block; }
.pointers { list-style: none; margin: 0; padding: 40px 0 0; display: grid; gap: 14px; max-width: 560px; }
.pointers li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; font-size: 18.5px; line-height: 1.5; color: var(--text-secondary); }
.pointers svg { margin-top: 3px; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 32px; }

.hero-visual { position: relative; display: grid; }
.arch {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 50% 50% 28px 28px / 40% 40% 28px 28px;
  background: radial-gradient(120% 85% at 50% 18%, var(--arch-1) 0%, var(--arch-2) 52%, var(--arch-3) 100%);
  box-shadow: var(--shadow-lg);
}
.arch-mark { position: absolute; z-index: -1; width: 128%; left: -14%; top: 4%; fill: rgba(255, 244, 236, .16); transition: translate .5s var(--ease-out); }
.arch-photo { position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto; height: 95%; width: auto; max-width: none; transition: translate .5s var(--ease-out); }
.badge {
  position: absolute; z-index: 3; top: 22px; left: -52px;
  width: 128px; height: 128px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-ground); box-shadow: var(--shadow-sm);
}
.badge-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 30s linear infinite; }
.badge-ring text { font-family: var(--mono); font-weight: 500; font-size: 9.4px; letter-spacing: .16em; text-transform: uppercase; fill: var(--text-primary); }
.badge .logo-mark { width: 40px; height: 40px; fill: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.now { position: relative; z-index: 2; margin: -112px 0 0 -64px; border: 1px solid var(--inverse-edge); background: var(--bg-inverse); color: var(--text-inverse); border-radius: 22px; padding: 22px 26px 8px; box-shadow: var(--shadow-lg); }
.now-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.now-head .mono-s { color: var(--text-inverse-muted); }
.now-label { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 138, 101, .55); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 138, 101, .55); } 70% { box-shadow: 0 0 0 9px rgba(255, 138, 101, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 138, 101, 0); } }
.now dl { margin: 0; }
.now-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; padding-block: 13px; border-top: 1px solid var(--border-inverse); font-size: 15px; line-height: 1.5; }
.now-row dt { color: var(--text-inverse-muted); padding-top: 3px; }
.now-row dd { margin: 0; }
.now a { color: var(--text-inverse); }
.now a:hover { color: var(--live); }

/* Hero entrance (CSS only, so it plays even before site.js runs) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .display .ln > span { animation: rise 1.1s var(--ease-out) both; }
  .js .hero .display .ln:nth-child(2) > span { animation-delay: .12s; }
  .js .hero .kicker, .js .hero .pointers li, .js .hero .actions, .js .hero-visual > * { animation: reveal 1s var(--ease-out) both; }
  .js .hero .pointers li:nth-child(1) { animation-delay: .35s; }
  .js .hero .pointers li:nth-child(2) { animation-delay: .43s; }
  .js .hero .pointers li:nth-child(3) { animation-delay: .51s; }
  .js .hero .pointers li:nth-child(4) { animation-delay: .59s; }
  .js .hero .actions { animation-delay: .6s; }
  .js .hero-visual > .arch { animation: arch-in 1.3s var(--ease-out) .1s both; }
  .js .hero-visual > .badge { animation: pop .9s var(--ease-out) .7s both; }
  .js .hero-visual > .now { animation-delay: .55s; }
}
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes arch-in { from { opacity: 0; clip-path: inset(100% 0 0 0 round 200px 200px 28px 28px); } to { opacity: 1; clip-path: inset(0 0 0 0 round 0); } }
@keyframes pop { from { opacity: 0; transform: scale(.6) rotate(-40deg); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleY(0); } to { transform: none; } }

/* ---------- Scroll reveals (site.js adds data-reveal, so nothing hides without it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.is-in) { opacity: 0; }
  .js [data-reveal].is-in { animation: reveal 1s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(88px, 11vw, 144px); }
.section--rule { border-top: 1px solid var(--border-default); }
.section--surface { background: var(--bg-surface); border-block: 1px solid var(--border-default); }
.section--ink { background: var(--bg-inverse); color: var(--text-inverse); }
.section-head { max-width: 960px; display: grid; gap: 16px; margin-bottom: 56px; }
.section-head .desc { font-size: 20px; color: var(--text-secondary); max-width: 720px; }
.section--ink .question { color: var(--live); }
.section--ink .section-head .desc { color: var(--text-inverse-muted); }

/* ---------- Decision cards ---------- */
.cards { display: grid; gap: 40px; }
.card {
  --tint: var(--blush); --tint-ink: var(--blush-ink);
  position: relative; background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: 32px; padding: clamp(24px, 3.6vw, 44px); display: grid; gap: 36px;
  box-shadow: var(--shadow-sm); transition: box-shadow .6s var(--ease-out), border-color .4s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card--butter, .case--butter { --tint: var(--butter); --tint-ink: var(--butter-ink); }
.card--sage, .case--sage { --tint: var(--sage); --tint-ink: var(--sage-ink); }
.card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 16px 28px; }
.card-num { font-family: var(--serif); font-style: italic; font-size: clamp(64px, 7vw, 96px); line-height: .78; color: var(--tint-ink); }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; color: var(--text-muted); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--tint, var(--accent-tint)); color: var(--tint-ink, var(--accent)); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.card-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: stretch; }

/* A product screen on a tinted stage. The walkthrough video drops in here later. */
.stage {
  position: relative; margin: 0; overflow: hidden;
  display: grid; align-content: center; gap: 18px;
  padding: clamp(18px, 3vw, 36px) clamp(16px, 2.6vw, 32px) 18px;
  border-radius: 22px; background-color: var(--tint, var(--blush));
  background-image: radial-gradient(color-mix(in srgb, var(--tint-ink, var(--blush-ink)) 16%, transparent) 1px, transparent 1.5px);
  background-size: 18px 18px;
  perspective: 1400px;
}
.window {
  border-radius: 12px; overflow: hidden; background: var(--bg-raised);
  border: 1px solid color-mix(in srgb, var(--tint-ink, var(--blush-ink)) 18%, transparent);
  box-shadow: 0 1px 1px rgba(40, 20, 5, .06), 0 26px 50px -22px rgba(60, 25, 5, .45);
  transition: box-shadow .6s var(--ease-out);
}
.stage:hover .window { box-shadow: 0 1px 1px rgba(40, 20, 5, .06), 0 40px 70px -26px rgba(60, 25, 5, .55); }
.window-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--bg-surface); border-bottom: 1px solid var(--border-default); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #E8806A; }
.window-bar i:nth-child(2) { background: #E8C46A; }
.window-bar i:nth-child(3) { background: #93BC8D; }
.window-bar span { margin-left: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window picture, .window img { display: block; width: 100%; height: auto; }
.stage-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; color: var(--tint-ink, var(--blush-ink)); }
.stage-tag { display: inline-flex; align-items: center; gap: 8px; }
.stage-tag svg { flex: none; }

/* Built on my own: one independent product, gold to match its own look */
.card--gold, .case--gold { --tint: #EFE2C4; --tint-ink: #7A5A12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.card--gold, .case--gold) { --tint: #2B2416; --tint-ink: #E0B860; } }
:root[data-theme="dark"] :is(.card--gold, .case--gold) { --tint: #2B2416; --tint-ink: #E0B860; }
.project { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 40px; }
.project-body { display: grid; gap: 18px; align-content: center; }
.project-body .status-row { margin: 0; }
.project-body .h3 em { color: var(--tint-ink); }
.project-facts { margin: 0; display: grid; border-top: 1px solid var(--border-default); }
.project-facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--border-default); }
.project-facts dt { color: var(--text-muted); padding-top: 3px; }
.project-facts dd { margin: 0; }
@media (max-width: 900px) { .project { grid-template-columns: minmax(0, 1fr); } }

/* Hero composites: each decision's screens staged and annotated, light and dark exports.
   They carry their own background, so the frame only adds the edge and the lift. */
.hero-shot {
  margin: 0; display: block; align-self: center; overflow: hidden; border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--tint-ink, var(--blush-ink)) 16%, transparent);
  box-shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 30px 60px -32px rgba(60, 25, 5, .45);
}
.hero-shot picture, .hero-shot img { display: block; width: 100%; height: auto; }
.hero-shot img { transition: transform 1.1s var(--ease-out); }
.card:hover .hero-shot img, a.hero-shot:hover img { transform: scale(1.015); }
.shot.hero-shot { margin: 0; display: block; }
.shot.hero-shot img { cursor: zoom-in; }
.step-owed { font-size: 14px; font-style: italic; color: var(--text-inverse-muted); }

/* Walkthrough video placeholder: the topic's screen as a dimmed poster, its question as the title.
   Each decision has its own tone; the real video replaces the whole block later. */
.video {
  --tone: #8E2C18;
  position: relative; isolation: isolate; overflow: hidden; margin: 0;
  display: grid; grid-template-rows: auto 1fr auto; gap: 12px;
  min-width: 0; min-height: 320px; aspect-ratio: 16 / 10;
  padding: clamp(14px, 2vw, 22px);
  border-radius: 22px; background: #140E0A; color: #FBF7F0;
  box-shadow: 0 30px 60px -32px rgba(40, 20, 5, .6);
}
.card--butter .video, .case--butter .video { --tone: #6B4E10; }
.card--sage .video, .case--sage .video { --tone: #2E4A35; }
.video-poster { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.video-poster img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 0 0;
  transform: scale(1.08) translate(var(--px, 0px), var(--py, 0px)); filter: saturate(.75);
  transition: transform 1.2s var(--ease-out), filter .6s ease;
}
.video::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(170deg, color-mix(in srgb, var(--tone) 80%, transparent) 0%, color-mix(in srgb, var(--tone) 50%, rgba(20, 14, 10, .7)) 48%, rgba(20, 14, 10, .95) 100%);
}
.video:hover .video-poster img { transform: scale(1.03) translate(var(--px, 0px), var(--py, 0px)); filter: saturate(.95); }
.video-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.video-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.video-chip--soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FF9C7A; animation: pulse 2.6s ease-out infinite; }
.video-play {
  position: relative; justify-self: center; align-self: center;
  width: 78px; height: 78px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: #FBF7F0; color: var(--tone); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .55);
  transition: transform .5s var(--ease-out);
}
.video-play svg { fill: currentColor; margin-left: 3px; }
.video-play::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid rgba(251, 247, 240, .55); animation: ring 2.6s var(--ease-out) infinite; }
.video-play:hover { transform: scale(1.08); }
.video-play:active { transform: scale(.95); }
.video-play:focus-visible { outline-color: #FBF7F0; outline-offset: 6px; }
@keyframes ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.video-title { font-family: var(--serif); font-size: clamp(24px, 2.5vw, 34px); line-height: 1.08; letter-spacing: -0.01em; max-width: 24ch; text-wrap: balance; }
.video-chapters { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.video-chapters li { display: grid; gap: 8px; min-width: 0; }
.video-chapters li::before { content: ""; height: 3px; border-radius: 2px; background: rgba(251, 247, 240, .28); }
.video-chapters li:first-child::before { background: linear-gradient(90deg, #FBF7F0 18%, rgba(251, 247, 240, .28) 18%); }
.video-chapters span { color: rgba(251, 247, 240, .74); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: rgba(251, 247, 240, .6); font-size: 9.5px; }
.video-note {
  position: absolute; left: 50%; top: calc(50% + 58px); z-index: 2; translate: -50% 0;
  width: max-content; max-width: calc(100% - 32px); padding: 9px 16px; border-radius: 999px;
  background: rgba(20, 14, 10, .88); border: 1px solid rgba(255, 255, 255, .16);
  font-size: 14px; line-height: 1.4; text-align: center;
  opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .4s var(--ease-out); pointer-events: none;
}
.video.is-noted .video-note { opacity: 1; transform: none; }
.decision-row .video { min-height: 420px; }

/* The decision, as a little flow */
.flow { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.flow > .box, .flow > .options { width: 100%; }
.connector { width: 2px; height: 26px; flex: none; background: linear-gradient(var(--border-dashed) 55%, transparent 0) 0 0 / 2px 6px; transform-origin: 50% 0; }
.options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.box { position: relative; border-radius: 16px; padding: 16px 18px; display: grid; gap: 6px; align-content: start; font-size: 16px; line-height: 1.45; }
.box .label { color: var(--text-muted); }
.box--situation { background: var(--bg-ground); border: 1px solid var(--border-default); }
.box--rejected { border: 1.5px dashed var(--border-dashed); color: var(--text-muted); }
.box--rejected p:not(.label) { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); transition: text-decoration-color .6s ease .9s; }
.box--chosen { background: var(--bg-raised); border: 2px solid var(--accent); font-weight: 600; box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--accent) 70%, transparent); }
.box--chosen .label { color: var(--accent); }
.flow .box--chosen::after { content: ""; position: absolute; top: -11px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.6 11.3l3 3 5.9-6.3' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; }
.box--result { border: 1px solid var(--inverse-edge); background: var(--bg-inverse); color: var(--text-inverse); }
.box--result .label { color: var(--text-inverse-muted); }
.box--result a { color: var(--text-inverse); }
.box--result a:hover { color: var(--live); }

/* The flow plays in order the first time it scrolls into view */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.is-in) .flow > .box,
  .js [data-reveal]:not(.is-in) .flow .options > .box,
  .js [data-reveal]:not(.is-in) .flow > .connector { opacity: 0; }
  .js [data-reveal]:not(.is-in) .box--rejected p:not(.label) { text-decoration-color: transparent; }
  .js [data-reveal].is-in .flow > .box,
  .js [data-reveal].is-in .flow .options > .box { animation: reveal .8s var(--ease-out) both; }
  .js [data-reveal].is-in .flow > .connector { animation: draw .5s var(--ease-out) both; }
  .js [data-reveal].is-in .flow > :nth-child(1) { animation-delay: .25s; }
  .js [data-reveal].is-in .flow > :nth-child(2) { animation-delay: .45s; }
  .js [data-reveal].is-in .flow .options > :nth-child(1) { animation-delay: .55s; }
  .js [data-reveal].is-in .flow .options > :nth-child(2) { animation-delay: .75s; }
  .js [data-reveal].is-in .flow > :nth-child(4) { animation-delay: .95s; }
  .js [data-reveal].is-in .flow > :nth-child(5) { animation-delay: 1.05s; }
}

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 0; }
.step { position: relative; padding: 28px 22px 26px; border-top: 1px solid var(--border-inverse); border-radius: 0 0 18px 18px; display: grid; gap: 10px; align-content: start; transition: background-color .35s ease; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--live); transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms + .2s); }
.steps.is-in .step::before { transform: scaleX(1); }
.step:hover { background: var(--bg-inverse-raised); }
.step .num { font-family: var(--serif); font-style: italic; font-size: 46px; line-height: 1; letter-spacing: 0; color: var(--live); transition: transform .5s var(--ease-out); transform-origin: 0 100%; }
.step:hover .num { transform: scale(1.12); }
.step .h4 { font-size: 30px; }
.step p { font-size: 15px; color: var(--text-inverse-muted); }
.step a { font-size: 14px; color: var(--text-inverse); }
.step a:hover { color: var(--live); }
.section:not(.section--ink) .step { border-top-color: var(--border-default); }
.section:not(.section--ink) .step .num { color: var(--accent); }
.section:not(.section--ink) .step p { color: var(--text-secondary); }
.loop { display: flex; align-items: center; gap: 12px; margin-top: 44px; font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--text-inverse-muted); }
.loop svg { color: var(--live); flex: none; transition: transform .8s var(--ease-out); }
.loop:hover svg { transform: rotate(-360deg); }
.section:not(.section--ink) .loop { color: var(--text-secondary); }
.section:not(.section--ink) .loop svg { color: var(--accent); }

/* ---------- Notes ---------- */
.notes-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 48px; }
.notes-head .section-head { margin-bottom: 0; }
.note-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.note-card {
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: translate .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s ease;
}
.note-card:hover { color: inherit; translate: 0 -6px; box-shadow: var(--shadow-lg); border-color: transparent; }
.note-card-link { display: flex; flex: 1; flex-direction: column; color: inherit; text-decoration: none; }
.note-card-link:hover { color: inherit; }
.note-card:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.note-links { display: grid; gap: 16px; padding-bottom: 40px; }
.thumb {
  --tint: var(--blush); --tint-ink: var(--blush-ink);
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 10; background: var(--tint); color: var(--tint-ink);
  display: grid; place-items: center; text-align: center; padding: 20px;
}
.thumb::before {
  content: ""; position: absolute; inset: -20%; z-index: -1;
  background: repeating-radial-gradient(circle at 88% 112%, transparent 0 26px, color-mix(in srgb, var(--tint-ink) 16%, transparent) 26px 27.5px);
  transition: transform .9s var(--ease-out);
}
.note-card:hover .thumb::before, .note-row a:hover .thumb::before { transform: scale(1.08) rotate(-2deg); }
.note-card:nth-child(3n+2) .thumb, .note-row:nth-child(3n+2) .thumb { --tint: var(--butter); --tint-ink: var(--butter-ink); }
.note-card:nth-child(3n+3) .thumb, .note-row:nth-child(3n+3) .thumb { --tint: var(--sage); --tint-ink: var(--sage-ink); }
.note-card .content { padding: 24px 26px 28px; display: grid; gap: 10px; }
.read { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.note-card:hover .arrow, .note-row a:hover .arrow { transform: translateX(5px); }

/* Notes not written yet: the same card, not a link, marked Upcoming */
.note-card--upcoming { cursor: default; }
.note-card--upcoming:hover { translate: none; box-shadow: none; border-color: var(--border-default); }
.note-card--upcoming:hover .thumb::before { transform: none; }
.note-card--upcoming .thumb { padding: 28px; }
.soon {
  position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px; border-radius: 999px; color: var(--tint-ink);
  background: color-mix(in srgb, var(--bg-surface) 78%, transparent); border: 1px solid color-mix(in srgb, var(--tint-ink) 22%, transparent);
}
.soon::before, .upcoming-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.6s ease-out infinite; }
.thumb-q { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; max-width: 12ch; text-wrap: balance; }
.upcoming-tag {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding: 5px 11px; border-radius: 999px;
  vertical-align: 3px; background: var(--accent-tint); color: var(--accent);
}
.notes-plan { display: grid; gap: 40px; }
.plan-head { margin: 24px 0 -8px; }
.notes-plan > * { max-width: 860px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--border-default); }
.plan-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding-block: 24px; border-bottom: 1px solid var(--border-default); }
.plan-list .num { font-family: var(--serif); font-style: italic; font-size: 34px; line-height: 1; color: var(--accent); }
.plan-list h3 { margin-bottom: 6px; }
.notes-plan .follow { padding-block: 0 112px; }

/* ---------- About ---------- */
.about-row { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: clamp(40px, 7vw, 88px); align-items: start; }
.portrait { position: relative; margin: 0; display: grid; gap: 12px; }
.portrait-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 28px; background: var(--blush); }
.portrait-frame::before { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 30%, transparent 0 34px, color-mix(in srgb, var(--blush-ink) 10%, transparent) 34px 35px); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; mix-blend-mode: luminosity; transition: transform 1s var(--ease-out); }
.portrait:hover img { transform: scale(1.035); }
.portrait figcaption { color: var(--text-muted); }
.arc { position: relative; list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.arc::before, .arc::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--border-default); }
.arc::after { background: linear-gradient(90deg, var(--border-dashed), var(--accent)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.6s var(--ease-out) .2s; }
.arc.is-in::after { transform: scaleX(1); }
.arc li { position: relative; padding-top: 26px; display: grid; gap: 6px; align-content: start; }
.arc li::before { content: ""; position: absolute; top: -5px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-ground); border: 2px solid var(--border-dashed); }
.arc li .num { color: var(--text-muted); }
.arc li.is-now::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px var(--accent-tint); }
.arc li.is-now .num { color: var(--accent); }
.arc strong { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.1; }
.about-copy { display: grid; gap: 24px; }
.career { list-style: none; margin: 0 0 56px; padding: 0; display: grid; }
.career li { display: grid; grid-template-columns: 130px minmax(0, 1.1fr) minmax(0, 1.5fr); gap: 6px 32px; align-items: start; padding-block: 22px; border-top: 1px solid var(--border-default); }
.career li:last-child { border-bottom: 1px solid var(--border-default); }
.career li > span:nth-child(2) { display: grid; gap: 4px; }
.career strong { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.15; }
.career .mono-s { padding-top: 7px; }
.creds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.creds li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-default); background: var(--bg-surface); font-size: 14px; color: var(--text-secondary); transition: border-color .25s ease, color .25s ease, translate .3s var(--ease-out); }
.creds li:hover { border-color: var(--accent); color: var(--accent); translate: 0 -2px; }

/* ---------- Contact + footer ---------- */
.contact { position: relative; overflow: hidden; isolation: isolate; background: var(--contact-bg); color: var(--ivory); padding-block: clamp(96px, 12vw, 168px); }
.contact-kicker { color: rgba(251, 247, 240, .9); }
.contact .display { margin: 24px 0; max-width: 1100px; }
.contact .display em { color: #FFD3BF; }
.contact .lede { color: rgba(251, 247, 240, .88); max-width: 560px; }
.contact .actions { padding-top: 36px; align-items: center; }
.contact-mark { position: absolute; z-index: -1; right: -7%; top: 50%; translate: 0 -50%; width: min(50vw, 620px); fill: rgba(255, 240, 230, .09); pointer-events: none; }
.email-group { display: inline-flex; align-items: center; gap: 8px; }
.btn-copy {
  width: 52px; height: 52px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(251, 247, 240, .6); background: transparent; color: var(--ivory);
  transition: background-color .3s ease, color .3s ease, transform .3s var(--ease-out);
}
.btn-copy:hover { background: var(--ivory); color: var(--contact-bg); }
.btn-copy:active { transform: scale(.92); }
.btn-copy .icon-check { display: none; }
.btn-copy.is-copied .icon-check { display: block; }
.btn-copy.is-copied .icon-copy { display: none; }
.copy-toast { margin-top: 18px; min-height: 22px; font-size: 14.5px; color: rgba(251, 247, 240, .88); transition: opacity .3s ease; }
.copy-toast:empty { opacity: 0; }
.site-footer { background: var(--bg-inverse); color: var(--text-inverse-muted); border-top: 1px solid var(--border-inverse); }
.site-footer .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 40px; padding-block: 30px; font-size: 14px; }
.footer-brand { font-size: 19px; }
.footer-brand .logo-mark { width: 26px; height: 26px; }
.footer-brand:hover .logo-mark { fill: var(--live); transform: rotate(-28deg); }
.footer-note { color: var(--text-inverse-muted); }
.footer-top { display: inline-flex; gap: 8px; font-weight: 600; white-space: nowrap; }
.site-footer a { color: var(--text-inverse); text-decoration: none; }
.site-footer a:hover { color: var(--live); }
@media (max-width: 760px) {
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 14px; padding-block: 32px; }
}

/* ---------- Case study ---------- */
.case-top { padding-block: 48px 40px; display: grid; gap: 22px; }
.case-top .display { max-width: 1040px; font-size: clamp(48px, 7vw, 100px); }
.case-top .question { color: var(--text-secondary); }
.back { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; justify-self: start; text-decoration: none; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 22px; overflow: hidden; }
.facts div { padding: 24px; display: grid; gap: 10px; align-content: start; transition: background-color .3s ease; }
.facts div + div { border-left: 1px solid var(--border-default); }
.facts div:hover { background: var(--bg-raised); }
.facts dt { display: grid; gap: 16px; justify-items: start; color: var(--text-muted); }
.facts dd { margin: 0; font-size: 17px; font-weight: 520; line-height: 1.45; color: var(--text-primary); }
.fact-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--tint, var(--blush)); color: var(--tint-ink, var(--blush-ink)); transition: transform .5s var(--ease-out); }
.fact-icon svg { width: 20px; height: 20px; }
.facts div:hover .fact-icon, .fact-card:hover .fact-icon { transform: rotate(-8deg) scale(1.06); }

/* Facts, section 08: a spec sheet of small cards, the provenance note last and full width */
.fact-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fact-card { padding: 22px 24px 24px; border-radius: 18px; background: var(--bg-surface); border: 1px solid var(--border-default); transition: translate .4s var(--ease-out), box-shadow .4s ease, border-color .3s ease; }
.fact-card:hover { translate: 0 -3px; box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--tint-ink, var(--accent)) 35%, var(--border-default)); }
.fact-card dt { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }
.fact-card .fact-icon { width: 34px; height: 34px; border-radius: 10px; }
.fact-card .fact-icon svg { width: 18px; height: 18px; }
.fact-card dd { margin: 14px 0 0; color: var(--text-secondary); line-height: 1.55; }
.fact-card--wide { grid-column: 1 / -1; }
.fact-card--note { grid-column: 1 / -1; background: var(--tint, var(--blush)); border: 1.5px dashed color-mix(in srgb, var(--tint-ink, var(--blush-ink)) 40%, transparent); }
.fact-card--note dt { color: var(--tint-ink, var(--blush-ink)); }
.fact-card--note .fact-icon { background: var(--bg-raised); }
.fact-card--note dd { color: var(--text-primary); font-weight: 520; }
.decision-row { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; padding-block: 40px 96px; align-items: stretch; }
.panel { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 24px; padding: 28px; box-shadow: var(--shadow-sm); }
.panel > .mono { color: var(--accent); margin-bottom: 18px; }
.story-nav {
  position: sticky; top: var(--header-h); z-index: 20;
  display: flex; align-items: center; gap: 6px; padding: 10px 0;
  overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg-ground) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-block: 1px solid var(--border-default);
}
.story-nav::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  /* The row scrolls sideways on a phone; a soft edge says there is more */
  .story-nav { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%); }
}
.story-nav .mono { color: var(--text-muted); margin-right: 12px; white-space: nowrap; }
.story-nav a { flex: none; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; text-decoration: none; transition: background-color .3s ease, color .3s ease; }
.story-nav a:hover { background: var(--bg-surface); color: var(--text-primary); }
.story-nav a.is-active { background: var(--text-primary); color: var(--bg-ground); }
.story-row { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; padding-block: 64px; border-bottom: 1px solid var(--border-default); scroll-margin-top: calc(var(--header-h) + 72px); }
.story-row:last-child { border-bottom: 0; }
.story-label { display: grid; gap: 8px; align-content: start; align-self: start; }
/* The section title stays in view while its long right-hand column scrolls past */
@media (min-width: 901px) {
  .story-label { position: sticky; top: calc(var(--header-h) + var(--story-nav-h, 58px) + 36px); }
}
.story-label .num { font-family: var(--serif); font-style: italic; font-size: 40px; line-height: 1; color: var(--tint-ink, var(--accent)); }
.story-content { display: grid; gap: 16px; align-content: start; }
.story-content > p:not([class]) { max-width: 68ch; font-size: 18px; color: var(--text-secondary); }
.story-content .lead + p:not([class]) { margin-top: 4px; }
.ph-line { height: 12px; border-radius: 6px; background: var(--bg-placeholder); }
.ph-img {
  aspect-ratio: 16 / 9; border-radius: 18px; display: grid; place-items: center; text-align: center; padding: 16px;
  color: var(--tint-ink, var(--blush-ink)); border: 1.5px dashed color-mix(in srgb, var(--tint-ink, var(--blush-ink)) 35%, transparent);
  background: var(--tint, var(--blush)) repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--tint-ink, var(--blush-ink)) 7%, transparent) 14px 15px);
}
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* An exhibit: a rebuilt screen on a tinted mat, click to enlarge */
.shot { margin: 8px 0 0; display: grid; gap: 12px; }
.shot .stage { padding: clamp(14px, 2.4vw, 28px); }
.shot img { cursor: zoom-in; }
.shot figcaption { max-width: 68ch; }
.shot figcaption strong { color: var(--text-primary); font-weight: 600; }
.zoom-btn { margin-left: auto; flex: none; min-height: 26px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border-default); background: var(--bg-raised); color: var(--text-secondary); font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: border-color .2s ease, color .2s ease; }
@media (pointer: coarse) { .zoom-btn { min-height: 32px; padding-inline: 13px; } .window-bar { height: 40px; } }
.zoom-btn:hover { border-color: var(--accent); color: var(--accent); }
.lightbox { width: min(1600px, 94vw); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: 16px; background: var(--bg-raised); color: var(--text-primary); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .6); overflow: auto; }
.lightbox::backdrop { background: rgba(20, 14, 10, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { display: block; width: 100%; height: auto; }
.lightbox-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 20px; background: var(--bg-surface); border-bottom: 1px solid var(--border-default); }
.lightbox-bar p { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-close { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-default); background: var(--bg-raised); color: var(--text-primary); cursor: pointer; transition: transform .4s var(--ease-out), border-color .2s ease; }
.lightbox-close:hover { border-color: var(--border-strong); transform: rotate(90deg); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: zoom-in .45s var(--ease-out); }
  .lightbox[open]::backdrop { animation: fade .3s ease; }
}
@keyframes zoom-in { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Roles: many at the start, one primary user after the restart */
.roles { list-style: none; margin: 0; padding: clamp(16px, 3vw, 28px); display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 10px; border-radius: 22px; background: var(--tint, var(--blush)); }
.roles li { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, var(--tint-ink, var(--blush-ink)) 40%, transparent); color: var(--text-muted); font-size: 15px; line-height: 1.35; }
.roles li .mono-s { color: var(--tint-ink, var(--blush-ink)); }
.roles li.is-primary { border: 2px solid var(--accent); background: var(--bg-raised); color: var(--text-primary); font-weight: 600; box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--accent) 70%, transparent); }
.roles li.is-primary .mono-s { color: var(--accent); }
.lead { font-family: var(--serif); font-size: 30px; line-height: 1.25; letter-spacing: -0.005em; }
.decision-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.result { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 16px; padding: 20px; display: grid; gap: 8px; align-content: start; transition: translate .4s var(--ease-out), box-shadow .4s ease; }
.result:hover { translate: 0 -3px; box-shadow: var(--shadow-sm); }
.result .label { color: var(--text-muted); }
.result.is-shipped { background: var(--accent-tint); border: 1.5px solid var(--accent); }
.result.is-shipped .label { color: var(--accent); }
.next { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding-block: 56px 88px; border-top: 1px solid var(--border-default); }
.next-link { display: grid; gap: 6px; justify-items: end; text-decoration: none; }
.next-link .mono-s { color: var(--text-muted); }
.next-link .h3 { display: inline-flex; align-items: baseline; gap: 14px; }

/* ---------- Notes index ---------- */
.intro { padding-block: 72px 48px; display: grid; gap: 20px; }
.intro .body-l { max-width: 760px; color: var(--text-secondary); }
.note-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-default); }
.note-row a { display: grid; grid-template-columns: 208px minmax(0, 1fr) auto; gap: 36px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--border-default); text-decoration: none; color: inherit; transition: padding .5s var(--ease-out), background-color .4s ease; border-radius: 0; }
.note-row a:hover { color: inherit; background: var(--bg-surface); padding-inline: 20px; }
.note-row a:hover .h4 { color: var(--accent); }
.note-row .thumb { aspect-ratio: 8 / 5; border-radius: 14px; }
.note-row .text { display: grid; gap: 8px; }
.note-row .read { margin-top: 0; }
.follow { padding-block: 28px 112px; font-size: 15px; color: var(--text-muted); }

/* ---------- 404 page ---------- */
.error-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.error-page > .site-header, .error-page > .site-footer { flex-shrink: 0; }
.error-page > main { flex: 1; display: grid; align-items: center; }
.error-content.case-top { grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: start; padding-block: clamp(56px, 8vh, 112px); }
.error-content .body-l { max-width: 38ch; }

/* ---------- Single note ---------- */

.article { max-width: calc(760px + 2 * var(--pad)); margin-inline: auto; padding: 56px var(--pad) 112px; display: grid; gap: 56px; }
.article-top { display: grid; gap: 16px; }
.article-top .meta { color: var(--accent); }
.four { margin: 0; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 22px; padding: 8px 28px; box-shadow: var(--shadow-sm); }
.four-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: center; gap: 24px; padding-block: 18px; border-bottom: 1px solid var(--border-default); }
.four-row:last-child { border-bottom: 0; }
.four-row dt { color: var(--text-muted); }
.four-row dd { margin: 0; }
.four-row.is-key { margin: 6px -16px 10px; padding-inline: 16px; border-radius: 14px; background: var(--accent-tint); }
.four-row.is-key dt { color: var(--accent); }
.four-row.is-key dd { font-weight: 600; }
.note-sec { display: grid; gap: 16px; }

/* Published notes: figures drawn in the page's own tokens, so they follow light and dark */
.note-sec > p.secondary { font-size: 18px; max-width: 68ch; }
.note-sec a:not(.strong-link) { color: var(--text-primary); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.pull { margin: 4px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; color: var(--text-primary); text-wrap: balance; }
.note-fig { margin: 8px 0; display: grid; gap: 12px; }
.note-fig figcaption { max-width: 68ch; }

/* Sketch of the moment it breaks: three unbranded phones */
.moment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 28px 22px 22px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 20px; }
.mo { display: grid; gap: 12px; justify-items: center; align-content: start; }
.mo-phone { position: relative; width: 100%; max-width: 206px; aspect-ratio: 9 / 15.5; border-radius: 26px; border: 1.5px solid color-mix(in srgb, var(--text-primary) 32%, transparent); background: var(--bg-raised); padding: 28px 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 22px 44px -30px rgba(40, 25, 10, .55); }
.mo-notch { position: absolute; top: 10px; left: 50%; width: 44px; height: 6px; margin-left: -22px; border-radius: 6px; background: color-mix(in srgb, var(--text-primary) 16%, transparent); }
.mo-title { margin: 0 0 4px; font-weight: 600; font-size: 13.5px; line-height: 1.25; color: var(--text-primary); }
.mo-row, .mo-search { position: relative; display: block; padding: 9px 10px; border-radius: 10px; background: var(--bg-ground); font-size: 12px; line-height: 1.3; color: var(--text-secondary); }
.mo-search { border: 1px solid var(--border-default); background: transparent; color: var(--text-muted); border-radius: 999px; }
.mo-row.is-sel { box-shadow: inset 0 0 0 1.5px var(--text-primary); color: var(--text-primary); font-weight: 600; }
.mo-btn { position: relative; margin-top: auto; display: block; text-align: center; padding: 10px; border-radius: 999px; background: var(--text-primary); color: var(--bg-raised); font-size: 12px; font-weight: 600; }
.mo-tap { position: absolute; right: 12px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.mo-hit { display: grid; gap: 3px; padding: 11px 10px; border-radius: 12px; border: 2px solid var(--accent); background: var(--accent-tint); font-size: 12px; line-height: 1.35; color: var(--text-primary); }
.mo-hit b { font-size: 13px; }
.mo-hit .mono { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; }
.mo-flag { font: 600 9.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.mo-bubble { position: absolute; left: -12px; right: -12px; bottom: 58px; padding: 11px 13px; border-radius: 16px 16px 16px 4px; background: var(--bg-inverse); color: var(--text-inverse); font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.2; box-shadow: var(--shadow-lg); }
.mo-cap { margin: 0; color: var(--text-muted); text-align: center; }
.mo-flag--line { display: block; padding: 6px 2px 0; border-top: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
.mo-cap--key { color: var(--accent); }
@media (max-width: 640px) {
  .moment { grid-template-columns: repeat(3, minmax(176px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding: 22px 16px 18px; }
  .mo { scroll-snap-align: center; }
}

/* Survey numbers and problem scores */
.stats { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 20px; padding: 24px 26px; display: grid; gap: 18px; }
.stats-k { margin: 0; color: var(--text-muted); }
.stat-list, .bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.stat { display: grid; grid-template-columns: 78px auto minmax(0, 1fr); align-items: center; gap: 18px; }
.stat-n { font: 400 42px/1 var(--serif); color: var(--text-primary); }
.stat-n small { font-size: 18px; color: var(--text-muted); }
.dots { display: grid; grid-template-columns: repeat(6, 12px); gap: 5px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--text-muted) 55%, transparent); }
.dots i.on { background: var(--accent); border-color: var(--accent); }
.stat-t { color: var(--text-secondary); }
.bars li { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr) 26px; align-items: center; gap: 14px; font-size: 15px; color: var(--text-secondary); }
.bar { height: 10px; border-radius: 6px; background: var(--bg-ground); overflow: hidden; }
.bar i { display: block; height: 100%; width: calc(var(--v) / 15 * 100%); border-radius: 6px; background: color-mix(in srgb, var(--text-muted) 55%, transparent); }
.bars .is-top { color: var(--text-primary); font-weight: 600; }
.bars .is-top .bar i { background: var(--accent); }
.bars b { text-align: right; font-weight: 600; color: var(--text-primary); }
@media (max-width: 560px) {
  .stats { padding: 20px 18px; }
  .stat { grid-template-columns: 66px minmax(0, 1fr); row-gap: 8px; }
  .stat-t { grid-column: 1 / -1; }
  .bars li { grid-template-columns: minmax(0, 1fr) 26px; row-gap: 6px; }
  .bars .bar { grid-column: 1 / -1; grid-row: 2; }
}

/* Line chart from real data (note 02): series colours follow the page tokens */
.lc-board { padding: 18px 18px 14px; }
.lc .grid { stroke: var(--border-default); stroke-width: 1; }
.lc .ax { font: 400 12px var(--sans); fill: var(--text-muted); }
.lc .ln { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.lc .ln.s-a { stroke: var(--text-primary); stroke-opacity: .8; }
.lc .ln.s-s { stroke: var(--sage-ink); }
.lc .ln.s-r { stroke: var(--accent); }
.lc .dot.s-a, .lc .el.s-a { fill: var(--text-primary); }
.lc .dot.s-s, .lc .el.s-s { fill: var(--sage-ink); }
.lc .dot.s-r, .lc .el.s-r { fill: var(--accent); }
.lc .el { font: 600 13px var(--sans); }
.lc-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 10px 4px 0; color: var(--text-muted); }
.lc-key .k::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 8px; border-radius: 2px; vertical-align: middle; background: currentColor; }
.lc-key .k.s-a { color: var(--text-primary); }
.lc-key .k.s-s { color: var(--sage-ink); }
.lc-key .k.s-r { color: var(--accent); }
.lc-spread { margin-left: auto; color: var(--text-secondary); }

/* Forecast error, grouped by market */
.mape { display: grid; gap: 18px; }
.mape-m { display: grid; gap: 8px; }
.mape-name { margin: 0; font-weight: 600; color: var(--text-primary); }
.mape-name .mono-s { margin-left: 6px; color: var(--text-muted); }
.bars--mape li { grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 52px; gap: 12px; font-size: 14.5px; }
.bars--mape .bar i { width: calc(var(--v) / 20 * 100%); }
@media (max-width: 560px) { .bars--mape li { grid-template-columns: minmax(0, 1fr) 52px; } }

/* A screenshot of my own prototype, framed */
.shot-frame { border: 1px solid var(--border-default); border-radius: 20px; overflow: hidden; background: #F4F5F9; box-shadow: var(--shadow-sm); }
.shot-frame img { display: block; width: 100%; height: auto; }

/* Note 03: the leaked answer, and leaks out of 40 */
.ans { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 20px; padding: 22px 24px; display: grid; gap: 14px; }
.ans-q { margin: 0; justify-self: end; max-width: 46ch; padding: 12px 16px; border-radius: 16px 16px 4px 16px; background: var(--bg-inverse); color: var(--text-inverse); }
.ans-role { display: block; margin-bottom: 4px; color: color-mix(in srgb, var(--text-inverse) 70%, transparent); }
.ans-a { max-width: 60ch; padding: 14px 16px; border-radius: 16px 16px 16px 4px; background: var(--bg-raised); border: 1px solid var(--border-default); display: grid; gap: 10px; }
.ans-a p { margin: 0; }
.ans-dim { font-size: 13.5px; color: var(--text-muted); }
.ans-leak { background: var(--butter); color: var(--text-primary); padding: 2px 4px; border-radius: 4px; box-shadow: inset 0 -2px 0 var(--butter-ink); }
.ans-note { margin: 0; display: grid; gap: 4px; padding-left: 14px; border-left: 3px solid var(--butter-ink); color: var(--text-secondary); font-size: 15px; }
.ans-note .mono-s { color: var(--butter-ink); }
.leaks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.leak-row { display: grid; grid-template-columns: minmax(0, 190px) auto 24px; align-items: center; gap: 16px; font-size: 15px; color: var(--text-secondary); }
.leak-dots { display: grid; grid-template-columns: repeat(20, 10px); gap: 4px; }
.leak-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--text-muted) 45%, transparent); }
.leak-dots i.on { background: var(--butter-ink); border-color: var(--butter-ink); }
.leak-row b { text-align: right; color: var(--text-primary); }
@media (max-width: 560px) {
  .leak-row { grid-template-columns: minmax(0, 1fr) 24px; row-gap: 8px; }
  .leak-dots { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(20, 1fr); max-width: 300px; }
  .leak-dots i { width: auto; aspect-ratio: 1; }
}
.pd .edge--leak { stroke: var(--butter-ink); stroke-opacity: 1; stroke-width: 2.4; stroke-dasharray: 6 5; }
.pd .mk--leak { fill: var(--butter-ink); fill-opacity: 1; }
.pd .note--leak { fill: var(--butter-ink); font-weight: 600; }

/* Note cards and rows with a real picture instead of the Upcoming text thumb */
.thumb--img { padding: 0; }
.thumb--img::before { display: none; }
.thumb--img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--ease-out); }
.note-card:hover .thumb--img img, .note-row a:hover .thumb--img img { transform: scale(1.04); }
.table-scroll { overflow-x: auto; border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-surface); }
.metric-table { width: 100%; min-width: 520px; border-collapse: collapse; }
.metric-table th, .metric-table td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-default); }
.metric-table tr:last-child td { border-bottom: 0; }
.metric-table th { color: var(--text-muted); font-weight: 500; background: var(--bg-ground); }
.metric-table tbody tr { transition: background-color .25s ease; }
.metric-table tbody tr:hover { background: var(--bg-ground); }
.metric-table .guard { color: var(--accent); font-weight: 600; }
/* System diagram (policy assistant, from the PRD). Inline SVG themed by the page's tokens: two lanes, a store
   between them, the decision drawn as the accent path. A separate vertical drawing replaces it on phones. */
.pipe { margin: 8px 0 4px; display: grid; gap: 12px; }
.pd-board { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 20px; padding: 18px; }
.pd { display: block; width: 100%; height: auto; overflow: visible; }
.pd--narrow { display: none; }
.pd .lane { fill: var(--bg-ground); }
.pd .lane-label { font: 500 12px var(--mono); letter-spacing: .12em; fill: var(--text-muted); }
.pd .node rect { fill: var(--bg-raised); stroke: var(--border-default); stroke-width: 1.2; }
.pd .node .t { font: 600 17px var(--sans); fill: var(--text-primary); }
.pd .node .s { font: 400 14px var(--sans); fill: var(--text-muted); }
.pd .node--chosen rect { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 2; }
.pd .node--chosen .t, .pd .tag { fill: var(--accent); }
.pd .node--chosen .s { fill: var(--text-primary); }
.pd .tag { font: 600 10.5px var(--mono); letter-spacing: .1em; }
.pd .store path, .pd .store ellipse { fill: var(--bg-raised); stroke: var(--text-muted); stroke-opacity: .55; stroke-width: 1.3; }
.pd .store .t { font: 600 16px var(--sans); fill: var(--text-primary); }
.pd .store .s { font: 400 13px var(--sans); fill: var(--text-muted); }
.pd .edge { fill: none; stroke: var(--text-muted); stroke-opacity: .7; stroke-width: 1.6; }
.pd .edge--accent { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2.4; }
.pd .edge--ghost { stroke-dasharray: 5 5; stroke-opacity: .6; }
.pd .mk { fill: var(--text-muted); fill-opacity: .8; }
.pd .mk--accent { fill: var(--accent); fill-opacity: 1; }
.pd .mk--ghost { fill-opacity: .6; }
.pd .note { font: 400 14px var(--sans); fill: var(--text-muted); }
.pd .note--accent { fill: var(--accent); font-weight: 600; }
.pd .note--small { font-size: 12.5px; }
.pd .ghost rect { fill: none; stroke: var(--text-muted); stroke-opacity: .6; stroke-width: 1.3; stroke-dasharray: 5 4; }
.pd .ghost .gt { font: 400 13px var(--sans); fill: var(--text-muted); }
.pd .lab { font: 500 10.5px var(--mono); letter-spacing: .1em; fill: var(--text-muted); }
.pd .node--chosen .lab { fill: var(--accent); }
.pd .node--ok rect { fill: var(--sage); stroke: var(--sage-ink); stroke-opacity: .45; }
.pd .node--ok .t { fill: var(--sage-ink); }
.pd .node--miss rect { fill: var(--butter); stroke: var(--butter-ink); stroke-opacity: .45; }
.pd .node--miss .t, .pd .node--miss .lab { fill: var(--butter-ink); }
.pd .node--miss .s { fill: var(--text-secondary); }
.pd .t--pill { font-size: 15px; }
.pd .cta, .pd .node--chosen .cta { fill: var(--accent); stroke: none; }
.pd .cta-t { font: 600 13px var(--sans); fill: var(--bg-raised); }
@media (max-width: 640px) {
  .pd-board { padding: 10px; }
  .pd--wide { display: none; }
  .pd--narrow { display: block; }
}
/* A comparison that must fit a phone without sideways scrolling: short values, row labels carry the detail. */
.metric-table--fit { min-width: 0; }
.metric-table--fit tbody th { color: var(--text-primary); font-weight: 400; background: none; }
.metric-table--fit thead th .mono-s { display: block; margin-top: 4px; }
.metric-table--fit td { white-space: nowrap; }
@media (max-width: 600px) {
  .metric-table--fit th, .metric-table--fit td { padding: 12px 10px; font-size: 15px; }
  .metric-table--fit thead th:first-child { width: 48%; }
}
.bullets { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-secondary); }
.bullets li::marker { color: var(--accent); }
.note-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 28px; border-top: 1px solid var(--border-default); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 460px; width: 100%; margin-inline: auto; padding-left: 0; }
  .badge { left: -12px; top: 12px; width: 108px; height: 108px; }
  .now { margin: -88px 0 0 0; }
  .decision-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .card { border-radius: 24px; gap: 28px; }
  .card-head { grid-template-columns: auto minmax(0, 1fr); }
  .card-head .strong-link { grid-column: 1 / -1; justify-self: start; }
  .card-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .note-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-row { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .portrait { max-width: 300px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--border-default); }
  .story-row { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 44px; }
}
@media (max-width: 700px) {
  .now { padding: 20px 20px 6px; }
  .career li { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 18px; }
  .career .mono-s { padding-top: 0; }
  .arc { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-left: 28px; }
  .arc::before, .arc::after { left: 5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .arc::after { background: linear-gradient(180deg, var(--border-dashed), var(--accent)); transform: scaleY(0); transform-origin: 50% 0; }
  .arc.is-in::after { transform: scaleY(1); }
  .arc li { padding-top: 0; }
  .arc li::before { top: 4px; left: -28px; }
  .note-row a { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .note-row a:hover { padding-inline: 0; background: transparent; }
  .results, .decision-options { grid-template-columns: minmax(0, 1fr); }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roles li.is-primary { grid-column: 1 / -1; }
  .fact-grid { grid-template-columns: minmax(0, 1fr); }
  .facts div { padding: 18px 20px; }
  .facts dt { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
  .fact-icon { width: 32px; height: 32px; border-radius: 10px; }
  .fact-icon svg { width: 17px; height: 17px; }
  .four { padding: 6px 20px; }
  .four-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .four-row.is-key { margin-inline: -10px; padding-inline: 10px; }
  .question { font-size: 21px; }
  .question::before { width: 22px; }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { padding-inline: 14px; }
  .note-cards { grid-template-columns: minmax(0, 1fr); }
  .card-num { font-size: 56px; }
}
@media (max-width: 600px) {
  .video, .decision-row .video { aspect-ratio: auto; min-height: 340px; border-radius: 18px; }
  .video-play { width: 62px; height: 62px; }
  .video-chapters span, .video-meta span:last-child { display: none; }
  .video-note { top: calc(50% + 44px); }
  /* On a small frame the poster's own headlines compete with the title, so soften it further */
  .video-poster img, .video:hover .video-poster img { filter: saturate(.6) blur(2px); }
  .video::before { background: linear-gradient(170deg, color-mix(in srgb, var(--tone) 88%, transparent) 0%, color-mix(in srgb, var(--tone) 70%, rgba(20, 14, 10, .8)) 50%, rgba(20, 14, 10, .96) 100%); }
  .video-chip { padding: 5px 9px; }
}
@media (max-width: 520px) {
  .options { grid-template-columns: minmax(0, 1fr); }
  /* Two by two on a phone: four stacked rows pushed the first picture a whole screen down */
  .facts div { padding: 16px; gap: 8px; }
  .facts dt { grid-auto-flow: row; gap: 10px; }
  .facts dd { font-size: 15px; }
  .fact-icon { width: 28px; height: 28px; }
  .now-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .badge { width: 92px; height: 92px; left: -6px; }
  .badge .logo-mark { width: 30px; height: 30px; }
  .stage-foot { font-size: 9.5px; }
  .contact .actions .btn { flex: 1 1 auto; }
  .email-group { width: 100%; }
  .email-group .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
}
