:root {
  color-scheme: light;
  --ink: #252525;
  --muted: #737373;
  --paper: #dcdde2;
  --panel: #ffffff;
  --line: #c8cad0;
  --brand: #2e8b57;
  --brand-dark: #20613d;
  --teal: #626167;
  --aqua: #edf4ef;
  --nav: #626167;
  --nav-2: #252525;
  --footer: #1d181e;
  --shadow: 0 14px 34px rgba(98, 97, 103, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 8px clamp(20px, 5vw, 64px);
  background: #fff;
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 10px 26px rgba(29, 24, 30, 0.14);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
}

.brand img {
  width: min(265px, 50vw);
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--nav);
  color: #fff;
  border-radius: 8px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  background: #fff;
}

.button-link {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  width: fit-content;
}

.button-link:hover {
  color: #fff;
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button-link.subtle {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.site-header .top-nav a {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(46, 139, 87, 0.28);
  color: var(--ink);
}

.site-header .top-nav a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.intro {
  display: grid;
  align-items: center;
  min-height: 520px;
  padding: 56px clamp(20px, 5vw, 64px);
  background: var(--brand);
  background-size: cover;
  background-position: center;
  color: #fff;
}

.intro > div,
.content-band,
.course-layout,
.lesson-layout {
  width: min(1180px, calc(100vw - 40px));
  margin-inline: auto;
}

.intro-video-panel {
  max-width: 940px;
}

.intro-video-panel .eyebrow {
  color: #edf4ef;
}

.intro-video-panel .video-frame {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.35);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-band {
  padding: 46px 0;
}

.content-band.compact {
  padding-top: 14px;
}

.simple-hero {
  width: min(1180px, calc(100vw - 40px));
  margin-inline: auto;
  padding: 48px 0 22px;
}

.simple-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.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.6rem, 3vw, 2.4rem);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.course-card,
.lesson-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.course-thumb {
  display: block;
  aspect-ratio: 36 / 25;
  background: var(--footer);
  overflow: hidden;
}

.course-thumb img,
.course-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.course-body h2 {
  min-height: 2.65em;
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.3;
}

.course-body h2 a {
  color: var(--ink);
}

.lesson-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lesson-index li {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lesson-index a {
  color: var(--ink);
  font-weight: 800;
}

.lesson-index span {
  color: var(--muted);
  font-size: 0.9rem;
}

.course-layout,
.lesson-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0 54px;
}

.side-nav {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.side-nav ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-nav a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
}

.side-nav a.active,
.side-nav a:hover {
  background: #edf7f7;
  color: #0f696a;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
  padding: 24px;
  border-radius: 8px;
  background: var(--nav);
  color: #fff;
}

.course-hero h1,
.lesson-article h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.course-hero-image {
  aspect-ratio: 36 / 25;
  overflow: hidden;
  border-radius: 8px;
  background: var(--nav-2);
}

.lesson-list {
  display: grid;
  gap: 12px;
}

.lesson-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.lesson-card > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #fff3e8;
  color: var(--brand-dark);
  font-weight: 900;
}

.lesson-card h2 {
  margin: 0 0 5px;
  font-size: 1.06rem;
}

.lesson-card h2 a {
  color: var(--ink);
}

.lesson-card p {
  margin: 0;
  color: var(--muted);
}

.lesson-article {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 700;
}

.lesson-content {
  margin-top: 24px;
  font-size: 1.02rem;
}

.lesson-content h2,
.lesson-content h3 {
  margin: 34px 0 12px;
  color: var(--nav);
}

.lesson-content .topic-section {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid rgba(46, 139, 87, 0.24);
  border-radius: 8px;
  background: #f6fbf7;
}

.lesson-content .topic-section h2:first-child {
  margin-top: 0;
}

.lesson-content p {
  margin: 0 0 18px;
}

.lesson-content a {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.lesson-content .resource-row {
  margin: 0 0 12px;
}

.lesson-content .resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf4ef;
  color: var(--ink);
  overflow-wrap: normal;
}

.lesson-content .resource-link:hover {
  border-color: rgba(46, 139, 87, 0.42);
  background: #dfeee4;
  color: var(--ink);
}

.resource-title {
  min-width: 0;
}

.resource-action {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 900;
}

.lesson-content .resource-inline {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid rgba(46, 139, 87, 0.32);
  border-radius: 8px;
  background: #edf4ef;
  color: var(--brand-dark);
  overflow-wrap: normal;
}

.lesson-content figure {
  margin: 24px 0;
}

.lesson-content figure img {
  width: auto;
  max-height: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lesson-content figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.video-frame {
  position: relative;
  width: 100%;
  margin: 22px 0;
  overflow: hidden;
  border-radius: 8px;
  background: #101322;
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lesson-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--nav), var(--teal));
  font-weight: 900;
}

.contact-panel {
  display: grid;
  gap: 14px;
  max-width: 720px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.contact-panel h2,
.contact-panel p {
  margin: 0;
}

.contact-panel p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 64px);
  background: var(--footer);
  color: #d7dbea;
}

.site-footer a {
  color: #fff;
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header,
  .site-footer,
  .section-heading,
  .lesson-card {
    align-items: stretch;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .course-layout,
  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
  }

  .course-hero {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .lesson-card .button-link {
    grid-column: 2;
  }

  .lesson-content .resource-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 520px) {
  .intro > div,
  .content-band,
  .simple-hero,
  .course-layout,
  .lesson-layout {
    width: min(100vw - 28px, 1180px);
  }

  .intro {
    min-height: auto;
    padding: 34px 0;
  }

  .lesson-article,
  .course-hero {
    padding: 18px;
  }

  .course-grid,
  .lesson-index {
    grid-template-columns: 1fr;
  }
}
