:root {
  color-scheme: light;
  --paper: #f3efe5;
  --panel: #fffdf8;
  --panel-strong: #ffffff;
  --ink: #1e231f;
  --muted: #687067;
  --line: #d9d7cc;
  --green: #255f4c;
  --green-dark: #174536;
  --green-soft: #dfece5;
  --accent-ink: #fff;
  --accent-muted: rgba(255,255,255,.72);
  --amber: #b56f2d;
  --amber-soft: #f8ead7;
  --red: #a14234;
  --shadow: 0 18px 55px rgba(38, 43, 36, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 92% 5%, rgba(53, 112, 88, .13), transparent 26rem),
    linear-gradient(180deg, #f7f3ea 0, var(--paper) 40rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }

.page {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  padding: 0 0 72px;
}

.site-head {
  min-height: 56px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(30, 35, 31, .1);
}

.wordmark {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -.04em;
  text-decoration: none;
}

.language-picker { position: absolute; z-index: 2; top: 11px; right: 214px; }
.language-picker select {
  min-width: 126px;
  min-height: 34px;
  border-radius: 10px;
  padding: 5px 30px 5px 10px;
  background-color: var(--panel);
  font-size: 12px;
  font-weight: 700;
}

.site-logo {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 4px;
  width: clamp(150px, 17vw, 190px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(37, 95, 76, .12));
}

.hero { padding: 32px 210px 26px 0; }

.eyebrow,
.step-label {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  margin: 0 0 8px;
}

h1 {
  max-width: 800px;
  margin: 0 0 13px;
  font-size: clamp(42px, 7vw, 68px);
  line-height: .95;
  letter-spacing: -.065em;
}

h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
h3 { margin: 0 0 15px; font-size: 15px; letter-spacing: -.015em; }

.lede {
  max-width: 770px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.48;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.builder { padding: 30px; }

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.compact-heading { margin-bottom: 14px; }

.model-chip,
.guidance-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.model-chip {
  padding: 8px 11px;
  color: var(--green);
  background: var(--green-soft);
}

.guidance-badge { padding: 7px 10px; margin: 0 0 14px; }
.guidance-factory { color: var(--green); background: var(--green-soft); }
.guidance-starting { color: #87511d; background: var(--amber-soft); }

label > span,
.quick-row > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

select,
input,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-strong);
  color: var(--ink);
  padding: 11px 13px;
  outline: none;
}

textarea { min-height: 82px; resize: vertical; line-height: 1.45; }

select:focus,
input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 95, 76, .2);
  outline-offset: 2px;
  border-color: var(--green);
}

.cooker-select select { font-weight: 780; font-size: 16px; }

.cooker-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cooker-summary strong { color: var(--ink); }

.builder-divider { height: 1px; background: var(--line); margin: 26px 0; }

.controls {
  display: grid;
  grid-template-columns: 2fr 1.45fr 1fr 1.35fr;
  gap: 12px;
}

.quick-row { margin-top: 20px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.notes-panel { margin-top: 12px; padding: 24px 30px; }
.notes-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.notes-heading > span { color: var(--green); font-size: 11px; font-weight: 800; }
.notes-control { display: block; }
.save-tip { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.inline-copy {
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 3px;
  vertical-align: baseline;
}
.inline-copy:hover { color: var(--green-dark); }

.preset {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 740;
}

.preset:hover,
.preset.active { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }

.capacity-note {
  min-height: 44px;
  margin: 12px 0;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.5;
}

.capacity-ok { color: var(--green-dark); background: rgba(223, 236, 229, .7); border-color: #c7ddd1; }
.capacity-low,
.capacity-high { color: #7e3026; background: #f7e3df; border-color: #e6bcb4; font-weight: 720; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 12px;
}

.metric {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.accent-metric { color: var(--accent-ink); background: var(--green); border-color: var(--green); }
.metric span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.accent-metric span { color: var(--accent-muted); }
.metric strong { display: block; overflow-wrap: anywhere; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.04em; }

.recipe-card { padding: 34px; }

.recipe-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.recipe-head h2 { margin: 4px 0 9px; font-size: clamp(31px, 5vw, 47px); }
.ratio { margin: 0; color: var(--muted); line-height: 1.5; }

.recipe-action-stack { display: grid; justify-items: end; gap: 10px; }
.recipe-actions { display: flex; gap: 9px; }
.display-options { display: flex; justify-content: flex-end; gap: 12px; color: var(--muted); font-size: 12px; }
.display-options label { display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.display-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.button {
  min-height: 43px;
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 10px 15px;
  font-weight: 780;
}
.button.primary { color: var(--accent-ink); background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { color: var(--green); background: transparent; }
.button.secondary:hover { background: var(--green-soft); }

.recipe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .8fr);
  gap: 46px;
  padding-top: 30px;
}

ol { margin: 0; padding-left: 24px; }
li { margin: 0 0 14px; padding-left: 4px; line-height: 1.6; }
li::marker { color: var(--green); font-weight: 850; }

.recipe-aside { display: grid; align-content: start; gap: 26px; }
dl { margin: 0; }
dl div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
dl div:last-child { border-bottom: 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; text-align: right; }

.recipe-qr {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel-strong);
}
.recipe-qr h3 { margin-bottom: 7px; }
.recipe-qr p { margin: 0 0 7px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.recipe-qr a { font-size: 11px; overflow-wrap: anywhere; }
.qr-code { width: 112px; height: 112px; padding: 6px; border-radius: 9px; background: white; }
.qr-code svg { display: block; width: 100%; height: 100%; }
.qr-error { display: grid; place-items: center; color: #7e3026; font-size: 10px; line-height: 1.3; text-align: center; }

.recipe-source {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.print-notes { display: none; }

.support-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 12px;
  padding: 22px 30px;
}
.support-card[hidden] { display: none !important; }
.support-card h2 { margin: 2px 0 5px; font-size: 22px; letter-spacing: -.025em; }
.support-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.affiliate-disclosure { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.affiliate-button { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 30px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-card { padding: 0 20px; border-left: 1px solid var(--line); }
.trust-card:first-child { padding-left: 4px; border-left: 0; }
.trust-card h2 { margin: 0 0 4px; color: var(--green); font-size: 13px; letter-spacing: -.01em; }
.trust-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  margin-top: 18px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.site-footer p { margin: 0; }
.footer-guidance { max-width: 630px; }
.footer-meta { display: flex; align-items: flex-start; justify-content: flex-end; gap: 18px; white-space: nowrap; }
.privacy-note { position: relative; }
.privacy-note summary { color: var(--green); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.privacy-note p {
  position: absolute;
  z-index: 2;
  top: 25px;
  right: 0;
  width: min(360px, calc(100vw - 36px));
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--muted);
  white-space: normal;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: #174536;
  color: #fffdf8;
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  font-weight: 720;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.print-only { display: none; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #151813;
    --panel: #20241e;
    --panel-strong: #252a23;
    --ink: #f2f1e9;
    --muted: #a9afa6;
    --line: #3b4038;
    --green: #8bc5aa;
    --green-dark: #b5dcc9;
    --green-soft: #283d32;
    --accent-ink: #10281f;
    --accent-muted: #174536;
    --amber-soft: #493522;
    --shadow: 0 18px 55px rgba(0,0,0,.2);
  }
  body { background: radial-gradient(circle at 92% 5%, rgba(83, 142, 115, .14), transparent 26rem), var(--paper); }
  .capacity-ok { color: #b5dcc9; background: #20362b; border-color: #375244; }
  .capacity-low,.capacity-high { color: #ffb5a9; background: #3e2723; border-color: #684039; }
}

@media (max-width: 820px) {
  .page { width: min(100% - 24px, 1100px); }
  .site-logo { width: 132px; top: 20px; }
  .language-picker { right: 148px; }
  .hero { padding: 30px 145px 26px 0; }
  .controls { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .recipe-layout { grid-template-columns: 1fr; gap: 30px; }
  .trust-card { padding: 0 13px; }
}

@media (max-width: 540px) {
  .page { width: min(100% - 18px, 1100px); padding-bottom: 40px; }
  .site-head { min-height: 52px; }
  .site-logo { width: 76px; top: 3px; right: 0; filter: drop-shadow(0 8px 14px rgba(37, 95, 76, .1)); }
  .language-picker { top: 9px; right: 86px; }
  .language-picker select { min-width: 108px; max-width: 116px; min-height: 32px; padding-left: 8px; font-size: 11px; }
  .hero { padding: 24px 3px 20px; }
  h1 { font-size: clamp(40px, 14vw, 52px); }
  .builder,.recipe-card { padding: 19px; border-radius: 20px; }
  .section-heading,.recipe-head { flex-direction: column; gap: 15px; }
  .controls,.metrics { grid-template-columns: 1fr; }
  .metric { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 15px 17px; }
  .metric span { margin: 0; }
  .metric strong { text-align: right; }
  .recipe-actions { width: 100%; }
  .recipe-actions .button { flex: 1; }
  .recipe-action-stack { width: 100%; justify-items: stretch; }
  .display-options { justify-content: flex-start; }
  .notes-panel { padding: 19px; border-radius: 20px; }
  .notes-heading { align-items: flex-end; }
  .support-card { grid-template-columns: 1fr; gap: 15px; padding: 19px; border-radius: 20px; }
  .affiliate-button { width: 100%; }
  .recipe-qr { grid-template-columns: 96px minmax(0, 1fr); gap: 13px; }
  .qr-code { width: 96px; height: 96px; }
  .trust-grid { grid-template-columns: 1fr; gap: 12px; padding: 15px 4px; }
  .trust-card,.trust-card:first-child { padding: 0; border-left: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 10px; }
  .footer-meta { justify-content: flex-start; flex-wrap: wrap; gap: 10px 18px; white-space: normal; }
  .privacy-note[open] { flex-basis: 100%; }
  .privacy-note p { position: static; width: auto; margin-top: 8px; }
}

@page { size: auto; margin: .45in; }

@media print {
  :root { color-scheme: light; }
  html,body { width: auto; min-width: 0; overflow: visible; }
  body { margin: 0; padding: 0 .25in !important; background: white; color: #151815; font-family: Georgia, "Times New Roman", serif; }
  .page { width: 100%; max-width: 100%; margin: 0; padding: 0; }
  .no-print { display: none !important; }
  .print-only { display: grid !important; }
  .metrics { display: none; }
  .panel,.recipe-card { width: auto; max-width: none; border: 0; border-radius: 0; box-shadow: none; background: white; padding: 0; }
  .recipe-head { padding-bottom: 20px; border-bottom: 2px solid #151815; }
  .recipe-head h2 { font-size: 34px; }
  .eyebrow { color: #151815; }
  .guidance-badge { color: #151815; background: #eee; border: 1px solid #aaa; }
  .ratio { color: #444; }
  .print-metrics { grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 4px; }
  .print-metrics div { padding: 10px 0; border-bottom: 1px solid #aaa; }
  .print-metrics span { display: block; color: #555; font: 10px/1.2 Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
  .print-metrics strong { display: block; margin-top: 4px; font: 700 16px/1.2 Arial, sans-serif; }
  .recipe-head,.print-metrics,.recipe-layout,.recipe-source { min-width: 0; max-width: 100%; }
  .recipe-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, .8fr); gap: 28px; padding-top: 22px; }
  .recipe-layout > section,.recipe-aside { min-width: 0; }
  h3 { font-size: 15px; }
  li { break-inside: avoid; font-size: 12.5px; line-height: 1.45; margin-bottom: 9px; }
  dt,dd { font-size: 11px; }
  .recipe-qr { grid-template-columns: 86px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid #bbb; background: white; break-inside: avoid; }
  .qr-code { width: 86px; height: 86px; padding: 4px; }
  .recipe-qr p { color: #444; font-size: 9px; line-height: 1.35; }
  .recipe-qr a { color: #151815; font-size: 9px; }
  .recipe-qr a::after { content: none; }
  .recipe-qr .print-recipe-url { display: block !important; margin: 5px 0 0; color: #555; font: 7px/1.25 Arial, sans-serif; overflow-wrap: anywhere; }
  .recipe-source { display: block; color: #444; font-size: 9px; overflow-wrap: anywhere; }
  .recipe-source a::after { content: none; }
  .print-notes.has-notes { display: block; margin-top: 18px; padding-top: 14px; border-top: 1px solid #aaa; }
  .print-notes p { margin: 0; white-space: pre-wrap; font-size: 11px; line-height: 1.45; }
  a { color: #151815; text-decoration: none; }
  a::after { content: " (" attr(href) ")"; font-size: 8px; overflow-wrap: anywhere; }
}
