:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #1f2430;
  --ink-2: #5b6170;
  --ink-3: #8a8f9c;
  --line: #e7e3da;
  --brand: #2f5d50;
  --brand-ink: #ffffff;
  --brand-soft: #e5efe9;
  --v: #3b6fd8; --v-soft: #e6eefc;
  --a: #c98a12; --a-soft: #fbf1dc;
  --k: #2f8f5b; --k-soft: #e1f3e8;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 33, .04), 0 6px 24px rgba(20, 24, 33, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; }
.wrap.wide { max-width: 1180px; }

/* Header */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.brand .dot { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.hero { margin: 28px 0 24px; }
.hero .eyebrow { font-size: 13px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; }
.hero h1 { font-size: clamp(28px, 5vw, 38px); margin-top: 6px; }
.hero p { color: var(--ink-2); margin-top: 10px; max-width: 60ch; }

/* Progress */
.progress { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: 12px 0; margin: 0 0 8px; }
.steps { display: flex; gap: 8px; }
.steps .s { flex: 1; }
.steps .bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.steps .bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }
.steps .lbl { font-size: 12px; color: var(--ink-3); margin-top: 6px; font-weight: 600; }
.steps .s.on .lbl { color: var(--ink); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 20px; }
.card .sub { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.note { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink-2); font-size: 14px; margin-top: 16px; }

/* Fields */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
label.f { display: block; font-size: 14px; font-weight: 600; }
label.f span.opt { color: var(--ink-3); font-weight: 500; }
.input, textarea.input {
  width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea.input { resize: vertical; min-height: 84px; }

/* Questions */
.q { padding: 22px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 8px; }
.q .qt { font-weight: 600; display: flex; gap: 10px; }
.q .qn { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.q.missing .qn { background: #fde7e5; color: var(--danger); }
.q .hint { font-size: 13px; color: var(--ink-3); margin: 4px 0 0 38px; }
.opts { display: grid; gap: 8px; margin: 12px 0 0 38px; }
@media (max-width: 560px) { .opts, .q .hint { margin-left: 0; } }
.opt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: #cfd6d2; background: var(--surface-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .mk { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #c9cdd4; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: lowercase; margin-top: 1px; }
.opt.check .mk { border-radius: 6px; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt:has(input:checked) .mk { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--brand-soft); }
.opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.opts.row { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .opts.row { grid-template-columns: 1fr; } }

/* Buttons */
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.btn { border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 600; cursor: pointer; transition: transform .05s, background .15s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #264d42; }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid #f0c9c6; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.sm { padding: 8px 12px; font-size: 14px; }
.err { color: var(--danger); font-size: 14px; font-weight: 500; }

/* Result */
.result-head { text-align: center; padding: 12px 0 4px; }
.result-head .eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.result-head h2 { font-size: clamp(26px, 5vw, 34px); margin-top: 6px; }
.result-head p { color: var(--ink-2); margin-top: 8px; }
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 560px) { .scores { gap: 8px; } }
.sc { border-radius: 12px; padding: 16px; text-align: center; border: 1px solid var(--line); background: var(--surface-2); }
.sc .l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sc .n { font-size: 34px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.sc .of { font-size: 13px; color: var(--ink-3); }
.sc .meter { height: 6px; border-radius: 99px; background: var(--line); margin-top: 10px; overflow: hidden; }
.sc .meter i { display: block; height: 100%; }
.sc.V .n { color: var(--v); } .sc.V .meter i { background: var(--v); } .sc.V.hl { background: var(--v-soft); border-color: transparent; }
.sc.A .n { color: var(--a); } .sc.A .meter i { background: var(--a); } .sc.A.hl { background: var(--a-soft); border-color: transparent; }
.sc.K .n { color: var(--k); } .sc.K .meter i { background: var(--k); } .sc.K.hl { background: var(--k-soft); border-color: transparent; }
.styles-list { display: grid; gap: 10px; margin-top: 20px; }
.style-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 10px; border: 1px solid var(--line); }
.style-row b { display: block; }
.style-row p { color: var(--ink-2); font-size: 14px; }
.badge { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; color: #fff; }
.badge.V { background: var(--v); } .badge.A { background: var(--a); } .badge.K { background: var(--k); }
.style-row.dim { opacity: .55; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.V { background: var(--v-soft); color: var(--v); }
.pill.A { background: var(--a-soft); color: #8f6209; }
.pill.K { background: var(--k-soft); color: var(--k); }
.pill.M { background: #ece9f7; color: #5b4bb3; }
.pill.B { background: #eceef1; color: #4a5160; }

.hidden { display: none !important; }
.footer { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 32px; }
