:root {
  --ink: #24262b;
  --muted: #5f6470;
  --paper: #ffffff;
  --panel: #f4f6f8;
  --line: #d9dee5;
  --brand: #169b73;
  --brand-dark: #0f6f55;
  --accent: #fff3b0;
  --nav: #282b33;
  --soft-green: #dff5ec;
  --soft-yellow: #fff4c7;
  --soft-blue: #dfeeff;
  --soft-rose: #ffe2de;
  --soft-lilac: #eee5ff;
  --shadow: 0 14px 35px rgba(24, 31, 41, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 62px;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 7px;
  font-size: 20px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.main-nav {
  display: flex;
  align-items: stretch;
  min-height: 62px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--brand);
  color: #fff;
  outline: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 0 18px;
}

.search-mini {
  position: relative;
}

.search-mini input {
  width: 210px;
  padding: 10px 42px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.search-mini button,
.hero-search button {
  border: 0;
  cursor: pointer;
}

.search-mini button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  border-radius: 22px;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
}

.pill:hover,
.pill:focus-visible {
  background: var(--brand-dark);
}

.topic-bar {
  position: sticky;
  top: 62px;
  z-index: 19;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  background: var(--nav);
  scrollbar-width: thin;
}

.topic-bar a {
  flex: 0 0 auto;
  padding: 11px 17px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.topic-bar a:hover,
.topic-bar a:focus-visible,
.topic-bar a.active {
  background: var(--brand);
  outline: 0;
}

.hero {
  display: grid;
  min-height: 430px;
  place-items: center;
  padding: 58px 20px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(22, 155, 115, .36), transparent 28%),
    radial-gradient(circle at 78% 12%, rgba(255, 243, 176, .25), transparent 22%),
    linear-gradient(135deg, #20232d 0%, #171b24 100%);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 64px;
  line-height: 1.05;
}

.hero p {
  margin: 0 0 30px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
}

.hero-search {
  display: flex;
  width: min(100%, 560px);
  margin: 0 auto 24px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  border: 0;
}

.hero-search button {
  min-width: 98px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.hero-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 22px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--brand);
}

.button.light {
  color: var(--ink);
  background: #fff;
}

.button:hover,
.button:focus-visible {
  filter: brightness(.94);
  outline: 3px solid rgba(22, 155, 115, .25);
}

.course-band {
  padding: 54px 20px;
}

.course-band:nth-of-type(even) {
  background: var(--panel);
}

.course-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 34px;
  width: min(1120px, 100%);
  margin: 0 auto;
  align-items: center;
}

.course-copy {
  text-align: center;
}

.course-copy h2 {
  margin: 0;
  font-size: 54px;
  line-height: 1.05;
}

.course-copy p {
  max-width: 520px;
  margin: 18px auto 24px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.cta-stack {
  display: grid;
  gap: 12px;
  justify-content: center;
}

.code-card {
  min-width: 0;
  padding: 22px;
  background: #eef1f4;
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.code-card h3 {
  margin: 0 0 12px;
}

pre {
  margin: 0;
  overflow-x: auto;
  border-left: 5px solid var(--brand);
  background: #fff;
}

code {
  display: block;
  padding: 16px;
  color: #25303b;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 15px;
}

.cards-section,
.wide-section {
  padding: 60px 20px;
}

.section-title {
  width: min(1120px, 100%);
  margin: 0 auto 28px;
  text-align: center;
}

.section-title h2 {
  margin: 0 0 8px;
  font-size: 38px;
}

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

.topic-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.topic-card {
  padding: 26px;
  border-radius: 7px;
  background: var(--soft-green);
  min-height: 220px;
}

.topic-card:nth-child(2n) {
  background: var(--soft-yellow);
}

.topic-card:nth-child(3n) {
  background: var(--soft-blue);
}

.topic-card:nth-child(4n) {
  background: var(--soft-rose);
}

.topic-card:nth-child(5n) {
  background: var(--soft-lilac);
}

.topic-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.topic-card p {
  color: #3f4650;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.feature {
  padding: 30px;
  border-radius: 7px;
  color: #fff;
  background: var(--nav);
}

.feature:nth-child(2) {
  color: var(--ink);
  background: var(--accent);
}

.page-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 105px);
}

.side-nav {
  position: sticky;
  top: 105px;
  align-self: start;
  height: calc(100vh - 105px);
  overflow-y: auto;
  padding: 22px 0;
  background: #eef1f4;
  border-right: 1px solid var(--line);
}

.side-nav h2 {
  margin: 0;
  padding: 0 22px 12px;
  font-size: 22px;
}

.side-nav a {
  display: block;
  padding: 9px 22px;
  color: #343a43;
}

.side-nav a:hover,
.side-nav a.active,
.side-nav a:focus-visible {
  color: #fff;
  background: var(--brand);
  outline: 0;
}

.lesson {
  min-width: 0;
}

.lesson-hero {
  padding: 48px 34px;
  background: var(--soft-green);
}

.lesson-hero h1 {
  margin: 0 0 12px;
  font-size: 46px;
}

.lesson-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #3f4650;
  font-size: 18px;
}

.lesson-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.lesson-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  padding: 34px;
}

.lesson-copy {
  min-width: 0;
}

.lesson-copy h2 {
  margin-top: 0;
  font-size: 32px;
}

.callout {
  padding: 20px;
  border-left: 6px solid var(--brand);
  background: var(--soft-yellow);
}

.footer {
  padding: 42px 20px;
  color: #f2f4f7;
  background: var(--nav);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.footer h2,
.footer h3 {
  margin-top: 0;
}

.footer a {
  display: block;
  margin: 8px 0;
  color: #d8dde6;
}

.footer-bottom {
  width: min(1120px, 100%);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  color: #c8ced8;
  font-size: 14px;
}

.search-results {
  display: none;
  width: min(720px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 14px;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.search-results.is-visible {
  display: block;
}

.search-results a {
  display: inline-block;
  margin: 6px 10px 6px 0;
  color: var(--brand-dark);
  font-weight: 800;
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav,
  .top-actions {
    display: none;
    width: 100%;
  }

  .topbar.nav-open .main-nav,
  .topbar.nav-open .top-actions {
    display: grid;
  }

  .main-nav {
    min-height: 0;
  }

  .main-nav a {
    min-height: 44px;
    padding: 10px 18px;
  }

  .top-actions {
    padding: 12px 18px 18px;
  }

  .search-mini input {
    width: 100%;
  }

  .topic-bar {
    top: 62px;
  }

  .course-grid,
  .lesson-content,
  .feature-row {
    grid-template-columns: 1fr;
  }

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

  .page-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    height: auto;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 0;
  }

  .side-nav h2 {
    display: none;
  }

  .side-nav a {
    flex: 0 0 auto;
    padding: 12px 16px;
  }

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

@media (max-width: 640px) {
  .hero {
    min-height: 360px;
    padding: 44px 16px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-search {
    display: grid;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    gap: 10px;
  }

  .hero-search input,
  .hero-search button {
    min-height: 48px;
    border-radius: 24px;
  }

  .course-copy h2 {
    font-size: 40px;
  }

  .topic-cards,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .lesson-hero,
  .lesson-content {
    padding: 28px 18px;
  }

  .lesson-hero h1 {
    font-size: 36px;
  }
}
