/* Makwedeng Training
 *
 * Colours are sampled from the roundel logo: the two greens of the ring, the
 * amber of the sunrise, and its near-black. The paper tone is warm so the amber
 * sits on it rather than fighting it.
 *
 * No inline styles anywhere and style-src 'self' - so nothing may be set from
 * JavaScript either. State lives in classes (is-on, is-open) and attributes.
 */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("/static/fonts/jakarta-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("/static/fonts/jakarta-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --green-950: #1d3019;
  --green-900: #2c4626;
  --green-700: #395930;
  --green-500: #51a047;
  --green-100: #e7f0e3;
  --amber: #e49c2d;
  --amber-600: #c47f14;     /* amber that holds 4.5:1 as text on white */
  --amber-100: #fbecd3;
  --ink: #262425;
  --ink-2: #57524c;
  --ink-3: #7a746c;
  --paper: #faf7f1;
  --paper-2: #f3eee4;
  --line: #e5ded1;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(38, 36, 37, .06), 0 8px 24px -12px rgba(38, 36, 37, .18);
  --wrap: 1180px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Jakarta", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green-500); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; color: var(--green-900); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.flush { margin: 0; }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--white); padding: 8px 14px; }
.skip:focus { left: 8px; }
.eyebrow {
  font-family: var(--body); font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--amber-600); margin: 0 0 12px;
}
.eyebrow-light { color: #f5c77a; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 760px; }
.hint { font-size: 14px; color: var(--ink-3); margin: 6px 0 0; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 700 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-green { background: var(--green-700); color: var(--white); }
.btn-green:hover { background: var(--green-900); color: var(--white); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #eeae4b; color: var(--ink); }
.btn-light { background: rgba(255, 255, 255, .12); color: var(--white); border-color: rgba(255, 255, 255, .7); }
.btn-light:hover { background: var(--white); color: var(--green-900); }
.btn-outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn-outline:hover { background: var(--green-700); color: var(--white); }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------- top bar and header ---------- */
.topbar { background: var(--green-950); color: #cfdcc9; font-size: 14px; }
.topbar-in { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #eef4ea; text-decoration: none; margin-right: 18px; }
.topbar a:hover { color: var(--amber); }
.topbar-note { letter-spacing: .04em; }

/* Sticky, but no backdrop-filter: it broke page captures in the preview pane on
   EL Show, which is how these sites get checked. */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: 52px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--green-900); letter-spacing: .01em; }
.brand-text span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a, .nav-group > a {
  padding: 10px 14px; border-radius: 8px; color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 15px;
}
.site-nav > a:hover, .nav-group > a:hover { background: var(--green-100); color: var(--green-900); }
.site-nav a[aria-current="page"] { color: var(--green-700); box-shadow: inset 0 -3px 0 var(--amber); border-radius: 0; }
.site-nav .nav-cta { margin-left: 10px; box-shadow: none; }
.site-nav .nav-cta[aria-current] { box-shadow: none; }
.nav-group { position: relative; }
.nav-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: none;
}
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { display: block; }
.nav-menu a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px; }
.nav-menu a:hover { background: var(--green-100); }
.nav-toggle { display: none; }

@media (max-width: 1020px) {
  .topbar-note { display: none; }
  .js-nav .nav-toggle {
    display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center;
    background: var(--green-100); border: 0; border-radius: 10px; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--green-900); position: relative; content: "";
    transition: transform .2s;
  }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .head-in { flex-wrap: wrap; }
  .site-nav { flex-direction: column; align-items: stretch; width: 100%; gap: 0; padding-bottom: 12px; }
  .js-nav .site-nav { display: none; }
  .js-nav .site-nav.is-open { display: flex; }
  .site-nav > a, .nav-group > a { display: block; padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--amber); padding-left: 12px; }
  .nav-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 6px 14px; }
  .nav-menu a { padding: 8px 6px; font-size: 15px; color: var(--ink-2); }
  .site-nav .nav-cta { margin: 14px 0 0; border-radius: 999px; border-bottom: 0; text-align: center; }
}
@media (max-width: 560px) {
  .topbar-contact a:last-child { display: none; }
  .brand-text span { display: none; }
}

/* ---------- home hero ---------- */
.hero { position: relative; color: var(--white); background: var(--green-950); overflow: hidden; isolation: isolate; }
.hero-photos { position: absolute; inset: 0; z-index: -2; }
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease; transform: scale(1.04);
}
.hero-photo.is-on { opacity: 1; animation: drift 12s ease-out both; }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .hero-photo.is-on { animation: none; } .hero-photo { transition: none; } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(20, 34, 17, .92) 0%, rgba(29, 48, 25, .78) 45%, rgba(29, 48, 25, .25) 100%),
    linear-gradient(0deg, rgba(20, 34, 17, .55), transparent 40%);
}
.hero-in { padding-top: clamp(80px, 12vw, 150px); padding-bottom: clamp(80px, 11vw, 140px); max-width: var(--wrap); }
.hero h1 { color: var(--white); font-size: clamp(40px, 6.4vw, 76px); max-width: 13ch; font-weight: 600; }
.hero-lead { font-size: clamp(17px, 1.7vw, 20px); max-width: 620px; color: #e4ecdf; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- sections ---------- */
section { padding: clamp(56px, 8vw, 96px) 0; }
section.tight { padding-top: 24px; }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section-head.split > div { max-width: 720px; }
.section-head h2, .section-title { margin: 0; }
.section-title { margin-bottom: 24px; }

.focus { background: var(--white); }
.focus-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.focus-list li {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; font-weight: 600; line-height: 1.4;
  border-top: 4px solid var(--green-500);
}
.focus-n { font-family: var(--display); font-size: 34px; color: var(--amber); line-height: 1; }
.focus-note { max-width: 760px; color: var(--ink-2); font-size: 18px; margin: 0; }
@media (max-width: 900px) { .focus-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .focus-list { grid-template-columns: 1fr; } }

/* ---------- course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.course-card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; text-decoration: none; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.course-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green-500); transition: width .2s, background .2s; }
.course-card:hover { transform: translateY(-3px); border-color: var(--green-500); color: var(--ink); }
.course-card:hover::before { background: var(--amber); width: 6px; }
.course-card h3 { font-size: 20px; margin: 0; }
.course-level {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--green-100); color: var(--green-900); padding: 4px 10px; border-radius: 999px;
}
.course-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; font-size: 14px; }
.course-facts div { display: flex; gap: 6px; }
.course-facts dt { color: var(--ink-3); }
.course-facts dd { margin: 0; font-weight: 600; }
.course-more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 700; color: var(--green-700); }
.level-group + .level-group { margin-top: 48px; }
.level-h { font-size: 15px; font-family: var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.level-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- stats band ---------- */
.stats { background: var(--green-900); color: #e4ecdf; position: relative; overflow: hidden; }
.stats::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  border-radius: 50%; border: 60px solid rgba(81, 160, 71, .18);
}
.stats-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; position: relative; }
.stat-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; }
.stat-list div { border-left: 3px solid var(--amber); padding-left: 18px; display: flex; flex-direction: column-reverse; }
.stat-list dd { margin: 0; font-family: var(--display); font-size: clamp(44px, 6vw, 72px); color: var(--white); line-height: 1; }
.stat-list .stat-num { font-variant-numeric: tabular-nums; }
.stat-list .stat-label.is-typing::after {
  content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px;
  background: var(--amber); vertical-align: -2px; animation: caret-blink 1s steps(2, start) infinite;
}
.stat-list dt { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-top: 8px; }
.stats h2 { color: var(--white); }
@media (max-width: 820px) { .stats-in { grid-template-columns: 1fr; } }

/* ---------- testimonials ---------- */
.voices { background: var(--paper-2); }
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.voice { margin: 0; background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; }
.voice::before { content: "\201C"; font-family: var(--display); font-size: 80px; line-height: .6; color: var(--amber); display: block; height: 34px; }
.voice blockquote { margin: 0 0 18px; font-size: 16px; color: var(--ink-2); }
.voice figcaption { display: flex; flex-direction: column; font-size: 15px; }
.voice figcaption b { color: var(--green-900); }
.voice figcaption span { color: var(--ink-3); font-size: 14px; }
@media (max-width: 900px) { .voice-grid { grid-template-columns: 1fr; } }

/* Home testimonials as one card at a time (app.js adds .is-stage). Every card
   sits in the same grid cell, so the stage is as tall as the longest quote and
   nothing below moves while one types; shorter quotes sit centred. Untyped text is still laid out, just
   invisible (.voice-ghost), which keeps each card's wrapping fixed too. The
   slide uses `translate`, and the scroll reveal is switched off here, because
   that animation holds opacity and transform and would beat the transitions. */
/* The waiting cards sit 70px off to the side; clip so a phone never scrolls sideways. */
.voices:has(.is-stage) { overflow-x: clip; }
.voice-grid.is-stage { grid-template-columns: 1fr; align-items: stretch; max-width: 780px; margin: 0 auto; }
.voice-grid.is-stage .voice {
  grid-area: 1 / 1; padding: 40px 44px; animation: none;
  display: flex; flex-direction: column; justify-content: center;
  visibility: hidden; opacity: 0; translate: 70px 0;
  transition: opacity .5s ease, translate .5s ease, visibility 0s linear .5s;
}
.voice-grid.is-stage .voice.is-on { visibility: visible; opacity: 1; translate: 0 0; transition: opacity .5s ease, translate .5s ease, visibility 0s; }
.voice-grid.is-stage .voice.is-leaving { visibility: visible; opacity: 0; translate: -70px 0; transition: opacity .5s ease, translate .5s ease, visibility 0s; }
.voice-grid.is-stage .voice blockquote { font-size: 18px; line-height: 1.65; }
.voice-grid.is-stage .voice figcaption { transition: opacity .4s; }
.voice-grid.is-stage .voice:not(.is-done) figcaption { opacity: 0; }
.voice-ghost { visibility: hidden; }
.voice .is-typing::after {
  content: ""; display: inline-block; width: 2px; height: 1em; margin: 0 -2px 0 0;
  background: var(--amber); vertical-align: -2px; animation: caret-blink 1s steps(2, start) infinite;
}
.voice-controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 22px; }
.voice-controls[hidden] { display: none; }
.voice-dot { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 2px solid var(--green-700); background: transparent; cursor: pointer; }
.voice-dot[aria-current="true"] { background: var(--green-700); }
.voice-pause {
  margin-left: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--green-700);
  background: transparent; color: var(--green-700); font: 600 13px/1.4 var(--body); cursor: pointer;
}
.voice-dot:focus-visible, .voice-pause:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
@media (max-width: 600px) { .voice-grid.is-stage .voice { padding: 28px 24px; } .voice-grid.is-stage .voice blockquote { font-size: 16px; } }

/* ---------- split call to action ---------- */
.split-cta { padding-top: 0; }
.voices + .split-cta, .courses-band + .split-cta { padding-top: clamp(56px, 8vw, 96px); }
.split-cta-in { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
/* The two audience cards trade colours while either is hovered (or focused),
   and the one under the pointer lifts. Each palette is a set of custom
   properties, so the swap is just the two cards taking each other's set.
   The lift uses `translate`, not `transform`: the scroll-reveal animation holds
   `transform` and would win over a hover transform. */
.cta-card {
  display: block; padding: 36px; border-radius: 14px; text-decoration: none;
  background: var(--cta-bg); color: var(--cta-fg); border: 1px solid var(--cta-edge);
  transition: background-color .35s, color .35s, border-color .35s, translate .25s, box-shadow .25s;
}
.cta-card h2, .cta-card .eyebrow, .cta-card .cta-go { transition: color .35s; }
.cta-card h2 { color: var(--cta-head); }
.cta-card .eyebrow { color: var(--cta-eye); }
.cta-card .cta-go { color: var(--cta-go); font-weight: 700; }
.cta-card:hover { color: var(--cta-fg); }
.cta-card p:not(.eyebrow) { max-width: 46ch; }
.cta-company,
.split-cta-in:has(.cta-card:hover, .cta-card:focus-visible) .cta-learner {
  --cta-bg: var(--green-700); --cta-fg: #e4ecdf; --cta-edge: var(--green-700);
  --cta-head: var(--white); --cta-eye: #f5c77a; --cta-go: var(--amber);
}
.cta-learner,
.split-cta-in:has(.cta-card:hover, .cta-card:focus-visible) .cta-company {
  --cta-bg: var(--amber-100); --cta-fg: var(--ink-2); --cta-edge: #f1d9ad;
  --cta-head: var(--green-900); --cta-eye: var(--amber-600); --cta-go: var(--green-700);
}
.cta-card:hover, .cta-card:focus-visible { translate: 0 -6px; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .cta-card { transition: none; } .cta-card h2, .cta-card .eyebrow, .cta-card .cta-go { transition: none; } }
@media (max-width: 760px) { .split-cta-in { grid-template-columns: 1fr; } }

/* ---------- news ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.post-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .2s;
}
.post-card:hover { transform: translateY(-3px); color: var(--ink); }
.post-card img { aspect-ratio: 2 / 1; object-fit: cover; width: 100%; background: var(--paper-2); }
.post-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card time { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-600); }
.post-card h2, .post-card h3 { font-size: 22px; margin: 8px 0 8px; }
.post-card p { color: var(--ink-2); font-size: 15px; }

/* ---------- partners and clients ---------- */
.partners { background: var(--white); }
.partner-row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.partner-row li a, .partner-row li > span { color: var(--ink); text-decoration: none; }
.partner-row li { text-align: center; }
.partner-row a, .partner-row li { display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.partner-row img { width: 100%; max-width: 170px; aspect-ratio: 1; object-fit: contain; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: border-color .2s; }
.partner-row a:hover img { border-color: var(--green-500); }
.partner-row-left { grid-template-columns: repeat(4, minmax(0, 170px)); }
@media (max-width: 760px) { .partner-row, .partner-row-left { grid-template-columns: 1fr 1fr; } }

.clients-band { padding-top: 0; background: var(--white); }
.client-names { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.client-names li, .client-list li {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 15px;
  font-weight: 600; color: var(--green-900); background: var(--paper);
}
.client-list { list-style: none; padding: 0 !important; margin: 24px 0 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.client-list li { margin: 0 !important; }

/* Light, so it doesn't run into the dark footer below it. */
.pull { background: var(--amber-100); text-align: center; padding: clamp(56px, 8vw, 88px) 0; border-top: 1px solid #f1d9ad; }
.pull blockquote { margin: 0 auto; max-width: 900px; }
.pull p { font-family: var(--display); font-size: clamp(26px, 3.4vw, 42px); color: var(--green-900); line-height: 1.25; font-weight: 500; }
.pull p::before { content: "\201C"; color: var(--amber); }
.pull p::after { content: "\201D"; color: var(--amber); }
.pull cite { font-style: normal; color: var(--amber-600); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }

/* ---------- inner pages ---------- */
.page-head { background: var(--green-900); padding: clamp(48px, 7vw, 84px) 0 clamp(40px, 6vw, 64px); position: relative; overflow: hidden; }
.page-head::after {
  content: ""; position: absolute; right: -80px; bottom: -160px; width: 380px; height: 380px;
  border-radius: 50%; border: 48px solid rgba(228, 156, 45, .16);
}
.page-head h1 { color: var(--white); max-width: 22ch; }
.page-head .eyebrow { color: #f5c77a; }
.page-head .lead { color: #d6e2d0; margin: 0; }
.crumbs { font-size: 14px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; color: #b8c9b0; }
.crumbs a { color: #d6e2d0; }
.crumbs-light a { color: #fff; }

.side-grid { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.side-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a:not(.btn) { padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.side-nav a:not(.btn):hover { background: var(--green-100); color: var(--green-900); }
.side-nav a[aria-current="page"] { background: var(--white); color: var(--green-900); box-shadow: inset 3px 0 0 var(--amber), var(--shadow); }
.side-cta { margin-top: 18px; }
@media (max-width: 860px) {
  .side-grid { grid-template-columns: 1fr; gap: 28px; }
  .side-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .side-nav a:not(.btn) { background: var(--white); border: 1px solid var(--line); }
  .side-cta { display: none; }
}

.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--green-500); }
.prose ol > li::marker { font-weight: 700; color: var(--amber-600); }
.prose strong { color: var(--green-900); }
.ticks { list-style: none; padding-left: 0 !important; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 9px;
  border-left: 3px solid var(--green-500); border-bottom: 3px solid var(--green-500); transform: rotate(-45deg);
}

/* The milestones read as a timeline: the numbered list gets a rail. */
.prose-timeline > ol { list-style: none; padding-left: 0; counter-reset: ms; border-left: 2px solid var(--line); margin-left: 20px; }
.prose-timeline > ol > li { counter-increment: ms; position: relative; padding: 0 0 22px 36px; }
.prose-timeline > ol > li::before {
  content: counter(ms); position: absolute; left: -21px; top: -2px; width: 40px; height: 40px;
  border-radius: 50%; background: var(--white); border: 2px solid var(--green-500);
  display: grid; place-items: center; font: 700 15px/1 var(--body); color: var(--green-900);
}
.prose-timeline > ol > li:last-child::before { background: var(--amber); border-color: var(--amber); }
.prose-timeline ul { margin-top: 10px; }

/* ---------- a course ---------- */
.course-hero { position: relative; background: var(--green-950); color: var(--white); padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 7vw, 80px); overflow: hidden; isolation: isolate; }
.course-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.course-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 34, 17, .94), rgba(29, 48, 25, .72)); }
.course-hero h1 { color: var(--white); max-width: 24ch; }
.course-grid-2 { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
.course-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 900px) { .course-grid-2 { grid-template-columns: 1fr; } .course-side { position: static; } }

.fact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.fact-card h2 { font-size: 22px; }
.fact-card dl { margin: 0 0 12px; }
.fact-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.fact-card dt { color: var(--ink-3); }
.fact-card dd { margin: 0; font-weight: 700; text-align: right; }
.contact-card dl div { flex-direction: column; gap: 2px; }
.contact-card dd { text-align: left; }
.other-courses h2 { font-size: 15px; font-family: var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.other-courses a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink); }
.other-courses a:hover { color: var(--green-700); }
.other-courses span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--amber-600); }
.steps { margin: 0; padding-left: 1.2em; font-size: 15px; }
.steps li { margin-bottom: 8px; }

/* ---------- articles ---------- */
.article { padding-top: 48px; }
.article-img { border-radius: var(--radius); margin-bottom: 36px; width: 100%; box-shadow: var(--shadow); }

/* ---------- gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font: 600 14px/1 var(--body); padding: 10px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-2);
}
.chip:hover { border-color: var(--green-500); color: var(--green-900); }
.chip.is-on { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.gallery { list-style: none; margin: 0; padding: 0; columns: 4 240px; column-gap: 14px; }
.gallery li { break-inside: avoid; margin-bottom: 14px; }
.gallery li[hidden] { display: none; }
.gallery a { display: block; position: relative; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.gallery img { width: 100%; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 12px 10px; font-size: 14px; color: var(--white); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(15, 22, 13, .9); }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; margin: 0 auto; }
.lightbox-close, .lightbox-nav {
  position: fixed; background: rgba(255, 255, 255, .14); color: var(--white); border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer;
}
.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav { top: 50%; margin-top: -24px; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--amber); color: var(--ink); }

/* ---------- forms ---------- */
.form-section { padding-top: 48px; }
.form-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.form-aside { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px 20px; }
.field-half { grid-column: span 3; }
.field-full { grid-column: span 6; }
.field-third { grid-column: span 3; }
@media (max-width: 620px) { .field-half, .field-third { grid-column: span 6; } }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.req { color: var(--amber-600); }
.field input:not([type=checkbox]), .field select, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--body); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid #d8d0c1; border-radius: 8px; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(81, 160, 71, .18); }
.field textarea { resize: vertical; min-height: 140px; }
.check { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 500 !important; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green-700); flex: none; }
.form-actions { display: flex; align-items: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.form-error { background: #fdecea; color: #8a1f11; border-left: 4px solid #c0392b; padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; }
.form-done { text-align: center; padding: 30px 10px; }
.form-done h2 { font-size: 28px; }
.form-done::before {
  content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--green-100) linear-gradient(var(--green-500), var(--green-500)) no-repeat;
  background-size: 0 0; border: 3px solid var(--green-500);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.site-foot { background: var(--green-950); color: #b8c9b0; padding: 64px 0 28px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; margin-bottom: 44px; }
.foot-brand img { width: 88px; height: 88px; background: var(--white); border-radius: 50%; padding: 4px; margin-bottom: 16px; }
.foot-brand p { max-width: 32ch; }
.foot-h { font-family: var(--body); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin: 0 0 14px; font-weight: 700; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 9px; }
.site-foot a { color: #e4ecdf; text-decoration: none; }
.site-foot a:hover { color: var(--amber); }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a { border: 1px solid rgba(228, 236, 223, .3); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.social-dark a { border-color: var(--line); color: var(--green-900); text-decoration: none; font-weight: 600; }
.social-dark a:hover { border-color: var(--green-500); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

.colophon { border-top: 1px solid rgba(228, 236, 223, .14); padding-top: 22px; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* The footer credit, shared with the other EHTech sites. The whole credit is the
   link; the animation only ever touches text, so its resting size never changes. */
.credit { display: inline-block; color: #b8c9b0 !important; text-decoration: none; transition: color .18s; }
.credit b { color: var(--amber); font-weight: 700; }
.credit:hover { color: var(--white) !important; }
.credit-caret { display: none; }
.js-type .credit-caret {
  display: inline-block; width: 1px; height: 1em; margin-left: 2px;
  background: var(--amber); vertical-align: -2px; animation: caret-blink 1s steps(2, start) infinite;
}
.js-type .credit.is-idle .credit-caret { animation: none; opacity: 1; }
@keyframes caret-blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .js-type .credit-caret { display: none; } }

/* Scroll reveals are CSS only. An IntersectionObserver version left content at
   opacity 0 on EL Show whenever it didn't fire. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .course-card, .post-card, .voice, .focus-list li, .cta-card {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ======================================================================
   Admin
   ====================================================================== */
.is-admin { background: #f4f2ec; }
.admin { padding: 40px 0 80px; }
.admin h1 { font-size: 34px; }
.admin-bar { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-bar h1 { margin: 0; }
.admin-narrow { max-width: 620px; }
.admin-section { margin-bottom: 36px; }
.admin-h3 { font-family: var(--body); font-size: 17px; font-weight: 700; color: var(--ink); margin: 20px 0 8px; }
.sec-note { max-width: 760px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.panel h2 { font-size: 22px; }
.admin-form .field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.field-hint { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.admin-tabs a[aria-current] { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { background: var(--paper-2); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.admin-table tr.is-hidden td { color: var(--ink-3); }
.admin-table tr.is-new td:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.admin-table a { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); margin-left: 6px; vertical-align: 1px; }
.pill-warn { background: #fdecea; color: #8a1f11; }
.pill-ok { background: var(--green-100); color: var(--green-900); }
.pill-amber { background: var(--amber-100); color: #7a4c05; }
.link-action, .link-danger { background: none; border: 0; padding: 0; font: 600 14px var(--body); cursor: pointer; color: var(--green-700); text-decoration: underline; }
.link-danger { color: #b0301f; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.row-actions { display: flex; gap: 14px; }
.row-actions form { margin: 0; }
.notice-ok { background: var(--green-100); border-left: 4px solid var(--green-500); padding: 14px 18px; border-radius: 6px; margin-bottom: 22px; }
.notice-warn { background: var(--amber-100); border-left: 4px solid var(--amber); padding: 14px 18px; border-radius: 6px; margin-bottom: 22px; }
.code-block { font-family: ui-monospace, Consolas, monospace; background: var(--paper-2); padding: 10px 12px; border-radius: 6px; word-break: break-all; font-size: 14px; }
.codes { font-family: ui-monospace, Consolas, monospace; columns: 2; list-style: none; padding: 0; }
.qr { width: 200px; height: 200px; background: var(--white); padding: 8px; border: 1px solid var(--line); }
.signout { margin-top: 48px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dash-card { display: block; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); }
.dash-card:hover { border-color: var(--green-500); color: var(--ink); }
.dash-card b { display: block; font-family: var(--display); font-size: 34px; color: var(--green-900); }
.dash-card.is-alert { border-color: var(--amber); background: var(--amber-100); }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.detail-list dt { color: var(--ink-3); }
.detail-list dd { margin: 0; white-space: pre-wrap; }
.admin-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.admin-photo { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.admin-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.admin-photo form { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.admin-photo select, .admin-photo input[type=text], .admin-photo input[type=number] { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.admin-photo label { display: flex; gap: 6px; align-items: center; }
.admin-photo.is-hidden img { opacity: .4; }
.crib { font-size: 13px; background: var(--paper-2); border-radius: 6px; padding: 10px 14px; color: var(--ink-2); }
.crib code { font-family: ui-monospace, Consolas, monospace; background: var(--white); padding: 1px 5px; border-radius: 4px; }
.thumb { width: 120px; border-radius: 6px; margin: 6px 0; }
.admin-nav { flex-wrap: wrap; }
.perms { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 4px; margin: 6px 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 20px; }
.perms legend { font-weight: 700; font-size: 15px; padding: 0 6px; }
.perms .check { margin-bottom: 10px; font-size: 15px; }
.user-card { padding: 0; }
.user-card > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.user-card > summary::-webkit-details-marker { display: none; }
.user-card > summary::after { content: "Edit"; font-size: 14px; font-weight: 600; color: var(--green-700); text-decoration: underline; }
.user-card[open] > summary::after { content: "Close"; }
.user-card[open] > summary { border-bottom: 1px solid var(--line); }
.user-card > :not(summary) { margin-left: 20px; margin-right: 20px; }
.user-card > :last-child { margin-bottom: 18px; }
.user-card.is-hidden > summary { opacity: .6; }
.user-name { display: flex; flex-direction: column; flex: 1; min-width: 200px; }
.user-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.user-pills .pill { margin-left: 0; }
.user-actions { margin-top: 6px; flex-wrap: wrap; }
