:root {
  --paper: hsl(38 28% 93%);
  --white: hsl(0 0% 100%);
  --ink: hsl(30 14% 14%);
  --muted: hsl(32 11% 38%);
  --line: hsl(38 20% 88%);
  --accent: hsl(24 74% 35%);
  --accent-dark: hsl(24 78% 27%);
  --on-accent: hsl(40 40% 98%);
  --wash: hsl(40 22% 89%);
  --tint: hsl(26 55% 90%);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.75 6 4.25 4.25L12.25 6' fill='none' stroke='%236b6056' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 18px; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.52; }
h1, h2, p, figure, ul { margin: 0; }
h1, h2 { line-height: 1.07; letter-spacing: -.04em; }
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 670; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(27px, 4vw, 40px); font-weight: 650; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .56; cursor: default; }
.wrap { width: min(1100px, calc(100% - 64px)); margin-inline: auto; }
.top, .foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; font-size: 14px; }
.top > a, .foot > a { display: inline-flex; align-items: center; min-height: 44px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font-size: 19px; font-weight: 750; text-decoration: none; color: var(--ink); }
.hero, .split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5.5vw, 88px); align-items: start; }
.hero { align-items: center; padding-block: 32px 64px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); margin-block: 16px 22px; max-width: 39ch; }
.upload, .actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.upload { padding-block: 4px; }
.upload small { color: var(--muted); flex-basis: 100%; }
#upload-status { color: var(--muted); font-size: 14px; margin-top: 10px; }
.button, .quiet, .portions button { border: 1px solid transparent; border-radius: 10px; min-height: 44px; padding: 8px 16px; font-weight: 670; text-align: center; }
.button { background: var(--accent); color: var(--on-accent); }
.button:hover:not(:disabled) { background: var(--accent-dark); }
.quiet { background: var(--tint); color: var(--accent-dark); }
.photo { max-width: 440px; margin-inline: auto; border-radius: 24px; border: 1px solid var(--line); overflow: hidden; background: var(--white); }
.photo img { display: block; width: 100%; height: auto; max-height: 395px; aspect-ratio: 1.1; object-fit: cover; }
.photo figcaption { padding: 10px 16px; color: var(--muted); font-size: 14px; }
.band { padding-block: 52px; background: var(--wash); }
.card, dialog { min-width: 0; padding: clamp(16px, 2.5vw, 30px); border-radius: 22px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.kicker { font-weight: 730; }
.total { display: flex; align-items: baseline; gap: 8px; }
.total strong { font-size: 47px; line-height: 1.16; font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
.total span { color: var(--muted); margin-left: auto; }
.muted { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); margin-top: 9px; }
.rows { padding: 0; list-style: none; margin-block: 12px; }
.rows li, .saved { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-block: 8px; }
.rows li > :last-child, .saved strong { flex-shrink: 0; }
.rows select { min-width: 0; }
input[type="number"], select { border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); min-height: 44px; padding: 8px; }
input[type="number"] { width: 77px; }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; vertical-align: middle; }
.actions { margin-top: 14px; }
#edit-actions { margin-top: 8px; }
.extra { padding-block: 45px; }
.faq { margin-top: 18px; max-width: 720px; }
details { padding-block: 9px; border-top: 1px solid var(--line); }
details p { margin-top: 10px; color: var(--muted); }
summary { cursor: pointer; font-weight: 650; padding-block: 4px; }
.foot { border-top: 1px solid var(--line); }
dialog { width: min(470px, calc(100% - 28px)); }
dialog::backdrop { background: #241a1166; }
dialog h2 { font-size: 32px; margin-bottom: 14px; }
.saved { color: var(--accent-dark); margin-top: 12px; }
.field { display: block; margin-bottom: 6px; font-weight: 680; }
select { width: 100%; }
fieldset { border: 0; padding: 0; margin: 15px 0 5px; min-width: 0; }
legend { font-weight: 680; padding: 0; }
.portions { display: flex; gap: 6px; flex-wrap: wrap; margin-block: 7px; }
.portions button { background: var(--paper); color: var(--ink); border-color: var(--line); }
.portions button[aria-pressed="true"] { color: var(--accent-dark); background: var(--tint); border-color: var(--accent); }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 44px; }
.calc-output { margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
#cream-fat { width: auto; }
.recipe .inline { margin-top: 10px; }
.recipe-head, #recipe-rows li { display: grid; grid-template-columns: minmax(0, 1fr) 77px 55px; gap: 8px; align-items: center; }
.recipe-head { margin-top: 14px; font-size: 14px; color: var(--muted); }
.recipe-head :last-child, #recipe-rows li :last-child { text-align: right; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .hero, .split { grid-template-columns: 1fr; gap: 22px; }
  .hero { padding-block: 20px 34px; }
  .band, .extra { padding-block: 32px; }
  .top, .foot { min-height: 58px; }
  .photo { margin-inline: 0; }
}
