:root {
  --navy: #0c315f;
  --navy-2: #102a4d;
  --gold: #d6a23f;
  --gold-dark: #b9801f;
  --ink: #172033;
  --muted: #657087;
  --paper: #fffdf8;
  --cream: #f7f3e9;
  --white: #ffffff;
  --line: #e8e2d5;
  --success: #25734f;
  --danger: #9c3e3e;
  --shadow: 0 18px 48px rgba(16, 42, 77, .10);
  --radius: 24px;
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--gold-dark); }
button, input { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--navy);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(232,226,213,.86);
  background: rgba(255,253,248,.94);
  backdrop-filter: blur(14px);
}
.header-inner {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  flex: 0 1 310px;
  min-width: 190px;
  text-decoration: none;
}
.brand img { width: 300px; max-height: 62px; object-fit: contain; object-position: left center; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--navy);
  border-radius: 14px;
  padding: 10px 12px;
}
.site-nav { display: flex; align-items: center; gap: 6px; }
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.nav-link, .nav-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  color: var(--navy-2);
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  background: transparent;
  border: 0;
}
.nav-link:hover, .nav-button:hover, .nav-link[aria-current="page"] {
  background: var(--cream);
  color: var(--navy);
}
.nav-item { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  width: 320px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  background: var(--white);
  display: none;
}
.nav-item.open .dropdown, .nav-item:hover .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 650;
  color: var(--navy-2);
}
.dropdown a:hover { background: var(--cream); color: var(--navy); }
.chevron { font-size: .8em; transition: transform .2s ease; }
.nav-item.open .chevron { transform: rotate(180deg); }

.container {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
}
.hero {
  padding: 86px 0 64px;
  background:
    radial-gradient(circle at 85% 15%, rgba(214,162,63,.17), transparent 28%),
    radial-gradient(circle at 15% 35%, rgba(12,49,95,.08), transparent 32%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 60px;
}
.eyebrow {
  color: var(--gold-dark);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}
.hero h1, .page-hero h1 {
  margin: 10px 0 18px;
  color: var(--navy-2);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.hero h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); }
.page-hero h1 { font-size: clamp(2.5rem, 5vw, 4.4rem); }
.lead {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  color: #44506a;
  max-width: 760px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  background: var(--gold);
  color: var(--navy-2);
  box-shadow: 0 12px 30px rgba(214,162,63,.24);
}
.button-primary:hover { background: #e2ad48; color: var(--navy-2); }
.button-secondary {
  background: white;
  border-color: var(--line);
  color: var(--navy);
}
.button-secondary:hover { box-shadow: var(--shadow); }

.hero-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.hero-card .icon-bubble {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  background: var(--cream);
  border-radius: 20px;
  font-size: 2rem;
  margin-bottom: 18px;
}
.hero-card h2 { margin: 0 0 10px; color: var(--navy-2); line-height: 1.2; }
.hero-card p { color: var(--muted); margin-bottom: 0; }

.section { padding: 72px 0; }
.section.alt { background: var(--cream); }
.section-title {
  max-width: 760px;
  margin-bottom: 30px;
}
.section-title h2 {
  color: var(--navy-2);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.section-title p { color: var(--muted); font-size: 1.08rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 32px rgba(16,42,77,.06);
}
.card h3 { color: var(--navy-2); margin: 10px 0 8px; line-height: 1.2; }
.card p { color: var(--muted); margin: 0 0 18px; }
.card-link { font-weight: 800; text-decoration: none; }
.card-icon { font-size: 1.75rem; }

.video-shell {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #0e1726;
  box-shadow: var(--shadow);
}
.video-frame {
  position: relative;
  aspect-ratio: 16/9;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.page-hero {
  padding: 70px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 15%, rgba(214,162,63,.14), transparent 32%),
    linear-gradient(180deg, #fffdf8 0%, #fbf7ee 100%);
}
.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .92rem;
  color: var(--muted);
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--navy); }

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 760px) 1fr;
  gap: 60px;
  align-items: start;
  padding: 56px 0 80px;
}
.article {
  font-size: 1.06rem;
}
.article h2 {
  color: var(--navy-2);
  font-size: 1.8rem;
  margin: 2.3em 0 .6em;
  line-height: 1.2;
  letter-spacing: -.018em;
}
.article h3 {
  color: var(--navy-2);
  font-size: 1.3rem;
  margin: 1.8em 0 .55em;
}
.article p { margin: 0 0 1.2em; }
.article ul, .article ol { padding-left: 1.25em; margin: 0 0 1.4em; }
.article li { margin: .45em 0; }
.article strong { color: var(--navy-2); }
.article blockquote {
  margin: 28px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--gold);
  background: var(--cream);
  border-radius: 0 16px 16px 0;
}
.callout {
  margin: 28px 0;
  padding: 22px;
  border: 1px solid #ecd8a9;
  background: #fff9e9;
  border-radius: 18px;
}
.callout h3 { margin-top: 0; }
.disclaimer {
  margin-top: 34px;
  padding: 20px 22px;
  background: #f5f7fa;
  color: #556176;
  border-radius: 16px;
  font-size: .94rem;
}
.sidebar {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 16px;
}
.sidebar-box {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  background: white;
  box-shadow: 0 10px 30px rgba(16,42,77,.05);
}
.sidebar-box h3 { margin: 0 0 10px; color: var(--navy-2); }
.sidebar-box p { color: var(--muted); margin: 0 0 16px; }
.sidebar-links { list-style: none; padding: 0; margin: 0; }
.sidebar-links li + li { margin-top: 9px; }
.sidebar-links a { text-decoration: none; font-weight: 700; }

.about-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(26px, 5vw, 50px);
  box-shadow: var(--shadow);
}
.about-panel p { font-size: 1.1rem; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 30px 0;
}
.stat {
  padding: 20px;
  border-radius: 18px;
  background: var(--cream);
}
.stat strong {
  display: block;
  color: var(--navy);
  font-size: 1.7rem;
  line-height: 1.1;
}
.stat span { color: var(--muted); font-size: .93rem; }

.quiz-shell {
  max-width: 800px;
  margin: 0 auto;
}
.quiz-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 44px);
}
.quiz-card h2, .quiz-card h3 { color: var(--navy-2); }
.quiz-intro { text-align: center; }
.quiz-intro .house { font-size: 3rem; margin-bottom: 10px; }
.quiz-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 9px 0;
  background: #fff;
}
.quiz-option:hover { background: #fffaf0; border-color: #e5c986; }
.quiz-option input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--gold-dark);
}
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e7e9ed;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .25s ease;
}
.quiz-result {
  text-align: center;
}
.quiz-score {
  font-size: clamp(3.6rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 1;
  color: var(--gold-dark);
  margin: 10px 0 22px;
}
.missed {
  text-align: left;
  margin: 26px auto 0;
  padding: 20px;
  border-radius: 18px;
  background: var(--cream);
}
.hidden { display: none !important; }

.site-footer {
  background: var(--navy-2);
  color: #eaf0f8;
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}
.footer-logo {
  width: 270px;
  filter: brightness(0) invert(1);
  opacity: .96;
  margin-bottom: 16px;
}
.site-footer h3 { color: white; margin-top: 0; }
.site-footer p { color: #cbd5e1; }
.site-footer a { color: #f2c66e; text-decoration: none; }
.site-footer a:hover { color: white; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 8px; }
.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.15);
  color: #aebbd0;
  font-size: .9rem;
}

@media (max-width: 960px) {
  .hero-grid, .article-wrap { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .sidebar { position: static; order: -1; }
  .sidebar-box.toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .header-inner { min-height: 72px; }
  .brand img { width: 230px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 7px; }
  .site-nav {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 76px;
    display: none;
    padding: 12px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-link, .nav-button { width: 100%; justify-content: space-between; }
  .dropdown {
    position: static;
    width: auto;
    box-shadow: none;
    border: 0;
    padding: 4px 0 0 12px;
  }
  .nav-item:hover .dropdown { display: none; }
  .nav-item.open .dropdown { display: block; }
  .hero { padding-top: 56px; }
  .cards, .stat-row, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
}
@media (max-width: 480px) {
  .container, .header-inner { width: min(100% - 28px, var(--content)); }
  .brand { min-width: 160px; }
  .brand img { width: 205px; }
  .hero h1 { font-size: 2.65rem; }
  .page-hero h1 { font-size: 2.35rem; }
  .hero-actions, .quiz-controls { flex-direction: column; }
  .button, .quiz-controls .button { width: 100%; }
}
@media (min-width: 761px) {
  .nav-item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
  }
}
