:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.975 0.006 235);
  --surface-strong: oklch(0.94 0.018 235);
  --ink: oklch(0.22 0.035 248);
  --muted: oklch(0.46 0.025 245);
  --line: oklch(0.88 0.018 235);
  --primary: oklch(0.47 0.145 248);
  --primary-dark: oklch(0.37 0.13 250);
  --bright: oklch(0.62 0.145 225);
  --accent: oklch(0.72 0.19 142);
  --success: oklch(0.55 0.14 150);
  --warning: oklch(0.70 0.15 75);
  --error: oklch(0.55 0.19 28);
  --shadow: 0 6px 8px oklch(0.22 0.035 248 / 0.08);
  --radius: 14px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; background: var(--ink); color: white; padding: .75rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: auto; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.brand img { display: block; width: 136px; height: 58px; object-fit: contain; object-position: left center; }
.topbar-meta { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .9rem; font-weight: 600; }
.privacy-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px oklch(0.9 0.06 150); }

main { max-width: 1180px; margin: auto; padding: 0 24px 72px; }
.intro { min-height: calc(100vh - 160px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; padding: clamp(4rem, 10vw, 8rem) 0; }
.campaign-label { margin: 0 0 1rem; color: var(--primary); font-weight: 750; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 12ch; margin: 0 0 1.5rem; font-size: clamp(2.8rem, 7vw, 5.5rem); line-height: .98; letter-spacing: -.035em; text-wrap: balance; }
.intro-copy { max-width: 62ch; color: var(--muted); font-size: 1.14rem; line-height: 1.7; margin: 0 0 2rem; }
.exam-facts { background: var(--primary); color: white; padding: 1.3rem 1.6rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.exam-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; border-bottom: 1px solid oklch(1 0 0 / .22); }
.exam-facts div:last-child { border-bottom: 0; }
.exam-facts strong { font-size: 2.2rem; font-variant-numeric: tabular-nums; }
.exam-facts span { color: oklch(0.92 0.025 235); font-weight: 650; }

.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: .8rem 1.15rem; font-weight: 750; text-decoration: none; transition: background-color .18s ease-out, transform .18s ease-out; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, .text-button:focus-visible, input:focus-visible, .choice input:focus-visible + span { outline: 3px solid oklch(0.74 0.13 225); outline-offset: 3px; }
.button-primary { background: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { background: var(--surface-strong); color: var(--ink); }
.button-accent { width: 100%; background: var(--accent); color: oklch(0.18 0.03 145); }
.text-button { border: 0; padding: .5rem; background: transparent; color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.workspace { padding-top: 2rem; }
.progress-shell { display: grid; grid-template-columns: minmax(240px, .45fr) 1fr; gap: 1.5rem; align-items: center; padding: 1rem 0 1.5rem; }
.progress-copy { display: flex; flex-direction: column; gap: .3rem; }
.progress-copy span { color: var(--muted); font-size: .9rem; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: var(--surface-strong); }
.progress-track span { display: block; height: 100%; width: 0; background: var(--bright); border-radius: inherit; transition: width .2s ease-out; }
.subject-tabs { display: flex; gap: .5rem; overflow-x: auto; padding: 0 0 1rem; scrollbar-width: thin; }
.subject-tab { flex: 1 0 180px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 54px; border: 0; border-radius: 10px; background: var(--surface); color: var(--muted); padding: .85rem 1rem; font-weight: 750; }
.subject-tab[aria-current="true"] { background: var(--primary); color: white; }
.subject-count { font-variant-numeric: tabular-nums; font-size: .83rem; }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1.5rem; align-items: start; }
.answer-panel { min-width: 0; padding: clamp(1rem, 3vw, 2rem); background: var(--surface); border-radius: var(--radius); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.panel-heading h2 { margin: 0 0 .3rem; font-size: 1.7rem; }
.panel-heading p { margin: 0; color: var(--muted); }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.question-row { display: grid; grid-template-columns: 2.1rem 1fr; gap: .7rem; align-items: center; min-height: 50px; }
.question-number { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.choices { display: flex; gap: .25rem; }
.choice { flex: 1; position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { min-height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted); font-size: .84rem; font-weight: 750; transition: background-color .15s ease-out, color .15s ease-out, border-color .15s ease-out; }
.choice input:checked + span { background: var(--primary); color: white; border-color: var(--primary); }
.choice.blank input:checked + span { background: var(--ink); border-color: var(--ink); }
.panel-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.guide-panel { position: sticky; top: 1rem; padding: 1.5rem; border: 2px solid var(--primary); border-radius: var(--radius); }
.guide-panel h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.guide-panel ol { margin: 0; padding-left: 1.25rem; color: var(--muted); line-height: 1.7; }
.guide-panel > p { margin: 1.25rem 0; font-size: .86rem; color: var(--muted); line-height: 1.55; }

.lead-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(2rem, 6vw, 6rem); padding: clamp(3rem, 8vw, 7rem) 0; }
.lead-copy h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.025em; }
.lead-copy > p:last-child { color: var(--muted); line-height: 1.65; }
#leadForm { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-content: start; padding: 1.5rem; background: var(--surface); border-radius: var(--radius); }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 750; }
.field input { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 9px; padding: .8rem .9rem; background: white; color: var(--ink); }
.field input::placeholder { color: oklch(0.50 0.02 245); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { min-height: 1.1em; color: var(--error); font-size: .83rem; font-weight: 650; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: .75rem; color: var(--muted); line-height: 1.55; font-size: .9rem; }
.consent input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: .15rem; }
.submit-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { margin: 0; color: var(--muted); font-size: .9rem; }

.results { padding: 3rem 0; }
.result-hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; padding: clamp(2rem, 5vw, 4rem); background: var(--primary); color: white; border-radius: var(--radius); }
.result-hero .campaign-label { color: oklch(0.88 0.11 142); }
.result-hero h2 { margin: 0 0 .8rem; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.05; letter-spacing: -.03em; }
.result-hero p:last-child { max-width: 65ch; margin-bottom: 0; color: oklch(0.92 0.025 235); line-height: 1.6; }
.net-orbit { width: 176px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border-radius: 50%; background: white; color: var(--primary-dark); }
.net-orbit strong { font-size: 2.6rem; font-variant-numeric: tabular-nums; }
.net-orbit span { color: var(--muted); font-weight: 700; }
.result-section { padding: 2rem 0; }
.section-heading h3 { margin: 0 0 .35rem; font-size: 1.45rem; }
.section-heading p { margin: 0 0 1.3rem; color: var(--muted); }
.score-table { border-top: 2px solid var(--ink); }
.score-row { display: grid; grid-template-columns: minmax(150px, 1.5fr) repeat(4, minmax(70px, .7fr)); align-items: center; gap: .5rem; padding: 1rem .4rem; border-bottom: 1px solid var(--line); }
.score-row.header { color: var(--muted); font-size: .82rem; font-weight: 750; }
.score-row:not(.header) span:not(:first-child) { font-variant-numeric: tabular-nums; }
.result-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.difficulty-item { display: grid; grid-template-columns: 64px 1fr 48px; gap: .75rem; align-items: center; margin: 1rem 0; }
.difficulty-item strong { font-size: .9rem; }
.difficulty-track { height: 12px; background: var(--surface-strong); border-radius: 99px; overflow: hidden; }
.difficulty-track span { display: block; height: 100%; background: var(--bright); border-radius: inherit; }
.difficulty-item output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.priority-list { margin: 0; padding: 0; list-style: none; counter-reset: gaps; }
.priority-list li { counter-increment: gaps; display: grid; grid-template-columns: 32px 1fr auto; gap: .75rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.priority-list li::before { content: counter(gaps); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-strong); color: var(--primary); font-weight: 800; }
.priority-list small { color: var(--muted); }
.consultation { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 1rem; padding: 1.5rem; background: var(--surface); border-radius: var(--radius); }
.consultation h3 { margin: 0 0 .4rem; }
.consultation p { margin: 0; color: var(--muted); }
.restart { margin-top: 1.5rem; }
footer { max-width: 1180px; margin: auto; padding: 1.5rem 24px 2rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

@media (max-width: 820px) {
  .intro, .lead-section, .result-split { grid-template-columns: 1fr; }
  .intro { min-height: auto; }
  .exam-layout { grid-template-columns: 1fr; }
  .guide-panel { position: static; }
  .answer-grid { grid-template-columns: 1fr; }
  .progress-shell { grid-template-columns: 1fr; gap: .8rem; }
}

@media (max-width: 560px) {
  .topbar { min-height: 70px; padding: 8px 16px; }
  .brand img { width: 108px; height: 48px; }
  .topbar-meta { max-width: 150px; font-size: .75rem; text-align: right; }
  main { padding-inline: 16px; }
  h1 { font-size: clamp(2.5rem, 14vw, 4rem); }
  .exam-facts strong { font-size: 1.75rem; }
  .panel-heading, .panel-actions, .consultation, footer { flex-direction: column; align-items: stretch; }
  #leadForm { grid-template-columns: 1fr; padding: 1rem; }
  .result-hero { grid-template-columns: 1fr; }
  .net-orbit { width: 145px; }
  .score-row { grid-template-columns: minmax(115px, 1.5fr) repeat(4, minmax(44px, .7fr)); font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
