:root {
  color-scheme: light;
  --ink: #16221c;
  --muted: #59665e;
  --paper: #f5f2e9;
  --panel: #fffdf7;
  --line: #c9cec6;
  --accent: #205f46;
  --accent-soft: #dcecdf;
  --warn: #8a4b12;
  --warn-soft: #fff0d7;
  --danger: #8a2c2c;
  --danger-soft: #f9dfdc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #ca7b25;
  outline-offset: 2px;
}

.hero, main { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.hero { padding: 64px 0 28px; }
h1 { max-width: 850px; margin: 8px 0 16px; font-size: clamp(2.2rem, 6vw, 4.8rem); line-height: .98; letter-spacing: -.045em; }
h2 { margin: 0 0 16px; line-height: 1.15; }
h3 { margin-bottom: 8px; }
.eyebrow { margin: 0; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lede { max-width: 760px; font-size: 1.2rem; color: var(--muted); }
.guardrail { max-width: 900px; margin-top: 24px; padding: 16px 18px; border-left: 5px solid var(--warn); background: var(--warn-soft); font-weight: 650; }

main { padding-bottom: 72px; }
section, form { margin-top: 26px; }
.how, .limits, .sources, .result-panel { padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.how li + li, .limits li + li, .sources li + li { margin-top: 10px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-actions .subtle { margin-top: 0; }
.input-note { margin: -4px 0 16px; color: var(--muted); font-size: .9rem; }

button { border: 0; border-radius: 10px; padding: 12px 16px; font: inherit; font-weight: 750; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.secondary { color: white; background: var(--accent); }
.subtle { margin-top: 14px; color: var(--danger); background: transparent; border: 1px solid #d8aaa3; }

.rows { display: grid; gap: 18px; }
.vault-row { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.vault-row legend { padding-inline: 8px; font-size: 1.05rem; font-weight: 850; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: .9rem; font-weight: 700; }
input, select { width: 100%; min-width: 0; border: 1px solid #9ca79f; border-radius: 9px; padding: 11px 12px; color: var(--ink); background: white; font: inherit; }

.decision { display: inline-block; padding: 9px 12px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 850; }
.decision-map_consistent_with_inputs { color: var(--accent); background: var(--accent-soft); }
.decision-stop_and_verify { color: var(--danger); background: var(--danger-soft); }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.counts div { padding: 12px; border-radius: 10px; background: #f0efe8; }
.counts dt { color: var(--muted); font-size: .78rem; }
.counts dd { margin: 2px 0 0; font-size: 1.7rem; font-weight: 850; }
.result-rows { display: grid; gap: 8px; padding-left: 26px; }
.result-row span { display: block; color: var(--muted); font-size: .88rem; }
.signals { margin-top: 18px; padding: 14px 18px; border-left: 5px solid var(--danger); background: var(--danger-soft); }
.result-limit { margin-top: 20px; color: var(--muted); }

@media (max-width: 700px) {
  .hero { padding-top: 36px; }
  .grid, .counts { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .secondary { width: 100%; }
  .form-actions { width: 100%; }
  .form-actions button { width: 100%; }
}
