:root {
  --navy: #06213d;
  --deep: #03172b;
  --blue: #245f8f;
  --gold: #b9903d;
  --green: #2f7d69;
  --red: #a74242;
  --paper: #f7f5ef;
  --white: #ffffff;
  --ink: #182230;
  --muted: #687487;
  --line: rgba(6, 33, 61, 0.15);
  --shadow: 0 18px 48px rgba(6, 33, 61, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(247, 245, 239, 0.96), rgba(232, 239, 242, 0.95)),
    radial-gradient(circle at 18% 18%, rgba(185, 144, 61, 0.18), transparent 30%),
    radial-gradient(circle at 86% 70%, rgba(47, 125, 105, 0.14), transparent 28%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 38px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.site-nav button,
.primary,
.secondary,
.quiet {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
}

.site-nav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--navy);
}

.site-nav button:hover {
  border-color: var(--line);
  background: rgba(6, 33, 61, 0.05);
}

.site-nav button.is-active {
  background: var(--navy);
  color: var(--white);
}

main {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px);
}

.page {
  display: none;
  animation: pageIn 220ms ease;
}

.page.is-active {
  display: block;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: center;
  padding: clamp(26px, 5vw, 58px);
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(3, 23, 43, 0.96), rgba(6, 33, 61, 0.86)),
    linear-gradient(45deg, rgba(185, 144, 61, 0.22), rgba(47, 125, 105, 0.12));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--navy);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.06;
}

h3,
h4 {
  color: var(--navy);
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero h1 {
  color: var(--white);
}

.lead {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #171206;
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.quiet {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
}

.hero-logo {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.hero-logo img {
  width: 84%;
  height: 84%;
  object-fit: contain;
}

.stats,
.section-grid,
.quiz-layout,
.test-tabs {
  display: grid;
  gap: 16px;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.stats article,
.panel,
.question-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(6, 33, 61, 0.08);
}

.stats article {
  padding: 18px;
}

.stats strong {
  display: block;
  color: var(--green);
  font-size: 28px;
}

.stats span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.ops-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ops-strip article {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(6, 33, 61, 0.07);
}

.ops-strip strong,
.ops-strip small {
  display: block;
}

.ops-strip strong {
  color: var(--navy);
}

.ops-strip small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 800;
}

.status-light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  animation: statusPulse 1.8s ease-in-out infinite;
}

.status-light.green {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(47, 125, 105, 0.13);
}

.status-light.gold {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(185, 144, 61, 0.13);
}

.status-light.blue {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(36, 95, 143, 0.13);
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.78;
  }

  50% {
    transform: scale(1.28);
    opacity: 1;
  }
}

.section-grid {
  margin-top: 18px;
}

.section-grid.two,
.quiz-layout {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.72fr);
}

.panel,
.question-card {
  padding: 22px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(247, 245, 239, 0.7);
  color: var(--ink);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.page-heading {
  max-width: 930px;
  margin-bottom: 18px;
}

.page-heading p {
  max-width: 820px;
  font-size: 18px;
}

.test-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.test-tabs button {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy);
  text-align: left;
  font-weight: 900;
}

.test-tabs button span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.test-tabs button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.quiz-panel {
  display: grid;
  gap: 14px;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.score-card {
  min-width: 96px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.score-card span,
.score-card strong {
  display: block;
}

.score-card span {
  align-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.score-card strong {
  align-self: start;
  color: var(--green);
  font-size: 28px;
}

.answer-grid {
  display: grid;
  gap: 9px;
}

.answer-grid button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.answer-grid button.picked {
  border-color: var(--blue);
  background: rgba(36, 95, 143, 0.12);
}

.answer-grid button.correct {
  border-color: var(--green);
  background: rgba(47, 125, 105, 0.16);
}

.answer-grid button.wrong {
  border-color: var(--red);
  background: rgba(167, 66, 66, 0.12);
}

.quick-test {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.quick-test.is-hidden {
  display: none;
}

.quick-question {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 245, 239, 0.76);
}

.quick-question h3 {
  font-size: 17px;
  line-height: 1.4;
}

.quick-summary {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.quick-summary strong {
  color: var(--green);
  font-size: 22px;
}

.quick-summary span {
  color: var(--muted);
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 9px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.7fr) 58px minmax(100px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.history-row span,
.history-row small {
  color: var(--muted);
  font-weight: 800;
}

.history-row strong {
  color: var(--navy);
  font-size: 18px;
}

.history-row small {
  grid-column: 1 / -1;
  font-size: 12px;
}

.history-row meter {
  width: 100%;
  height: 12px;
}

.division-hub {
  margin-top: 18px;
  overflow: hidden;
}

.hub-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: end;
}

.hub-heading p:last-child {
  margin-bottom: 12px;
}

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

.division-tabs button {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
  color: var(--navy);
  text-align: left;
  font-weight: 900;
}

.division-tabs button span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.division-tabs button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.division-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(247, 245, 239, 0.88), rgba(255, 255, 255, 0.86)),
    var(--white);
}

.division-content h3 {
  margin-bottom: 8px;
  font-size: 28px;
}

.division-content strong {
  display: block;
  color: var(--navy);
  line-height: 1.55;
}

.division-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.division-points span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 900;
  text-align: center;
}

.scenario-builder {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(247, 245, 239, 0.82)),
    var(--white);
}

.scenario-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 14px 0;
}

.scenario-controls label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 900;
}

.brief-output {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(185, 144, 61, 0.42);
  border-radius: 8px;
  background: rgba(185, 144, 61, 0.1);
}

.brief-output strong {
  color: var(--navy);
  font-size: 20px;
}

.brief-output p,
.brief-output em {
  margin: 0;
}

.brief-output em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.brief-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.brief-columns div {
  display: grid;
  gap: 6px;
}

.brief-columns span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brief-columns small {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
}

.code-board {
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(3, 23, 43, 0.97), rgba(6, 33, 61, 0.9)),
    var(--navy);
}

.code-board h2,
.code-board p {
  color: var(--white);
}

.standard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.standard-grid div {
  min-height: 116px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.standard-grid strong,
.standard-grid span {
  display: block;
}

.standard-grid strong {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 18px;
}

.standard-grid span {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.55;
}

.explain {
  margin: 12px 0 0;
  padding: 12px;
  border-left: 4px solid var(--gold);
  background: rgba(185, 144, 61, 0.1);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.result-panel {
  height: fit-content;
  position: sticky;
  top: 100px;
}

.form-panel {
  display: grid;
  gap: 14px;
}

.form-panel label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 900;
}

.role-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.role-card:last-child {
  border-bottom: 0;
}

.role-card strong {
  color: var(--navy);
}

.saved-reports {
  margin-top: 18px;
}

.report-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-list article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.report-list strong,
.report-list span,
.report-list small {
  display: block;
}

.report-list strong {
  color: var(--navy);
}

.report-list span,
.report-list small {
  color: var(--muted);
}

.confirmation {
  text-align: center;
}

.confirmation a {
  color: var(--blue);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.success-ring {
  width: 70px;
  height: 70px;
  position: relative;
  margin: 0 auto 18px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: rgba(47, 125, 105, 0.08);
}

.success-ring::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 14px;
  width: 16px;
  height: 31px;
  border-right: 5px solid var(--green);
  border-bottom: 5px solid var(--green);
  transform: rotate(42deg) scale(0);
  transform-origin: center;
}

.confirmation.show .success-ring {
  border-color: var(--green);
}

.confirmation.show .success-ring::after {
  animation: checkIn 260ms ease forwards;
}

@keyframes checkIn {
  to {
    transform: rotate(42deg) scale(1);
  }
}

.site-footer {
  width: min(1280px, 100%);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto;
  padding: 20px clamp(18px, 4vw, 36px) 34px;
  color: var(--muted);
}

.site-footer a {
  color: var(--blue);
  font-weight: 900;
}

@media (max-width: 980px) {
  .hero,
  .section-grid.two,
  .quiz-layout,
  .test-tabs,
  .report-list,
  .hub-heading,
  .division-content {
    grid-template-columns: 1fr;
  }

  .stats,
  .ops-strip,
  .division-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .site-nav {
    justify-content: stretch;
  }

  .site-nav button {
    flex: 1;
  }

  .hero {
    min-height: 0;
  }

  .hero-logo {
    display: none;
  }

  .stats,
  .ops-strip,
  .division-tabs,
  .division-points,
  .scenario-controls,
  .brief-columns,
  .standard-grid {
    grid-template-columns: 1fr;
  }

  .quiz-header,
  .site-footer {
    flex-direction: column;
  }
}
