/* T-704: /courses/<id>/ pages. Tokens from tks-resources:specs/TKS-brand-design-system.md
   (Navy Dark page, Navy Mid panels, Surge Green accent, Teal secondary, Light Grey body
   text, Text Secondary and Text Muted for supporting text). No script: the accordion is
   <details>, so the raw HTML is complete without JS. Same family as descriptor.css. */

:root {
  --navy-dark: #001525;
  --navy-mid: #052035;
  --dark-blue: #042833;
  --surge-green: #cce50c;
  --teal: #63d6d6;
  --white: #ffffff;
  --text-primary: #e9f2f2;
  --text-secondary: #b8cdd8;
  --text-muted: #7a9bb5;
  --border-hairline: rgba(255, 255, 255, 0.12);
  --measure: 46rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--navy-dark);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: 'Ramabhadra', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--white);
  line-height: 1.2;
  margin: 0;
}

a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--white); }

:focus-visible {
  outline: 3px solid var(--surge-green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Brand bar */
.course-bar {
  background: var(--surge-green);
  padding: 0.55rem 1.5rem;
}
.course-brand {
  font-family: 'Ramabhadra', sans-serif;
  font-size: 1rem;
  color: var(--navy-dark);
  text-decoration: none;
  display: inline-block;
  min-height: 24px;
}
.course-brand:hover { color: var(--navy-dark); text-decoration: underline; }

/* Page column */
.course-page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.course-section { margin-top: 2.75rem; }
.course-section h2 { font-size: 1.6rem; margin-bottom: 0.85rem; }
.course-section p { margin: 0 0 1rem; max-width: 40rem; }

/* Hero */
.course-hero h1 { font-size: clamp(2rem, 6vw, 2.9rem); }
.course-hook {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 1rem 0 1.5rem;
  max-width: 38rem;
}

/* Facts strip: label above value, wraps on a narrow screen */
.course-facts {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.course-facts li {
  background: var(--navy-mid);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  min-width: 7rem;
}
.fact-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.course-facts strong {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 600;
}

/* The button: drawn only with an active sale offer (src/courses/sale.js) */
.course-cta { margin: 0 0 1rem; }
.course-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  background: var(--surge-green);
  color: var(--navy-dark);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.course-btn:hover { background: var(--white); color: var(--navy-dark); }
.course-price { font-weight: 600; }

/* Objectives */
.course-objectives { margin: 0; padding-left: 1.25rem; max-width: 40rem; }
.course-objectives li { margin-bottom: 0.6rem; }
.course-objectives li::marker { color: var(--surge-green); }

/* Sneak peek link reads as a link, with room to tap */
#peek a {
  display: inline-block;
  padding: 0.35rem 0;
  min-height: 24px;
  font-weight: 600;
}

/* Module accordion: native <details>, keyboard and screen-reader ready */
.course-module {
  background: var(--navy-mid);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  margin-bottom: 0.6rem;
}
.course-module summary {
  cursor: pointer;
  min-height: 48px;
  padding: 0.8rem 1rem;
  color: var(--white);
  font-weight: 600;
  display: flex;
  align-items: center;
}
.course-module[open] summary { border-bottom: 1px solid var(--border-hairline); }
.course-module-meta {
  margin: 0;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  max-width: none;
}

/* Closing button section */
.course-final { padding-top: 0.5rem; }

@media (max-width: 480px) {
  .course-page { padding-top: 1.75rem; }
  .course-facts li { flex: 1 1 8rem; }
  .course-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .course-btn { transition: background 0.15s ease; }
}
