:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #1a2233;
  --muted: #5b6577;
  --line: #e4e8ee;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --amber: #b45309;
  --amber-soft: #fffaeb;
  --red: #b42318;
  --red-soft: #fef3f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Lock screen ─────────────────────────────── */
.lock {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lock-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  width: 100%; max-width: 360px;
  text-align: center;
}
.lock-card h2 { margin: 0 0 6px; font-size: 18px; }
.lock-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.lock-card input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; margin-bottom: 12px;
}
.lock-card button {
  width: 100%; padding: 10px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.lock-error { color: var(--red); font-size: 13px; margin-top: 10px; }

/* ── Header ─────────────────────────────────── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 36px 0 28px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.topbar h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.15;
}
.subtitle { color: var(--muted); font-size: 14px; }

/* ── Verdict banner ─────────────────────────── */
.verdict {
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 36px;
  border: 1px solid;
  display: flex; gap: 12px; align-items: baseline;
}
.verdict .verdict-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
}
.verdict-blue  { background: var(--accent-soft); border-color: #c7d7fe; color: #1e40af; }
.verdict-green { background: var(--green-soft);  border-color: #abefc6; color: var(--green); }
.verdict-amber { background: var(--amber-soft);  border-color: #fedf89; color: var(--amber); }

/* ── Sections / cards ───────────────────────── */
section { margin-bottom: 48px; }
h2 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.section-intro { color: var(--muted); margin: -6px 0 18px; font-size: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card p:first-child { margin-top: 0; }
.card-title { font-weight: 600; margin-bottom: 12px; }
.footnote { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.story-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; } }

.stat-row { display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap; }
.stat-num { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 12.5px; color: var(--muted); }

.chart-box { position: relative; height: 220px; }
.chart-tall { height: 320px; }

/* ── Badges ─────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  vertical-align: middle;
  border: 1px solid transparent;
}
.badge-verified { background: var(--green-soft); color: var(--green); border-color: #abefc6; }
.badge-estimate { background: var(--amber-soft); color: var(--amber); border-color: #fedf89; }
.badge-guess    { background: var(--red-soft);   color: var(--red);   border-color: #fecdca; }
.badge-click { cursor: pointer; user-select: none; }

/* ── Option cards ───────────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .options-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .options-grid { grid-template-columns: 1fr; } }

.option {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.option.winner { border: 2px solid var(--accent); }
.option .opt-flag {
  position: absolute; top: -10px; right: 12px;
  background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 9px; border-radius: 999px;
  text-transform: uppercase;
}
.opt-name { font-weight: 700; font-size: 14.5px; }
.opt-price { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.opt-price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.opt-meta { font-size: 12.5px; color: var(--muted); }
.opt-meta div { margin-bottom: 3px; }
.opt-meta b { color: var(--ink); font-weight: 600; }
.opt-savings { font-size: 12.5px; font-weight: 600; color: var(--green); }
.opt-savings.neg { color: var(--red); }

/* ── Assumptions ────────────────────────────── */
.assumptions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 860px) { .assumptions-grid { grid-template-columns: 1fr; } }

.agroup {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.agroup-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}
.arow { padding: 10px 0; border-top: 1px solid var(--line); }
.arow:first-of-type { border-top: none; padding-top: 0; }
.arow-top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-bottom: 6px;
}
.arow-label { font-size: 13.5px; font-weight: 600; }
.arow-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 14px;
  white-space: nowrap;
}
.arow-value input {
  width: 86px; text-align: right;
  font: inherit; font-weight: 700;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; padding: 1px 4px;
}
.arow-value input:hover { border-color: var(--line); background: var(--bg); }
.arow-value input:focus { border-color: var(--accent); background: #fff; outline: none; }
.arow-value .unit { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.arow input[type="range"] {
  width: 100%; margin: 2px 0 6px;
  accent-color: var(--accent);
}
.arow-note { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ── Decision tree ──────────────────────────── */
.tree { display: flex; flex-direction: column; gap: 0; max-width: 720px; }
.tree-step {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  font-size: 14px;
}
.tree-green { background: var(--green-soft); border-color: #abefc6; }
.tree-amber { background: var(--amber-soft); border-color: #fedf89; }
.tree-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: var(--ink); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.tree-arrow {
  color: var(--muted); font-size: 13px;
  padding: 6px 0 6px 30px;
}

/* ── Items (questions / actions) ────────────── */
.items-list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}
.item.done { opacity: 0.55; }
.item.done .item-text { text-decoration: line-through; }
.item-status {
  flex-shrink: 0; cursor: pointer; user-select: none;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  min-width: 92px; text-align: center;
  margin-top: 1px;
}
.status-open        { background: var(--red-soft);   color: var(--red);   border-color: #fecdca; }
.status-in_progress { background: var(--amber-soft); color: var(--amber); border-color: #fedf89; }
.status-done        { background: var(--green-soft); color: var(--green); border-color: #abefc6; }
.item-text { flex: 1; }
.item-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.item-owner {
  flex-shrink: 0;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 999px;
  margin-top: 2px;
}

/* ── Regulatory ─────────────────────────────── */
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .reg-grid { grid-template-columns: 1fr; } }
.reg-grid ul { margin: 0; padding-left: 18px; }
.reg-grid li { margin-bottom: 9px; font-size: 13.5px; }

/* ── RFQ details ────────────────────────────── */
.rfq {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
}
.rfq summary { cursor: pointer; font-weight: 600; }
.rfq ul { margin: 12px 0 4px; padding-left: 18px; }
.rfq li { margin-bottom: 6px; font-size: 13.5px; }

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 48px;
  font-size: 12.5px;
  color: var(--muted);
}
