/* ==========================================================================
   nemt & lækkert – recipe of the day
   Mobile-first. Colours, type and spacing are controlled by the variables below.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Colours */
  --paper: #faf5ec;
  --paper-deep: #f2e8d7;
  --paper-darker: #e9dcc7;
  --ink: #2b211b;
  --muted: #6a594c;
  --accent: #a0461f;
  --accent-light: #e9c9b3;
  --olive: #56633a;
  --olive-light: #dfe3cf;
  --line: rgba(43, 33, 27, 0.14);

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-small: clamp(0.8125rem, 0.79rem + 0.12vw, 0.875rem);
  --text-body: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --text-step: clamp(1.125rem, 1.07rem + 0.28vw, 1.3125rem);
  --text-lead: clamp(1.125rem, 1.04rem + 0.45vw, 1.4375rem);
  --text-h2: clamp(1.625rem, 1.4rem + 1.1vw, 2.375rem);
  --text-h1: clamp(2.125rem, 1.25rem + 4.4vw, 4.75rem);

  /* Spacing */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-gap: clamp(3rem, 8vw, 6.5rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1,
h2,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

/* Quick taps must not be treated as double-tap zoom – not even when the finger
   lands just beside a button. Pinch zoom still works. */
html,
button,
label {
  touch-action: manipulation;
}

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

::selection {
  background: var(--accent-light);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 0.75rem 0.75rem;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 0;
}

/* ---------- Header -------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: 96rem;
  margin-inline: auto;
  padding: clamp(0.9rem, 2.4vw, 1.5rem) var(--gutter);
}

.logo {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo span {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  display: inline-block;
  transition: transform 0.5s var(--ease);
}
.logo:hover span {
  transform: rotate(-12deg) scale(1.15);
}

.tagline {
  font-size: clamp(0.6875rem, 0.6rem + 0.45vw, 0.875rem);
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
/* On the narrowest phones there is no room for it beside the logo */
@media (max-width: 21.99em) {
  .tagline {
    display: none;
  }
}

/* Logo and tagline as one sender in the top left (index.html).
   Side by side with a hairline between them whenever they fit on one line.
   If the tagline would wrap, script.js adds .is-stacked and the tagline is
   centred under the logo instead. */
.site-header--inline {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}
.site-header--inline .tagline {
  display: block;
  margin-left: 1rem;
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 1px solid var(--line);
  font-size: clamp(0.6875rem, 0.66rem + 0.15vw, 0.75rem);
  line-height: 1;
  letter-spacing: 0.16em;
  text-align: left;
  /* Optical centring: the logo is mostly lowercase, so its visual middle sits
     lower than its line box; nudge the capitals down to meet it */
  position: relative;
  top: 0.2em;
}
/* Phones: a little less space around and inside the tagline, so it still fits
   beside the logo on most of them */
@media (max-width: 29.99em) {
  .site-header--inline .tagline {
    margin-left: 0.7rem;
    padding-left: 0.7rem;
    letter-spacing: 0.08em;
  }
}
/* Stacked: the column is as wide as the wider of the two, both centred in it */
.site-header--inline.is-stacked {
  display: grid;
  justify-content: start;
  justify-items: center;
  gap: 0.2rem;
}
.site-header--inline.is-stacked .tagline {
  margin-left: 0;
  padding: 0;
  border-left: 0;
  line-height: inherit;
  text-align: center;
  top: 0;
}

/* ---------- Status (loading and errors) ----------------------------------- */

.status {
  max-width: 34rem;
  margin: 22vh auto;
  padding-inline: var(--gutter);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--text-lead);
  text-align: center;
  color: var(--muted);
}
.status[hidden] {
  display: none;
}

/* ---------- Hero image ---------------------------------------------------- */

.hero {
  max-width: 96rem;
  margin-inline: auto;
  overflow: hidden;
  background: var(--paper-deep);
  height: min(clamp(18.75rem, 58vw + 5rem, 45rem), 78svh);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s var(--ease), transform 1.6s var(--ease);
}
.hero img.is-loaded {
  opacity: 1;
  transform: none;
}

@media (min-width: 48em) {
  .hero {
    width: calc(100% - 2 * var(--gutter));
    border-radius: 1.25rem;
  }
}

/* ---------- Intro sheet with title and key facts -------------------------- */

.intro {
  position: relative;
  width: min(56rem, 100% - 1.5rem);
  margin: calc(-1 * clamp(2.25rem, 7vw, 5.5rem)) auto 0;
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1rem, 5vw, 4rem) 0;
  background: var(--paper);
  border-radius: 1.5rem 1.5rem 0 0;
  text-align: center;
}
@media (min-width: 48em) {
  .intro {
    width: min(60rem, 100% - 2 * var(--gutter) - 4rem);
  }
}

.date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  color: var(--accent);
}
.date::before,
.date::after {
  content: "";
  width: clamp(1.5rem, 6vw, 3.5rem);
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

h1 {
  margin-top: clamp(0.9rem, 2vw, 1.5rem);
  font-family: var(--serif);
  font-size: var(--text-h1);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
  hyphens: manual;
}

/* The cuisine under the title, in the same style as on the recipe cards */
.cuisine {
  margin-top: clamp(0.6rem, 1.4vw, 1rem);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  max-width: 38rem;
  margin: clamp(1rem, 2.4vw, 1.75rem) auto 0;
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* One column per visible fact: total time alone, or working time and total time */
.facts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  max-width: 26rem;
  margin: clamp(1.75rem, 4vw, 2.75rem) auto 0;
  border-block: 1px solid var(--line);
}
.facts > div {
  padding: clamp(0.9rem, 2.2vw, 1.25rem) 0.25rem;
}
.facts > div + div {
  border-left: 1px solid var(--line);
}
.facts > div[hidden] {
  display: none;
}
/* No divider before the first visible fact when working time is hidden */
.facts > div[hidden] + div {
  border-left: 0;
}
.facts dt {
  font-size: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  margin-top: 0.15rem;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.3;
}

/* ---------- Ingredients and method ---------------------------------------- */

.content {
  display: grid;
  gap: var(--section-gap);
  max-width: 74rem;
  margin: var(--section-gap) auto 0;
  padding-inline: var(--gutter);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ink);
}

h2 {
  font-family: var(--serif);
  font-size: var(--text-h2);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.counter {
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}

/* Ingredients */

.ingredients {
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2rem) clamp(0.75rem, 2vw, 1.25rem);
  background: var(--paper-deep);
  border-radius: 1.25rem;
}

.servings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px dashed var(--line);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.servings[hidden] {
  display: none;
}
.servings-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.servings output {
  min-width: 2ch;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.round-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.round-button[hidden] {
  display: none;
}
.round-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}
.round-button:active:not(:disabled) {
  transform: scale(0.92);
}
.round-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.checklist {
  list-style: none;
}
.checklist li + li {
  border-top: 1px dashed var(--line);
}
.checklist label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.9rem;
  min-height: 2.75rem;
  margin-inline: -0.5rem;
  padding: 0.55rem 0.5rem;
  border-radius: 0.6rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.2s, color 0.3s;
}
.checklist input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.05em 0 0;
  border: 1.5px solid var(--muted);
  border-radius: 0.4rem;
  background: var(--paper) center / 0 no-repeat;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, background-size 0.25s var(--ease);
}
.checklist input:checked {
  border-color: var(--olive);
  background-color: var(--olive);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23faf5ec' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.500l4.500 4.500L19 7.500'/%3E%3C/svg%3E");
  background-size: 1.05rem;
}
.checklist input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(43, 33, 27, 0.35);
}

/* Short explanation of an ingredient: smaller and quieter, inside the same line
   and under the same checkbox, so it never reads as an ingredient of its own. */
.ingredient-note {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(0.875rem, 0.85rem + 0.15vw, 0.9375rem);
  line-height: 1.45;
  color: var(--muted);
}

/* Method */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.4;
}
.switch-row[hidden] {
  display: none;
}
.switch {
  position: relative;
  flex: none;
  width: 3.25rem;
  height: 1.875rem;
  padding: 0;
  border: 1.5px solid var(--muted);
  border-radius: 999px;
  background: var(--paper-deep);
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s;
}
/* Larger tap target than the switch itself */
.switch::before {
  content: "";
  position: absolute;
  inset: -0.6rem;
}
.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.2rem;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: -0.625rem;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.25s var(--ease), background-color 0.25s;
}
.switch[aria-checked="true"] {
  border-color: var(--olive);
  background: var(--olive);
}
.switch[aria-checked="true"]::after {
  background: var(--paper);
  transform: translateX(1.4rem);
}
.switch:focus-visible {
  border-radius: 999px;
}

.tip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.4;
  color: var(--muted);
}
.tip::before {
  content: "";
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--olive) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23faf5ec' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.500l4.500 4.500L19 7.500'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}
.tip[hidden] {
  display: none;
}

.step-list {
  list-style: none;
}
.step-list li {
  border-bottom: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: clamp(0.9rem, 2.5vw, 1.5rem);
  margin-inline: -0.5rem;
  padding: clamp(1.1rem, 2.6vw, 1.6rem) 0.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
}.step-number {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--accent-light);
  border-radius: 50%;
  background: transparent center / 0 no-repeat;
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: lining-nums;
  transition: background-color 0.25s, border-color 0.25s, color 0.2s, background-size 0.3s var(--ease);
}
.step-text {
  padding-top: 0.3rem;
  font-size: var(--text-step);
  line-height: 1.6;
  max-width: 40rem;
  transition: opacity 0.3s;
}
.step input:checked ~ .step-number {
  border-color: var(--olive);
  background-color: var(--olive);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23faf5ec' stroke-width='2.500' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.500l4.500 4.500L19 7.500'/%3E%3C/svg%3E");
  background-size: 1.4rem;
  color: transparent;
}
.step input:checked ~ .step-text {
  opacity: 0.55;
}
.step input:focus-visible ~ .step-number {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* The method: one line from start to finish, a circle for everything to do, and
   labels ("Mens …", "Når …") that hold until the next label. Each item draws its
   own piece of the line. */

.flow {
  list-style: none;
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
}
.flow[hidden] {
  display: none;
}
.flow > li {
  position: relative;
}
.flow > li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.875rem;
  width: 3px;
  margin-left: -1.5px;
  background: #cf9474;
}
.flow > li:first-child::before {
  top: 1rem;
}
.flow > li:last-child::before {
  bottom: auto;
  height: 1rem;
}
.flow-task {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.85rem;
  padding-block: 0.55rem;
}
/* A faint tick in every empty circle shows that it can be ticked off */
.flow-box {
  position: relative;
  z-index: 1;
  width: 1.75rem;
  height: 1.75rem;
  border: 2.5px solid var(--accent);
  border-radius: 50%;
  background: var(--paper) center / 1rem no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23deb39b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, background-size 0.25s var(--ease);
}
/* A larger target for the finger than the circle itself */
.flow-box::after {
  content: "";
  position: absolute;
  inset: -0.7rem;
}
.flow-task input:checked ~ .flow-box {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23faf5ec' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  background-size: 1.1rem;
}
.flow-task input:focus-visible ~ .flow-box {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.flow-body {
  flex: 1;
  min-width: 0;
  transition: opacity 0.3s;
}
.flow-heading,
.flow-task .flow-text {
  max-width: 40rem;
}
.flow-task input:checked ~ .flow-body {
  opacity: 0.55;
}
.flow-body summary {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
  border-radius: 0.4rem;
  cursor: pointer;
}
.flow-check summary {
  list-style: none;
}
.flow-check summary::-webkit-details-marker {
  display: none;
}
.flow-check summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
/* A small arrow that points down when closed and up when open */
.flow-chevron {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin: 0.45rem 0.3rem 0;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.flow-check details[open] .flow-chevron {
  margin-top: 0.7rem;
  transform: rotate(-135deg);
}
.flow-heading {
  display: block;
  flex: 1;
  min-width: 0;
}
.flow-label {
  display: block;
  font-size: var(--text-step);
  font-weight: 600;
  line-height: 1.35;
}
.flow-task .flow-text {
  display: block;
  margin-top: 0.35rem;
  padding-right: 1.6rem;
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.55;
}
.flow-moment {
  padding: 0.9rem 0 0 2.6rem;
}
.flow-moment + .flow-task {
  padding-top: 0.45rem;
}
.flow-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--paper-darker);
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.35;
}
/* A closed title shows the start of its text on one line */
.flow-preview {
  display: none;
}
details:not([open]) .flow-preview {
  display: block;
  overflow: hidden;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (hover: hover) {
  .flow-task input:not(:checked) ~ .flow-box:hover {
    background-color: var(--accent-light);
  }
  .flow-check summary:hover .flow-label {
    color: var(--accent);
  }
  .checklist label:hover {
    background: rgba(43, 33, 27, 0.05);
  }
  .checklist label:hover input:not(:checked) {
    border-color: var(--accent);
  }
  .step:hover {
    background: rgba(160, 70, 31, 0.05);
  }
  .step:hover input:not(:checked) ~ .step-number {
    border-color: var(--accent);
  }
}

/* Tablet: ingredients in two columns that read downwards, so the category
   order is kept: first column top to bottom, then the second. */
@media (min-width: 40em) and (max-width: 59.99em) {
  .checklist {
    columns: 2;
    column-gap: 2.5rem;
  }
  .checklist li + li {
    border-top: 0;
  }
  .checklist li {
    break-inside: avoid;
    border-bottom: 1px dashed var(--line);
  }
}

/* Laptop and up: side by side. The ingredients stay in view while scrolling,
   but only when the whole card fits on screen (script.js sets .is-sticky). */
@media (min-width: 60em) {
  .hero {
    height: min(clamp(20rem, 34vw, 36rem), 56svh);
  }
  .content {
    grid-template-columns: minmax(18rem, 1fr) minmax(0, 1.75fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
  .ingredients.is-sticky {
    position: sticky;
    top: 1.5rem;
  }
  .method .section-header {
    padding-top: clamp(1.5rem, 4vw, 2.25rem);
  }
}

/* ---------- More recipes (recipe pages only) ---------------------------- */

.more-recipes {
  max-width: 74rem;
  margin: var(--section-gap) auto 0;
  padding-inline: var(--gutter);
}
.more-recipes h2 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ink);
}
.more-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: clamp(1.25rem, 3vw, 2rem);
  list-style: none;
}
@media (min-width: 40em) {
  .more-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
.more-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1.25rem;
  background: var(--paper-deep);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.more-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.more-label {
  padding: 1rem 1.25rem 0;
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.more-title {
  padding: 0.3rem 1.25rem 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.25;
  text-wrap: balance;
  transition: color 0.2s;
}
.more-meta {
  margin-top: auto;
  padding: 0.5rem 1.25rem 1.1rem;
  font-size: var(--text-small);
  color: var(--muted);
}
@media (hover: hover) {
  .more-card:hover img {
    transform: scale(1.04);
  }
  .more-card:hover .more-title {
    color: var(--accent);
  }
}

/* ---------- Footer -------------------------------------------------------- */

.site-footer {
  margin-top: var(--section-gap);
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) clamp(2rem, 5vw, 3rem);
  background: var(--paper-deep);
  text-align: center;
}
.footer-ornament {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent);
}
.footer-text {
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem);
  line-height: 1.3;
}
.footer-subline {
  max-width: 30rem;
  margin: 0.4rem auto 0;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}
.footer-note {
  max-width: 30rem;
  margin: 0.35rem auto 0;
  text-wrap: balance;
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--muted);
}
.footer-copyright {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  font-size: var(--text-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Footer in two bands (index.html): the invitation on a slightly darker
   beige, and the small print on the usual beige underneath */
.site-footer--split {
  padding: 0;
}
.footer-invite {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  background: var(--paper-darker);
}
.footer-fineprint {
  padding: clamp(1.5rem, 4vw, 2.25rem) var(--gutter);
}
.footer-fineprint .footer-copyright {
  margin-top: 0;
}

/* ---------- Motion -------------------------------------------------------- */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(0.9rem);
  }
}

.recipe .intro > *,
.recipe .content > * {
  animation: fade-up 0.45s var(--ease) both;
}
.recipe .intro > :nth-child(2) { animation-delay: 0.04s; }
.recipe .intro > :nth-child(3) { animation-delay: 0.08s; }
.recipe .intro > :nth-child(4) { animation-delay: 0.12s; }
.recipe .content > * { animation-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero img {
    transform: none;
  }
}

/* ---------- Print -------------------------------------------------------- */

@media print {
  @page {
    margin: 1.6cm;
  }

  :root {
    --paper: #fff;
    --paper-deep: #fff;
    --paper-darker: #fff;
    --ink: #000;
    --muted: #333;
    --line: #bbb;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .skip-link,
  .tagline,
  .round-button,
  .switch-row,
  .tip,
  .counter,
  .footer-ornament,
  .footer-text,
  .footer-subline,
  .more-recipes,
  .footer-note,
  .status {
    display: none !important;
  }

  .recipe * {
    animation: none !important;
  }

  .site-header {
    padding: 0 0 0.4cm;
  }
  .logo {
    font-size: 12pt;
  }

  .hero {
    width: 100%;
    height: 5cm;
    border-radius: 0.3cm;
  }
  .hero img {
    opacity: 1;
    transform: none;
  }

  .intro {
    width: 100%;
    margin-top: 0.5cm;
    padding: 0;
    border-radius: 0;
  }
  h1 {
    margin-top: 0.15cm;
    font-size: 24pt;
  }
  .date {
    font-size: 10pt;
  }
  .cuisine {
    margin-top: 0.15cm;
    font-size: 8pt;
  }
  .lead {
    max-width: 14cm;
    margin-top: 0.25cm;
    font-size: 11pt;
  }
  .facts {
    margin-top: 0.4cm;
  }
  .facts > div {
    padding-block: 0.15cm;
  }
  .facts dd {
    font-size: 12pt;
  }

  .content {
    grid-template-columns: 5.6cm 1fr;
    gap: 0.9cm;
    align-items: start;
    margin-top: 0.6cm;
    padding: 0;
  }
  h2 {
    font-size: 15pt;
  }
  .section-header {
    padding: 0 0 0.15cm;
  }
  .ingredients {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .checklist {
    display: block;
    columns: auto;
  }
  .checklist li {
    border: 0;
  }
  .checklist label {
    gap: 0.25cm;
    min-height: 0;
    margin: 0;
    padding: 0.1cm 0;
  }
  .checklist input,
  .checklist input:checked {
    width: 0.32cm;
    height: 0.32cm;
    margin-top: 0.1cm;
    border: 1px solid #000;
    border-radius: 2px;
    background: none;
  }
  .checklist input:checked + span {
    color: inherit;
    text-decoration: none;
  }
  .servings {
    justify-content: flex-start;
    gap: 0.25cm;
    padding: 0.15cm 0;
    border: 0;
    font-size: 8pt;
  }
  .servings output {
    min-width: 0;
    font-size: 11pt;
  }

  .flow {
    padding-top: 0.2cm;
  }
  .flow > li::before,
  .flow-chevron {
    display: none;
  }
  .flow-task .flow-text {
    padding: 0;
    font-size: 10.5pt;
    line-height: 1.45;
    opacity: 1;
  }
  .flow-moment {
    padding: 0.2cm 0 0;
    font-weight: 700;
    break-after: avoid;
  }
  .flow-pill {
    padding: 0;
    background: none;
  }
  .flow-task {
    gap: 0.25cm;
    margin: 0;
    padding: 0.12cm 0;
    break-inside: avoid;
  }
  .flow-box,
  .flow-task input:checked ~ .flow-box {
    width: 0.32cm;
    height: 0.32cm;
    margin-top: 0.1cm;
    border: 1px solid #000;
    background: none;
  }
  .flow-body,
  .flow-task input:checked ~ .flow-body {
    opacity: 1;
  }
  .flow-label {
    font-size: 10.5pt;
  }
  .step-list li {
    break-inside: avoid;
  }
  .step {
    gap: 0.35cm;
    margin: 0;
    padding: 0.22cm 0;
  }
  .step-number,
  .step input:checked ~ .step-number {
    width: 0.75cm;
    height: 0.75cm;
    border: 1px solid #000;
    background: none;
    font-size: 11pt;
    color: #000;
  }
  .step-text,
  .step input:checked ~ .step-text {
    max-width: none;
    padding-top: 0.08cm;
    font-size: 10.5pt;
    line-height: 1.45;
    opacity: 1;
  }

  .site-footer {
    margin-top: 0.6cm;
    padding: 0;
    text-align: left;
  }
  .footer-copyright {
    margin: 0;
    font-size: 8pt;
  }
}
