/* ═══════════════════════════════════════════════════════════════════
   PlateDiary — the page system: every generated page (scripts/site-pages.mjs)
   loads this file alone. Pages that draw a still phone also load
   css/phone.css after it, for the phone's own rules; nothing here depends on it.

   The idea: a diary of meals out. Sections are courses, the definition is a
   torn-off ticket, guides are written on a bound notebook page, dish pages
   show the dish as a die-cut save, and comparisons are menus with dotted
   leaders. Brand anchors only: Cobalt, Fredoka / Handlee / Instrument Sans,
   flat fills (no outlines), the app's springs sampled into linear().

   Scoping, so the homepage can adopt the header and footer: element rules
   live under body.pd-page; .site-head and .site-foot style themselves.
   ═══════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Fredoka'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/fredoka-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/fredoka-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/fredoka-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Handlee'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/handlee-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400 700; font-style: normal; font-display: swap; src: url('/assets/fonts/instrument-sans-latin.woff2') format('woff2'); }

/* ── tokens: Cobalt, exactly as src/design/themes.ts ── */

:root {
  --surface: #EEF0F7;
  --sheet: #FBFCFF;
  --ink: #131A2E;
  --accent: #2F4FA0;
  --on-accent: #FFFFFF;
  --paper: #FFFDF9;
  --font-display: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --font-hand: 'Handlee', 'Segoe Print', cursive;
  --font-ui: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  /* the app's springs (peel 220/24, snap 300/30, soft 120/20) */
  --peel: linear(0, 0.033, 0.111, 0.216, 0.33, 0.441, 0.548, 0.641, 0.725, 0.795, 0.851, 0.896, 0.932, 0.958, 0.978, 0.992, 1.002, 1.008, 1.011, 1.012, 1.013, 1.012, 1.011, 1.01, 1.008, 1.007, 1.005, 1.004, 1.003, 1.002, 1.002, 1.001, 1);
  --snap: linear(0, 0.03, 0.105, 0.2, 0.304, 0.408, 0.509, 0.598, 0.676, 0.744, 0.802, 0.849, 0.887, 0.917, 0.941, 0.959, 0.973, 0.983, 0.991, 0.996, 1, 1.002, 1.003, 1.004, 1.004, 1.004, 1.004, 1.003, 1.003, 1.002, 1.002, 1.002, 1);
  --soft: linear(0, 0.021, 0.072, 0.141, 0.221, 0.302, 0.384, 0.463, 0.537, 0.604, 0.665, 0.718, 0.765, 0.805, 0.839, 0.869, 0.894, 0.915, 0.932, 0.946, 0.958, 0.967, 0.975, 0.981, 0.986, 0.99, 0.993, 0.995, 0.997, 0.998, 0.999, 1, 1);
  --t-peel: 586ms;
  --t-snap: 484ms;
  --t-soft: 622ms;
  color-scheme: light;
}

:root,
.screen {
  --sunken: color-mix(in oklab, var(--ink) 6%, var(--surface));
  --raised: var(--sheet);
  --ink-muted: color-mix(in oklab, var(--ink) 70%, var(--surface));
  --ink-faint: color-mix(in oklab, var(--ink) 38%, var(--surface));
  --accent-soft: color-mix(in oklab, var(--accent) 14%, var(--sheet));
  --accent-text: var(--accent);
  --outline: color-mix(in oklab, var(--ink) 11%, transparent);
  --scrim: color-mix(in oklab, var(--ink) 38%, transparent);
  --glow: color-mix(in oklab, var(--accent) 26%, transparent);
  --shadow-float: 0 1px 2px color-mix(in oklab, var(--ink) 7%, transparent),
    0 10px 28px -12px color-mix(in oklab, var(--ink) 22%, transparent);
  --shadow-lift: 0 24px 60px -24px color-mix(in oklab, var(--ink) 40%, transparent);
  --shadow-capture: 0 10px 26px -6px color-mix(in oklab, var(--accent) 55%, transparent);
  --mark-page: var(--accent-soft);
  --mark-plate: var(--accent);
  --mark-rim: var(--on-accent);
  --mark-coil: var(--ink);
  --mark-hole: var(--surface);
  --mark-ground: var(--sheet);
  /* page-only */
  --rule: color-mix(in oklab, var(--accent) 13%, transparent);
  --die: var(--paper);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #0D1120;
    --sheet: #161B2E;
    --ink: #E7EBF7;
    --accent: #8EA7EC;
    --on-accent: #131A2E;
    color-scheme: dark;
  }

  :root:not([data-theme="light"]),
  :root:not([data-theme="light"]) .screen {
    --sunken: color-mix(in oklab, var(--ink) 7%, var(--surface));
    --raised: color-mix(in oklab, var(--ink) 4%, var(--sheet));
    --accent-soft: color-mix(in oklab, var(--accent) 20%, var(--sheet));
    --scrim: color-mix(in oklab, #000 55%, transparent);
    --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 30px 70px -24px rgba(0, 0, 0, 0.75);
    --mark-page: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
    --mark-plate: var(--ink);
    --mark-rim: color-mix(in srgb, var(--accent) 50%, var(--surface));
    --mark-coil: var(--accent);
    --mark-hole: var(--surface);
    --rule: color-mix(in oklab, var(--accent) 16%, transparent);
    --die: #F4F1EA;
  }
}

:root[data-theme="dark"] {
  --surface: #0D1120;
  --sheet: #161B2E;
  --ink: #E7EBF7;
  --accent: #8EA7EC;
  --on-accent: #131A2E;
  color-scheme: dark;
}

:root[data-theme="dark"],
:root[data-theme="dark"] .screen {
  --sunken: color-mix(in oklab, var(--ink) 7%, var(--surface));
  --raised: color-mix(in oklab, var(--ink) 4%, var(--sheet));
  --accent-soft: color-mix(in oklab, var(--accent) 20%, var(--sheet));
  --scrim: color-mix(in oklab, #000 55%, transparent);
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 30px 70px -24px rgba(0, 0, 0, 0.75);
  --mark-page: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  --mark-plate: var(--ink);
  --mark-rim: color-mix(in srgb, var(--accent) 50%, var(--surface));
  --mark-coil: var(--accent);
  --mark-hole: var(--surface);
  --rule: color-mix(in oklab, var(--accent) 16%, transparent);
  --die: #F4F1EA;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-peel: 1ms;
    --t-snap: 1ms;
    --t-soft: 1ms;
  }
}

.pd-mark .pg { fill: var(--mark-page); }
.pd-mark .pl { fill: var(--mark-plate); }
.pd-mark .rm { fill: none; stroke: var(--mark-rim); stroke-width: 3.2; }
.pd-mark .cl { fill: var(--mark-coil); }
.pd-mark .hl { fill: var(--mark-hole); }

/* ── base (generated pages only; :where() keeps it at zero specificity, so
      every component rule below wins without a fight) ── */

body.pd-page,
body.pd-page *,
body.pd-page *::before,
body.pd-page *::after {
  box-sizing: border-box;
}

html:has(body.pd-page) {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.pd-page) {
    scroll-behavior: auto;
  }
}

body.pd-page {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

:where(.pd-page) img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
}

:where(.pd-page) :where(h1, h2, h3, p, ul, ol, dl, dd, figure) {
  margin: 0;
}

:where(.pd-page) a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
  -webkit-tap-highlight-color: transparent;
}

:where(.pd-page) :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Neither Fredoka nor Handlee has an italic: emphasis is weight, not slant. */
:where(.pd-page) em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

.hand {
  font-family: var(--font-hand);
  font-weight: 400;
}

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
}

.skip:focus {
  top: 12px;
}

/* buttons: .pill is the name analytics.js listens to (cta_click), on every page */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--sheet);
  color: var(--ink);
  font: 500 17px/1 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-float);
  transition: translate var(--t-snap) var(--snap), opacity 120ms var(--snap);
}

.pill:hover {
  translate: 0 -2px;
}

.pill:active {
  opacity: 0.72;
  translate: 0 0;
}

.pill--accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-capture);
}

.pill--small {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 15px;
}

/* ═══ the header ═════════════════════════════════════════════════════ */

.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 64px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 12px;
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  font: 500 15px/1 var(--font-ui);
  color: var(--ink);
}

.site-head *,
.site-foot * {
  box-sizing: border-box;
}

.site-head__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.site-head__mark {
  flex: none;
  width: 36px;
  height: auto;
}

.site-head__word {
  font: 600 22px/1 var(--font-display);
  letter-spacing: -0.01em;
}

.site-head__dot {
  color: var(--accent);
}

.site-head__nav {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--sunken);
}

.site-head__nav a,
.site-menu__panel a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font: 600 14px/1 var(--font-ui);
  text-decoration: none;
  transition: background-color var(--t-snap) var(--snap);
}

.site-head__nav a:hover {
  background: color-mix(in oklab, var(--ink) 7%, var(--surface));
}

.site-head__nav a[aria-current] {
  background: var(--sheet);
  color: var(--accent-text);
  box-shadow: var(--shadow-float);
}

.site-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.site-head__round {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink);
  cursor: pointer;
  transition: opacity 120ms var(--snap);
}

.site-head__round:active {
  opacity: 0.72;
}

/* the phone menu: a <details>, so it opens with JS off */
.site-menu {
  position: relative;
  display: none;
}

.site-menu__btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--sunken);
  font: 600 15px/1 var(--font-ui);
  cursor: pointer;
}

.site-menu__btn::-webkit-details-marker {
  display: none;
}

.site-menu__btn::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  transition: rotate var(--t-snap) var(--snap), margin var(--t-snap) var(--snap);
}

.site-menu[open] .site-menu__btn::after {
  rotate: 225deg;
  margin-top: 4px;
}

.site-menu__panel {
  /* pinned under the (fixed) bar, full width less the gutters */
  position: fixed;
  top: 64px;
  left: 16px;
  right: 16px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 22px;
  background: var(--sheet);
  box-shadow: var(--shadow-lift);
  transform-origin: 50% 0;
  animation: pd-pop var(--t-peel) var(--peel);
}

.site-menu__panel a {
  height: 46px;
  border-radius: 14px;
  font: 500 18px/1 var(--font-display);
}

.site-menu__panel a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent-text);
}

@keyframes pd-pop {
  from {
    opacity: 0;
    scale: 0.92;
  }
}

@media (max-width: 899px) {
  .site-head {
    height: 56px;
    gap: 8px;
  }

  .site-head__nav,
  .site-head__word {
    display: none;
  }

  .site-menu {
    display: block;
  }
}

@media (max-width: 359px) {
  .site-head .pill--small {
    display: none;
  }
}

/* ═══ the page ═══════════════════════════════════════════════════════ */

.pd-wrap {
  width: min(1120px, 100% - 2 * clamp(16px, 4vw, 48px));
  margin-inline: auto;
}

.pd-main {
  padding: 96px 0 56px;
}

.pd-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-muted);
}

.pd-crumbs li + li::before {
  content: '›';
  margin-right: 6px;
  color: var(--ink-faint);
}

.pd-crumbs a {
  color: inherit;
}

.pd-flag {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 15px;
}

/* ── the hero ── */

.pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding-bottom: 40px;
}

.pd-hero--visual {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.pd-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 13px/1.2 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* a tiny plate, drawn in fills */
.pd-kicker::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0 42%, var(--accent) 43% 100%);
}

.pd-h1 {
  margin: 20px 0 18px;
  font: 600 clamp(40px, 6.2vw, 82px)/0.98 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.pd-h1 .hand {
  display: block;
  margin-top: 0.14em;
  font-size: 0.74em;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  rotate: -1.2deg;
  transform-origin: 0 50%;
}

.pd-lede {
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--ink-muted);
  text-wrap: pretty;
}

.pd-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pd-note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-muted);
}

/* ── a scatter of die-cut saves ── */

.pd-scatter {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  justify-self: center;
}

.pd-scatter img {
  position: absolute;
  width: 54%;
  filter: drop-shadow(0 14px 18px color-mix(in oklab, var(--ink) 20%, transparent));
  cursor: pointer;
}

.pd-scatter img:nth-child(1) { left: 0; top: 6%; rotate: -9deg; }
.pd-scatter img:nth-child(2) { right: 0; top: 0; rotate: 8deg; }
.pd-scatter img:nth-child(3) { left: 22%; bottom: 0; rotate: -2deg; }

/* (a still phone, .mini, lives in css/phone.css — loaded only where one is drawn) */

/* ── In short: the torn-off ticket ── */

.pd-short {
  position: relative;
  margin: 8px 0 24px;
  padding: 62px clamp(22px, 4vw, 44px) 26px;
  border-radius: 28px;
  background: var(--accent);
  color: var(--on-accent);
  /* the perforation: a row of punched holes in the surface colour */
  -webkit-mask: radial-gradient(circle 7px at 50% 0, #0000 98%, #000) 0 0 / 26px 100% repeat-x;
  mask: radial-gradient(circle 7px at 50% 0, #0000 98%, #000) 0 0 / 26px 100% repeat-x;
}

.pd-short__tag {
  position: absolute;
  top: 18px;
  left: clamp(18px, 4vw, 40px);
  padding: 8px 14px 7px;
  border-radius: 10px;
  background: var(--die);
  color: #131A2E;
  font: 400 19px/1 var(--font-hand);
  rotate: -2deg;
}

.pd-short__text {
  max-width: 40em;
  padding-top: 8px;
  font: 500 clamp(20px, 2.3vw, 27px)/1.38 var(--font-display);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.pd-short__text a,
.pd-short__text em {
  color: inherit;
}

.pd-short__date {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.8;
}

/* ── courses ── */

.pd-sec {
  display: grid;
  grid-template-columns: 96px minmax(0, 760px);
  gap: 0 28px;
  padding: 56px 0;
}

.pd-sec__no {
  position: sticky;
  top: 96px;
  align-self: start;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sheet) 0 58%, var(--accent-soft) 60% 100%);
  color: var(--accent-text);
  font: 600 24px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

.pd-sec__main {
  min-width: 0;
}

.pd-sec__kicker {
  font: 400 20px/1.2 var(--font-hand);
  color: var(--accent-text);
  rotate: -1deg;
  transform-origin: 0 50%;
}

.pd-h2 {
  margin: 6px 0 16px;
  font: 500 clamp(28px, 3.6vw, 44px)/1.06 var(--font-display);
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.pd-sec__main > p {
  max-width: 40em;
  font-size: 18px;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.pd-sec__main > p + p {
  margin-top: 14px;
}

.pd-sec__main > * + :is(ul, ol, div, table) {
  margin-top: 22px;
}

/* lists: each point a little plate on the table */
.pd-list {
  display: grid;
  gap: 10px;
  max-width: 44em;
  padding: 0;
  list-style: none;
}

.pd-list li {
  position: relative;
  padding: 14px 18px 14px 50px;
  border-radius: 18px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
  color: var(--ink-muted);
}

.pd-list li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 15px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0 40%, var(--accent) 42% 100%);
}

.pd-list b {
  color: var(--ink);
}

/* tables: flat rows, the last column is PlateDiary's */
.pd-table-wrap {
  overflow-x: auto;
  margin-inline: -4px;
  padding: 0 4px 4px;
}

.pd-table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 15px;
}

.pd-table caption {
  caption-side: top;
  padding-bottom: 2px;
  text-align: left;
  font: 400 17px/1.3 var(--font-hand);
  color: var(--ink-muted);
}

.pd-table th,
.pd-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.pd-table thead th {
  font: 600 12px/1.3 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.pd-table tbody > tr > * {
  background: var(--sheet);
  color: var(--ink-muted);
}

.pd-table tbody th {
  font: 500 16px/1.3 var(--font-display);
  color: var(--ink);
}

.pd-table tbody tr > :first-child {
  border-radius: 14px 0 0 14px;
}

.pd-table tbody tr > :last-child {
  border-radius: 0 14px 14px 0;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

/* ── guides: written on a bound notebook page ── */

.pd-notebook {
  position: relative;
  margin: 12px 0 32px;
  padding: 24px clamp(18px, 4vw, 48px) 24px calc(clamp(18px, 4vw, 48px) + 30px);
  border-radius: 28px;
  background:
    /* binding holes down the spine, like the logo */
    radial-gradient(circle 6px at 22px 50%, var(--surface) 96%, #0000) 0 0 / 44px 44px repeat-y,
    /* the margin rule */
    linear-gradient(90deg, #0000 calc(clamp(18px, 4vw, 48px) + 14px), color-mix(in oklab, var(--accent) 34%, transparent) 0 calc(clamp(18px, 4vw, 48px) + 16px), #0000 0),
    /* ruled lines */
    repeating-linear-gradient(#0000 0 31px, var(--rule) 31px 32px) 0 12px,
    var(--sheet);
  box-shadow: var(--shadow-float);
}

.pd-notebook .pd-sec {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0 18px;
  padding: 28px 0;
}

.pd-notebook .pd-sec__no {
  width: 52px;
  height: 52px;
  background: var(--accent-soft);
  font: 400 26px/1 var(--font-hand);
  rotate: -4deg;
  top: 88px;
}

.pd-notebook .pd-sec__main > p {
  line-height: 32px;
}

.pd-notebook .pd-list li,
.pd-notebook .pd-steps li {
  box-shadow: none;
  background: color-mix(in oklab, var(--surface) 55%, var(--sheet));
}

/* steps: big handwritten numbers */
.pd-steps {
  display: grid;
  gap: 12px;
  max-width: 44em;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.pd-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 14px;
  padding: 16px 20px 16px 16px;
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.pd-steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 400 24px/1 var(--font-hand);
}

.pd-steps b {
  font: 500 19px/1.3 var(--font-display);
}

.pd-steps span {
  color: var(--ink-muted);
}

/* ── the menu: dotted leaders, like a place page ── */

.pd-menu {
  max-width: 44em;
  padding: 22px clamp(18px, 3vw, 28px) 18px;
  border-radius: 24px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.pd-menu__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 8px;
  font: 600 13px/1.2 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.pd-menu__title a {
  font: 400 17px/1 var(--font-hand);
  letter-spacing: 0;
  text-transform: none;
}

.pd-menu ul {
  display: grid;
  padding: 0;
  list-style: none;
}

.pd-menu__line {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(28px, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  margin: 0 -12px;
  padding: 8px 12px;
  border-radius: 14px;
}

.pd-menu__line > a,
.pd-menu__line > span {
  font: 400 20px/1.25 var(--font-hand);
  color: var(--ink);
  text-decoration: none;
}

.pd-menu__line > a:hover {
  color: var(--accent-text);
}

.pd-menu__line > i {
  height: 4px;
  align-self: end;
  margin-bottom: 7px;
  background: radial-gradient(circle 1.5px, var(--ink-faint) 96%, #0000) 0 50% / 8px 4px repeat-x;
}

.pd-menu__line > b {
  font: 600 18px/1 var(--font-display);
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.pd-menu__line > small {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--ink-muted);
}

.pd-menu__line.is-here {
  background: var(--accent-soft);
}

.pd-menu__line.is-here > small::after {
  content: ' · this page';
  font-family: var(--font-hand);
  color: var(--accent-text);
}

/* ── a pile of cards: hubs and related pages ── */

.pd-pile {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 22px 18px;
  padding: 10px 0 0;
  list-style: none;
}

.pd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 20px 18px;
  border-radius: 22px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
  color: var(--ink);
  text-decoration: none;
  rotate: var(--tilt, 0deg);
  transition: rotate var(--t-snap) var(--snap), translate var(--t-snap) var(--snap), box-shadow var(--t-snap) var(--snap);
}

.pd-pile > li:nth-child(4n + 1) .pd-card { --tilt: -1.4deg; }
.pd-pile > li:nth-child(4n + 2) .pd-card { --tilt: 1.1deg; }
.pd-pile > li:nth-child(4n + 3) .pd-card { --tilt: -0.5deg; }
.pd-pile > li:nth-child(4n + 4) .pd-card { --tilt: 1.6deg; }

.pd-card:hover {
  rotate: 0deg;
  translate: 0 -4px;
  box-shadow: var(--shadow-lift);
}

.pd-card__cut {
  position: absolute;
  right: 10px;
  top: -18px;
  width: 76px;
  rotate: 9deg;
  filter: drop-shadow(0 6px 8px color-mix(in oklab, var(--ink) 22%, transparent));
}

.pd-card__eyebrow {
  font: 600 12px/1.2 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.pd-card__cut + .pd-card__eyebrow {
  padding-right: 78px;
}

.pd-card__name {
  margin: 10px 0 8px;
  font: 500 22px/1.15 var(--font-display);
}

.pd-card__blurb {
  flex: 1;
  font-size: 15px;
  color: var(--ink-muted);
}

.pd-card__go {
  margin-top: 14px;
  font: 400 18px/1 var(--font-hand);
  color: var(--accent-text);
}

/* ── a dish page ── */

.pd-hero--dish {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
}

.pd-hero--dish .pd-h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.pd-answer {
  max-width: 30em;
  font: 500 clamp(19px, 1.9vw, 23px)/1.4 var(--font-display);
}

.pd-answer b {
  color: var(--accent-text);
  font-weight: 600;
}

/* the dish as a die-cut save */
.pd-save {
  position: relative;
  justify-self: center;
  width: min(100%, 320px);
  padding: 18px 18px 20px;
  border-radius: 34px;
  background: var(--die);
  box-shadow: var(--shadow-lift);
  rotate: -3deg;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pd-save__art {
  display: grid;
  place-items: center;
  aspect-ratio: 1.1;
}

.pd-save__art img {
  width: 92%;
  filter: drop-shadow(0 10px 12px rgba(19, 26, 46, 0.18));
}

.pd-save__tag {
  display: table;
  margin: 6px auto 0;
  padding: 6px 14px 5px;
  border-radius: 10px;
  background: #131A2E;
  color: #FFFDF9;
  font: 400 21px/1.2 var(--font-hand);
  rotate: 2deg;
}

.pd-save__chip {
  position: absolute;
  right: -10px;
  top: 14px;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 22px/1 var(--font-display);
  box-shadow: var(--shadow-capture);
  rotate: 7deg;
}

/* a plate drawn for a dish with no photo */
.pd-plate .p1 { fill: #FFFFFF; }
.pd-plate .p2 { fill: #E6EAF5; }
.pd-plate .p3 { fill: #FFFFFF; }
.pd-plate .p4 { fill: #2F4FA0; font: 600 54px var(--font-display); }
.pd-plate .p5 { fill: rgba(19, 26, 46, 0.08); }

/* at a glance */
.pd-glance {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.pd-glance__card {
  min-width: 0;
  padding: 18px 20px 20px;
  border-radius: 22px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.pd-glance__h {
  margin-bottom: 14px;
  font: 600 12px/1.2 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* the range: low to high on one scale shared by every dish page */
.pd-range {
  position: relative;
  height: 16px;
  margin: 40px 0 34px;
  border-radius: 999px;
  background: var(--sunken);
}

.pd-range__band {
  position: absolute;
  inset: 0 calc(100% - var(--hi)) 0 var(--lo);
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 38%, var(--sheet));
}

.pd-range__dot {
  position: absolute;
  left: var(--at);
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--sheet);
}

.pd-range__dot b {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  translate: -50% 0;
  font: 600 20px/1 var(--font-display);
  color: var(--accent-text);
  white-space: nowrap;
}

.pd-range__lo,
.pd-range__hi {
  position: absolute;
  top: calc(100% + 8px);
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.pd-range__lo { left: var(--lo); translate: -50% 0; }
.pd-range__hi { left: var(--hi); translate: -50% 0; }

.pd-range__note {
  font-size: 13px;
  color: var(--ink-muted);
}

/* protein, carbs and fat in grams */
.pd-pcf {
  display: flex;
  gap: 3px;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
}

.pd-pcf__p { background: var(--accent); }
.pd-pcf__c { background: color-mix(in oklab, var(--accent) 40%, var(--sheet)); }
.pd-pcf__f { background: color-mix(in oklab, var(--ink) 55%, var(--surface)); }

.pd-pcf__key {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.pd-pcf__key li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-pcf__key i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.pd-pcf__key b {
  margin-left: auto;
}

.pd-facts {
  display: grid;
  gap: 6px;
}

.pd-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--sunken);
  font-size: 15px;
}

.pd-facts dt {
  color: var(--ink-muted);
}

.pd-facts dd {
  font-weight: 600;
  text-align: right;
}

/* the opt-in card */
.pd-optin {
  position: relative;
  max-width: 44em;
  padding: 26px clamp(20px, 3vw, 30px);
  border-radius: 26px;
  background: var(--accent-soft);
}

.pd-optin__tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px 5px;
  border-radius: 10px;
  background: var(--die);
  color: #131A2E;
  font: 400 18px/1.2 var(--font-hand);
  rotate: -2deg;
}

.pd-optin p + p {
  margin-top: 12px;
}

.pd-optin .pd-cta {
  margin-top: 20px;
}

/* method + sources */
.pd-method {
  max-width: 44em;
  padding: 22px clamp(20px, 3vw, 28px);
  border-radius: 22px;
  background: var(--sunken);
}

.pd-method p {
  color: var(--ink-muted);
}

.pd-method p + p {
  margin-top: 10px;
}

.pd-method__date {
  font: 400 19px/1.3 var(--font-hand);
  color: var(--ink);
}

.pd-sources {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-left: 22px;
  font-size: 15px;
  color: var(--ink-muted);
}

.pd-sources a {
  overflow-wrap: anywhere;
}

/* ── FAQ (class names shared with analytics.js faq_open) ── */

.pd-faq {
  max-width: 820px;
  padding: 56px 0 24px;
}

.pd-faq .faq-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.pd-faq .faq-item {
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.pd-faq .faq-item__q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font: 500 19px/1.3 var(--font-display);
}

.pd-faq .faq-item__q::-webkit-details-marker {
  display: none;
}

.pd-faq .faq-item__icon {
  flex: none;
  color: var(--accent-text);
  transition: rotate var(--t-snap) var(--snap);
}

.pd-faq .faq-item[open] .faq-item__icon {
  rotate: 180deg;
}

.pd-faq .faq-item__a {
  padding: 0 22px 20px;
  color: var(--ink-muted);
}

/* ═══ the footer: a menu board ═══════════════════════════════════════ */

.site-foot {
  position: relative;
  margin-top: 96px;
  padding: 0 clamp(8px, 2vw, 24px) clamp(8px, 2vw, 24px);
  font: 400 16px/1.5 var(--font-ui);
  text-align: center;
}

.site-foot__board {
  position: relative;
  padding: 96px clamp(16px, 4vw, 56px) 20px;
  border-radius: 36px;
  background: var(--ink);
  color: var(--surface);
}

.site-foot__cuts {
  position: absolute;
  left: 50%;
  top: -54px;
  width: 300px;
  height: 120px;
  translate: -50% 0;
  pointer-events: none;
}

.site-foot__cuts img {
  position: absolute;
  width: 112px;
  height: auto;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.3));
}

.site-foot__cuts img:nth-child(1) { left: 0; top: 18px; rotate: -12deg; }
.site-foot__cuts img:nth-child(2) { left: 94px; top: 0; rotate: 4deg; }
.site-foot__cuts img:nth-child(3) { right: 0; top: 22px; rotate: 14deg; }

.site-foot__kicker {
  margin: 0;
  font: 600 13px/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.site-foot__title {
  margin: 14px 0 0;
  font: 600 clamp(34px, 5vw, 64px)/1 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.site-foot__title .hand {
  display: block;
  margin-top: 0.12em;
  font-size: 0.8em;
  color: color-mix(in oklab, var(--accent) 55%, var(--surface));
  rotate: -1.5deg;
}

.site-foot .store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.site-foot .store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 22px 0 20px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: translate var(--t-snap) var(--snap), opacity 120ms var(--snap);
}

.site-foot .store-btn:hover {
  translate: 0 -3px;
}

.site-foot .store-btn:active {
  opacity: 0.72;
}

.site-foot .store-btn__label {
  display: grid;
  gap: 1px;
  text-align: left;
}

.site-foot .store-btn__kicker {
  font-size: 10px;
  letter-spacing: 1.4px;
  line-height: 1.3;
  text-transform: uppercase;
  opacity: 0.75;
}

.site-foot .store-btn__name {
  font: 600 19px/1.15 var(--font-display);
  white-space: nowrap;
}

/* the store buttons in a hero (the /id landing): ink fills on the page */
.pd-hero .store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pd-hero .store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 18px 0 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  transition: translate var(--t-snap) var(--snap), opacity 120ms var(--snap);
}

.pd-hero .store-btn:hover {
  translate: 0 -2px;
}

.pd-hero .store-btn:active {
  opacity: 0.72;
}

.pd-hero .store-btn__label {
  display: grid;
  gap: 1px;
  text-align: left;
}

.pd-hero .store-btn__kicker {
  font-size: 10px;
  letter-spacing: 1.2px;
  line-height: 1.3;
  text-transform: uppercase;
  opacity: 0.75;
}

.pd-hero .store-btn__name {
  font: 600 17px/1.15 var(--font-display);
  white-space: nowrap;
}

/* the language switch (paired pages): last in the nav, quieter than a hub link */
.site-head__nav a.site-head__lang,
.site-menu__panel a.site-head__lang {
  color: var(--accent-text);
  font-weight: 500;
}

/* with six hub links the bar has no room for it between 900 and 1099 px:
   there the switch lives in the footer's small print only (and the phone
   menu below 900) */
@media (min-width: 900px) and (max-width: 1099px) {
  .site-head__nav a.site-head__lang {
    display: none;
  }
}

.site-foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px 24px;
  max-width: 1040px;
  margin: 64px auto 0;
  padding-top: 40px;
  background: linear-gradient(color-mix(in oklab, var(--surface) 14%, transparent), color-mix(in oklab, var(--surface) 14%, transparent)) 0 0 / 100% 1px no-repeat;
  text-align: left;
}

.foot-col__h {
  margin: 0 0 8px;
  font: 600 12px/1.3 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--surface) 62%, var(--ink));
}

.foot-col__h a {
  color: inherit;
  text-decoration: none;
}

.foot-col ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-col li a {
  display: inline-block;
  padding: 4px 0;
  color: var(--surface);
  font-size: 15px;
  text-decoration: none;
}

.foot-col li a:hover {
  text-decoration: underline;
}

.foot-col__note {
  margin: 8px 0 0;
  font: 400 15px/1.3 var(--font-hand);
  color: color-mix(in oklab, var(--surface) 70%, var(--ink));
}

.site-foot__small {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 48px 0 0;
  font-size: 14px;
  color: color-mix(in oklab, var(--surface) 62%, var(--ink));
}

.site-foot__small a {
  color: inherit;
}

.site-foot__small span {
  display: flex;
  gap: 14px;
}

/* ═══ phones ═════════════════════════════════════════════════════════ */

@media (max-width: 899px) {
  .pd-main {
    padding-top: 80px;
  }

  .pd-hero--visual,
  .pd-hero--dish {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-hero {
    gap: 28px;
  }

  .pd-scatter {
    width: min(100%, 320px);
  }

  .pd-sec {
    grid-template-columns: minmax(0, 1fr);
    padding: 40px 0;
  }

  .pd-sec__no {
    position: static;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    font-size: 19px;
  }

  .pd-notebook {
    padding-left: 44px;
    padding-right: 16px;
    background:
      radial-gradient(circle 5px at 16px 50%, var(--surface) 96%, #0000) 0 0 / 32px 36px repeat-y,
      repeating-linear-gradient(#0000 0 31px, var(--rule) 31px 32px) 0 12px,
      var(--sheet);
  }

  .pd-notebook .pd-sec {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-glance {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-save {
    width: min(78%, 300px);
  }

  .site-foot__board {
    padding-top: 84px;
    border-radius: 28px;
  }

  .site-foot__cuts {
    width: 240px;
    top: -44px;
  }

  .site-foot__cuts img {
    width: 92px;
  }

  .site-foot__cuts img:nth-child(2) {
    left: 74px;
  }
}

@media (max-width: 520px) {
  .site-foot__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-short__text {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu__panel {
    animation: none;
  }
}
