/* =========================================================================
   The recipe book pages: /recipes/ and /recipes/<id>.
   One stylesheet for all 476 pages, so it is fetched once and cached.

   Tokens, nav, buttons and footer are the homepage's (index.html keeps its
   CSS inline); keep the two in step when either changes. Dark only, like the
   rest of the site.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

:root {
  --bg: #0B0F1A;
  --bg-2: #111726;
  --bg-3: #161D2F;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --ink: #F4F5F7;
  --ink-soft: #9CA3AF;
  --ink-mute: #6B7280;
  --accent: #FF5A1F;
  --accent-2: #FF8B45;
  --accent-soft: rgba(255, 90, 31, 0.12);
  --card: rgba(255,255,255,0.03);
  --card-hover: rgba(255,255,255,0.055);
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 28px);
  /* The pinned nav's height, which the pinned filter bar sits under. */
  --nav-h: 64px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background-image: radial-gradient(circle at 50% 0%, rgba(255,90,31,0.08), transparent 60%);
  pointer-events: none; z-index: 0;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 0; color: var(--ink); text-wrap: balance; }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-2); display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--accent-2); }
.lead { font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-soft); line-height: 1.5; max-width: 58ch; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }
.grad { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 55%, #FFB37C 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* ---- Nav ---------------------------------------------------------------- */
.b-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 26, 0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.b-nav .container { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 24px; }
.b-nav .b-btn { padding: 9px 16px; }
.b-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.b-logo-mark { width: 30px; height: 30px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 8px; display: grid; place-items: center; color: #0B0F1A; font-weight: 800; font-size: 16px; box-shadow: 0 4px 20px rgba(255, 90, 31, 0.4); }
.b-nav-links { display: flex; gap: 28px; font-size: 14px; }
.b-nav-links a { color: var(--ink-soft); transition: color .2s; font-weight: 500; }
.b-nav-links a:hover, .b-nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 780px) { .b-nav-links { display: none; } }
.b-logo { white-space: nowrap; }
@media (max-width: 360px) { .b-logo { font-size: 16px; } .b-nav .b-btn { padding: 9px 14px; } }

/* ---- Buttons and store badges ----------------------------------------- */
.b-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; font-size: 14px; font-weight: 600; border-radius: 12px; transition: transform .2s ease, background .2s ease; white-space: nowrap; }
.b-btn-primary { background: var(--accent); color: #0B0F1A; box-shadow: 0 4px 20px rgba(255,90,31,0.3); }
.b-btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.store-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 16px; border-radius: 12px;
  background: #fff; color: #0B0F1A; transition: transform .2s ease, box-shadow .2s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(255,255,255,0.35); }
.store svg { width: 22px; height: 24px; flex: none; }
.store small { display: block; font-size: 10px; opacity: 0.7; line-height: 1.1; }
.store strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.15; }
/* recipes.js, on a phone: the visitor's own store only, a size up. */
html.is-phone .store.is-other { display: none; }
html.is-phone .store.is-mine { padding: 13px 24px 13px 20px; }
html.is-phone .store.is-mine strong { font-size: 18px; }
.store-note { margin-top: 12px; font-size: 13px; color: var(--ink-mute); }

/* ---- Recipe book hero --------------------------------------------------- */
.rb-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); }
.rb-hero .container {
  display: grid; grid-template-columns: 1fr 1.05fr; column-gap: clamp(32px, 5vw, 64px); row-gap: 28px;
  grid-template-areas: "text mosaic" "cta mosaic"; align-items: end;
}
.rb-hero-text { grid-area: text; }
.rb-hero-cta { grid-area: cta; align-self: start; }
.rb-mosaic { grid-area: mosaic; align-self: center; }
@media (max-width: 960px) {
  .rb-hero .container { grid-template-columns: 1fr; grid-template-areas: "text" "mosaic" "cta"; row-gap: 22px; }
}
.rb-hero h1 { font-size: clamp(38px, 6vw, 76px); font-weight: 700; margin-top: 16px; }
.rb-hero .lead { margin: 20px 0 0; }
.rb-tally { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.rb-tally b { color: var(--ink); font-family: var(--display); font-size: 17px; font-weight: 600; margin-right: 4px; }

/* The plate mosaic: six real dishes, two tall columns offset like a spread. */
.rb-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; transform: rotate(-2deg); }
.rb-mosaic a { border-radius: 16px; overflow: hidden; aspect-ratio: 4/5; background: var(--bg-3); border: 1px solid var(--line); }
.rb-mosaic a:nth-child(3n+2) { transform: translateY(28px); }
.rb-mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.rb-mosaic a:hover img { transform: scale(1.05); }
/* Narrower, the six become a strip to swipe through, edge to edge. */
@media (max-width: 960px) {
  .rb-mosaic {
    display: flex; gap: 10px; transform: none; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none;
  }
  .rb-mosaic::-webkit-scrollbar { display: none; }
  .rb-mosaic a { flex: 0 0 clamp(128px, 38vw, 220px); scroll-snap-align: start; }
  .rb-mosaic a:nth-child(3n+2) { transform: none; }
}

/* ---- Filter bar -------------------------------------------------------- */
.rb-browse { padding: 8px 0 40px; }
.rb-filters {
  position: sticky; top: var(--nav-h); z-index: 20;
  background: rgba(11, 15, 26, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
/* Filter bar layout:
     row 1: search input (its own line, max 320 px wide so it doesn't claim
            the full row — the chip rows below use the rest of the width)
     rows 2+: one row per filter dimension (course, net cap, cuisine). Each
              row is a `.rb-group` whose chips wrap to additional lines when
              they don't fit. The groups are separated by a hairline rule so
              the eye reads them as distinct categories even at narrow widths.
   The earlier single-row horizontal-scroll design worked for two groups
   (course + net) but became invisible-with-overflow once cuisine was added;
   the user couldn't see chips that scrolled off the right edge. Stacking
   the groups vertically and letting chips wrap inside each one keeps every
   filter reachable on every viewport. */
.rb-filters .container { display: flex; flex-direction: column; gap: 12px; }
.rb-chips { display: flex; flex-direction: column; gap: 10px; }
.rb-group { display: flex; flex-wrap: wrap; gap: 8px; row-gap: 8px; align-items: center; }
.rb-group + .rb-group { padding-top: 10px; border-top: 1px solid var(--line); }
.rb-search {
  align-self: flex-start;
  width: 100%;
  max-width: 320px;
  height: 42px; padding: 0 14px 0 40px; border-radius: 12px;
  background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239CA3AF' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
  border: 1px solid var(--line-2); color: var(--ink); font: inherit; font-size: 15px;
}
.rb-search::placeholder { color: var(--ink-mute); }
.rb-search:focus { outline: none; border-color: var(--accent-2); }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card);
  color: var(--ink-soft); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { color: var(--ink); background: var(--card-hover); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0B0F1A; }
.chip .count { font-weight: 500; opacity: 0.7; margin-left: 4px; font-variant-numeric: tabular-nums; }
/* `.rb-scroll` is kept on the DOM as a semantic hook, but with the column
   layout it no longer does any scrolling. */
.rb-scroll { display: contents; }

/* 3-row filter bar layout: search + course on top, cuisines in the middle,
   net-carb cap at the bottom. Each row is one `.rb-row` containing a single
   `.rb-group` (the chips). Rows 2 and 3 scroll horizontally when their chips
   overflow the viewport; Row 1 splits search and chips onto two lines on a
   phone (see the ≤720px block below). */
.rb-row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.rb-row-search-type { flex-wrap: nowrap; }
.rb-row-cuisine,
.rb-row-macro { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rb-row-cuisine::-webkit-scrollbar,
.rb-row-macro::-webkit-scrollbar { display: none; }
/* Search input shrinks to give chips room on one line at desktop widths. */
.rb-row-search-type .rb-search { flex: 1 1 200px; min-width: 0; }
.rb-row-search-type .rb-group { flex: 0 1 auto; }
/* The group inside each row keeps chips on a single line; the row scrolls when
   they don't fit. Without `flex-wrap: nowrap` the existing `.rb-group` rule
   would wrap chips to a new line and the row would never scroll. */
.rb-row .rb-group { display: flex; gap: 8px; flex-wrap: nowrap; }

.rb-status { margin: 22px 0 18px; font-size: 14px; color: var(--ink-soft); }
.rb-status b { color: var(--ink); }
.rb-empty { padding: 48px 0; text-align: center; color: var(--ink-soft); }
.rb-empty[hidden] { display: none; }

/* ---- Recipe cards ------------------------------------------------------ */
.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.rb-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.rb-card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--card-hover); }
.rb-card[hidden] { display: none; }
.rb-card .ph { aspect-ratio: 16/9; background: var(--bg-3); overflow: hidden; }
.rb-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.rb-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rb-card .course { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.rb-card h3 { font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.rb-card .meta { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-3); color: var(--ink-soft); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tag.net { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(255,90,31,0.3); }

/* A pitch that sits inside the grid, as wide as the row, every so often. */
.rb-inline-cta {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: 18px;
  background: linear-gradient(120deg, rgba(255,90,31,0.18), rgba(255,139,69,0.06) 60%, transparent), var(--bg-2);
  border: 1px solid rgba(255,90,31,0.28);
}
.rb-inline-cta p { margin: 0; max-width: 56ch; color: var(--ink-soft); }
.rb-inline-cta strong { display: block; color: var(--ink); font-family: var(--display); font-size: 20px; font-weight: 600; margin-bottom: 2px; }
.rb-inline-cta[hidden] { display: none; }

/* ---- What the app adds ------------------------------------------------- */
.rb-app { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.rb-app .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 960px) { .rb-app .container { grid-template-columns: 1fr; } }
.rb-points { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; margin: 34px 0 34px; }
@media (max-width: 560px) { .rb-points { grid-template-columns: 1fr; } }
.rb-points h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.rb-points p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.rb-points .k { display: inline-block; font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--accent-2); margin-bottom: 8px; letter-spacing: 0.08em; }
.phone { background: #0a0a0a; border-radius: 44px; padding: 10px; border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6); max-width: 330px; margin: 0 auto; position: relative; }
.phone::after { content: ''; position: absolute; inset: -12% -12% 12% 12%; background: radial-gradient(circle at 60% 40%, rgba(255,90,31,0.35), transparent 60%); filter: blur(40px); z-index: -1; }
.phone img { border-radius: 34px; width: 100%; aspect-ratio: 9/19.5; object-fit: cover; object-position: top; }

/* ---- Recipe page -------------------------------------------------------- */
.crumbs { padding-top: 22px; font-size: 13px; color: var(--ink-mute); }
.crumbs ol { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--ink-mute); }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink); }
.r-top { padding: 22px 0 clamp(36px, 5vw, 56px); }
.r-top .container { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .r-top .container { grid-template-columns: 1fr; } }
.r-photo { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3); aspect-ratio: 16/9; }
.r-photo img { width: 100%; height: 100%; object-fit: cover; }
.r-head h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; margin-top: 12px; }
.r-why { margin: 16px 0 0; font-size: 17px; color: var(--ink-soft); line-height: 1.55; max-width: 56ch; }
.r-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }

.r-macro { padding: 14px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.r-macro b { display: block; font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.r-macro span { font-size: 12px; color: var(--ink-mute); }
.r-macro.net { background: var(--accent-soft); border-color: rgba(255,90,31,0.32); }
.r-macro.net b { color: var(--accent-2); }
.r-facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
.r-facts span::before { content: '·'; margin-right: 16px; color: var(--ink-mute); }
.r-facts span:first-child::before { content: none; }

.r-get {
  margin-top: 26px; padding: 20px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,90,31,0.16), rgba(255,139,69,0.04) 70%), var(--bg-2);
  border: 1px solid rgba(255,90,31,0.28);
}
.r-get h2 { font-size: 20px; letter-spacing: -0.01em; }
.r-get p { margin: 6px 0 16px; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

.r-cook { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.r-cook .container { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(28px, 5vw, 72px); }
@media (max-width: 860px) { .r-cook .container { grid-template-columns: 1fr; } }
.r-cook h2 { font-size: 26px; margin-bottom: 6px; }
.r-sub { font-size: 13px; color: var(--ink-mute); margin: 0 0 18px; }
.r-ingredients li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.r-ingredients li:last-child { border-bottom: 0; }
.r-ingredients .qty { color: var(--ink-soft); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.r-steps { counter-reset: step; }
.r-steps li { counter-increment: step; position: relative; padding: 0 0 22px 48px; font-size: 16px; line-height: 1.6; color: var(--ink); max-width: 64ch; }
.r-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--line-2);
  font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--accent-2);
}

.r-side { margin-top: 10px; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.r-side img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; }
.r-side p { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); }
.r-side a { font-family: var(--display); font-weight: 600; font-size: 17px; }
.r-side a:hover { color: var(--accent-2); }
@media (max-width: 420px) { .r-side { grid-template-columns: 1fr; } }

.r-more { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.r-more .head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.r-more .head a { color: var(--accent-2); font-weight: 600; font-size: 14px; }
.r-more .rb-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.note { font-size: 12px; color: var(--ink-mute); line-height: 1.5; max-width: 80ch; }

/* ---- Final CTA and the phone-only install bar -------------------------- */
.rb-final { padding: clamp(56px, 8vw, 100px) 0; text-align: center; border-top: 1px solid var(--line); }
.rb-final h2 { max-width: 18ch; margin: 14px auto 0; }
.rb-final .lead { margin: 16px auto 28px; }
.rb-final .store-row { justify-content: center; }

.getbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(17, 23, 38, 0.96); border-top: 1px solid var(--line-2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.getbar p { margin: 0; font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.getbar p b { display: block; color: var(--ink); font-size: 14px; }
/* Shown by recipes.js on a phone that has a store to send it to. */
html.has-getbar .getbar { display: flex; transition: transform .25s ease; }
html.has-getbar body { padding-bottom: 76px; }
html.getbar-idle .getbar { transform: translateY(110%); }
/* The bar is the phone's way to the store, so the nav's own button goes. */
html.has-getbar .b-nav .b-btn { display: none; }

/* ---- Phones -------------------------------------------------------------
   Most visitors arrive here from an ad or a search on a phone, so this is the
   layout that matters most, not a fallback. What it changes:
     - the nav scrolls away; the filter bar and the install bar are the only
       things pinned, so the recipes get the screen;
     - two cards to a row, photo-led, so a thumb-length of scroll shows six
       dishes rather than two;
     - every control at least 40px tall.
   ------------------------------------------------------------------------ */
@media (max-width: 720px) {
  .b-nav { position: relative; }
  .rb-filters { top: 0; padding: 10px 0; }
  .rb-search { max-width: none; height: 44px; font-size: 16px; }
  .chip { height: 40px; }
  .rb-tally { display: none; }
  .rb-hero { padding-top: 28px; }
  .rb-hero .lead { font-size: 16px; }
  .rb-status { margin: 14px 0 12px; font-size: 13px; }

  .rb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rb-card { border-radius: 14px; }
  .rb-card:hover { transform: none; }
  .rb-card .ph { aspect-ratio: 4/3; }
  .rb-card .body { padding: 10px 11px 12px; gap: 6px; }
  .rb-card .course { display: none; }
  .rb-card h3 { font-size: 15px; line-height: 1.25; }
  .rb-card .tag { font-size: 11px; padding: 2px 7px; }
  .rb-card .tag.kcal { display: none; }
  .rb-inline-cta { padding: 16px; gap: 12px; }
  .rb-inline-cta strong { font-size: 17px; }
  .rb-inline-cta p { font-size: 14px; }

  .rb-app .phone { max-width: 240px; }

  .crumbs { font-size: 12px; padding-top: 14px; }
  .r-top { padding-top: 14px; }
  .r-photo { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; border: 0; }
  .r-why { font-size: 16px; }
  .r-get { padding: 16px; }
  .r-get h2 { font-size: 18px; }
  .r-steps li { padding-left: 42px; }

  /* 3-row filter bar at phone widths: search input goes full-width, course
     chips wrap below it and scroll horizontally when they don't fit; Rows 2
     and 3 inherit overflow-x from the desktop rules above and now sit closer
     together so the bar doesn't grow taller than the search + 2 short rows.
     Chip min-height bumps the touch target to 44px so the More chip stays
     reachable inside Row 2. */
  .rb-row-search-type { flex-wrap: wrap; }
  .rb-row-search-type .rb-search { flex: 1 1 100%; min-width: 0; }
  .rb-row-search-type .rb-group { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .rb-row-search-type .rb-group::-webkit-scrollbar { display: none; }
  .chip { min-height: 44px; }
  .rb-row { padding: 4px 0; }
}
@media (max-width: 340px) { .r-macros { grid-template-columns: repeat(2, 1fr); } }

/* ---- Footer ------------------------------------------------------------ */
.b-footer { padding: 56px 0 40px; background: var(--bg-2); border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 13px; position: relative; z-index: 1; }
.b-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 780px) { .b-footer .container { grid-template-columns: 1fr 1fr; } }
.b-footer h5 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; font-weight: 700; }
.b-footer ul { display: flex; flex-direction: column; gap: 8px; }
.b-footer ul a:hover { color: var(--ink); }
.b-footer .legal { grid-column: 1 / -1; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; }

/* ---- "More" chip ------------------------------------------------------
   The cuisine bar grows past the inline chips once the book has more than a
   handful of cuisines, so a final chip opens a sheet rather than another
   filter. The chevron is a single typographic character — no icon font, no
   SVG — so the chip inherits the surrounding text styling.
   ----------------------------------------------------------------------- */
.chip-more::after {
  content: '\203A'; /* › */
  margin-left: 6px;
  font-weight: 400;
  font-size: 15px;
  opacity: 0.7;
  display: inline-block;
  transform: translateY(-1px);
}

/* ---- Cuisines sheet (modal) -------------------------------------------
   Bottom sheet on a phone (where it lives near the user's thumb), centred
   dialog on anything wider. The backdrop is a separate element from the
   body so a click on the dim area closes the sheet without bubbling to the
   body itself.
   ----------------------------------------------------------------------- */
.rb-sheet {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.rb-sheet[hidden] { display: none; }
.rb-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 22, 0.62);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.rb-sheet-body {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.6);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
}
.rb-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.rb-sheet-head h2 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0; color: var(--ink);
}
.rb-sheet-close {
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 22px; line-height: 1; color: var(--ink-soft);
  border: 1px solid transparent;
}
.rb-sheet-close:hover { color: var(--ink); background: var(--card-hover); }
.rb-sheet-close:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }

.rb-sheet-list {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.rb-sheet-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px;
  color: var(--ink); font-size: 15px; font-weight: 500;
  text-align: left;
  transition: background .12s ease;
}
.rb-sheet-item:hover { background: var(--card-hover); }
.rb-sheet-item[aria-pressed="true"] {
  background: var(--accent-soft); color: var(--accent-2);
}
.rb-sheet-item[aria-pressed="true"] .count { color: var(--accent-2); opacity: 0.85; }
.rb-sheet-item-name { flex: 1; }
.rb-sheet-item .count { font-size: 13px; opacity: 0.65; font-variant-numeric: tabular-nums; }

/* Lock body scroll while the sheet is open, otherwise the page scrolls
   behind it on a phone and the user gets a flicker. */
html.rb-sheet-open,
html.rb-sheet-open body { overflow: hidden; }

/* Desktop: centre the sheet instead of pinning to the bottom. */
@media (min-width: 720px) {
  .rb-sheet { align-items: center; padding: 24px; }
  .rb-sheet-body {
    border-radius: 20px;
    border-bottom: 1px solid var(--line-2);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  }
}

