/* The Other Half — shared design tokens (book, printables, site, Companion). */

@font-face { font-family: "Young Serif"; src: url("../fonts/YoungSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/AtkinsonNext-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/AtkinsonNext-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/AtkinsonNext-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/AtkinsonNext-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Next", "Atkinson Hyperlegible", Verdana, sans-serif;

  /* Paper and ink (all text pairs pass WCAG AA; --ink-2 passes AAA on --paper) */
  --paper: #f7f1e6;
  --paper-2: #eee5d3;
  --paper-3: #e4d8c1;
  --white: #ffffff;
  --ink: #1d2a22;
  --ink-2: #4a5249;
  --rule: #d8cbb4;
  --rule-strong: #b9aa8f;

  /* Accents */
  --tomato: #b3402a;
  --tomato-deep: #9a3321;
  --tomato-wash: #f6dfd6;
  --sage: #4e6e46;
  --sage-wash: #e3ebd8;
  --butter: #efcb6e;
  --butter-wash: #faf0cf;

  /* One accent per week, for wayfinding (white text on each passes AA) */
  --w1: #3f6f45;
  --w1-wash: #e1ebdc;
  --w2: #a63d27;
  --w2-wash: #f6e0d7;
  --w3: #8a5a12;
  --w3-wash: #f4e6cc;
  --w4: #25646a;
  --w4-wash: #dbebeb;

  --radius: 10px;
  --radius-lg: 18px;
}

.fr { font-feature-settings: "frac" 1; font-variant-numeric: diagonal-fractions; }
.fr-gap { display: inline-block; width: 0.08em; }
.tnum { font-variant-numeric: tabular-nums; }
.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; }

/* The Other Half — public site (product page, free guides, legal pages).
   One design system: every length, radius, shadow, size and timing below comes from
   the tokens in :root (tests/site/css.test.ts fails the build on off-scale values).
   Shared colours (paper, ink, tomato, week accents) come from tokens.css, so the site
   matches the PDFs. */

/* Metric-matched fallbacks (scripts/fonts/fallback-metrics.ts): no layout shift when the fonts arrive. */
@font-face { font-family: "Atkinson Next Fallback"; src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans"); font-weight: 400; size-adjust: 99.40%; ascent-override: 98.99%; descent-override: 31.79%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Next Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arimo Bold"), local("Liberation Sans Bold"); font-weight: 600 700; size-adjust: 99.45%; ascent-override: 98.94%; descent-override: 31.77%; line-gap-override: 0%; }
@font-face { font-family: "Young Serif Fallback"; src: local("Georgia"), local("Noto Serif"), local("DejaVu Serif"); font-weight: 400; size-adjust: 112.72%; ascent-override: 92.79%; descent-override: 32.47%; line-gap-override: 0%; }

:root {
  color-scheme: light dark;
  --font-display: "Young Serif", "Young Serif Fallback", Georgia, serif;
  --font-body: "Atkinson Next", "Atkinson Next Fallback", Arial, sans-serif;

  /* Colour roles (light). Body text ≥ 7:1, secondary text ≥ 7:1 on paper and paper-2. */
  --bg: var(--paper);
  --bg-2: #efe6d4;
  --surface: #fffdf8;
  --text: var(--ink);
  --text-2: #414a42;
  --line: var(--rule);
  --line-strong: var(--rule-strong);
  --control-line: #857b6b;
  --link: #8c2d1d;
  --link-hover: var(--ink);
  --accent-text: #8c2d1d;
  --button: #9a3321;
  --button-hover: #7c2817;
  --button-text: #ffffff;
  --focus: #1d2a22;
  --tint: var(--tomato-wash);
  --tint-2: var(--butter-wash);
  --stamp: var(--butter);
  --shadow-color: 29 42 34;
  --scrim: rgb(20 26 22 / 0.82);
  --veg: var(--sage);
  --ok: var(--sage);
  --paper-white: #ffffff;
  --w1-ink: var(--w1);
  --w2-ink: var(--w2);
  --w3-ink: var(--w3);
  --w4-ink: var(--w4);

  /* Spacing: one scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --section-y: clamp(4rem, 2.6667rem + 5.9259vw, 8rem);
  --gutter: clamp(1rem, 0.6667rem + 1.4815vw, 2rem);

  /* Containers */
  --container: 72rem;
  --container-text: 44rem;
  --measure: 66ch;

  /* Type: one fluid scale, 360px → 1440px */
  --step--1: 1rem;
  --step-0: clamp(1.125rem, 1.0833rem + 0.1852vw, 1.25rem);
  --step-1: clamp(1.25rem, 1.1667rem + 0.3704vw, 1.5rem);
  --step-2: clamp(1.4375rem, 1.3125rem + 0.5556vw, 1.8125rem);
  --step-3: clamp(1.6875rem, 1.4583rem + 1.0185vw, 2.375rem);
  --step-4: clamp(2rem, 1.625rem + 1.6667vw, 3.125rem);
  --step-5: clamp(2.375rem, 1.75rem + 2.7778vw, 4.25rem);
  --leading: 1.55;
  --leading-tight: 1.12;

  /* Shape */
  --radius-1: 0.5rem;
  --radius-2: 1rem;
  --border-width: 1px;
  --border: var(--border-width) solid var(--line);
  --shadow-1: 0 1px 2px rgb(var(--shadow-color) / 0.06), 0 6px 16px rgb(var(--shadow-color) / 0.07);
  --shadow-2: 0 2px 6px rgb(var(--shadow-color) / 0.08), 0 22px 48px rgb(var(--shadow-color) / 0.16);
  --tap: 3rem;
  --focus-ring: 3px;

  /* Motion: one family */
  --duration: 160ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a16;
    --bg-2: #1a221d;
    --surface: #202924;
    --text: #f3ece0;
    --text-2: #cbc4b7;
    --line: #34403a;
    --line-strong: #55635b;
    --control-line: #74867c;
    --link: #f2a48c;
    --link-hover: #f3ece0;
    --accent-text: #f2a48c;
    --button: #ef9a80;
    --button-hover: #f6b6a2;
    --button-text: #141a16;
    --focus: #f3ece0;
    --tint: #3a2620;
    --tint-2: #3a3320;
    --stamp: #6b5a1f;
    --shadow-color: 0 0 0;
    --scrim: rgb(0 0 0 / 0.82);
    --veg: #a9cf9b;
    --ok: #a9cf9b;
    --w1-ink: #9fcca4;
    --w2-ink: #f2a48c;
    --w3-ink: #e4bd78;
    --w4-ink: #86c9cf;
  }
  .mark [stroke] { stroke: var(--text); }
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--tap) + var(--space-7)); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--step-0) / var(--leading) var(--font-body); font-kerning: normal; }
img, svg, picture { display: block; max-width: 100%; height: auto; }
svg.icon, svg.mark { display: inline-block; flex: none; vertical-align: middle; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: var(--leading-tight); letter-spacing: -0.01em; margin: 0; text-wrap: balance; color: var(--text); }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
h4 { font-size: var(--step-0); line-height: 1.3; }
p, li, dd, figcaption, td, th, summary { text-wrap: pretty; }
p { margin: 0; }
:where(p, ul, ol, dl, table, figure, blockquote) + :where(p, ul, ol, dl, table, figure, blockquote, h3) { margin-top: var(--space-4); }
ul, ol { margin: 0; padding-left: var(--space-5); }
li + li { margin-top: var(--space-2); }
strong, b { font-weight: 700; }
small, .fine { font-size: var(--step--1); }
a { color: var(--link); text-decoration-line: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; transition: color var(--duration) var(--ease), text-decoration-color var(--duration) var(--ease); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: var(--focus-ring) solid var(--focus); outline-offset: var(--space-1); border-radius: var(--radius-1); }
[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--tint); color: var(--text); }
hr { border: 0; border-top: var(--border); margin: var(--space-7) 0; }
abbr[title] { text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-4); top: calc(-1 * var(--space-9)); z-index: 100; background: var(--text); color: var(--bg); padding: var(--space-3) var(--space-4); border-radius: var(--radius-1); }
.skip:focus { top: var(--space-4); }
.tnum { font-variant-numeric: tabular-nums; }
.fr { font-variant-numeric: diagonal-fractions; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.container-text { width: min(var(--container-text), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section + .section { padding-top: 0; }
.section.tone { background: var(--bg-2); }
.section.tone + .section, .section + .section.tone { padding-top: var(--section-y); }
.section.tone + .section.tone { padding-top: 0; }
.section-head { max-width: var(--container-text); margin-bottom: var(--space-7); }
.section-head > * + * { margin-top: var(--space-4); }
.eyebrow { display: flex; align-items: center; gap: var(--space-2); font: 700 var(--step--1) / 1.3 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--text-2); max-width: var(--measure); }
.muted { color: var(--text-2); }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose h2 + *, .prose h3 + * { margin-top: var(--space-3); }
.grid { display: grid; gap: var(--space-5); }
@media (min-width: 48rem) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stack > * + * { margin-top: var(--space-4); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap); padding: var(--space-3) var(--space-5); border: var(--border-width) solid transparent; border-radius: var(--radius-1); font: 700 var(--step-0) / 1.2 var(--font-body); text-decoration: none; text-align: center; cursor: pointer; transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease); }
.btn:active { transform: translateY(var(--border-width)); }
.btn-primary { background: var(--button); color: var(--button-text); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--button-hover); color: var(--button-text); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--control-line); }
.btn-secondary:hover { background: var(--surface); color: var(--text); border-color: var(--text); }
.btn-large { min-height: calc(var(--tap) + var(--space-3)); padding-inline: var(--space-5); font-size: var(--step-0); }
.btn .price { font-weight: 400; }
.btn[aria-disabled="true"] { cursor: default; }
/* gumroad.js adds a Gumroad logo inside links it processes; the button already says where it goes. */
.btn .logo-full { display: none; }
.text-link { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); font-weight: 700; }
.text-link .icon { transition: transform var(--duration) var(--ease); }
.text-link:hover .icon { transform: translateX(var(--space-1)); }

/* ── Preview stamp (preview builds only) ──────────────────────────────── */
.preview-stamp { background: var(--stamp); color: var(--text); text-align: center; font-size: var(--step--1); font-weight: 700; padding: var(--space-2) var(--gutter); }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: var(--border); }
@supports (backdrop-filter: blur(1px)) { .site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); } }
.site-header .container { display: flex; align-items: center; gap: var(--space-2); min-height: calc(var(--tap) + var(--space-4)); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); color: var(--text); text-decoration: none; font: 400 var(--step-1) / 1 var(--font-display); white-space: nowrap; margin-right: auto; }
.brand:hover { color: var(--text); }
.site-nav { display: none; }
.site-nav ul { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.site-nav li + li { margin: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: var(--space-3); border-radius: var(--radius-1); color: var(--text); text-decoration: none; font-size: var(--step--1); font-weight: 600; transition: background-color var(--duration) var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--bg-2); }
.header-buy { padding-inline: var(--space-4); font-size: var(--step--1); white-space: nowrap; }
.menu { position: relative; }
.menu > summary { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-width: var(--tap); min-height: var(--tap); padding-inline: var(--space-3); border: var(--border-width) solid var(--control-line); border-radius: var(--radius-1); list-style: none; cursor: pointer; font-size: var(--step--1); font-weight: 700; transition: background-color var(--duration) var(--ease); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--surface); }
.menu[open] > summary { background: var(--surface); }
.menu-panel { position: absolute; right: 0; top: calc(100% + var(--space-2)); width: min(20rem, calc(100vw - 2 * var(--gutter))); background: var(--surface); border: var(--border); border-radius: var(--radius-2); box-shadow: var(--shadow-2); padding: var(--space-3); }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li + li { margin-top: 0; border-top: var(--border); }
.menu-panel a { display: flex; align-items: center; min-height: var(--tap); padding-inline: var(--space-3); color: var(--text); text-decoration: none; font-weight: 600; border-radius: var(--radius-1); }
.menu-panel a:hover { background: var(--bg-2); }
@media (min-width: 64rem) { .site-nav { display: block; } .menu { display: none; } }
.buy-narrow { display: none; }
@media (min-width: 30rem) { .site-header .container { gap: var(--space-4); } }
@media (max-width: 47.99rem) { .menu-label { display: none; } .menu > summary { padding-inline: 0; } }
@media (max-width: 29.99rem) { .brand { font-size: var(--step-0); } .header-buy { padding-inline: var(--space-3); } .buy-wide { display: none; } .buy-narrow { display: inline; } }
@media (max-width: 23.99rem) { .buy-price { display: none; } }
@media (max-width: 22.49rem) { .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { border-top: var(--border); padding-block: var(--space-8) var(--space-7); background: var(--bg); }
.site-footer .container { display: grid; gap: var(--space-6); }
.footer-maker { display: flex; align-items: center; gap: var(--space-3); color: var(--text); font-weight: 700; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text); font-weight: 600; }
.footer-legal { color: var(--text-2); font-size: var(--step--1); }
@media (min-width: 48rem) { .site-footer .container { grid-template-columns: 1fr auto; align-items: center; } .footer-legal { grid-column: 1 / -1; } }

/* ── Lists used as layout ─────────────────────────────────────────────── */
.thirds, .week-splits, .uses, .files, .gallery, .weeks, .dishes, .steps, .screens, .trust, .guides, .siblings, .includes, .assurances, .checklist, .key-facts, .splits, .split-uses { list-style: none; margin: 0; padding: 0; }
:is(.thirds, .week-splits, .uses, .files, .gallery, .weeks, .dishes, .steps, .screens, .trust, .guides, .siblings, .includes, .assurances, .checklist, .key-facts, .splits, .split-uses) > li + li { margin-top: 0; }

/* ── Cards and chips ──────────────────────────────────────────────────── */
.card { background: var(--surface); border: var(--border); border-radius: var(--radius-2); padding: var(--space-5); }
.card > * + * { margin-top: var(--space-3); }
.card h3 { display: flex; align-items: center; gap: var(--space-2); }
.chip { display: inline-flex; align-items: center; padding: var(--space-1) var(--space-3); border-radius: var(--radius-1); background: var(--w1); color: var(--paper-white); font-size: var(--step--1); font-weight: 700; line-height: 1.3; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding-block: var(--space-7) var(--space-8); overflow: clip; }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; }
.hero h1 { font-size: var(--step-5); }
.hero h1 .h1-line { display: block; max-width: 14ch; }
.hero h1 .eyebrow { margin-bottom: var(--space-3); }
.hero .lede { margin-top: var(--space-5); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
@media (max-width: 29.99rem) { .hero .cta-row .btn { flex: 1 1 100%; } }
.assurances { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-5); color: var(--text-2); font-size: var(--step--1); }
.assurances li { display: flex; align-items: center; gap: var(--space-2); }
.assurances .icon, .includes .icon, .fit-yes h3 .icon { color: var(--ok); }
.hero-figure { margin: 0; max-width: 42rem; justify-self: center; width: 100%; }
.hero-figure img { width: 100%; }
@media (min-width: 64rem) {
  .hero { padding-block: var(--space-8) var(--space-9); }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--space-7); }
}

/* ── Facts band ───────────────────────────────────────────────────────── */
.facts-band { border-block: var(--border); background: var(--surface); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-5); padding: var(--space-5) 0; list-style: none; color: var(--text-2); }
.facts li + li { margin-top: 0; }
.facts b { display: block; font: 400 var(--step-3) / 1.1 var(--font-display); color: var(--text); }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── How it works: the cabbage ────────────────────────────────────────── */
.cabbage { display: grid; gap: var(--space-5); align-items: stretch; }
.cabbage-source { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); text-align: center; }
.cabbage-source .emblem { width: 10rem; height: 10rem; }
.thirds { display: grid; gap: var(--space-5); }
.third-top { display: flex; align-items: center; justify-content: space-between; color: var(--w1-ink); }
.subhead { font-size: var(--step-2); margin: var(--space-8) 0 var(--space-5); }
.week-splits { display: grid; gap: var(--space-5); }
.week-split { display: grid; grid-template-columns: var(--space-8) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.week-split .emblem { width: var(--space-8); height: var(--space-8); }
.week-split > * + * { margin-top: 0; }
.week-split h3 { font-size: var(--step-1); }
.uses { margin-top: var(--space-2); }
.uses li { padding-block: var(--space-1); }
@media (min-width: 48rem) {
  .thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .week-splits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .cabbage { grid-template-columns: 12rem minmax(0, 1fr); }
}

/* ── What's inside ────────────────────────────────────────────────────── */
.inside-grid { display: grid; gap: var(--space-6); }
.inside-grid .section-head { margin-bottom: 0; }
.works-with { padding: var(--space-4) var(--space-5); border: var(--border); border-radius: var(--radius-2); background: var(--surface); }
.files { border-top: var(--border); }
.file { display: grid; grid-template-columns: var(--space-8) minmax(0, 1fr); gap: var(--space-4); padding-block: var(--space-5); border-bottom: var(--border); }
.file-n { font: 400 var(--step-2) / 1.1 var(--font-display); color: var(--accent-text); }
.file h3 { font-size: var(--step-1); }
.file-format { margin-top: var(--space-1); color: var(--text-2); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.file p + p { margin-top: var(--space-2); }
@media (min-width: 64rem) {
  .inside-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-8); align-items: start; }
  .inside-grid .section-head { position: sticky; top: calc(var(--tap) + var(--space-7)); }
}

/* ── Look inside ──────────────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-1); }
.shot img { width: 100%; background: var(--paper-white); border: var(--border); box-shadow: var(--shadow-1); transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.shot:hover img { transform: translateY(calc(-1 * var(--space-1))); box-shadow: var(--shadow-2); }
.shot:active img { transform: none; }
.shot-title { margin-top: var(--space-3); font-weight: 700; font-size: var(--step--1); }
.shot-caption { margin-top: var(--space-1); color: var(--text-2); font-size: var(--step--1); }
.sample { display: grid; gap: var(--space-4); margin-top: var(--space-7); padding: var(--space-5); background: var(--surface); border: var(--border); border-radius: var(--radius-2); }
.sample h3 + p { margin-top: var(--space-2); }
.sample-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
@media (min-width: 64rem) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sample { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: var(--space-5) var(--space-6); }
}
dialog.lightbox { width: min(56rem, 100vw - 2 * var(--gutter)); max-height: calc(100dvh - 2 * var(--gutter)); padding: 0; border: 0; border-radius: var(--radius-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); overflow: hidden; }
dialog.lightbox::backdrop { background: var(--scrim); }
dialog.lightbox figure { margin: 0; display: flex; flex-direction: column; max-height: calc(100dvh - 2 * var(--gutter)); }
dialog.lightbox img { flex: 1 1 auto; min-height: 0; width: 100%; height: auto; max-height: calc(100dvh - 2 * var(--gutter) - var(--tap) - var(--space-5)); object-fit: contain; background: var(--paper-white); }
dialog.lightbox figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); border-top: var(--border); font-weight: 700; }
.lb-buttons { display: flex; gap: var(--space-2); }
.lb-buttons .btn { padding-inline: var(--space-4); font-size: var(--step--1); }
@media (prefers-reduced-motion: no-preference) {
  dialog.lightbox[open] { animation: rise var(--duration) var(--ease); }
  dialog.lightbox[open]::backdrop { animation: fade var(--duration) var(--ease); }
}
@keyframes rise { from { opacity: 0; transform: translateY(var(--space-3)); } }
@keyframes fade { from { opacity: 0; } }

/* ── The menu ─────────────────────────────────────────────────────────── */
.weeks { display: grid; gap: var(--space-5); }
.week { --accent: var(--w1-ink); position: relative; overflow: hidden; }
.week::before { content: ""; position: absolute; inset: 0 0 auto; height: var(--space-1); background: var(--accent); }
.week.w2 { --accent: var(--w2-ink); }
.week.w3 { --accent: var(--w3-ink); }
.week.w4 { --accent: var(--w4-ink); }
.week header { display: flex; align-items: center; gap: var(--space-4); }
.week header .emblem { width: var(--space-8); height: var(--space-8); flex: none; }
.week-n { color: var(--accent); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.week-tag { color: var(--text-2); }
.dishes li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-3); border-top: var(--border); }
.dish { font-weight: 600; }
.dish-meta { display: inline-flex; align-items: center; gap: var(--space-2); flex: none; color: var(--text-2); font-size: var(--step--1); white-space: nowrap; }
.veg { display: inline-block; padding: 0 var(--space-1); border: var(--border-width) solid currentColor; border-radius: var(--radius-1); color: var(--veg); font-size: var(--step--1); font-weight: 700; line-height: 1.3; }
@media (min-width: 48rem) { .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── A week ───────────────────────────────────────────────────────────── */
.steps { display: grid; gap: var(--space-6); counter-reset: step; }
.steps li > * + * { margin-top: var(--space-2); }
.step-n { display: block; font: 400 var(--step-4) / 1 var(--font-display); color: var(--accent-text); }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── Kitchen Companion ────────────────────────────────────────────────── */
.screens { display: grid; gap: var(--space-7) var(--space-6); justify-items: center; text-align: center; }
.screens li { max-width: 18rem; }
.screens li > * + * { margin-top: var(--space-2); }
.screen { margin-bottom: var(--space-4); border: var(--border); border-radius: var(--radius-2); overflow: hidden; box-shadow: var(--shadow-2); background: var(--surface); }
.screen img { width: 100%; }
@media (min-width: 48rem) { .screens { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }

/* ── Fit ──────────────────────────────────────────────────────────────── */
.fit ul { margin-top: var(--space-4); }
.fit-no h3 .icon { color: var(--accent-text); }

/* ── Price ────────────────────────────────────────────────────────────── */
.buy-grid { display: grid; gap: var(--space-7); align-items: start; }
.price-card { padding: var(--space-6) var(--space-5); background: var(--surface); border: var(--border); border-radius: var(--radius-2); box-shadow: var(--shadow-2); }
.price-card > * + * { margin-top: var(--space-4); }
.price-card h2 { font-size: var(--step-3); }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.amount { font: 400 var(--step-5) / 1 var(--font-display); color: var(--text); }
.includes li { display: grid; grid-template-columns: var(--space-5) minmax(0, 1fr); gap: var(--space-2); padding-block: var(--space-2); border-top: var(--border); }
.includes .icon { margin-top: var(--space-1); }
.buy-full { width: 100%; }
.secure { display: flex; gap: var(--space-2); align-items: flex-start; }
.secure .icon { margin-top: var(--space-1); color: var(--ok); }
.after > * + * { margin-top: var(--space-4); }
.after h3 + * { margin-top: var(--space-3); }
.after-steps li + li { margin-top: var(--space-3); }
.after ol + h3 { margin-top: var(--space-6); }
@media (min-width: 64rem) {
  .buy-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); }
  .price-card { padding: var(--space-7) var(--space-6); }
  .after { padding-top: var(--space-6); }
}

/* ── Trust, guides ────────────────────────────────────────────────────── */
.trust h3 .icon, .guide-card h3 .icon { color: var(--accent-text); }
.guide-card { position: relative; transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.guide-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.guide-card h3 a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text); text-decoration: none; }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-2); }
.guide-card h3 a:hover { color: var(--link); }
.guide-card:focus-within { outline: var(--focus-ring) solid var(--focus); outline-offset: var(--space-1); }
.guide-card h3 a:focus-visible { outline: none; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { margin-top: var(--space-6); border-top: var(--border); }
.faq details { border-bottom: var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--tap); padding-block: var(--space-4); list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font: 700 var(--step-0) / 1.35 var(--font-body); letter-spacing: 0; }
.faq summary::after { content: ""; flex: none; width: var(--space-5); height: var(--space-5); background: var(--accent-text); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform var(--duration) var(--ease); }
.faq details[open] > summary::after { transform: rotate(45deg); }
.faq summary:hover h3 { color: var(--link); }
.faq .answer { padding-bottom: var(--space-5); max-width: var(--measure); color: var(--text-2); }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow-y: clip; transition: block-size var(--duration) var(--ease), content-visibility var(--duration) var(--ease) allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) { .faq details::details-content { transition: none; } }

/* ── Wren & Co. ───────────────────────────────────────────────────────── */
.wren-grid { display: grid; gap: var(--space-7); }
.wren-about > * + * { margin-top: var(--space-4); }
.wren-about .wren-mark { width: var(--space-8); height: var(--space-8); }
.wren-about p { max-width: var(--measure); color: var(--text-2); }
.siblings { margin-top: var(--space-4); border-top: var(--border); }
.sibling { display: grid; gap: var(--space-1); min-height: var(--tap); padding-block: var(--space-3); border-bottom: var(--border); color: var(--text); text-decoration: none; }
.sibling-name { font-weight: 700; text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
.sibling-line { color: var(--text-2); font-size: var(--step--1); }
.sibling:hover .sibling-name { color: var(--link); }
@media (min-width: 64rem) { .wren-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-8); } }

/* ── Guides and legal pages ───────────────────────────────────────────── */
.guide-head { padding-bottom: var(--space-6); }
.guide-head h1, .legal h1 { margin-top: var(--space-4); }
.guide-head .lede { margin-top: var(--space-4); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); color: var(--text-2); font-size: var(--step--1); }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); }
.guide-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); }
.reviewed { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text-2); font-size: var(--step--1); }
.reviewed .icon { color: var(--ok); }
.key-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-6); }
.key-facts li { padding: var(--space-4); background: var(--surface); border: var(--border); border-radius: var(--radius-2); }
.key-facts b { display: block; font: 400 var(--step-3) / 1.1 var(--font-display); }
@media (min-width: 48rem) { .key-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.guide-body { padding-bottom: var(--space-7); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: var(--border); text-align: left; vertical-align: top; }
table.data thead th { color: var(--text-2); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border-bottom-color: var(--line-strong); }
table.data tbody th { font-weight: 700; }
table.data .sub { display: block; margin-top: var(--space-1); color: var(--text-2); font-size: var(--step--1); font-weight: 400; }
table.data .temp { font: 400 var(--step-2) / 1.1 var(--font-display); white-space: nowrap; }
table.data .nowrap { white-space: nowrap; }
.cell-link { display: inline-block; padding-block: var(--space-3); margin-block: calc(-1 * var(--space-3)); }
.day-chip { display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-1); background: var(--w1); color: var(--paper-white); font-size: var(--step--1); font-weight: 700; white-space: nowrap; }
.night { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); color: var(--text-2); }
.splits { border-top: var(--border); }
.splits > li { display: grid; gap: var(--space-2); padding-block: var(--space-4); border-bottom: var(--border); }
.split-uses { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.split-uses li { display: inline-flex; align-items: center; gap: var(--space-2); }
.split-uses .pie { color: var(--w1-ink); }
.shopping { display: grid; gap: var(--space-5); }
.list-section h3 { font: 700 var(--step--1) / 1.3 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--space-2); }
.checklist li { display: grid; grid-template-columns: var(--space-5) minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-3); border-top: var(--border); }
.checklist .box { width: var(--space-5); height: var(--space-5); margin-top: var(--space-1); border: var(--border-width) solid var(--line-strong); background: var(--surface); }
.checklist .note { display: inline-block; margin-top: var(--space-1); padding: var(--space-1) var(--space-2); background: var(--tint-2); border-radius: var(--radius-1); }
.recipe-card { padding: var(--space-5); background: var(--surface); border: var(--border); border-radius: var(--radius-2); }
.recipe-card > * + * { margin-top: var(--space-4); }
.recipe-facts { display: flex; align-items: center; gap: var(--space-2); color: var(--text-2); }
.recipe-cols { display: grid; gap: var(--space-5); }
.recipe-cols h3, .recipe-card h3 { font: 700 var(--step--1) / 1.3 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.recipe-cols h3 + * { margin-top: var(--space-3); }
.ingredients { list-style: none; padding: 0; }
.ingredients li + li { margin-top: var(--space-2); }
.ingredients .group { margin-top: var(--space-4); color: var(--text-2); font-weight: 700; }
.steps-list li + li { margin-top: var(--space-3); }
.tip { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--tint-2); border-radius: var(--radius-1); }
@media (min-width: 48rem) { .recipe-cols { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--space-6); } .shopping { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plain-steps { list-style: none; padding: 0; border-top: var(--border); }
.plain-steps > li { padding-block: var(--space-4); border-bottom: var(--border); }
.plain-steps > li + li { margin-top: 0; }
.plain-steps > li > * + * { margin-top: var(--space-2); }
.sources ul { list-style: none; padding: 0; }
.sources li + li { margin-top: var(--space-3); }
.guide-cta { display: grid; gap: var(--space-5); margin-bottom: var(--section-y); padding: var(--space-6) var(--space-5); background: var(--surface); border: var(--border); border-radius: var(--radius-2); box-shadow: var(--shadow-1); }
.guide-cta > div > * + * { margin-top: var(--space-3); }
.guide-cta h2 { font-size: var(--step-2); }
.guide-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.meta { color: var(--text-2); font-size: var(--step--1); }
.legal blockquote.policy { margin: 0; padding: var(--space-5); background: var(--surface); border: var(--border); border-radius: var(--radius-2); font-size: var(--step-1); }
.legal .meta { margin-top: var(--space-7); }
.final-cta { margin-top: var(--space-7); padding: var(--space-6) var(--space-5); background: var(--surface); border: var(--border); border-radius: var(--radius-2); }
.final-cta > * + * { margin-top: var(--space-3); }
.final-cta h3 { font-size: var(--step-2); }
.final-cta .cta-row { align-items: center; margin-top: var(--space-5); }
.link-list { list-style: none; padding: 0; }
.link-list li + li { margin-top: 0; }
.link-list a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }
.not-found { text-align: center; }
.not-found .lede { margin-inline: auto; }
.not-found .cta-row { justify-content: center; }

/* ── Email signup: the free printable ─────────────────────────────────── */
.signup { display: grid; gap: var(--space-5); align-items: center; margin-bottom: var(--space-7); padding: var(--space-6) var(--space-5); background: var(--tint-2); border: var(--border); border-radius: var(--radius-2); }
.signup-art { width: min(100%, calc(var(--space-9) * 2)); }
.signup-art img { display: block; width: 100%; height: auto; border: var(--border); box-shadow: var(--shadow-1); background: var(--paper-white); }
.signup-copy > * + * { margin-top: var(--space-3); }
.signup-copy h2, .signup-copy h3 { font-size: var(--step-2); }
.signup .cta-row { margin-top: var(--space-4); }
.signup-fine { color: var(--text-2); max-width: var(--measure); }
@media (min-width: 48rem) { .signup { grid-template-columns: calc(var(--space-9) * 2) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6); } }
/* The slide-in: small, at the bottom on phones, a corner card on desktops; never a full-screen cover. */
.prompt { position: fixed; z-index: 60; left: var(--gutter); right: var(--gutter); bottom: var(--space-3); max-height: 40vh; overflow-y: auto; padding: var(--space-4); background: var(--surface); color: var(--text); border: var(--border); border-radius: var(--radius-2); box-shadow: var(--shadow-2); opacity: 0; transform: translateY(var(--space-3)); transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease); }
.prompt.is-open { opacity: 1; transform: none; }
.prompt[hidden] { display: none; }
.prompt-body > * + * { margin-top: var(--space-2); }
.prompt .eyebrow, .prompt h2 { padding-right: calc(var(--tap) + var(--space-1)); }
.prompt h2 { font-size: var(--step-1); }
.prompt-eyebrow { display: none; }
.prompt .fine { color: var(--text-2); }
.prompt-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.prompt-close { position: absolute; top: var(--space-2); right: var(--space-2); display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: var(--radius-1); background: transparent; color: var(--text); cursor: pointer; transition: background-color var(--duration) var(--ease); }
.prompt-close:hover { background: var(--bg-2); }
@media (min-width: 48rem) { .prompt { left: auto; right: var(--space-5); bottom: var(--space-5); width: min(28rem, calc(100vw - 2 * var(--gutter))); max-height: 70vh; padding: var(--space-5); } .prompt-body > * + * { margin-top: var(--space-3); } .prompt h2 { font-size: var(--step-2); } .prompt-eyebrow { display: flex; } }
@media (prefers-reduced-motion: reduce) { .prompt { transition: none; transform: none; } }

/* Sharing, the privacy choice, and week colours on guide chips. */
.share { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin-top: var(--space-6); }
.share a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); font-weight: 700; }
.ads-choice { margin-top: var(--space-4); padding: var(--space-5); background: var(--surface); border: var(--border); border-radius: var(--radius-2); }
.ads-choice > * + * { margin-top: var(--space-3); }
.day-chip-w4 { background: var(--w4); }

/* ── Print ────────────────────────────────────────────────────────────── */
@media print {
  :root { --bg: #ffffff; --bg-2: #ffffff; --surface: #ffffff; --text: #000000; --text-2: #222222; --link: #000000; --line: #999999; --shadow-1: none; --shadow-2: none; }
  .site-header, .preview-stamp, .menu, .no-print, .btn, .buy-bar, .site-footer .footer-links { display: none !important; }
  body { font-size: 11pt; }
  .section { padding-block: var(--space-5); }
  .section.tone { background: none; }
  a { text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  .prose a.no-print-url::after { content: none; }
  h2, h3 { break-after: avoid; }
  table, figure, .card, tr { break-inside: avoid; }
}
