:root {
  --ink: #10202e; --paper: #f4f6f8; --surface: #ffffff; --line: #d6dde5; --muted: #5d6b7c;
  --go: #0a7b5c; --go-soft: #e3f4ee; --warn: #9a5a06; --warn-soft: #fbf0dc; --bad: #a23a2e; --bad-soft: #fae9e6; --focus: #1b4fd8;
  --gA: #0a7b5c; --gB: #2f7d9a; --gC: #b07a1c; --gU: #7a808b;
  --radius: 10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e9eef4; --paper: #0e1620; --surface: #15202c; --line: #2a3a4a; --muted: #9db0c3; --go: #4fc79f; --go-soft: #12332a; --warn: #e3ae5c; --warn-soft: #34290f; --bad: #f08d80; --bad-soft: #3a1b17; --focus: #7ea2ff;
    --gA: #4fc79f; --gB: #6bb7d4; --gC: #e3ae5c; --gU: #9aa3af; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.boot { padding: 40px 20px; color: var(--muted); }
main, header.top, footer.foot { max-width: 600px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
header.top { padding-top: max(14px, env(safe-area-inset-top)); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--display); font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.where { color: var(--muted); font-size: .9rem; }
.where button { color: var(--muted); }
nav.steps { max-width: 600px; margin: 10px auto 0; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
nav.steps button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 9px 11px; min-height: 44px; font: inherit; color: var(--muted); cursor: pointer; white-space: nowrap; }
nav.steps button[aria-current="step"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
nav.steps button:disabled { opacity: .45; cursor: default; }
main { padding-top: 22px; padding-bottom: 40px; }
h1 { font-family: var(--display); font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; margin: 6px 0 12px; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
h3 { font-size: 1rem; margin: 0 0 4px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.btn { background: var(--ink); color: var(--paper); border: 0; border-radius: var(--radius); padding: 12px 18px; font-weight: 600; min-height: 46px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; cursor: pointer; }
label { display: block; font-weight: 600; margin: 14px 0 4px; }
input[type=text], input[type=search], input[type=number], input[type=email], select, textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; min-height: 46px; }
textarea { min-height: 90px; }
.row { display: flex; gap: 10px; align-items: center; } .row > * { flex: 1; } .row > .fit { flex: 0 0 auto; }
.list { list-style: none; margin: 8px 0; padding: 0; border-top: 1px solid var(--line); }
.list > li { border-bottom: 1px solid var(--line); padding: 12px 0; }
.item { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.item .name { font-weight: 600; } .item .sub { color: var(--muted); font-size: .875rem; }
.toggle { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 14px; min-height: 44px; font-weight: 600; min-width: 84px; }
.toggle[aria-pressed="true"] { background: var(--go); border-color: var(--go); color: #fff; }
details { margin-top: 6px; } summary { cursor: pointer; color: var(--muted); font-size: .9rem; min-height: 44px; display: flex; align-items: center; }
.pick { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; }
.pick b { display: block; font-size: 1.05rem; } .pick span { color: var(--muted); font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 14px; min-height: 44px; font-size: .95rem; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { background: var(--surface); border: 0; padding: 10px 16px; } .seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
/* result: the one memorable piece is the evidence meter */
.best { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 12px; }
.best .label { color: var(--go); font-weight: 700; font-size: .9rem; }
.best .cardname { font-size: 1.25rem; font-weight: 700; margin: 2px 0 0; }
.value { font-family: var(--display); font-size: 3rem; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; margin: 6px 0 2px; }
.meter { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 8px; }
.meter i { width: 18px; height: 8px; border-radius: 2px; background: var(--line); }
.meter.gA i.on { background: var(--gA); } .meter.gB i.on { background: var(--gB); } .meter.gC i.on { background: var(--gC); } .meter.gU i.on { background: var(--gU); }
.grade { display: flex; align-items: center; margin: 10px 0 4px; font-size: .9rem; }
.grade b { margin-right: 6px; }
.why { margin: 12px 0 0; padding: 0; list-style: none; } .why li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.note { border-left: 4px solid var(--warn); background: var(--warn-soft); padding: 8px 12px; margin: 8px 0; border-radius: 0 var(--radius) var(--radius) 0; font-size: .9rem; }
.note.bad { border-color: var(--bad); background: var(--bad-soft); } .note.go { border-color: var(--go); background: var(--go-soft); }
.scenario { border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; font-size: .92rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.others .item { align-items: flex-start; } .amt { font-family: var(--display); font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.toast { pointer-events: none; position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: .9rem; z-index: 20; max-width: 90vw; }
footer.foot { color: var(--muted); font-size: .8rem; padding-bottom: max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); padding-top: 14px; }
.grades { margin: 14px 0; } .grades div { display: flex; align-items: center; padding: 6px 0; font-size: .92rem; }
.hint { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
