/* THE COUNTER. A recipe engine that behaves like a kitchen.
   Signature objects: heat ring, ingredient tape, ingredient print, kitchen timer, plate result.
   Tokens from the design brief (newdesign.pdf, slide 17). See DESIGN.md. */
:root {
  --char: #10110F; --char-2: #1B1C18; --char-3: #2C2D27; --char-line: #3A3B34;
  --bone: #F3EDE2; --bone-2: #E9E0CF; --paper: #FFFDF8; --plate: #FBFAF6;
  --acid: #D7FF2F; --tomato: #FF4B32; --tomato-ink: #C2301A; --butter: #FFD65A;
  --basil: #184D3B; --salmon: #FFB3A0; --plum: #5E2D5A; --wood: #D8B880; --wood-2: #C4A167;

  --bg: var(--bone); --fg: var(--char); --surface: var(--paper); --surface-2: var(--bone-2);
  --muted: #5A564C; --line: #D3C9B6; --accent-ink: var(--tomato-ink); --focus: var(--char);
  --on-dark: #F3EDE2; --on-dark-muted: #A8A397; --edge-dark: transparent;

  --f-sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-snap: cubic-bezier(.34, 1.56, .64, 1);
  --t-snap: 180ms; --t-heat: 320ms; --t-plate: 420ms; --t-steam: 600ms;
  --r-xl: 32px; --r-lg: 24px; --r-md: 16px; --r-sm: 10px;
  --z-sticky: 10; --z-dock: 30; --z-modal: 40; --z-skip: 50;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10110F; --fg: #F3EDE2; --surface: #1B1C18; --surface-2: #24251F;
    --muted: #A8A397; --line: #34352E; --accent-ink: #FF6A52; --focus: var(--acid); --edge-dark: #3A3B34; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10110F; --fg: #F3EDE2; --surface: #1B1C18; --surface-2: #24251F;
  --muted: #A8A397; --line: #34352E; --accent-ink: #FF6A52; --focus: var(--acid); --edge-dark: #3A3B34; color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body, .doc-root { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-sans); font-size: 1.0625rem; line-height: 1.55; font-variant-numeric: tabular-nums; }
body { min-height: 100vh; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--accent-ink); }
a:hover { color: var(--accent-ink); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-sans); font-weight: 850; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; margin: 0 0 .45em; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--acid); color: var(--char); padding: 10px 16px; border-radius: 999px; z-index: var(--z-skip); font-weight: 800; }
.skip:focus { top: 8px; }
.wrap { max-width: 1360px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.mono, .eyebrow, .kicker, .badge, .status { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.kicker, .eyebrow { display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 1rem; padding-bottom: 7px; border-bottom: 3px solid currentColor; }
.kicker a, .eyebrow a { color: inherit; text-decoration: none; }
.kicker a:hover, .eyebrow a:hover { text-decoration: underline; }
.lede { font-family: var(--f-serif); font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.45; max-width: 58ch; }
.h-md { font-size: clamp(2.2rem, 5vw, 3.8rem); text-transform: uppercase; }
.h-sm { font-size: 1.5rem; }
.h-xs { font-size: 1.15rem; }

.rail, .shelf, .gesture, .deck, .rescue-save { box-shadow: inset 0 0 0 2px var(--edge-dark); }
/* dark zones share one focus colour */
.site-head, .site-foot, .counter, .pass-band, .rail, .shelf, .cook, .dock, .note-safety { --focus: var(--acid); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 26px; border: 2px solid var(--char); border-radius: 999px; background: var(--char); color: var(--acid); font-weight: 800; font-size: .92rem; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.btn:hover { color: var(--acid); transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn-acid { background: var(--acid); color: var(--char); border-color: var(--acid); }
.btn-acid:hover { color: var(--char); }
.btn-tomato { background: var(--tomato); border-color: var(--tomato); color: var(--char); }
.btn-tomato:hover { color: var(--char); }
.btn-bone { background: var(--bone); border-color: var(--bone); color: var(--char); }
.btn-bone:hover { color: var(--char); }
.btn-dark, .btn-dark:hover { background: var(--char); color: var(--acid); }
.btn-ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn-ghost:hover { color: currentColor; }
.btn-small { min-height: 42px; padding: 8px 18px; font-size: .82rem; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 4px 0; text-decoration: underline; cursor: pointer; color: var(--muted); font-size: .9rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0; }
.arrow-link { font-family: var(--f-mono); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; text-decoration: none; }
.arrow-link::after { content: " →"; color: var(--acid); }

/* ---------- header ---------- */
.site-head { background: var(--char); color: var(--on-dark); position: relative; z-index: var(--z-sticky); }
.head-row { display: flex; align-items: center; gap: 12px 28px; min-height: 72px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: baseline; text-decoration: none; color: inherit; line-height: 1; white-space: nowrap; }
.brand:hover { color: inherit; }
.brand-cook { font-weight: 900; font-size: 1.75rem; letter-spacing: -.04em; }
.brand-slash { font-weight: 900; font-size: 1.75rem; color: var(--tomato); margin: 0 .06em 0 .02em; display: inline-block; transition: transform var(--t-heat) var(--ease-snap); }
.brand-recipes { font-family: var(--f-serif); font-size: 1.8rem; letter-spacing: -.01em; }
.brand:hover .brand-slash { transform: rotate(18deg); }
.menu { margin-left: auto; display: flex; align-items: center; }
.burger, .menu-foot { display: none; }
.nav { display: flex; gap: 4px 14px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-item > a { display: inline-block; text-decoration: none; font-weight: 700; font-size: .84rem; letter-spacing: .07em; text-transform: uppercase; padding: 10px 0; color: var(--on-dark); position: relative; }
.nav-item > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease-out); }
.nav-item > a:hover { color: var(--acid); }
.nav-item > a:hover::after, .nav-item > a[aria-current="page"]::after { transform: scaleX(1); }
.lang { font-family: var(--f-mono); font-weight: 600; font-size: .82rem; text-decoration: none; border: 2px solid var(--acid); color: var(--acid); border-radius: 999px; padding: 6px 14px; min-height: 36px; display: inline-flex; align-items: center; }
.lang:hover { background: var(--acid); color: var(--char); }

/* ---------- signature: heat ring ---------- */
.heat-ring { width: 100%; height: auto; overflow: visible; }
.heat-ring circle { fill: none; }
.hr-track { stroke: rgba(16, 17, 15, .12); stroke-width: 9; }
.hr-heat { stroke: var(--tomato); stroke-width: 9; transition: stroke-dasharray var(--t-heat) var(--ease-out); }
.hr-main { stroke: var(--acid); stroke-width: 4; transition: stroke var(--t-heat) var(--ease-out); }
.hr-thin { stroke: var(--acid); stroke-width: 1.4; transition: stroke var(--t-heat) var(--ease-out); }

/* ---------- signature: ingredient tape ---------- */
.tape { --tape-bg: var(--paper); display: inline-flex; align-items: center; gap: 6px; background: var(--tape-bg); color: var(--char); border: 2px solid var(--char); border-radius: 8px; padding: 7px 14px; font-family: var(--f-sans); font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; transform: rotate(var(--r, 0deg)); box-shadow: 0 3px 0 rgba(16, 17, 15, .25); white-space: nowrap; text-decoration: none; }
.t-salmon { --tape-bg: var(--salmon); }
.t-butter { --tape-bg: var(--butter); }
.t-acid { --tape-bg: var(--acid); }
.t-paper { --tape-bg: var(--paper); }
button.tape, a.tape { cursor: pointer; transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
button.tape:hover, a.tape:hover { color: var(--char); transform: rotate(0deg) translateY(-3px); box-shadow: 0 6px 0 rgba(16, 17, 15, .3); }
button.tape:active { transform: rotate(0deg) scale(.96); }

/* ---------- signature: plate result ---------- */
.pass { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 40px 26px; }
.plate-card { min-width: 0; }
.plate-link { display: grid; justify-items: center; gap: 4px; text-align: center; text-decoration: none; color: inherit; }
.plate-link:hover { color: inherit; }
.plate { position: relative; display: block; width: min(100%, 220px); aspect-ratio: 1; margin-bottom: 12px; }
.plate img { width: 100%; height: 100%; border-radius: 50%; transition: transform var(--t-plate) var(--ease-out); filter: drop-shadow(0 8px 0 rgba(16, 17, 15, .14)); }
.plate-link:hover .plate img { transform: rotate(14deg) scale(1.04); }
.plate-time { position: absolute; top: 2%; right: 0; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--tomato); color: var(--char); display: grid; place-content: center; text-align: center; font-size: .6rem; line-height: 1; text-transform: uppercase; border: 2px solid var(--char); }
.plate-time b { display: block; font-family: var(--f-sans); font-size: 1.15rem; font-weight: 900; }
.plate-name { font-size: 1.02rem; font-weight: 850; text-transform: uppercase; letter-spacing: .01em; line-height: 1.12; margin: 0; max-width: 22ch; }
.plate-link:hover .plate-name { text-decoration: underline; text-decoration-color: var(--accent-ink); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.plate-meta { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.match-ring { position: absolute; left: -6%; top: -6%; width: 112%; height: 112%; max-width: none; pointer-events: none; }
.match-ring circle { fill: none; stroke-width: 3.5; }
.match-ring .mr-track { stroke: rgba(243, 237, 226, .14); }
.match-ring .mr-fill { stroke: var(--acid); stroke-linecap: round; }
.plate-missing { font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--salmon); }
/* horizontal pass (rail) */
.pass-rail { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(170px, 210px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 18px 14px 26px; scroll-padding-inline: 14px; scrollbar-width: thin; scrollbar-color: var(--char-line) transparent; }
.pass-rail > li { scroll-snap-align: start; }

/* ---------- THE COUNTER (finder) ---------- */
.counter { background: var(--char); color: var(--on-dark); padding-block: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 48px); position: relative; overflow: hidden; }
.counter a { text-decoration-color: var(--acid); }
.counter a:hover { color: var(--acid); }
.counter-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.counter .kicker { color: var(--acid); }
.mega { font-size: clamp(2.3rem, 5vw, 4.7rem); line-height: .92; letter-spacing: -.02em; word-spacing: .06em; text-transform: uppercase; font-weight: 900; margin-bottom: .35em; }
.mega span, .mega em { display: block; }
.mega em { font-style: normal; color: var(--tomato); }
.counter-h { font-size: clamp(2.1rem, 4.4vw, 3.6rem); text-transform: uppercase; letter-spacing: -.03em; }
.counter .lede { color: var(--on-dark); opacity: .86; margin-bottom: 1.6rem; }
.add-label { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 8px; }
.add-field { display: flex; gap: 8px; background: var(--char-2); border: 2px solid var(--char-line); border-radius: 999px; padding: 5px; transition: border-color 160ms var(--ease-out); }
.add-field:focus-within { border-color: var(--acid); }
.add-field input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 8px 16px; font-size: 1.05rem; color: var(--on-dark); }
.add-field input:focus { outline: none; }
.add-field input::placeholder { color: var(--on-dark-muted); }
.form-msg { min-height: 1.5em; margin: 8px 0 0; font-size: .9rem; color: var(--accent-ink); }
.counter .form-msg { color: var(--salmon); }
.fridge { margin-top: 10px; }
.fridge-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0 0 12px; }
.fridge-tapes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 10px; }
.fridge-tapes .tape { min-height: 40px; touch-action: manipulation; }
@media (pointer: fine) { .fridge-tapes .tape { cursor: grab; } }
.fridge-tapes .tape[aria-pressed="true"] { --tape-bg: transparent; color: var(--on-dark-muted); border-style: dashed; border-color: var(--char-line); box-shadow: none; }
.fridge-tapes .tape[aria-pressed="true"]::before { content: "✓"; color: var(--acid); }
.tape-ghost { position: fixed; left: 0; top: 0; z-index: var(--z-modal); pointer-events: none; margin: 0; transform: translate(var(--gx), var(--gy)) rotate(-6deg) scale(1.08); box-shadow: 0 14px 0 rgba(0, 0, 0, .35); }
.basics { margin-top: 22px; border-top: 1px solid var(--char-line); padding-top: 14px; }
.basics summary { cursor: pointer; font-weight: 700; font-size: .92rem; min-height: 32px; }
.basics-grid { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; font-size: .95rem; }
.check input { width: 20px; height: 20px; accent-color: var(--acid); }
.privacy { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); margin: 14px 0 0; }

/* the worktop */
.counter-stage { min-width: 0; }
.board { container-type: inline-size; position: relative; background: var(--wood); color: var(--char); border: 3px solid var(--char); border-radius: var(--r-xl); aspect-ratio: 5 / 4; box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .06), 0 0 0 1px var(--char-line); background-image: repeating-linear-gradient(176deg, transparent 0 46px, rgba(150, 112, 56, .22) 46px 48px); transition: box-shadow var(--t-heat) var(--ease-out); }
.board.is-over { box-shadow: inset 0 0 0 4px var(--acid), 0 0 0 4px var(--acid); }
.board-label { position: absolute; left: 22px; top: 16px; margin: 0; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; background: var(--char); color: var(--acid); padding: 4px 10px; border-radius: 999px; z-index: 2; }
.board-label[hidden] { display: none; }
.hob { position: absolute; left: 50%; top: 50%; width: 58%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.hob .hr-track { stroke: rgba(16, 17, 15, .14); }
.hob:not(.is-on) .hr-main, .hob:not(.is-on) .hr-thin { stroke: rgba(16, 17, 15, .22); }
.hob.is-heating .hob-ring { animation: heat var(--t-heat) var(--ease-out); }
@keyframes heat { 0% { transform: scale(.94); opacity: .6; } 100% { transform: scale(1); opacity: 1; } }
.hob-plate { position: absolute; left: 50%; top: 50%; width: 50%; transform: translate(-50%, -50%); margin: 0; display: block; border-radius: 50%; }
.hob-plate img { width: 100%; border-radius: 50%; filter: drop-shadow(0 8px 0 rgba(16, 17, 15, .2)); }
a.hob-plate { transition: transform var(--t-plate) var(--ease-out); }
a.hob-plate:hover { transform: translate(-50%, -50%) rotate(10deg); }
.hob-plate.is-arriving img { animation: arrive var(--t-plate) var(--ease-out); }
@keyframes arrive { from { transform: translateX(-30%) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.steam { position: absolute; left: 50%; top: 2%; width: 18%; transform: translateX(-50%); overflow: visible; pointer-events: none; opacity: 0; }
.steam path { fill: none; stroke: var(--paper); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 80; stroke-dashoffset: 80; }
.hob.is-steaming .steam { animation: steam-fade var(--t-steam) var(--ease-out) 2; }
.hob.is-steaming .steam path { animation: steam-draw var(--t-steam) var(--ease-out) 2; }
.hob.is-steaming .steam path:nth-child(2) { animation-delay: 80ms; }
.hob.is-steaming .steam path:nth-child(3) { animation-delay: 160ms; }
@keyframes steam-fade { 0% { opacity: 0; transform: translate(-50%, 10px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -14px); } }
@keyframes steam-draw { to { stroke-dashoffset: 0; } }
.board-tapes { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.board-tapes > li { position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, -50%); pointer-events: auto; }
.board-tapes .tape { padding: 4px 4px 4px 12px; gap: 2px; font-size: .78rem; }
.board-tapes .tape.is-new { animation: snap var(--t-snap) var(--ease-snap); }
@keyframes snap { from { transform: translateY(-26px) rotate(calc(var(--r) + 10deg)) scale(1.12); opacity: 0; } to { transform: rotate(var(--r)); opacity: 1; } }
.tape-btn { border: 0; background: transparent; color: var(--char); cursor: pointer; border-radius: 6px; min-width: 34px; min-height: 34px; padding: 0 6px; display: inline-grid; place-items: center; }
.tape-btn:hover { background: rgba(16, 17, 15, .1); }
.tape-x { font-size: 1.15rem; line-height: 1; }
.urg { font-family: var(--f-mono); font-size: .62rem; font-weight: 600; letter-spacing: .06em; border: 1.5px dashed var(--char); }
.urg[data-u="1"] { background: var(--char); color: var(--butter); border-style: solid; }
.urg[data-u="2"] { background: var(--tomato); color: var(--char); border: 1.5px solid var(--char); }
.board-empty { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); margin: 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; background: var(--paper); border: 2px dashed var(--char); border-radius: 999px; padding: 6px 14px; white-space: nowrap; z-index: 2; }
.board-clear { position: absolute; right: 16px; bottom: 14px; z-index: 4; background: var(--char); color: var(--bone); border: 0; border-radius: 999px; padding: 8px 14px; min-height: 36px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.board-clear:hover { background: var(--tomato); color: var(--char); }
.best-line { margin: 14px 4px 0; font-family: var(--f-mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-muted); min-height: 1.4em; }
.best-line strong { color: var(--acid); font-weight: 600; }
/* narrow worktop: tapes pile above the hob instead of orbiting it */
@container (max-width: 560px) {
  .board { aspect-ratio: auto; display: flex; flex-direction: column; padding: 52px 14px 64px; gap: 18px; }
  .board-tapes { position: static; display: flex; flex-wrap: wrap; gap: 10px 8px; justify-content: center; order: 1; }
  .board-tapes > li { position: static; transform: none; }
  .hob { position: relative; left: auto; top: auto; transform: none; width: min(86%, 300px); margin-inline: auto; order: 2; }
  .board-empty { position: static; transform: none; order: 1; align-self: center; white-space: normal; text-align: center; }
  .board-clear { position: static; order: 3; align-self: flex-end; }
  .board-static { aspect-ratio: 1 / .9; display: block; padding: 0; }
  .board-static .board-tapes { position: absolute; display: block; }
  .board-static .board-tapes > li { position: absolute; transform: translate(-50%, -50%); }
  .board-static .hob { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 66%; margin: 0; }
  .board-static .tape { font-size: .68rem; padding: 5px 9px; }
}
.board.is-pile { aspect-ratio: auto; display: flex; flex-direction: column; padding: 56px 18px 70px; gap: 22px; }
.board.is-pile .board-tapes { position: static; display: flex; flex-wrap: wrap; gap: 10px 8px; justify-content: center; }
.board.is-pile .board-tapes > li { position: static; transform: none; }
.board.is-pile .board-clear { position: static; align-self: flex-end; }
.board.is-pile .hob { position: relative; left: auto; top: auto; transform: none; width: min(70%, 320px); margin-inline: auto; }

/* the pass: results */
.pass-wrap { margin-top: clamp(32px, 4vw, 52px); }
.pass-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pass-tab { --tab: var(--basil); --tab-fg: var(--bone); display: flex; align-items: center; gap: 14px; text-align: left; border: 2px solid var(--tab); background: transparent; color: var(--on-dark); border-radius: 999px; padding: 8px 20px 8px 8px; min-height: 64px; cursor: pointer; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 160ms var(--ease-out); }
.pass-tab:active { transform: scale(.98); }
.tab-one { --tab: var(--tomato); --tab-fg: var(--char); }
.tab-rescue { --tab: #8A4A85; --tab-fg: var(--bone); }
.pass-tab[aria-selected="true"] { background: var(--tab); color: var(--tab-fg); }
.tab-one[aria-selected="true"] { background: var(--tomato); }
.tab-rescue[aria-selected="true"] { background: var(--plum); border-color: var(--plum); }
.tab-n { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--tab); color: var(--tab-fg); font-weight: 900; font-size: 1.35rem; }
.tab-rescue .tab-n { background: var(--plum); }
.pass-tab[aria-selected="true"] .tab-n { background: var(--char); color: var(--acid); }
.tab-txt { display: grid; min-width: 0; }
.tab-h { font-weight: 850; text-transform: uppercase; font-size: .92rem; letter-spacing: .04em; }
.tab-sub { font-size: .8rem; opacity: .8; }
.lane { padding-top: 22px; }
.lane .plate-name { color: var(--on-dark); }
.lane .plate-meta { color: var(--on-dark-muted); }
.unlocks { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.unlocks:empty { display: none; }
.unlock-tape b { font-family: var(--f-mono); background: var(--char); color: var(--acid); border-radius: 999px; padding: 2px 8px; font-size: .74rem; }
.lane-empty { border: 2px dashed var(--char-line); border-radius: var(--r-lg); padding: 22px; color: var(--on-dark-muted); max-width: 560px; margin: 6px 0 0; }
.pass-note { font-size: .84rem; color: var(--on-dark-muted); margin: 6px 0 0; }
.lane .pass-rail > li { animation: plate-in var(--t-plate) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes plate-in { from { transform: translateX(-28px); opacity: 0; } to { transform: none; opacity: 1; } }

/* rescue shelf (full-page finder) */
.rescue { margin-top: 44px; background: var(--paper); color: var(--char); border-radius: var(--r-xl); border: 3px solid var(--char); padding: clamp(20px, 3vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 8px 28px; --focus: var(--char); }
.rescue-head { grid-column: 1 / -1; }
.rescue-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); text-transform: uppercase; }
.rescue-head p { color: #5A564C; max-width: 60ch; }
.rescue-row { grid-column: 1; border-top: 2px solid #D9D3C7; padding: 10px 0 16px; }
.rescue-h { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; font-weight: 600; }
.rescue-row[data-urg="2"] .rescue-h { color: var(--tomato-ink); }
.rescue-row[data-urg="1"] .rescue-h { color: #8A6A00; }
.rescue-row[data-urg="0"] .rescue-h { color: var(--basil); }
.rescue-tapes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; min-height: 40px; }
.rescue-tapes .none { font-family: var(--f-mono); font-size: .78rem; color: #6B675D; }
.rescue-save { grid-column: 2; grid-row: 2 / span 3; align-self: start; background: var(--char); color: var(--bone); border-radius: var(--r-lg); padding: 22px; --focus: var(--acid); }
.rescue-save:empty { display: none; }
.rescue-save .mono { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0 0 8px; }
.rescue-save a { display: block; font-weight: 900; font-size: 1.5rem; text-transform: uppercase; line-height: 1.05; color: var(--acid); text-decoration: none; margin-bottom: 8px; }
.rescue-save a:hover { text-decoration: underline; }
.rescue-save p { margin: 0; font-size: .85rem; }

/* ---------- sections ---------- */
.section { padding-block: clamp(40px, 6vw, 80px); }
.section-gap { margin-top: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 10px 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 40px); }
.section-title h2 { font-size: clamp(2.2rem, 5.2vw, 4.4rem); text-transform: uppercase; letter-spacing: -.035em; line-height: .95; margin: 0; }
.section-title p { margin: 0; color: var(--muted); }
.section-title p.mono { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }

/* four gestures */
.gestures { padding-block: clamp(48px, 6vw, 88px); }
.gesture-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gesture { position: relative; background: var(--char); color: var(--on-dark); border-radius: var(--r-xl); padding: 24px 24px 200px; min-height: 360px; overflow: hidden; }
.gesture h3 { font-size: 2rem; text-transform: uppercase; margin: 8px 0 6px; }
.gesture p { color: var(--on-dark-muted); font-size: .95rem; margin: 0; max-width: 30ch; }
.g-n { color: var(--tomato); font-size: .8rem; }
.g-demo { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); width: 150px; height: 150px; display: grid; place-items: center; }
.g-drop .g-demo::after { content: ""; position: absolute; left: 50%; top: 80px; width: 3px; height: 40px; background: var(--acid); transform: translateX(-50%); }
.g-drop .g-demo::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 120px; height: 60px; border: 1.5px solid var(--char-line); border-radius: 0 0 120px 120px; border-top: 0; transform: translateX(-50%); }
.g-drop .tape { transform: translateY(-34px) rotate(8deg); }
.g-snap .g-demo { background: var(--wood); border-radius: 18px; }
.g-snap .tape { transform: rotate(0deg); }
.g-snap .g-demo::after { content: ""; position: absolute; bottom: 22px; width: 18px; height: 18px; border-radius: 50%; background: var(--acid); }
.g-heat .heat-ring { width: 150px; }
.g-heat .hr-track { stroke: rgba(243, 237, 226, .1); }
.g-plate img { width: 140px; border-radius: 50%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .g-drop .tape { animation: g-drop linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
    .g-heat .hr-heat { animation: g-heat linear both; animation-timeline: view(); animation-range: entry 20% cover 50%; }
    .g-plate img { animation: g-plate linear both; animation-timeline: view(); animation-range: entry 20% cover 50%; }
    @keyframes g-drop { from { transform: translateY(-80px) rotate(-14deg); opacity: 0; } to { transform: translateY(-34px) rotate(8deg); opacity: 1; } }
    @keyframes g-heat { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 70 100; } }
    @keyframes g-plate { from { transform: translateX(-60px) rotate(-60deg); opacity: 0; } to { transform: none; opacity: 1; } }
  }
}

/* constraint board */
.hub-board { list-style: none; margin: 0; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px); display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 18px; background: var(--wood); border: 3px solid var(--char); border-radius: var(--r-xl); background-image: repeating-linear-gradient(176deg, transparent 0 46px, rgba(150, 112, 56, .22) 46px 48px); }
.hub-tape { font-size: clamp(.95rem, 1.6vw, 1.25rem); padding: 14px 16px 14px 22px; gap: 14px; min-height: 56px; }
.hub-count { background: var(--char); color: var(--acid); border-radius: 999px; padding: 3px 10px; font-size: .78rem; letter-spacing: 0; }

/* pass band (dark rail of plates) */
.pass-band { background: var(--char); color: var(--on-dark); padding-block: clamp(44px, 6vw, 80px); }
.pass-band .section-title p { color: var(--on-dark-muted); }
.pass-band .plate-meta { color: var(--on-dark-muted); }
.pass-band .pass-rail { border-bottom: 3px solid var(--char-line); }

/* tool knobs */
.knob-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.knob-card { display: grid; gap: 8px; align-content: start; height: 100%; text-decoration: none; color: inherit; background: var(--surface); border: 2px solid var(--fg); border-radius: var(--r-xl); padding: 24px; transition: transform 200ms var(--ease-out), background-color 200ms var(--ease-out); }
.knob-card:hover { color: inherit; transform: translateY(-4px); }
.knob-card strong { font-size: 1.4rem; font-weight: 850; text-transform: uppercase; line-height: 1.05; letter-spacing: -.01em; }
.knob-card span:not(.knob) { color: var(--muted); font-size: .95rem; }
.knob { position: relative; width: 76px; height: 76px; border-radius: 50%; background: var(--char); margin-bottom: 10px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--tomato); transition: transform var(--t-heat) var(--ease-out); }
.knob::after { content: ""; position: absolute; left: 50%; top: 9px; width: 4px; height: 20px; border-radius: 2px; background: var(--acid); transform: translateX(-50%); }
.knob { transform: rotate(calc(var(--v) * 270deg - 135deg)); }
.knob-card:hover .knob { transform: rotate(calc(var(--v) * 270deg - 95deg)); }

/* use it up */
.use-up { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px; align-items: start; }
.use-up p:not(.kicker) { color: var(--muted); max-width: 40ch; }
.rescue-list, .index-list { list-style: none; margin: 0; padding: 0; }
.rescue-list li, .index-list li { border-top: 3px solid var(--fg); }
.rescue-list li:last-child, .index-list li:last-child { border-bottom: 3px solid var(--fg); }
.rescue-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 4px; text-decoration: none; color: inherit; }
.rescue-name { font-size: clamp(1.3rem, 2.8vw, 2.2rem); font-weight: 850; text-transform: uppercase; letter-spacing: -.02em; line-height: 1; }
.rescue-arrow { font-size: 1.8rem; color: var(--accent-ink); transition: transform 220ms var(--ease-out); }
.rescue-list a:hover { color: inherit; }
.rescue-list a:hover .rescue-arrow { transform: translateX(8px); }

/* ---------- page heads, crumbs, prose ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 18px 0 0; margin: 0; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--accent-ink); }
.page-head { padding-block: clamp(26px, 4vw, 48px) 10px; }
.page-head h1 { font-size: clamp(2.5rem, 6.4vw, 5.6rem); letter-spacing: -.04em; font-weight: 900; line-height: .9; text-transform: uppercase; max-width: 16ch; }
.page-head.with-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.head-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 32px; align-items: end; }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 3px solid var(--fg); border-radius: var(--r-xl); }
.photo figcaption { font-size: .72rem; color: var(--muted); margin-top: 10px; font-family: var(--f-mono); }
.prose { padding-bottom: 56px; }
.prose > * { max-width: 820px; }
.prose > section:has(.pass) { max-width: none; }
.prose > section { margin-top: 40px; }
.prose h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); text-transform: uppercase; letter-spacing: -.025em; }
.prose p, .prose li { font-size: 1.08rem; }
.prose .pass { margin-top: 18px; }
.go-further { margin-top: 48px; }
.go-further h2 { font-size: 1.5rem; }
.index-list { margin-top: 24px; }
.index-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 22px 4px; text-decoration: none; color: inherit; align-items: center; }
.index-list a::after { content: "→"; grid-column: 2; grid-row: 1 / span 2; font-size: 1.6rem; color: var(--accent-ink); transition: transform 220ms var(--ease-out); }
.index-list a:hover { color: inherit; }
.index-list a:hover::after { transform: translateX(8px); }
.index-list strong { font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 850; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.02; }
.index-list span { color: var(--muted); grid-column: 1; }
.index-list.compact strong { font-size: 1.15rem; }
.index-list.compact a { padding: 16px 4px; }
.tool-how h3 { margin: 22px 0 6px; font-size: 1.15rem; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; padding: 0; }
.pill { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; border: 2px solid var(--fg); border-radius: 999px; padding: 6px 16px; font-weight: 750; font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
.pill:hover { background: var(--fg); color: var(--bg); }

/* recipe index: mood + dials */
.moods { border: 2px solid var(--fg); border-radius: var(--r-lg); padding: 16px 18px; background: var(--surface); }
.moods-h { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.moods ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.mood { display: flex; align-items: center; gap: 10px; min-height: 36px; text-decoration: none; font-weight: 750; font-size: .86rem; text-transform: uppercase; letter-spacing: .02em; }
.mood-dot { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid var(--char); }
.md-0 { background: var(--tomato); } .md-1 { background: var(--acid); } .md-2 { background: var(--butter); } .md-3 { background: var(--basil); } .md-4 { background: var(--salmon); }
.deck { background: var(--char); color: var(--on-dark); border-radius: var(--r-xl); padding: clamp(20px, 3vw, 36px); margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 20px 32px; align-items: center; --focus: var(--acid); }
.dials { display: flex; flex-wrap: wrap; gap: 18px clamp(16px, 3vw, 40px); }
.dial { position: relative; display: grid; justify-items: center; gap: 8px; width: 140px; }
.dial-face { position: relative; width: 132px; aspect-ratio: 1; border-radius: 50%; background: var(--char-2); display: grid; place-content: center; text-align: center; }
.dial-face .heat-ring { position: absolute; inset: 0; }
.dial-face .hr-track { stroke: rgba(243, 237, 226, .1); }
.dial-face .hr-main { stroke: rgba(243, 237, 226, .55); stroke-width: 1.5; }
.dial-face .hr-thin { display: none; }
.dial[data-dial="keys"] .hr-heat { stroke: var(--acid); }
.dial[data-dial="heat"] .hr-heat { stroke: var(--butter); }
.dial-val { font-weight: 900; font-size: 1.45rem; line-height: 1; text-transform: uppercase; position: relative; }
.dial-unit { font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); position: relative; margin-top: 4px; }
.dial-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark); }
.dial-input { width: 132px; accent-color: var(--acid); height: 28px; margin: 0; cursor: pointer; }
.dial:has(.dial-input:focus-visible) .dial-face { outline: 3px solid var(--acid); outline-offset: 4px; }
.dial.is-turned .dial-val { animation: tick 200ms var(--ease-out); }
@keyframes tick { from { transform: translateY(6px); opacity: .3; } to { transform: none; opacity: 1; } }
.deck .filter label { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.deck .filter input { width: 100%; min-height: 48px; border-radius: 999px; border: 2px solid var(--char-line); background: var(--char-2); color: var(--on-dark); padding: 10px 18px; }
.deck .filter input:focus { border-color: var(--acid); outline: none; }
.deck-count { grid-column: 1 / -1; margin: 0; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--acid); min-height: 1.4em; }
.deck .board-clear { position: static; justify-self: start; grid-column: 1 / -1; }
.deck .board-clear[hidden] { display: none; }

/* generic forms and tables */
.filter { max-width: 520px; }
.filter label, .field label, .field .label { display: block; font-weight: 800; margin-bottom: 6px; font-size: .9rem; }
.filter input, .field input, .field select { width: 100%; min-height: 48px; border: 2px solid var(--fg); border-radius: var(--r-sm); padding: 10px 14px; background: var(--surface); }
.page-head .filter, .prose .filter { margin-top: 20px; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.spec { background: var(--surface); border: 2px solid var(--fg); border-radius: var(--r-lg); padding: 20px; }
.spec h3 { font-size: 1.1rem; text-transform: uppercase; }
.spec p { margin: 0; font-size: .97rem; }
.table-wrap { overflow-x: auto; border: 2px solid var(--fg); border-radius: var(--r-lg); background: var(--surface); margin-top: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .97rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-mono); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; background: var(--char); color: var(--bone); }
tr:last-child td { border-bottom: 0; }

/* notes */
.note { background: var(--butter); color: var(--char); border: 2px solid var(--char); border-radius: var(--r-lg); padding: 20px 22px; margin-top: 18px; }
.note h3 { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin-bottom: 8px; }
.note p:last-child { margin-bottom: 0; }
.note a { text-decoration-color: currentColor; }
.note a:hover { color: inherit; }
.note-safety { background: var(--basil); color: var(--bone); border-color: var(--basil); }
.note-plain { background: var(--surface); color: var(--fg); border-color: var(--fg); }
.status { display: inline-flex; align-items: center; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; border: 1.5px solid currentColor; border-radius: 999px; padding: 3px 10px; }

/* ---------- recipe page: a cooking score ---------- */
.rhead { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 60px); padding-block: clamp(22px, 3vw, 40px); align-items: center; }
.rhead h1 { font-size: clamp(2.4rem, 5vw, 5.4rem); line-height: .9; letter-spacing: -.04em; font-weight: 900; text-transform: uppercase; }
.rhead .lede { color: var(--accent-ink); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 30px; margin: 22px 0 26px; padding: 18px 0 0; border-top: 3px solid var(--fg); }
.facts dt { font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.facts dd { margin: 0; font-size: 2.4rem; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.facts dd small { font-family: var(--f-mono); font-size: .78rem; font-weight: 500; letter-spacing: 0; margin-left: 4px; color: var(--muted); }
.rhead .status { margin-left: 4px; color: var(--muted); }
.rhead-stage { position: relative; }
.board-static { aspect-ratio: 1 / .9; }
.board-static .hob { width: 70%; }
.static-tapes > li { pointer-events: none; }
.slot-0 { --x: 20%; --y: 13%; } .slot-1 { --x: 80%; --y: 15%; } .slot-2 { --x: 18%; --y: 87%; } .slot-3 { --x: 80%; --y: 86%; }
.time-badge { position: absolute; right: -10px; top: -12px; width: 92px; height: 92px; border-radius: 50%; background: var(--tomato); color: var(--char); border: 3px solid var(--char); display: grid; place-content: center; text-align: center; margin: 0; font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; line-height: 1; z-index: 4; transform: rotate(8deg); }
.time-badge b { font-family: var(--f-sans); font-size: 2.1rem; font-weight: 900; }
.illus-note { font-family: var(--f-mono); font-size: .68rem; color: var(--muted); margin: 10px 4px 0; }
.score { display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr) minmax(240px, 300px); gap: 18px; align-items: start; scroll-margin-top: 16px; }
.score-kicker { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 2px; }
.score-h { font-size: 1.9rem; text-transform: uppercase; margin: 0; letter-spacing: -.03em; }
.mise { background: var(--surface); border: 2px solid var(--fg); border-radius: var(--r-xl); padding: 24px; min-width: 0; }
.card-tools { display: grid; gap: 14px; margin-bottom: 8px; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stepper { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--fg); border-radius: 999px; padding: 3px; }
.stepper button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--fg); color: var(--bg); cursor: pointer; font-size: 1.2rem; font-weight: 800; transition: transform 120ms var(--ease-out); }
.stepper button:active { transform: scale(.92); }
.stepper output { font-family: var(--f-mono); font-size: 1.1rem; min-width: 1.6em; text-align: center; font-weight: 600; }
.stepper .small { padding-right: 4px; }
.seg { display: inline-flex; border: 2px solid var(--fg); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; min-height: 38px; cursor: pointer; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.ing-list { list-style: none; margin: 10px 0 0; padding: 0; }
.ing-list li { border-bottom: 1.5px solid var(--line); }
.ing-list li:last-child { border-bottom: 0; }
.ing { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; cursor: pointer; }
.ing input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--basil); flex: none; }
.ing b { font-family: var(--f-mono); font-weight: 600; white-space: nowrap; }
.ing input:checked + span { text-decoration: line-through; text-decoration-color: var(--accent-ink); color: var(--muted); }
.opt { color: var(--muted); font-size: .9em; }
.rail { background: var(--char); color: var(--on-dark); border-radius: var(--r-xl); padding: clamp(22px, 3vw, 34px); min-width: 0; }
.rail .score-h { color: var(--on-dark); }
.rail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 22px; }
.rail-sub { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 66px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -6px; width: 42px; height: 42px; display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; border-radius: 50%; background: var(--acid); color: var(--char); z-index: 1; }
.steps li::after { content: ""; position: absolute; left: 20px; top: 34px; bottom: -4px; width: 3px; background: var(--tomato); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps p { margin: 0; font-size: 1.1rem; line-height: 1.55; max-width: 62ch; }
.timer-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 40px; padding: 6px 16px 6px 10px; border: 2px solid var(--acid); background: transparent; color: var(--acid); border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out); }
.timer-chip:hover { background: var(--acid); color: var(--char); }
.timer-chip:active { transform: scale(.96); }
.timer-chip.is-running { background: var(--acid); color: var(--char); }
.chip-ring { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; }
.recipe-side { display: grid; gap: 14px; position: sticky; top: 16px; min-width: 0; }
.panel { background: var(--surface); border: 2px solid var(--fg); border-radius: var(--r-lg); padding: 20px; min-width: 0; margin: 0; }
.side-h { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin: 0 0 12px; }
.side-title { font-size: 1.25rem; text-transform: uppercase; }
.print-panel { text-align: left; }
.print { width: 150px; margin: 4px auto 14px; }
.print-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: .82rem; }
.print-legend li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sw { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 1.5px solid var(--char); flex: none; }
.plain, .foot-list { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.shelf { background: var(--char); color: var(--on-dark); border-color: var(--char); }
.shelf .plain li { border-color: var(--char-line); }
.shelf a { color: var(--on-dark); text-decoration-color: var(--acid); }
.shelf a:hover { color: var(--acid); }
.panel-unlock { background: var(--acid); color: var(--char); border-color: var(--char); }
.panel-unlock p { font-size: .95rem; }
.next-list a { display: block; text-decoration: none; font-weight: 700; }
.next-list a::after { content: " →"; color: var(--accent-ink); }
.next-list a:hover { text-decoration: underline; }
.notes-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-top: 8px; }
.notes-row .note { margin-top: 14px; }
.recipe-meta { padding-block: 26px 10px; }
.recipe-meta p { max-width: 80ch; }
.recipe-meta p { margin-bottom: 6px; }
.recipe .status { color: inherit; }

/* kitchen timer dock */
.dock { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: var(--z-dock); display: flex; align-items: center; gap: 14px; background: var(--char); color: var(--on-dark); border: 2px solid var(--acid); border-radius: 999px; padding: 8px 18px 8px 8px; box-shadow: 0 12px 0 rgba(16, 17, 15, .25); animation: dock-in 260ms var(--ease-out); }
.dock[hidden] { display: none; }
@keyframes dock-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.dock-ring { position: relative; width: 66px; height: 66px; flex: none; }
.dock-ring output { position: absolute; inset: 0; display: grid; place-items: center; font-size: .9rem; font-weight: 600; }
.dock-txt p { margin: 0; }
.dock-label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--acid); }
.dock-btns { display: flex; gap: 6px; margin-top: 4px !important; }
.dock-btn { border: 1.5px solid var(--char-line); background: transparent; color: var(--on-dark); border-radius: 999px; padding: 4px 12px; min-height: 34px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.dock-btn:hover { border-color: var(--acid); color: var(--acid); }
.dock.is-done { border-color: var(--tomato); }
.dock.is-done .dock-label { color: var(--tomato); }
.timer-ring { width: 100%; height: 100%; }
.timer-ring circle { fill: none; stroke-width: 7; }
.tr-track { stroke: var(--char-3); }
.tr-prog { stroke: var(--acid); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.is-done .tr-prog { stroke: var(--tomato); }

/* cook mode */
.cook { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--char); color: var(--on-dark); padding: max(18px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; overscroll-behavior: contain; }
.cook[hidden] { display: none; }
.cook-inner { max-width: 820px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; gap: 18px; }
.cook-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cook-top p { margin: 0; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.cook-close { border: 2px solid var(--char-line); background: transparent; color: var(--on-dark); border-radius: 999px; min-height: 44px; padding: 6px 18px; font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; cursor: pointer; }
.cook-close:hover { border-color: var(--acid); color: var(--acid); }
.cook-progress { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.cook-progress li { flex: 1; height: 6px; border-radius: 3px; background: var(--char-3); transition: background-color 240ms var(--ease-out); }
.cook-progress li.done { background: var(--acid); }
.cook-progress li.now { background: var(--tomato); }
.cook-count { margin: 10px 0 0; color: var(--acid); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.cook-step { font-weight: 800; font-size: clamp(1.8rem, 5.4vw, 3.4rem); line-height: 1.1; letter-spacing: -.025em; flex: 1; margin: 0; text-wrap: pretty; }
.cook-timer { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.cook-timer[hidden] { display: none; }
.cook-dial { position: relative; width: 168px; height: 168px; }
.cook-dial output { position: absolute; left: 0; right: 0; top: 42%; transform: translateY(-50%); text-align: center; font-size: 2.3rem; font-weight: 500; }
.cook-state { position: absolute; left: 0; right: 0; top: 66%; text-align: center; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tomato); }
.cook-plate { margin: 0 auto; width: 200px; }
.cook-plate[hidden] { display: none; }
.cook-plate img { border-radius: 50%; }
.cook-nav { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; }
.cook-nav .btn { min-height: 64px; font-size: 1.05rem; }
.cook-hint { text-align: center; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0; }

/* tools */
.tool-body { padding-bottom: 12px; }
.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.tool-shell.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.conv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { margin-bottom: 14px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.result-big { display: block; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; font-weight: 900; letter-spacing: -.03em; margin: 8px 0; font-variant-numeric: tabular-nums; }
.result-mid { display: block; font-size: 1.6rem; margin-top: 8px; }
.panel-result { background: var(--acid); color: var(--char); border-color: var(--char); }
.panel-result .eyebrow { color: var(--char); }
fieldset.panel { border: 2px solid var(--fg); }
legend.h-sm { font-weight: 850; padding: 0 8px; text-transform: uppercase; font-size: 1.1rem; }
.conv-grid .h-sm, .tool-shell .h-sm { text-transform: uppercase; font-size: 1.15rem; }
.plain-list li { padding: 8px 0; }
.cost-table input { width: 100%; min-width: 80px; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px; background: var(--bg); }
.cost-table td { padding: 8px; }
.cost-table output { font-family: var(--f-mono); }

/* ---------- footer ---------- */
.site-foot { background: var(--char); color: var(--on-dark); margin-top: clamp(40px, 6vw, 80px); overflow: hidden; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: clamp(40px, 6vw, 72px) 28px; border-bottom: 1px solid var(--char-line); }
.foot-poster { font-size: clamp(2.4rem, 7.4vw, 6rem); font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: -.045em; margin: 0; }
.foot-poster span { color: var(--acid); }
.foot-ring { width: clamp(110px, 16vw, 190px); flex: none; }
.foot-ring .hr-track { stroke: rgba(243, 237, 226, .08); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding-block: 32px 56px; }
.foot-tag { font-family: var(--f-serif); font-size: 1.15rem; margin: 14px 0 8px; }
.foot-muted { color: var(--on-dark-muted); }
.foot-h { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--acid); margin-bottom: 12px; }
.foot-list li { padding: 4px 0; }
.foot-list a { text-decoration: none; }
.foot-list a:hover { color: var(--acid); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .score { grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); }
  .score > .flavor { grid-column: 1 / -1; grid-row: auto; }
  .score > .recipe-side { grid-column: 1 / -1; grid-row: auto; }
  .recipe-side { grid-column: 1 / -1; position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
  .gesture-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .counter-grid, .rhead, .page-head.with-photo, .tool-shell, .tool-shell.three, .use-up, .head-split, .deck, .rescue { grid-template-columns: minmax(0, 1fr); }
  .rescue-save { grid-column: 1; grid-row: auto; }
  .score { grid-template-columns: minmax(0, 1fr); }
  .field-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pass-tabs { grid-template-columns: minmax(0, 1fr); }
  .rhead-stage { max-width: 560px; }
}
@media (max-width: 640px) {
  html:not(.js) .head-row { min-height: 0; padding-block: 12px 4px; }
  html:not(.js) .menu { order: 3; width: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  html:not(.js) .nav { flex-wrap: nowrap; gap: 20px; }
  html:not(.js) .nav-item > a { white-space: nowrap; }
  html:not(.js) .lang { margin-left: auto; }
  .conv-grid, .foot-grid, .field-row { grid-template-columns: minmax(0, 1fr); }
  .gesture-list { grid-template-columns: minmax(0, 1fr); }
  .gesture { min-height: 0; padding-bottom: 190px; }
  .steps li { padding-left: 56px; }
  .steps li::before { width: 38px; height: 38px; }
  .steps li::after { left: 18px; }
  .time-badge { width: 74px; height: 74px; right: 0; }
  .time-badge b { font-size: 1.6rem; }
  .foot-top { flex-direction: column; align-items: flex-start; }
  .dials { justify-content: space-between; }
  .dial { width: calc(50% - 10px); }
  .pass { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
  .pass-rail { grid-template-columns: none; grid-auto-columns: 46%; }
  .plate-name { font-size: .9rem; }
  .dock { left: max(16px, env(safe-area-inset-left, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- signature: flavour print ---------- */
.fprint { width: 100%; height: auto; color: var(--on-dark); overflow: visible; }
.score > .flavor { grid-column: 1 / 3; grid-row: 2; }
.score > .recipe-side { grid-column: 3; grid-row: 1 / span 2; }
.flavor-card { background: var(--char); color: var(--on-dark); border-radius: var(--r-xl); padding: clamp(22px, 3.5vw, 44px); display: grid; grid-template-columns: minmax(200px, 320px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; box-shadow: inset 0 0 0 2px var(--edge-dark); --focus: var(--acid); }
.flavor-id { text-align: center; }
.fprint-big { width: min(100%, 260px); margin: 0 auto 14px; }
.flavor-id h2 { font-size: 1.9rem; text-transform: uppercase; margin: 0 0 6px; }
.flavor-words { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--acid); margin: 0; }
.flavor-data h3 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 600; margin: 0 0 18px; }
.fbars { margin: 0; display: grid; gap: 14px; }
.fbar { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 14px; }
.fbar dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.fbar dd { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 12px; }
.fbar-track { display: block; height: 12px; background: var(--char-3); border-radius: 2px; overflow: hidden; }
.fbar-fill { display: block; height: 100%; width: var(--v); background: var(--c); transform-origin: left; }
.fbar b { font-family: var(--f-mono); font-weight: 600; font-size: .9rem; text-align: right; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fbar-fill { animation: fill linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
    @keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}
.similar { margin-top: 26px; border-top: 1px solid var(--char-line); padding-top: 16px; }
.similar-h { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0 0 10px; }
.similar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.similar a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); font-weight: 750; text-transform: uppercase; font-size: .86rem; min-height: 44px; }
.similar a:hover { color: var(--acid); }
.fprint-mini { width: 44px; flex: none; }
.flavor-note { font-size: .82rem; color: var(--on-dark-muted); margin: 20px 0 0; max-width: 70ch; }
.flavor-note a { color: var(--on-dark); text-decoration-color: var(--acid); }

/* season strip on recipe pages */
.months { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.months li { font-family: var(--f-mono); font-size: .62rem; text-align: center; padding: 6px 0; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.months li.on { background: var(--basil); color: var(--bone); font-weight: 600; }

/* ---------- signature: season wheel ---------- */
.season { padding-block: clamp(48px, 6vw, 88px); }
.season-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.wheel-wrap { position: relative; width: min(100%, 520px); margin-inline: auto; }
.wheel { width: 100%; height: auto; overflow: visible; }
.wseg { --tone: var(--plum); fill: var(--tone); fill-opacity: calc(.25 + var(--n) * .75); stroke: var(--bg); stroke-width: 2; cursor: pointer; transform-origin: 200px 200px; transition: transform 220ms var(--ease-out), fill-opacity 220ms var(--ease-out); }
.ws-w { --tone: var(--plum); } .ws-sp { --tone: #2E8A63; } .ws-su { --tone: #E3B21F; } .ws-au { --tone: var(--tomato); }
.wseg:hover { transform: scale(1.03); }
.wseg[aria-checked="true"] { fill: var(--acid); fill-opacity: 1; stroke: var(--char); stroke-width: 4; transform: scale(1.025); }
.wseg:focus { outline: none; }
.wseg:focus-visible { stroke: var(--focus); stroke-width: 5; }
.wlabel { font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; fill: var(--fg); pointer-events: none; }
.wheel-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48%; aspect-ratio: 1; border-radius: 50%; background: var(--plate); color: var(--char); border: 3px solid var(--char); display: grid; place-content: center; text-align: center; pointer-events: none; }
.wheel-month { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; margin: 0; }
.wheel-sub, .wheel-count { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #5A564C; margin: 6px 0 0; }
.wheel-count { color: var(--tomato-ink); font-weight: 600; }
.season-panel { background: var(--char); color: var(--on-dark); border-radius: var(--r-xl); padding: clamp(22px, 3vw, 36px); box-shadow: inset 0 0 0 2px var(--edge-dark); --focus: var(--acid); }
.season-panel h3 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--acid); font-weight: 600; margin: 0 0 8px; }
.season-list { list-style: none; margin: 0; padding: 0; }
.season-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--char-line); }
.season-list li:last-child { border-bottom: 0; }
.season-list li.none { display: block; color: var(--on-dark-muted); }
.sdot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid var(--bone); margin-top: 3px; grid-row: span 2; }
.sname { font-weight: 850; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .01em; }
.srec { font-family: var(--f-mono); font-size: .74rem; color: var(--on-dark-muted); }
.srec a { color: var(--on-dark-muted); text-decoration-color: var(--acid); }
.srec a:hover { color: var(--acid); }
.season-list.is-new li { animation: plate-in var(--t-plate) var(--ease-out) both; }
.season-note { font-size: .84rem; color: var(--muted); margin: 22px 0 0; max-width: 80ch; }
@media (max-width: 960px) {
  .flavor-card, .season-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .fbar { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .wseg, .wseg:hover, .wseg[aria-checked="true"] { transform: none; }
}
@media (max-width: 1180px) {
  .score > .flavor { grid-column: 1 / -1; grid-row: auto; }
  .score > .recipe-side { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- submenus (disclosure pattern: link + toggle button) ---------- */
.nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.sub-toggle { width: 28px; height: 36px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--on-dark-muted); border-radius: 6px; cursor: pointer; padding: 0; }
.sub-toggle:hover, .nav-item.open .sub-toggle { color: var(--acid); }
.chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 200ms var(--ease-out); }
.nav-item.open .chev { transform: translateY(2px) rotate(-135deg); }
.sub { position: absolute; left: -18px; top: 100%; z-index: var(--z-dock); min-width: 300px; background: var(--char-2); color: var(--on-dark); border: 2px solid var(--char-line); border-radius: var(--r-lg); padding: 16px 10px 12px; box-shadow: 0 18px 0 rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transform: translateY(-6px); transform-origin: top left; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s linear 160ms; }
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-item.open .sub { opacity: 1; visibility: visible; transform: none; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .nav-item:hover .sub { opacity: 1; visibility: visible; transform: none; transition: opacity 160ms var(--ease-out) 60ms, transform 160ms var(--ease-out) 60ms; }
  .nav-item:hover .chev { transform: translateY(2px) rotate(-135deg); }
}
.nav-item:last-child .sub { left: auto; right: -10px; transform-origin: top right; }
.sub-h { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--acid); margin: 0 10px 8px; }
.sub-list { list-style: none; margin: 0; padding: 0; }
.sub-list a, .sub-all { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 10px; min-height: 40px; border-radius: 10px; text-decoration: none; color: var(--on-dark); font-weight: 650; font-size: .95rem; text-transform: none; letter-spacing: 0; }
.sub-list a::after, .sub-all::after { content: none; }
.sub-list a:hover, .sub-list a[aria-current="page"] { background: var(--char-3); color: var(--acid); }
.sub-n { font-size: .72rem; background: var(--char); color: var(--acid); border-radius: 999px; padding: 2px 8px; }
.sub-all { margin-top: 6px; border-top: 1px solid var(--char-line); border-radius: 0 0 10px 10px; font-family: var(--f-mono); font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acid); justify-content: flex-start; }
.sub-all:hover { color: var(--acid); background: var(--char-3); }
.sub-all::before { content: "→"; order: 2; }
@media (max-width: 640px) {
  html:not(.js) .nav-item { position: static; }
  html:not(.js) .sub { left: 0; right: 0; top: 100%; min-width: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); border-width: 0 0 2px; max-height: 70vh; overflow-y: auto; }
  html:not(.js) .nav-item:last-child .sub { left: 0; right: 0; }
}

/* ---------- footer: centred ---------- */
.foot-top { flex-direction: column; justify-content: center; text-align: center; }
.foot-top .foot-ring { order: -1; }
.foot-grid { text-align: center; justify-items: center; }
.foot-grid > div { display: grid; justify-items: center; align-content: start; }
.foot-grid .brand { justify-content: center; }
.foot-grid p { margin-inline: auto; max-width: 42ch; }
@media (max-width: 640px) { .foot-top { align-items: center; } }
@media (min-width: 641px) { .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- photos on plates (Wikimedia Commons): the photo is cropped round and sits in a ceramic rim ---------- */
.plate.has-photo img, .hob-plate.has-photo img, .cook-plate.has-photo img { aspect-ratio: 1; object-fit: cover; background: var(--plate); border: clamp(6px, 4.5%, 12px) solid var(--plate); box-shadow: 0 0 0 2px var(--char), inset 0 0 0 1px rgba(16, 17, 15, .08); }
.plate.has-photo img { filter: drop-shadow(0 8px 0 rgba(16, 17, 15, .18)); }
.plate-link:hover .plate.has-photo img { transform: rotate(8deg) scale(1.04); }
.hob-plate.has-photo img { height: auto; }
.illus-note a { color: inherit; }
.photo figcaption a { color: inherit; }

/* ---------- burger menu (≤960px, JS only; without JS the nav stays a scrolling row) ---------- */
@media (max-width: 960px) {
  html.js .site-head { position: sticky; top: 0; }
  html.js { scroll-padding-top: 76px; }
  html.js .head-row { flex-wrap: nowrap; min-height: 64px; padding-block: 8px; gap: 12px; }
  html.js .brand, html.js .lang, html.js .burger { position: relative; z-index: 2; }
  html.js .lang { margin-left: auto; order: 2; }
  html.js .burger { order: 3; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 12px; border: 2px solid var(--on-dark); border-radius: 999px; background: transparent; color: var(--on-dark); cursor: pointer; font: inherit; }
  html.js .burger:hover { border-color: var(--acid); color: var(--acid); }
  html.js .burger:active { transform: scale(.97); }
  .burger-box { position: relative; width: 20px; height: 14px; display: block; }
  .burger-box span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform 240ms var(--ease-out), opacity 160ms var(--ease-out); }
  .burger-box span:nth-child(1) { top: 0; }
  .burger-box span:nth-child(2) { top: 6px; }
  .burger-box span:nth-child(3) { top: 12px; width: 62%; }
  .burger[aria-expanded="true"] { border-color: var(--acid); color: var(--acid); }
  .burger[aria-expanded="true"] .burger-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger-box span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
  .burger[aria-expanded="true"] .burger-box span:nth-child(3) { width: 100%; transform: translateY(-6px) rotate(-45deg); }
  .burger-label { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

  /* Panel: covers the viewport under the header row. Hidden = visibility hidden, so links are not focusable. */
  html.js .menu { position: fixed; inset: 0; z-index: 1; margin: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 28px; background: var(--char); padding: calc(64px + 24px) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; overscroll-behavior: contain; visibility: hidden; opacity: 0; transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms; }
  html.js.menu-open { overflow: hidden; }
  html.js.menu-open .menu { visibility: visible; opacity: 1; transition: opacity 200ms var(--ease-out); }
  html.js .nav { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  html.js .nav-item { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--char-line); transform: translateY(14px); opacity: 0; transition: transform 320ms var(--ease-out), opacity 320ms var(--ease-out); }
  html.js.menu-open .nav-item { transform: none; opacity: 1; }
  html.js.menu-open .nav-item:nth-child(2) { transition-delay: 40ms; }
  html.js.menu-open .nav-item:nth-child(3) { transition-delay: 80ms; }
  html.js.menu-open .nav-item:nth-child(4) { transition-delay: 120ms; }
  html.js.menu-open .nav-item:nth-child(5) { transition-delay: 160ms; }
  html.js .nav-item > a { font-size: clamp(1.6rem, 7.6vw, 3rem); font-weight: 900; letter-spacing: -.035em; line-height: 1; padding: 18px 0; white-space: normal; }
  html.js .nav-item > a::after { bottom: 10px; height: 4px; }
  html.js .sub-toggle { width: 52px; height: 52px; border: 2px solid var(--char-line); border-radius: 50%; color: var(--on-dark); }
  html.js .nav-item.open .sub-toggle { border-color: var(--acid); color: var(--acid); }
  html.js .chev { width: 11px; height: 11px; }
  /* Submenu becomes an accordion row inside the panel */
  html.js .sub { grid-column: 1 / -1; position: static; min-width: 0; display: none; opacity: 1; visibility: visible; transform: none; transition: none; background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 16px; max-height: none; overflow: visible; }
  html.js .sub::before { content: none; }
  html.js .nav-item.open .sub { display: block; animation: sub-in 220ms var(--ease-out); }
  html.js .sub-h { display: none; }
  html.js .sub-list a { min-height: 44px; font-size: 1rem; }
  html.js .menu-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .menu-cta { min-height: 52px; font-size: 1rem; }
  .menu-ring { width: 84px; flex: none; }
  .menu-ring .hr-track { stroke: rgba(243, 237, 226, .08); }
}
@keyframes sub-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  html.js .nav-item, html.js .menu, .burger-box span { transition: none; transform: none; }
  html.js .nav-item.open .sub { animation: none; }
}
.menu-cta { white-space: nowrap; }
@media (max-width: 400px) {
  .burger-label { display: none; }
  html.js .burger { padding: 0 12px; }
  .menu-ring { width: 64px; }
}
@media (min-width: 720px) and (max-width: 960px) {
  html.js .menu { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.page-head.with-photo h1 { font-size: clamp(2.2rem, 4.4vw, 4.2rem); overflow-wrap: break-word; hyphens: auto; }
.table-wrap { position: relative; }
@media (max-width: 400px) { .page-head h1 { font-size: 2.15rem; } }
@media (max-width: 360px) {
  .page-head h1, .rhead h1 { font-size: 1.85rem; }
  h1, h2 { overflow-wrap: break-word; hyphens: auto; }
}
@media (max-width: 400px) {
  .board-static .board-tapes > li { max-width: 46%; }
  .board-static .tape { white-space: normal; text-align: center; }
  .board-static .slot-0, .board-static .slot-2 { --x: 25%; }
  .board-static .slot-1, .board-static .slot-3 { --x: 75%; }
  .board-static .slot-1 { --y: 30%; }
}
@media (max-width: 360px) { .hub-tape { white-space: normal; max-width: 92%; } }
