:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe4ef;
  --surface: #ffffff;
  --backdrop: #f4f7fb;
  --primary: #2457d6;
  --primary-soft: #e9efff;
  --success: #177548;
  --danger: #b42318;
  --blocked: #8a4b08;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--backdrop); }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.4rem max(1.2rem, calc((100vw - 1120px) / 2)); color: white; background: linear-gradient(125deg, #112a67, #2457d6 58%, #1597a8); }
.hero h1 { margin: .2rem 0 .5rem; font-size: clamp(1.8rem, 4vw, 3rem); }
.hero p { margin: 0; max-width: 720px; }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.primary-link { flex: none; padding: .8rem 1rem; border-radius: .7rem; color: #112a67; background: white; font-weight: 800; text-decoration: none; }
main { width: min(1120px, calc(100% - 2rem)); margin: 1.4rem auto 4rem; }
.card { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: 0 4px 18px rgba(36, 53, 83, .06); }
.instructions, .identity, .progress { margin-bottom: 1rem; padding: 1.2rem; }
.instructions h2 { margin-top: 0; }
.instructions li { margin: .45rem 0; line-height: 1.5; }
.warning { margin-top: 1rem; padding: .8rem 1rem; border: 1px solid #f2c278; border-radius: .7rem; color: #75420a; background: #fff8e8; font-weight: 700; }
.identity { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 1rem; align-items: end; }
label { display: grid; gap: .4rem; font-size: .82rem; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid #b9c7d8; border-radius: .65rem; padding: .72rem .8rem; color: var(--ink); background: white; font: inherit; }
textarea { resize: vertical; }
.account { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 49px; padding: .65rem .8rem; border-radius: .7rem; background: #f7f9fc; font-size: .85rem; }
.tier { padding: .25rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 900; }
.tier.free { color: #475569; background: #e2e8f0; }
.tier.premium { color: #6d3a00; background: #ffe1a8; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.progress-label { display: flex; justify-content: space-between; }
.progress-track { height: .65rem; margin: .7rem 0; overflow: hidden; border-radius: 999px; background: #e7edf5; }
#progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #2457d6, #16a3b6); transition: width .2s ease; }
.status-counts { color: var(--muted); font-size: .85rem; }
.cases { display: grid; gap: 1rem; }
.case { padding: 1.2rem; border-left: 5px solid #cbd5e1; }
.case[data-status="PASS"] { border-left-color: var(--success); }
.case[data-status="FAIL"] { border-left-color: var(--danger); }
.case[data-status="BLOCKED"] { border-left-color: var(--blocked); }
.case-head { display: flex; justify-content: space-between; gap: 1rem; }
.case h3 { margin: .15rem 0 .45rem; font-size: 1.18rem; }
.case-meta { margin: 0; color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.goal { margin: 0; color: #3f4d63; }
.dimension { align-self: flex-start; max-width: 220px; padding: .35rem .55rem; border-radius: .55rem; color: #244581; background: var(--primary-soft); font-size: .72rem; font-weight: 800; text-align: right; }
.helper { margin: .85rem 0; padding: .8rem .9rem; border: 1px solid #b9d5ff; border-radius: .7rem; color: #1d4379; background: #eef6ff; line-height: 1.5; }
details { margin: 1rem 0; padding: .85rem; border-radius: .7rem; background: #f7f9fc; }
summary { cursor: pointer; font-weight: 800; }
.steps { line-height: 1.5; }
.expected { padding: .75rem; border-left: 3px solid #16a3b6; background: white; }
.expected p { margin: .3rem 0 0; }
.result-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
button { border: 1px solid #b9c7d8; border-radius: .6rem; padding: .62rem .85rem; color: var(--ink); background: white; font-weight: 800; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
button[data-status="PASS"].selected { color: white; border-color: var(--success); background: var(--success); }
button[data-status="FAIL"].selected { color: white; border-color: var(--danger); background: var(--danger); }
button[data-status="BLOCKED"].selected { color: white; border-color: var(--blocked); background: var(--blocked); }
.issue-row { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; padding: .8rem; border-radius: .7rem; background: #fff1f0; }
.issue-button { color: white; border-color: var(--danger); background: var(--danger); }
.issue-result { display: grid; gap: .2rem; }
.issue-result small { color: #7a3b35; }
.save-state { min-height: 1.2rem; margin: .5rem 0 0; color: var(--muted); font-size: .8rem; }
.fatal { padding: 2rem; }

@media (max-width: 800px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .identity { grid-template-columns: 1fr; }
  .account { align-items: flex-start; flex-direction: column; }
  .case-head { flex-direction: column; }
  .dimension { max-width: none; text-align: left; }
}
