:root {
  --blue: #0F2A44;
  --blue-2: #1D4468;
  --sun: #F5B700;
  --sun-dark: #C98F00;
  --cream: #FFF8E8;
  --card: #FFFFFF;
  --ink: #1A2430;
  --muted: #55606C;
  --line: #E6DCC2;
  --warn-bg: #FFF0CC;
  --err: #A32020;
  --ok: #176B3A;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
a { color: var(--blue-2); text-underline-offset: 2px; }
h1, h2, h3 { color: var(--blue); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 1.75rem; color: #fff; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* header + hero */
.site-header { background: var(--blue); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: #fff; font-weight: 700; text-decoration: none;
}
.sun { width: 18px; height: 18px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(245, 183, 0, 0.3); }
.hero { background: var(--blue); padding: 8px 0 56px; }
.hero .lead { color: #D6E2EE; font-size: 1.05rem; margin: 0; max-width: 34em; }
.hero .lead strong { color: var(--sun); }
main .wrap { padding-bottom: 8px; }
main > .wrap { margin-top: -36px; }

/* cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 0 0 16px;
  box-shadow: 0 2px 10px rgba(15, 42, 68, 0.07);
}
.note { border-left: 4px solid var(--sun); }
.results { margin-top: 24px; }
.results h2:focus { outline: none; }

/* forms */
.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; color: var(--blue); }
.opt { font-weight: 400; color: var(--muted); }
.hint, .src { color: var(--muted); font-size: 0.875rem; margin: 6px 0 0; }
.src { font-size: 0.8125rem; }
input[type="text"], input[type="tel"], input[type="email"], select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #B9AE90; border-radius: 10px;
}
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible, .choice:has(input:focus-visible) {
  outline: 3px solid var(--blue-2); outline-offset: 2px;
}

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.stack { flex-direction: column; }
.choice {
  display: flex; align-items: center; gap: 10px; flex: 1 1 auto;
  min-height: 48px; padding: 8px 12px; margin: 0;
  font-weight: 500; color: var(--ink);
  background: #fff; border: 1.5px solid #B9AE90; border-radius: 10px; cursor: pointer;
}
.choice input { width: 22px; height: 22px; margin: 0; accent-color: var(--blue); flex: none; }
.choice:has(input:checked) { border-color: var(--blue); background: #EEF4FA; box-shadow: inset 0 0 0 1px var(--blue); }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--ink); min-height: 44px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px; padding: 10px 20px;
  font: inherit; font-weight: 700; border-radius: 10px; border: 2px solid transparent; cursor: pointer;
}
.btn.primary { width: 100%; background: var(--sun); color: var(--blue); border-color: var(--sun); font-size: 1.05rem; }
.btn.primary:hover { background: #FFC61F; }
.btn.secondary { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.stepper { display: flex; gap: 8px; align-items: stretch; }
.stepper input { text-align: center; font-weight: 700; font-size: 1.15rem; flex: 1 1 auto; min-width: 0; }
.btn.step { background: var(--blue); color: #fff; font-size: 1.4rem; padding: 0; width: 52px; flex: none; }

.error { color: var(--err); font-weight: 600; }
.success { color: var(--ok); font-weight: 600; background: #E8F5EC; border-radius: 10px; padding: 12px; }
.status { min-height: 1.5em; color: var(--muted); font-size: 0.9rem; margin: 0 0 8px; }
.notice { background: #EEF4FA; border-radius: 10px; padding: 10px 12px; font-size: 0.9375rem; }
.warning {
  background: var(--warn-bg); border-left: 4px solid var(--sun-dark);
  border-radius: 8px; padding: 10px 12px; margin: 14px 0 0; font-weight: 600; color: #5A3E00;
}
[hidden] { display: none !important; }

/* results */
.scenarios { margin-bottom: 16px; }
.scenario {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 16px; box-shadow: 0 2px 10px rgba(15, 42, 68, 0.07);
}
.scenario + .scenario { border-top: 4px solid var(--sun); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  background: var(--cream); border-radius: 10px; padding: 10px 12px;
}
.metric-label { font-size: 0.8125rem; color: var(--muted); }
.metric-value { font-size: 1.25rem; color: var(--blue); line-height: 1.2; }
.metric-sub { font-size: 0.75rem; color: var(--muted); }

/* chart (heights come from .h0 ... .h100 classes at the end of this file) */
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.875rem; margin: 0 0 10px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.swatch.prod, .bar.prod { background: var(--sun); }
.swatch.cons, .bar.cons { background: var(--blue); }
.chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; border-bottom: 2px solid var(--line); }
.col { display: flex; flex-direction: column; min-width: 0; }
.bars { display: flex; align-items: flex-end; gap: 1px; height: 150px; }
.bar { display: block; flex: 1 1 0; min-width: 0; border-radius: 2px 2px 0 0; }
.mlabel { font-size: 0.625rem; text-align: center; color: var(--muted); padding-top: 4px; }

/* assumptions */
.assumptions summary { cursor: pointer; font-weight: 700; color: var(--blue); min-height: 44px; display: flex; align-items: center; }
.assumptions[open] summary { margin-bottom: 8px; }

/* lead */
.lead-card { border-top: 4px solid var(--sun); }

/* footer */
.site-footer { background: var(--blue); color: #C5D3E0; padding: 24px 0 32px; margin-top: 24px; font-size: 0.875rem; }
.site-footer a { color: var(--sun); display: inline-block; min-height: 44px; line-height: 44px; }

/* long text pages */
.doc h2 { margin-top: 22px; }
.doc ul { padding-left: 20px; margin: 0 0 12px; }
.doc li { margin-bottom: 6px; }

@media (min-width: 560px) {
  h1 { font-size: 2.2rem; }
  .card { padding: 24px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .btn.primary { width: auto; min-width: 240px; }
  .bars { height: 190px; }
  .mlabel { font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* bar heights, 0-100 % of the chart area */
.h0 { height: 0%; }
.h1 { height: 1%; }
.h2 { height: 2%; }
.h3 { height: 3%; }
.h4 { height: 4%; }
.h5 { height: 5%; }
.h6 { height: 6%; }
.h7 { height: 7%; }
.h8 { height: 8%; }
.h9 { height: 9%; }
.h10 { height: 10%; }
.h11 { height: 11%; }
.h12 { height: 12%; }
.h13 { height: 13%; }
.h14 { height: 14%; }
.h15 { height: 15%; }
.h16 { height: 16%; }
.h17 { height: 17%; }
.h18 { height: 18%; }
.h19 { height: 19%; }
.h20 { height: 20%; }
.h21 { height: 21%; }
.h22 { height: 22%; }
.h23 { height: 23%; }
.h24 { height: 24%; }
.h25 { height: 25%; }
.h26 { height: 26%; }
.h27 { height: 27%; }
.h28 { height: 28%; }
.h29 { height: 29%; }
.h30 { height: 30%; }
.h31 { height: 31%; }
.h32 { height: 32%; }
.h33 { height: 33%; }
.h34 { height: 34%; }
.h35 { height: 35%; }
.h36 { height: 36%; }
.h37 { height: 37%; }
.h38 { height: 38%; }
.h39 { height: 39%; }
.h40 { height: 40%; }
.h41 { height: 41%; }
.h42 { height: 42%; }
.h43 { height: 43%; }
.h44 { height: 44%; }
.h45 { height: 45%; }
.h46 { height: 46%; }
.h47 { height: 47%; }
.h48 { height: 48%; }
.h49 { height: 49%; }
.h50 { height: 50%; }
.h51 { height: 51%; }
.h52 { height: 52%; }
.h53 { height: 53%; }
.h54 { height: 54%; }
.h55 { height: 55%; }
.h56 { height: 56%; }
.h57 { height: 57%; }
.h58 { height: 58%; }
.h59 { height: 59%; }
.h60 { height: 60%; }
.h61 { height: 61%; }
.h62 { height: 62%; }
.h63 { height: 63%; }
.h64 { height: 64%; }
.h65 { height: 65%; }
.h66 { height: 66%; }
.h67 { height: 67%; }
.h68 { height: 68%; }
.h69 { height: 69%; }
.h70 { height: 70%; }
.h71 { height: 71%; }
.h72 { height: 72%; }
.h73 { height: 73%; }
.h74 { height: 74%; }
.h75 { height: 75%; }
.h76 { height: 76%; }
.h77 { height: 77%; }
.h78 { height: 78%; }
.h79 { height: 79%; }
.h80 { height: 80%; }
.h81 { height: 81%; }
.h82 { height: 82%; }
.h83 { height: 83%; }
.h84 { height: 84%; }
.h85 { height: 85%; }
.h86 { height: 86%; }
.h87 { height: 87%; }
.h88 { height: 88%; }
.h89 { height: 89%; }
.h90 { height: 90%; }
.h91 { height: 91%; }
.h92 { height: 92%; }
.h93 { height: 93%; }
.h94 { height: 94%; }
.h95 { height: 95%; }
.h96 { height: 96%; }
.h97 { height: 97%; }
.h98 { height: 98%; }
.h99 { height: 99%; }
.h100 { height: 100%; }

/* generated pages: month table, link lists, anchor buttons */
.tbl { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 0.9375rem; }
.tbl caption { text-align: left; font-weight: 600; color: var(--blue); padding: 0 0 6px; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.tbl th[scope="row"], .tbl thead th:first-child { text-align: left; }
.tbl thead th { color: var(--blue); }
.linklist { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.linklist a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; background: #fff; border: 1.5px solid #B9AE90; border-radius: 10px; }
a.btn { text-decoration: none; }
