:root {
  --va-black: #0c0d0e;
  --va-ink: #141516;
  --va-amber: #ffb600;
  --va-paper: #f5f5f2;
  --va-paper-line: #deded8;
}

html { background: var(--va-black); }

body {
  background: #0b0c0d;
  color: #f5f5f2;
}

body::before {
  display: none;
}

header {
  height: 96px;
  padding: 0 38px;
  color: #fff;
  background: var(--va-black);
  border: 0;
  box-shadow: none;
}

.title-block { gap: 20px; }
.title-block .mark { width: 52px; height: 52px; font-size: 22px; }
.brand-divider { height: 42px; background: #383a3c; }
.brand-kicker {
  margin-bottom: 5px;
  color: var(--va-amber) !important;
  font-size: 8px !important;
  font-weight: 700;
  letter-spacing: 1.5px !important;
}
.title-block b { font-size: 25px; line-height: .95; }
.overall span { color: var(--va-amber); font-size: 27px; }
.overall small { color: #a2a2a0; }

main {
  position: relative;
  grid-template-columns: 250px minmax(520px, 1fr) 330px;
  min-height: calc(100vh - 96px);
  background: transparent;
}

#sectionNav {
  top: 96px;
  height: calc(100vh - 96px);
  padding: 18px 12px 26px;
  color: #fff;
  background: #101112;
  border-right: 0;
  box-shadow: 22px 0 50px rgba(0, 0, 0, .12);
}

.section-group { border-color: #292a2b; }
.section-button {
  min-height: 58px;
  border-left: 3px solid transparent;
  color: #9d9d9b;
}
.section-button:hover,
.section-button.active {
  color: #fff;
  background: #1b1c1e;
  border-left-color: var(--va-amber);
}
.section-button.complete span { color: var(--va-amber); }
.question-nav-item { background: #111214; border-color: #292a2b; }
.question-nav-item:hover { background: #1b1c1e; }
.question-nav-item.current {
  background: #242527;
  box-shadow: inset 3px 0 var(--va-amber);
}
.question-nav-item.current > span { color: var(--va-amber); }

.workspace {
  position: relative;
  z-index: 1;
  padding: 42px clamp(28px, 4vw, 72px) 70px;
  background-color: #111315;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .20) 1.1px, transparent 1.35px),
    radial-gradient(circle, rgba(255, 255, 255, .08) 1.35px, transparent 1.7px),
    radial-gradient(circle at 72% 24%, rgba(255, 182, 0, .055), transparent 34%);
  background-position: 0 0, 11px 11px, 0 0;
  background-size: 22px 22px, 44px 44px, 100% 100%;
  animation: dot-field-drift 46s ease-in-out infinite alternate;
}

@keyframes dot-field-drift {
  from { background-position: 0 0, 11px 11px, 0 0; }
  to { background-position: 30px 18px, -17px 39px, 18px -10px; }
}

.progress {
  height: 5px;
  margin-bottom: 18px;
  background: #303235;
}
.progress i { background: var(--va-amber); }
.step-meta { color: #b5b5b1; font-weight: 600; }

#stepCard {
  position: relative;
  min-height: 630px;
  padding: clamp(34px, 4vw, 64px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, .98) 0%, rgba(12, 13, 14, .95) 58%, rgba(18, 19, 20, .88) 100%),
    radial-gradient(circle at 86% 18%, rgba(255, 182, 0, .13), transparent 32%);
  border: 0;
  border-radius: 0 0 44px 0;
  box-shadow: 0 28px 72px rgba(0, 0, 0, .24);
  overflow: hidden;
}
#stepCard::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 182, 0, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(255, 182, 0, .025), 0 0 0 92px rgba(255, 182, 0, .018);
  pointer-events: none;
}
#stepCard > * { position: relative; z-index: 1; }
.question-kicker { color: var(--va-amber); letter-spacing: 1.7px; }
.question-title {
  max-width: 930px;
  margin: 18px 0 30px;
  color: #fff;
  font-size: clamp(38px, 3.4vw, 58px);
  line-height: .96;
  letter-spacing: -.45px;
}
.question-note { max-width: 760px; color: #b9b9b6; border-color: var(--va-amber); }
.criteria-title { color: #fff; }
.criteria-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.criterion {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px 14px;
  color: #111214;
  background: var(--level);
  border: 0;
  border-radius: 12px;
  opacity: .5;
  transition: opacity 160ms ease, filter 160ms ease;
}
.criterion strong { color: inherit; }
.criterion strong::before { display: none; }
.criterion p {
  margin-top: 7px;
  color: rgba(17, 18, 20, .72);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.criterion:hover { opacity: .8; }
.criterion:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.criterion.selected {
  background: var(--level);
  opacity: 1;
  box-shadow: none;
}
.official-answer { background: #151617; border-color: #70551a; }
.field input,
textarea { background: #111214; }

.controls { margin-top: 20px; }
.button { min-height: 54px; padding-inline: 28px; }
.button.primary,
.toggle button.selected { background: var(--va-amber); color: var(--va-black); }
.button.ghost { color: #fff; border-color: #5a5c60; background: rgba(10, 11, 12, .74); }
.button.ghost:hover { border-color: #fff; background: #17191b; }

.summary-panel {
  position: sticky;
  z-index: 3;
  top: 116px;
  align-self: start;
  height: auto;
  max-height: calc(100vh - 138px);
  margin: 20px 20px 32px 0;
  padding: 18px 30px 30px;
  color: var(--va-black);
  background: var(--va-amber);
  border: 0;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .24);
  overflow-y: auto;
}
.summary-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  margin: -2px -10px 28px auto;
  padding: 0 22px;
  width: max-content;
  color: var(--va-amber);
  background: var(--va-black);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.summary-menu i,
.summary-menu i::before,
.summary-menu i::after {
  display: block;
  width: 14px;
  height: 1px;
  margin-left: 12px;
  background: var(--va-amber);
  content: "";
}
.summary-menu i::before { transform: translateY(-4px); margin-left: 0; }
.summary-menu i::after { transform: translateY(3px); margin-left: 0; }
.summary-panel .label { color: #4f3a00; }
.result { color: var(--va-black); font-size: 42px; }
.result.pass { color: #133c22; }
.result.fail { color: #861f19; }
.summary-grid { border-color: rgba(12,13,14,.34); }
.summary-grid div { border-color: rgba(12,13,14,.3); }
.summary-grid span { color: #4f3a00; }
.definition { border-color: rgba(12,13,14,.28); }
.definition p { color: #493800; }
.definition b { color: var(--va-black); }
.definition i.pass { background: #1f6b39; }
.definition i.minor { background: #396b87; }
.definition i.major { background: #9a5700; }
.definition i.critical { background: #9f1f18; }
.reset { color: var(--va-black); border-color: rgba(12,13,14,.45); }
.reset:hover { background: var(--va-black); color: var(--va-amber); }

footer {
  position: relative;
  z-index: 4;
  color: #8f8f8c;
  background: var(--va-black);
  border: 0;
}

@media (max-width: 1120px) {
  main { grid-template-columns: 220px minmax(480px, 1fr); }
  .summary-panel {
    position: relative;
    top: auto;
    grid-column: 1 / -1;
    margin: 0;
    max-height: none;
    border-radius: 0;
    display: grid;
    grid-template-columns: 180px 250px 1fr;
  }
  .summary-menu { display: none; }
}

/* Portrait tablets keep the desktop information architecture, but give the
   assessment itself enough width to remain readable and tappable. */
@media (min-width: 721px) and (max-width: 900px) {
  main { grid-template-columns: 190px minmax(0, 1fr); }
  #sectionNav { padding-inline: 8px; }
  .section-button {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 7px;
    padding-inline: 9px;
  }
  .section-button b { font-size: 9px; }
  .question-nav-item {
    grid-template-columns: 27px minmax(0, 1fr) 8px;
    padding-inline: 10px 8px;
  }
  .workspace { padding: 30px 24px 52px; }
  #stepCard { padding: 38px 34px; }
  .question-title { font-size: clamp(36px, 5vw, 44px); }
  .summary-panel {
    grid-template-columns: 160px 230px minmax(0, 1fr);
    padding: 26px 24px;
  }
}

@media (max-width: 720px) {
  header { height: 64px; padding: 0 14px; }
  .brand-kicker, .brand-divider { display: none; }
  .title-block .mark { width: 38px; height: 38px; font-size: 18px; }
  .mobile-nav-toggle { top: 64px; background: var(--va-amber); color: var(--va-black); border: 0; }
  .mobile-nav-toggle span, .mobile-nav-toggle i { color: var(--va-black); }
  #sectionNav {
    top: 116px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    height: auto;
    background: #101112;
  }
  .workspace { padding: 22px 12px calc(92px + env(safe-area-inset-bottom)); }
  #stepCard { min-height: auto; padding: 30px 20px; border-radius: 0 0 28px 0; }
  .question-title { font-size: clamp(30px, 9vw, 40px); }
  .criteria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .criterion { min-height: 76px; padding: 11px 12px; }
  .criterion p { overflow: hidden; text-overflow: ellipsis; }
  .button.ghost { color: #fff; background: #18191b; border-color: #4b4c4e; }
  .controls { background: rgba(12,13,14,.96); }
  .summary-panel { display: block; padding: 30px 18px; border-radius: 0; }
  .criterion,
  .toggle button,
  .button,
  .reset,
  .official-answer .source-citation a { min-height: 48px; }
  textarea,
  .field input { font-size: 16px; }
}

@media (max-width: 360px) {
  .workspace { padding-inline: 8px; }
  #stepCard { padding: 24px 16px; border-radius: 0 0 22px 0; }
  .question-title {
    margin-block: 12px 20px;
    font-size: 28px;
    line-height: .98;
  }
  .question-kicker { letter-spacing: 1.05px; }
  .official-answer { margin-top: 18px; }
  .official-answer summary,
  .source-citation { padding-inline: 12px; }
  .controls { gap: 7px; padding-inline: 8px; }
  .button { padding-inline: 7px; font-size: 8px; letter-spacing: .7px; }
  .summary-panel { padding-inline: 12px; }
  .summary-grid div { padding-inline: 4px; }
  .summary-grid span { font-size: 7px; letter-spacing: .25px; }
}

@media (max-width: 720px) and (max-height: 500px) {
  header { height: 56px; }
  .title-block .mark { width: 34px; height: 34px; font-size: 16px; }
  .mobile-nav-toggle { top: 56px; min-height: 48px; }
  #sectionNav { top: 104px; }
  .mobile-nav-backdrop { inset-block-start: 104px; }
  .workspace { padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #stepCard { animation: none; }
  .workspace { animation: none; }
}
