/* Math Olympiad overviews (SASMO + AMC).
 * Visual language follows Khan Academy Wonder Blocks foundations:
 * 8px spacing grid, #1865f2 primary, #21242c ink, hairline borders,
 * 4px buttons, generous whitespace. Type stays Be Vietnam Pro per project rules. */
.oly-page {
  --oly-blue: #1865f2;
  --oly-blue-dark: #1b50b3;
  --oly-blue-wash: #e9f0fd;
  --oly-ink: #21242c;
  --oly-gray: rgba(33, 36, 44, 0.64);
  --oly-faint: rgba(33, 36, 44, 0.32);
  --oly-line: rgba(33, 36, 44, 0.16);
  --oly-wash: #f7f8fa;
  --oly-green: #00a60e;
  --oly-gold: #ffb100;
  --oly-navy: #0b2149;
  --oly-teal: #14bf96;
  --oly-card-radius: 8px;
  --oly-btn-radius: 4px;
  background: #fff;
  color: var(--oly-ink);
  font-size: 16px;
  line-height: 1.5;
}
.oly-page :focus-visible {
  outline: 2px solid var(--oly-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
.oly-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Slim header, same shell pattern as other course maps. */
.oly-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--oly-line);
}
.oly-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--oly-btn-radius);
  background: transparent;
  color: var(--oly-blue);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.oly-back:hover { background: var(--oly-blue-wash); }
.oly-back svg { width: 20px; height: 20px; }
.oly-brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}
.oly-brand b { color: var(--oly-blue); }

/* Breadcrumb: small blue links with chevrons. */
.oly-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}
.oly-crumbs a { color: var(--oly-blue); text-decoration: none; }
.oly-crumbs a:hover { text-decoration: underline; text-underline-offset: 2px; }
.oly-crumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--oly-faint);
  font-weight: 400;
}
.oly-crumbs [aria-current="page"] { color: var(--oly-gray); font-weight: 500; }

/* Hero: split layout, text left and art right. */
.oly-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 40px;
}
.oly-eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--oly-blue);
}
.oly-hero h1 {
  margin: 0 0 16px;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.oly-hero h1 span { color: var(--oly-blue); }
.oly-lede {
  margin: 0 0 24px;
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--oly-gray);
}
.oly-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.oly-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--oly-btn-radius);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.oly-btn svg { width: 20px; height: 20px; }
.oly-btn--primary { background: var(--oly-blue); color: #fff; }
.oly-btn--primary:hover { background: var(--oly-blue-dark); }
.oly-btn--secondary { background: #fff; color: var(--oly-blue); border-color: var(--oly-blue); }
.oly-btn--secondary:hover { background: var(--oly-blue-wash); }
.oly-btn--light { background: #fff; color: var(--oly-navy); }
.oly-btn--light:hover { background: var(--oly-blue-wash); }
.oly-hero-art {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--oly-wash);
  border: 1px solid var(--oly-line);
}
.oly-hero-art img { display: block; width: 100%; height: auto; }

/* Stat strip: big numerals divided by hairlines. */
.oly-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid var(--oly-line);
  border-bottom: 1px solid var(--oly-line);
  list-style: none;
}
.oly-stats li { padding: 0 24px; }
.oly-stats li + li { border-left: 1px solid var(--oly-line); }
.oly-stats b { display: block; font-size: 28px; line-height: 1.15; font-weight: 800; }
.oly-stats span { font-size: 14px; color: var(--oly-gray); }

/* Sections share one rhythm: eyebrow, title, lede. */
.oly-section { padding-top: 56px; padding-bottom: 56px; }
.oly-section--wash { background: var(--oly-wash); }
.oly-section-head { max-width: 720px; margin-bottom: 32px; }
.oly-section-head h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.oly-section-head p { margin: 0; font-size: 16px; color: var(--oly-gray); }

/* Grade cards: Khan unit cards with progress. */
.oly-grades {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.oly-grades--two { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.oly-grade {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--oly-line);
  border-radius: var(--oly-card-radius);
  padding: 24px;
  transition: box-shadow 150ms ease;
}
.oly-grade:hover { box-shadow: 0 8px 24px rgba(11, 33, 73, 0.12); }
.oly-grade-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.oly-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--grade-color, var(--oly-blue)); flex: none; }
.oly-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--grade-soft, var(--oly-blue-wash));
  color: var(--grade-color, var(--oly-blue));
  font-size: 13px;
  font-weight: 700;
}
.oly-grade-classes { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--oly-gray); }
.oly-grade h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; font-weight: 800; }
.oly-grade p { margin: 0 0 16px; font-size: 15px; color: var(--oly-gray); }
.oly-grade-meta {
  display: flex;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}
.oly-grade-meta span { display: block; font-size: 12px; font-weight: 500; color: var(--oly-faint); }
.oly-progress { margin: 0 0 8px; }
.oly-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(33, 36, 44, 0.08);
  overflow: hidden;
}
.oly-progress-track b { display: block; height: 100%; border-radius: inherit; background: var(--oly-green); }
.oly-progress figcaption { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--oly-gray); }
.oly-grade-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 16px; }
.oly-grade-actions .oly-btn { min-height: 44px; padding: 0 20px; font-size: 15px; flex: 1 1 auto; }
.oly-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--oly-blue);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.oly-link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.oly-link-btn svg { width: 18px; height: 18px; }

/* Topics: numbered rows in two columns. */
.oly-topic-group { margin-bottom: 40px; scroll-margin-top: 16px; }
.oly-topic-group:last-child { margin-bottom: 0; }
.oly-topic-group > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
}
.oly-topic-group > p { margin: 0 0 20px; color: var(--oly-gray); font-size: 15px; }
.oly-topics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.oly-topics li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--oly-line);
}
.oly-topic-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--oly-blue-wash);
  color: var(--oly-blue);
  font-size: 15px;
  font-weight: 800;
}
.oly-topics b { display: block; font-size: 16px; font-weight: 700; }
.oly-topics span { font-size: 14px; color: var(--oly-gray); }

/* Format band: light blue panel with trio of facts. */
.oly-format {
  border-radius: 16px;
  background: var(--oly-blue-wash);
  padding: 32px;
}
.oly-format h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.oly-format > p { margin: 0 0 24px; color: var(--oly-gray); max-width: 68ch; }
.oly-format-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.oly-format-facts li {
  background: #fff;
  border-radius: var(--oly-card-radius);
  padding: 20px;
}
.oly-format-facts b { display: block; font-size: 24px; font-weight: 800; color: var(--oly-blue); }
.oly-format-facts span { font-size: 14px; color: var(--oly-gray); }
.oly-format-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  font-size: 15px;
}
.oly-format-note svg { flex: none; width: 22px; height: 22px; color: var(--oly-blue); margin-top: 1px; }

/* Steps: oversized numerals with hairline dividers. */
.oly-steps { margin: 0; padding: 0; list-style: none; }
.oly-steps li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 24px 0;
  align-items: start;
}
.oly-steps li + li { border-top: 1px solid var(--oly-line); }
.oly-step-num { font-size: 40px; line-height: 1; font-weight: 900; color: var(--oly-blue); opacity: 0.9; }
.oly-steps h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.oly-steps p { margin: 0; color: var(--oly-gray); max-width: 68ch; }

/* FAQ: native accordions. */
.oly-faq { margin: 0; }
.oly-faq details {
  border: 1px solid var(--oly-line);
  border-radius: var(--oly-card-radius);
  background: #fff;
  margin-bottom: 12px;
}
.oly-faq details:last-child { margin-bottom: 0; }
.oly-faq summary {
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.oly-faq summary::-webkit-details-marker { display: none; }
.oly-faq summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--oly-blue-wash);
  color: var(--oly-blue);
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  font-weight: 700;
}
.oly-faq details[open] summary::after { content: "–"; }
.oly-faq details p { margin: 0; padding: 0 20px 20px; color: var(--oly-gray); }

/* Closing band: deep navy with a gold star row. */
.oly-cta {
  border-radius: 16px;
  background: var(--oly-navy);
  color: #fff;
  padding: 48px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.oly-cta-stars { display: flex; gap: 4px; margin-bottom: 16px; color: var(--oly-gold); }
.oly-cta-stars svg { width: 22px; height: 22px; }
.oly-cta h2 { margin: 0 0 12px; font-size: 28px; line-height: 1.2; font-weight: 800; text-wrap: balance; }
.oly-cta p { margin: 0; font-size: 16px; color: rgba(255, 255, 255, 0.82); max-width: 52ch; }
.oly-cross {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--oly-line);
  border-radius: var(--oly-card-radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.oly-cross:hover { box-shadow: 0 8px 24px rgba(11, 33, 73, 0.12); }
.oly-cross-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--oly-blue-wash);
  color: var(--oly-blue);
}
.oly-cross-icon svg { width: 26px; height: 26px; }
.oly-cross b { display: block; font-size: 17px; }
.oly-cross span { font-size: 14px; color: var(--oly-gray); }
.oly-cross > svg { width: 22px; height: 22px; margin-left: auto; color: var(--oly-blue); flex: none; }

@media (max-width: 960px) {
  .oly-hero { grid-template-columns: 1fr; gap: 32px; }
  .oly-hero-art { max-width: 560px; }
  .oly-grades { grid-template-columns: 1fr; }
  .oly-grades--two { max-width: none; }
  .oly-stats { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
  .oly-stats li:nth-child(3) { border-left: 0; }
  .oly-format-facts { grid-template-columns: 1fr; }
  .oly-cta { grid-template-columns: 1fr; padding: 32px 24px; }
}
@media (max-width: 640px) {
  .oly-container { padding-left: 16px; padding-right: 16px; }
  .oly-hero h1 { font-size: 30px; }
  .oly-lede { font-size: 16px; }
  .oly-section { padding-top: 40px; padding-bottom: 40px; }
  .oly-section-head h2 { font-size: 24px; }
  .oly-topics { grid-template-columns: 1fr; }
  .oly-stats b { font-size: 24px; }
  .oly-stats li { padding: 0 16px; }
  .oly-steps li { grid-template-columns: 52px 1fr; gap: 16px; }
  .oly-step-num { font-size: 32px; }
  .oly-format { padding: 24px 20px; }
  .oly-btn { width: 100%; }
  .oly-hero-actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .oly-page *, .oly-page *::before, .oly-page *::after { transition: none !important; animation: none !important; }
}
