:root {
  --navy: #1E3A5F; --deep: #0F172A; --teal: #0891B2; --ice: #0EA5E9; --green: #10B981; --amber: #F59E0B; --red: #EF4444;
  --frost: #E0F2FE; --snow: #F8FAFC; --ink: #111827; --muted: #4B5563; --line: #E5E7EB; --card: #FFFFFF;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--snow); line-height: 1.55; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--deep); color: #fff; }
.top-in { height: 56px; display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.logo svg { width: 26px; height: 26px; }
.logo em { font-style: normal; color: var(--ice); font-weight: 600; }

.hero { padding: 40px 16px 8px; }
.kicker { color: var(--teal); font-weight: 600; font-size: 14px; letter-spacing: .02em; margin: 0 0 8px; text-transform: uppercase; }
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; margin: 0 0 14px; color: var(--deep); letter-spacing: -.02em; }
h1 span { color: var(--teal); }
.lede { font-size: 17px; color: var(--muted); max-width: 680px; margin: 0 0 24px; }
h2 { color: var(--deep); font-size: 22px; margin: 0 0 10px; letter-spacing: -.01em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--deep); }
.opt { font-weight: 400; color: var(--muted); }
input { font: inherit; font-weight: 400; padding: 12px 13px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus { outline: 3px solid rgba(14,165,233,.25); border-color: var(--ice); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
button { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 14px 20px; background: var(--teal); color: #fff; cursor: pointer; margin-top: 16px; width: 100%; font-size: 17px; }
button:hover { background: #0E7490; }
button:disabled { opacity: .6; cursor: wait; }
.fine { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.err { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; padding: 12px 14px; border-radius: 10px; margin-top: 14px; }

.loading { text-align: center; margin-top: 24px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--frost); border-top-color: var(--teal); border-radius: 50%; margin: 6px auto 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { text-align: left; display: inline-block; margin: 6px auto 0; padding-left: 20px; color: var(--muted); }
.steps li { margin: 6px 0; }
.steps li.done { color: var(--green); }
.steps li.now { color: var(--deep); font-weight: 600; }

#results { margin-top: 24px; }
.score { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c, var(--teal)) calc(var(--p) * 1%), var(--frost) 0); }
.ring > div { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.ring b { font-size: 26px; color: var(--deep); line-height: 1; }
.ring small { display: block; font-size: 12px; color: var(--muted); }
.score-text { flex: 1; min-width: 220px; }
.verdict { font-size: 20px; font-weight: 700; margin: 0 0 6px; color: var(--deep); }
.section { margin-top: 18px; }
.qa { border-top: 1px solid var(--line); padding: 14px 0; }
.qa:first-of-type { border-top: 0; }
.q { font-weight: 600; color: var(--deep); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.yes { background: #D1FAE5; color: #065F46; }
.no { background: #FEE2E2; color: #991B1B; }
.names { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
details { margin-top: 6px; font-size: 14px; }
details summary { cursor: pointer; color: var(--teal); font-weight: 600; }
details p { white-space: pre-wrap; color: var(--muted); background: var(--snow); border-radius: 8px; padding: 10px; }
.list { list-style: none; padding: 0; margin: 8px 0 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.list li:first-child { border-top: 0; }
.count { color: var(--muted); white-space: nowrap; font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.tips { margin: 8px 0 0; padding-left: 20px; }
.tips li { margin: 6px 0; }

.join { margin-top: 18px; border: 2px solid var(--ice); background: linear-gradient(180deg, #F0F9FF, #fff); }
.join-form { display: flex; gap: 10px; margin-top: 8px; }
.join-form input { flex: 1; }
.join-form button { width: auto; margin-top: 0; white-space: nowrap; }

.how { margin-top: 40px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how-grid div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.how-grid p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.foot { padding: 30px 16px 40px; color: var(--muted); font-size: 13px; }
.foot a { color: var(--teal); }

@media (max-width: 640px) {
  .grid, .two, .how-grid { grid-template-columns: 1fr; }
  .join-form { flex-direction: column; }
  .join-form button { width: 100%; }
  .hero { padding-top: 28px; }
}
