/*
 * Education & Outreach — page-specific dressing.
 *
 * Loaded only on /education/, via the assets/page-<slug>.css convention in
 * functions.php. Four shapes live here because none reappears anywhere else
 * in the build: the two-path audience split, the request-process callout and
 * numbered steps, the evening-talks cross-reference list, and the season
 * table plus its per-show disclosures. Bones (.bay, .shell, .eyebrow, .lede,
 * .prose, .meta, .tag, .btn, .dentil, .visually-hidden) all come from
 * theme.css; this file only dresses content unique to this route.
 *
 * Every colour below is TEXT-SAFE (--ink, --ink-soft, --ember) or FIELD-ONLY
 * used only as a fill or a rule (--accent as a badge fill under --ink text,
 * exactly the --btn--primary pairing in theme.css; --stone-300/--stone-deep
 * as 1-4px rules), never FIELD-ONLY as small text.
 */

/* -------------------------------------------------------------- paths -- */

/*
 * align-items: start, not stretch: the two cards are genuinely different
 * lengths (the community path carries the evening-talks list, the teacher
 * path does not), and stretching the shorter one to match just left a slab
 * of empty card below its buttons. Two honestly different heights read
 * better than one card padded out to match its neighbour.
 */
.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: start;
  gap: var(--gutter);
  margin-top: 1.75rem;
}

@media print {
  .proto-banner, .masthead, .colophon, .skip-link { display: none !important; }
  main { padding: 0 !important; }
}

.paths__card {
  background: var(--paper);
  border: 1px solid var(--stone-300);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.paths__card h3 { margin-bottom: 0; line-height: 1.2; }
.paths__card h4 {
  margin: 0.5rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--stone-300);
}

.paths__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.paths__office {
  margin-top: 0.25rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- evening -- */

.evening-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.evening-list li { border-top: 1px solid var(--stone-300); }

.evening-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding-block: 0.75rem;
  min-height: 44px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.evening-list a:hover { color: var(--ember); text-decoration: underline; }

/* ---------------------------------------------------------------- callout -- */

/*
 * The one honest constraint the request process leans on: stated before the
 * first numbered step asks for any effort, not after it. A left rule in
 * --stone-deep (FIELD-ONLY, used here only as a 4px bar, never as text) marks
 * it as a distinct note without needing an icon or a colour word like
 * "warning" that this is not.
 */
.callout {
  border-left: 4px solid var(--stone-deep);
  background: var(--paper-raised);
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0 2rem;
}

.callout p { margin: 0; max-width: none; }
.callout p + p { margin-top: 0.6rem; }

/* ----------------------------------------------------------------- steps -- */

.steps {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  counter-reset: none;
}

.steps > li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: none;
}

.steps__num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--step--1);
  margin-top: 0.1rem;
}

.steps__text { padding-top: 0.3rem; }

/* ------------------------------------------------------- season pictures -- */

/*
 * These are data graphics, not illustrated cards. Their geometry comes from
 * the same $season array as the table and disclosures below: one shows when
 * the nine matinees land, the other shows the published grade spans. The
 * fanlight tick keeps the school-year strip inside the Wheeler's visual world;
 * the printed values keep neither graphic dependent on colour or shape alone.
 */
.education-page .lede,
.education-visual figcaption p {
  text-wrap: pretty;
}

.education-visuals {
  display: grid;
  gap: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  margin: 2rem 0;
}

.education-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--stone-300);
  background: var(--paper);
}

.education-visual figcaption {
  padding: 1.25rem clamp(1.1rem, 0.8rem + 1vw, 1.75rem);
  border-bottom: 1px solid var(--stone-300);
  background: var(--band);
}

.education-visual figcaption h3 {
  margin-bottom: 0.25rem;
  font-size: var(--step-2);
}

.education-visual figcaption p {
  margin: 0;
  max-width: 66ch;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.school-year__months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--stone-300);
}

.school-year__months li {
  min-width: 0;
  padding: 1rem;
  background: var(--paper);
}

.school-year__months li::before {
  content: "";
  display: block;
  width: 1.65rem;
  height: 0.78rem;
  margin-bottom: 0.65rem;
  border: 2px solid var(--ember);
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
}

.school-year__months li[data-empty="true"]::before {
  border-color: var(--stone-300);
}

.school-year__months time {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.school-year__month { font-weight: 750; }

.school-year__year {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.school-year__months strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--blue);
  font-size: var(--step--1);
}

.school-year__dates {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.school-year__months li[data-empty="true"] strong,
.school-year__months li[data-empty="true"] .school-year__dates {
  color: var(--stone-700);
}

.grade-map__scale,
.grade-map__rows > li {
  display: grid;
  grid-template-columns: minmax(16rem, 0.9fr) repeat(10, minmax(0, 1fr));
  column-gap: 0;
}

.grade-map__scale {
  align-items: end;
  padding: 0.9rem clamp(1rem, 0.7rem + 1vw, 1.5rem) 0.45rem;
  color: var(--stone-700);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
}

.grade-map__scale::before {
  content: "Recommended grades";
  padding-right: 1rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.grade-map__rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--stone-300);
}

.grade-map__rows > li {
  align-items: center;
  max-width: none;
  padding: 0.7rem clamp(1rem, 0.7rem + 1vw, 1.5rem);
  border-bottom: 1px solid var(--stone-300);
}

.grade-map__rows > li:last-child { border-bottom: 0; }

.grade-map__label {
  grid-column: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  min-width: 0;
  padding-right: 1rem;
  font-size: var(--step--1);
}

.grade-map__label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.grade-map__label strong {
  flex: none;
  color: var(--blue);
  font-size: 0.72rem;
}

.grade-map__bar {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  min-height: 1.15rem;
  border-right: 1px solid var(--stone-300);
  border-left: 1px solid var(--stone-300);
  background:
    repeating-linear-gradient(
      to right,
      transparent 0 calc(10% - 1px),
      var(--stone-300) calc(10% - 1px) 10%
    ),
    var(--band);
}

.grade-map__bar > span {
  grid-column: var(--grade-start) / span var(--grade-span);
  min-width: 0;
  margin-block: 0.18rem;
  border-block: 1px solid var(--stone-deep);
  background: var(--accent);
}

/* -------------------------------------------------------- season table -- */

/*
 * This section is .bay--raised (--paper-raised). Giving the table its own
 * --paper ground, rather than leaving it transparent, is what keeps the
 * "Show" column's links on the surface --ember is actually verified against
 * (5.2:1) instead of the raised band, where the same amber sits closer to
 * the AA line. See assets/theme.css lines 1-120.
 */
.season-table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  background: var(--paper);
  border: 1px solid var(--stone-300);
}

.season-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.season-table th,
.season-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--stone-300);
}

.season-table thead th {
  background: var(--band);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.68rem;
  color: var(--stone-700);
  white-space: nowrap;
}

.season-table tbody tr:last-child td { border-bottom: 0; }
.season-table tbody a { font-weight: 650; }

/* ------------------------------------------------------------- matinees -- */

.matinee-list { margin-top: 1.5rem; }

.matinee {
  border: 1px solid var(--stone-300);
  background: var(--paper);
  padding: 0.25rem 1.25rem;
}

.matinee + .matinee { margin-top: 0.75rem; }

.matinee > summary {
  padding: 0.9rem 0;
  min-height: 44px;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  list-style: none;
}

.matinee > summary::-webkit-details-marker { display: none; }

.matinee > summary::after {
  content: "+";
  flex: none;
  font-family: var(--display);
  font-size: var(--step-1);
  color: var(--ember);
  transition: transform 200ms ease;
}

.matinee[open] > summary::after { transform: rotate(45deg); }

.matinee[open] > summary {
  border-bottom: 1px solid var(--stone-300);
  margin-bottom: 0.9rem;
}

.matinee__title {
  font-family: var(--display);
  font-size: var(--step-1);
  line-height: 1.15;
  color: var(--ink);
}

.matinee__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.matinee__body { padding-bottom: 0.9rem; }
.matinee__body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 40rem) {
  .paths__card { padding: 1.25rem; }
  .steps__num { width: 1.9rem; height: 1.9rem; }

  .school-year__months li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .grade-map__scale {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    padding-top: 0.75rem;
  }

  .grade-map__scale::before { content: none; }

  .grade-map__rows > li {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.5rem;
  }

  .grade-map__label {
    grid-column: 1;
    padding-right: 0;
  }

  .grade-map__bar { grid-column: 1; }
}
