:root {
  --navy: #071a2d;
  --navy-soft: #0d2945;
  --broadcast-blue: #0b5c8e;
  --signal-blue: #1ca7ec;
  --urgency-red: #d63b2a;
  --gold: #f4b942;
  --gold-hover: #dda12c;
  --off-white: #f7f4ee;
  --paper: #fffdf8;
  --charcoal: #1e1e1e;
  --muted: #6b7280;
  --line: #d9d5cc;
  --soft-line: #ebe6dc;
  --success: #2e8b57;
  --warning: #d98a00;
  --shadow: 0 22px 60px rgba(7, 26, 45, 0.16);
  --radius: 20px;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  color: var(--charcoal);
  background:
    linear-gradient(90deg, rgba(7, 26, 45, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11, 92, 142, 0.06), transparent 320px),
    var(--off-white);
  background-size: 28px 28px, auto, auto;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--broadcast-blue);
}

.page-shell {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: clamp(10px, 2.2vh, 24px) 18px;
}

.hero {
  position: relative;
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto 24px;
  padding: 34px clamp(22px, 5vw, 46px);
  color: #ffffff;
  background:
    radial-gradient(circle at 84% 16%, rgba(244, 185, 66, 0.24), transparent 22%),
    linear-gradient(135deg, var(--navy), #0b304f 72%, #092238);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -54% auto;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(28, 167, 236, 0.28);
  border-radius: 999px;
}

.signal-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}

.signal-strip span {
  display: block;
  height: 4px;
  border-radius: 999px;
}

.signal-strip span:nth-child(1) {
  width: 70px;
  background: var(--signal-blue);
}

.signal-strip span:nth-child(2) {
  width: 38px;
  background: var(--gold);
}

.signal-strip span:nth-child(3) {
  width: 24px;
  background: var(--urgency-red);
}

.eyebrow {
  margin: 0 0 12px;
  color: #a9ddff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.subtitle {
  max-width: 720px;
  margin: 18px 0 0;
  color: #f4f8fb;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.45;
}

.intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.7;
}

.quiz-card {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.quiz-card article {
  border-radius: var(--radius);
}

.quiz-card article:not(.intro-slide):not(.results-view) {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(16px, 2.4vh, 26px);
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(7, 26, 45, 0.08);
  box-shadow: var(--shadow);
}

.intro-slide {
  position: relative;
  overflow: hidden;
  min-height: min(660px, calc(100svh - 78px));
  padding: clamp(22px, 4.4vh, 44px) clamp(24px, 5vw, 52px);
  color: #ffffff;
  background:
    radial-gradient(circle at 84% 16%, rgba(244, 185, 66, 0.25), transparent 22%),
    linear-gradient(135deg, var(--navy), #0b304f 72%, #092238);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.intro-slide::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% auto;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(28, 167, 236, 0.28);
  border-radius: 999px;
}

.intro-slide > * {
  position: relative;
  z-index: 1;
}

.intro-slide .subtitle {
  max-width: 760px;
}

.intro-slide .intro {
  max-width: 760px;
}

.privacy-note {
  max-width: 720px;
  margin: 16px 0 0;
  padding: 11px 14px;
  color: #e8f4fb;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  line-height: 1.5;
}

.intro-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.keyboard-hint {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 750;
}

.keyboard-hint.compact {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--broadcast-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--urgency-red);
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(214, 59, 42, 0.12);
}

.question-number {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.question-text {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.2rem, 2.25vh, 1.7rem);
  font-weight: 850;
  line-height: 1.18;
}

.microcopy {
  margin: 10px 0 0;
  padding: 9px 12px;
  color: #425266;
  background: #f2f6f8;
  border-left: 4px solid var(--signal-blue);
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.likert-group {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.likert-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 43px;
  padding: 9px 13px;
  color: var(--charcoal);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(7, 26, 45, 0.04);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.likert-button:hover {
  border-color: rgba(11, 92, 142, 0.45);
  transform: translateY(-1px);
}

.likert-button:focus-visible,
.nav-button:focus-visible,
.link-button:focus-visible {
  outline: 3px solid rgba(244, 185, 66, 0.7);
  outline-offset: 3px;
}

.likert-button.is-selected {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.26);
}

.likert-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 850;
}

.likert-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 750;
}

.progress-panel {
  margin-top: 13px;
  padding: 11px 12px;
  background: #f5f2ea;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
}

.progress-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.progress-meta strong,
.progress-meta span {
  display: block;
}

.progress-meta strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.progress-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  background: #ddd8ce;
  border-radius: 999px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--broadcast-blue), var(--signal-blue));
  border-radius: inherit;
  transition: width 220ms ease;
}

.validation-message {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--urgency-red);
  font-size: 0.86rem;
  font-weight: 800;
}

.navigation-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.nav-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 850;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.nav-button.primary {
  color: #ffffff;
  background: var(--navy);
}

.nav-button.primary:hover {
  background: var(--navy-soft);
}

.nav-button.secondary,
.link-button.secondary {
  color: var(--navy);
  background: #ffffff;
  border-color: var(--line);
}

.nav-button.secondary:hover,
.link-button.secondary:hover {
  border-color: var(--broadcast-blue);
}

.nav-button.gold,
.link-button.gold {
  color: var(--navy);
  background: var(--gold);
}

.nav-button.gold:hover,
.link-button.gold:hover {
  background: var(--gold-hover);
}

.nav-button[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.results-view {
  padding: clamp(18px, 3.2vh, 30px);
  background: rgba(255, 253, 248, 0.98);
  border: 1px solid rgba(7, 26, 45, 0.08);
  box-shadow: var(--shadow);
}

.results-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  gap: clamp(18px, 3.8vw, 44px);
  align-items: center;
}

.result-kicker {
  margin: 0 0 8px;
  color: var(--charcoal);
  font-size: clamp(0.95rem, 1.7vw, 1.1rem);
  font-weight: 900;
  letter-spacing: 0;
}

.result-title {
  margin: 0;
  max-width: 680px;
  color: #000000;
  font-size: clamp(2.2rem, 5.1vw, 3.85rem);
  line-height: 1.12;
}

.result-message {
  margin: 12px 0 0;
  color: #3d4956;
  line-height: 1.5;
}

.result-privacy {
  color: #354052;
  background: #f5f2ea;
  border-color: var(--soft-line);
}

.score-card {
  min-height: 270px;
  padding: 18px 18px 20px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #d6dde6;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(7, 26, 45, 0.12);
}

.score-gauge {
  display: block;
  width: min(100%, 260px);
  margin: 0 auto 4px;
}

.gauge-track,
.gauge-fill {
  fill: none;
  stroke-width: 27;
  stroke-linecap: round;
}

.gauge-track {
  stroke: #eceff2;
}

.gauge-fill {
  stroke: url("#scoreGaugeGradient");
}

.gauge-needle {
  stroke: #000000;
  stroke-width: 9;
  stroke-linecap: round;
}

.gauge-hub-outer {
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 8;
}

.gauge-hub-inner {
  fill: #000000;
}

.score-card p {
  margin: 0;
  color: #000000;
  font-size: 0.95rem;
  font-weight: 900;
}

.score-card strong {
  display: block;
  margin-top: 10px;
  color: #f45d22;
  font-size: clamp(2.8rem, 5.4vw, 3.55rem);
  font-weight: 950;
  line-height: 1;
}

.score-card span {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-weight: 900;
}

.section-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.section-card,
.highlight-card,
.cta-box {
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(7, 26, 45, 0.06);
}

.section-card {
  padding: 12px;
}

.section-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.9rem;
  line-height: 1.25;
}

.section-score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.section-score {
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 900;
}

.section-tag {
  padding: 4px 7px;
  color: var(--navy);
  background: #f0f4f6;
  border: 1px solid #dbe4e9;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.section-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.highlight-card {
  padding: 12px;
}

.highlight-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.highlight-card strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.3;
}

.cta-box {
  margin-top: 14px;
  padding: clamp(14px, 2.4vh, 20px);
  background:
    linear-gradient(135deg, rgba(244, 185, 66, 0.16), rgba(28, 167, 236, 0.08)),
    #ffffff;
}

.cta-box h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.cta-box p {
  margin: 8px 0 12px;
  color: #3d4956;
  line-height: 1.38;
  font-size: 0.92rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.copy-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--success);
  font-size: 0.93rem;
  font-weight: 850;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 8px 10px;
  }

  .hero {
    border-radius: 22px;
  }

  .quiz-card {
    width: min(100%, 1000px);
  }

  .quiz-card article:not(.intro-slide):not(.results-view) {
    padding: 12px;
    border-radius: 16px;
  }

  .intro-slide {
    min-height: calc(100svh - 48px);
    padding: 18px 16px;
    border-radius: 16px;
  }

  .signal-strip {
    margin-bottom: 14px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.1rem);
  }

  .subtitle {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.32;
  }

  .intro {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .privacy-note {
    margin-top: 11px;
    padding: 9px 11px;
    font-size: 0.82rem;
    line-height: 1.34;
  }

  .keyboard-hint {
    margin-top: 10px;
    font-size: 0.8rem;
  }

  .question-text {
    font-size: clamp(1.05rem, 5.4vw, 1.32rem);
  }

  .section-label {
    margin-bottom: 6px;
    font-size: 0.68rem;
  }

  .question-number {
    margin-bottom: 4px;
    font-size: 0.8rem;
  }

  .microcopy {
    margin-top: 7px;
    padding: 7px 9px;
    font-size: 0.76rem;
  }

  .keyboard-hint.compact {
    margin-top: 5px;
    font-size: 0.72rem;
  }

  .likert-group {
    gap: 5px;
    margin-top: 9px;
  }

  .likert-button {
    min-height: 37px;
    padding: 6px 9px;
    border-radius: 10px;
  }

  .likert-score {
    width: 26px;
    height: 26px;
    font-size: 0.86rem;
  }

  .likert-label {
    font-size: 0.84rem;
  }

  .progress-panel {
    margin-top: 9px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  .progress-meta {
    align-items: center;
    gap: 8px;
  }

  .progress-meta strong,
  .progress-meta span {
    font-size: 0.76rem;
  }

  .progress-track {
    height: 7px;
  }

  .validation-message {
    min-height: 16px;
    margin-top: 5px;
    font-size: 0.76rem;
  }

  .navigation-row {
    align-items: center;
    flex-direction: row;
    margin-top: 8px;
  }

  .navigation-row .nav-button {
    flex: 1 1 0;
    min-height: 38px;
    padding: 8px 10px;
  }

  .results-hero {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .results-view {
    padding: 12px;
    border-radius: 16px;
  }

  .result-title {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    line-height: 1.08;
  }

  .result-kicker,
  .result-message,
  .cta-box p {
    font-size: 0.78rem;
  }

  .result-message {
    margin-top: 8px;
    line-height: 1.32;
  }

  .score-card {
    min-height: 0;
    padding: 10px;
  }

  .score-gauge {
    width: min(100%, 180px);
    margin-bottom: 0;
  }

  .score-card p {
    font-size: 0.78rem;
  }

  .score-card strong {
    margin-top: 6px;
    font-size: 2.25rem;
  }

  .score-card span {
    margin-top: 4px;
    font-size: 0.82rem;
  }

  .highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }

  .highlight-card {
    padding: 9px;
  }

  .highlight-card span {
    margin-bottom: 5px;
    font-size: 0.62rem;
  }

  .highlight-card strong {
    font-size: 0.8rem;
  }

  .section-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 9px;
  }

  .section-card {
    padding: 8px;
  }

  .section-card h3 {
    font-size: 0.72rem;
  }

  .section-score-line {
    margin-top: 5px;
  }

  .section-score {
    font-size: 1rem;
  }

  .section-tag {
    padding: 3px 5px;
    font-size: 0.58rem;
  }

  .section-card p {
    display: none;
  }

  .cta-box {
    margin-top: 9px;
    padding: 10px;
  }

  .cta-box h2 {
    font-size: 0.98rem;
  }

  .action-row {
    gap: 6px;
    margin-top: 8px;
  }

  .action-row .nav-button,
  .action-row .link-button {
    flex: 1 1 calc(50% - 6px);
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .site-footer {
    padding: 4px 10px 6px;
    font-size: 0.7rem;
  }
}

@media (max-height: 760px) {
  .page-shell {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .intro-slide {
    min-height: calc(100svh - 46px);
  }

  .quiz-card article:not(.intro-slide):not(.results-view),
  .results-view {
    padding: 12px;
  }

  .question-text {
    font-size: clamp(1.05rem, 2.2vh, 1.35rem);
  }

  .microcopy,
  .keyboard-hint.compact {
    display: none;
  }

  .likert-button {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .progress-panel {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .site-footer {
    padding-top: 3px;
    padding-bottom: 5px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .hero,
  .action-row,
  .site-footer,
  .cta-box .link-button,
  .cta-box .nav-button {
    display: none !important;
  }

  .page-shell {
    padding: 0;
  }

  .quiz-card {
    width: 100%;
    box-shadow: none;
    border: none;
  }

  .section-breakdown,
  .highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
