:root {
  --blush: #ff9a95;
  --blush-deep: #e86f71;
  --cream: #fff8f2;
  --paper: #fffdf9;
  --cocoa: #372523;
  --muted: #796a66;
  --line: #eadbd5;
  --mint: #dff2e7;
  --shadow: 0 20px 60px rgba(91, 51, 44, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cocoa);
  background:
    radial-gradient(circle at 8% 0%, rgba(255,154,149,.18), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(255,218,178,.22), transparent 24rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

button, input, select { font: inherit; }
button { color: inherit; }
.shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.hero { padding-top: 54px; }
.brand-lockup { display: grid; grid-template-columns: 66px 1fr; gap: 24px; align-items: start; }
.pin-mark {
  width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50% 50% 50% 12%;
  transform: rotate(-8deg); background: var(--blush); color: white; box-shadow: 0 12px 28px rgba(232,111,113,.28);
  font: italic 700 34px Georgia, serif;
}
.pin-mark::first-letter { transform: rotate(8deg); }
.eyebrow, .step-label { margin: 0 0 8px; color: var(--blush-deep); font-weight: 800; font-size: 12px; letter-spacing: .13em; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: .98; margin: 0; max-width: 780px; }
h1 em { color: var(--blush-deep); font-weight: 500; }
h2 { font-size: clamp(28px, 3vw, 38px); margin: 0 0 8px; }
.hero-copy { max-width: 690px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; align-items: center; margin: 30px 0 26px 90px; flex-wrap: wrap; }
.button { border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer; font-weight: 750; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--cocoa); color: white; }
.button.secondary { background: white; border: 1px solid var(--line); }
.button.ghost { background: transparent; color: var(--muted); }
.save-state { margin-left: auto; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.save-state span { width: 8px; height: 8px; border-radius: 50%; background: #55a879; box-shadow: 0 0 0 4px var(--mint); }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.summary-card { min-height: 154px; border-radius: 26px; padding: 23px; border: 1px solid var(--line); background: rgba(255,255,255,.78); box-shadow: 0 8px 25px rgba(85,49,42,.04); display: flex; flex-direction: column; }
.summary-card.accent { background: var(--blush); border-color: var(--blush); color: #3b211f; }
.summary-card.dark { background: var(--cocoa); border-color: var(--cocoa); color: white; }
.summary-card span { font-size: 13px; font-weight: 750; opacity: .76; }
.summary-card strong { font: 600 clamp(25px, 3vw, 36px) Georgia, serif; margin: 18px 0 6px; }
.summary-card small { margin-top: auto; opacity: .65; }
.panel { background: rgba(255,253,249,.92); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.ingredients-panel { padding: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.section-heading p:not(.step-label) { color: var(--muted); margin: 0; line-height: 1.5; }
.section-heading.compact { display: block; }
.shipping-strip { display: grid; grid-template-columns: minmax(210px,.75fr) minmax(300px,1.5fr) minmax(170px,.65fr); align-items: center; gap: 22px; background: #fff3ef; border: 1px solid #f5d9d4; padding: 18px; border-radius: 20px; margin: 25px 0 18px; }
.shipping-strip label > span, .shipping-check span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; font-weight: 700; }
.money-input { background: white; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 7px; padding-left: 12px; }
.money-input b { color: var(--blush-deep); font-size: 13px; }
.money-input input { border: 0; min-width: 0; width: 100%; padding: 10px 10px 10px 0; outline: 0; background: transparent; }
.shipping-explainer { border-left: 1px solid #eecbc5; padding-left: 22px; }
.shipping-explainer p { margin: 7px 0 0; color: var(--muted); line-height: 1.45; font-size: 13px; }
.formula-badge { color: var(--blush-deep); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.shipping-check { text-align: right; }
.shipping-check strong { font-size: 15px; }
.mode-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.segmented { background: #f2e8e3; padding: 3px; border-radius: 12px; display: flex; }
.segmented button { border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--muted); }
.segmented button.active { background: white; color: var(--cocoa); box-shadow: 0 3px 10px rgba(70,45,40,.08); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 17px; background: white; }
table { border-collapse: collapse; width: 100%; min-width: 1110px; }
th { text-align: left; padding: 13px 10px; background: #fbf5f1; color: var(--muted); font-size: 11px; letter-spacing: .03em; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; }
td { padding: 10px; border-bottom: 1px solid #f1e8e4; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td input, td select, .field-grid input { width: 100%; border: 1px solid #e7d9d3; background: #fffdfb; border-radius: 10px; padding: 10px; outline: none; }
td input:focus, td select:focus, .field-grid input:focus, .money-input:focus-within { border-color: var(--blush-deep); box-shadow: 0 0 0 3px rgba(255,154,149,.16); }
td .name-input { min-width: 140px; font-weight: 700; }
td .number-input { min-width: 106px; }
td .qty-group { display: grid; grid-template-columns: 78px 66px; gap: 6px; }
td.output { min-width: 130px; font-weight: 750; }
td.output small { display: block; font-weight: 500; color: var(--muted); margin-top: 4px; }
.remove-row { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 9px; color: #a88680; cursor: pointer; font-size: 18px; }
.remove-row:hover { background: #fff0ed; color: #c95759; }
.formula-line { margin: 14px 3px 0; color: var(--muted); font-size: 12px; }
.cost-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(380px,.82fr); gap: 20px; margin-top: 20px; }
.assumptions, .breakdown { padding: 30px; }
.field-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; margin-top: 25px; }
.field-grid label > span { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 13px; margin: 0 3px 7px; }
.field-grid label i { font-style: normal; color: var(--muted); font-weight: 550; }
.field-grid input { padding: 12px; font-weight: 750; }
.recommendation { margin-top: 17px; padding: 18px; border-radius: 18px; background: var(--cocoa); color: white; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.recommendation span { display: block; opacity: .7; font-size: 12px; margin-bottom: 6px; }
.recommendation strong { font: 600 28px Georgia, serif; }
.recommendation p { margin: 0; font-size: 12px; opacity: .65; text-align: right; }
.warnings { margin-top: 13px; }
.warning { background: #fff3dd; color: #76551e; border: 1px solid #f2d9a6; border-radius: 12px; padding: 10px 12px; font-size: 12px; margin-top: 7px; }
.all-good { color: #317254; background: var(--mint); border-radius: 12px; padding: 10px 12px; font-size: 12px; }
.breakdown-rows { margin-top: 25px; }
.breakdown-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eee4df; }
.breakdown-row div { min-width: 0; }
.breakdown-row span { font-size: 13px; font-weight: 700; }
.breakdown-row small { display: block; color: var(--muted); margin-top: 3px; }
.breakdown-row strong { font-size: 14px; }
.bar-track { height: 5px; background: #f2e6e1; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar-fill { height: 100%; background: var(--blush); border-radius: inherit; min-width: 2px; }
.total-line { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-size: 16px; }
.total-line strong { font: 600 21px Georgia, serif; }
details { border-top: 1px solid var(--line); padding-top: 15px; }
summary { cursor: pointer; font-weight: 750; font-size: 13px; }
.formula-box { margin-top: 12px; border-radius: 15px; padding: 13px 16px; background: #fbf5f1; color: var(--muted); font-size: 12px; line-height: 1.5; }
.formula-box p { margin: 5px 0; }
footer { padding: 30px 0 45px; text-align: center; color: #9a827d; font-size: 12px; }
.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; }

@media (max-width: 980px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .cost-layout { grid-template-columns: 1fr; }
  .shipping-strip { grid-template-columns: 1fr 1.5fr; }
  .shipping-check { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 650px) {
  .shell { width: min(100% - 24px, 1240px); }
  .hero { padding-top: 28px; }
  .brand-lockup { grid-template-columns: 48px 1fr; gap: 14px; }
  .pin-mark { width: 48px; height: 48px; font-size: 25px; }
  h1 { font-size: 39px; }
  .hero-copy { font-size: 15px; }
  .hero-actions { margin-left: 0; }
  .save-state { width: 100%; margin: 5px 0 0; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .summary-card { min-height: 132px; padding: 17px; border-radius: 20px; }
  .summary-card strong { font-size: 23px; }
  .ingredients-panel, .assumptions, .breakdown { padding: 20px; border-radius: 23px; }
  .section-heading { align-items: start; flex-direction: column; }
  .shipping-strip { grid-template-columns: 1fr; gap: 14px; }
  .shipping-explainer { border-left: 0; border-top: 1px solid #eecbc5; padding: 14px 0 0; }
  .shipping-check { grid-column: auto; }
  .mode-row { align-items: start; flex-direction: column; }
  .field-grid { grid-template-columns: 1fr; }
  .recommendation { align-items: start; flex-direction: column; }
  .recommendation p { text-align: left; }
}
