:root {
  --ink: #14233a; --muted: #5b6b80; --line: #dde3ea; --bg: #f5f7fa; --card: #fff;
  --navy: #1d3a5f; --teal: #1f8a70; --amber: #d98e04; --red: #b8402f; --blue: #3c78b4;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.demo-bar { background: var(--amber); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 16px; }
header { padding: 28px 16px 8px; }
.brand { font-weight: 800; letter-spacing: .5px; color: var(--navy); }
h1 { font-size: 30px; line-height: 1.2; margin: 10px 0 8px; }
h2 { font-size: 20px; margin: 0 0 4px; }
h3 { font-size: 15px; margin: 0 0 6px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.lede { color: var(--muted); margin: 0 0 12px; }
.muted { color: var(--muted); margin: 4px 0 12px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 20px 60px; margin: 14px 0; }
#results .card { padding-left: 20px; }
.step { position: absolute; left: 18px; top: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; text-align: center; line-height: 28px; font-size: 14px; }
label { display: block; font-weight: 600; font-size: 14px; }
.label { font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.row { display: flex; gap: 8px; margin-top: 6px; }
input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; min-width: 0; }
input:focus { outline: 2px solid var(--blue); border-color: transparent; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 10px 16px; background: var(--navy); color: #fff; cursor: pointer; white-space: nowrap; }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: #e8edf3; color: var(--ink); }
.chips { margin-top: 10px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { background: #e8edf3; color: var(--ink); padding: 4px 10px; font-size: 13px; font-weight: 500; border-radius: 999px; }
.status { margin-top: 12px; font-size: 14px; color: var(--muted); }
.status.err { color: var(--red); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.facts label { font-size: 12px; color: var(--muted); }
.facts input { margin-top: 4px; font-weight: 600; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: #fff; color: var(--ink); border-radius: 0; font-weight: 500; }
.seg button.on { background: var(--navy); color: #fff; }
.source { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.covA { display: flex; gap: 12px; align-items: center; }
.covA input[type=range] { flex: 1; padding: 0; border: 0; }
.covA #coverageA { width: 160px; font-weight: 700; }
.verdict { border-left: 6px solid var(--teal); }
.verdict.no { border-left-color: var(--amber); }
.verdict h2 { margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .card { margin: 0; }
.big { font-size: 32px; font-weight: 800; color: var(--navy); }
table.mini { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
table.mini td { padding: 3px 0; border-bottom: 1px solid var(--line); }
table.mini td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.scen { margin: 14px 0; }
.scen-h { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.bar { display: flex; height: 34px; border-radius: 6px; overflow: hidden; background: #eef1f5; }
.bar div { color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; }
.s1 { background: var(--blue); } .s2 { background: var(--teal); } .s3 { background: var(--red); }
.legend { font-size: 13px; color: var(--muted); margin-top: 4px; }
.key { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.k { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.k1 { background: var(--blue); } .k2 { background: var(--teal); } .k3 { background: var(--red); }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cta p { margin: 0; }
footer { font-size: 12px; color: var(--muted); padding: 12px 16px 40px; }
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .card { padding-left: 20px; padding-top: 56px; }
  #results .card { padding-top: 20px; }
  .step { top: 16px; left: 20px; }
  .row, .cta { flex-direction: column; align-items: stretch; }
  .covA { flex-direction: column; align-items: stretch; }
  .covA #coverageA { width: 100%; }
}
