:root {
  --navy: #0b2748;
  --blue: #0f5f9a;
  --sky: #eaf6ff;
  --gold: #f6b21a;
  --orange: #f47b20;
  --green: #2f8f5b;
  --red: #c84343;
  --ink: #18324a;
  --muted: #5e7183;
  --white: #ffffff;
  --line: #dbe7f0;
  --soft: #f7fbfe;
  --shadow: 0 14px 34px rgba(11, 39, 72, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #eef5fa;
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
}

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

.site-header {
  width: 100%;
  background: linear-gradient(135deg, #0b2748 0%, #0f5f9a 55%, #2f8fbb 100%);
  overflow: hidden;
}

.header-logo {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  object-position: center;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 39, 72, 0.97);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-inner a,
.nav-call {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-inner a:hover,
.nav-inner a:focus,
.nav-inner a.active {
  background: rgba(255, 255, 255, 0.15);
}

.nav-call {
  white-space: nowrap;
  background: var(--orange);
}

.nav-call:hover,
.nav-call:focus {
  background: #dc6813;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
}

.license-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 18px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 800;
}

.license-bar a {
  text-decoration: none;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.lesson-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 2px 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.lesson-breadcrumb a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.lesson-hero {
  margin: 6px 0 34px;
  padding: 50px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 20%, rgba(246, 178, 26, 0.28), transparent 28%),
    linear-gradient(135deg, #0b2748 0%, #0f5f9a 58%, #2f8fbb 100%);
  color: var(--white);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 34px;
  align-items: center;
}

.lesson-hero h1 {
  margin: 4px 0 10px;
  font-size: clamp(2rem, 4.5vw, 4.15rem);
  line-height: 1.05;
}

.lesson-hero p {
  margin-top: 0;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  color: #dff2ff;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lesson-hero .eyebrow,
.section-heading.light .eyebrow,
.promise-section .eyebrow,
.closing-section .eyebrow {
  color: #ffd46b;
}

.lesson-badge {
  min-height: 220px;
  padding: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 4px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  backdrop-filter: blur(8px);
}

.lesson-badge strong {
  display: block;
  margin-bottom: 10px;
  color: #ffd46b;
  font-size: 1.15rem;
}

.lesson-badge span {
  font-size: 1.08rem;
  font-weight: 800;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(246, 178, 26, 0.26);
}

.button.secondary {
  background: var(--white);
  color: var(--blue);
}

.lesson-image-section,
.content-section,
.quiz-section,
.two-column-section,
.promise-section,
.closing-section,
.welcome-card {
  margin: 34px 0;
}

.lesson-image-section,
.content-section,
.quiz-section {
  padding: 38px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 26px;
  text-align: center;
}

.section-heading h2,
.welcome-card h2,
.info-panel h2,
.promise-section h2,
.closing-section h2 {
  margin: 4px 0 10px;
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.15;
}

.lesson-poster-link {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(11, 39, 72, 0.18);
}

.lesson-poster-link img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lesson-poster-link span {
  display: block;
  padding: 13px;
  font-weight: 800;
}

.welcome-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff9e9, #fff3cc);
  border: 1px solid #f0d383;
  box-shadow: var(--shadow);
}

.speech-mark {
  color: var(--orange);
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
}

.signature {
  margin-bottom: 0;
  color: var(--blue);
  font-weight: 900;
}

.lesson-goal-grid,
.rule-category-grid,
.quiz-grid,
.find-grid {
  display: grid;
  gap: 20px;
}

.lesson-goal-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lesson-goal-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--soft);
  border: 1px solid var(--line);
  text-align: center;
}

.lesson-goal-card > span {
  display: block;
  margin-bottom: 10px;
  font-size: 2.3rem;
}

.lesson-goal-card h3,
.rule-category h3 {
  margin: 0 0 10px;
  color: var(--navy);
}

.lesson-rules-section {
  margin: 34px 0;
  padding: 42px;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #0b2748, #124f7e);
  box-shadow: var(--shadow);
}

.section-heading.light h2,
.section-heading.light p {
  color: var(--white);
}

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

.rule-category {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.rule-category h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rule-category h3 span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
}

.rule-category ul,
.info-panel ul {
  margin: 0;
  padding-left: 22px;
}

.rule-category li + li,
.info-panel li + li {
  margin-top: 8px;
}

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

.find-grid div {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #edf8f1;
  border: 1px solid #b9dfc7;
  color: #246b45;
  font-weight: 800;
}

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

.quiz-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--soft);
  overflow: hidden;
}

.quiz-card summary {
  cursor: pointer;
  padding: 18px 20px;
  color: var(--navy);
  font-weight: 900;
}

.quiz-card p {
  margin: 0;
  padding: 0 20px 20px;
}

.promise-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 30px;
  padding: 38px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f5f9a, #2f8fbb);
  color: var(--white);
  box-shadow: var(--shadow);
}

.promise-section h2 {
  color: var(--white);
}

.promise-lines p {
  margin: 18px 0;
  padding-top: 26px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
}

.promise-lines span {
  font-weight: 800;
}

.two-column-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.info-panel {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.info-panel.accent {
  background: #fff8e7;
  border-color: #f0d383;
}

.closing-section {
  padding: 44px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff7df, #ffe7a3);
  text-align: center;
  box-shadow: var(--shadow);
}

.closing-quote {
  color: var(--blue);
  font-size: 1.25rem;
  font-weight: 900;
}

.lesson-footer-actions {
  justify-content: center;
}

.site-footer {
  margin-top: 44px;
  padding: 28px 18px;
  background: var(--navy);
  color: #dbeaf6;
  text-align: center;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer a {
  color: #fff;
  font-weight: 800;
}

@media (max-width: 980px) {
  .lesson-hero {
    grid-template-columns: 1fr;
  }

  .lesson-badge {
    min-height: auto;
    border-radius: 22px;
  }

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

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

  .promise-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-logo {
    min-height: 150px;
    object-fit: cover;
  }

  .nav-shell {
    width: calc(100% - 20px);
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-inner {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 8px;
  }

  .nav-inner.open,
  .nav-toggle[aria-expanded="true"] + .nav-inner {
    display: flex;
  }

  .nav-inner a {
    text-align: center;
  }

  .nav-call {
    margin-left: auto;
    padding: 9px 12px;
    font-size: 0.92rem;
  }

  main {
    width: min(100% - 20px, var(--max));
  }

  .lesson-hero,
  .lesson-image-section,
  .content-section,
  .quiz-section,
  .lesson-rules-section,
  .promise-section,
  .closing-section {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .rule-category-grid,
  .quiz-grid,
  .two-column-section {
    grid-template-columns: 1fr;
  }

  .welcome-card {
    grid-template-columns: 44px 1fr;
    padding: 26px 20px;
  }

  .speech-mark {
    font-size: 3.6rem;
  }
}

@media (max-width: 520px) {
  .lesson-goal-grid,
  .find-grid {
    grid-template-columns: 1fr;
  }

  .lesson-hero h1 {
    font-size: 2.1rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .license-bar {
    gap: 6px;
    font-size: 0.86rem;
  }
}

@media print {
  .top-nav,
  .license-bar,
  .hero-actions,
  .lesson-breadcrumb,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  main {
    width: 100%;
  }

  .lesson-hero,
  .lesson-rules-section,
  .promise-section,
  .closing-section,
  .lesson-image-section,
  .content-section,
  .quiz-section,
  .welcome-card,
  .info-panel {
    box-shadow: none;
    break-inside: avoid;
  }
}

.connected-navigation {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.connected-navigation > div {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem;
  border: 3px solid #cce9f8;
  border-radius: 22px;
  background: #eef8ff;
}

@media (max-width: 640px) {
  .connected-navigation > div {
    align-items: stretch;
    flex-direction: column;
  }

  .connected-navigation .button {
    width: 100%;
    text-align: center;
  }
}


/* Riding Safety Activity Center */
.activity-hub {
  margin: 34px 0;
  padding: 42px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
  box-shadow: var(--shadow);
}

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

.activity-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(11, 39, 72, 0.08);
}

.activity-card h3 {
  margin: 8px 0 6px;
  color: var(--navy);
}

.activity-card p {
  flex: 1;
  margin-top: 0;
  color: var(--muted);
}

.activity-icon {
  font-size: 2.15rem;
  line-height: 1;
}

.activity-card .button,
.activity-card .print-button {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.activity-pack-callout {
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.activity-pack-callout h3 {
  margin: 0 0 6px;
}

.activity-pack-callout p {
  margin: 0;
}

@media (max-width: 980px) {
  .activity-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .activity-hub {
    padding: 26px 18px;
  }

  .activity-card-grid {
    grid-template-columns: 1fr;
  }

  .activity-pack-callout {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .top-nav,
  .license-bar,
  .lesson-breadcrumb,
  .hero-actions,
  .lesson-poster-link span,
  .activity-hub,
  .lesson-footer-actions,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  main {
    width: 100%;
    margin: 0;
  }

  .site-header {
    background: none;
  }

  .header-logo {
    max-height: 120px;
    object-fit: contain;
  }

  section,
  article,
  details {
    break-inside: avoid;
    box-shadow: none !important;
  }

  .lesson-hero,
  .lesson-rules-section,
  .promise-section,
  .closing-section {
    color: #000;
    background: #fff;
    border: 1px solid #bbb;
  }
}
