/**
 * Platå shell — editorial core
 * Loaded after tokens. Prefer this over the legacy tail of styles.css.
 */

html { scroll-behavior: smooth; }
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
code, pre {
  font-family: var(--font-mono);
  color: var(--ember);
  font-size: 0.92em;
}

.site-shell {
  width: min(var(--shell), calc(100% - 40px));
  margin: 0 auto;
}

/* Nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.brand {
  text-decoration: none;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.navlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.navlinks a { text-decoration: none; }
.navlinks a:hover { color: var(--text); }
.navlinks a[aria-current="page"] {
  color: var(--text);
  border-bottom: 1px solid var(--text);
}

/* Type */
.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-sans);
}
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-weight: 650;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4.8vw, 2.85rem); max-width: 16ch; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.lead {
  max-width: 40rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 400;
}
.pitch-line {
  margin: 16px 0 0;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

/* Buttons: ink primary, not neon */
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn, button.primary, a.primary, .link-button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  cursor: pointer;
}
.btn:not(.primary), button.ghost, a.ghost, .btn {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn.primary, button.primary, a.primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn:hover:not(.primary) { background: var(--bg-elev); }
.btn.primary:hover { background: #000; border-color: #000; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Flat surfaces — no nested “card stack” feel */
.status-card, .start-card, .trainer-card, .path-card, .evaluator-card,
.steps, .copy-block, .today-program-card, .gallery-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
  backdrop-filter: none;
}
.trainer-card, .path-card, .evaluator-card, .gallery-card {
  padding: 18px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trainer-card p, .path-card p, .evaluator-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  font-size: 0.95rem;
}
.card-link {
  margin-top: auto;
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.tag, .gallery-status, .gallery-featured, .card-status {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  align-self: flex-start;
}

.section { padding: 28px 0; }
.section-head { display: block; margin-bottom: 14px; }
.section-copy {
  max-width: 40rem;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.trainer-grid, .narrative-gallery, .drill-gallery, .quick-start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.trainer-subhead { margin: 28px 0 12px; }
.trainer-subhead h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }

.hero-simple { padding: 0 0 8px; }
.hero-simple-body { max-width: 40rem; padding: 8px 0 20px; }
.hero-simple-body h1 { max-width: 14ch; }
.hero-simple-body .start-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-simple-body .start-meta a { text-decoration: underline; text-underline-offset: 2px; }

.evaluate-compact {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 8px 0 8px;
}
.evaluate-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.88rem;
}
.evaluate-line a {
  color: var(--muted);
  text-decoration: none;
}
.evaluate-line a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.evaluate-sep { color: var(--line); }

.repair-paths-drawer {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: transparent;
}
.repair-paths-drawer summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}
.repair-paths-drawer .program-contracts {
  margin: 10px 0 0;
  padding-left: 1.1em;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}
.repair-paths-drawer a { color: var(--text); }

.steps {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.steps > div {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
}
.steps strong { color: var(--text); }

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer a { text-decoration: underline; text-underline-offset: 2px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Dashboard Today — no glow box */
.today-section { padding: 8px 0 20px; }
.today-program-card,
#today-program .today-program-card {
  border: 1px solid var(--text) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  border-radius: var(--radius) !important;
  padding: 18px !important;
}
#today-program {
  border: 0 !important;
  background: transparent !important;
}
.today-program-card,
#today-program .today-program-card {
  width: 100%;
  max-width: none;
  margin: 0;
}
.today-program-card .eyebrow { color: var(--muted) !important; }
.inspect-drawer summary {
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

/* Kill leftover cliché patterns from legacy styles.css */
.gallery-featured,
.gallery-status {
  position: static !important;
  inset: auto !important;
}
[class*="badge"], .live-dot, .dot { display: none !important; }

/* Product loop: one quiet explanation, not three competing feature cards. */
.product-loop {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 30px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.product-loop li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 8px;
  padding-right: 18px;
}
.product-loop li + li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.product-loop li > span,
.product-loop small {
  color: var(--muted);
}
.product-loop strong,
.product-loop small {
  display: block;
}
.product-loop small {
  margin-top: 3px;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Human entry point for requesting a situation-specific lesson through an agent. */
.custom-lesson-section { padding-top: 28px; }
.custom-lesson-shell {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  background: var(--surface);
}
.custom-lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.custom-lesson-section h2 {
  max-width: 16ch;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.custom-lesson-lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.plain-promise {
  max-width: 60ch;
  margin: 18px 0 0;
  line-height: 1.55;
}
.request-example {
  padding-left: clamp(24px, 4vw, 44px);
  border-left: 1px solid var(--line);
}
.request-example blockquote {
  margin: 12px 0 18px;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.45;
}
.request-example > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.custom-lesson-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: clamp(32px, 5vw, 52px) 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}
.custom-lesson-steps li {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 10px;
  padding-right: 24px;
}
.custom-lesson-steps li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.custom-lesson-steps li > span,
.custom-lesson-steps small { color: var(--muted); }
.custom-lesson-steps strong,
.custom-lesson-steps small { display: block; }
.custom-lesson-steps small {
  margin-top: 5px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.custom-lesson-actions { margin-top: 24px; }
.custom-lesson-boundary {
  max-width: 80ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Secondary choices stay available without dominating the learner's next action. */
.library-disclosure,
.dashboard-disclosure,
.technical-disclosure,
.technical-link-disclosure {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.library-disclosure > summary,
.dashboard-disclosure > summary,
.technical-disclosure > summary,
.technical-link-disclosure > summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 34px 10px 0;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  list-style: none;
}
.library-disclosure > summary::-webkit-details-marker,
.dashboard-disclosure > summary::-webkit-details-marker,
.technical-disclosure > summary::-webkit-details-marker,
.technical-link-disclosure > summary::-webkit-details-marker {
  display: none;
}
.library-disclosure > summary::after,
.dashboard-disclosure > summary::after,
.technical-disclosure > summary::after,
.technical-link-disclosure > summary::after {
  position: absolute;
  right: 2px;
  content: "+";
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 400;
}
.library-disclosure[open] > summary::after,
.dashboard-disclosure[open] > summary::after,
.technical-disclosure[open] > summary::after,
.technical-link-disclosure[open] > summary::after {
  content: "−";
}
.library-disclosure > summary small,
.dashboard-disclosure > summary small,
.technical-disclosure > summary small,
.technical-link-disclosure > summary small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
.library-disclosure > summary:focus-visible,
.dashboard-disclosure > summary:focus-visible,
.technical-disclosure > summary:focus-visible,
.technical-link-disclosure > summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
.library-content,
.dashboard-disclosure-content,
.technical-disclosure-content,
.technical-link-list {
  padding: 20px 0 24px;
}
.dashboard-disclosure-content > * + * { margin-top: 18px; }
.technical-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.technical-link-list a { color: var(--muted); }

.debug-header {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}
.friendly-progress {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
section[hidden] { display: none !important; }
.pwa-status-region {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}
.pwa-status-region strong { margin-right: 0.35rem; }
.hero-grid > .status-card { margin-top: 24px; }
.debug-group,
.debug-group summary { opacity: 1; }
.program-chip.mastery,
a.program-chip.mastery {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.reviewer-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.reviewer-boundaries > div { padding: 20px 20px 20px 0; }
.reviewer-boundaries > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.reviewer-boundaries p,
.reviewer-boundaries ul {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 700px) {
  .product-loop,
  .custom-lesson-layout,
  .custom-lesson-steps,
  .reviewer-boundaries { grid-template-columns: 1fr; }
  .product-loop li { padding: 10px 0; }
  .product-loop li + li {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .custom-lesson-section { padding-top: 12px; }
  .custom-lesson-shell { padding: 24px 20px; }
  .custom-lesson-section h2 {
    max-width: none;
    font-size: clamp(2rem, 10vw, 2.7rem);
  }
  .request-example {
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .custom-lesson-steps { padding: 8px 0; }
  .custom-lesson-steps li { padding: 14px 0; }
  .custom-lesson-steps li + li {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .custom-lesson-actions .btn { width: 100%; }
  .library-disclosure > summary,
  .dashboard-disclosure > summary,
  .technical-disclosure > summary,
  .technical-link-disclosure > summary {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .reviewer-boundaries > div { padding: 18px 0; }
  .reviewer-boundaries > div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

/* Home page — calm editorial layout inspired by Danish service interfaces. */
.home-page {
  --home-green: #235f49;
  --home-green-dark: #194936;
  --home-paper: #f3efe7;
  --home-surface: #f8f5ef;
  background: var(--home-paper);
}
.home-page .home-masthead {
  border-bottom: 1px solid var(--line);
  background: var(--home-paper);
}
.home-page .topnav {
  width: min(86rem, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}
.home-page .brand {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.home-page .navlinks {
  gap: clamp(18px, 3vw, 36px);
  margin-left: auto;
  margin-right: auto;
  font-size: 0.88rem;
}
.home-page .navlinks a[aria-current="page"] {
  border-bottom-color: var(--home-green);
}
.home-page .nav-repository {
  color: var(--home-green);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}
.home-page .nav-repository:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-page .site-shell {
  width: min(75rem, calc(100% - 48px));
}
.home-page .eyebrow {
  color: var(--home-green);
  font-weight: 650;
}

.home-page .home-hero {
  padding: clamp(50px, 7vw, 86px) 0 clamp(48px, 7vw, 78px);
  border-bottom: 1px solid var(--line);
}
.home-page .home-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.85fr);
  gap: clamp(48px, 8vw, 108px);
  align-items: start;
}
.home-page .home-hero-copy {
  max-width: none;
  padding: 0;
}
.home-page .home-hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 5.7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
}
.home-page .home-hero-copy .lead {
  max-width: 51ch;
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
}
.home-page .pitch-line {
  margin-top: 20px;
  font-size: 1rem;
}
.home-page .hero-actions { margin-top: 28px; }
.home-page .btn,
.home-page .btn:not(.primary) {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border-color: var(--line);
  background: transparent;
}
.home-page .btn.primary,
.home-page a.primary {
  border-color: var(--home-green);
  background: var(--home-green);
  color: #fff;
}
.home-page .btn.primary:hover,
.home-page a.primary:hover {
  border-color: var(--home-green-dark);
  background: var(--home-green-dark);
}
.home-page .home-loop-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(42px, 6vw, 68px);
  color: var(--muted);
  font-size: 0.82rem;
}
.home-page .home-loop-heading span:first-child {
  color: var(--home-green);
  font-weight: 650;
}
.home-page .product-loop {
  gap: 10px;
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}
.home-page .product-loop li,
.home-page .product-loop li + li {
  position: relative;
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 17px 14px 0 0;
  border: 0;
  border-top: 4px solid var(--home-green);
}
.home-page .product-loop li + li { padding-left: 0; }
.home-page .product-loop strong { font-size: 0.92rem; }
.home-page .product-loop small { font-size: 0.78rem; }

.home-page .home-next-panel {
  padding-top: 5px;
}
.home-page .home-next-panel h2 {
  max-width: 13ch;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}
.home-page #home-start-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.58;
}
.home-page .home-next-facts {
  margin: 28px 0 24px;
  border-top: 1px solid var(--line);
}
.home-page .home-next-facts > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.home-page .home-next-facts dt {
  color: var(--muted);
  font-size: 0.84rem;
}
.home-page .home-next-facts dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
}
.home-page .home-next-action { width: 100%; }
.home-page .home-next-panel .start-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.home-page .section {
  padding: clamp(48px, 7vw, 78px) 0;
}
.home-page .home-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: clamp(32px, 7vw, 88px);
  align-items: end;
  margin-bottom: 30px;
}
.home-page .home-section-head h2 {
  max-width: 18ch;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.home-page .home-section-head .section-copy {
  max-width: 58ch;
  margin-top: 14px;
  font-size: 1.02rem;
}
.home-page .home-section-note {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 18px 0 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.home-page .home-section-note strong { color: var(--text); }
.home-page .home-library-section { border-bottom: 1px solid var(--line); }
.home-page .library-disclosure > summary {
  min-height: 78px;
  padding-right: 40px;
  font-size: 1.05rem;
}
.home-page .library-disclosure > summary::after { color: var(--home-green); }
.home-page .library-content { padding-top: 30px; }
.home-page .trainer-grid,
.home-page .narrative-gallery,
.home-page .drill-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.home-page .trainer-card,
.home-page .gallery-card {
  gap: 8px;
  min-height: 230px;
  padding: 22px 0 24px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.home-page .gallery-card .tag { color: var(--home-green); font-weight: 650; }
.home-page .gallery-card h3 { max-width: 22ch; font-size: 1.35rem; }
.home-page .gallery-card .card-link { color: var(--home-green); }
.home-page .trainer-subhead {
  margin: 46px 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.home-page .trainer-subhead h3 {
  color: var(--text);
  font-size: 1.45rem;
}

.home-page .custom-lesson-section { padding-top: clamp(54px, 8vw, 92px); }
.home-page .custom-lesson-shell {
  padding: clamp(30px, 5vw, 58px) 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.home-page .custom-lesson-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(44px, 8vw, 104px);
}
.home-page .custom-lesson-section h2 {
  max-width: 15ch;
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  line-height: 0.99;
}
.home-page .request-example { border-left-color: var(--line); }
.home-page .request-example blockquote {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.45;
}
.home-page .custom-lesson-steps { border-color: var(--line); }
.home-page .custom-lesson-steps li + li { border-left-color: var(--line); }

.home-page .evaluate-compact { margin-top: 0; }
.home-page .inspect-drawer summary { color: var(--text); font-weight: 600; }
.home-page .pwa-section { padding: 24px 0; }
.home-page .footer { margin-top: 0; padding-bottom: 48px; }

@media (max-width: 860px) {
  .home-page .home-hero-layout,
  .home-page .home-section-head,
  .home-page .custom-lesson-layout { grid-template-columns: 1fr; }
  .home-page .home-hero-copy h1 { max-width: 13ch; }
  .home-page .home-next-panel {
    padding-top: 34px;
    border-top: 1px solid var(--line);
  }
  .home-page .home-next-panel h2 { max-width: 18ch; }
  .home-page .home-section-head { align-items: start; }
  .home-page .home-section-note { max-width: 32rem; }
  .home-page .request-example {
    padding: 30px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .home-page .topnav,
  .home-page .site-shell { width: min(100% - 32px, 75rem); }
  .home-page .topnav { min-height: 60px; gap: 16px; }
  .home-page .brand { font-size: 1.42rem; }
  .home-page .navlinks { gap: 14px; margin-right: 0; font-size: 0.8rem; }
  .home-page .nav-repository { display: none; }
  .home-page .home-hero { padding: 40px 0 52px; }
  .home-page .home-hero-copy h1 { font-size: clamp(2.65rem, 13vw, 3.65rem); }
  .home-page .home-hero-copy .lead { margin-top: 20px; }
  .home-page .hero-actions .btn { width: 100%; }
  .home-page .home-loop-heading { margin-top: 44px; }
  .home-page .product-loop { grid-template-columns: 1fr; gap: 18px; }
  .home-page .product-loop li,
  .home-page .product-loop li + li {
    padding: 14px 0 0;
    border-top: 3px solid var(--home-green);
  }
  .home-page .home-next-panel { padding-top: 30px; }
  .home-page .home-next-panel h2 { font-size: 2.25rem; }
  .home-page .section { padding: 52px 0; }
  .home-page .home-section-head h2 { font-size: 2.45rem; }
  .home-page .trainer-grid,
  .home-page .narrative-gallery,
  .home-page .drill-gallery { grid-template-columns: 1fr; }
  .home-page .trainer-card,
  .home-page .gallery-card { min-height: 0; }
  .home-page .custom-lesson-shell { padding: 40px 0; }
  .home-page .custom-lesson-section h2 { font-size: 2.6rem; }
}
