/* ============================================================================
   GENADEMY — THE INSTITUTE SHEET, PAGE LAYER  (`styles-v4-pages.css`)
   ============================================================================
   Loaded after `styles-v4.css`, on the twenty-two pages that were still on the
   old `styles.css`. The tokens and the eight rules live in `styles-v4.css`;
   this file has exactly one job: teach the sheet the twenty-two legacy
   component classes that v4 does not define, using sheet materials only.

   Rules it is not allowed to break:
     rule 3  radius is 0 (structure) or 2px (text inputs) — nothing else
     rule 4  one primary action per view; secondary is an ink hairline
     rule 5  labels are tracked capitals, never accent coloured
     rule 6  no licensed stock; a component without a picture is complete
     rule 7  1px hairlines carry structure; no shadow, gradient, blur or scrim

   Anything not named here is styled by `styles-v4.css` (shared chrome) or by
   the page's own inline <style>, which `scripts/convert_legacy_pages.py` has
   already rewritten from literals to tokens. Do not add a third place.
   ========================================================================== */

/* ---- One missing contract name -----------------------------------------
   Inline attributes on legacy markup still ask for `--font-ui`. The sheet
   has no separate UI face: labels are Public Sans. */
:root { --font-ui: var(--font-label); }

/* ---- The pale-blue panel, retired --------------------------------------
   `--blue-light` was the tint behind callouts, filter rails and photo
   placeholders on eight legacy pages. A blue wash behind every block is the
   category default this direction exists to remove. It resolves to sunken
   paper instead; the accent stays where an action is. */
:root { --blue-light: var(--color-surface-sunken); }

/* ---- Skip link --------------------------------------------------------- */
.skip { border-radius: var(--radius-0); }

/* ======================== LEGACY HERO BANDS (dark events) ================
   Six page-local hero bands were gradients; the converter flattens each to
   `--color-surface-inverse` — the one dark band a page is allowed. Their
   headings, though, are still coloured by page-local rules that run after
   this file, so the ink has to be stated here with weight. */
.comm-hero, .confirm-hero, .lm-hero, .heatmap-hero, .rd-hero, .teach-hero,
.framework-band {
  background: var(--color-surface-inverse) !important;
  color: var(--color-text-inverse) !important;
}
.comm-hero h1, .comm-hero h2, .comm-hero h3, .comm-hero h4,
.confirm-hero h1, .confirm-hero h2, .confirm-hero h3,
.lm-hero h1, .lm-hero h2, .lm-hero h3,
.heatmap-hero h1, .heatmap-hero h2, .heatmap-hero h3,
.rd-hero h1, .rd-hero h2, .rd-hero h3,
.teach-hero h1, .teach-hero h2, .teach-hero h3,
.framework-band h1, .framework-band h2, .framework-band h3 {
  color: var(--color-text-inverse) !important;
}
.comm-hero p, .comm-hero li, .comm-hero span, .comm-hero .sub,
.confirm-hero p, .confirm-hero li, .confirm-hero span,
.lm-hero p, .lm-hero li, .lm-hero span,
.heatmap-hero p, .heatmap-hero li, .heatmap-hero span,
.rd-hero p, .rd-hero li, .rd-hero span,
.teach-hero p, .teach-hero li, .teach-hero span,
.framework-band p, .framework-band li, .framework-band span {
  color: var(--color-text-inverse-muted) !important;
}
.comm-hero a, .confirm-hero a, .lm-hero a, .heatmap-hero a, .rd-hero a, .teach-hero a,
.framework-band a { color: var(--color-text-inverse) !important; }
.comm-hero .section-eyebrow, .teach-hero .section-eyebrow,
.framework-band .section-eyebrow {
  color: var(--color-text-inverse-muted) !important;
}
.comm-hero .section-eyebrow::before, .teach-hero .section-eyebrow::before,
.framework-band .section-eyebrow::before {
  color: var(--color-text-inverse) !important;
  border-right-color: rgba(244, 241, 233, 0.45) !important;
}
.comm-hero .section-eyebrow::after, .teach-hero .section-eyebrow::after,
.framework-band .section-eyebrow::after {
  background: rgba(244, 241, 233, 0.25) !important;
}

/* ============================ PAGE CHROME ================================ */

/* Breadcrumb: printed margin note, not a navigation chip. */
.crumb {
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}
.crumb a { color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-border-strong); }
.crumb a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* Standfirst under a page title. */
.tagline {
  font-size: var(--text-lg);
  line-height: 1.55;
  max-width: 62ch;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

/* Course hero fact line: a register row, not a row of pills. */
.course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.course-hero-meta > span + span {
  padding-left: var(--space-5);
  border-left: 1px solid var(--color-border);
}
.course-hero-meta .level { color: var(--color-text); }

/* Status label: square marker + word. Never a filled pill. */
.badge,
.course-hero-meta .badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-0);
  background: transparent;
  backdrop-filter: none;
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text);
}
.badge::before,
.course-hero-meta .badge::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--color-text-muted);
  flex: none;
}

/* ============================ COURSE SCAFFOLD =========================== */

/* v4 calls this scaffold `.course-sheet`; the seven course pages, which were
   written against `styles.css`, still call it `.course-layout`. One name for
   the same grid — do not create a second layout. */
.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-10);
  align-items: start;
}
.course-main { min-width: 0; }
.course-side { min-width: 0; }

/* The rail is an order form, printed: a hairline at the top, rules between
   groups, no box, no shadow. */
.course-rail,
.course-side .enroll-card {
  border: 0;
  border-top: 1px solid var(--color-border-strong);
  background: transparent;
  box-shadow: none;
  border-radius: var(--radius-0);
  overflow: visible;
}
.course-side .enroll-card { padding-top: var(--space-5); }
.course-rail-body { padding-top: var(--space-5); }

/* Rule 6: the rail carried a stock photograph. The rail now opens on the
   course's own facts. Hidden here as a guard — the converter removes it. */
.course-rail img,
.footer-cohort img { display: none; }

.course-rail .price,
.enroll-card .price {
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.course-rail .rail-meta {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.course-rail .rail-meta div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-faint);
  margin: 0;
}
.course-rail .rail-meta div:last-child { border-bottom: 0; }
.course-rail .rail-meta dt,
.course-rail .rail-meta strong { font-weight: 400; color: var(--color-text-faint); }

/* Sheet body block: a plate, not a floating card. */
.panel {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-0);
  box-shadow: none;
  padding: var(--space-7);
  margin-bottom: var(--space-6);
}
.panel h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text-bright);
  margin-bottom: var(--space-4);
}

/* Learning outcomes: a two-column index with square markers. */
.learn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-7);
}
.learn-grid li {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
}
.learn-grid li::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  margin-top: 7px;
  border: 1px solid var(--color-border-strong);
  background: transparent;
}

/* Module register: rows closed by hairlines, opened by the reader. */
.accordion { border-top: 1px solid var(--color-border-strong); }
.accordion-item {
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-0);
  background: transparent;
  box-shadow: none;
  margin: 0;
}
.accordion-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-2);
  cursor: pointer;
}
.accordion-head h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text-bright);
}
.accordion-head .meta {
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
  white-space: nowrap;
}
.accordion-body {
  padding: 0 var(--space-2) var(--space-4);
  border-radius: var(--radius-0);
}
.accordion-body ul { list-style: none; }
.accordion-body li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-border-faint);
  font-size: var(--text-base);
  color: var(--color-text);
}
.accordion-body li .dur {
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-faint);
  white-space: nowrap;
}

/* ============================ REGISTER ================================== */

/* A date is a datum, so it prints as a datum: no tinted chip. */
.reg-date {
  display: inline-block;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-0);
  padding: 0 0 3px;
  margin-bottom: var(--space-3);
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Status: a square and a word (the ● glyph is stripped by the converter). */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.status::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--color-text-muted);
  flex: none;
}
.status.closed::before, .status.open::before { background: var(--color-success); }
.status.coming::before { background: var(--color-warning); }
.status.full::before { background: var(--color-danger); }

/* ============================ FORMS ===================================== */

/* Text inputs are the only control that gets 2px (rule 3) and the only place
   a focus ring exists — an outline, never a glow (rule 7). */
.apply-form input,
.apply-form select,
.apply-form textarea,
.auth-input,
.lm-field input,
.rd-field input,
.quiz-shell input[type="text"] {
  border-radius: var(--radius-2);
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  color: var(--color-text);
  box-shadow: none;
}
.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus,
.auth-input:focus,
.lm-field input:focus,
.rd-field input:focus {
  outline: 1px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: none;
}
.apply-form {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-0);
  box-shadow: none;
}
.apply-form label {
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
  font-weight: 400;
}

/* ============================ FOOTER ==================================== */

.footer-cta-left h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-text-inverse);
}
.footer-cta-left p { color: var(--color-text-inverse-muted); }

/* The footer cohort card is a record, not a photograph. */
.footer-cohort {
  border: 0;
  border-top: 1px solid rgba(244, 241, 233, 0.25);
  border-radius: var(--radius-0);
  box-shadow: none;
  background: transparent;
}
.footer-cohort .fc-body { padding-top: var(--space-3); }
.fc-name { font-family: var(--font-display); font-weight: 400; }
.fc-date, .fc-status { font-family: var(--font-label); letter-spacing: var(--tracking-wide); }
.fc-cta { font-family: var(--font-label); letter-spacing: var(--tracking-wide); text-transform: uppercase; }

/* Small print and helper text. */
.help, .fine { color: var(--color-text-faint); }

/* ================ HIERARCHY EXCEPTIONS (BELAA-110) =======================
   The converter rewrites values; these three are decisions it cannot make.
   Each is stated here, with weight, because the page's own inline <style>
   loads after this file.

   1. `community` — an accent fill used as *state*. The category rail is a
      control (D4): hairline, tracked capitals, ink. The active category is
      ink plus a 2px rule, never the blue, and no new technique is invented
      for it (D7's inset is recorded for the selected filter tab only).
   2. `community`, `free-guide`, `regulatory-subscribe` — two accent fills on
      one page. The primary is the one the page exists to produce; the second
      becomes the third-level action D4 defines, an underlined text link.
      No third button shape is introduced.
   3. `quiz` — an unnamed native control. The answer radios take the same
      square 13px hairline the catalogue's checkboxes already carry.
   No new token, no third radius, no third face. */

/* 1 — the category rail is a control, and the active category is state. */
main .comm-cats a {
  padding: var(--space-3) 0 !important;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-0) !important;
  background: transparent !important;
  color: var(--color-text-muted) !important;
  font-family: var(--font-label);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 400 !important;
}
main .comm-cats a:hover {
  background: transparent !important;
  color: var(--color-text) !important;
  border-bottom-color: var(--color-border-strong);
}
main .comm-cats a.active {
  background: transparent !important;
  color: var(--color-text-bright) !important;
  font-weight: 500 !important;
  border-bottom-width: 2px !important;
  border-bottom-color: var(--color-text-bright) !important;
}

/* 2a — `community`: access is granted, not purchased, so the gated action is
   the primary. Posting is a member-only affordance and is secondary. */
main .comm-new button {
  padding: 12px 20px !important;
  background: transparent !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border-strong) !important;
  border-radius: var(--radius-0) !important;
  font-family: var(--font-label) !important;
  font-size: var(--text-xs) !important;
  font-weight: 500 !important;
  letter-spacing: var(--tracking-wide) !important;
  text-transform: uppercase !important;
}
main .comm-new button:hover {
  background: var(--color-text-bright) !important;
  border-color: var(--color-text-bright) !important;
  color: var(--color-surface) !important;
}

/* 2b — `free-guide` / `regulatory-subscribe`: the form's submit is the one
   primary on both pages. The repeat CTA in the closing dark band is a
   pointer back to that form, so it is a third-level action, not a second
   button: paper label, hairline underline, no fill. */
.lm-cta-bottom a, .rd-cta-bottom a {
  padding: 0 0 3px !important;
  background: transparent !important;
  color: var(--color-text-inverse) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(244, 241, 233, 0.45) !important;
  border-radius: var(--radius-0) !important;
  display: inline-block !important;
  font-family: var(--font-label) !important;
  font-size: var(--text-xs) !important;
  font-weight: 500 !important;
  letter-spacing: var(--tracking-wide) !important;
  text-transform: uppercase !important;
}
.lm-cta-bottom a:hover, .rd-cta-bottom a:hover {
  background: transparent !important;
  color: var(--color-surface) !important;
  border-bottom-color: var(--color-surface) !important;
}

/* 2c — the primary that survives is put in the sheet's primary shape (D4):
   accent fill, paper label, square, 11px tracked capitals, and it inverts to
   ink on hover like every other primary on the site. The legacy submit also
   carried a 1px hover lift; D7 has no elevation, so the lift goes. */
.lm-btn, .rd-btn {
  padding: 12px 20px !important;
  background: var(--color-accent) !important;
  color: var(--color-accent-contrast) !important;
  border: 1px solid var(--color-accent) !important;
  border-radius: var(--radius-0) !important;
  font-family: var(--font-label) !important;
  font-size: var(--text-xs) !important;
  font-weight: 500 !important;
  letter-spacing: var(--tracking-wide) !important;
  text-transform: uppercase !important;
}
.lm-btn:hover, .rd-btn:hover {
  background: var(--color-text-bright) !important;
  border-color: var(--color-text-bright) !important;
  color: var(--color-surface) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* 3 — `quiz`: the answer control is a square marker, as the catalogue's
   checkboxes are. The page still hides the input and draws the chosen state
   on `.q-option.sel`, so nothing about the interaction changes — the control
   simply stops being the site's one circle. */
.q-option input[type="radio"], .q-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-0);
  background: transparent;
  display: grid;
  place-items: center;
  margin: 0;
}
.q-option input[type="radio"]:checked,
.q-option input[type="checkbox"]:checked {
  background: var(--color-text-bright);
  border-color: var(--color-text-bright);
}
.q-option input[type="radio"]:checked::after,
.q-option input[type="checkbox"]:checked::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--color-surface);
}

/* ============================ SAFETY NET =================================
   Last resort for the twenty-two pages only. If a legacy rule slips through
   with a literal radius, shadow, blur or gradient, the sheet still wins.
   Nothing here is a design decision — every value is a token above. */
.badge, .pill, .chip, .tag, .reg-date, .status, .panel, .accordion-item,
.contact-card, .comm-card, .teach-step, .demog-card, .pillar, .type-card,
.asset-card, .result-card, .form-card, .cred-box, .q-block, .q-option,
.detail-panel, .reg-card, .course-card, .course-rail, .enroll-card,
.footer-cohort, .auth-modal, .mock-cover, .lm-form-card, .rd-form-card {
  border-radius: var(--radius-0) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* ============================ RESPONSIVE ================================= */
@media (max-width: 980px) {
  .course-layout { grid-template-columns: 1fr; gap: var(--space-8); }
  .course-rail, .course-side .enroll-card { position: static; }
  .learn-grid { grid-template-columns: 1fr; }
  .course-hero-meta > span + span { padding-left: 0; border-left: 0; }
}
