/* ==========================================================================
   RUBIN — beetroot kvass concentrate · A–Zh production site
   --------------------------------------------------------------------------
   DESIGN SYSTEM (read me first)

   Palette (exact, all via custom properties below)
     ruby-950  #22050F  near-black ink (stage sections, footer)
     ruby-900  #45091F  default dark page ground
     ruby-800  #5B0F2E  deep beetroot
     ruby-600  #8E1B45  beetroot (primary brand ink on paper)
     ruby-400  #C23A6B  bright ruby (accents on dark grounds)
     bone      #F4ECE1  warm bone / cream paper
     bone-2    #EADFCF  shaded paper
     forest    #2F5D3A  mint-leaf forest green (text-safe on bone)
     mint      #93C9A0  mint highlight (text-safe on ruby)
     citrus    #FF7A1A  hot citrus — sparingly; on bone use #B5470A for text
     turmeric  #E2A12A  illustration only
     ink       #1F0A12  near-black text on paper

   Surfaces — every chapter declares data-surface:
     base     = page ground (ruby dark in dark theme, bone in light theme)
     contrast = the opposite (bone paper in dark theme, ruby in light theme)
     stage    = always near-black ink, used for "product render" moments
   Each surface re-declares --bg/--fg/--muted/--line/--accent/--green/--ruby,
   so components never hard-code colours.

   Type
     Display: Fraunces (variable: opsz, SOFT, WONK) — high-contrast, a little odd
     Text:    Instrument Sans — clean grotesk for reading
     Data:    DM Mono — quantities, batch numbers, lab-log feel
     Scale is fluid (clamp). Hero runs to ~15rem; body 1.0625rem / 1.6.

   Space
     4px base. --sp-1..--sp-9 = 4 8 12 16 24 32 48 72 120.
     Chapters breathe (≥ 120px vertical on desktop), then go dense inside
     ledgers, tables and calculators.

   Motion
     One easing family: --ease-out (expo-ish) for reveals, --ease-spring for
     magnetic / UI. Things enter by rising 24px + unmasking; SVG strokes draw;
     numbers count. Everything idles when off-screen and collapses to instant
     under prefers-reduced-motion.

   Shapes
     Radii are mostly 0 or pill (999px); no uniform soft-shadow cards.
     Edges are drawn with hairlines (--line) and offset "print" shadows.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --ruby-950: #22050F;
  --ruby-900: #45091F;
  --ruby-800: #5B0F2E;
  --ruby-600: #8E1B45;
  --ruby-400: #C23A6B;
  --bone: #F4ECE1;
  --bone-2: #EADFCF;
  --forest: #2F5D3A;
  --mint: #93C9A0;
  --citrus: #FF7A1A;
  --citrus-ink: #B5470A;
  --turmeric: #E2A12A;
  --ink: #1F0A12;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "Cascadia Mono", monospace;

  --fs-hero: clamp(4rem, min(15.5vw, 21svh), 15rem);
  --fs-h2: clamp(2.7rem, 8.2vw, 7.25rem);
  --fs-h3: clamp(1.45rem, 2.6vw, 2.2rem);
  --fs-lead: clamp(1.18rem, 1.75vw, 1.55rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-micro: .75rem;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 72px; --sp-9: 120px;

  --gutter: clamp(20px, 5vw, 72px);
  --rail: 0px;
  --maxw: 1440px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur: .9s;
}
@media (min-width: 1024px) { :root { --rail: 88px; } }

/* surface token sets */
:root[data-theme="dark"] [data-surface="base"],
:root[data-theme="light"] [data-surface="contrast"],
.sf-dark {
  --bg: var(--ruby-900);
  --bg-2: var(--ruby-800);
  --fg: var(--bone);
  --muted: rgba(244, 236, 225, .74);
  --line: rgba(244, 236, 225, .2);
  --accent: var(--citrus);
  --green: var(--mint);
  --ruby: var(--ruby-400);
  --paper: var(--bone);
  --paper-fg: var(--ink);
  --chip: rgba(244, 236, 225, .08);
  color-scheme: dark;
}
:root[data-theme="dark"] [data-surface="contrast"],
:root[data-theme="light"] [data-surface="base"],
.sf-light {
  --bg: var(--bone);
  --bg-2: var(--bone-2);
  --fg: var(--ink);
  --muted: #5B444B;
  --line: rgba(31, 10, 18, .16);
  --accent: var(--citrus-ink);
  --green: var(--forest);
  --ruby: var(--ruby-600);
  --paper: #FBF6EE;
  --paper-fg: var(--ink);
  --chip: rgba(31, 10, 18, .06);
  color-scheme: light;
}
[data-surface="stage"] {
  --bg: var(--ruby-950);
  --bg-2: #2E0815;
  --fg: var(--bone);
  --muted: rgba(244, 236, 225, .72);
  --line: rgba(244, 236, 225, .16);
  --accent: var(--citrus);
  --green: var(--mint);
  --ruby: var(--ruby-400);
  --paper: var(--bone);
  --paper-fg: var(--ink);
  --chip: rgba(244, 236, 225, .07);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, table { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
table { border-collapse: collapse; }
a { color: inherit; }

/* ---------- base ---------- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s ease, color .5s ease;
}
:root[data-theme="dark"] body { --bg: var(--ruby-900); --fg: var(--bone); }
:root[data-theme="light"] body { --bg: var(--bone); --fg: var(--ink); }

/* film grain over everything (static, cheap) */
body::before {
  content: "";
  position: fixed; inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: .11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] body::before { mix-blend-mode: overlay; opacity: .16; }

::selection { background: var(--citrus); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--citrus);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--citrus); color: var(--ink); padding: 10px 16px; font-weight: 600;
  text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

.mono { font-family: var(--f-mono); font-feature-settings: "zero" 1; letter-spacing: -.01em; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- page tint layer (hover touch) ---------- */
#tint {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: radial-gradient(60vmax 60vmax at var(--tx, 50%) var(--ty, 50%), rgba(194, 58, 107, .55), transparent 60%);
  opacity: 0;
  transition: opacity .6s var(--ease-out);
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] #tint { mix-blend-mode: screen; background: radial-gradient(60vmax 60vmax at var(--tx, 50%) var(--ty, 50%), rgba(194, 58, 107, .35), transparent 60%); }
body.is-tinted #tint { opacity: .4; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 14px var(--gutter) 14px calc(var(--rail) + var(--gutter));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.wordmark {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--f-display); font-weight: 700; font-size: 1.55rem; letter-spacing: -.03em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  text-decoration: none;
  color: var(--bone);
  height: 44px; padding: 0 16px; align-items: center;
  border-radius: 999px; border: 1px solid rgba(244, 236, 225, .35);
  background: rgba(34, 5, 15, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.wordmark sup { font-family: var(--f-mono); font-size: .62rem; font-weight: 400; letter-spacing: .04em; opacity: .85; }
.topbar__tools { display: flex; gap: var(--sp-2); align-items: center; }
.iconbtn {
  display: inline-grid; place-items: center; gap: 6px; grid-auto-flow: column;
  height: 44px; min-width: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(244, 236, 225, .35);
  background: rgba(34, 5, 15, .55); color: var(--bone);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase;
  transition: background .3s, transform .3s var(--ease-spring);
}
.iconbtn:hover { background: var(--ruby-600); }
.iconbtn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* ---------- chapter rail (desktop) ---------- */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
  width: var(--rail);
  display: none;
  flex-direction: column; align-items: center;
  padding: 22px 0;
  border-right: 1px solid rgba(244, 236, 225, .14);
  background: var(--ruby-950);
  color: var(--bone);
}
@media (min-width: 1024px) { .rail { display: flex; } }
.rail__brand {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; opacity: .7;
  margin-bottom: 18px;
}
.rail__list { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 0; }
.rail__track, .rail__fill {
  position: absolute; left: 50%; top: 0; width: 2px; margin-left: -1px; bottom: 0;
  background: rgba(244, 236, 225, .15);
}
.rail__fill { background: var(--citrus); bottom: auto; height: calc(var(--progress, 0) * 100%); transition: height .15s linear; }
.rail__link {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 38px; height: 30px;
  font-family: var(--f-display); font-weight: 600; font-size: 1rem;
  font-variation-settings: "opsz" 24;
  color: rgba(244, 236, 225, .62);
  text-decoration: none;
  background: var(--ruby-950);
  border-radius: 999px;
  transition: color .25s, background .25s, transform .35s var(--ease-spring);
}
.rail__link:hover, .rail__link:focus-visible { color: var(--bone); transform: scale(1.15); }
.rail__link.is-done { color: var(--bone); }
.rail__link.is-active { background: var(--citrus); color: var(--ink); transform: scale(1.12); }
.rail__link .rail__label {
  position: absolute; left: calc(100% + 14px); top: 50%; translate: 0 -50%;
  white-space: nowrap;
  font-family: var(--f-text); font-size: .85rem; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bone); color: var(--ink);
  opacity: 0; pointer-events: none; transform: translateX(-6px);
  transition: opacity .2s, transform .3s var(--ease-out);
}
.rail__link:hover .rail__label, .rail__link:focus-visible .rail__label { opacity: 1; transform: none; }

/* ---------- mobile chapter pill + index overlay ---------- */
.chip-nav {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 14px; z-index: 70;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 8px 0 18px; border-radius: 999px;
  background: var(--ruby-950); color: var(--bone);
  border: 1px solid rgba(244, 236, 225, .2);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
  font-size: .9rem;
  max-width: calc(100vw - 28px);
}
@media (min-width: 1024px) { .chip-nav { display: none; } }
.chip-nav__letter { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; color: var(--citrus); min-width: 1.4em; }
.chip-nav__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.chip-nav__ring { width: 36px; height: 36px; }
.chip-nav button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--bone); color: var(--ink); font-weight: 600; font-size: .85rem;
}

.index-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: var(--ruby-950); color: var(--bone);
  padding: 76px var(--gutter) 40px;
  overflow-y: auto;
  display: none;
}
.index-overlay.is-open { display: block; animation: overlay-in .5s var(--ease-out); }
@keyframes overlay-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.index-overlay ol { list-style: none; columns: 1; }
@media (min-width: 640px) { .index-overlay ol { columns: 2; column-gap: 40px; } }
.index-overlay a {
  display: flex; align-items: baseline; gap: 16px; padding: 10px 0;
  border-bottom: 1px solid rgba(244, 236, 225, .14);
  text-decoration: none; break-inside: avoid;
  font-family: var(--f-display); font-size: clamp(1.6rem, 6vw, 2.6rem); line-height: 1.1; font-weight: 400;
}
.index-overlay a span { font-family: var(--f-mono); font-size: .8rem; color: var(--citrus); min-width: 2.2em; }
.index-overlay a:hover { color: var(--citrus); }
.index-overlay__close { position: absolute; top: 14px; right: var(--gutter); }

/* ---------- layout primitives ---------- */
main { padding-left: var(--rail); }
.chapter {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  padding: clamp(88px, 12vw, 168px) var(--gutter);
  overflow: clip;
  isolation: isolate;
}
.wrap { max-width: var(--maxw); margin: 0 auto; position: relative; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-5) clamp(16px, 2.4vw, 36px); }
.grid > * { grid-column: 1 / -1; min-width: 0; }

/* chapter header: oversized letter + title */
.ch-head { position: relative; margin-bottom: clamp(40px, 7vw, 96px); }
.ch-head__letter {
  position: absolute; z-index: -1;
  font-family: var(--f-display); font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-size: clamp(14rem, 44vw, 40rem); line-height: .7;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  top: -.08em;
  user-select: none; pointer-events: none;
}
.ch-head--right .ch-head__letter { right: -.05em; }
.ch-head--left .ch-head__letter { left: -.06em; }
.ch-head__kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.ch-head__kicker::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.ch-head h2 {
  font-family: var(--f-display); font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-size: var(--fs-h2); line-height: .92; letter-spacing: -.035em;
  max-width: 12ch;
}
.ch-head h2 em { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; color: var(--ruby); }
[data-surface="base"] .ch-head h2 em, [data-surface="stage"] .ch-head h2 em { color: var(--accent); }
.ch-head__lede { margin-top: var(--sp-5); max-width: 52ch; font-size: var(--fs-lead); line-height: 1.45; color: var(--muted); }
.ch-head--right { text-align: right; }
.ch-head--right h2, .ch-head--right .ch-head__lede { margin-left: auto; }
.ch-head--right .ch-head__kicker { justify-content: flex-end; }

h3.h3 {
  font-family: var(--f-display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.08; letter-spacing: -.02em;
  font-variation-settings: "opsz" 72, "SOFT" 30;
}
.label {
  font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.prose p + p { margin-top: 1em; }
.prose { max-width: 62ch; }
.muted { color: var(--muted); }

.todo {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em;
  border: 1px dashed var(--accent); color: var(--accent);
  white-space: nowrap;
}

/* buttons */
.btn {
  --b-bg: var(--fg); --b-fg: var(--bg);
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform .45s var(--ease-spring), background .3s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease-spring); }
.btn:hover svg { transform: translateY(3px); }
.btn--accent { --b-bg: var(--citrus); --b-fg: var(--ink); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .92rem; }
.link {
  text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  padding-bottom: 2px; transition: background-size .4s var(--ease-out);
}
.link:hover { background-size: 0 1.5px; background-position: 100% 100%; }

/* ---------- reveal motion ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="mask"] { opacity: 1; transform: none; }
.js [data-reveal="mask"] > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal="mask"].in > * { clip-path: inset(0 0 -10% 0); }
.split-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.split-line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.in .split-line > span, .split-line.in > span { transform: none; }
.no-js .split-line > span { transform: none; }

/* ==========================================================================
   A — HERO + CONCEPT
   ========================================================================== */
.hero { padding-top: clamp(96px, 14vw, 150px); padding-bottom: 0; min-height: 100svh; display: flex; flex-direction: column; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 14px;
}
.hero__meta b { color: var(--accent); font-weight: 500; }
.hero__stage { position: relative; flex: 1; display: grid; grid-template-columns: 1fr; align-items: end; margin-top: clamp(18px, 4vw, 40px); }
.hero h1 {
  position: relative; z-index: 2;
  font-family: var(--f-display); font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-size: var(--fs-hero); line-height: .82; letter-spacing: -.055em;
}
.hero h1 .l { display: block; }
.hero h1 .l2 { font-style: italic; font-weight: 400; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; padding-left: .55em; color: var(--accent); font-size: .62em; letter-spacing: -.035em; line-height: 1; }
.hero h1 .l3 { font-weight: 700; }
.hero h1 .l4 { font-size: .5em; letter-spacing: -.03em; font-weight: 400; padding-left: 1.4em; line-height: 1.05; }
.hero h1 .l4 b { font-weight: 800; color: var(--accent); font-variation-settings: "opsz" 144, "WONK" 1; }

.hero__glass {
  position: absolute; z-index: 1;
  right: -10vw; top: -6px;
  width: min(52vw, 560px);
  pointer-events: none;
  opacity: .92;
}
@media (max-width: 759px) {
  .hero__glass { position: relative; right: auto; top: auto; width: 68vw; max-width: 340px; margin: -4px -4vw 0 auto; }
  .badge-spin { display: none; }
  .hero__meta span:nth-of-type(3) { display: none; }
}
@media (min-width: 760px) { .hero__glass { right: 2vw; top: auto; bottom: 0; width: min(40vw, 560px, 58svh); } }
.hero__glass svg { width: 100%; height: auto; overflow: visible; }

.hero__foot {
  position: relative; z-index: 2;
  display: grid; gap: var(--sp-5);
  padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 40px);
}
@media (min-width: 760px) { .hero__foot { grid-template-columns: minmax(0, 32rem) auto; align-items: end; justify-content: space-between; } }
.hero__lede { font-size: var(--fs-lead); line-height: 1.4; max-width: 30ch; }
.hero__lede strong { font-weight: 600; color: var(--accent); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

.badge-spin { position: absolute; z-index: 3; width: clamp(104px, 13vw, 150px); aspect-ratio: 1; left: 56%; top: 4%; }
@media (max-width: 759px) { .badge-spin { left: auto; right: 4%; top: auto; bottom: 34%; } }
.badge-spin svg { width: 100%; height: 100%; animation: spin 24s linear infinite; }
.badge-spin text { font-family: var(--f-mono); font-size: 10.6px; letter-spacing: 2.4px; fill: var(--fg); text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

.marquee {
  position: relative; margin: 0 calc(var(--gutter) * -1);
  border-block: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  background: var(--citrus); color: var(--ink);
}
.marquee__track { display: inline-flex; gap: 0; animation: marquee 38s linear infinite; padding: 14px 0; }
.marquee span {
  display: inline-flex; align-items: center; gap: 22px; padding-right: 22px;
  font-family: var(--f-display); font-size: clamp(1.15rem, 2.2vw, 1.7rem); font-style: italic; font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1;
}
.marquee span::after { content: ""; width: 12px; height: 12px; background: var(--ruby-800); transform: rotate(45deg); border-radius: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* concept block */
.concept { padding-top: clamp(80px, 10vw, 150px); }
.positioning {
  font-family: var(--f-display); font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 50;
  font-size: clamp(1.75rem, 4.3vw, 3.7rem); line-height: 1.08; letter-spacing: -.025em;
  max-width: 22ch;
}
.positioning em { font-style: italic; color: var(--accent); font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 1; }
.positioning-note { margin-top: var(--sp-5); color: var(--muted); max-width: 46ch; }
@media (min-width: 900px) {
  .concept .positioning-wrap { grid-column: 1 / span 8; }
  .concept .diff { grid-column: 8 / -1; margin-top: clamp(40px, 8vw, 140px); }
}
.diff { counter-reset: d; border-top: 1px solid var(--line); }
.diff li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.diff li::before { counter-increment: d; content: "0" counter(d); font-family: var(--f-mono); font-size: .8rem; color: var(--accent); padding-top: 6px; }
.diff strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.3rem; line-height: 1.15; font-variation-settings: "opsz" 36; }
.diff span { color: var(--muted); font-size: .95rem; }

.claims { margin-top: clamp(64px, 9vw, 130px); display: grid; gap: 0; border: 1px solid var(--line); }
@media (min-width: 820px) { .claims { grid-template-columns: 1fr 1fr; } }
.claims__col { padding: clamp(24px, 4vw, 48px); position: relative; }
.claims__col--yes { background: var(--forest); color: var(--bone); --line: rgba(244, 236, 225, .22); }
.claims__col--no { background: var(--bone); color: var(--ink); --line: rgba(31, 10, 18, .16); }
.claims__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.claims__title h3 { font-family: var(--f-display); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.claims__stamp {
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  border: 1.5px solid currentColor; padding: 6px 10px; border-radius: 999px; transform: rotate(-4deg);
}
.claims ul { list-style: none; }
.claims li { padding: 14px 0; border-top: 1px solid var(--line); font-family: var(--f-display); font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.2; font-variation-settings: "opsz" 48; }
.claims li small { display: block; font-family: var(--f-text); font-size: .85rem; line-height: 1.45; margin-top: 4px; opacity: .8; }
.claims__col--yes li::before { content: "✓"; font-family: var(--f-text); margin-right: 12px; color: var(--mint); }
.strike { position: relative; display: inline-block; color: var(--ruby-600); }
.strike::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 55%; height: 3px; background: var(--ruby-600);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out); transition-delay: var(--d, .2s);
}
.in .strike::after, .no-js .strike::after { transform: scaleX(1); }
.name-line { margin-top: var(--sp-6); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; color: var(--muted); }
.name-line q { font-family: var(--f-display); font-style: italic; font-size: 1.4rem; color: var(--fg); quotes: "„" "“"; }

/* ==========================================================================
   B — INGREDIENTS
   ========================================================================== */
.wall-layout { display: grid; gap: clamp(24px, 3vw, 40px); }
@media (min-width: 1000px) { .wall-layout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); align-items: start; } }
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 620px) { .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  min-height: 190px; padding: 14px;
  border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: transparent; text-align: left;
  transition: background .35s;
}
.tile--big { grid-column: span 2; grid-row: span 2; min-height: 300px; }
.tile:hover { background: var(--chip); }
.tile[aria-pressed="true"] { background: var(--ruby-800); color: var(--bone); }
.tile__n { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.tile[aria-pressed="true"] .tile__n { color: var(--citrus); }
.tile__art { flex: 1; display: grid; place-items: center; padding: 6px; }
.tile__art svg { width: min(100%, 120px); height: auto; transition: transform .6s var(--ease-spring); }
.tile--big .tile__art svg { width: min(100%, 230px); }
.tile:hover .tile__art svg { transform: rotate(-6deg) scale(1.06); }
.tile__name { font-family: var(--f-display); font-weight: 500; font-size: 1.12rem; line-height: 1.1; font-variation-settings: "opsz" 36; }
.tile--big .tile__name { font-size: 1.7rem; }
.tile__qty { font-family: var(--f-mono); font-size: .8rem; color: var(--accent); }
.tile[aria-pressed="true"] .tile__qty { color: var(--citrus); }
.tile__tag { position: absolute; top: 12px; right: 12px; font-family: var(--f-mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--green); color: var(--bg); }

.ing-card {
  position: sticky; top: 90px;
  background: var(--ruby-800); color: var(--bone);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 10px 10px 0 var(--citrus);
  overflow: hidden;
}
.ing-card__art { position: absolute; right: -40px; top: -30px; width: 220px; opacity: .95; transform: rotate(8deg); }
.ing-card__art svg { width: 100%; height: auto; }
.ing-card__k { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--citrus); }
.ing-card h3 { position: relative; margin-top: 12px; max-width: 13ch; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.025em; font-variation-settings: "opsz" 96, "SOFT" 60; }
.ing-card dl { position: relative; margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid rgba(244, 236, 225, .25); }
.ing-card dl div { padding: 12px 0; border-bottom: 1px solid rgba(244, 236, 225, .25); }
.ing-card dt { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.ing-card dd { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; }
.ing-card__role { position: relative; margin-top: 20px; font-size: 1.05rem; }
.ing-card__note { position: relative; margin-top: 14px; font-size: .92rem; opacity: .88; padding-left: 14px; border-left: 2px solid var(--citrus); }
.ing-card.swap { animation: card-swap .6s var(--ease-out); }
@keyframes card-swap { from { opacity: 0; transform: translateY(14px); } }

.rejects { margin-top: clamp(64px, 9vw, 120px); }
.rejects__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.ledger { width: 100%; font-size: .95rem; }
.ledger th { text-align: left; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 10px 12px 10px 0; border-bottom: 1.5px solid var(--fg); }
.ledger td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger td:first-child { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.15; font-variation-settings: "opsz" 36; width: 28%; }
.stamp {
  display: inline-block; white-space: nowrap;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 9px; border: 1.5px solid currentColor; border-radius: 3px;
  transform: rotate(-3deg);
}
.stamp--out { color: var(--ruby); }
.stamp--opt { color: var(--green); }
.stamp--no { color: var(--accent); }
@media (max-width: 640px) {
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ledger td { border: 0; padding: 0; width: auto !important; }
  .ledger td:nth-child(3) { grid-column: 1 / -1; color: var(--muted); }
}

/* ==========================================================================
   C — FERMENTATION (scrollytelling)
   ========================================================================== */
.ferment { display: grid; gap: 32px; }
@media (min-width: 960px) { .ferment { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); } }
.ferment__sticky { position: sticky; top: 64px; z-index: 2; align-self: start; background: var(--bg); padding: 10px 0; }
@media (min-width: 960px) { .ferment__sticky { top: 12vh; padding: 0; background: none; } }
.jar-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; max-width: 560px; margin: 0 auto; }
.jar-stage svg.jar { width: 100%; max-height: 34vh; height: auto; }
@media (max-width: 959px) { .meter__illus { display: none; } .meter__box { padding: 8px 10px; min-width: 96px; } .ferment__sticky { border-bottom: 1px solid var(--line); } }
@media (min-width: 960px) { .jar-stage svg.jar { max-height: 70vh; } }
.meter {
  display: grid; gap: 10px; align-content: end;
  font-family: var(--f-mono);
}
.meter__box { background: var(--ruby-950); color: var(--bone); border: 1px solid var(--line); padding: 12px 14px; min-width: 120px; border-radius: 10px 10px 2px 2px; }
.meter__k { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.meter__v { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1; font-variant-numeric: tabular-nums; color: var(--mint); transition: color .4s; }
.meter__v.is-warn { color: var(--citrus); }
.meter__v.is-ok { color: var(--mint); }
.meter__s { font-size: .68rem; margin-top: 4px; opacity: .75; }
.meter__day { font-family: var(--f-display); font-size: 1.25rem; }
.meter__illus { font-size: .64rem; opacity: .6; max-width: 16ch; line-height: 1.35; }

.steps { position: relative; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; border-top: 1px solid var(--line); }
.step:last-child { min-height: 60vh; }
@media (max-width: 959px) { .step { min-height: 0; padding: 36px 0; } }
.step__day { font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.step h3 { margin: 10px 0 14px; font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: .98; letter-spacing: -.03em; font-variation-settings: "opsz" 144, "SOFT" 60; }
.step p { color: var(--muted); max-width: 46ch; }
.step p + p { margin-top: 10px; }
.step strong { color: var(--fg); font-weight: 600; }
.recipe-card { margin-top: 22px; display: grid; grid-template-columns: 1fr auto; border-top: 1.5px solid var(--fg); max-width: 460px; }
.recipe-card > * { padding: 10px 0; border-bottom: 1px solid var(--line); }
.recipe-card dd { font-family: var(--f-mono); color: var(--accent); text-align: right; }
.recipe-card small { color: var(--muted); }

.safety { margin-top: clamp(64px, 9vw, 130px); display: grid; gap: 0; border: 1px solid var(--line); }
@media (min-width: 860px) { .safety { grid-template-columns: 1fr 1fr 1.1fr; } }
.safety__cell { padding: clamp(20px, 3vw, 36px); border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .safety__cell { border-bottom: 0; border-right: 1px solid var(--line); } .safety__cell:last-child { border-right: 0; } }
.safety__cell svg { width: 100%; max-width: 260px; height: auto; margin: 0 auto 18px; }
.safety__verdict { display: inline-block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.safety__verdict--ok { background: var(--bone-2); color: var(--forest); }
.safety__verdict--bad { background: var(--citrus); color: var(--ink); }
.safety h3 { margin: 12px 0 8px; font-family: var(--f-display); font-size: 1.55rem; line-height: 1.1; font-weight: 500; }
.safety p { color: var(--muted); font-size: .95rem; }
.safety ul { list-style: none; display: grid; gap: 12px; }
.safety li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .95rem; }
.safety li::before { content: ""; width: 14px; height: 14px; margin-top: 5px; border: 1.5px solid var(--accent); border-radius: 50%; }

/* ==========================================================================
   Ç — CONCENTRATE + CALCULATOR
   ========================================================================== */
.conc-top { display: grid; gap: clamp(28px, 4vw, 60px); align-items: center; }
@media (min-width: 960px) { .conc-top { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); } }
.bowl-wrap { position: relative; }
.bowl-wrap svg { width: 100%; height: auto; max-width: 620px; margin: 0 auto; overflow: visible; }
.replay { position: absolute; left: 0; bottom: 0; }
.recipe { width: 100%; }
.recipe caption { text-align: left; padding-bottom: 12px; }
.recipe th, .recipe td { padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.recipe thead th { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; border-bottom: 1.5px solid var(--fg); }
.recipe td.q { font-family: var(--f-mono); text-align: right; white-space: nowrap; padding-left: 12px; }
.recipe td.q.b { color: var(--accent); }
.recipe tbody th { font-weight: 500; }
.recipe tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.recipe tfoot td, .recipe tfoot th { border-bottom: 0; padding-top: 14px; font-weight: 600; }

.calc {
  margin-top: clamp(56px, 8vw, 110px);
  display: grid; gap: 0;
  background: var(--paper); color: var(--paper-fg);
  --line: rgba(31, 10, 18, .16); --muted: #5B444B; --accent: var(--citrus-ink); --fg: var(--ink); --bg: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 14px 14px 0 var(--ruby-600);
}
@media (min-width: 960px) { .calc { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); } }
.calc__in { padding: clamp(22px, 3.5vw, 44px); border-bottom: 1.5px solid var(--ink); }
@media (min-width: 960px) { .calc__in { border-bottom: 0; border-right: 1.5px solid var(--ink); } }
.calc__out { padding: clamp(22px, 3.5vw, 44px); }
.calc h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; letter-spacing: -.02em; }
.stepper { display: flex; align-items: stretch; margin-top: 22px; border: 1.5px solid var(--ink); width: max-content; max-width: 100%; }
.stepper button { width: 56px; border: 0; background: var(--ink); color: var(--bone); font-size: 1.5rem; }
.stepper button:hover { background: var(--ruby-600); }
.stepper input {
  width: 4.2ch; min-width: 0; border: 0; background: transparent; text-align: center;
  font-family: var(--f-display); font-weight: 600; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1.1;
  font-variant-numeric: tabular-nums; padding: 0 6px;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill {
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: inherit;
  font-family: var(--f-mono); font-size: .82rem;
  transition: background .2s, border-color .2s;
}
.pill:hover { border-color: currentColor; }
.pill[aria-pressed="true"], .pill.is-on { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--ink); border-radius: 24px; padding: 3px; gap: 2px; margin-top: 10px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; font-size: .9rem; font-weight: 500; transition: background .2s, color .2s; }
.seg input:checked + span { background: var(--ruby-600); color: var(--bone); }
.seg input:focus-visible + span { outline: 3px solid var(--citrus); outline-offset: 2px; }
.calc__field { margin-top: 26px; }
.calc__note { margin-top: 14px; font-size: .86rem; color: var(--muted); }
.calc__sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); margin-bottom: 18px; }
.calc__sum div { padding: 14px 10px 14px 0; border-bottom: 1px solid var(--line); }
.calc__sum b { display: block; font-family: var(--f-display); font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ruby-600); }
.calc__sum span { font-size: .8rem; color: var(--muted); }
.calc__extra { margin-top: 20px; display: grid; gap: 10px; font-size: .92rem; }
.calc__extra p { padding: 12px 14px; background: var(--bone-2); border-left: 3px solid var(--ruby-600); }
.flash { animation: flash .5s ease; }
@keyframes flash { 0% { color: var(--citrus-ink); } 100% { } }

.mix-steps { margin-top: clamp(40px, 6vw, 72px); display: grid; gap: 0; counter-reset: m; }
@media (min-width: 760px) { .mix-steps { grid-template-columns: repeat(3, 1fr); } }
.mix-steps li { list-style: none; padding: 18px 18px 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2.4rem 1fr; gap: 6px; font-size: .95rem; }
.mix-steps li::before { counter-increment: m; content: counter(m); font-family: var(--f-display); font-size: 1.8rem; line-height: 1; color: var(--ruby); font-weight: 600; }

/* ==========================================================================
   D — FREEZING
   ========================================================================== */
.freeze-top { display: grid; gap: clamp(28px, 4vw, 60px); }
@media (min-width: 960px) { .freeze-top { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: end; } }
.tray svg { width: 100%; height: auto; }
.flow { position: relative; margin-top: clamp(48px, 7vw, 96px); }
.flow__svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
@media (min-width: 900px) { .flow__svg { display: block; } }
.flow ol { list-style: none; display: grid; gap: 14px; position: relative; }
@media (min-width: 900px) { .flow ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; } }
.flow li { position: relative; padding: 18px; border: 1px solid var(--line); background: var(--bg); }
@media (min-width: 900px) { .flow li:nth-child(even) { margin-top: 90px; } }
.flow__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; }
.flow h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.3rem; line-height: 1.1; margin-bottom: 6px; }
.flow p { font-size: .9rem; color: var(--muted); }
.flow .big { font-family: var(--f-mono); color: var(--accent); font-size: 1.05rem; display: block; margin-bottom: 6px; }

.honest {
  margin-top: clamp(64px, 9vw, 130px);
  display: grid; gap: 24px; align-items: center;
  border-top: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg);
  padding: clamp(28px, 4vw, 48px) 0;
}
@media (min-width: 860px) { .honest { grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 80px); } }
.honest__num { font-family: var(--f-display); font-weight: 800; font-size: clamp(9rem, 26vw, 22rem); line-height: .75; letter-spacing: -.06em; color: var(--accent); font-variation-settings: "opsz" 144, "WONK" 1, "SOFT" 0; }
.honest__num small { font-size: .16em; letter-spacing: 0; font-weight: 500; color: var(--fg); margin-left: .2em; vertical-align: top; }
.honest h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: 1.05; letter-spacing: -.02em; max-width: 20ch; }
.honest p { color: var(--muted); margin-top: 14px; max-width: 52ch; }
.honest .warn { margin-top: 18px; display: inline-block; font-weight: 600; color: var(--fg); background: var(--chip); padding: 10px 14px; border-left: 3px solid var(--accent); }

.freeze-facts { margin-top: clamp(48px, 7vw, 90px); display: grid; gap: 0; }
@media (min-width: 760px) { .freeze-facts { grid-template-columns: 1.3fr 1fr 1fr; } }
.freeze-facts > div { padding: 22px 22px 22px 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .freeze-facts > div + div { padding-left: 22px; border-left: 1px solid var(--line); } }
.freeze-facts h3 { font-family: var(--f-display); font-size: 1.3rem; font-weight: 500; line-height: 1.15; margin: 8px 0 6px; }
.freeze-facts p { color: var(--muted); font-size: .94rem; }

/* ==========================================================================
   Dh — TASTE & SERVING
   ========================================================================== */
.taste-grid { display: grid; gap: clamp(32px, 5vw, 72px); }
@media (min-width: 960px) { .taste-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; } }
.dilute svg { width: 100%; height: auto; }
.dilute__eq { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 18px; font-family: var(--f-display); font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.1; }
.dilute__eq b { font-weight: 700; }
.dilute__eq i { font-style: normal; color: var(--muted); font-family: var(--f-mono); font-size: .6em; }
.dilute__eq .eq-total { color: var(--ruby); }
.dilute__ctl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.dilute .seg { border-color: var(--fg); }

.compare {
  position: relative; aspect-ratio: 4 / 5; max-width: 520px; width: 100%;
  overflow: hidden; touch-action: pan-y; user-select: none;
  border: 1.5px solid var(--fg);
  --pos: 50%;
}
.compare__side { position: absolute; inset: 0; display: grid; place-items: center; }
.compare__side svg { width: 78%; height: auto; }
.compare__side--strong { background: var(--ruby-950); color: var(--bone); }
.compare__side--mild { background: #F6D9DF; color: var(--ink); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__tag { position: absolute; top: 14px; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.compare__side--mild .compare__tag { left: 14px; background: var(--ink); color: var(--bone); }
.compare__side--strong .compare__tag { right: 14px; background: var(--citrus); color: var(--ink); }
.compare__facts { position: absolute; bottom: 14px; font-size: .82rem; line-height: 1.35; max-width: 44%; }
.compare__side--mild .compare__facts { left: 14px; }
.compare__side--strong .compare__facts { right: 14px; text-align: right; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--citrus);
  pointer-events: none;
}
.compare__handle::after {
  content: "↔"; position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--citrus); color: var(--ink); font-size: 1.3rem; font-weight: 700;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .5);
}
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare:has(input:focus-visible) { outline: 3px solid var(--citrus); outline-offset: 4px; }
.compare__cap { margin-top: 12px; font-size: .88rem; color: var(--muted); max-width: 520px; }

.serve { margin-top: clamp(56px, 8vw, 110px); display: grid; gap: 28px; }
@media (min-width: 900px) { .serve { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); } }
.serve ol { list-style: none; position: relative; counter-reset: s; }
.serve li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 0 0 26px; }
.serve li::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--fg); font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; background: var(--bg); position: relative; z-index: 1;
}
.serve li::after { content: ""; position: absolute; left: 24px; top: 48px; bottom: 0; width: 1.5px; background: var(--line); }
.serve li:last-child::after { display: none; }
.serve li p { padding-top: 10px; font-size: 1.08rem; }
.serve li b { color: var(--ruby); }

/* ==========================================================================
   E — QUALITY CONTROL
   ========================================================================== */
.qc { display: grid; gap: clamp(28px, 4vw, 56px); }
@media (min-width: 1040px) { .qc { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); align-items: start; } }
.logsheet {
  position: relative;
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(142, 27, 69, .14) 31px 32px),
    var(--bone);
  color: var(--ink);
  padding: clamp(22px, 3.5vw, 44px);
  padding-left: clamp(36px, 5vw, 68px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 12px 12px 0 rgba(0, 0, 0, .28);
  --line: rgba(31, 10, 18, .2); --muted: #5B444B; --fg: var(--ink); --accent: var(--citrus-ink);
}
.logsheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(20px, 3vw, 44px); width: 1.5px; background: rgba(255, 122, 26, .7); }
.logsheet__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 18px; }
.logsheet__head h3 { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -.02em; }
.fields { display: grid; gap: 14px 18px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .fields { grid-template-columns: 1fr 1fr; } }
.fields .full { grid-column: 1 / -1; }
.field { display: grid; gap: 4px; }
.field label, .field legend { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 8px 2px; border: 0; border-bottom: 1.5px solid var(--ink);
  background: transparent; font-family: var(--f-mono); font-size: 1rem; color: var(--ink); border-radius: 0;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ruby-600); box-shadow: 0 2px 0 var(--ruby-600); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--citrus); outline-offset: 2px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 18px; }
.score { display: grid; gap: 4px; }
.score span { font-size: .85rem; }
.score output { font-family: var(--f-mono); color: var(--ruby-600); font-weight: 500; }
input[type="range"].rng { width: 100%; accent-color: var(--ruby-600); min-height: 28px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.checkline input { width: 22px; height: 22px; accent-color: var(--ruby-600); margin-top: 2px; flex: none; }
.log-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.log-actions .btn { --b-bg: var(--ink); --b-fg: var(--bone); }
.log-actions .btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); background: transparent; }

.gauge-card { position: sticky; top: 90px; display: grid; gap: 18px; }
.gauge { background: var(--ruby-950); color: var(--bone); padding: 24px; border: 1px solid var(--line); }
.gauge svg { width: 100%; height: auto; }
.gauge__status { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.gauge__light { width: 16px; height: 16px; border-radius: 50%; background: #6b5a60; box-shadow: 0 0 0 4px rgba(255,255,255,.06); flex: none; transition: background .3s, box-shadow .3s; }
.gauge__light.is-pass { background: var(--mint); box-shadow: 0 0 0 4px rgba(147, 201, 160, .2), 0 0 18px var(--mint); }
.gauge__light.is-fail { background: var(--citrus); box-shadow: 0 0 0 4px rgba(255, 122, 26, .2), 0 0 18px var(--citrus); }
.gauge__txt { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.1; }
.gauge__why { font-size: .88rem; opacity: .8; margin-top: 4px; }
.rule { padding: 18px; border: 1.5px dashed var(--accent); font-size: .95rem; }
.rule b { color: var(--accent); }
.log-table-wrap { margin-top: 28px; overflow-x: auto; }
.log-table { width: 100%; font-family: var(--f-mono); font-size: .8rem; min-width: 520px; }
.log-table th, .log-table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.log-table th { font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
.res-pass { color: var(--green); }
.res-fail { color: var(--accent); font-weight: 500; }

/* ==========================================================================
   Ë — PACKAGING (stage)
   ========================================================================== */
.pack-hero { display: grid; gap: clamp(20px, 3vw, 40px); align-items: end; }
@media (min-width: 980px) { .pack-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); } }
.pack-render { position: relative; }
.pack-render::before {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: 4%; height: 60%;
  background: radial-gradient(closest-side, rgba(194, 58, 107, .45), transparent);
  filter: blur(20px); z-index: -1;
}
.pack-render svg { width: 100%; height: auto; }
.pack-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.pack-ctl .pill { border-color: var(--line); }
.pack-ctl .pill[aria-pressed="true"] { background: var(--citrus); color: var(--ink); border-color: var(--citrus); }
.pack-notes dl { display: grid; gap: 0; }
.pack-notes dt { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding-top: 16px; border-top: 1px solid var(--line); }
.pack-notes dd { padding: 6px 0 16px; color: var(--muted); font-size: .95rem; }
.pack-notes dd b { color: var(--fg); font-weight: 600; }

.pack-row { margin-top: clamp(56px, 8vw, 110px); display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .pack-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pack-item { padding: 26px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .pack-item { padding: 26px; border-bottom: 0; border-right: 1px solid var(--line); } .pack-item:first-child { padding-left: 0; } .pack-item:last-child { border-right: 0; padding-right: 0; } }
.pack-item svg { width: 100%; height: 220px; }
.pack-item h3 { margin-top: 14px; font-family: var(--f-display); font-size: 1.45rem; font-weight: 500; line-height: 1.1; }
.pack-item p { margin-top: 6px; color: var(--muted); font-size: .93rem; }

.anatomy { margin-top: clamp(64px, 9vw, 130px); display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 980px) { .anatomy { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.anatomy__label { position: relative; }
.anatomy__label svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.hotspot {
  position: absolute; translate: -50% -50%;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--citrus); color: var(--ink);
  font-family: var(--f-mono); font-weight: 500; font-size: .8rem;
  box-shadow: 0 0 0 0 rgba(255, 122, 26, .6);
  animation: ping 2.4s infinite;
}
.hotspot[aria-expanded="true"] { background: var(--bone); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .55); } 70% { box-shadow: 0 0 0 14px rgba(255, 122, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0); } }
.anatomy__detail { min-height: 220px; }
.anatomy__detail .k { font-family: var(--f-mono); color: var(--accent); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.anatomy__detail h3 { font-family: var(--f-display); font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 400; line-height: 1.02; margin: 10px 0 12px; letter-spacing: -.02em; }
.anatomy__detail p { color: var(--muted); }
.anatomy__list { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.anatomy__list button { min-height: 36px; font-size: .78rem; }
.anatomy__list .pill { border-color: var(--line); }
.anatomy__list .pill[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }

.coldchain { margin-top: clamp(56px, 8vw, 110px); display: grid; gap: 24px; }
@media (min-width: 900px) { .coldchain { grid-template-columns: repeat(12, 1fr); } }
.coldchain__card { padding: 24px; border: 1px solid var(--line); background: var(--bg-2); }
@media (min-width: 900px) {
  .coldchain__card:nth-child(1) { grid-column: 1 / span 5; }
  .coldchain__card:nth-child(2) { grid-column: 6 / span 4; margin-top: 60px; }
  .coldchain__card:nth-child(3) { grid-column: 10 / span 3; margin-top: 120px; }
}
.coldchain__card h3 { font-family: var(--f-display); font-size: 1.4rem; font-weight: 500; line-height: 1.12; margin: 8px 0 8px; }
.coldchain__card p { color: var(--muted); font-size: .93rem; }

/* ==========================================================================
   F — LABEL & LEGAL
   ========================================================================== */
.legal { display: grid; gap: clamp(40px, 6vw, 90px); }
@media (min-width: 1000px) { .legal { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.specimen {
  background: #EFD9D5; color: var(--ruby-800);
  background-image:
    radial-gradient(rgba(142, 27, 69, .18) 1px, transparent 1.4px),
    radial-gradient(rgba(91, 15, 46, .12) .8px, transparent 1.2px);
  background-size: 7px 9px, 13px 11px;
  background-position: 0 0, 3px 5px;
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 0 0 1px rgba(91,15,46,.25), 10px 12px 0 rgba(0,0,0,.25);
  transform: rotate(-1.2deg);
  --line: rgba(91, 15, 46, .25);
}
.specimen__head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid currentColor; padding-bottom: 10px; margin-bottom: 8px; }
.specimen__head b { font-family: var(--f-display); font-size: 2rem; font-weight: 700; letter-spacing: -.03em; font-variation-settings: "opsz" 144, "WONK" 1, "SOFT" 100; }
.specimen__head span { font-family: var(--f-mono); font-size: .75rem; }
.checklist { list-style: none; }
.checklist li { border-bottom: 1px solid var(--line); }
.checklist label { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 12px 0; cursor: pointer; font-size: .95rem; line-height: 1.4; }
.checklist input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid currentColor; border-radius: 4px; display: grid; place-items: center; cursor: pointer; }
.checklist input::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .25s var(--ease-spring); }
.checklist input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.checklist input:checked + span { text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: .65; }
.checklist small { display: block; opacity: .75; font-size: .84rem; margin-top: 2px; }
.checklist__count { font-family: var(--f-mono); font-size: .8rem; }

.roadmap { position: relative; list-style: none; counter-reset: r; }
.roadmap::before { content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent), var(--ruby)); transform-origin: top; transform: scaleY(var(--road, 0)); transition: transform 1.6s var(--ease-out); }
.roadmap.in::before { --road: 1; }
.no-js .roadmap::before { --road: 1; }
.roadmap li { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 0 0 26px; }
.roadmap li::before {
  counter-increment: r; content: counter(r);
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; color: var(--accent);
  position: relative; z-index: 1;
}
.roadmap h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.3rem; line-height: 1.15; padding-top: 6px; }
.roadmap p { color: var(--muted); font-size: .93rem; margin-top: 4px; }
.roadmap .tag { display: inline-block; margin-top: 6px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--chip); }

/* ==========================================================================
   G — EQUIPMENT
   ========================================================================== */
.equip-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 24px; }
.equip-count { font-family: var(--f-display); font-size: clamp(3rem, 8vw, 6rem); line-height: .9; font-weight: 600; letter-spacing: -.04em; color: var(--ruby); font-variant-numeric: tabular-nums; }
.equip-count small { font-size: .3em; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.equip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--fg); }
@media (min-width: 700px) { .equip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .equip { grid-template-columns: repeat(10, minmax(0, 1fr)); } .equip li { grid-column: span 2; } .equip li:nth-child(1), .equip li:nth-child(3) { grid-column: span 3; } }
.equip li { list-style: none; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.equip label { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 16px; cursor: pointer; transition: background .3s; }
.equip label:hover { background: var(--chip); }
.equip svg { width: 100%; max-width: 150px; height: 110px; margin: 0 auto; color: var(--fg); }
.equip .e-fill { fill: var(--ruby); opacity: .9; transition: fill .3s; }
.equip input { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; accent-color: var(--ruby-600); }
.equip b { font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; line-height: 1.15; display: block; }
.equip span { font-size: .82rem; color: var(--muted); }
.equip input:checked ~ svg .e-fill { fill: var(--green); }
.equip input:checked ~ b { text-decoration: line-through; text-decoration-color: var(--ruby); text-decoration-thickness: 2px; }

/* ==========================================================================
   Gj — COST
   ========================================================================== */
.cost { display: grid; gap: 0; border: 1.5px solid var(--fg); }
@media (min-width: 1040px) { .cost { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.cost__in { padding: clamp(18px, 3vw, 36px); }
.cost__out { padding: clamp(18px, 3vw, 36px); background: var(--ruby-950); color: var(--bone); --line: rgba(244,236,225,.18); --muted: rgba(244,236,225,.74); --fg: var(--bone); }
@media (min-width: 1040px) { .cost__in { border-right: 1.5px solid var(--fg); } }
.cost-table { width: 100%; font-size: .92rem; }
.cost-table th { text-align: left; font-family: var(--f-mono); font-weight: 400; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1.5px solid var(--fg); }
.cost-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cost-table td:first-child { width: 42%; }
.cost-table td:first-child small { display: block; color: var(--muted); font-size: .78rem; }
.cost-table .qty { font-family: var(--f-mono); font-size: .82rem; white-space: nowrap; }
.cost-table .sum { font-family: var(--f-mono); text-align: right; white-space: nowrap; }
.money { display: flex; align-items: center; border-bottom: 1.5px solid var(--fg); min-width: 92px; }
.money input { width: 100%; min-width: 0; min-height: 40px; border: 0; background: transparent; font-family: var(--f-mono); font-size: .95rem; padding: 4px 2px; }
.money input::placeholder { color: var(--muted); opacity: .8; }
.money span { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); padding-left: 4px; white-space: nowrap; }
.cost-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 22px; }
.cost-params label { display: grid; gap: 4px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cost-big { font-family: var(--f-display); font-weight: 600; font-size: clamp(3.4rem, 9vw, 6.5rem); line-height: .9; letter-spacing: -.045em; color: var(--citrus); font-variant-numeric: tabular-nums; }
.cost-big small { font-size: .28em; letter-spacing: 0; color: var(--bone); font-weight: 400; }
.cost-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 18px; border-top: 1.5px solid var(--bone); }
.cost-kpis div { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); }
.cost-kpis b { display: block; font-family: var(--f-display); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cost-kpis span { font-size: .78rem; color: var(--muted); }
.chart { margin-top: 22px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--f-mono); font-size: 11px; fill: var(--bone); }
.cost-empty { margin-top: 18px; padding: 14px; border: 1.5px dashed var(--citrus); font-size: .9rem; }
.formula { margin-top: 18px; font-family: var(--f-mono); font-size: .8rem; padding: 12px; background: rgba(244,236,225,.07); line-height: 1.5; }

/* ==========================================================================
   H — 90-DAY PLAN (horizontal)
   ========================================================================== */
.plan-outer { position: relative; }
.js .plan-outer.is-pinned { height: var(--plan-h, 300vh); }
.plan-sticky { position: relative; }
.js .plan-outer.is-pinned .plan-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.plan-track {
  display: flex; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 0 24px;
  scrollbar-width: thin;
}
.plan-outer.is-pinned .plan-track { overflow: visible; will-change: transform; padding-bottom: 0; }
.plan-card {
  scroll-snap-align: start; flex: 0 0 min(84vw, 420px);
  position: relative; padding: 24px; padding-top: 74px;
  border: 1px solid var(--line); background: var(--bg-2);
}
.plan-card:nth-child(odd) { margin-top: 0; }
@media (min-width: 900px) { .plan-card:nth-child(even) { margin-top: 70px; } }
.plan-card__days { position: absolute; top: 18px; left: 24px; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .1em; color: var(--accent); }
.plan-card__big { position: absolute; top: 4px; right: 18px; font-family: var(--f-display); font-weight: 800; font-size: 4.4rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--line); }
.plan-card h3 { font-family: var(--f-display); font-size: 1.8rem; font-weight: 500; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 14px; }
.plan-card ul { list-style: none; display: grid; gap: 8px; }
.plan-card li { padding-left: 18px; position: relative; color: var(--muted); font-size: .94rem; }
.plan-card li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--accent); }
.plan-bar { position: relative; height: 4px; background: var(--line); margin: 6px 0 22px; }
.plan-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--pp, 0%); background: var(--accent); }
.plan-bar span { position: absolute; top: 10px; font-family: var(--f-mono); font-size: .68rem; color: var(--muted); translate: -50% 0; }
.plan-hint { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* ==========================================================================
   I — RISK MATRIX
   ========================================================================== */
.risk { display: grid; gap: clamp(28px, 4vw, 56px); }
@media (min-width: 1040px) { .risk { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; } }
.heat { position: relative; display: grid; grid-template-columns: 32px repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(96px, 1fr)) 32px; gap: 4px; }
@media (min-width: 1040px) { .heat { position: sticky; top: 100px; } }
.heat__cell { position: relative; padding: 8px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.heat__cell[data-s="1"] { background: #E5D5BE; }
.heat__cell[data-s="2"] { background: #F0B99A; }
.heat__cell[data-s="3"] { background: #F59665; }
.heat__cell[data-s="4"] { background: #D9546F; }
.heat__cell[data-s="6"] { background: #A8264F; }
.heat__cell[data-s="9"] { background: #6E0E33; }
.heat__dot {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--bone); font-family: var(--f-mono); font-size: .8rem; font-weight: 500;
  box-shadow: 0 0 0 2px var(--bone);
  animation: pop .45s var(--ease-spring);
}
@keyframes pop { from { transform: scale(0); } }
.heat__axis { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: grid; place-items: center; }
.heat__axis--y { writing-mode: vertical-rl; transform: rotate(180deg); }
.heat__legend { display: flex; justify-content: space-between; grid-column: 2 / -1; font-family: var(--f-mono); font-size: .68rem; color: var(--muted); align-items: center; }
.risks { list-style: none; counter-reset: rk; border-top: 1.5px solid var(--fg); }
.risks li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; }
.risks li::before { counter-increment: rk; content: counter(rk); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bone); font-family: var(--f-mono); font-size: .8rem; }
:root[data-theme="light"] [data-surface="contrast"] .risks li::before { background: var(--bone); color: var(--ink); }
.risks h3 { font-family: var(--f-display); font-size: 1.3rem; font-weight: 500; line-height: 1.15; }
.risks p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.rate { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }
.rate fieldset { border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.rate legend { float: left; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.rate label { position: relative; }
.rate input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rate span { display: grid; place-items: center; min-width: 36px; height: 32px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 999px; font-family: var(--f-mono); font-size: .72rem; }
.rate input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.rate input:focus-visible + span { outline: 3px solid var(--citrus); outline-offset: 2px; }

/* ==========================================================================
   J — MARKETING
   ========================================================================== */
.voice { display: grid; gap: clamp(28px, 4vw, 60px); }
@media (min-width: 980px) { .voice { grid-template-columns: repeat(12, 1fr); } .voice__rules { grid-column: 1 / span 4; } .voice__lines { grid-column: 6 / -1; } }
.voice__rules ul { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.voice__rules li { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.voice__rules li b { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 400; white-space: nowrap; }
.taglines { list-style: none; counter-reset: t; }
.taglines li { position: relative; padding: 22px 0 22px 0; border-bottom: 1px solid var(--line); }
.taglines q { display: block; font-family: var(--f-display); font-weight: 300; font-size: clamp(1.6rem, 3.6vw, 3rem); line-height: 1.04; letter-spacing: -.025em; quotes: "„" "“"; font-variation-settings: "opsz" 144, "SOFT" 60; transition: color .3s; }
.taglines li:hover q { color: var(--accent); }
.taglines .copy { position: absolute; right: 0; top: 18px; opacity: 0; transition: opacity .2s; }
.taglines li:hover .copy, .taglines .copy:focus-visible { opacity: 1; }
@media (hover: none) { .taglines .copy { opacity: 1; position: static; margin-top: 10px; } }

.story { margin-top: clamp(64px, 9vw, 130px); display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 980px) { .story { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.postcard {
  position: relative; aspect-ratio: 3 / 2; max-width: 620px; width: 100%;
  background: #EFD9D5;
  background-image:
    radial-gradient(rgba(142, 27, 69, .2) 1px, transparent 1.5px),
    radial-gradient(rgba(91, 15, 46, .14) .8px, transparent 1.2px),
    linear-gradient(105deg, rgba(255,255,255,.25), transparent 40%);
  background-size: 7px 9px, 13px 11px, 100% 100%;
  color: var(--ruby-800);
  padding: clamp(18px, 3vw, 30px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55);
  transform: rotate(2deg);
  transition: transform .6s var(--ease-spring);
}
.postcard:hover { transform: rotate(0) scale(1.01); }
.postcard__l { border-right: 1px solid rgba(91, 15, 46, .35); padding-right: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.postcard__l p { font-family: var(--f-display); font-style: italic; font-size: clamp(1.05rem, 2.2vw, 1.6rem); line-height: 1.12; font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1; }
.postcard__l small { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.postcard__r { display: flex; flex-direction: column; gap: 8px; font-family: var(--f-mono); font-size: clamp(.66rem, 1.4vw, .8rem); }
.postcard__r div { border-bottom: 1px solid rgba(91, 15, 46, .35); padding-bottom: 4px; display: flex; justify-content: space-between; gap: 8px; }
.postcard__r span { opacity: .7; }
.postcard__r b { font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postcard__stamp { position: absolute; top: 14px; right: 14px; width: 54px; height: 64px; border: 2px dashed rgba(91,15,46,.5); display: grid; place-items: center; }
.postcard__stamp svg { width: 36px; }
.story__form { display: grid; gap: 14px 18px; grid-template-columns: 1fr 1fr; }
.story__form .field input { color: var(--fg); border-bottom-color: var(--fg); }
.story__form .field label { color: var(--muted); }

/* ==========================================================================
   K — LAUNCH CHECKLIST
   ========================================================================== */
.launch { display: grid; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (min-width: 960px) { .launch { grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); } }
.ring-wrap { position: sticky; top: 100px; display: grid; justify-items: start; gap: 14px; }
.ring { width: min(100%, 300px); height: auto; }
.ring__bg { stroke: var(--line); }
.ring__fg { stroke: var(--ruby); transition: stroke-dashoffset 1s var(--ease-out); }
.ring__txt { font-family: var(--f-display); font-weight: 600; font-size: 56px; fill: var(--fg); letter-spacing: -2px; }
.ring__sub { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; }
.launch-list { list-style: none; border-top: 1.5px solid var(--fg); counter-reset: l; }
.launch-list li { border-bottom: 1px solid var(--line); }
.launch-list label { display: grid; grid-template-columns: 42px 1fr 30px; align-items: center; gap: 14px; padding: 16px 0; cursor: pointer; }
.launch-list label::before { counter-increment: l; content: counter(l, decimal-leading-zero); font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.launch-list span { font-family: var(--f-display); font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.15; font-variation-settings: "opsz" 48; transition: opacity .3s; }
.launch-list input { appearance: none; -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--fg); margin: 0; display: grid; place-items: center; cursor: pointer; transition: background .25s; grid-column: 3; grid-row: 1; }
.launch-list input::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid var(--bg); border-bottom: 2.5px solid var(--bg); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .3s var(--ease-spring); }
.launch-list input:checked { background: var(--ruby); border-color: var(--ruby); }
.launch-list input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.launch-list label:has(input:checked) span { opacity: .5; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.launch-list span { grid-column: 2; grid-row: 1; }
.launch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ==========================================================================
   L — NEXT STEPS / SEASONS
   ========================================================================== */
.seasons { position: relative; }
.seasons__track { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.seasons__track::-webkit-scrollbar { display: none; }
.season {
  flex: 0 0 100%; scroll-snap-align: start;
  display: grid; gap: 24px; align-items: center;
  padding: clamp(24px, 4vw, 56px);
  min-height: 460px;
  color: var(--bone);
}
@media (min-width: 860px) { .season { grid-template-columns: 1fr 1fr; flex-basis: 88%; } }
.season--autumn { background: #3B0E2A; }
.season--summer { background: #8F1D2C; }
.season--winter { background: #4A2A1C; }
.season__k { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--citrus); }
.season h3 { font-family: var(--f-display); font-weight: 300; font-size: clamp(2.6rem, 6.5vw, 5.4rem); line-height: .92; letter-spacing: -.04em; margin: 12px 0 16px; font-variation-settings: "opsz" 144, "SOFT" 80; }
.season h3 em { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.season p { opacity: .85; max-width: 38ch; }
.season svg { width: 100%; max-width: 380px; height: auto; margin: 0 auto; }
.seasons__ctl { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.seasons__ctl .iconbtn { background: transparent; color: var(--fg); border-color: var(--line); }
.seasons__ctl .iconbtn:hover { background: var(--fg); color: var(--bg); }
.seasons__dots { display: flex; gap: 8px; margin-left: 8px; }
.seasons__dots button { width: 34px; height: 34px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; }
.seasons__dots button::after { content: ""; width: 26px; height: 4px; background: var(--line); transition: background .3s, width .3s; }
.seasons__dots button[aria-current="true"]::after { background: var(--accent); width: 34px; }
.after { margin-top: clamp(48px, 7vw, 90px); display: grid; gap: 0; }
@media (min-width: 820px) { .after { grid-template-columns: repeat(3, 1fr); } }
.after > div { padding: 20px 20px 20px 0; border-top: 1px solid var(--line); }
@media (min-width: 820px) { .after > div + div { padding-left: 20px; border-left: 1px solid var(--line); } }
.after h3 { font-family: var(--f-display); font-size: 1.3rem; font-weight: 500; margin: 6px 0; }
.after p { color: var(--muted); font-size: .93rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { padding-bottom: 110px; }
@media (min-width: 1024px) { .footer { padding-bottom: 60px; } }
.footer__big {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(5rem, 22vw, 20rem); line-height: .78; letter-spacing: -.06em;
  color: var(--ruby-800); font-variation-settings: "opsz" 144, "WONK" 1, "SOFT" 100;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.footer__big span { color: var(--citrus); }
.disclaimer { display: grid; gap: 24px; border-top: 1px solid var(--line); padding-top: 28px; }
@media (min-width: 900px) { .disclaimer { grid-template-columns: 1.4fr 1fr; } }
.disclaimer p { font-size: 1.05rem; max-width: 60ch; }
.disclaimer p strong { color: var(--citrus); font-weight: 600; }
.disclaimer small { color: var(--muted); font-size: .85rem; display: block; }
.footer__meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); letter-spacing: .06em; }

/* ---------- image slot containers (drop real photos later) ---------- */
.img-slot { overflow: hidden; }
.img-slot:not(.hero__glass) { position: relative; }
.hero__glass.img-slot { overflow: visible; }
.img-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-slot:has(> img) > svg { visibility: hidden; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 160; translate: -50% 20px;
  background: var(--bone); color: var(--ink); padding: 12px 18px; border-radius: 999px;
  font-size: .9rem; font-weight: 500; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .3s, translate .4s var(--ease-out);
}
.toast.is-on { opacity: 1; translate: -50% 0; }
@media (min-width: 1024px) { .toast { bottom: 30px; } }

/* ---------- SVG animation primitives ---------- */
.bubble { animation: rise var(--t, 4s) linear infinite; animation-delay: var(--dl, 0s); transform-box: fill-box; }
@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .9; }
  60% { transform: translateY(calc(var(--h, 300px) * -.6)) translateX(4px); }
  100% { transform: translateY(calc(var(--h, 300px) * -1)) translateX(-3px); opacity: 0; }
}
.wave { animation: wave 6s linear infinite; }
.wave--b { animation-duration: 9s; animation-direction: reverse; opacity: .55; }
@keyframes wave { to { transform: translateX(-200px); } }
.bob { animation: bob 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bob--2 { animation-duration: 6.5s; animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(6deg); } }
.sway { animation: sway 7s ease-in-out infinite; transform-box: fill-box; transform-origin: 20% 100%; }
@keyframes sway { 50% { transform: rotate(-7deg); } }
.paused * { animation-play-state: paused !important; }

[data-draw] { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); transition: stroke-dashoffset 2s var(--ease-out); transition-delay: var(--d, 0s); }
.in [data-draw], [data-draw].in { stroke-dashoffset: 0; }
.no-js [data-draw] { stroke-dashoffset: 0; }

.drop { opacity: 0; }
.bowl.play .drop { animation: drop 1s var(--ease-out) forwards; animation-delay: var(--dl); }
@keyframes drop {
  0% { opacity: 0; transform: translateY(-220px) rotate(-20deg); }
  15% { opacity: 1; }
  80% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(30px) scale(.7); }
}
.bowl .bowl-liquid { transform: translateY(70px); transition: transform 4.6s var(--ease-out) .4s, fill 4s ease .4s; transform-box: view-box; }
.bowl.play .bowl-liquid { transform: none; }
.bowl.play .bowl-liquid-fill { fill: #7A1238; }

/* dilution glass layers */
.dl-layer { transform: scaleY(0); transform-origin: 50% 100%; transform-box: fill-box; transition: transform 1.2s var(--ease-out); }
.dilute.play .dl-layer { transform: scaleY(1); }
.dilute.play .dl-layer--2 { transition-delay: 1.1s; }
.dilute.play .dl-layer--3 { transition-delay: 2.2s; }
.dl-src { transition: transform 1s var(--ease-out), opacity 1s; transform-box: fill-box; }
.dilute.play .dl-src--1 { transform: translate(20px, 30px) scale(.9); opacity: .35; transition-delay: .1s; }
.dilute.play .dl-src--2 { transform: translate(0, 30px) scale(.9); opacity: .35; transition-delay: 1.2s; }
.dilute.play .dl-src--3 { transform: translate(-20px, 30px) scale(.9); opacity: .35; transition-delay: 2.3s; }
.dl-arrow { opacity: .25; transition: opacity .6s; }
.dilute.play .dl-arrow--1 { opacity: 1; transition-delay: .1s; }
.dilute.play .dl-arrow--2 { opacity: 1; transition-delay: 1.2s; }
.dilute.play .dl-arrow--3 { opacity: 1; transition-delay: 2.3s; }

/* jar */
.jar .brine { transition: fill 1.2s ease; }
.jar .jar-bubble { opacity: 0; }
.jar[data-day="1"] .jb1, .jar[data-day="2"] .jb1, .jar[data-day="2"] .jb2, .jar[data-day="3"] .jb1, .jar[data-day="3"] .jb2, .jar[data-day="3"] .jb3 { opacity: 1; }
.jar .jar-bubble { animation: rise var(--t, 4s) linear infinite; animation-delay: var(--dl, 0s); transform-box: fill-box; }
.jar[data-day="0"] .jar-bubble { animation: none; opacity: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-reveal="mask"], .js [data-reveal="mask"] > * { opacity: 1; transform: none; clip-path: none; }
  .split-line > span { transform: none; }
  [data-draw] { stroke-dashoffset: 0; }
  .bubble, .jar .jar-bubble { opacity: .7; }
  .marquee__track { animation: none; flex-wrap: wrap; white-space: normal; }
  .drop { opacity: 0; }
  .bowl .bowl-liquid { transform: none; }
  .dl-layer { transform: none; }
  #tint { display: none; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 14mm; }
  :root { --rail: 0px; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  body::before, #tint, .topbar, .rail, .chip-nav, .index-overlay, .toast, .marquee, .badge-spin, .hero__glass,
  .ch-head__letter, .replay, .no-print, button:not(.print-keep), .compare, .seasons__ctl { display: none !important; }
  .chapter { padding: 10mm 0 !important; background: #fff !important; color: #000 !important; overflow: visible !important; break-inside: auto; min-height: 0 !important; }
  .chapter:not(.print-me) { display: none !important; }
  [data-surface] { --bg: #fff; --fg: #000; --muted: #333; --line: #bbb; --accent: #000; --ruby: #000; --green: #000; }
  .js [data-reveal], .js [data-reveal] > * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .split-line > span { transform: none !important; }
  .calc, .logsheet, .specimen { box-shadow: none !important; transform: none !important; border: 1px solid #000; background: #fff !important; }
  .ring-wrap, .gauge-card, .ferment__sticky { position: static !important; }
  .launch-list label { padding: 6px 0; }
  .launch-list input { border-color: #000; }
  .step { min-height: 0 !important; padding: 8px 0 !important; }
  a { text-decoration: none; }
  h2, h3 { break-after: avoid; }
  tr, li { break-inside: avoid; }
}

/* grid/flex children must be allowed to shrink below their content width */
.qc > *, .wall-layout > *, .conc-top > *, .ferment > *, .taste-grid > *, .pack-hero > *, .anatomy > *,
.legal > *, .cost > *, .risk > *, .launch > *, .story > *, .voice > *, .freeze-top > *, .serve > *, .calc > * { min-width: 0; }

@media (max-width: 640px) {
  .cost-table thead { display: none; }
  .cost-table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cost-table td { border: 0; padding: 0; }
  .cost-table td:first-child { grid-column: 1 / -1; width: auto; }
}
