:root {
  --bg: #fafbfc; --surface: #ffffff; --text: #1a1a1a; --muted: #5f6368; --border: #e1e4e8;
  --primary: #94c4fb; --ink: #1a1a1a; --ink-text: #ffffff; --orange: #ff823e; --blue: #5b9eff; --grey: #616161;
  --good: #137a3a; --good-bg: #e3f5e9; --ok: #1f4aa8; --ok-bg: #e7eefc; --warn: #8a5a00; --warn-bg: #fdf1d6;
  --bad: #b3261e; --bad-bg: #fde8e7; --none-bg: #eceef1;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --surface: #161b22; --text: #e6edf3; --muted: #9aa4b0; --border: #30363d;
    --primary: #b8d9ff; --ink: #e6edf3; --ink-text: #0d1117; --orange: #ffa860;
    --good: #8fd6a4; --good-bg: #16301f; --ok: #a9c1ff; --ok-bg: #172444; --warn: #f0c965; --warn-bg: #36290b;
    --bad: #ff9c97; --bad-bg: #3a1716; --none-bg: #262a31;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117; --surface: #161b22; --text: #e6edf3; --muted: #9aa4b0; --border: #30363d;
  --primary: #b8d9ff; --ink: #e6edf3; --ink-text: #0d1117; --orange: #ffa860;
  --good: #8fd6a4; --good-bg: #16301f; --ok: #a9c1ff; --ok-bg: #172444; --warn: #f0c965; --warn-bg: #36290b;
  --bad: #ff9c97; --bad-bg: #3a1716; --none-bg: #262a31;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; overflow-wrap: anywhere; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: inherit; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.top { border-bottom: 1px solid var(--border); background: var(--surface); padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.bars { display: inline-flex; gap: 5px; transform: skewX(-15deg); }
.bars i { width: 4px; height: 22px; border-radius: 1px; background: var(--blue); }
.bars i:nth-child(2) { background: var(--grey); }
.bars i:nth-child(3) { background: var(--orange); }
.tag { font-size: 0.8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--primary); color: #10243d; }
.top .print { margin-left: auto; }

.hero { padding: 48px 0 24px; max-width: 680px; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 0 0 20px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
.hint { font-weight: 400; color: var(--muted); }
input, textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
input:focus, textarea:focus { border-color: var(--blue); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
.ts { margin: 16px 0 4px; min-height: 65px; }
button, .button {
  display: inline-block; font: inherit; font-weight: 700; padding: 12px 22px; border-radius: 10px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--ink); background: var(--ink); color: var(--ink-text); margin-top: 12px;
}
button:disabled { opacity: 0.6; cursor: progress; }
button.ghost { background: transparent; color: var(--text); border-color: var(--border); margin: 0; padding: 8px 14px; font-weight: 600; }
button.link { background: none; border: 0; padding: 0; margin: 0; color: inherit; text-decoration: underline; font-weight: 600; }
.fine { font-size: 0.85rem; color: var(--muted); margin: 14px 0 0; }
.notice { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 10px; margin: 14px 0 0; }
.two { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }

.progress ol { list-style: none; padding: 0; margin: 12px 0; }
.progress li { padding: 6px 0 6px 30px; position: relative; color: var(--muted); }
.progress li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); }
.progress li.now { color: var(--text); font-weight: 600; }
.progress li.now::before { border-color: var(--blue); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.progress li.done { color: var(--text); }
.progress li.done::before { background: var(--good); border-color: var(--good); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .progress li.now::before { animation: none; border-top-color: var(--blue); } }

.result-head { margin: 8px 0 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.fit { border-radius: var(--radius); padding: 20px 24px; margin: 0 0 20px; background: var(--ok-bg); color: var(--ok); }
.fit .eyebrow { color: inherit; opacity: 0.8; }
.fit p { margin: 0 0 6px; }
.fit-label { font-size: 1.8rem; font-weight: 800; line-height: 1.2; }
.fit-simple { background: var(--good-bg); color: var(--good); }
.fit-red-flag { background: var(--warn-bg); color: var(--warn); }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); margin-bottom: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; break-inside: avoid; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head h3 { margin: 0; }
.grade { flex: none; display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; font-weight: 800; font-size: 1.25rem; background: var(--none-bg); }
.g-A { background: var(--good-bg); color: var(--good); }
.g-B { background: var(--ok-bg); color: var(--ok); }
.g-C { background: var(--warn-bg); color: var(--warn); }
.g-D, .g-F { background: var(--bad-bg); color: var(--bad); }
.findings { list-style: none; padding: 0; margin: 12px 0 0; font-size: 0.93rem; }
.findings li { position: relative; padding-left: 18px; margin: 6px 0; }
.findings li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.findings li.level-high::before { background: var(--bad); }
.findings li.level-medium::before { background: var(--orange); }
.findings li.level-good::before { background: var(--good); }
.fit .findings li::before { background: currentColor; opacity: 0.6; }
.more { font-size: 0.85rem; font-weight: 600; margin: 10px 0 0; }
.about { font-size: 0.82rem; color: var(--muted); margin: 12px 0 0; border-top: 1px solid var(--border); padding-top: 10px; }
.sent { margin-top: 8px; }
.sent p { margin: 0 0 4px; }
.cta { border-color: var(--primary); border-width: 2px; }
.cta .button { margin-top: 4px; }

.qualify-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 14px; margin: 0 0 20px; }
.qualify-line .close { margin: 0 0 0 auto; padding: 0 8px; background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { background: var(--surface); color: var(--text); border: 1px solid var(--border); margin: 0; }
.choice[aria-pressed="true"] { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.pitch { font-weight: 700; margin: 18px 0 0; }

.foot { color: var(--muted); font-size: 0.85rem; padding-top: 12px; padding-bottom: 32px; }
@media print {
  .top .print, .no-print, .foot { display: none !important; }
  body { background: #fff; }
  .card, .fit, .grade, .findings li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
