:root {
  --navy: #0E2A47;
  --navy-2: #163a5f;
  --gold: #F2B705;
  --gold-soft: #fff4cc;
  --ink: #13202e;
  --muted: #5b6878;
  --line: #dde3ea;
  --bg: #f5f7fa;
  --card: #ffffff;
  --good: #1f7a4d;
  --mid: #b7791f;
  --bad: #b42318;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--navy); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
main { outline: none; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: var(--navy); padding: 14px 16px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark { color: #fff; font-weight: 800; font-size: 22px; letter-spacing: 0.06em; }
.brand-sub { color: var(--gold); font-weight: 700; font-size: 15px; }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 28px 0 40px; }
.hero h1 { font-size: clamp(28px, 7vw, 40px); line-height: 1.15; margin: 0 0 12px; }
.hero h1 span { color: var(--gold); }
.hero p { color: #d6e0ea; margin: 0 0 22px; max-width: 34em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.chips li { background: var(--navy-2); border: 1px solid #2c4f74; color: #e7eef5; border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.meta { font-size: 14px; color: #b8c6d4; margin-top: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 12px; border: 2px solid transparent;
  font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none; text-align: center;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #ffc61a; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-wa { background: #1f8f4e; color: #fff; }
.btn-wa:hover { background: #187a42; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Quiz */
.step { padding-top: 20px; padding-bottom: 32px; }
.progress { margin: 4px 0 18px; }
.progress-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .3s; }
.section-title { font-size: 26px; margin: 0 0 4px; color: var(--navy); }
.section-intro { color: var(--muted); margin: 0 0 18px; }

.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.q legend { font-weight: 700; padding: 0; margin-bottom: 4px; float: left; width: 100%; }
.q .help { clear: both; color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.options { clear: both; display: grid; gap: 8px; padding-top: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt label {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px;
  cursor: pointer; background: #fff;
}
.opt label::before {
  content: ""; flex: 0 0 20px; height: 20px; border-radius: 50%; border: 2px solid #9aa7b5; background: #fff;
}
.opt input:checked + label { border-color: var(--navy); background: #eef3f8; font-weight: 600; }
.opt input:checked + label::before { border: 6px solid var(--navy); }
.opt input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

/* One question per screen */
.qtext { font-size: clamp(22px, 5.6vw, 28px); line-height: 1.25; color: var(--navy); margin: 8px 0 8px; }
.help { color: var(--muted); font-size: 15px; margin: 0 0 4px; }
.choices { display: grid; gap: 10px; margin: 18px 0 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 56px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-size: 17px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.choice::before {
  content: ""; flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid #9aa7b5; background: #fff;
}
.choice:hover { border-color: #9aa7b5; }
.choice[aria-pressed="true"] { border-color: var(--navy); background: #eef3f8; font-weight: 600; }
.choice[aria-pressed="true"]::before { border: 7px solid var(--navy); }

.alt { font-size: 15px; color: #c9d6e3; margin: 18px 0 0; }
.linkbtn {
  background: none; border: 0; padding: 4px 0; color: var(--gold); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px;
}
.deepen { border: 2px solid var(--navy); }
.deepen p { color: var(--muted); margin: 0 0 14px; }
.report-head + .wrap .section-title { font-size: 22px; margin: 0 0 12px; }

.nav { display: flex; gap: 10px; margin-top: 18px; }
.nav .btn { flex: 1; }
.nav .btn-ghost { flex: 0 0 auto; }
.hint { color: var(--muted); font-size: 14px; text-align: center; margin-top: 10px; min-height: 1.5em; }

/* Score */
.score-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: center; margin: 20px 0 16px; }
.ring { width: 170px; height: 170px; margin: 0 auto 8px; display: block; }
.ring-track { stroke: var(--line); }
.ring-value { transition: stroke-dashoffset 1s ease-out; }
.ring-text { font: 800 44px var(--font); fill: var(--navy); }
.ring-sub { font: 600 14px var(--font); fill: var(--muted); }
.band { display: inline-block; font-weight: 800; font-size: 19px; padding: 4px 14px; border-radius: 999px; margin: 4px 0 8px; }
.band.good { background: #e3f4ea; color: var(--good); }
.band.mid { background: #fdf0d9; color: var(--mid); }
.band.bad { background: #fde8e6; color: var(--bad); }
.band-note { color: var(--muted); margin: 0; }

.areas { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; }
.areas h2, .card h2 { font-size: 19px; margin: 0 0 12px; color: var(--navy); }
.area { margin: 0 0 12px; }
.area:last-child { margin: 0; }
.area-head { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.area .bar { height: 10px; }
.area .bar > span.good { background: var(--good); }
.area .bar > span.mid { background: var(--mid); }
.area .bar > span.bad { background: var(--bad); }

/* Unlock form */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; }
.unlock { border: 2px solid var(--gold); background: #fffdf5; }
.unlock p { margin: 0 0 14px; color: var(--muted); }
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input[type=text], .field input[type=tel], .field select {
  width: 100%; min-height: 50px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.field .err { color: var(--bad); font-size: 14px; margin-top: 4px; min-height: 0; }
.field.invalid input, .field.invalid select { border-color: var(--bad); }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 400 !important; margin: 4px 0 0; }
.field.invalid .check { color: var(--bad); }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 22px; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* Report */
.report-head { background: var(--navy); color: #fff; padding: 22px 0; }
.report-head h1 { margin: 0 0 4px; font-size: 26px; }
.report-head p { margin: 0; color: #c9d6e3; }
.report-score { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.report-score .num { font-size: 46px; font-weight: 800; color: var(--gold); line-height: 1; }
.fix { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 14px; }
.fix-num { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--mid); text-transform: uppercase; }
.fix h3 { margin: 2px 0 8px; font-size: 19px; color: var(--navy); }
.fix ol { margin: 0; padding-left: 20px; }
.fix li { margin: 0 0 6px; }
.others { margin: 0; padding-left: 20px; }
.others li { margin: 0 0 4px; }
.actions { display: grid; gap: 10px; margin: 18px 0 8px; }
.cta { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 20px 18px; margin: 8px 0 16px; }
.cta h2 { color: #fff; margin: 0 0 6px; font-size: 21px; }
.cta p { color: #d6e0ea; margin: 0 0 14px; }

.footer { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 16px 36px; border-top: 1px solid var(--line); margin-top: 24px; }
.footer p { margin: 4px 0; }

@media (min-width: 640px) {
  .options.inline { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .topbar, .footer, .actions, .cta, .no-print { display: none !important; }
  body { background: #fff; font-size: 13px; }
  .report-head { background: #fff; color: var(--ink); border-bottom: 3px solid var(--navy); }
  .report-head p { color: var(--muted); }
  .report-score .num { color: var(--navy); }
  .fix, .card, .areas { break-inside: avoid; }
}
