:root {
  --ink: #0b1728;
  --body-copy: #24344a;
  --muted: #586a80;
  --page: #eef2f7;
  --panel: #ffffff;
  --line: #d5deea;
  --blue: #075dff;
  --blue-dark: #0046ca;
  --blue-soft: #edf4ff;
  --success: #0c8a62;
  --shadow: 0 8px 25px rgba(26, 53, 87, 0.08);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--page); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--body-copy);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  letter-spacing: 0;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 28px 0 20px;
  display: flex;
  justify-content: center;
}

.brand {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--blue);
  text-decoration: none;
}

.brand-mark { display: grid; width: 23px; height: 27px; place-items: center; }
.brand-mark svg { width: 100%; height: 100%; fill: none; stroke: var(--blue); stroke-width: 2.7; stroke-linejoin: round; }
.brand-mark .mark-check { stroke: var(--blue); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-size: 1.05rem; font-weight: 760; letter-spacing: 0.01em; }

.app-shell {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 0 0 48px;
}

.quiz-panel {
  min-height: calc(100vh - 124px);
  padding: 0 clamp(22px, 7vw, 78px) 48px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.progress-wrap { max-width: 560px; margin: 0 auto 48px; padding-top: 24px; }
.progress-labels { display: flex; justify-content: center; color: var(--body-copy); font-size: 1rem; font-weight: 700; }
.progress-rail { display: grid; grid-template-columns: repeat(7, 1fr); align-items: center; position: relative; margin-top: 18px; }
.progress-rail::before { content: ""; position: absolute; top: 50%; right: 0; left: 0; height: 2px; transform: translateY(-50%); background: #c3d4ef; }
.progress-node { position: relative; z-index: 1; width: 15px; height: 15px; margin: 0 auto; border: 1.5px solid var(--blue); border-radius: 50%; background: #ffffff; }
.progress-node.complete { background: var(--blue); }
.progress-node.current { width: 17px; height: 17px; background: var(--blue); box-shadow: 0 0 0 3px #dce9ff; }

.question-area { max-width: 590px; margin: 0 auto; }
h1 { max-width: 590px; margin: 0; color: var(--ink); font-size: clamp(2rem, 5.4vw, 2.8rem); font-weight: 500; line-height: 1.14; letter-spacing: -0.035em; text-align: left; }
mark { padding: 0.02em 0.12em 0.06em; border-radius: 0.16em; -webkit-box-decoration-break: clone; box-decoration-break: clone; font-weight: 780; }
.headline-highlight { color: #093d99; background: #fff0b8; }
.headline-pain { color: #8b2418; background: #ffe0d9; }
.question-help { max-width: 590px; margin: 18px 0 30px; color: var(--muted); font-size: 1rem; line-height: 1.45; text-align: left; }

.answers { display: grid; gap: 14px; max-width: 460px; margin: 0 auto; }
.answer-button {
  width: 100%;
  min-height: 68px;
  padding: 16px 20px;
  color: #09275b;
  text-align: center;
  background: #ffffff;
  border: 2px solid var(--blue);
  border-radius: 11px;
  cursor: pointer;
}
.answer-button:hover { background: var(--blue-soft); }
.answer-button:focus-visible { background: var(--blue-soft); outline: 4px solid #bcd3ff; outline-offset: 2px; }
.answer-button:active { background: #dfeaff; }
.answer-button.selected { color: #062b68; background: #e8f0ff; border-color: var(--blue-dark); }
.answer-title { display: block; font-size: 1.125rem; line-height: 1.35; }
.answer-detail { display: block; margin-top: 5px; color: var(--body-copy); font-size: 1rem; line-height: 1.35; }

.question-footer { display: grid; gap: 14px; max-width: 460px; margin: 26px auto 0; }
.continue-button {
  order: 1;
  width: 100%;
  min-height: 64px;
  padding: 14px 22px;
  color: #ffffff;
  background: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 760;
}
.continue-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.continue-button:focus-visible { outline: 4px solid #bcd3ff; outline-offset: 3px; }
.continue-button:disabled { color: #63758e; background: #e2e9f2; border-color: #cbd6e4; cursor: not-allowed; }
.back-button {
  order: 2;
  justify-self: center;
  min-height: 48px;
  padding: 8px 16px;
  color: #16345f;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}
.back-button:hover { color: var(--blue-dark); }
.back-button:focus-visible { outline: 4px solid #bcd3ff; outline-offset: 3px; border-radius: 5px; }
.back-button[disabled] { visibility: hidden; }
.privacy-note { order: 3; color: var(--muted); font-size: 0.9rem; text-align: center; }

.interstitial-area { max-width: 560px; margin: 0 auto; padding: 4px 0 6px 20px; border-left: 5px solid #ef6b5c; }
.interstitial-area:focus, h1:focus { outline: none; }
.interstitial-eyebrow { display: block; margin-bottom: 14px; color: #a33a2e; font-size: 0.78rem; font-weight: 780; letter-spacing: 0.12em; }
.interstitial-area h2 { margin: 0; color: var(--ink); font-size: clamp(2rem, 5vw, 2.65rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; }
.interstitial-copy { margin-top: 24px; }
.interstitial-copy p { margin: 0 0 18px; color: var(--body-copy); font-size: 1.125rem; line-height: 1.55; }
.interstitial-emphasis { color: #093d99; font-weight: 780; }
.interstitial-pain { color: #8b2418; font-weight: 780; }
.interstitial-source { margin: 24px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.interstitial-source a { color: #064fc5; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.interstitial-actions { display: grid; gap: 14px; max-width: 460px; margin-top: 30px; }
.interstitial-actions .continue-button { order: 1; }
.interstitial-actions .back-button { order: 2; }

.scan-area { max-width: 560px; margin: 0 auto; padding: 4px 0 8px; text-align: center; }
.scan-eyebrow { display: block; margin-bottom: 13px; color: #0b6fae; font-size: 0.78rem; font-weight: 780; letter-spacing: 0.12em; }
.scan-area h2 { max-width: 560px; margin: 0 auto; color: var(--ink); font-size: clamp(2rem, 5vw, 2.65rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; }
.scan-area h2:focus { outline: none; }
.scan-status { min-height: 28px; margin: 13px auto 21px; color: var(--muted); font-size: 1rem; line-height: 1.4; }
.scan-device { position: relative; width: 172px; height: 292px; margin: 0 auto 25px; padding: 10px; background: linear-gradient(145deg, #183858, #081c33); border: 3px solid #274f78; border-radius: 29px; box-shadow: 0 15px 30px rgba(16, 50, 85, 0.24), inset 0 0 0 1px rgba(174, 219, 255, 0.13); }
.scan-device-speaker { position: absolute; top: 7px; left: 50%; width: 42px; height: 4px; transform: translateX(-50%); border-radius: 99px; background: #061425; }
.scan-device-screen { position: relative; display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(31, 126, 183, 0.35), transparent 42%), #071b32; border: 1px solid rgba(169, 217, 255, 0.28); border-radius: 19px; }
.scan-screen-top, .scan-screen-bottom { display: flex; align-items: center; justify-content: space-between; padding: 15px 13px 0; color: #8eb8d6; font-size: 0.48rem; font-weight: 800; letter-spacing: 0.11em; }
.scan-screen-bottom { padding: 0 13px 13px; color: #a9cae0; }
.scan-screen-bottom strong { color: #7de2c1; font-size: 0.7rem; }
.scan-live { display: inline-flex; align-items: center; gap: 4px; color: #7de2c1; }
.scan-live i { width: 5px; height: 5px; border-radius: 50%; background: #7de2c1; box-shadow: 0 0 7px #7de2c1; }
.scan-screen-core { position: relative; display: grid; flex: 1; place-items: center; overflow: hidden; }
.scan-ring { position: absolute; border: 1px solid rgba(101, 200, 243, 0.42); border-radius: 50%; }
.scan-ring-one { width: 82px; height: 82px; }
.scan-ring-two { width: 122px; height: 122px; border-color: rgba(101, 200, 243, 0.2); }
.scan-core-shield { position: relative; z-index: 1; width: 42px; height: 48px; }
.scan-core-shield svg { width: 100%; height: 100%; fill: rgba(27, 135, 193, 0.22); stroke: #bcecff; stroke-width: 2; stroke-linejoin: round; }
.scan-core-shield path:last-child { fill: none; stroke: #7de2c1; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.scan-beam { position: absolute; z-index: 2; top: 13%; left: 50%; width: 124px; height: 2px; transform: translateX(-50%); background: #7de2c1; box-shadow: 0 0 10px 2px rgba(125, 226, 193, 0.8), 0 0 34px rgba(55, 183, 242, 0.55); animation: scan-sweep 2.3s ease-in-out infinite; }
.scan-checks { display: grid; gap: 8px; max-width: 460px; margin: 0 auto; text-align: left; }
.scan-check { display: grid; grid-template-columns: 25px 1fr auto; gap: 8px; min-height: 46px; align-items: center; padding: 8px 12px; color: #52657c; background: #f7faff; border: 1px solid #d6e1ee; border-radius: 8px; font-size: 0.94rem; }
.scan-check-icon { color: #8da0b5; font-size: 1.28rem; line-height: 1; text-align: center; }
.scan-check-state { color: #8292a5; font-size: 0.74rem; font-weight: 750; }
.scan-check.active { color: #173a64; border-color: #9cc6e4; background: #f0f8ff; }
.scan-check.active .scan-check-icon { color: #0b82bf; }
.scan-check.active .scan-check-state { color: #0b6fae; }
.scan-check.complete { color: #183e56; border-color: #b6dfd1; background: #f0fbf7; }
.scan-check.complete .scan-check-icon { color: #0c8a62; }
.scan-check.complete .scan-check-state { color: #0c8a62; }
.scan-progress { height: 8px; margin: 20px auto 0; overflow: hidden; background: #dce7f1; border: 1px solid #cad8e7; border-radius: 99px; }
.scan-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #0b82bf, #0c9f7a); border-radius: inherit; }
.scan-disclaimer { max-width: 470px; margin: 16px auto 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

@keyframes scan-sweep {
  0%, 100% { top: 13%; opacity: .45; }
  50% { top: 84%; opacity: 1; }
}

.question-kicker { display: block; margin-bottom: 14px; color: var(--success); font-size: 0.78rem; font-weight: 760; letter-spacing: 0.12em; text-align: center; }
.result-area { padding: 7px 0 11px; text-align: center; }
.result-icon { width: 66px; height: 66px; margin: 0 auto 24px; color: var(--success); }
.result-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
.result-icon path { stroke-linecap: round; stroke-linejoin: round; }
.result-area h1 { margin: 0 auto; text-align: center; }
.result-summary { max-width: 500px; margin: 15px auto 31px; color: var(--body-copy); font-size: 1rem; line-height: 1.6; }
.result-score { max-width: 450px; margin: 0 auto 30px; padding: 16px 18px; text-align: left; background: #f6f9fd; border: 1px solid var(--line); border-radius: 9px; }
.result-score > div:first-child { display: flex; align-items: baseline; justify-content: space-between; }
.score-label { color: var(--muted); font-size: 0.72rem; font-weight: 760; letter-spacing: 0.1em; }
.score-label + strong { color: var(--success); font-size: 1.4rem; font-weight: 650; }
.score-bar { height: 6px; margin-top: 13px; overflow: hidden; background: #dce5f0; border-radius: 999px; }
.score-bar span { display: block; width: 0; height: 100%; background: var(--blue); border-radius: inherit; }
.primary-button { min-height: 56px; padding: 13px 18px; color: #ffffff; background: var(--blue); border: 2px solid var(--blue); border-radius: 9px; cursor: pointer; font-size: 1rem; font-weight: 720; }
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.primary-button:focus-visible { outline: 4px solid #bcd3ff; outline-offset: 3px; }
.primary-button span { margin-left: 10px; font-size: 1rem; }
.result-footnote { margin: 30px auto 0; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 600px) {
  .site-header, .app-shell { width: min(100% - 20px, 720px); }
  .site-header { padding-top: 24px; padding-bottom: 18px; }
  .app-shell { padding-bottom: 22px; }
  .quiz-panel { min-height: calc(100vh - 104px); padding: 0 18px 38px; }
  .progress-wrap { margin-bottom: 42px; padding-top: 22px; }
  .progress-labels { font-size: 0.98rem; }
  h1 { font-size: clamp(2rem, 8.3vw, 2.35rem); }
  .question-help { margin-top: 16px; margin-bottom: 28px; }
  .answer-button { min-height: 68px; padding: 16px 14px; }
  .continue-button { min-height: 64px; }
  .interstitial-area { padding-left: 16px; }
  .interstitial-copy p { font-size: 1.08rem; }
  .scan-area h2 { font-size: clamp(2rem, 8vw, 2.35rem); }
  .scan-check { grid-template-columns: 23px 1fr auto; padding-inline: 9px; font-size: 0.9rem; }
  .scan-check-state { font-size: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .scan-beam { top: 50%; animation: none; }
}
