:root {
  --bg: #06111f;
  --bg-2: #0a1a2d;
  --surface: #10243c;
  --surface-2: #173250;
  --surface-3: #203c5b;
  --text: #f5f9ff;
  --muted: #b7c6d8;
  --line: #2c4868;
  --brand: #2f9cf4;
  --brand-2: #78c7ff;
  --green: #46d483;
  --green-bg: rgba(70, 212, 131, 0.12);
  --red: #ff7e8b;
  --red-bg: rgba(255, 126, 139, 0.12);
  --yellow: #ffd36a;
  --violet: #b29bff;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(13, 36, 61, 0.94), rgba(6, 17, 31, 0.98) 42%, #06111f),
    repeating-linear-gradient(90deg, rgba(120, 199, 255, 0.04) 0 1px, transparent 1px 76px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--brand-2);
}

a:hover {
  color: white;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  color: #06111f;
  background: var(--yellow);
  border-radius: var(--radius);
  font-weight: 850;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(120, 199, 255, 0.14);
  background: rgba(6, 17, 31, 0.88);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  font-weight: 950;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #06111f;
  background: linear-gradient(135deg, var(--brand-2), var(--green));
  border-radius: 8px;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 750;
}

.topbar-nav a:hover {
  color: white;
}

.hero {
  padding: clamp(46px, 7vw, 88px) 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--brand-2);
  border: 1px solid rgba(120, 199, 255, 0.28);
  border-radius: 999px;
  background: rgba(47, 156, 244, 0.09);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 18px 0 0;
  max-width: 920px;
  font-size: clamp(2.25rem, 6vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.nav-row,
.answer-actions,
.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-actions,
.home-actions {
  margin-top: 28px;
}

.btn {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #06111f;
  background: linear-gradient(135deg, var(--brand-2), var(--green));
}

.btn-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  color: #ffe9ec;
  border-color: rgba(255, 126, 139, 0.35);
  background: rgba(255, 126, 139, 0.08);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.hero-panel,
.blueprint-panel,
.stat-card,
.toolbar,
.question-card,
.side-card,
.resources-card,
.cert-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 36, 60, 0.92);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
}

.hero-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
  object-fit: cover;
  border: 1px solid rgba(120, 199, 255, 0.16);
  border-radius: var(--radius);
}

.hero-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-metric {
  min-height: 112px;
  padding: 17px;
  border: 1px solid rgba(120, 199, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(6, 17, 31, 0.38);
}

.mini-label,
.stat-label,
.question-number {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-value {
  margin-top: 7px;
  font-size: 2rem;
  font-weight: 950;
}

.certifications {
  padding: 20px 0 72px;
}

.certifications,
.resources {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.section-heading p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cert-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  min-height: 315px;
  padding: 22px;
  box-shadow: none;
}

.cert-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cert-code {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #06111f;
  background: linear-gradient(135deg, var(--brand-2), var(--yellow));
  border-radius: var(--radius);
  font-weight: 950;
}

.cert-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.cert-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #dbe9f7;
  border: 1px solid rgba(120, 199, 255, 0.18);
  border-radius: 999px;
  background: rgba(6, 17, 31, 0.3);
  font-size: 0.78rem;
  font-weight: 800;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid #19324f;
  border-radius: 999px;
  background: #06111f;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--green));
  transition: width 0.25s ease;
}

.exam-hero {
  padding: 38px 0 28px;
}

.exam-hero .hero-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  align-items: stretch;
}

.blueprint-panel {
  padding: 24px;
  box-shadow: none;
}

.blueprint-panel h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.blueprint-panel > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.weight-list {
  display: grid;
  gap: 10px;
}

.weight-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.weight-label {
  font-size: 0.82rem;
  font-weight: 800;
}

.weight-value {
  color: var(--brand-2);
  font-size: 0.8rem;
  font-weight: 950;
}

.weight-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #06111f;
}

.weight-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--violet), var(--green));
}

.notice {
  margin: 22px 0 0;
  padding: 15px 17px;
  color: #f8e9bd;
  border: 1px solid rgba(255, 211, 106, 0.25);
  border-radius: var(--radius);
  background: rgba(255, 211, 106, 0.075);
  font-size: 0.9rem;
}

.dashboard {
  padding: 10px 0 56px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.stat-card {
  min-height: 96px;
  padding: 18px;
  box-shadow: none;
}

.stat-value {
  margin-top: 4px;
  font-size: 1.55rem;
  font-weight: 950;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  box-shadow: none;
}

.category-filters {
  display: flex;
  flex: 1 1 690px;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 850;
}

.filter-btn[aria-pressed="true"] {
  color: #06111f;
  border-color: transparent;
  background: var(--brand-2);
}

.progress-block {
  margin-bottom: 16px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.question-card {
  min-height: 610px;
  padding: clamp(22px, 4vw, 38px);
}

.question-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-badge,
.selection-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.category-badge {
  color: var(--brand-2);
  background: rgba(47, 156, 244, 0.11);
}

.selection-badge {
  color: #faeac0;
  background: rgba(255, 211, 106, 0.09);
}

.bookmark-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  font-size: 1.1rem;
}

.bookmark-btn.active {
  color: var(--yellow);
  border-color: rgba(255, 211, 106, 0.42);
  background: rgba(255, 211, 106, 0.08);
}

.question-number {
  margin: 22px 0 8px;
}

.question-card h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.8vw, 1.95rem);
  line-height: 1.3;
  letter-spacing: 0;
}

.option-list {
  display: grid;
  gap: 11px;
  margin-top: 27px;
}

.option-btn {
  display: grid;
  grid-template-columns: 36px 1fr 24px;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 12px 15px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 17, 32, 0.36);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: rgba(47, 156, 244, 0.08);
  transform: translateY(-1px);
}

.option-key {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--brand-2);
  border-radius: var(--radius);
  background: rgba(47, 156, 244, 0.12);
  font-weight: 950;
}

.option-check {
  color: transparent;
  font-weight: 950;
  text-align: center;
}

.option-btn.selected {
  border-color: var(--brand-2);
  background: rgba(47, 156, 244, 0.12);
}

.option-btn.selected .option-check {
  color: var(--brand-2);
}

.option-btn.correct {
  border-color: rgba(70, 212, 131, 0.75);
  background: var(--green-bg);
}

.option-btn.correct .option-key {
  color: #061b10;
  background: var(--green);
}

.option-btn.correct .option-check {
  color: var(--green);
}

.option-btn.incorrect {
  border-color: rgba(255, 126, 139, 0.75);
  background: var(--red-bg);
}

.option-btn.incorrect .option-key {
  color: #2a060b;
  background: var(--red);
}

.option-btn.incorrect .option-check {
  color: var(--red);
}

.option-btn.dimmed {
  opacity: 0.56;
}

.answer-actions {
  justify-content: space-between;
  margin-top: 16px;
}

.selection-count {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.feedback {
  display: none;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 17, 32, 0.46);
}

.feedback.visible {
  display: block;
  animation: rise 0.2s ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.feedback-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-weight: 950;
}

.feedback-status.correct-text {
  color: var(--green);
}

.feedback-status.incorrect-text {
  color: var(--red);
}

.feedback h3 {
  margin: 16px 0 7px;
  color: var(--brand-2);
  font-size: 0.86rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.feedback p {
  margin: 0;
  color: #d7e3f0;
}

.tip-box {
  margin-top: 14px;
  padding: 13px 15px;
  color: #faeac0;
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  background: rgba(255, 211, 106, 0.07);
}

.nav-row {
  justify-content: space-between;
  margin-top: 22px;
}

.nav-row .btn {
  min-width: 120px;
}

.side-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 19px;
  box-shadow: none;
}

.side-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.side-card .btn {
  width: 100%;
  margin-top: 10px;
}

.shortcut-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.84rem;
  list-style: none;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  padding: 2px 6px;
  color: white;
  border: 1px solid #426388;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #0a1b2f;
  font-size: 0.76rem;
  font-weight: 850;
}

.resources {
  padding: 0 0 64px;
}

.resources-card {
  padding: clamp(24px, 4vw, 38px);
  box-shadow: none;
}

.resources-card h2 {
  margin-top: 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.resource-link {
  display: block;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 17, 32, 0.32);
  text-decoration: none;
}

.resource-link strong {
  display: block;
  color: white;
}

.resource-link span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.83rem;
}

.footer-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid,
  .exam-hero .hero-grid,
  .study-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid,
  .cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .hero {
    padding-top: 30px;
  }

  .hero-panel-grid,
  .stats-grid,
  .side-panel,
  .resource-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .question-card {
    min-height: auto;
    padding: 22px 17px;
  }

  .nav-row,
  .answer-actions {
    flex-wrap: wrap;
  }

  .nav-row .btn,
  .answer-actions .btn,
  .hero-actions .btn,
  .home-actions .btn {
    flex: 1 1 180px;
  }

  .option-btn {
    grid-template-columns: 32px 1fr 20px;
    gap: 10px;
    padding: 11px 12px;
  }
}

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