:root {
  --ink: #17211c; --muted: #647069; --paper: #f4f2ea; --card: #fffdf7;
  --line: #d9d9cf; --green: #16624b; --green-dark: #0b4333; --gold: #dca44b;
  --shadow: 0 18px 50px rgba(28, 42, 34, .09); --radius: 22px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
.hero { min-height: 330px; padding: 64px max(5vw, calc((100vw - 1400px) / 2)); display: flex; align-items: end; justify-content: space-between; gap: 40px; color: white; background: radial-gradient(circle at 75% 10%, rgba(221,166,76,.32), transparent 30%), linear-gradient(135deg, #0b3e31, #17664e); }
.hero h1 { max-width: 780px; margin: 4px 0 12px; font-family: Georgia, serif; font-size: clamp(2.5rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.045em; }
.subtitle { max-width: 650px; margin: 0; color: #d7e6df; font-size: 1.1rem; }
.eyebrow { margin: 0 0 5px; color: var(--gold); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
main { width: min(1400px, 90vw); margin: 0 auto; padding: 64px 0 90px; }
.action-bar { position: sticky; top: 12px; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; width: fit-content; max-width: 100%; margin: -88px 0 50px auto; padding: 10px; border: 1px solid rgba(22,98,75,.13); border-radius: 999px; background: rgba(255,253,247,.92); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.button-quiet { color: var(--green-dark); background: #e7ebe6; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
h2 { margin: 0; font: 700 clamp(1.8rem, 3vw, 2.7rem)/1.1 Georgia, serif; }
.button { border: 0; border-radius: 999px; padding: 13px 20px; cursor: pointer; font-weight: 750; transition: transform .15s, box-shadow .15s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--green-dark); background: #f1c879; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr)); gap: 24px; }
.scenario-card { position: relative; overflow: hidden; border: 1px solid rgba(22,98,75,.12); border-top: 5px solid var(--green); border-radius: var(--radius); padding: 22px; background: var(--card); box-shadow: var(--shadow); }
.scenario-card.accent-1 { border-top-color: #bf7d36; }.scenario-card.accent-2 { border-top-color: #426a9b; }.scenario-card.accent-3 { border-top-color: #8a5c78; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.scenario-number { color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--muted); background: #eeece4; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.icon-button:hover { color: #9b302b; background: #f8dfda; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 6px; color: #4e5a53; font-size: .8rem; font-weight: 700; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; color: var(--ink); background: #fff; outline: 0; }
.transport-chain { grid-column: 1 / -1; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }.transport-chain-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.transport-chain-head div { display: grid; }.transport-chain-head span { color: var(--muted); font-size: .75rem; }.transport-leg-list { display: grid; gap: 12px; margin-top: 14px; }.transport-leg { padding: 16px; border-radius: 14px; background: #f0f2ed; }.leg-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }.leg-fields { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,98,75,.12); }
.field-wide input { font-size: 1.35rem; font-weight: 750; }
.input-unit { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.input-unit:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,98,75,.12); }
.input-unit input { border: 0; box-shadow: none !important; }
.input-unit b { flex: 0 0 auto; padding-right: 10px; color: #7a837e; font-size: .72rem; }
.card-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px -22px -22px; background: #d8ded8; border-top: 1px solid #d8ded8; }
.card-summary div { padding: 16px 12px; background: #eef2ed; text-align: center; }
.card-summary span { display: block; color: var(--muted); font-size: .7rem; }
.card-summary strong { display: block; margin-top: 3px; color: var(--green-dark); font-size: .95rem; }
.comparison-section { margin-top: 72px; }
.charts-section { margin-top: 72px; }
.forecast-section { margin-top: 72px; }.forecast-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 12px; padding: 22px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }.forecast-note { margin: 0 0 22px; color: var(--muted); font-size: .8rem; }.forecast-stress td, .forecast-stress th { background: #fff6e6; }
.forecast-average td, .forecast-average th { background: #f2f4ef; }.forecast-cell strong, .forecast-cell small { display: block; }.forecast-cell small { margin-top: 3px; color: var(--muted); font-size: .68rem; }.difference-block { margin-top: 32px; }.difference-block h3 { margin-bottom: 0; font-family: Georgia, serif; }.delta-positive { color: #16624b; }.delta-negative { color: #a33a32; }
.formula-section { margin-top: 72px; }.formula-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.formula-grid details { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--card); }.formula-grid summary { cursor: pointer; font-weight: 800; }.formula-grid p { margin-bottom: 0; color: var(--muted); font-size: .85rem; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 5vw; color: #d7e6df; background: var(--green-dark); font-size: .8rem; }.site-footer nav { display: flex; gap: 20px; }.site-footer a { color: white; }
.legal-page main { width: min(760px, 90vw); padding-top: 60px; }.legal-page h1 { margin: 20px 0 40px; font: 700 clamp(2.5rem, 6vw, 4.5rem)/1 Georgia, serif; }.legal-page h2 { margin-top: 36px; font-size: 1.3rem; }.legal-page a { color: var(--green); }.legal-warning { padding: 18px; border-left: 5px solid #c77a32; background: #fff1d7; }
.hero-home { color: inherit; text-decoration: none; }.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 5vw; background: var(--green-dark); }.landing-nav a { color: white; text-decoration: none; }.landing-nav > div { display: flex; align-items: center; gap: 24px; }.landing-nav .button { color: var(--green-dark); }.brand { font: 700 1.25rem Georgia, serif; }.landing-hero { min-height: 680px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 8vw; padding: 70px max(5vw, calc((100vw - 1300px)/2)); color: white; background: radial-gradient(circle at 80% 20%, rgba(220,164,75,.32), transparent 28%), linear-gradient(135deg,#0b3e31,#17664e); }.landing-hero h1 { margin: 8px 0 24px; font: 700 clamp(3rem,6vw,6rem)/.98 Georgia,serif; letter-spacing: -.045em; }.landing-hero p { max-width: 720px; color: #d7e6df; font-size: 1.15rem; }.landing-hero small { display: block; margin-top: 18px; color: #b8d0c5; }.hero-visual { display: grid; gap: 12px; }.hero-visual div { padding: 22px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); }.hero-visual span { display: block; color: #c8ddd4; }.hero-visual strong { font: 700 2rem Georgia,serif; }.landing-section { width: min(1200px,90vw); margin: 0 auto; padding: 100px 0; }.landing-section > h2 { max-width: 760px; font-size: clamp(2.3rem,4vw,4rem); }.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-top: 45px; }.feature-grid article { padding: 26px; border-top: 4px solid var(--green); background: var(--card); box-shadow: var(--shadow); }.feature-grid b { color: var(--gold); }.feature-grid h3 { font-family: Georgia,serif; }.feature-grid p, .steps li span { color: var(--muted); }.steps ol { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; padding: 0; margin: 40px 0; list-style: none; }.steps li { display: grid; gap: 8px; padding: 24px; border-left: 3px solid var(--gold); background: var(--card); }.landing-disclaimer { padding: 55px 5vw; text-align: center; background: #e7ebe6; }.landing-disclaimer p { margin-bottom: 0; color: var(--muted); }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chart-panel { border: 1px solid rgba(22,98,75,.12); border-radius: var(--radius); padding: 24px; background: var(--card); box-shadow: var(--shadow); }
.chart-panel h3 { margin: 0 0 22px; font: 700 1.25rem/1.2 Georgia, serif; }
.chart-wide { grid-column: 1 / -1; }.chart-row + .chart-row { margin-top: 16px; }
.chart-label { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 6px; font-size: .82rem; }.chart-label strong { color: var(--green-dark); }
.bar-track, .stacked-bar { height: 16px; overflow: hidden; border-radius: 999px; background: #e3e6df; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #55a37f); }.bar-fill.negative { background: #b84c44; }
.stacked-bar { display: flex; }.segment { height: 100%; }.segment.sleep, .chart-legend .sleep::before { background: #426a9b; }.segment.routine, .chart-legend .routine::before { background: #8a5c78; }.segment.work, .chart-legend .work::before { background: #16624b; }.segment.commute, .chart-legend .commute::before { background: #dca44b; }.segment.private, .chart-legend .private::before { background: #80b89d; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; color: var(--muted); font-size: .75rem; }.chart-legend span { display: flex; align-items: center; gap: 6px; }.chart-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.household-section { margin-top: 72px; }
.button-secondary { color: white; background: var(--green); }
.household-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr); gap: 24px; }
.household-card { border: 1px solid rgba(22,98,75,.12); border-radius: var(--radius); padding: 24px; background: var(--card); box-shadow: var(--shadow); }
.household-card h3 { margin: 0 0 20px; font-family: Georgia, serif; font-size: 1.4rem; }
.field-note { margin: 14px 0 0; color: var(--muted); font-size: .8rem; }
.cost-heading { display: flex; justify-content: space-between; gap: 20px; }.cost-heading strong { color: var(--green); }
.cost-list { display: grid; gap: 10px; }
.cost-row { display: grid; grid-template-columns: 1fr minmax(160px, .55fr) 34px; align-items: center; gap: 10px; }
.cost-row > input { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; }
.save-status, .hint { margin: 0; color: var(--muted); font-size: .82rem; }.save-status.error { color: #a32d27; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { padding: 14px 18px; border-bottom: 1px solid #e4e3dc; text-align: right; white-space: nowrap; }
thead th { position: sticky; top: 0; color: white; background: var(--green-dark); font-size: .85rem; }
th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--card); }
thead th:first-child { z-index: 2; background: var(--green-dark); }
tbody th { color: #56615b; font-size: .82rem; }
tbody td { font-variant-numeric: tabular-nums; }
tr.highlight th, tr.highlight td { color: var(--green-dark); background: #e9f0eb; font-weight: 800; }
tr.highlight th:first-child { background: #e9f0eb; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.empty-state { padding: 70px 20px; border: 2px dashed #c9ccc4; border-radius: var(--radius); text-align: center; }.empty-state h3 { margin: 0; }.empty-state p { color: var(--muted); }
@media (max-width: 720px) {
  .hero { min-height: 400px; padding: 42px 5vw; align-items: flex-start; flex-direction: column; justify-content: center; }
  .hero .button { align-self: stretch; }
  main { width: 92vw; padding-top: 44px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .fields { grid-template-columns: 1fr; }.field-wide { grid-column: auto; }
  .card-summary { grid-template-columns: 1fr; }
  .household-layout { grid-template-columns: 1fr; }.cost-row { grid-template-columns: 1fr 1fr 34px; }
  .charts-grid { grid-template-columns: 1fr; }.chart-wide { grid-column: auto; }
  .forecast-controls { grid-template-columns: 1fr; }.site-footer { flex-direction: column; }
  .formula-grid { grid-template-columns: 1fr; }.landing-nav > div > a:not(.button) { display: none; }.landing-hero { min-height: 0; grid-template-columns: 1fr; padding: 70px 5vw; }.hero-visual { grid-template-columns: 1fr; }.feature-grid, .steps ol { grid-template-columns: 1fr; }
  .leg-fields { grid-template-columns: 1fr; }
  .action-bar { position: static; width: 100%; margin: -20px 0 42px; border-radius: 18px; }.action-bar .button { flex: 1 1 44%; }
  .card-summary div { display: flex; justify-content: space-between; text-align: left; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  :root { --paper: white; --card: white; --shadow: none; }
  body { color: #111; background: white; font-size: 10pt; }
  .hero { min-height: 0; padding: 0 0 12mm; color: #111; background: none; border-bottom: 2px solid #16624b; }
  .hero h1 { max-width: none; font-size: 25pt; }.hero .subtitle { color: #444; }.hero > .button, .action-bar, .icon-button, #add-cost, .save-status { display: none !important; }
  main { width: 100%; padding: 10mm 0 0; }.section-heading { margin-bottom: 5mm; }.section-heading h2 { font-size: 18pt; }
  .scenario-grid, .household-layout, .charts-grid { display: block; }.scenario-card, .household-card, .chart-panel { margin-bottom: 6mm; padding: 5mm; box-shadow: none; }
  .scenario-card { break-before: page; break-inside: auto; }.scenario-card:first-child { break-before: auto; }
  .household-section, .comparison-section, .charts-section, .forecast-section, .formula-section { break-before: page; }
  .household-card, .chart-panel, .formula-grid details, .transport-leg { break-inside: avoid; }
  .scenario-card { border: 1px solid #bbb; }.field input, .input-unit, .cost-row > input { border: 0; background: transparent; padding: 1mm 0; }
  .fields { grid-template-columns: repeat(4, 1fr); gap: 2mm; }.field-wide { grid-column: auto; }.card-summary { margin: 4mm -5mm -5mm; }.leg-fields { grid-template-columns: repeat(4,1fr); }
  .table-wrap { overflow: visible; box-shadow: none; border-radius: 0; } table { width: 100%; min-width: 0; table-layout: fixed; font-size: 7pt; } th, td { padding: 1.5mm; white-space: normal; overflow-wrap: anywhere; }
  thead { display: table-header-group; } tr { break-inside: avoid; }
  th:first-child, thead th { position: static; }.comparison-section, .household-section, .charts-section { margin-top: 10mm; }
  .bar-track, .stacked-bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .site-footer { color: #111; background: white; border-top: 1px solid #aaa; }.site-footer a { color: #111; }.forecast-controls { grid-template-columns: repeat(3, 1fr); box-shadow: none; }
}
