:root {
  --ink: #152033;
  --muted: #5d6879;
  --navy: #183b5b;
  --blue: #216b8f;
  --blue-soft: #eaf4f8;
  --gold: #a76f16;
  --gold-soft: #fff7df;
  --surface: #ffffff;
  --canvas: #f4f6f8;
  --line: #d8dee7;
  --success: #22684d;
  --shadow: 0 12px 32px rgba(23, 45, 70, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
}

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

.hero {
  color: #fff;
  background: linear-gradient(132deg, #102b45 0%, #185878 64%, #257999 100%);
  border-bottom: 5px solid #e9bb5d;
}

.hero__inner, .shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.hero__inner { padding: 54px 0 42px; }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; }
.subtitle { margin: 10px 0 28px; font-size: clamp(1.08rem, 2.2vw, 1.42rem); opacity: .92; }
.research-question { max-width: 960px; font-size: 1.04rem; }
.plain-language { max-width: 850px; opacity: .9; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .11em; font-size: .76rem; font-weight: 800; }

.evidence-badge {
  margin-top: 24px;
  padding: 15px 18px;
  border: 1px solid rgba(255,255,255,.48);
  border-left: 5px solid #f0c66f;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  max-width: 1020px;
}

.warning { margin: 12px 0 0; font-size: .9rem; opacity: .86; }
.shell { padding: 28px 0 60px; }
.status-card { padding: 12px 16px; background: var(--gold-soft); border: 1px solid #ead49a; border-radius: 10px; margin-bottom: 16px; }
.status-card.is-ready { background: #eaf6f1; border-color: #b7daca; color: var(--success); }
.status-card.is-error { background: #fff0ef; border-color: #ecc0bd; color: #8b2723; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 6px; background: #e5e9ee; border-radius: 12px; }
.tab { border: 0; border-radius: 9px; padding: 11px 18px; color: #465267; background: transparent; font-weight: 750; white-space: nowrap; }
.tab:hover { background: rgba(255,255,255,.6); }
.tab.is-active { color: var(--navy); background: var(--surface); box-shadow: 0 2px 8px rgba(23,45,70,.1); }
.tab:disabled { cursor: not-allowed; opacity: .46; }
.tab-panel { padding-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card h3 { margin-top: 0; color: var(--navy); }
.intro-card { max-width: 820px; }
.note-card { background: var(--blue-soft); border-color: #bfdae6; }
.private-card { border-top: 5px solid var(--blue); }
.reveal-card { border-top: 5px solid var(--gold); }
.handoff-card { text-align: center; padding: 38px 22px; border: 2px dashed #9ba6b4; }

.button { border: 0; border-radius: 9px; padding: 11px 17px; font-weight: 750; transition: transform .12s ease, box-shadow .12s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .choice-button:focus-visible, .tab:focus-visible { outline: 3px solid #f0c66f; outline-offset: 2px; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 5px 14px rgba(33,107,143,.22); }
.secondary { color: var(--navy); background: #e5eef3; border: 1px solid #c6d8e1; }
.small { padding: 8px 12px; font-size: .9rem; }

.seed-field { display: grid; gap: 5px; width: min(340px, 100%); margin: 18px 0 12px; color: var(--muted); font-size: .9rem; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #bfc8d3; border-radius: 8px; padding: 10px 12px; color: var(--ink); background: #fff; }
textarea { min-height: 82px; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid rgba(33,107,143,.17); border-color: var(--blue); }

.scenario-grid, .metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; }
.metric { padding: 14px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 9px; }
.metric span { display: block; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.metric strong { display: block; margin-top: 4px; }

.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.choice-button { min-height: 138px; text-align: left; padding: 16px; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; }
.choice-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.choice-button strong { display: block; color: var(--navy); margin-bottom: 7px; font-size: 1rem; }
.choice-button span { color: var(--muted); font-size: .88rem; }

.reflection-box { padding: 16px; border-radius: 10px; background: #f8f9fb; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.checkbox-grid label { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.checkbox-grid input { width: auto; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--navy); background: #f2f6f8; font-size: .86rem; }
td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }

.benchmark { padding: 14px 16px; border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 7px; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.result-card { min-width: 0; }
.result-card h3 { margin-bottom: 6px; }
.result-card .d { color: var(--muted); font-size: .88rem; }
.result-card dl { margin: 15px 0 0; }
.result-card dt { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.result-card dd { margin: 2px 0 13px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.about-boundary { color: var(--ink); background: var(--gold-soft); border-color: #e1bc65; }
.provenance { font: .82rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.privacy-note { color: var(--muted); font-size: .86rem; }
.positive { color: var(--success); font-weight: 750; }

footer { padding: 24px; text-align: center; color: var(--muted); font-size: .84rem; border-top: 1px solid var(--line); background: #fff; }

@media (max-width: 760px) {
  .hero__inner { padding-top: 38px; }
  .choice-grid, .results-grid, .two-column { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading .button { width: 100%; }
  .tabs { border-radius: 0; margin-inline: -18px; padding-inline: 18px; }
  .card { padding: 18px; }
}

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