/* Ovenmark. Night is the default look; day is the same design in a light room. */
:root {
  --ground: #0C1219; --text: #F4EFE6; --card: #F4EFE6; --card-text: #0C1219; --card-muted: #55606B; --card-line: #D5CCBD;
  --brass: #C8A96B; --cta: #C8A96B; --on-cta: #0C1219; --tint: rgba(200,169,107,0.14);
  --panel: #1A2531; --deep: #0A1118; --line: #2C3A48; --line2: #3A4A5A; --muted: #A9B4BF;
  --counter: #C8A96B; --fridge: #6F93B5; --bake: #FF7A3D; --hatch1: rgba(10,17,24,0.85); --hatch2: rgba(10,17,24,0.35);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
:root[data-theme="day"] {
  --ground: #EDE6DA; --text: #2B1D16; --card: #FAF7F1; --card-text: #2B1D16; --card-muted: #6B5A50; --card-line: #DDD3C4;
  --brass: #7A5C26; --cta: #2B1D16; --on-cta: #FAF7F1; --tint: rgba(122,92,38,0.12);
  --panel: #E2D9CA; --deep: #CFC4B2; --line: #C6B9A6; --line2: #B3A590; --muted: #6B5A50;
  --counter: #D9B36C; --hatch1: rgba(43,29,22,0.75); --hatch2: rgba(43,29,22,0.3);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--ground); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.4; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--text); text-underline-offset: 4px; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand .arch { fill: var(--brass); } .brand .cut { stroke: var(--ground); }
.brand span { font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; }
.nav { display: none; gap: 26px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; } .nav a[aria-current] { color: var(--brass); }
.tools { display: flex; gap: 8px; }
.ghost { min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; font-weight: 600; font-size: 13px; white-space: nowrap; }
.ghost.gold { border-color: var(--brass); }

/* layout */
.wrap { display: flex; flex-direction: column; gap: 22px; padding: 18px 24px 24px; max-width: 1200px; width: 100%; margin: 0 auto; flex: 1 0 auto; }
.kicker { font-weight: 600; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); }
h1.kicker { color: var(--text); }
.headline { font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; margin-top: 6px; }
.controls { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; }
.stepper { flex: 1 1 0; display: flex; align-items: center; justify-content: space-between; height: 50px; border-radius: 8px; border: 1px solid var(--brass); }
.stepper button { width: 44px; height: 48px; border: 0; background: transparent; color: var(--brass); font-size: 24px; font-weight: 600; }
.stepper span { font-weight: 600; white-space: nowrap; }
.time { height: 50px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--brass); background: var(--panel); font-weight: 600; font-size: 17px; }
.days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.chip { min-height: 46px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent; font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { border-color: var(--brass); background: var(--tint); color: var(--brass); }
.days .chip { padding: 0 4px; font-size: 14px; }
.notice { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--brass); font-weight: 600; font-size: 15px; }

/* ingredient card */
.need { display: flex; flex-direction: column; padding: 20px 22px 16px; border-radius: 10px; background: var(--card); color: var(--card-text); }
.need header { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 6px; }
.need h2, .plan h2, .panel h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.need small, .need .note { font-size: 13px; color: var(--card-muted); }
.need header small { font-size: 14px; font-weight: 600; }
.ing { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--card-line); }
.ing div { display: flex; flex-direction: column; min-width: 0; }
.ing b { font-weight: 600; }
.ing .amt { flex: none; font-weight: 600; font-size: 23px; letter-spacing: -0.01em; }
.why { padding-top: 10px; border-top: 1px solid var(--card-line); font-size: 14px; color: var(--card-muted); }
.why strong { color: var(--card-text); }

/* plan */
.plan { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border-radius: 10px; background: var(--panel); }
.strip { position: relative; height: 30px; border-radius: 8px; overflow: hidden; background: var(--deep); }
.strip i { position: absolute; top: 0; bottom: 0; }
.strip .room { background: var(--counter); } .strip .cold { background: var(--fridge); } .strip .oven { background: var(--bake); }
.strip .night { background: repeating-linear-gradient(135deg, var(--hatch1) 0 3px, var(--hatch2) 3px 6px); }
.strip .pin { width: 3px; background: #FFFFFF; border-radius: 2px; }
.ends { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.step time { font-weight: 600; color: var(--brass); } .step time small { display: block; font-size: 12px; color: var(--muted); }
.step b { font-weight: 600; }
.outline { text-decoration: none; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--brass); background: transparent; color: var(--brass); font-weight: 600; font-size: 15px; white-space: nowrap; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.actions .outline { border-color: var(--line2); color: var(--text); font-size: 14px; }

/* numbers view */
.table { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.tr { display: grid; grid-template-columns: minmax(0, 1fr) 84px 96px; gap: 8px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tr.head { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tr span:nth-child(2) { text-align: right; font-size: 13px; color: var(--muted); }
.tr span:nth-child(3) { text-align: right; font-weight: 600; font-size: 22px; }
.tr.head span:nth-child(3), .tr.total span:nth-child(3) { font-size: inherit; }
.tr b { font-weight: 600; font-size: 17px; }
.fine { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* bottom bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); background: var(--ground); border-top: 1px solid var(--line); z-index: 5; }
.cta { height: 58px; border-radius: 8px; border: 0; background: var(--cta); color: var(--on-cta); font-family: var(--serif); font-weight: 500; font-size: 22px; }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.link { height: 48px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); font-weight: 600; font-size: 14px; white-space: nowrap; }

/* adjust panel and cook mode */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--ground); }
.sheet .pinned { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 14px 24px 16px; border-bottom: 1px solid var(--line); }
.pinned .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pinned .big { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.1; }
.done { height: 46px; padding: 0 20px; border-radius: 8px; border: 0; background: var(--cta); color: var(--on-cta); font-weight: 600; }
.mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--panel); }
.mini small { font-size: 12px; color: var(--muted); } .mini b { font-weight: 600; font-size: 19px; }
.tabs { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 12px 24px 0; padding: 3px; border-radius: 8px; background: var(--panel); }
.tabs button { height: 44px; border: 0; border-radius: 6px; background: transparent; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--cta); color: var(--on-cta); }
.body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 16px 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.group { display: flex; flex-direction: column; gap: 8px; } .group > b { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.slider { display: flex; flex-direction: column; gap: 4px; }
.slider .lab { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .slider .lab b { font-weight: 600; }
.slider .val { display: flex; align-items: center; gap: 6px; }
.slider input[type="number"] { width: 78px; height: 44px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); text-align: right; font-weight: 600; font-size: 18px; }
.slider output { font-weight: 600; font-size: 18px; }
.slider .ctl { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.slider .ctl button { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); font-size: 22px; font-weight: 600; }
.slider input[type="range"] { width: 100%; height: 44px; margin: 0; accent-color: var(--brass); }
.slider small { font-size: 13px; color: var(--muted); }

.cook .topline { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; color: var(--muted); font-weight: 600; }
.dots { flex: none; display: flex; gap: 5px; padding: 0 24px; } .dots i { flex: 1 1 0; height: 5px; border-radius: 3px; background: var(--line); }
.dots i.past { background: var(--muted); } .dots i.now { background: var(--brass); }
.cook .when { font-weight: 600; color: var(--brass); }
.cook h2 { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.04; letter-spacing: -0.02em; }
.cook .detail { font-size: 19px; line-height: 1.35; }
.light { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 10px; background: var(--card); color: var(--card-text); }
.light .kicker { color: var(--card-text); } .light p { font-size: 17px; }
.light button { min-height: 46px; border-radius: 8px; border: 1px solid var(--card-text); background: transparent; color: var(--card-text); font-weight: 600; }
.light ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.weigh { display: flex; flex-direction: column; padding: 4px 16px; border-radius: 10px; background: var(--panel); }
.weigh div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.weigh div:last-child { border-bottom: 0; } .weigh b { font-weight: 600; font-size: 24px; }
.timer { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 10px; background: var(--deep); }
.timer b { font-weight: 600; font-size: 44px; line-height: 1.05; } .timer span { color: var(--muted); }
.cook .foot { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; padding: 12px 24px calc(16px + env(safe-area-inset-bottom)); }
.cook .foot button { height: 60px; border-radius: 8px; font-weight: 600; font-size: 17px; border: 1px solid var(--line2); background: transparent; }
.cook .foot .next { border: 0; background: var(--cta); color: var(--on-cta); font-size: 19px; }

/* text pages */
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 720px; width: 100%; margin: 0 auto; padding: 32px 24px 64px; flex: 1 0 auto; }
.prose.home { max-width: 960px; }
.prose .cta { height: 58px; }
.prose h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.08; letter-spacing: -0.02em; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin-top: 12px; }
.prose p, .prose li { font-size: 17px; line-height: 1.6; }
.prose code { padding: 2px 6px; border-radius: 4px; background: var(--panel); font-size: 15px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 8px 10px 8px 0; text-align: left; border-bottom: 1px solid var(--line); }
.prose .cta { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.prose .lede { font-size: 20px; line-height: 1.5; }
.prose .sources { font-size: 14px; color: var(--muted); }
.prose .sources li { font-size: 14px; line-height: 1.5; }
.prose .box { padding: 18px 20px; border-radius: 10px; background: var(--panel); }
.prose .scroll { overflow-x: auto; }
.prose h3 { font-family: var(--sans, inherit); font-weight: 600; font-size: 18px; margin-top: 6px; }
.prose ol, .prose ul { display: flex; flex-direction: column; gap: 8px; padding-left: 22px; }
.prose.more { flex: none; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 24px; }
.cards { display: grid; gap: 14px; }
.cards a, .cards > div { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: 10px; background: var(--panel); text-decoration: none; }
.cards a b, .cards > div b { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.cards a span, .cards > div span { color: var(--muted); font-size: 15px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; align-items: end; }
body[data-tool] .side .need { flex: 0 0 auto; }
.field { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.field input { width: 100%; height: 50px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--brass); background: var(--panel); color: var(--text); font-weight: 600; font-size: 17px; }
.intro .group { display: flex; flex-direction: column; gap: 8px; } .intro .group > b { font-weight: 600; } .intro .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.need .tr { border-color: var(--card-line); } .need .tr.head, .need .tr span:nth-child(2) { color: var(--card-muted); } .need .table { border-color: var(--card-line); }
.brows { display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; align-items: center; }
.brow input[type="text"], .brow input[type="number"] { width: 100%; height: 46px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--ground); font-weight: 600; }
.brow input[type="number"] { text-align: right; }
.brow label { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--muted); }
.brow input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--brass); }
.brow .ghost { justify-self: end; }
@media (min-width: 520px) { .brow { grid-template-columns: minmax(0, 1fr) 96px auto auto; gap: 10px; } }
.site-foot { flex: none; border-top: 1px solid var(--line); padding: 32px 24px 36px; }
.site-foot.has-bar { padding-bottom: 190px; }
.site-foot .in { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.site-foot .who { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.site-foot .who p, .site-foot .legal { font-size: 14px; color: var(--muted); }
.site-foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 0 36px; align-content: start; }
.site-foot nav a { display: flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; text-decoration: none; }
.site-foot .legal { max-width: 1200px; margin: 24px auto 0; font-size: 13px; }
.foot-note { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 24px 24px; font-size: 13px; color: var(--muted); }

@media (min-width: 960px) {
  .top { padding: 0 48px; height: 76px; } .nav { display: flex; }
  .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px 40px; padding: 44px 48px 64px; align-items: stretch; }
  .intro { grid-column: 1 / -1; } .plan { grid-column: 1; grid-row: 2; } .numbers { grid-column: 1 / -1; } .side { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 14px; } .side .need { flex: 1 1 auto; }
  .headline { font-size: 56px; line-height: 1.08; }
  .controls { flex-direction: row; flex-wrap: wrap; } .controls .row { flex: none; } .stepper { width: 190px; flex: none; } .days { display: flex; }
  .days .chip { padding: 0 16px; }
  .bar { position: static; padding: 0; border: 0; background: transparent; }
  .sheet { inset: 0 0 0 auto; width: 480px; border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(0,0,0,0.35); }
  .sheet.cook { inset: 0; width: auto; border: 0; } .sheet.cook > * { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
  .foot-note { padding: 0 48px 32px; }
  .site-foot, .site-foot.has-bar { padding: 40px 48px 44px; }
  .prose.home h1 { font-size: 56px; }
  .cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 959px) { .side { display: contents; } .side .need { order: 0; } }
@media (prefers-reduced-motion: no-preference) { .chip, .tabs button, .cta { transition: background-color .15s, color .15s, border-color .15s; } }

@media print {
  :root, :root[data-theme="day"] { --ground: #fff; --text: #000; --card: #fff; --card-text: #000; --card-muted: #333; --card-line: #999; --panel: #fff; --line: #999; --brass: #000; --muted: #333; }
  .top .tools, .nav, .bar, .controls, .actions, .outline, .legend, .foot-note, .site-foot, .prose.more { display: none !important; }
  .wrap { display: block; padding: 0; } .need, .plan { padding: 12px 0; border-radius: 0; } .strip { display: none; }
  .headline { font-size: 24px; margin-bottom: 12px; } .numbers[hidden] { display: none !important; }
}
