/* ─── School of Elderly · Shared Styles ─────────────────────────────────── */

:root {
  --cream: #FBF5E8;
  --paper: #FFFFFF;
  --orange: #F4750B;
  --orange-deep: #D45F00;
  --orange-soft: #FBE4CD;
  --navy: #0F0F1E;
  --ink: #1A1A2E;
  --ink-soft: #56566A;
  --rule: #E8DCC4;
  --green: #2D7A4F;
  --red: #C0392B;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  --max-width: 1200px;
  --content-padding: clamp(1rem, 4vw, 2rem);
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--orange-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--orange);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── Typography ────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--navy);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }

em {
  font-style: italic;
  color: var(--orange);
  font-weight: 600;
}

.serif-em {
  font-family: var(--display);
  font-style: italic;
  color: var(--orange);
  font-weight: 600;
}

p {
  font-size: clamp(1rem, 1.4vw, 1.0625rem);
  color: var(--ink-soft);
  line-height: 1.65;
}

.eyebrow {
  font-family: var(--body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ─── Layout ────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

/* ─── Header / Navigation ──────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 245, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
}

.logo-link:hover { color: var(--navy); opacity: 0.8; }

.logo-mark {
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.logo-text em {
  font-style: italic;
  color: var(--orange);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-family: var(--body);
  font-size: 0.9375rem;
  color: var(--ink);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--orange-deep);
}

.nav-cta {
  background: var(--navy);
  color: var(--cream) !important;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-weight: 600 !important;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: var(--ink);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--navy);
  background: none;
  border: none;
}

@media (max-width: 800px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    padding: 1rem var(--content-padding);
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  .nav-links li:last-child { border-bottom: none; }
  .mobile-toggle { display: block; }
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--orange-deep);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 117, 11, 0.3);
}

.btn-dark {
  background: var(--navy);
  color: var(--cream);
}

.btn-dark:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--rule);
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.footer-brand h3 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.footer-brand h3 em {
  font-style: italic;
  color: var(--orange);
}

.footer-brand p {
  color: rgba(251, 245, 232, 0.6);
  font-family: var(--display);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.5;
  max-width: 32ch;
}

.footer-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
}

.footer-stats .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -0.5rem;
}

.footer-stat-num {
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--orange);
  line-height: 1;
}

.footer-stat-label {
  font-size: 0.8125rem;
  color: rgba(251, 245, 232, 0.55);
  margin-top: 0.25rem;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding: 2rem var(--content-padding) 0;
  border-top: 1px solid rgba(251, 245, 232, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(251, 245, 232, 0.5);
}

.footer-bottom .credits {
  font-family: var(--display);
  font-style: italic;
  color: rgba(251, 245, 232, 0.7);
}

.footer-bottom .credits a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px dotted rgba(244, 117, 11, 0.4);
  transition: border-color 0.2s ease;
}

.footer-bottom .credits a:hover {
  border-bottom-color: var(--orange);
}

.footer-bottom .links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom .links a {
  color: rgba(251, 245, 232, 0.6);
  text-decoration: none;
}

.footer-bottom .links a:hover {
  color: var(--orange);
}

@media (max-width: 800px) {
  .site-footer .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* ─── Hero (homepage) ──────────────────────────────────────────────────── */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero h1 em {
  display: block;
}

.hero-sub {
  font-family: var(--display);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 38ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.hero-trust span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-trust .check {
  color: var(--orange);
  font-weight: 600;
}

/* The doorway/sapling illustration */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-art-frame {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  position: relative;
}

.hero-art-frame svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ─── Door + sapling animation ─────────────────────────────────────────
   Default state (no JS, or before JS loads): everything is visible in its
   final pose. This is also the no-JavaScript fallback.

   When JS loads, it adds `.js-ready` to <html>. We then hide the door and
   sapling, ready for the animation triggered by `.is-animating`.
   `.is-settled` holds the final pose without re-running the keyframes. */

html.js-ready #hero-doorway-anim .door-swing {
  transform-box: fill-box;
  transform-origin: 100% 50%;   /* hinge = right edge of the door panel */
  transform: scaleX(0.05);      /* nearly-flat = closed */
  opacity: 0.4;
}

html.js-ready #hero-doorway-anim .sapling-soil {
  opacity: 0;
}

html.js-ready #hero-doorway-anim .sapling-stem {
  /* Stem total length ≈ 130 (350 → 220). Hide it via dash. */
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  opacity: 0;
}

html.js-ready #hero-doorway-anim .sapling-leaf-left,
html.js-ready #hero-doorway-anim .sapling-leaf-right {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scale(0);
  opacity: 0;
}

/* When animating: run the keyframe sequences with staggered delays */
#hero-doorway-anim.is-animating .door-swing {
  animation: doorSwing 1.4s cubic-bezier(0.34, 1.18, 0.5, 1) forwards;
}

#hero-doorway-anim.is-animating .sapling-soil {
  animation: soilFade 0.5s ease-out 0.9s forwards;
}

#hero-doorway-anim.is-animating .sapling-stem {
  animation: stemGrow 1.0s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
}

#hero-doorway-anim.is-animating .sapling-leaf-left {
  animation: leafGrow 0.7s cubic-bezier(0.34, 1.4, 0.5, 1) 2.0s forwards;
}

#hero-doorway-anim.is-animating .sapling-leaf-right {
  animation: leafGrow 0.7s cubic-bezier(0.34, 1.4, 0.5, 1) 2.18s forwards;
}

/* Settled state: hold the final pose without re-animating */
#hero-doorway-anim.is-settled .door-swing {
  transform: scaleX(1);
  opacity: 1;
}
#hero-doorway-anim.is-settled .sapling-soil { opacity: 0.3; }
#hero-doorway-anim.is-settled .sapling-stem {
  stroke-dashoffset: 0;
  opacity: 1;
}
#hero-doorway-anim.is-settled .sapling-leaf-left,
#hero-doorway-anim.is-settled .sapling-leaf-right {
  transform: scale(1);
  opacity: 1;
}

/* Default (no `.js-ready`) settled-look styling for the soil ellipse */
#hero-doorway-anim .sapling-soil { opacity: 0.3; }

@keyframes doorSwing {
  0%   { transform: scaleX(0.05); opacity: 0.4; }
  55%  { transform: scaleX(1.05); opacity: 1; }
  100% { transform: scaleX(1);    opacity: 1; }
}

@keyframes soilFade {
  from { opacity: 0; }
  to   { opacity: 0.3; }
}

@keyframes stemGrow {
  from { stroke-dashoffset: 130; opacity: 1; }
  to   { stroke-dashoffset: 0;   opacity: 1; }
}

@keyframes leafGrow {
  0%   { transform: scale(0);    opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

/* Reduced motion: skip animation entirely, hold settled state */
@media (prefers-reduced-motion: reduce) {
  html.js-ready #hero-doorway-anim .door-swing,
  html.js-ready #hero-doorway-anim .sapling-stem,
  html.js-ready #hero-doorway-anim .sapling-leaf-left,
  html.js-ready #hero-doorway-anim .sapling-leaf-right,
  html.js-ready #hero-doorway-anim .sapling-soil {
    transform: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  html.js-ready #hero-doorway-anim .sapling-soil { opacity: 0.3 !important; }
}

@media (max-width: 800px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-art {
    order: -1;
  }
  .hero-art-frame {
    max-width: 240px;
  }
}

/* ─── Problem section (dark band) ──────────────────────────────────────── */

.problem-section {
  background: var(--navy);
  color: var(--cream);
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.problem-section .eyebrow {
  color: var(--orange);
}

.problem-section h2 {
  color: var(--cream);
  max-width: 18ch;
  margin: 1rem 0 3rem;
}

.problem-section h2 em {
  font-style: italic;
  color: var(--orange);
}

.problem-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(251, 245, 232, 0.12);
  border-bottom: 1px solid rgba(251, 245, 232, 0.12);
}

.problem-stat {
  padding: 2.5rem 1.5rem;
  border-right: 1px solid rgba(251, 245, 232, 0.12);
}

.problem-stat:last-child { border-right: none; }

.problem-stat:nth-child(2) {
  background: var(--orange);
  color: var(--navy);
}

.problem-stat:nth-child(2) .problem-stat-num,
.problem-stat:nth-child(2) .problem-stat-label {
  color: var(--navy);
}

.problem-stat-num {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.02em;
}

.problem-stat-label {
  font-size: 0.9375rem;
  color: rgba(251, 245, 232, 0.7);
  margin-top: 0.75rem;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .problem-stats {
    grid-template-columns: 1fr;
  }
  .problem-stat {
    border-right: none;
    border-bottom: 1px solid rgba(251, 245, 232, 0.12);
  }
  .problem-stat:last-child { border-bottom: none; }
}

/* ─── Tracks section ───────────────────────────────────────────────────── */

.tracks-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.tracks-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
  align-items: end;
}

.tracks-header h2 {
  max-width: 14ch;
}

.tracks-header h2 em {
  font-style: italic;
  color: var(--orange);
}

.tracks-header p {
  font-family: var(--display);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--ink-soft);
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.track-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.track-card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(15, 15, 30, 0.08);
  color: var(--ink);
}

.track-card.featured {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: var(--paper);
  border-color: var(--orange);
}

.track-card.featured .track-num,
.track-card.featured h3,
.track-card.featured .track-sub,
.track-card.featured .track-meta {
  color: var(--paper) !important;
}

.track-card.featured .track-num {
  background: rgba(255, 255, 255, 0.2);
  color: var(--paper) !important;
}

.track-num {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  align-items: center;
  justify-content: center;
}

.track-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0;
}

.track-sub {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--orange-deep);
  margin: 0;
}

.track-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.track-card.featured .track-meta {
  border-top-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 800px) {
  .tracks-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ─── How It Works ─────────────────────────────────────────────────────── */

.how-it-works {
  background: var(--orange-soft);
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.how-step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.how-step-num {
  font-family: var(--display);
  font-size: 4.5rem;
  font-weight: 600;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.04em;
}

.how-step h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--navy);
}

.how-step p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

@media (max-width: 800px) {
  .how-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ─── Pricing ──────────────────────────────────────────────────────────── */

.pricing-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.pricing-header {
  text-align: center;
  margin-bottom: 3rem;
}

.pricing-header h2 {
  margin: 1rem auto 0.5rem;
  max-width: 16ch;
}

.pricing-header h2 em {
  font-style: italic;
  color: var(--orange);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.price-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.price-card.featured {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
  position: relative;
  transform: scale(1.03);
}

.price-card.featured h3 { color: var(--cream); }
.price-card.featured .price-amount { color: var(--orange); }
.price-card.featured .price-period { color: rgba(251, 245, 232, 0.6); }
.price-card.featured ul li { color: rgba(251, 245, 232, 0.85); }
.price-card.featured ul li::before { color: var(--orange); }

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: var(--paper);
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.price-card h3 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--navy);
}

.price-amount {
  font-family: var(--display);
  font-size: 2.75rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}

.price-period {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.price-card ul li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.5;
}

.price-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

.price-card .btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

@media (max-width: 800px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .price-card.featured {
    transform: none;
  }
}

/* ─── FAQ ──────────────────────────────────────────────────────────────── */

.faq-section {
  background: var(--navy);
  color: var(--cream);
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.faq-section h2 {
  color: var(--cream);
  max-width: 18ch;
  margin: 1rem 0 3rem;
}

.faq-section h2 em {
  font-style: italic;
  color: var(--orange);
}

.faq-list {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(251, 245, 232, 0.12);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  background: none;
  border: none;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--orange);
}

.faq-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(251, 245, 232, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.faq-item[open] .faq-toggle {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--paper);
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 0 1.5rem 0;
  color: rgba(251, 245, 232, 0.7);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 70ch;
}

/* ─── Downloads page specific ──────────────────────────────────────────── */

.downloads-hero {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.downloads-hero h1 {
  margin: 1rem 0;
}

.downloads-hero h1 em { display: block; }

.downloads-hero p {
  font-family: var(--display);
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  color: var(--ink-soft);
  max-width: 50ch;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.search-row {
  position: relative;
  max-width: 480px;
  margin-bottom: 1rem;
}

.search-row input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  font-family: var(--body);
  font-size: 0.9375rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
}

.search-row input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 117, 11, 0.12);
}

.search-row .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--ink-soft);
}

.search-row .clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.375rem 0.625rem;
  background: var(--cream);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  border: none;
  display: none;
}

.search-row .clear-btn.show { display: block; }

.search-status {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  min-height: 1.2em;
}

/* The two-column body layout for downloads */
.downloads-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 3rem;
  padding-bottom: 4rem;
}

.downloads-main { min-width: 0; }

.track-section {
  margin-bottom: 4rem;
  scroll-margin-top: 100px;
}

.track-section.hidden { display: none; }

.track-section-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

.track-section-num {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-section.featured .track-section-num {
  background: var(--orange);
  color: var(--paper);
}

.track-section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  margin: 0;
  line-height: 1.1;
}

.track-section-head .track-sub {
  font-size: 1rem;
  margin-top: 2px;
}

.track-divider {
  height: 2px;
  background: var(--rule);
  margin: 0 0 1.5rem 72px;
}

.track-section.featured .track-divider {
  background: var(--orange);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 0.875rem;
}

.guide-card {
  display: flex;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s ease;
  position: relative;
}

.guide-card.hidden { display: none; }

.guide-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 15, 30, 0.08);
  color: var(--ink);
}

.guide-card .ribbon {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--orange);
  color: var(--paper);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(244, 117, 11, 0.3);
}

.guide-num-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
}

.guide-body {
  flex: 1;
  min-width: 0;
}

.guide-title {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.guide-brief {
  font-family: var(--body);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.guide-meta {
  display: flex;
  gap: 0.875rem;
  font-family: var(--body);
  font-size: 0.6875rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.guide-meta .download-tag {
  color: var(--orange-deep);
  font-weight: 700;
}

/* Sidebar */
.downloads-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.25rem 1.375rem;
  font-family: var(--body);
}

.sidebar-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.875rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background: var(--cream);
  color: var(--ink);
}

.sidebar-link.active {
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-weight: 600;
}

.sidebar-link .num {
  font-family: var(--display);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-soft);
  min-width: 20px;
}

.sidebar-link.active .num { color: var(--orange-deep); }

.sidebar-link .name { flex: 1; }

.sidebar-link .count {
  font-size: 0.6875rem;
  color: var(--ink-soft);
}

.sidebar-divider {
  height: 1px;
  background: var(--rule);
  margin: 1rem 0;
}

.sidebar-special {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-special a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-special a.dark {
  background: var(--navy);
  color: var(--cream);
}

.sidebar-special a.dark:hover {
  background: var(--ink);
  color: var(--cream);
}

.sidebar-special a.light {
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--rule);
}

.sidebar-special a.light:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
}

@media (max-width: 1000px) {
  .downloads-body {
    grid-template-columns: 1fr;
  }
  .downloads-sidebar {
    display: none;
  }
}

.no-results {
  padding: 4rem 1.5rem;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.25rem;
  display: none;
}

.no-results.show { display: block; }
