/* Shared by the recipe pages. Tokens match index.html. */
:root {
  --bg: #f6efe3; --card: #fffaf2; --ink: #2b2a33; --muted: #6b6572;
  --indigo: #1f3a68; --indigo-ink: #ffffff; --honey: #d99a2b; --line: #e7dcc8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17161c; --card: #211f27; --ink: #f1ece4; --muted: #b3aca3;
    --indigo: #3e64a8; --indigo-ink: #ffffff; --honey: #e6ae4a; --line: #34303b;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 17px; line-height: 1.6;
}
.page { max-width: 640px; margin: 0 auto; min-width: 0; }
.layout { padding: 24px 16px 32px; }
a { color: var(--indigo); }
/* :where() keeps this at element specificity so component link colours (tabs, cards) win. */
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) a { color: var(--honey); } }
h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 38px; line-height: 1.1; margin: 8px 0 6px; }
h2 { font-size: 23px; margin: 30px 0 10px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: inherit; }
.sub { color: var(--muted); font-style: italic; margin: 0 0 18px; }
.lede { font-size: 18px; }
.hero { width: 100%; height: auto; border-radius: 16px; display: block; }
.ing { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.ing li { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ing li:last-child { border-bottom: 0; }
.ing span { font-weight: 700; display: inline-block; min-width: 8.5em; }
.steps { padding-left: 1.4em; }
.steps li { margin: 0 0 10px; padding-left: 4px; }
.why { background: var(--card); border-left: 4px solid var(--honey); border-radius: 0 12px 12px 0; padding: 12px 16px; }
.know h2 { font-size: 19px; }
.know ul { padding-left: 1.2em; margin: 0; }
.video { position: relative; display: block; max-width: 360px; border-radius: 14px; overflow: hidden; text-decoration: none; }
.video img { width: 100%; height: auto; display: block; }
.video span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--indigo); color: var(--indigo-ink); font-weight: 700; padding: 10px 16px; border-radius: 999px; white-space: nowrap;
}
.more ul { padding-left: 1.2em; }
.grid { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none; }
.grid img { width: 100%; height: auto; display: block; }
.grid strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 20px; padding: 12px 14px 0; }
.grid span { display: block; color: var(--muted); padding: 0 14px 14px; font-size: 15px; }
.cta { margin: 40px 0 28px; background: var(--card); border: 1px dashed var(--honey); border-radius: 14px; padding: 20px 18px; text-align: center; }
.cta h2 { margin-top: 0; }
.cta p { color: var(--muted); }
.btn { display: inline-block; background: var(--honey); color: #2b2a33 !important; font-weight: 700; text-decoration: none; padding: 13px 22px; border-radius: 12px; }
footer { color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 18px; }
footer p { margin: 0 0 8px; }
footer a { color: inherit; }

/* ---- Top bar: brand + tabs, on every page (index.html loads this file too) ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .topbar { background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
}
.topbar-in {
  max-width: 1000px; margin: 0 auto; padding: 9px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar .brand {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 20px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.topbar .brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--card); flex: none; }
.topbar .tabs {
  display: flex; gap: 2px; padding: 4px; flex: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.topbar .tabs a {
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--ink); text-decoration: none;
  transition: background .15s ease;
}
.topbar .tabs a:hover { background: var(--bg); }
.topbar .tabs a[aria-current="page"] { background: var(--indigo); color: var(--indigo-ink); }
.topbar a:focus-visible, .jump a:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
@media (max-width: 480px) {
  .topbar .brand span { display: none; }
  .topbar .tabs a { padding: 7px 11px; font-size: 14.5px; }
}

/* ---- Jump tabs: categories on the hub, sections on a recipe page.
   Phone: a sticky chip bar under the top bar. Wide screens: a sticky side rail. ---- */
.jump {
  position: sticky; top: 62px; z-index: 10;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 8px; padding: 10px 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.jump::-webkit-scrollbar { display: none; }
.jump .jump-h { display: none; }
.jump a {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none;
}
.jump a small { color: var(--muted); font-weight: 600; font-size: 13px; }
.jump a[aria-current="true"] { background: var(--indigo); border-color: var(--indigo); color: var(--indigo-ink); }
.jump a[aria-current="true"] small { color: inherit; opacity: .8; }
.jump .back { display: none; }
h2[id], section[id] { scroll-margin-top: 124px; }

@media (min-width: 980px) {
  .layout.has-jump {
    display: grid; grid-template-columns: 190px minmax(0, 640px); gap: 48px;
    justify-content: center; padding-top: 32px;
  }
  .layout.has-jump .page { margin: 0; }
  .jump {
    top: 84px; align-self: start; flex-direction: column; gap: 4px; overflow: visible;
    margin: 0; padding: 0; background: none; border: 0;
  }
  .jump .jump-h {
    display: block; margin: 0 0 6px 14px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  }
  .jump a { justify-content: space-between; background: none; border: 0; border-radius: 10px; padding: 8px 14px; }
  .jump a:hover { background: var(--card); }
  .jump a[aria-current="true"] { background: var(--card); color: var(--ink); box-shadow: inset 3px 0 0 var(--honey); }
  .jump a[aria-current="true"] small { color: var(--muted); opacity: 1; }
  .jump .back { display: flex; margin-bottom: 14px; color: var(--muted); font-size: 14.5px; }
  h2[id], section[id] { scroll-margin-top: 84px; }
}

/* ---- More recipes: compact cards at the foot of a recipe page ---- */
.mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.mini a {
  display: flex; align-items: center; gap: 10px; padding: 8px; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.3;
}
.mini a:hover { border-color: var(--honey); }
.mini img { width: 56px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.mini small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; }
.grid a { transition: transform .15s ease, box-shadow .15s ease; }
.grid a:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(31,58,104,.14); }
