:root {
  color-scheme: light;
  --forest: #18251e;
  --forest-2: #25362c;
  --forest-3: #344b3c;
  --gold: #e8a838;
  --gold-soft: #f6e4bd;
  --cream: #f5f2e9;
  --paper: #fffdf8;
  --ink: #252a25;
  --muted: #777c73;
  --line: #e5e3da;
  --red: #b84f38;
  --sans: 'DM Sans', 'Avenir Next', Avenir, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(232, 168, 56, .65); outline-offset: 2px; }
a { color: inherit; }
.site-shell { width: min(1440px, calc(100% - 64px)); margin: 0 auto; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(24,37,30,.12); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; color: var(--forest); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-family: var(--display); letter-spacing: .08em; font-weight: 700; font-size: 19px; line-height: 1; }
.brand-copy small { color: #798076; font-size: 9px; letter-spacing: .18em; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 28px; }
.topbar-note { color: #777d73; display: inline-flex; align-items: center; gap: 8px; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #82a873; box-shadow: 0 0 0 3px rgba(130,168,115,.14); }
.top-link { text-decoration: none; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--forest); padding: 8px 0; }
.top-link span { color: #ae7620; margin-left: 7px; font-size: 15px; }

.hero { min-height: 388px; margin-top: 24px; background: var(--forest); color: #f5f2e9; border-radius: 5px; overflow: hidden; position: relative; display: block; }
.hero-copy { position: relative; z-index: 1; max-width: 740px; padding: 43px 40px 65px 52px; }
.eyebrow, .section-kicker { margin: 0; font-size: 9px; letter-spacing: .18em; font-weight: 700; color: #d7b466; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow-line { width: 23px; height: 1px; background: var(--gold); }
.eyebrow-index { color: rgba(245,242,233,.45); padding-left: 8px; }
.hero h1 { margin: 20px 0 10px; font-family: var(--display); font-size: clamp(57px, 7vw, 88px); line-height: .87; letter-spacing: -.025em; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-description { max-width: 405px; color: rgba(245,242,233,.69); font-size: 13px; line-height: 1.7; margin: 20px 0 20px; }
.hero-cta { display: inline-flex; gap: 15px; align-items: center; text-decoration: none; color: var(--forest); background: var(--gold); font-size: 11px; font-weight: 700; padding: 11px 14px; border-radius: 2px; transition: background .18s, transform .18s; }
.hero-cta:hover { background: #f4c46d; transform: translateY(-1px); }
.hero-cta span { font-size: 15px; }
.hero-footer { position: absolute; left: 52px; bottom: 17px; right: 35px; display: flex; justify-content: space-between; gap: 12px; color: rgba(245,242,233,.43); font-size: 8px; letter-spacing: .14em; font-weight: 700; }

.calculator-section { padding: 49px 0 44px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 21px; }
.section-kicker { color: #8a7048; }
.section-kicker span { color: #ad7722; }
.section-heading h2 { margin: 7px 0 0; font: 600 38px/.95 var(--display); color: var(--forest); letter-spacing: -.02em; }
.text-button { color: #656a60; background: transparent; border: 0; border-bottom: 1px solid #b5b3a8; padding: 0 0 5px; font-size: 11px; font-weight: 600; }
.text-button span { color: #a5742b; font-size: 15px; margin-right: 5px; }
.text-button:hover { color: var(--forest); border-color: var(--forest); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.78fr) minmax(292px, .78fr); align-items: start; gap: 22px; }
.worksheet-column { min-width: 0; }
.panel, .menu-card { background: var(--paper); border: 1px solid #e5e2d7; border-radius: 4px; }
.recipe-panel { padding: 22px 22px 16px; }
.recipe-meta { display: grid; grid-template-columns: minmax(170px, 1.5fr) minmax(110px, .75fr) minmax(130px, .9fr); gap: 14px; padding: 0 0 21px; border-bottom: 1px solid var(--line); }
.control-block { min-width: 0; display: grid; align-content: start; gap: 7px; }
.control-label, .metric-label, .menu-price-label { display: block; color: #8a8d82; font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.control-hint { color: #8a8d82; font-size: 8px; line-height: 1.25; }
.recipe-name-input, .input-with-suffix, .menu-price-input-row { height: 39px; border: 1px solid #e4e2da; background: #fffefa; border-radius: 3px; }
.recipe-name-input { width: 100%; padding: 0 10px; color: var(--forest); font-size: 13px; font-weight: 600; }
.input-with-suffix { display: flex; align-items: center; padding: 0 10px; gap: 7px; }
.input-with-suffix input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; padding: 0; color: var(--forest); font-size: 13px; font-weight: 700; }
.input-with-suffix span { white-space: nowrap; color: #96968a; font-size: 10px; }
input:focus, select:focus { outline: 2px solid rgba(232,168,56,.42); outline-offset: 0; border-radius: 2px; }
.ingredients-heading { min-height: 63px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.ingredients-heading > div { display: flex; align-items: center; gap: 8px; }
.ingredients-heading h3 { font: 600 24px/1 var(--display); color: var(--forest); margin: 0; }
.ingredients-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; color: #a97728; background: #fbf1df; border-radius: 50%; font-size: 12px; }
.count-pill { color: #818579; background: #f1f0e9; border-radius: 20px; padding: 4px 8px; font-size: 9px; font-weight: 700; }
.add-button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d6d7cc; background: transparent; color: var(--forest-2); border-radius: 3px; padding: 8px 10px; font-size: 10px; font-weight: 700; transition: background .15s, border .15s; }
.add-button:hover { background: #f5f1e5; border-color: #aaa991; }
.add-button span { color: #a06f21; font-size: 17px; line-height: .6; }
.ingredient-table { width: 100%; }
.table-head, .ingredient-row { display: grid; grid-template-columns: minmax(105px, 1.48fr) minmax(52px, .7fr) minmax(52px, .7fr) minmax(58px, .76fr) minmax(52px, .68fr) minmax(66px, .82fr) minmax(64px, .8fr) 22px; column-gap: 7px; align-items: center; }
.table-head { min-height: 30px; padding: 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #93958a; font-size: 7px; letter-spacing: .09em; font-weight: 700; }
.table-head span:not(:first-child) { text-align: center; }
.ingredient-rows { display: grid; }
.ingredient-row { min-height: 51px; padding: 6px 4px; border-bottom: 1px solid #eeece5; transition: background .18s; }
.ingredient-row:hover { background: #fffdf6; }
.ingredient-cell { min-width: 0; }
.cell-label { display: none; }
.ingredient-input { width: 100%; height: 32px; min-width: 0; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); padding: 0 6px; font-size: 10px; }
.ingredient-input:hover { border-color: #ece9df; }
.ingredient-input:focus { border-color: #d7a850; background: #fffefa; }
.ingredient-name { font-weight: 600; }
.numeric-input { text-align: right; font-variant-numeric: tabular-nums; }
.unit-select { appearance: none; padding-right: 17px; text-align: center; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, #9c9b90 50%), linear-gradient(135deg, #9c9b90 50%, transparent 50%); background-position: calc(100% - 8px) 14px, calc(100% - 5px) 14px; background-size: 3px 3px, 3px 3px; background-repeat: no-repeat; }
.unit-select optgroup, .unit-select option { font-size: 12px; }
.row-cost { display: block; text-align: right; color: var(--forest); font-size: 10px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invalid-row { background: #fffaf4; }
.invalid-row .ingredient-name, .invalid-row .numeric-input { border-color: #eac9b7; }
.remove-row { width: 22px; height: 24px; border: 0; border-radius: 3px; padding: 0; background: transparent; color: #a2a396; font-size: 17px; line-height: 1; }
.remove-row:hover { background: #f9e7e1; color: var(--red); }
.validation-message { border-left: 2px solid #ba6846; background: #fff5ef; color: #864b36; margin: 13px 0 0; padding: 9px 10px; font-size: 10px; line-height: 1.55; }
.recipe-footnote { display: flex; align-items: start; gap: 7px; color: #939489; font-size: 9px; line-height: 1.5; padding-top: 12px; }
.footnote-mark { display: inline-grid; place-items: center; flex: 0 0 13px; width: 13px; height: 13px; color: #777b6f; border: 1px solid #bfc0b5; border-radius: 50%; font-size: 8px; font-weight: 700; }
.privacy-note { display: flex; align-items: center; gap: 7px; margin: 12px 0 0 4px; color: #96968b; font-size: 9px; }
.privacy-note span { font-size: 11px; color: #82946e; }

.results-column { display: grid; gap: 13px; }
.results-card { background: var(--forest); color: #f5f2e9; border-radius: 4px; padding: 20px 20px 17px; box-shadow: 0 5px 14px rgba(24,37,30,.08); position: relative; overflow: hidden; }
.results-card::after { content: ''; position: absolute; width: 165px; height: 165px; top: -104px; right: -68px; border: 1px solid rgba(232,168,56,.24); border-radius: 50%; box-shadow: 0 0 0 12px rgba(232,168,56,.045), 0 0 0 25px rgba(232,168,56,.03); pointer-events: none; }
.results-card-heading, .menu-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-overline { color: #c99a49; font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.results-card h3, .menu-card h3 { font: 600 24px/.98 var(--display); margin: 5px 0 0; letter-spacing: -.01em; }
.receipt-mark { color: var(--gold); font-size: 21px; }
.primary-metric { margin: 19px 0 0; padding: 13px 14px 15px; border: 1px solid rgba(245,242,233,.18); background: rgba(255,255,255,.045); border-radius: 3px; }
.metric-label { color: #b9b9a6; }
.serving-cost { display: block; font: 600 49px/.97 var(--display); color: var(--gold); margin-top: 6px; font-variant-numeric: tabular-nums; }
.serving-caption { display: block; margin-top: 4px; color: rgba(245,242,233,.55); font-size: 9px; }
.batch-line { display: flex; justify-content: space-between; align-items: start; gap: 10px; padding: 13px 1px; border-bottom: 1px solid rgba(245,242,233,.14); color: #e9e5d9; font-size: 11px; }
.batch-line small { display: block; color: rgba(245,242,233,.5); font-size: 8px; margin-top: 4px; }
.batch-line strong { color: #fffdf8; font-size: 12px; font-variant-numeric: tabular-nums; }
.target-price-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 1px 9px; }
.recommendation-note { display: block; color: rgba(245,242,233,.52); font-size: 8px; margin-top: 4px; }
.target-price-box > strong { font: 600 27px/1 var(--display); color: #f8d38d; white-space: nowrap; font-variant-numeric: tabular-nums; }
.target-progress { height: 4px; background: rgba(245,242,233,.14); border-radius: 5px; overflow: hidden; }
.target-progress span { display: block; width: 30%; height: 100%; border-radius: inherit; background: var(--gold); transition: width .25s; }
.target-caption { display: flex; justify-content: space-between; color: rgba(245,242,233,.52); font-size: 8px; margin-top: 6px; }
.target-caption strong { color: #e9d4ae; font-size: 9px; }
.menu-card { padding: 17px 18px 14px; }
.menu-card h3 { font-size: 23px; color: var(--forest); }
.status-chip { border-radius: 20px; padding: 5px 8px; color: #486347; background: #e9f0e3; font-size: 8px; font-weight: 700; white-space: nowrap; }
.status-warning { color: #8a482f; background: #f8e7dc; }
.status-muted { color: #7e7e74; background: #efeee8; }
.menu-price-label { margin-top: 16px; }
.menu-price-input-row { margin-top: 7px; height: 40px; display: flex; align-items: center; padding: 0 9px; }
.menu-price-input-row select { border: 0; background: transparent; color: #687064; font-size: 10px; font-weight: 700; padding: 4px 3px; cursor: pointer; }
.currency-divider { width: 1px; height: 17px; background: #e6e3da; margin: 0 7px; }
.menu-price-input-row input { border: 0; outline: none; background: transparent; min-width: 0; width: 100%; text-align: right; color: var(--forest); font-size: 16px; font-weight: 700; }
.menu-metrics { margin-top: 14px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; }
.menu-metric { min-width: 0; background: #f7f5ed; border-radius: 3px; padding: 10px 9px; }
.menu-metric span { display: block; color: #888b80; font-size: 8px; line-height: 1.35; }
.menu-metric strong { display: block; color: var(--forest); font: 600 22px/1 var(--display); margin-top: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-metric:last-child strong { font-size: 20px; }
.menu-metric strong.negative-value { color: var(--red); }
.menu-footnote { margin: 10px 0 0; color: #929388; font-size: 8px; line-height: 1.55; }
.results-tip { display: flex; gap: 9px; padding: 9px 12px; border-left: 2px solid var(--gold); color: #797d72; background: #f0eddf; font-size: 9px; line-height: 1.45; }
.results-tip p { margin: 0; }
.results-tip strong { color: var(--forest-2); }
.tip-spark { color: #a87525; font-size: 15px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.invalid-input { border-color: #bf765b !important; background: #fff8f3 !important; }

.site-footer { min-height: 66px; border-top: 1px solid rgba(24,37,30,.14); display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #898b80; font-size: 8px; letter-spacing: .13em; font-weight: 700; }
.site-footer a { text-decoration: none; }
.footer-brand { color: var(--forest); font-family: var(--display); font-size: 16px; letter-spacing: .1em; }
.footer-brand span { color: #b87f24; margin-left: 4px; }
.site-footer > a:last-child { border-bottom: 1px solid #b5b3a8; padding-bottom: 4px; }

@media (max-width: 1100px) {
  .site-shell { width: min(100% - 40px, 980px); }
  .workspace { grid-template-columns: minmax(0, 1.55fr) minmax(270px, .78fr); gap: 15px; }
  .recipe-panel { padding: 18px 15px 14px; }
  .table-head, .ingredient-row { grid-template-columns: minmax(90px,1.4fr) minmax(45px,.68fr) minmax(45px,.62fr) minmax(52px,.7fr) minmax(45px,.62fr) minmax(58px,.8fr) minmax(58px,.78fr) 20px; column-gap: 4px; }
  .ingredient-input { padding-left: 4px; padding-right: 4px; font-size: 9px; }
  .table-head { font-size: 6px; }
  .row-cost { font-size: 9px; }
  .results-card { padding: 17px 15px 14px; }
}
@media (max-width: 820px) {
  .site-shell { width: min(100% - 32px, 700px); }
  .topbar { min-height: 70px; }
  .topbar-note { display: none; }
  .hero { min-height: 355px; }
  .hero-copy { padding: 38px 20px 65px 30px; }
  .hero h1 { font-size: 72px; }
  .hero-footer { left: 30px; right: 24px; }
  .workspace { grid-template-columns: 1fr; }
  .results-column { grid-template-columns: 1fr 1fr; align-items: start; }
  .results-card { grid-row: span 2; }
  .results-tip { align-self: stretch; }
  .table-head, .ingredient-row { grid-template-columns: minmax(120px,1.55fr) minmax(60px,.68fr) minmax(60px,.7fr) minmax(70px,.75fr) minmax(60px,.66fr) minmax(75px,.82fr) minmax(70px,.8fr) 23px; column-gap: 8px; }
  .ingredient-input { font-size: 10px; padding: 0 6px; }
  .table-head { font-size: 7px; }
  .row-cost { font-size: 10px; }
}
@media (max-width: 600px) {
  .site-shell { width: calc(100% - 24px); }
  .topbar { min-height: 64px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 8px; }
  .topbar-right { gap: 0; }
  .top-link { font-size: 10px; }
  .hero { margin-top: 12px; min-height: auto; display: block; }
  .hero-copy { padding: 30px 23px 32px; }
  .eyebrow { font-size: 8px; letter-spacing: .13em; }
  .hero h1 { font-size: clamp(61px, 16vw, 75px); margin-top: 21px; }
  .hero-description { max-width: 330px; font-size: 12px; }
  .hero-footer { position: static; padding: 0 23px 16px; font-size: 7px; }
  .hero-footer span:last-child { display: none; }
  .calculator-section { padding: 35px 0 30px; }
  .section-heading { align-items: end; margin-bottom: 16px; }
  .section-heading h2 { font-size: 34px; }
  .text-button { font-size: 10px; white-space: nowrap; }
  .recipe-panel { padding: 15px 12px 12px; }
  .recipe-meta { grid-template-columns: 1fr 1fr; gap: 12px 10px; padding-bottom: 15px; }
  .recipe-name-block { grid-column: 1 / -1; }
  .control-label { font-size: 7px; }
  .recipe-name-input, .input-with-suffix { height: 37px; }
  .ingredients-heading { min-height: 57px; }
  .ingredients-heading h3 { font-size: 23px; }
  .add-button { padding: 7px 8px; font-size: 9px; }
  .count-pill { font-size: 8px; padding: 4px 6px; }
  .table-head { display: none; }
  .ingredient-rows { gap: 7px; padding-top: 2px; }
  .ingredient-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .85fr) 26px; gap: 9px 8px; padding: 10px 8px 9px; border: 1px solid #eeece5; border-radius: 3px; background: #fffefa; }
  .ingredient-row:hover { background: #fffefa; }
  .name-cell { grid-column: 1 / 4; grid-row: 1; }
  .name-cell .ingredient-input { font-size: 11px; font-weight: 700; }
  .remove-cell { grid-column: 4; grid-row: 1; justify-self: end; }
  .ingredient-cell:not(.name-cell):not(.remove-cell) { display: grid; gap: 4px; align-content: start; }
  .cell-label { display: block; color: #93958a; font-size: 7px; line-height: 1; font-weight: 700; letter-spacing: .08em; }
  .ingredient-input { height: 31px; font-size: 10px; border-color: #eeece5; padding: 0 6px; }
  .unit-select { padding-right: 16px; background-position: calc(100% - 7px) 13px, calc(100% - 4px) 13px; }
  .amount-cell { grid-column: 1; grid-row: 2; }
  .unit-cell { grid-column: 2; grid-row: 2; }
  .pack-size-cell { grid-column: 3; grid-row: 2; }
  .pack-unit-cell { grid-column: 1; grid-row: 3; }
  .pack-cost-cell { grid-column: 2; grid-row: 3; }
  .cost-cell { grid-column: 3; grid-row: 3; }
  .cost-cell .cell-label { color: #8d6b35; }
  .row-cost { height: 31px; display: flex; align-items: center; justify-content: end; font-size: 11px; }
  .recipe-footnote { font-size: 8px; }
  .results-column { grid-template-columns: 1fr; gap: 10px; }
  .results-card { grid-row: auto; }
  .results-card { padding: 18px; }
  .serving-cost { font-size: 53px; }
  .menu-card { padding: 17px 18px 15px; }
  .menu-metrics { grid-template-columns: 1fr 1fr; }
  .menu-metric { padding: 12px; }
  .menu-metric strong { font-size: 25px; }
  .menu-metric:last-child strong { font-size: 23px; }
  .site-footer { min-height: 58px; font-size: 7px; letter-spacing: .08em; }
  .footer-brand { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
