/* Flash Recipe */
:root {
  --ink: #16213a;
  --ink-2: #2b3756;
  --muted: #5a6582;
  --paper: #ffffff;
  --fog: #eef1f6;
  --line: #d8deea;
  --flash: #ffc93c;
  --flash-deep: #e9a800;
  --herb: #1d7a52;
  --sky: #c9d6f2;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--flash-deep); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--flash); padding: 8px 14px; z-index: 10; border-radius: 6px; }
.skip:focus { left: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.logo-word { font: 800 1.45rem/1 var(--display); letter-spacing: -0.03em; }
.logo-word span { font-weight: 400; margin-left: 1px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.main-nav a { display: block; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.main-nav a:hover { background: var(--fog); }
.main-nav a[aria-current="page"] { background: var(--fog); }
/* The collection sits apart from the meal categories */
.nav-collection { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.main-nav .nav-copycat { text-decoration: underline; text-decoration-color: var(--flash); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.nav-search { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 9px 16px 9px 13px; border-radius: 999px; white-space: nowrap; }
.nav-search:hover { background: var(--ink-2); }
.nav-search svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

/* Phones and small tablets: logo + search on one row, a swipeable strip of links below */
@media (max-width: 980px) {
  .site-header { position: static; }
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: 12px; }
  .main-nav { order: 3; min-width: 0; flex: 0 0 calc(100% + var(--gutter) * 2); margin: 12px calc(var(--gutter) * -1) 0; }
  .main-nav ul { gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 40px 12px var(--gutter); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .main-nav ul::-webkit-scrollbar { display: none; }
  .main-nav a { background: var(--fog); padding: 8px 14px; font-size: 0.92rem; }
  .main-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
  .nav-collection { order: -1; margin-left: 0; padding-left: 0; border-left: 0; }
  .main-nav .nav-copycat { text-decoration: none; background: var(--flash); }
}

/* Hero */
.hero { background: var(--ink); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; font-variation-settings: 'opsz' 96; max-width: 12ch; }
.hero-sub { font-size: 1.15rem; color: #c9d1e4; max-width: 46ch; margin: 22px 0 28px; }
.hero-search { display: flex; background: #fff; border-radius: 999px; padding: 6px; max-width: 560px; }
.hero-search input { flex: 1; min-width: 0; border: 0; padding: 12px 18px; border-radius: 999px; color: var(--ink); background: transparent; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 0 0 4px var(--flash); }
.hero-search button { border: 0; background: var(--flash); color: var(--ink); font-weight: 700; padding: 12px 22px; border-radius: 999px; cursor: pointer; }
.hero-search button:hover { background: #ffd666; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick-filters a { color: #fff; text-decoration: none; border: 1.5px solid #46527a; padding: 7px 14px; border-radius: 999px; font-size: 0.92rem; }
.quick-filters a:hover { border-color: var(--flash); color: var(--flash); }
.hero-dial { justify-self: center; width: min(400px, 100%); }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 44px; gap: 8px; }
  .hero-dial { order: -1; width: 150px; justify-self: start; }
}

/* Stopwatch: the one orchestrated motion on the site */
.stopwatch .sw-crown { fill: #46527a; }
.stopwatch .sw-case { fill: #2b3756; }
.stopwatch .sw-face { fill: #fff; }
.stopwatch .sw-sweep { fill: none; stroke: var(--flash); stroke-width: 140; stroke-dasharray: 33.33 100; animation: sweep 1.6s cubic-bezier(.3,.7,.2,1) both .2s; }
.stopwatch .sw-ticks line { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.stopwatch .sw-ticks line.mid { stroke-width: 3.5; }
.stopwatch .sw-ticks line.major { stroke-width: 6; }
.stopwatch .sw-labels text { font: 800 26px var(--display); fill: var(--ink); text-anchor: middle; }
.stopwatch .sw-pin { fill: var(--ink); }
.stopwatch .sw-hand { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; transform-origin: 200px 210px; transform: rotate(120deg); animation: hand 1.6s cubic-bezier(.3,.7,.2,1) both .2s; }
@keyframes sweep { from { stroke-dasharray: 0 100; } }
@keyframes hand { from { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .stopwatch * { animation: none !important; } }

/* Shelves and cards */
.shelf { margin: 56px 0; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.shelf-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.025em; }
.shelf-head a { font-weight: 700; color: var(--herb); text-underline-offset: 3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; }
.card { text-decoration: none; display: block; }
.card-img { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--fog); aspect-ratio: 4 / 3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.time-pill { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: #fff; font: 700 0.9rem/1 var(--body); padding: 6px 12px 6px 6px; border-radius: 999px; }
.mini-dial { width: 22px; height: 22px; }
.md-face { fill: #fff; }
.md-wedge { fill: var(--flash-deep); }
.card-title { font-size: 1.25rem; font-weight: 700; margin-top: 14px; letter-spacing: -0.015em; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--flash-deep); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }
.diet { color: var(--herb); font-weight: 700; }

/* Page heads */
.page-head { padding: 48px 0 28px; max-width: 760px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; }
.page-head p { color: var(--muted); font-size: 1.1rem; margin: 12px 0 0; }

/* Finder */
.finder { background: var(--fog); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 16px; }
.finder-q input { width: 100%; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 12px 20px; }
.finder-q input:focus { border-color: var(--ink); outline: none; }
.finder fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.finder legend { font-weight: 700; float: left; margin-right: 8px; min-width: 70px; font-size: 0.95rem; }
.finder fieldset label { position: relative; cursor: pointer; }
.finder fieldset input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.finder fieldset label { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-size: 0.93rem; }
.finder fieldset label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.finder fieldset label:has(input:focus-visible) { outline: 3px solid var(--flash-deep); outline-offset: 2px; }
.finder-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.finder-row label { font-weight: 700; font-size: 0.95rem; }
.finder-row select { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px; background: #fff; margin-right: 12px; }
.result-count { color: var(--muted); margin: 24px 0 16px; font-weight: 700; }
.empty { text-align: center; padding: 48px 16px; }
.empty p { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--flash); color: var(--ink); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #ffd666; }
.btn-quiet { background: var(--fog); }
.btn-quiet:hover { background: var(--line); }
.btn-quiet[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Recipe */
.crumbs { display: flex; gap: 8px; padding: 22px 0 18px; font-size: 0.93rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.recipe-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.recipe-hero { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--fog); }
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.recipe-intro h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
.lede { font-size: 1.15rem; color: var(--ink-2); margin: 16px 0 24px; max-width: 52ch; }
.stats { display: flex; align-items: center; gap: 24px; padding: 18px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.big-dial { width: 112px; height: 112px; flex: none; }
.bd-face { fill: var(--fog); }
.bd-wedge { fill: var(--flash); }
.bd-ticks line { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.bd-hub { fill: var(--ink); }
.bd-num { font: 800 30px var(--display); fill: #fff; text-anchor: middle; }
.bd-unit { font: 700 12px var(--body); fill: var(--flash); text-anchor: middle; }
.stats dl { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 28px; margin: 0; }
.stats dt { font-size: 0.85rem; color: var(--muted); }
.stats dd { margin: 0; font: 700 1.2rem/1.2 var(--display); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tags a { text-decoration: none; padding: 5px 12px; border-radius: 999px; background: var(--fog); font-size: 0.9rem; font-weight: 700; }
.tags a.diet { background: #e1f2e9; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 860px) {
  .recipe-top { grid-template-columns: 1fr; gap: 24px; }
  .recipe-hero { margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
}

.recipe-body { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 56px; margin-top: 48px; align-items: start; }
.recipe-body h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.ingredients { position: sticky; top: 90px; background: var(--fog); border-radius: var(--radius-lg); padding: 24px; }
.ing-head { display: grid; gap: 14px; margin-bottom: 14px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.stepper, .units { display: inline-flex; align-items: center; background: #fff; border-radius: 999px; padding: 4px; border: 1.5px solid var(--line); }
.stepper button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--fog); font-size: 1.2rem; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper button:hover { background: var(--flash); }
.stepper output { min-width: 84px; text-align: center; font-weight: 700; font-size: 0.95rem; }
.units button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.units button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { border-top: 1px solid var(--line); }
.ing-list label { display: flex; gap: 12px; padding: 11px 0; cursor: pointer; align-items: flex-start; }
.ing-list input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--herb); flex: none; }
.ing-list .q { font-weight: 700; }
.ing-list .note { color: var(--muted); }
.ing-list input:checked + .ing { text-decoration: line-through; color: var(--muted); }

.steps { list-style: none; counter-reset: step; margin: 20px 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 64px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 44px; height: 44px; border-radius: 50%; background: var(--flash); font: 800 1.3rem/44px var(--display); text-align: center; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 48px; bottom: 6px; width: 2px; background: var(--line); }
.steps p { margin: 6px 0 0; font-size: 1.1rem; max-width: 64ch; line-height: 1.65; }
.timer { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); background: #fff; border-radius: 999px; padding: 7px 16px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.timer::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid currentColor; box-sizing: border-box; }
.timer:hover { background: var(--fog); }
.timer.running { background: var(--ink); color: #fff; }
.timer.done { background: var(--flash); border-color: var(--flash-deep); color: var(--ink); animation: pulse 1s ease 3; }
@keyframes pulse { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .timer.done { animation: none; } .card-img img { transition: none; } }

.tips { margin-top: 12px; background: #fff7dd; border-radius: var(--radius-lg); padding: 24px 28px; }
.tips h2 { font-size: 1.4rem; }
.tips ul { margin: 12px 0 0; padding-left: 20px; }
.tips li { margin: 6px 0; }
.gear { margin-top: 32px; }
.gear h2 { font-size: 1.4rem; }
.gear ul { padding-left: 20px; }
.gear li span { color: var(--muted); }
.fineprint { font-size: 0.85rem; color: var(--muted); }
.related { border-top: 2px solid var(--ink); padding-top: 32px; }

@media (max-width: 860px) {
  .recipe-body { grid-template-columns: 1fr; gap: 40px; margin-top: 32px; }
  .ingredients { position: static; margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
  .steps li { padding-left: 56px; }
}

/* Ads */
.ad { margin: 40px auto; text-align: center; min-height: 120px; }
.ad-label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }

/* Prose pages */
.prose { max-width: 720px; padding-top: 48px; padding-bottom: 64px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 20px; }
.prose h2 { font-size: 1.4rem; margin: 28px 0 8px; }
.prose a { color: var(--herb); }
.notfound .btn { color: var(--ink); }

/* Footer */
.site-footer { background: var(--ink); color: #c9d1e4; margin-top: 80px; padding: 48px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand .logo-word { color: #fff; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }

.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: 6px; }
.site-footer a { color: #c9d1e4; text-decoration: none; }
.site-footer a:hover { color: var(--flash); }
.copyright { margin-top: 32px; font-size: 0.85rem; color: #8892ad; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Print: just the recipe */
@media print {
  .site-header, .site-footer, .recipe-actions, .controls, .timer, .ad, .related, .crumbs, .gear, .hero-dial { display: none !important; }
  .recipe-top, .recipe-body { grid-template-columns: 1fr 1fr; gap: 24px; }
  .recipe-hero { max-width: 60%; }
  .ingredients { position: static; background: none; padding: 0; }
  .steps li::before { background: none; border: 2px solid #000; }
  body { font-size: 11pt; }
}

/* Copycat collection */
.copycat-tag { position: absolute; left: 12px; top: 12px; background: #fff; color: var(--ink); font: 800 0.8rem/1 var(--display); padding: 6px 10px; border-radius: 999px; border: 2px solid var(--ink); }
.shelf-sub { margin: 6px 0 0; color: var(--muted); }
.shelf-copycat { background: var(--fog); border-radius: var(--radius-lg); padding: 28px; margin-left: calc(var(--gutter) * -0.5); margin-right: calc(var(--gutter) * -0.5); }
.inspired { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 700; color: var(--ink-2); }
.inspired a { text-decoration: none; background: var(--ink); color: #fff; font: 800 0.8rem/1 var(--display); padding: 6px 10px; border-radius: 999px; }
.disclaimer { margin-top: 32px; max-width: 64ch; }
@media (max-width: 860px) { .shelf-copycat { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; padding: 24px var(--gutter); } }
