/* The public pages, built to the design system (design-system/README.md and surfaces.md):
   the app's tokens, fonts and components, set as pages you scroll rather than a phone-sized
   column. Token values come from divine-refrigerator.css; change them there, then here.
   Type is in rem and nothing is smaller than 0.75rem (12px). */
@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap; src: url("/site/fonts/young-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/site/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/site/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/site/fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-display: swap; src: url("/site/fonts/dm-mono-latin-500-normal.woff2") format("woff2"); }

/* Light on :root, dark for devices set to dark unless the page says data-theme="light",
   and dark again when it says data-theme="dark". */
:root {
  --backdrop: #dce6e6; --enamel: #f6faf8; --interior: #fffcf1; --shelf: #e7eeea;
  --ink: #1d2b30; --muted: #5a6b70; --line: #d3dedb; --field: #76898d;
  --supply: #d99a22; --supply-soft: #f8e7bf; --glow: rgba(240, 186, 74, 0.45); --on-supply: #241a05;
  --accent: #17736c; --accent-ink: #ffffff; --danger: #9b2f2f;
  --shadow-column: 0 20px 50px -30px rgba(0, 0, 0, 0.35);
  --shadow-cabinet: inset 0 0 10px rgba(240, 186, 74, 0.45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --backdrop: #0d1517; --enamel: #172225; --interior: #1f2c2b; --shelf: #26363a;
    --ink: #e6eeec; --muted: #9db0b1; --line: #30454a; --field: #6f8a8e;
    --supply: #f2be58; --supply-soft: #4a3a18; --glow: rgba(242, 190, 88, 0.28); --on-supply: #241a05;
    --accent: #4db6ab; --accent-ink: #0d1517; --danger: #f0a0a0;
    --shadow-cabinet: inset 0 0 10px rgba(242, 190, 88, 0.28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --backdrop: #0d1517; --enamel: #172225; --interior: #1f2c2b; --shelf: #26363a;
  --ink: #e6eeec; --muted: #9db0b1; --line: #30454a; --field: #6f8a8e;
  --supply: #f2be58; --supply-soft: #4a3a18; --glow: rgba(242, 190, 88, 0.28); --on-supply: #241a05;
  --accent: #4db6ab; --accent-ink: #0d1517; --danger: #f0a0a0;
  --shadow-cabinet: inset 0 0 10px rgba(242, 190, 88, 0.28);
  color-scheme: dark;
}
:root {
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --wide: 1080px; --read: 68ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--enamel); color: var(--ink); font: 400 1rem/1.6 var(--body);
  min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--enamel); padding: 10px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem); line-height: 1.2; }
h3, .h3 { font-size: 1.1875rem; line-height: 1.25; }
h1:focus, h2:focus, main:focus { outline: none; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 1.125rem; color: var(--muted); max-width: 38rem; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.stack-l { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }

/* Page frame: a 16px gutter at every width, never a sideways scroll. */
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.read { max-width: var(--read); }
main { flex: 1; }
.band { padding-block: clamp(40px, 6vw, 80px); }
.band.warm { background: var(--interior); border-block: 1px solid var(--line); }
.band.tight { padding-block: 32px; }

.top { border-bottom: 1px solid var(--line); background: var(--enamel); }
.top .wrap { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { font-family: var(--display); font-size: 1.125rem; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; margin-right: auto; padding-block: 6px; }
.top nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9375rem; display: inline-block; padding: 8px 0; }
.top nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.top .btn { display: none; }
@media (min-width: 760px) { .top .btn { display: inline-flex; } }
@media (max-width: 759px) { .top nav { width: 100%; } }

/* Buttons: teal for doing; gold only for opening the Refrigerator, once a screen. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 13px 18px; min-height: 44px; font: 600 1rem/1.2 var(--body); cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); text-align: center;
}
.btn.gold { background: var(--supply); color: var(--on-supply); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--field); }
.btn.small { min-height: 40px; padding: 9px 14px; font-size: 0.9375rem; border-radius: 12px; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.link { font-weight: 600; display: inline-block; padding-block: 8px; }
.plain { all: unset; cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; }
.plain:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The Refrigerator: the app's drawing (the design system's Fridge component), standing ajar.
   The character's body (Sandy's pick, 20 October 2026): 7:15, rounder at the top than the bottom,
   cream porcelain enamel with a sheen and a gasket line, three chrome hinges, a chrome latch at mid
   height, brushed-steel legs and the gold light inside. The enamel stays cream in the dark theme:
   it is the character's colour, not a surface. The same silhouette as the app icon, the fridge
   mark and the episodes' Refrigerator; no eyes here. */
.fridge {
  --fr-rim: #cfc4aa; --fr-gasket: rgba(58, 50, 38, 0.24); --fr-lit: #fffcf1; --fr-frame: #f1eadb; --fr-shelf: #dfe8e5;
  --fr-chrome: linear-gradient(90deg, #6e777c 0%, #d7dde0 28%, #f4f7f8 45%, #aab3b8 70%, #5f686d 100%);
  --fr-radius: 13.5% 13.5% 10.4% 10.4% / 6.3% 6.3% 4.9% 4.9%;
  aspect-ratio: 7 / 15; height: 260px; margin: 0 auto 16px; position: relative; perspective: 900px; flex: none;
}
/* Brushed-steel legs under the front corners. */
.fridge::before, .fridge::after { content: ""; position: absolute; top: 100%; width: 12%; height: 16px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #d3d9dc, #9aa3a8 55%, #7c868b); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.fridge::before { left: 11%; } .fridge::after { right: 11%; }
/* The lit cabinet: a cream frame round the opening, three glass shelves, the gold light inside. */
.fridge .inside {
  position: absolute; inset: 0; border-radius: var(--fr-radius); border: 2px solid var(--fr-rim);
  background: radial-gradient(circle at 50% 30%, #f8e7bf, var(--fr-lit) 70%);
  box-shadow: inset 0 0 0 6px var(--fr-frame), inset 0 0 40px var(--glow), 0 0 28px var(--glow);
  display: grid; grid-template-rows: repeat(3, 1fr); padding: 20px 14px 16px;
}
.fridge .inside i { border-bottom: 3px solid var(--fr-shelf); display: block; }
/* The door, hinged on the left: enamel with a sheen, a rim and an inset gasket line (an outer
   shadow here makes Chrome drop part of the door when it turns), the hinges as background layers. */
.fridge .door {
  position: absolute; inset: 0; border-radius: var(--fr-radius); border: 2px solid var(--fr-rim);
  background: var(--fr-chrome) left 0 top 11% / 4.7% 6.8% no-repeat, var(--fr-chrome) left 0 top 47% / 4.7% 6.8% no-repeat,
    var(--fr-chrome) left 0 top 83% / 4.7% 6.8% no-repeat, linear-gradient(100deg, #faf6ec 0%, #f1eadb 48%, #e6dcc8 100%);
  box-shadow: inset 0 0 0 2px var(--fr-gasket), inset 3px 3px 0 rgba(255, 255, 255, 0.7), inset -3px -3px 0 rgba(120, 100, 70, 0.12);
  transform-origin: left center; transform: rotateY(-22deg);
}
/* The chrome latch at mid height: a tall handle on the door's free edge with a short thumb lever at its top. */
.fridge .door::before { content: ""; position: absolute; right: 14.6%; top: 42%; width: 9%; height: 1.8%; border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, #f6f8f9 0%, #cfd6d9 45%, #8e979c 70%, #5f686d 100%); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); }
.fridge .door::after { content: ""; position: absolute; right: 8%; top: 40%; width: 6.8%; height: 18%; border-radius: 4px;
  background: linear-gradient(90deg, #8e979c 0%, #e2e7e9 35%, #f6f8f9 50%, #b3bbc0 75%, #6a7378 100%); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.22); }
.fridge.mini { height: 72px; margin-bottom: 5px; }
.fridge.mini::before, .fridge.mini::after { height: 5px; border-radius: 0 0 2px 2px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18); }
.fridge.mini .inside { border-width: 1px; padding: 6px 5px 4px; box-shadow: inset 0 0 0 2px var(--fr-frame), inset 0 0 12px var(--glow), 0 0 10px var(--glow); }
.fridge.mini .inside i { border-bottom-width: 2px; }
.fridge.mini .door { border-width: 1px; box-shadow: inset 0 0 0 1px var(--fr-gasket), inset 1px 1px 0 rgba(255, 255, 255, 0.7); }
.fridge.mini .door::before { height: 2px; border-radius: 1px; box-shadow: none; }
.fridge.mini .door::after { border-radius: 1px; box-shadow: none; }

/* Home */
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.hero h1 { max-width: 18ch; }
.hero .actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
/* The Refrigerator is the largest thing in the hero: taller than the headline beside it. Its
   perspective grows with it, so the door's turn looks the same at every size. */
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } .hero .art { order: 2; } .hero .fridge { height: clamp(400px, 70vh, 540px); perspective: 1900px; } }
@media (max-width: 859px) { .hero .fridge { height: clamp(220px, 42vh, 320px); perspective: 1100px; } }
.art { display: grid; place-items: center; padding: 8px 0 16px; }

.beats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .beats { grid-template-columns: repeat(3, 1fr); } }
.beats li { background: var(--enamel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.beats b { font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1.1; }

.shots { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .shots { grid-template-columns: 1fr 1fr; } }
.shots figure { margin: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.shots img { width: min(100%, 300px); height: auto; border-radius: 28px; border: 1px solid var(--line); box-shadow: var(--shadow-column); background: var(--enamel); }
.shots figcaption { max-width: 30ch; color: var(--muted); }

/* Collier's words: Young Serif, cited underneath. */
.quote { font-family: var(--display); font-size: clamp(1.375rem, 1rem + 1.6vw, 2rem); line-height: 1.3; max-width: 28ch; margin: 0; }
.cite { font-size: 0.8125rem; color: var(--muted); margin-top: 8px; }
blockquote { margin: 0; }
.band.warm blockquote { display: flex; flex-direction: column; align-items: center; text-align: center; }
.band.warm blockquote .quote { max-width: 30ch; }

.card { background: var(--interior); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards.two { grid-template-columns: 1fr 1fr; } }
.center { text-align: center; align-items: center; }
.note { border: 1px dashed var(--supply); background: var(--supply-soft); border-radius: 14px; padding: 12px 14px; font-size: 0.9375rem; }

/* The door: the app's Gratitude Moment, step by step. */
.door-app { max-width: 34rem; }
.door-step { display: flex; flex-direction: column; gap: 16px; }
.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--supply); }
label, .lbl { font-size: 0.875rem; font-weight: 600; display: block; margin-bottom: 8px; }
input, textarea {
  width: 100%; font: 1rem/1.4 var(--body); color: var(--ink); background: var(--interior); border: 1.5px solid var(--field);
  border-radius: 12px; padding: 11px 12px;
}
textarea { min-height: 84px; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: 0.8125rem; color: var(--muted); margin-top: 6px; }
.err { color: var(--danger); font-size: 0.875rem; font-weight: 600; margin-top: 6px; }
.consent { margin-top: 6px; }
.timer {
  width: 180px; height: 180px; margin: 6px auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--supply) calc(var(--p, 0) * 1%), var(--line) 0);
}
.timer div { width: 150px; height: 150px; border-radius: 50%; background: var(--interior); display: grid; place-items: center; box-shadow: inset 0 0 30px var(--glow); }
.timer b { font-family: var(--mono); font-size: 1.875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.vision { background: var(--interior); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 16px; padding: 16px; }
.vision strong { font-family: var(--display); font-weight: 400; font-size: 1.25rem; line-height: 1.3; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Books, episodes, the edition */
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.episodes li { display: grid; grid-template-columns: 3rem 1fr; gap: 4px 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--enamel); }
.episodes .n { font-family: var(--display); font-size: 1.75rem; color: var(--muted); line-height: 1; grid-row: span 3; }
.episodes h3 a { color: var(--ink); }
.episodes .when { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.video { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 16px; overflow: hidden; background: #0d1517; border: 1px solid var(--line); }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.video .play { position: relative; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 12px 18px; border-radius: 99px; }
.video button:focus-visible .play { outline: 2px solid #fff; outline-offset: 3px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.passage { border-left: 4px solid var(--supply); padding: 4px 0 4px 18px; }
.passage p { font-family: var(--display); font-size: 1.25rem; line-height: 1.45; }
.recipe { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 10px; }
.recipe li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; gap: 10px; }
.recipe li::before { content: counter(step); font-family: var(--mono); font-weight: 500; color: var(--accent); }
details.script summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 8px 0; }
details.script div { padding-top: 10px; display: grid; gap: 12px; }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pager a { display: flex; flex-direction: column; text-decoration: none; padding-block: 4px; }
.pager span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* An index card, as on the carousels: cream, a hairline, a gold top edge. */
.index-card {
  background: var(--interior); border: 1px solid var(--line); border-top: 6px solid var(--supply); border-radius: 16px;
  padding: 18px 20px; font-family: var(--display); font-size: 1.125rem; line-height: 1.45;
}
.index-card .cite { font-family: var(--body); line-height: 1.5; }

/* The edition: Collier's text in a readable column, page numbers in the text, the
   Refrigerator's notes beside their passages on wide screens and under them on phones. */
.edition { display: grid; gap: 8px; }
.para { display: grid; gap: 10px; }
.para .text { font-family: var(--display); font-size: 1.125rem; line-height: 1.7; max-width: var(--read); }
.para .pg { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); display: inline-block; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; margin-right: 6px; line-height: 1.6; vertical-align: 0.15em; }
.para .text .pg:not(:first-child) { margin-left: 4px; }
.para .text.verse { padding-left: 1.25em; }
.para .text.head { font-size: 1.375rem; line-height: 1.3; padding-top: 12px; }
.margin-note { background: var(--interior); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 0.9375rem; align-self: start; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 980px) {
  .para { grid-template-columns: minmax(0, var(--read)) 17rem; gap: 32px; }
  .para .text { grid-column: 1; }
  .margin-note { grid-column: 2; }
}

/* "At the door": always a small drawn door, the heading, one sentence, one button. */
.at-door { display: grid; grid-template-columns: 48px 1fr; gap: 6px 18px; align-items: start; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--interior); box-shadow: var(--shadow-cabinet); max-width: var(--read); }
.at-door .fridge { grid-row: span 4; margin: 4px 0 0; }
.at-door .row { margin-top: 8px; }
.at-door .what { font-size: 0.875rem; color: var(--muted); }

footer.foot { border-top: 1px solid var(--line); padding-block: 28px 36px; font-size: 0.9375rem; }
footer.foot .wrap { display: flex; flex-direction: column; gap: 12px; }
footer.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
footer.foot a { display: inline-block; padding-block: 6px; }
footer.foot .sign { font-family: var(--display); font-size: 1.25rem; }
footer.foot .by { color: var(--muted); font-size: 0.8125rem; }
