:root {
  --navy-950: #061537;
  --navy-900: #0a225a;
  --navy-800: #0b2f7f;
  --navy-700: #1245a8;
  --red-600: #dc1010;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #f4f6fa;
  --text: #142033;
  --muted: #5f6878;
  --line: #dfe4ec;
  --shadow: 0 16px 42px rgba(10, 34, 90, 0.11);
  --shadow-soft: 0 8px 24px rgba(10, 34, 90, 0.08);
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --container: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(18, 69, 168, 0.065), transparent 31rem),
    linear-gradient(180deg, #fff 0%, var(--paper) 62%, #f5f7fb 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: .6rem;
  color: #fff;
  background: var(--navy-950);
  transform: translateY(-180%);
  transition: transform .18s ease;
}

.skip-link:focus { transform: translateY(0); }

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

.site-header { padding: 20px 0 10px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand img {
  width: 42px;
  height: 42px;
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-text small {
  margin-top: .28rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}

main { padding: 30px 0 68px; }

.hero { padding: 16px 0 24px; }

.eyebrow {
  margin: 0 0 .65rem;
  color: var(--red-600);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--navy-950);
  line-height: 1.12;
  letter-spacing: -.035em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
}

h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }

p { margin-top: 0; }

.lead {
  max-width: 680px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.products-grid {
  display: grid;
  gap: 24px;
}

.product-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(11, 47, 127, .12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.product-cover-wrap {
  position: relative;
  justify-self: center;
  width: min(100%, 210px);
}

.product-cover-wrap::before {
  content: "";
  position: absolute;
  inset: 12% -10% -5%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 47, 127, .16), rgba(11, 47, 127, 0) 70%);
  filter: blur(17px);
}

.product-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 15px 30px rgba(4, 22, 64, .2);
}

.product-content { max-width: 620px; }

.product-kicker {
  margin-bottom: .55rem;
  color: var(--red-600);
  font-weight: 800;
}

.product-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
}

.product-subtitle {
  margin: .45rem 0 1rem;
  color: var(--navy-700);
  font-size: 1.12rem;
  font-weight: 800;
}

.product-description {
  color: var(--muted);
  font-size: 1.05rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.45rem;
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .82rem 1.22rem;
  border: 1px solid transparent;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.2;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  box-shadow: 0 10px 24px rgba(11, 47, 127, .23);
}

.btn-primary:hover { box-shadow: 0 13px 28px rgba(11, 47, 127, .3); }

.btn-secondary {
  color: var(--navy-900);
  background: #fff;
  border-color: #bfc9d9;
}

.btn-secondary:hover { background: var(--surface-soft); }

.btn-ghost {
  color: var(--navy-800);
  background: rgba(11, 47, 127, .06);
}

.btn[aria-disabled="true"] {
  opacity: .48;
  pointer-events: none;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-bottom: 1.35rem;
  color: var(--muted);
  font-size: .94rem;
}

.breadcrumbs a {
  color: var(--navy-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.course-hero {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 38px);
  align-items: center;
  padding: clamp(21px, 4vw, 32px);
  border: 1px solid rgba(11, 47, 127, .12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-soft);
}

.course-cover {
  justify-self: center;
  width: 128px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 11px 24px rgba(4, 22, 64, .17);
}

.course-hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.25rem);
}

.course-subtitle {
  margin: .5rem 0 .75rem;
  color: var(--navy-700);
  font-size: 1.08rem;
  font-weight: 800;
}

.course-description {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.section-heading { margin: 44px 0 19px; }

.section-heading h2 { margin: 0 0 .45rem; }

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

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

.lesson-card {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  justify-content: space-between;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(10, 34, 90, .06);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.lesson-card:hover {
  transform: translateY(-3px);
  border-color: rgba(11, 47, 127, .35);
  box-shadow: 0 12px 28px rgba(10, 34, 90, .12);
}

.lesson-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy-800);
  font-weight: 900;
}

.lesson-card h3 {
  margin: 1.05rem 0 .35rem;
  font-size: 1.28rem;
}

.lesson-card span:last-child {
  color: var(--navy-700);
  font-weight: 800;
}

.lesson-shell {
  max-width: 820px;
  margin-inline: auto;
}

.lesson-panel {
  padding: clamp(24px, 5vw, 50px);
  border: 1px solid rgba(11, 47, 127, .13);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
  text-align: center;
}

.lesson-badge {
  display: inline-grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 1.05rem;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--red-600), #f13b2f);
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(220, 16, 16, .22);
}

.lesson-panel h1 {
  font-size: clamp(2.35rem, 8vw, 4.4rem);
}

.lesson-course-name {
  margin: .75rem 0 .35rem;
  color: var(--navy-700);
  font-weight: 800;
}

.lesson-note {
  max-width: 610px;
  margin: 1.2rem auto 0;
  color: var(--muted);
}

.video-actions {
  display: grid;
  gap: 12px;
  max-width: 500px;
  margin: 2rem auto 0;
}

.video-actions .btn {
  width: 100%;
  min-height: 58px;
  font-size: 1.05rem;
}

.alternative-help {
  max-width: 610px;
  margin: .75rem auto 0;
  color: var(--muted);
  font-size: .92rem;
}

.lesson-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.lesson-nav .next { justify-self: end; }
.lesson-nav .all { justify-self: center; }

.notice,
.error-box {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface-soft);
}

.error-box {
  color: #7c1717;
  background: #fff3f2;
  border-color: #efc8c4;
}

.loading { color: var(--muted); }

.site-footer {
  padding: 28px 0 38px;
  border-top: 1px solid rgba(11, 47, 127, .10);
  color: var(--muted);
  font-size: .94rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner a { color: var(--navy-700); }

.not-found {
  max-width: 720px;
  margin: 7vh auto 0;
  text-align: center;
}

.not-found-code {
  margin: 0;
  color: var(--navy-800);
  font-size: clamp(5rem, 20vw, 11rem);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: .9;
}

.not-found h1 { margin-top: 1.4rem; }
.not-found p { color: var(--muted); }

.redirect-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.redirect-card {
  max-width: 560px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.redirect-card h1 {
  margin-top: 0;
  font-size: 1.8rem;
}

.redirect-card a { color: var(--navy-700); }

:focus-visible {
  outline: 3px solid rgba(220, 16, 16, .55);
  outline-offset: 4px;
}

@media (max-width: 820px) {
  .product-card {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
  }

  .product-cover-wrap { width: 178px; }

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

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .site-header { padding-top: 14px; }

  .brand-text small { display: none; }

  main { padding-top: 20px; }

  .hero {
    padding-top: 8px;
    text-align: center;
  }

  .lead { margin-inline: auto; }

  .product-card {
    grid-template-columns: 1fr;
    padding: 21px;
    text-align: center;
  }

  .product-cover-wrap {
    width: min(48vw, 176px);
  }

  .button-row { justify-content: center; }

  .btn { width: 100%; }

  .course-hero {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    text-align: left;
  }

  .course-cover { width: 100px; }

  .course-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }

  .course-hero .eyebrow {
    font-size: .72rem;
    letter-spacing: .075em;
  }

  .course-description { font-size: .94rem; }

  .lessons-grid { grid-template-columns: 1fr; }

  .lesson-card { min-height: 126px; }

  .lesson-nav {
    grid-template-columns: 1fr 1fr;
  }

  .lesson-nav .all {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .lesson-nav .prev,
  .lesson-nav .next {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .course-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .course-cover { width: 112px; }
}

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