/* Fonts: Schibsted Grotesk (headings, buttons and labels) and Newsreader (reading text), served from
   this site rather than Google Fonts, so visitors' browsers don't contact Google. Both are under the
   SIL Open Font License (see fonts/README.md). Schibsted Grotesk was made for a Scandinavian news
   group: clean and quietly Nordic. Newsreader is a serif drawn for long reading on screens. */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/newsreader-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Colours and fonts used across the page, defined once here.
   Each colour is light-dark(light mode, dark mode). The look is "frost and china", from a Nordic
   mood board: light mode is frosty linen with slate-night text, dark mode is a snowy night in deep
   slate with frost-white text. The accent is the blue of blue-and-white china and carries links,
   the search box and drawings; warm is a dried orange used sparingly for small labels and touches.
   No pink and no gold. Dark mode follows the device setting, unless the visitor picks Light or Dark
   with the button at the top (data-theme on <html>). Every text pairing here passes WCAG AA (4.5:1)
   in both modes; tests/contrast.test.js checks it. */
:root {
  color-scheme: light dark;

  --page: light-dark(#eef1f0, #131b21);
  --card: light-dark(#f9fbfa, #1b262e);
  --sunken: light-dark(#e2e8e7, #23313b);
  --ink: light-dark(#1b2a33, #eef2f1);
  --text: light-dark(#33434d, #cfd8da);
  --muted: light-dark(#4d5c66, #a3b0b6);
  --line: light-dark(#d5dddc, #2c3a45);
  --line-strong: light-dark(#78878f, #6f8593);
  --warm: light-dark(#8a4a1f, #e6a774);
  --warm-soft: light-dark(#ecebe6, #262a2c);
  --warm-line: light-dark(#dcc8b6, #5b4636);
  --accent: light-dark(#2c4d78, #a3bde3);
  --accent-deep: light-dark(#22394d, #c9dbe8);
  --accent-soft: light-dark(#e2e9f0, #1f2d39);
  --accent-mist: light-dark(#e8eeef, #172129);
  --shadow: light-dark(rgba(20, 35, 45, 0.07), rgba(0, 0, 0, 0.4));
  --glow: light-dark(rgba(44, 77, 120, 0.14), rgba(163, 189, 227, 0.12));

  /* Type scale: every text size on the site is one of these eight. Keep to them; a new size
     usually means the hierarchy needs rethinking rather than another step. */
  --size-label: 0.78rem; /* small capitals labels, time tags, counts */
  --size-small: 0.9rem; /* chips, hints, notes, footer, small buttons */
  --size-body: 1rem; /* reading text, idea names, tile labels */
  --size-large: 1.2rem; /* recipe card titles, the search box, page subtitles */
  --size-xl: 1.5rem; /* small headings inside sections and cards */
  --size-heading: clamp(1.5rem, 4vw, 1.9rem); /* section headings */
  --size-title: clamp(2.2rem, 6vw, 3.6rem); /* page titles */
  --size-hero: clamp(2.6rem, 9vw, 5rem); /* the home page heading only */

  --display-font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body-font: 'Newsreader', Georgia, 'Times New Roman', serif;
}
:root[data-theme='light'] {
  color-scheme: light;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* A thin accent stripe over a thinner warm one, across the top of every page */
  border-top: 6px solid var(--accent);
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body-font);
  font-size: var(--size-body);
  line-height: 1.5;
  background-color: var(--page);
}

body::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--warm);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--display-font);
  font-weight: 600;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Search ---------- */

.search {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.field-wrap {
  position: relative;
}

.field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 2px 10px var(--shadow);
  cursor: text;
}

.field:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.field input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
}

.field input:focus-visible {
  outline: none;
}
.field input::placeholder {
  color: var(--muted);
}

.search.big .field {
  padding: 12px 14px 12px 20px;
}
.search.big .field input {
  font-size: var(--size-large);
}

.suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 14px 34px var(--shadow);
  text-align: left;
}

.suggestions:empty {
  display: none;
}

.suggestions li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.suggestions li[aria-selected='true'],
.suggestions li:hover {
  background: var(--sunken);
}

.suggestions strong {
  color: var(--ink);
  font-weight: 500;
}
.suggestions small {
  color: var(--muted);
}
.suggestions .none {
  cursor: default;
  color: var(--muted);
  font-style: italic;
}
.suggestions .none:hover {
  background: none;
}

/* ---------- Home ---------- */

.home {
  position: relative;
  z-index: 1; /* keeps the search suggestions above the rest of the page */
  isolation: isolate;
  min-height: min(42vh, 440px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  padding: clamp(32px, 6vw, 56px) 0;
  text-align: center;
}
.home .search {
  z-index: 1;
}
.home .lede {
  color: var(--text);
  text-wrap: balance;
}
.examples {
  margin: 16px 0 0;
  color: var(--muted);
}
.examples a {
  color: var(--accent);
  font-weight: 500;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 4px;
}
.examples a:hover {
  text-decoration-color: var(--accent);
}

.home h1 {
  margin: 0 0 6px;
  font-size: var(--size-hero);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 28px;
  font-family: var(--body-font);
  font-size: var(--size-large);
  color: var(--muted);
}

.home .field {
  border: 2px solid var(--accent);
  box-shadow: 0 10px 30px var(--glow);
}
/* The heading, search and ways in sit in the middle column; the china plate sits in the right-hand
   one, level between the heading and the search. The empty left column keeps the text truly centred. */
.home-hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 760px) 1fr;
  align-items: start;
  width: 100%;
}
.home-centre {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.home-centre .search {
  max-width: 640px;
}
.home-plate {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  width: 124px;
  margin: 48px 0 0 8px;
}
@media (max-width: 960px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-centre {
    grid-column: 1;
  }
  .home-plate {
    display: none;
  }
}

/* A drawing on a china plate (see chinaPlate in app.js): a quiet rim, the drawing in the accent */
.china-plate {
  color: var(--accent);
}
.china-plate svg {
  display: block;
  width: 100%;
  height: auto;
}
.china-plate .rim {
  stroke: var(--line-strong);
}
/* A rope drawn in outline (the pretzel): a thick line, then a thinner one in the card colour on top */
.china-plate .rope {
  stroke-width: 7;
}
.china-plate .knock {
  stroke-width: 4;
  stroke: var(--card);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  color: var(--ink);
}

/* Quick sauces on the front page */
/* Idea of the day and "Back to" the last few ingredients, between the search and the sections */
.mood-link {
  margin: 6px 0 0;
  font-size: var(--size-small);
  color: var(--muted);
}
/* Back to the rummage, mood or food style you came from, above the page name */
.back-link {
  display: inline-block;
  margin: 0 0 10px;
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.title > .back-link + .eyebrow {
  display: block;
}
/* The breakfast and snacks links sit in a wrapper so they can be filled in late; it adds no box of its own */
.mood-links {
  display: contents;
}
.mood-link a {
  color: var(--accent);
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}
.plain-means {
  margin: 6px 0 0;
  max-width: 60ch;
  font-size: var(--size-small);
  color: var(--muted);
}
.styles {
  margin-top: 40px;
}
.style-region {
  margin-top: 18px;
}
.style-region h2,
.style-region h3,
.style-recipes h3 {
  margin: 0 0 8px;
  font-family: var(--display-font);
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.style-recipes {
  margin-top: 18px;
}
.style-recipes .minutes {
  color: var(--muted);
  font-size: var(--size-small);
}
.all-ingredients {
  margin-top: 14px;
}
.all-ingredients summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
}
.all-ingredients .ingredients {
  margin-top: 12px;
}
/* Other food styles at the foot of a style page, folded until opened */
.other-styles {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.other-styles summary {
  font-size: var(--size-body);
}
.page-head > .back-link + .eyebrow {
  display: block;
}
/* Room above the ingredients on a style page, and between a page intro and the lines under it */
#style-signature {
  margin-top: 40px;
}
.page-head > .jump-to {
  margin-top: 12px;
}
.page-head > p + p.hint {
  margin-top: 8px;
}
.home-cast {
  margin: 64px 0 36px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.home-cast h2 {
  margin: 0;
  font-size: var(--size-title);
}
.home-cast p {
  margin: 8px auto 0;
  max-width: 46ch;
  color: var(--muted);
}
.home-extras {
  display: grid;
  gap: 48px;
}
@media (min-width: 860px) {
  /* Each section's heading, hint and buttons line up with the one beside it */
  .home-extras {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 0;
  }
  .home-extras .home-sauces {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-content: start;
    padding-bottom: 48px;
  }
  .home-extras .home-sauces h2 {
    align-self: end;
  }
  .home-extras .home-sauces {
    text-align: left;
  }
  .home-extras .occasions {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-extras .home-sauces {
    margin: 0;
  }
  .home-extras .home-soups .occasions:not(.long) {
    grid-template-columns: repeat(3, 1fr);
  }
  .home-extras .occasions.long {
    grid-template-columns: repeat(2, 1fr);
  }
}
.home-sauces {
  width: 100%;
  margin: 0 auto;
  max-width: 760px;
  text-align: center;
}
.home-sauces h2 {
  margin: 0 0 4px;
  font-size: var(--size-heading);
}
.home-sauces .hint {
  margin: 0 0 18px;
  color: var(--muted);
}
.home-sauces .ingredients {
  text-align: left;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.home-sauces .more-link {
  margin-top: 16px;
}
.occasions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: left;
}
/* Long labels (Salad dressings, Wraps and flatbreads) get two roomy columns on phones, so every
   label sits on one or two lines; short ones (Brothy, Pies) keep three */
@media (max-width: 600px) {
  .occasions.long {
    grid-template-columns: repeat(2, 1fr);
  }
}
.more-sauces {
  margin-top: 36px;
}
.more-sauces .section-label {
  margin-bottom: 12px;
}
.occasion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: var(--size-body);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
.occasion {
  background: var(--card);
  border-color: var(--line);
  text-wrap: balance;
}
.occasion:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-mist);
}
.occasion[aria-current] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
/* Every other button is warm, so both colours show from the start */
.occasion:nth-child(even) .occasion-drawing {
  color: var(--warm);
}
.occasion:nth-child(even):hover {
  border-color: var(--warm);
  background: var(--warm-soft);
}
.occasion:nth-child(even)[aria-current] {
  border-color: var(--warm);
  background: var(--warm-soft);
}
.occasion:nth-child(even) .count {
  background: var(--warm-soft);
  color: var(--warm);
}
.occasion-drawing {
  flex: none;
  width: 34px;
  height: 34px;
}
.occasion .count {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: var(--size-label);
  font-weight: 700;
  color: var(--accent-deep);
}
.occasion-drawing svg {
  display: block;
  width: 100%;
  height: 100%;
}
.occasion .occasion-drawing {
  color: var(--accent);
}
/* On a section's sub-pages (Dessert sauces, Quick breads) the kind is already picked, so the tiles
   become one row of small chips to switch kind, and the recipes start on the first screen. On a
   phone the row scrolls sideways instead of stacking */
.section-title ~ .occasions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title ~ .occasions .occasion {
  flex-direction: row;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: var(--size-small);
  white-space: nowrap;
  text-wrap: nowrap;
}
.section-title ~ .occasions .occasion:hover {
  transform: none;
}
.section-title ~ .occasions .occasion-drawing {
  width: 22px;
  height: 22px;
}
.section-title ~ .occasions .count {
  margin-left: 2px;
}
@media (max-width: 600px) {
  .section-title ~ .occasions {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -16px;
    padding-right: 16px;
    scrollbar-width: none;
  }
  .section-title ~ .occasions::-webkit-scrollbar {
    display: none;
  }
}
.page-search + .occasions {
  margin: 18px 0 10px;
}

/* ---------- Inspire me ---------- */

.page-head {
  padding-top: 24px;
}
/* Under the ingredient search row the line above already gives it room */
.start-over + .page-head {
  padding-top: 0;
}

.page-head h1 {
  margin: 4px 0 6px;
  font-size: var(--size-title);
  line-height: 1;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}
.page-head .lede {
  margin: 8px 0 10px;
}
.page-head .eyebrow {
  color: var(--accent);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 18px;
}

.tab,
.chip {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.tab:hover,
.chip:hover {
  border-color: var(--ink);
}

.tab[aria-current='true'],
.chip[aria-current='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--page);
}

.chip.style {
  border-color: var(--accent);
  color: var(--accent);
}
.chip.style:hover {
  background: var(--accent-soft);
}
.chip.style[aria-current='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

.ingredients {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.ingredient {
  display: block;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--display-font);
  font-size: var(--size-body);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.ingredient:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

/* ---------- Ingredient, pairing and fridge pages ---------- */

.page-search {
  margin: 8px 0 28px;
}
.title + .page-search {
  margin-top: 20px;
}

.title h1 {
  margin: 4px 0 0;
  font-size: var(--size-title);
  line-height: 1;
  letter-spacing: -0.02em;
}

.title p {
  margin: 8px 0 0;
  color: var(--muted);
}
.title p a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.direction {
  margin-top: 14px;
}

.direction h3 {
  margin: 0 0 8px;
  font-family: var(--body-font);
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip small {
  opacity: 0.7;
  margin-left: 4px;
  font-weight: 400;
}

.box {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.featured .more-different {
  margin-top: 28px;
}

.box h2 {
  margin: 0;
  font-size: var(--size-heading);
}

.box .hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--size-small);
}

.idea {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--ink);
}

.idea strong {
  font-family: var(--display-font);
}

.pairings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.pairings a {
  display: inline-block;
  padding: 5px 13px;
  border: 1px solid var(--warm-line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.pairings .classic a {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
}

.empty {
  margin: 20px 0 0;
  color: var(--muted);
  font-style: italic;
}

/* Quick sauces */

.sauces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.sauce {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.sauce h3 {
  margin: 6px 0 8px;
  font-size: var(--size-large);
}
.sauce p {
  margin: 6px 0 0;
}
.sauce-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.sauce .tastes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
}
.taste {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--size-label);
  font-weight: 700;
  background: var(--page);
  color: var(--ink);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.taste.spicy {
  background: light-dark(#eadbcf, #3a2a25);
  border-color: light-dark(#d4bca9, #5e4237);
  color: light-dark(#7a3a22, #e0ae95);
}
.taste.tangy {
  background: light-dark(#eae6d2, #2f3226);
  border-color: light-dark(#cfc9a6, #50533d);
  color: light-dark(#555020, #d8d3a4);
}
.taste.creamy {
  background: light-dark(#eee6d6, #2e2b26);
  border-color: light-dark(#d8ccb5, #4e483d);
  color: light-dark(#5e4e33, #ded2ba);
}
.taste.herby {
  background: light-dark(#e3ebe2, #1f2b22);
  border-color: light-dark(#b9c9b6, #3f5644);
  color: light-dark(#3d5a3a, #b5cfaa);
}
.taste.sweet {
  background: var(--warm-soft);
  border-color: var(--warm-line);
  color: var(--warm);
}
.taste.savoury {
  background: light-dark(#e3e8ea, #252f37);
  border-color: light-dark(#c3ccd1, #44525c);
  color: light-dark(#3a4852, #cfd8dc);
}
.sauce-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  align-items: center;
  margin-top: 22px;
}
.drop-downs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.drop-down {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--size-small);
  color: var(--muted);
}
.drop-down select {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: var(--size-small);
  cursor: pointer;
}
.showing {
  margin: 18px 0 0;
  color: var(--muted);
}
.showing a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}
.recipe-link {
  margin-left: 6px;
  font-size: var(--size-label);
  font-weight: 700;
  color: var(--warm);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.card-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-wrap .card {
  flex: 1;
}
.card-wrap .recipe-link {
  margin-left: 4px;
}
.make-your-own {
  margin-top: 24px;
}
.make-your-own .sauces {
  margin-top: 10px;
}
.chips-label {
  align-self: center;
  font-size: var(--size-small);
  color: var(--muted);
  margin-right: 2px;
}
.sauce-group {
  margin-top: 26px;
}
/* The first list straight after the tiles gets the same room as on a section's front page */
.occasions + .sauce-group {
  margin-top: 44px;
}
.sauce-group .sauces {
  margin-top: 10px;
}
.sauce .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sauce .needs {
  margin: 4px 0 0;
  padding-left: 1.2em;
  font-size: var(--size-body);
  line-height: 1.6;
  color: var(--ink);
}
.sauce .needs li::marker {
  color: var(--warm);
}
.sauce .meta span:first-child {
  color: var(--warm);
}
.sauce .needs .basic {
  color: var(--muted);
}
.sauce .sauce-link {
  margin: 10px 0 0;
  font-size: var(--size-small);
  color: var(--muted);
}
.sauce .sauce-link a {
  color: var(--warm);
  text-decoration-color: var(--warm-line);
  text-underline-offset: 3px;
}
.sauce .note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: var(--size-small);
  color: var(--muted);
}
.sauce .needs a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.side .top-with {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warm-soft);
}
.side .top-with h4 {
  margin: 0;
  font-family: var(--body-font);
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
}
.side .top-with .needs {
  margin-top: 4px;
}
.title + .occasions {
  margin: 18px 0 10px;
}
/* A section's front page (Sauces, Sides...): room between the intro, the search, the tiles and
   the first list, so each reads as its own step instead of one squeezed block */
.page-head h1 + p {
  margin-top: 10px;
}
.page-head + .page-search {
  margin-top: 24px;
}
.page-head + .page-search + .occasions {
  margin: 32px 0 0;
}
.page-head + .page-search + .occasions + .section-label {
  margin-top: 44px;
}
.made-with {
  margin-top: 40px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.made-with > h2 {
  margin: 14px 0 0;
  font-size: var(--size-xl);
}

.more-link {
  margin: 14px 0 0;
}
.more-link a {
  color: var(--ink);
  font-weight: 500;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

/* "Not written yet" verdict for unwritten mixes */

.verdict {
  padding-left: 20px;
  border-left: 4px solid var(--line-strong);
  border-top: 0;
}
.verdict.promising {
  border-left-color: var(--accent);
}
.verdict.maybe {
  border-left-color: var(--warm);
}
.verdict.bold {
  border-left-color: var(--ink);
}
.verdict h2 {
  margin-top: 0;
}
.verdict > p {
  margin: 8px 0 0;
}

.reasons {
  margin: 12px 0 0;
  padding-left: 20px;
}
.reasons li + li {
  margin-top: 4px;
}

.bridge {
  display: inline-block;
  font-family: var(--display-font);
  font-weight: 600;
  font-size: var(--size-large);
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.start-from + .start-from {
  margin-top: 18px;
}
.start-from h3 {
  margin: 16px 0 0;
  font-size: var(--size-large);
}
.start-from h3 a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}
.together .who {
  font-weight: 700;
  color: var(--ink);
}

/* Start here cards */

.featured {
  margin-top: 28px;
}
.more-different {
  margin-top: 14px;
}

.section-label {
  margin: 0 0 12px;
  font-family: var(--body-font);
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
#picks {
  color: var(--warm);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--warm-soft);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--warm);
}
.card .plus {
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--warm);
}
.card strong {
  color: var(--ink);
}
.card strong {
  font-family: var(--display-font);
  font-size: var(--size-xl);
  line-height: 1.1;
}
.card .how {
  line-height: 1.45;
}

/* Things to do with... */

.ways {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ways li {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 4px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ways li:first-child {
  border-top: 0;
}

.ways a {
  font-family: var(--display-font);
  font-weight: 600;
  font-size: var(--size-body);
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

/* Food style pages: pairings as cards, three across (one on a phone), the whole card a link */
.pair-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.pair-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.15s ease;
}
.pair-card[hidden] {
  display: none;
}
.pair-card:hover {
  border-color: var(--accent);
}
.pair-card-link {
  padding-right: 32px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: var(--size-large);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
.pair-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
}
.pair-card-link:focus-visible {
  outline: none;
}
.pair-card:has(.pair-card-link:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.pair-card .plus {
  color: var(--muted);
  font-weight: 400;
}
.pair-card p {
  margin: 0;
  color: var(--text);
  font-size: var(--size-small);
  line-height: 1.5;
}
.pair-card .save {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}
.pair-cards + .show-all {
  margin-top: 14px;
}
@media (max-width: 860px) {
  .pair-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .pair-cards {
    grid-template-columns: 1fr;
  }
  .pair-card {
    min-height: 0;
  }
}
.style-recipes[hidden] {
  display: none;
}
.way-filter .chip small {
  margin-left: 6px;
}
/* The row of kinds over a long list of ideas */
.way-filter {
  margin: 14px 0 0;
}
.way-filter .chip {
  font-size: var(--size-small);
  padding: 5px 12px;
}
.also {
  margin-top: 20px;
}
.also-good {
  margin: 16px 0 0;
  font-size: var(--size-small);
  color: var(--muted);
}
.also h3 {
  margin: 0;
  font-family: var(--body-font);
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.also .pairings {
  margin-top: 10px;
}

/* Ways to make them work together */

.together {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.together li {
  position: relative;
  padding: 12px 40px 12px 0;
  border-top: 1px solid var(--line);
}
.together li > .save {
  position: absolute;
  top: 8px;
  right: 0;
}
.together li:first-child {
  border-top: 0;
}
/* The idea someone came for (?idea= in the address): first, on a soft tint with a short label */
.together li.picked {
  padding: 12px 48px 14px 14px;
  border-top: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-mist);
}
.together li.picked > .save {
  right: 8px;
}
.together li.picked + li {
  border-top: 0;
}
.picked-label {
  margin: 0 0 4px;
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.together strong {
  font-family: var(--display-font);
  font-size: var(--size-large);
  color: var(--ink);
}
.together small {
  color: var(--warm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: var(--size-label);
}
.together p {
  margin: 4px 0 0;
}
.together li > .save + p {
  margin: 0;
  font-size: var(--size-body);
}

@media (max-width: 600px) {
  .ways li {
    grid-template-columns: 1fr;
  }
}

/* On phones, each row of chips becomes one line you can swipe sideways */
@media (max-width: 600px) {
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -16px;
    padding: 2px 16px 6px 2px;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chip {
    flex: none;
    padding: 7px 14px;
  }
}

/* Calm version for people who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .sauce.flash {
    animation: none;
    box-shadow: 0 0 0 3px var(--accent);
  }
}

@media (max-width: 420px) {
  .occasions {
    gap: 8px;
  }
  .occasions:not(.long) .occasion {
    flex-direction: column;
    justify-content: center;
    padding: 12px 6px;
    gap: 6px;
    font-size: var(--size-small);
    line-height: 1.2;
    text-align: center;
  }
  .occasions.long .occasion {
    padding: 10px 12px;
    gap: 8px;
    font-size: var(--size-small);
    line-height: 1.25;
  }
  .occasion-drawing {
    width: 28px;
    height: 28px;
  }
}

/* ---------- Ingredient drawing ---------- */

main {
  position: relative;
  isolation: isolate;
}
.title {
  position: relative;
}
/* The drawing floats beside the heading in its own space: the words wrap round it and never run
   over it, at any screen width */
.title,
.page-head {
  display: flow-root;
}
.ingredient-graphic {
  float: right;
  width: clamp(110px, 12vw, 150px);
  height: clamp(110px, 12vw, 150px);
  margin: 0 0 8px 24px;
  opacity: 0.85;
  pointer-events: none;
}
/* On the recipe section pages the drawing is taller than the short heading beside it. Rather than
   push the search box down below it, it sits in the corner and the search follows the heading */
@media (min-width: 601px) {
  .section-title,
  .page-head:has(> .ingredient-graphic) {
    position: relative;
    padding-right: 200px;
  }
  .section-title > .ingredient-graphic,
  .page-head > .ingredient-graphic {
    position: absolute;
    top: 0;
    right: 0;
    float: none;
    margin: 0;
  }
}
.ingredient-graphic svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ingredient-graphic.pair-graphic {
  width: clamp(180px, 22vw, 300px);
  height: clamp(90px, 11vw, 150px);
}
@media (max-width: 600px) {
  .ingredient-graphic {
    width: 72px;
    height: 72px;
    margin: 0 -4px 6px 12px;
    opacity: 0.7;
  }
  .ingredient-graphic.pair-graphic {
    width: 112px;
    height: 56px;
  }
}
.ingredient-graphic.artichoke {
  color: var(--accent);
}
.ingredient-graphic.rose {
  color: var(--warm);
}

/* ---------- Home link ---------- */

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--warm);
  font-weight: 500;
  text-decoration: none;
}
.home-link svg {
  width: 24px;
  height: 24px;
}
.home-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* "How to make ..." links read as a small helper, not another ingredient */
.ways a.recipe-link {
  font-family: var(--body-font, inherit);
  font-size: var(--size-small);
  font-weight: 700;
  color: var(--warm);
  text-decoration-color: var(--warm);
}

/* ---------- Pair it with ---------- */

.pair-with {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  max-width: 560px;
}
.pair-label {
  color: var(--muted);
  font-size: var(--size-small);
}
.pair-with .search {
  flex: 1 1 260px;
}

/* ---------- Small colour accents ---------- */

/* A short accent rule under each section heading, warm for the surprising ones */
.box > h2::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--accent);
}
/* Chips straight under a heading (Other moods) get room below its line, as a hint line would give */
.box > h2 + .chips {
  margin-top: 16px;
}
.more-different > h2::after {
  background: var(--warm);
}
.pairings a:hover {
  background: var(--warm-soft);
  border-color: var(--warm);
}
.pairings .classic a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ingredient:hover {
  border-color: var(--accent);
}
.chip[aria-current='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}
.tab[aria-current='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

/* Drawings on the Inspire me page and mix pages */
.page-head {
  position: relative;
}
.pair-graphic {
  display: flex;
  aspect-ratio: 2 / 1;
  max-width: 32vw;
  opacity: 0.5;
}
.pair-graphic svg {
  flex: 1;
}
.pair-graphic svg + svg {
  color: var(--warm);
}

/* "Can't find it?" substitute hint */
.swap {
  margin: 12px 0 0;
  padding: 8px 12px;
  max-width: 560px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-soft);
  color: var(--text);
  font-size: var(--size-small);
}
.swap strong {
  color: var(--accent);
  font-weight: 700;
}
.swap a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* ---------- Chip key, cross-links and footer ---------- */

.also-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}
.chip-key {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--size-label);
  color: var(--muted);
}
.chip-key .key {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.chip-key .key.classic {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}
.chip-key .key.different {
  margin-left: 8px;
  border: 1px solid var(--warm);
}
.also-head + .pairings {
  margin-top: 10px;
}

.also-need {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.also-need h2 {
  margin: 0 0 4px;
  font-size: var(--size-heading);
}
.also-need .more-link {
  margin: 18px 0 0;
}
.also-need .occasions {
  margin-top: 14px;
}

/* The footer is site furniture like the top bar, so all of it, tagline included, is in the label typeface */
.site-footer {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display-font);
  font-size: var(--size-small);
}
.site-footer p {
  margin: 0;
}
.site-footer strong {
  margin-right: 6px;
  color: var(--ink);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
}
.site-footer a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Written-out page content ----------
   Shown for a moment before app.js draws the full page (and to search engines) */

.static {
  padding-top: 12px;
}
.static h1 {
  margin: 8px 0;
  font-size: var(--size-title);
  line-height: 1.05;
}
/* The front page's hero arrives drawn exactly as the browser will draw it (see homePage in build-pages.js) */
.static .home h1 {
  margin: 0 0 6px;
  font-size: var(--size-hero);
  line-height: 1;
  letter-spacing: -0.02em;
}
/* Room for the buttons the browser adds above it, and the heading at the top as the full hero has it, so nothing jumps */
.static .home {
  justify-content: flex-start;
  margin-top: 36px;
}
.static h2 {
  margin: 28px 0 8px;
  font-size: var(--size-xl);
}
.static h3 {
  margin: 18px 0 4px;
  font-size: var(--size-large);
}
.static p,
.static li {
  color: var(--text);
}
.static a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* "Show all" at the end of a long chip list */
.show-all {
  padding: 5px 13px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: var(--size-small);
  font-weight: 500;
  cursor: pointer;
}
.show-all:hover {
  background: var(--accent-mist);
  border-style: solid;
}

/* ---------- Top bar: Home link and the light or dark button ---------- */

/* Wraps onto a second line rather than off the edge when a screen is too narrow for everything */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 32px;
  margin-bottom: 16px;
}
.top-bar .home-link {
  margin-bottom: 0;
}
.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: var(--size-small);
  cursor: pointer;
}
.theme-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-button svg {
  width: 16px;
  height: 16px;
}
.top-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-left .about-button {
  margin-left: 0;
}
/* The ingredient search in the top bar: slim and quiet, so the page's own heading and search lead */
.top-search {
  flex: 0 1 300px;
  margin-right: auto;
  margin-left: 8px;
}
.top-search .search {
  max-width: none;
}
.top-search .field {
  padding: 2px 10px 2px 14px;
  box-shadow: none;
}
.top-search .field input {
  padding: 5px 2px;
  font-size: var(--size-small);
}
.search-toggle {
  display: none;
}
.search-toggle svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 860px) {
  .search-toggle {
    display: inline-flex;
  }
  .top-search {
    display: none;
    flex: 1 0 100%;
    order: 3;
    margin: 4px 0 0;
  }
  .top-search.open {
    display: block;
  }
}
/* The About card: opens under its button in the top left (app.js sets top and left when it opens) */
.about-card {
  position: fixed;
  inset: auto;
  margin: 0;
  overflow-y: auto;
  width: min(340px, calc(100vw - 32px));
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 14px 34px var(--shadow);
}
.about-card h2 {
  margin: 0 0 8px;
  font-size: var(--size-large);
}
.about-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}
.about-card p:last-child {
  margin-bottom: 0;
}
.about-card a {
  color: var(--accent);
  font-weight: 500;
}
.top-buttons .theme-button {
  margin-left: 0;
}
.theme-button.on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
/* The list of choices a top-bar button opens */
.choice-holder {
  position: relative;
}
.choice-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 14px 34px var(--shadow);
}
.choice-menu[hidden] {
  display: none;
}
.choice-name {
  margin: 4px 10px 4px;
  font-size: var(--size-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: var(--size-small);
  text-align: left;
  cursor: pointer;
}
.choice:hover,
.choice:focus-visible {
  background: var(--sunken);
}
.choice[aria-pressed='true'] {
  color: var(--accent);
  font-weight: 600;
}
.choice[aria-pressed='true']::after {
  content: '';
  width: 10px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
}
.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--page);
}
.diet-choices {
  margin-top: 16px;
}
.diet-choices .chip {
  font: inherit;
  font-weight: 500;
}

/* ---------- How long you've got ---------- */
.time-button.on {
  border-color: var(--warm-line);
  color: var(--warm);
  background: var(--warm-soft);
}
.time-note {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: var(--size-small);
  text-align: right;
}
/* What the diet or time picked is hiding, where the ideas start */
.filter-bar {
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid var(--warm-line);
  border-radius: 12px;
  background: var(--warm-soft);
  color: var(--ink);
  font-size: var(--size-small);
  line-height: 1.5;
}
.box .filter-bar {
  margin: 12px 0 4px;
}
.title + .filter-bar {
  margin-top: 18px;
}
.filter-bar .link-button {
  color: var(--warm);
  font: inherit;
  font-weight: 500;
  text-decoration-color: var(--warm-line);
  text-underline-offset: 3px;
}
.time-note .link-button {
  color: var(--warm);
  font: inherit;
  text-decoration-color: var(--warm-line);
  text-underline-offset: 3px;
}
.time-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--size-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: 1px;
  background: var(--accent-mist);
  color: var(--accent);
}
.time-tag.handsoff,
.time-tag.project {
  background: var(--warm-soft);
  color: var(--warm);
}
/* "Use vegan butter": the shop swap an idea needs for the diet picked */
.swap-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--size-label);
  font-weight: 500;
  white-space: nowrap;
  vertical-align: 1px;
  background: var(--accent-soft);
  color: var(--accent);
}
.swap-note {
  margin: 8px 0 0;
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--accent);
}
.card .time-tag,
.card .swap-tag {
  margin: 2px 0 0;
  align-self: flex-start;
}
/* On a phone the button is just the clock (coloured when a time is picked), and the line under it says which */
.theme-button {
  white-space: nowrap;
}
/* On a small tablet the clock and theme are just icons, to leave room for the site's name */
@media (max-width: 720px) {
  .time-button .time-label {
    display: none;
  }
  .theme-label {
    display: none;
  }
}
@media (max-width: 480px) {
  /* The site's name stays, so a shared link always says where you are. To make room, the food
     button is just its leaf until a choice is made ("Vegan" still shows) */
  .about-label {
    font-size: var(--size-small);
  }
  .about-button svg {
    display: none;
  }
  .theme-button:not(.on) .diet-label {
    display: none;
  }
  .top-bar .home-label {
    display: none;
  }
  /* A little tighter, so the bar fits a small phone even with "Vegetarian" showing */
  .top-left,
  .top-buttons {
    gap: 6px;
  }
  .top-bar .theme-button {
    padding: 5px 9px;
  }
  .time-note {
    text-align: left;
  }
}

/* ---------- Save buttons ---------- */

.save {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.save svg {
  width: 18px;
  height: 18px;
  fill: none;
}
.save:hover {
  color: var(--warm);
  background: var(--warm-soft);
}
.save[aria-pressed='true'] {
  color: var(--warm);
}
.save[aria-pressed='true'] svg {
  fill: currentColor;
}
.ways li {
  grid-template-columns: minmax(120px, 180px) 1fr auto;
  align-items: start;
}
.ways li .save {
  margin-top: -4px;
}
.card-wrap {
  position: relative;
  isolation: isolate;
}
.card-wrap > .save {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}
.card-wrap > .save:hover {
  background: var(--card);
}
.sauce-top .save {
  margin: -6px -8px 0 0;
}
.sauce-top .tastes {
  margin-left: auto;
}
@media (max-width: 600px) {
  .ways li {
    grid-template-columns: 1fr auto;
  }
  .ways li > a {
    grid-column: 1;
  }
  .ways li > span {
    grid-column: 1;
  }
  .ways li .save {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* The basics box on the pies pages: one line each, folded away once you know them */
.basics summary {
  cursor: pointer;
  list-style: none;
}
.basics summary::-webkit-details-marker {
  display: none;
}
.basics summary h2 {
  display: inline-block;
}
.basics summary h2::before {
  content: '+ ';
  color: var(--accent);
}
.basics[open] summary h2::before {
  content: '\2212  ';
}
.basics dl {
  display: grid;
  grid-template-columns: minmax(110px, 170px) 1fr;
  gap: 8px 16px;
  margin: 16px 0 0;
}
.basics dt {
  font-family: var(--display-font);
  font-weight: 600;
  color: var(--ink);
}
.basics dd {
  margin: 0;
}
@media (max-width: 600px) {
  .basics dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .basics dd {
    margin-bottom: 10px;
  }
}

/* A dish found by search: its card is highlighted for a moment */
.sauce.flash {
  animation: flash 2.4s ease-out;
}
@keyframes flash {
  0%,
  40% {
    box-shadow: 0 0 0 3px var(--accent);
  }
  100% {
    box-shadow: 0 0 0 3px transparent;
  }
}
.suggestions li.dish small {
  color: var(--warm);
}

/* Front-page section headings are buttons that fold the section away on phones */
.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: default;
}
.section-toggle .chevron {
  display: none;
}
@media (max-width: 600px) {
  .home-extras {
    gap: 4px;
  }
  .home-sauces {
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }
  .section-toggle {
    width: 100%;
    justify-content: space-between;
    cursor: pointer;
  }
  .section-toggle .chevron {
    display: block;
    flex: none;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
  }
  .home-sauces.open .section-toggle .chevron {
    transform: rotate(-135deg);
  }
  .home-sauces:not(.open) > .occasions {
    display: none;
  }
  .home-sauces .hint {
    margin-bottom: 0;
  }
  .home-sauces.open .hint {
    margin-bottom: 14px;
  }
  .home-sauces h2 {
    font-size: var(--size-xl);
    text-align: left;
  }
  .home-sauces .hint {
    text-align: left;
  }
}

/* "Jump to: sauces · sides · soups · pies" under an ingredient's title */
.jump-to {
  margin: 12px 0 0;
  font-size: var(--size-small);
  color: var(--muted);
}
.jump-to .link-button {
  color: var(--accent);
  font-weight: 500;
  text-decoration-color: var(--accent-soft);
}
.jump-to .link-button:hover {
  text-decoration-color: var(--accent);
}
[id^='quick-'] {
  scroll-margin-top: 16px;
}

/* Long idea lists on phones: the rest wait behind a "Show all" button */
.ways li[hidden] {
  display: none;
}
.ways + .show-all {
  margin-top: 12px;
}

/* ---------- Shopping list on the Saved page, and shared lists ---------- */

.shopping {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.shop-group h3 {
  margin: 0 0 6px;
  font-family: var(--body-font);
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.shop-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.shop-group li + li {
  border-top: 1px solid var(--line);
}
.shop-group label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 9px 0;
  cursor: pointer;
}
.shop-group input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  align-self: center;
  accent-color: var(--accent);
  cursor: pointer;
}
.shop-name {
  color: var(--ink);
  font-weight: 500;
}
.shop-group small {
  flex-basis: 100%;
  padding-left: 28px;
  color: var(--muted);
  font-size: var(--size-small);
}
/* On a shared list, ticks mean "got it", so ticked lines fade */
.got-it input:checked ~ span,
.got-it input:checked ~ small {
  color: var(--muted);
  text-decoration: line-through;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 20px;
}
.share-button {
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--card);
  font-weight: 600;
  cursor: pointer;
}
.share-button:hover {
  background: var(--accent-deep);
}
.share-button:disabled {
  background: var(--accent-soft);
  color: var(--accent);
  cursor: default;
}
.share-status:empty {
  display: none;
}
.share-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: var(--size-small);
}
.share-link {
  width: 100%;
  max-width: 32rem;
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: var(--size-small);
}

/* ---------- Tonight's plate ---------- */
.plate-me {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 18px auto 0;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
  font-size: var(--size-body);
  text-decoration: none;
  box-shadow: 0 2px 10px var(--shadow);
}
.plate-me:hover {
  background: var(--accent-deep);
}
.plate-me strong {
  font-weight: 600;
}
.home .plate-me {
  display: flex;
  width: fit-content;
}
.plate {
  display: grid;
  gap: 16px;
  margin: 8px 0 20px;
}
.plate-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.plate-main {
  border-color: var(--warm-line);
  background: var(--warm-soft);
  position: relative;
}
.plate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.plate-top .section-label {
  margin: 0;
}
.plate-pair {
  font-family: var(--display-font);
  font-size: var(--size-xl);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.plate-pair:hover {
  text-decoration: underline;
  text-decoration-color: var(--warm);
}
.plate-text {
  margin: 6px 0 0;
  font-size: var(--size-body);
  line-height: 1.55;
  color: var(--text);
}
.plate-main .save {
  position: absolute;
  right: 18px;
  bottom: 16px;
}
.plate-card .sauce {
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}
.plate-shuffle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}
.plate-shuffle:hover {
  border-color: var(--warm);
  color: var(--warm);
}
.plate-shuffle svg {
  width: 18px;
  height: 18px;
}
.plate-note {
  margin: 0 4px;
}
.plate-actions {
  margin: 0 0 32px;
}
.plate-status:empty {
  display: none;
}
.plate-status {
  margin: 10px 0 0;
}
.title .diet-choices + .diet-choices {
  margin-top: 8px;
}
/* The time and diet choices are only three each, so they wrap rather than swipe */
@media (max-width: 600px) {
  .title .diet-choices {
    flex-wrap: wrap;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Moods: chips on the front page, Inspire me and each mood page, and the list at /moods/ */
.mood-chips .chip {
  font-size: var(--size-small);
  padding: 6px 14px;
}
.page-head .mood-chips {
  margin-top: 14px;
}
.title .plate-me {
  margin: 18px 0 0;
}
.box > .ways + .chip {
  margin-top: 12px;
}
/* Moods page: a card per mood, two across (one on a phone), the whole card a link */
.mood-group {
  margin-top: 28px;
}
.mood-group + .mood-group {
  margin-top: 32px;
}
.mood-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.mood-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 140px;
  padding: 14px 16px 14px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.mood-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.mood-card-drawing {
  flex: none;
  width: 116px;
  margin-left: auto;
}
.mood-card-text {
  flex: 1 1 auto;
  min-width: 0;
}
.mood-card strong {
  display: block;
  font-family: var(--display-font);
  font-size: var(--size-large);
  font-weight: 600;
  line-height: 1.25;
}
.mood-card .mood-line {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: var(--size-small);
}
@media (max-width: 600px) {
  .mood-cards {
    grid-template-columns: 1fr;
  }
  .mood-card {
    min-height: 112px;
  }
  .mood-card-drawing {
    width: 92px;
  }
}
/* On the front page the moods wrap rather than swipe, so all seven show at once */
@media (max-width: 600px) {
  .home-moods .mood-chips {
    flex-wrap: wrap;
    overflow: visible;
    margin-right: 0;
    padding: 0;
  }
}

/* Three to start with: a small label on each card, then "Also goes with" grouped by taste */
.card .pick-label {
  align-self: flex-start;
  padding: 2px 10px;
  border: 1px solid var(--warm-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--warm);
  font-size: var(--size-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Surprise me: a button by "Inspire me", then a card that shuffles and settles on a pairing */
.surprise-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--card);
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.surprise-button:hover {
  background: var(--accent);
  color: var(--card);
}
.surprise-button .die {
  width: 18px;
  height: 18px;
  transition: transform 0.4s ease;
}
.surprise-button:hover .die {
  transform: rotate(90deg);
}
.surprise-card[hidden] {
  display: none;
}
.surprise-card {
  display: grid;
  gap: 6px;
  justify-items: center;
  width: min(100%, 520px);
  margin: 18px auto 0;
  padding: 20px;
  border: 1px solid var(--accent);
  border-radius: 18px;
  background: var(--accent-soft);
  text-align: center;
}
.surprise-label {
  margin: 0;
  font-size: var(--size-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.surprise-pair {
  font-family: var(--display-font);
  font-size: var(--size-xl);
  line-height: 1.15;
  color: var(--ink);
}
.surprise-how {
  margin: 2px 0 0;
  line-height: 1.5;
  color: var(--text);
}
.surprise-actions {
  justify-content: center;
  margin-top: 8px;
}
.surprise-actions .take-me {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--page);
}
.surprise-card.spinning .surprise-pair {
  color: var(--muted);
}
.surprise-pair.tick {
  animation: surprise-tick 0.12s ease-out;
}
.surprise-card.settled {
  animation: surprise-settle 0.35s ease-out;
}
@keyframes surprise-tick {
  from {
    transform: translateY(-8px);
    opacity: 0.2;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes surprise-settle {
  0% {
    transform: scale(0.97);
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .surprise-pair.tick,
  .surprise-card.settled {
    animation: none;
  }
}
@media (max-width: 600px) {
  .surprise-actions {
    flex-wrap: wrap;
    overflow: visible;
    margin-right: 0;
    padding: 0;
  }
}

/* This weekend: the week's pick, between the front-page search and the recipe sections */
.weekend {
  max-width: 640px;
  margin: 0 auto 48px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.weekend .section-label {
  color: var(--warm);
}
.weekend-line {
  margin: 0 0 14px;
  font-family: var(--body-font);
  font-size: var(--size-body);
  line-height: 1.5;
  color: var(--text);
  text-wrap: balance;
}
.weekend-pair {
  font-weight: 600;
  color: var(--ink);
  text-decoration-color: var(--warm);
  text-underline-offset: 4px;
}
.weekend-idea {
  margin: 6px 0 0;
  line-height: 1.5;
  color: var(--text);
}
.weekend-links {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: var(--size-small);
}
.weekend-links a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}
.weekend-links .link-button {
  font: inherit;
}

/* The front page: search, then ideas for it, then two ways to have it decided for you */
.home .examples {
  margin: 14px 0 0;
}
.home .examples .rummage {
  color: var(--ink);
  text-decoration-color: var(--warm);
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.home-decide {
  font-family: var(--display-font);
  color: var(--muted);
}
.home-actions .plate-me {
  margin: 0;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
  font-family: var(--display-font);
  font-weight: 600;
}
.home-actions .plate-me:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
.home-actions .surprise-button {
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: var(--size-body);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.home-actions .surprise-button:hover {
  background: none;
  color: var(--ink);
}
/* Moods and This weekend side by side, then stacked on narrower screens */
.home-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 56px;
  align-items: start;
  max-width: 980px;
  margin: 0 auto 48px;
}
.home-picks .weekend {
  max-width: none;
  margin: 0;
}
.home-moods {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.home-moods .section-label {
  color: var(--accent);
}
.home-moods-line {
  margin: 0 0 14px;
  font-family: var(--body-font);
  font-size: var(--size-body);
  line-height: 1.5;
  color: var(--text);
  text-wrap: balance;
}
.home-moods .mood-chips {
  justify-content: flex-start;
}
.home-moods .chip {
  background: transparent;
}
.more-moods {
  display: inline-block;
  margin-top: 12px;
  color: var(--ink);
  font-size: var(--size-small);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}
@media (max-width: 760px) {
  .home-picks {
    grid-template-columns: 1fr;
  }
}
.saved-button {
  text-decoration: none;
}
.saved-button svg {
  width: 15px;
  height: 15px;
}
.saved-number {
  font-weight: 600;
}
.saved-button {
  text-decoration: none;
}
.saved-button svg {
  width: 15px;
  height: 15px;
}
.saved-number {
  font-weight: 600;
}
.saved-button[hidden] {
  display: none;
}

/* "Or pick a mood", "Or pick a food style": proper headings with the accent underline, not small labels */
h2.headline {
  margin: 0 0 16px;
  font-size: var(--size-heading);
}
h2.headline::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--accent);
}
.styles + .styles {
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

/* Drop-downs: a pill with the site's own chevron, warming to rose on hover. Where the browser
   lets the open list be styled too (Chrome and Edge), it gets rounded corners and site colours */
.drop-down {
  position: relative;
}
.drop-down select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 38px 9px 16px;
  border: 1.5px solid var(--accent);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 0 var(--accent-soft);
  transition:
    background-color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
.drop-down::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--warm);
  border-bottom: 2px solid var(--warm);
  transform: rotate(45deg);
  pointer-events: none;
  transition: transform 0.15s;
}
.drop-down:hover select {
  border-color: var(--warm);
  background: var(--warm-soft);
}
.drop-down:hover::after {
  transform: translateY(2px) rotate(45deg);
}
.drop-down select:active {
  transform: translateY(1px);
  box-shadow: none;
}
.drop-down select:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 2px;
}
@supports (appearance: base-select) {
  .drop-down select,
  .drop-down select::picker(select) {
    appearance: base-select;
  }
  .drop-down select::picker-icon {
    display: none;
  }
  .drop-down select::picker(select) {
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 12px 32px var(--shadow);
  }
  .drop-down option {
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 500;
  }
  .drop-down option:hover,
  .drop-down option:focus {
    background: var(--warm-soft);
    color: var(--ink);
  }
  .drop-down option:checked {
    font-weight: 700;
    color: var(--warm);
  }
  .drop-down option::checkmark {
    display: none;
  }
  .drop-down optgroup {
    padding-top: 4px;
    font-weight: 700;
    font-size: var(--size-label);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

/* Highlighted text in the site's colours rather than the computer's blue */
::selection {
  background: var(--warm);
  color: var(--page);
}

/* Tonight's plate: the mood as one drop-down under the time and diet buttons */
.plate-mood {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--muted);
}
.plate-mood select {
  width: auto;
}

/* Three to start with: on phones the cards sit in a row you swipe, the next one peeking in, so the
   rest of the page is a screen closer */
@media (max-width: 600px) {
  .featured .cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-right: -16px;
    padding: 2px 16px 8px 2px;
    scrollbar-width: none;
  }
  .featured .cards::-webkit-scrollbar {
    display: none;
  }
  .featured .card-wrap {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }
}
.saved-empty {
  justify-content: flex-start;
  margin-top: 16px;
}
.surprise-button.rolling .die {
  animation: die-roll 0.45s linear infinite;
}
@keyframes die-roll {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .surprise-button.rolling .die {
    animation: none;
  }
}

/* Small text links get a bigger area to tap (about 44px tall) without moving the text around them */
.jump-to .link-button,
.mood-link a {
  display: inline-block;
  padding: 12px 4px;
  margin: -12px -4px;
}
/* A page's heading takes focus after moving page (for screen readers), without a box drawn round it */
h1[tabindex='-1']:focus {
  outline: none;
}

/* Type roles: headings, buttons, chips, tags and small labels use Schibsted Grotesk; everything you
   read in sentences uses Newsreader. Listed last so it wins over the older body-font labels above. */
.chip,
.tab,
.theme-button,
.plate-me,
.surprise-button,
.take-me,
.back-link,
.eyebrow,
.picked-label,
.section-label,
.section-toggle,
.taste,
.time-tag,
.swap-tag,
.count,
.choice-name,
.surprise-label,
.card .pick-label,
.together small,
.chip-key,
.sauce .meta,
.style-recipes h3,
.side .top-with h4,
.shop-group h3,
.direction h3,
.also h3,
.occasion,
.drop-down,
.home-link {
  font-family: var(--display-font);
}

/* Fitts's law on touch screens: the small controls get a tap area at least 44px tall without looking
   any bigger. The extra area is invisible and stops short of the neighbouring button. */
@media (pointer: coarse) {
  .theme-button,
  .home-link,
  .save {
    position: relative;
  }
  .theme-button::after,
  .home-link::after {
    content: '';
    position: absolute;
    inset: -8px -3px;
  }
  .home-link::after {
    inset: -10px -3px;
  }
  .save::after {
    content: '';
    position: absolute;
    inset: -6px;
  }
  .site-footer nav {
    row-gap: 0;
  }
  .site-footer a {
    display: inline-block;
    padding-block: 11px;
  }
}

/* On a laptop the mood page's plate is bigger and sits further in, level with the middle of the heading
   block; the heading and line stop short of it. Phones keep the small plate beside the heading. */
@media (min-width: 900px) {
  .mood-title {
    position: relative;
  }
  .mood-title .mood-graphic {
    position: absolute;
    top: 50%;
    left: calc(72% - 110px);
    float: none;
    width: 220px;
    height: 220px;
    margin: 0;
    transform: translateY(-50%);
  }
  .mood-title h1,
  .mood-title .lede {
    max-width: calc(72% - 140px);
  }
  /* A long mood name wraps onto two even lines rather than leaving one word on its own */
  .mood-title h1 {
    text-wrap: balance;
  }
}

/* ---------- Calmer focus (site review, November 2026) ----------
   The content should be the strongest thing on a page, not the settings around it. Listed last so
   these win over the older rules above. */

/* A chosen filter or tab: china blue outline, pale blue fill and blue text, rather than a solid dark
   pill that outweighs the content it filters */
.tab[aria-current='true'],
.chip[aria-current='true'],
.chip[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
/* Every button uses the button typeface, including the time and food choices */
.diet-choices .chip {
  font-family: var(--display-font);
}
/* "Can't choose? Plate me up" under a page heading is an outline button, as on the home page */
.title .plate-me {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
}
.title .plate-me:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

/* Three to start with: plain cards with a thin border, quiet grey labels, so the page's search stays
   the main thing */
.card {
  background: var(--card);
  border-color: var(--line);
}
.card:hover {
  border-color: var(--accent);
}
.card .plus {
  color: var(--muted);
}
.card .pick-label {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
}

/* Dried orange only for a few section labels: the Home link, time tags, cuisine names and drawings
   go back to ink, grey and china blue */
.home-link {
  color: var(--ink);
}
.time-tag.handsoff,
.time-tag.project {
  background: var(--sunken);
  color: var(--muted);
}
.sauce .meta span:first-child {
  color: var(--muted);
}
.ingredient-graphic.rose,
.mood-card-drawing.rose {
  color: var(--accent);
}

/* Pairing pages: each ingredient's drawing on its own small plate, side by side */
.pair-plates {
  gap: 12px;
  aspect-ratio: auto;
  width: clamp(200px, 24vw, 300px);
  height: auto;
  opacity: 0.85;
}
.pair-plates .china-plate {
  flex: 1;
  min-width: 0;
}

/* Pairing pages: the search to start again sits above the pairing as a slim strip, with a rule under
   it, so it reads as a way out rather than a way to add a third ingredient */
.start-over {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 8px 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.start-over-label {
  margin: 0;
  font-family: var(--display-font);
  font-size: var(--size-small);
  color: var(--muted);
}
.start-over .search {
  flex: 1 1 280px;
  max-width: 420px;
}
/* A long page heading wraps onto even lines rather than leaving one word on its own */
.title h1 {
  text-wrap: balance;
}

/* On an ingredient page, a name that opens a pairing ("Gochujang" on the lamb page opens Lamb +
   Gochujang) carries a "+", the same cue as "Lamb +" on the start cards, so it doesn't look like a
   link to that ingredient's own page. Inline-block keeps the + out of the underline. */
.things a[href^='/pair/']::before,
.box:has(#seasoning) a[href^='/pair/']::before {
  content: '+ ';
  display: inline-block;
  margin-right: 0.15em;
  color: var(--muted);
  text-decoration: none;
}

/* Inspiration tags ("Also goes with both"): plain labels, not links, so they don't look like a way to
   build a bigger mix */
.pairings .tag {
  display: inline-block;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
}
h3.bridge {
  margin: 0;
}

/* The group filters on Pies and Soups sit under the kind tiles, like the sauce filters */
.group-chips {
  margin-top: 22px;
}
/* Counts on the Pies and Soups quick links: full strength, since faded text on a small chip fails contrast */
.group-chips .chip small {
  opacity: 1;
}

/* Christmas around the world: the pine tree, the front-page card and the page.
   Light mode: a solid slate tree with tiny warm lights glowing through. Dark mode: a pale frost tree
   with starlight glinting off its tips. The lights and glints use colours that vanish in the other
   mode, so one drawing does both. No gold, no snow, nothing flashing. */
.pine svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.pine-body,
.pine-trunk {
  fill: light-dark(#22394d, #dfe7ec);
}
.pine-light circle {
  fill: light-dark(#fff8ec, transparent);
}
.pine-light .pine-halo {
  fill: light-dark(rgba(255, 236, 200, 0.35), transparent);
}
.pine-light {
  animation: pine-glow 6s ease-in-out infinite;
}
.pine-glint {
  fill: light-dark(transparent, #ffffff);
  transform-box: fill-box;
  transform-origin: center;
  animation: pine-glint 5s ease-in-out infinite;
}
@keyframes pine-glow {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 1;
  }
}
@keyframes pine-glint {
  0%,
  70%,
  100% {
    opacity: 0;
    scale: 0.3;
  }
  82% {
    opacity: 1;
    scale: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pine-light,
  .pine-glint {
    animation: none;
    opacity: 0.8;
  }
}

.christmas-card {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 980px;
  margin: 0 auto 48px;
  padding: 22px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.christmas-card:hover {
  border-color: var(--accent);
}
.christmas-card-tree {
  flex: none;
  width: 84px;
}
.christmas-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.christmas-card .section-label {
  margin: 0;
  color: var(--warm);
}
.christmas-card strong {
  font-family: var(--display-font);
  font-size: var(--size-xl);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}
.christmas-card-line {
  line-height: 1.5;
  text-wrap: balance;
}
@media (max-width: 600px) {
  .christmas-card {
    gap: 16px;
    padding: 18px;
  }
  .christmas-card-tree {
    width: 60px;
  }
}

.christmas-title {
  position: relative;
}
.christmas-page-tree {
  float: right;
  width: 110px;
  margin: 0 0 8px 24px;
}
@media (max-width: 600px) {
  .christmas-page-tree {
    width: 72px;
    margin-left: 16px;
  }
}
/* The courses read as tabs, underlined when chosen; the groups under them are quiet filled chips,
   so there's one clear line for where you are and a softer one for narrowing it down */
.christmas-courses {
  align-items: center;
  gap: 4px 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.christmas-courses .chip {
  padding: 12px 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  background: none;
  color: var(--muted);
}
.christmas-courses .chip:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}
.christmas-courses .chip[aria-current='true'] {
  background: none;
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.christmas-groups {
  gap: 8px;
  margin-bottom: 28px;
}
.christmas-groups .chip {
  padding: 6px 14px;
  border-color: transparent;
  background: var(--sunken);
  font-size: var(--size-small);
}
.christmas-groups .chip:hover {
  border-color: transparent;
  background: var(--accent-soft);
}
.christmas-groups .chip[aria-current='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--card);
}
/* Your table: the planner tab sits with the courses, picked out so it reads as somewhere to go back to */
.christmas-table-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 10px var(--shadow);
}
.christmas-table-chip:hover {
  background: var(--accent-deep);
}
.christmas-table-chip[aria-current='true'] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.christmas-table-chip svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.christmas-table-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--page);
  color: var(--ink);
  font-size: var(--size-small);
  text-align: center;
}
.christmas-table-count:empty {
  display: none;
}
.christmas-menu-course {
  margin: 24px 0 4px;
}
.christmas-missing {
  margin: 8px 0 0;
}
.christmas-ahead {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.2em;
}
/* On phones these rows wrap onto a second line rather than swiping sideways like other chips,
   so every course and every bird is in view at once */
@media (max-width: 600px) {
  .christmas-courses,
  .christmas-groups {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-right: 0;
    padding: 2px 0;
  }
  .christmas-courses {
    gap: 0 18px;
    border-bottom: 0;
  }
  .christmas-courses .chip {
    padding: 8px 0 6px;
  }
  .christmas-groups .chip {
    padding: 6px 12px;
  }
  .christmas-table-chip {
    margin: 8px 0 4px;
  }
}
.christmas-from {
  display: block;
  margin-top: 4px;
  font-family: var(--display-font);
  font-size: var(--size-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
}
.christmas-note {
  display: block;
  margin-top: 4px;
  font-style: italic;
  color: var(--muted);
}
