/*
 * course-page: page base and shared building blocks used by its subviews.
 * Everything is scoped to .tcc-page or prefixed tcc- so it can sit
 * alongside other site CSS during the transition.
 */

/* in-page links (e.g. "#dates") glide rather than jump, and stop clear of the sticky header */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
.tcc-page [id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  background: var(--tcc-bg);
  color: var(--tcc-ink);
}

.tcc-page {
  font-family: var(--wa-font-family-body);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.tcc-page *,
.tcc-page *::before,
.tcc-page *::after {
  box-sizing: border-box;
}

/* typography
   Element defaults use :where() so they carry no extra specificity and any
   subview class (e.g. .tcc-hero__intro) can override them. */
:where(.tcc-page) :is(h1, h2, h3) {
  font-family: var(--wa-font-family-heading);
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
:where(.tcc-page) h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.01em;
}
:where(.tcc-page) h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
/* Web Awesome's native styles space out blocks and indent list items;
   this page sets its own spacing, so start from zero like the template. */
:where(.tcc-page) :is(p, ul, ol, dl, details) {
  margin: 0;
}
:where(.tcc-page) li {
  margin: 0;
}
:where(.tcc-page) a {
  color: inherit;
}
:where(.tcc-page) img {
  max-width: 100%;
}
.tcc-page :focus-visible {
  outline: 3px solid var(--tcc-teal-bright);
  outline-offset: 2px;
}

/* layout */
.tcc-wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}
.tcc-section {
  padding-block: 56px;
}

/* section heading block: eyebrow + h2 + optional intro */
.tcc-eyebrow {
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tcc-accent);
  font-weight: 600;
}
.tcc-head {
  max-width: 40em;
  margin-bottom: 28px;
}
.tcc-head h2 {
  margin-top: 8px;
}
.tcc-head p:not(.tcc-eyebrow) {
  color: var(--tcc-muted);
  margin-top: 10px;
  font-size: 1.05rem;
}

/* section that follows another without a gap of its own */
.tcc-section--flush {
  padding-top: 0;
}

/* two equal columns (course content, FAQ) */
.tcc-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.tcc-two h2 {
  margin: 8px 0 18px;
}

/* card (outcomes, format compare) */
.tcc-card {
  background: var(--tcc-surface);
  border: 1px solid var(--tcc-line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
}
.tcc-card h3 {
  color: var(--tcc-ink);
}
.tcc-card p {
  color: var(--tcc-muted);
  margin-top: 8px;
  font-size: .95rem;
}

/* accordion (course content, FAQ)
   Native <details>, with Web Awesome's own details styling (padding,
   chevron) undone so it matches the template's +/- version. */
.tcc-acc details {
  background: var(--tcc-surface);
  border: 1px solid var(--tcc-line);
  border-radius: 10px;
  padding: 0;
}
.tcc-acc details + details {
  margin-top: 8px;
}
.tcc-acc summary {
  cursor: pointer;
  margin: 0;
  padding: 14px 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.tcc-acc summary::-webkit-details-marker {
  display: none;
}
.tcc-acc summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--tcc-link);
  width: auto;
  height: auto;
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
  rotate: none;
  transition: none;
}
.tcc-acc details[open] summary::after {
  content: "\2013"; /* en dash */
}
.tcc-acc details > div {
  padding: 0 18px 16px;
  color: var(--tcc-muted);
  font-size: .95rem;
}
.tcc-acc ul {
  margin: 0;
  padding-left: 1.1em;
}

@media (max-width: 900px) {
  .tcc-two {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .tcc-section {
    padding-block: 40px;
  }
  .tcc-section--flush {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tcc-page * {
    transition: none !important;
  }
}
