/* The Kohlberg-Manacher Foundation
   Layout: black masthead, crimson ground, one framed plate per page that holds the content;
   white cards only where an element must stand apart (apply card, stats, scholars, modules). */
:root {
  --crimson: #840416;        /* page ground, from the original site */
  --crimson-deep: #5a0210;
  --primary: #a51c30;        /* original Bootstrap primary: buttons, links, accents */
  --primary-dark: #8a1628;
  --ink: #0f0f0f;            /* masthead and footer */
  --ink-soft: #2a2a2a;
  --panel: #e8e6e1;          /* the content plate (original grey, lightened and warmed) */
  --panel-edge: #141414;     /* the plate's border, from the original 3px black frame */
  --card: #ffffff;
  --card-alt: #f3f1ec;
  --line: #cdc9c1;
  --text: #1b1b1b;
  --muted: #5d5a55;
  --gold: #f6e94b;           /* Building Substance nodes */
  --gold-edge: #8c8300;
  --coral: #d9655c;          /* Building Substance centre */
  --go: #1f8a3d;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.72);
  --focus: #0068df;
  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --font-sans: "Merriweather Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --measure: 68ch;
  --radius: 6px;
  --head-h: 72px;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--crimson) radial-gradient(140% 90% at 50% -10%, #9c0b1f 0%, var(--crimson) 40%, var(--crimson-deep) 100%);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--ink); z-index: 60; }
img, svg, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -200px; z-index: 100; background: var(--card); color: var(--text); padding: 0.6rem 1rem; font-family: var(--font-sans); font-weight: 600; border-radius: 4px; }
.skip-link:focus { top: 16px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; color: var(--text); }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); font-weight: 900; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
.eyebrow { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin: 0 0 0.6rem; }
.lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.6; }
.meta { font-family: var(--font-sans); color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose p { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.4em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose .steps, .prose .checklist, .prose .goals { padding-left: 0; }
.prose .steps li + li, .prose .checklist li + li, .prose .goals li + li { margin-top: 0; }
.note { font-size: 0.95rem; color: var(--muted); }
/* Running text inside grid or flex cells must be allowed to shrink and to break long words. */
p, li, dd, .stat, .scholar, .prose, .article > section, .steps li > div, .goals li > div, .checklist li > span, .module > div, .big-figure > span, .video-card__body, .aside-card dd { min-width: 0; overflow-wrap: break-word; }

/* ---------- masthead ---------- */
.masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--ink); color: var(--on-dark); border-bottom: 3px solid var(--primary); }
.masthead__inner { max-width: 1200px; margin: 0 auto; min-height: var(--head-h); padding-block: 0.5rem; padding-left: var(--gutter-l); padding-right: var(--gutter-r); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; position: relative; }
.brand { display: flex; align-items: center; gap: 0.8rem; color: var(--on-dark); text-decoration: none; font-weight: 700; font-size: clamp(1rem, 0.85rem + 0.7vw, 1.3rem); line-height: 1.2; letter-spacing: -0.005em; min-width: 0; }
.brand:hover { color: var(--on-dark); }
.brand__mark { width: 46px; flex: none; filter: invert(1); }
.nav { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500; }
.nav a { display: block; color: var(--on-dark-muted); text-decoration: none; padding: 0.55rem 0.8rem; border-radius: 4px; position: relative; white-space: nowrap; }
.nav a:hover { color: var(--on-dark); background: rgba(255, 255, 255, 0.07); }
.nav a[aria-current="page"] { color: var(--on-dark); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.25rem; height: 2px; background: var(--on-dark); }
.nav-toggle { display: none; align-items: center; gap: 0.6rem; background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: var(--on-dark); border-radius: 4px; padding: 0.5rem 0.75rem; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.nav-toggle__bars { width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; display: inline-block; }
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); flex-direction: column; gap: 0; padding: 0.5rem var(--gutter-r) 1rem var(--gutter-l); border-bottom: 3px solid var(--primary); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4); }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.85rem 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 1.05rem; border-radius: 0; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { font-weight: 700; }
}
@media (max-width: 480px) {
  .brand { font-size: 0.95rem; gap: 0.6rem; }
  .brand__mark { width: 36px; }
}

/* ---------- page plate ---------- */
.page { flex: 1 0 auto; padding-block: clamp(24px, 4vw, 48px); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.plate { max-width: 1160px; margin: 0 auto; background: var(--panel); border: 2px solid var(--panel-edge); box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.35); padding: clamp(22px, 4vw, 56px); }
.section { padding-block: clamp(28px, 4vw, 52px); }
.section:first-child { padding-top: 0; }
.section:last-child { padding-bottom: 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 2rem; margin-bottom: 1.5rem; }
.section__head > div { max-width: var(--measure); }
.page-head { display: grid; gap: 0.75rem; max-width: var(--measure); margin-bottom: clamp(20px, 3vw, 36px); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--font-sans); font-weight: 700; font-size: 0.9375rem; line-height: 1.2; padding: 0.8rem 1.3rem; border-radius: var(--radius); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn--ghost:hover { background: var(--text); color: #fff; }
.btn--ghost.btn--on-dark { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn--ghost.btn--on-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--card-alt); border-color: var(--card-alt); color: var(--ink); }
.btn--small { padding: 0.5rem 0.85rem; font-size: 0.8125rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hero__copy > * + * { margin-top: 1.25rem; }
.hero__copy .eyebrow { margin: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.apply-card { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--primary); padding: 1.6rem; display: grid; gap: 0.9rem; justify-items: start; text-decoration: none; color: var(--text); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.apply-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); color: var(--text); }
.apply-card__ninja { width: min(100%, 190px); justify-self: center; margin-block: 0.25rem 0.5rem; }
.apply-card__label { font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.apply-card__title { font-size: 1.35rem; font-weight: 700; line-height: 1.25; text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.status { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 600; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--card-alt); border: 1px solid var(--line); color: var(--text); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.status--open::before { background: var(--go); }
.status--closed::before { background: var(--primary); }

/* ---------- stats ---------- */
.stats { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--card); padding: 1.1rem 1.25rem; display: grid; gap: 0.3rem; align-content: start; }
.stat__value { font-weight: 900; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }
.stat a { color: inherit; text-decoration: none; }
.stat a:hover { color: var(--primary); }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- split with aside ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.aside-card { background: var(--card); border: 1px solid var(--line); padding: 1.4rem; display: grid; gap: 0.9rem; }
.aside-card h3 { font-size: 1.05rem; }
.aside-card dl { margin: 0; display: grid; gap: 0.8rem; }
.aside-card dt { font-family: var(--font-sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; margin-bottom: 0.15rem; }
.aside-card dd { margin: 0; font-size: 0.93rem; line-height: 1.55; }
.goals { list-style: none; counter-reset: goal; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.goals li { counter-increment: goal; display: grid; grid-template-columns: 40px 1fr; gap: 0.9rem; align-items: start; background: var(--card); border: 1px solid var(--line); padding: 1rem 1.1rem; font-size: 0.95rem; line-height: 1.5; }
.goals li::before { content: counter(goal); font-weight: 900; font-size: 1.5rem; line-height: 1; color: var(--primary); }
.goals strong { display: block; font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }

/* ---------- Building Substance wheel ---------- */
.wheel-wrap { display: grid; justify-items: center; gap: 1rem; }
.wheel { width: min(100%, 700px); font-family: var(--font-serif); }
.wheel a { outline: none; }
.wheel .node { transition: transform 0.2s ease; transform-box: fill-box; transform-origin: center; }
.wheel a:hover .node, .wheel a:focus-visible .node { transform: scale(1.06); }
.wheel a:focus-visible .node circle { stroke: var(--focus); stroke-width: 6; }
.wheel-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.wheel-key a { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 600; color: var(--text); text-decoration: none; padding: 0.35rem 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.wheel-key a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- videos ---------- */
.watched-chip { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.watched-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.watched-chip[data-done="true"]::before { background: var(--go); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.video-card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0; text-align: left; cursor: pointer; color: var(--text); display: grid; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.video-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2); }
.video-card__thumb { position: relative; aspect-ratio: 4 / 5; background: var(--ink-soft); display: block; }
.video-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.video-card__play { position: absolute; left: 12px; bottom: 12px; width: 48px; height: 48px; border-radius: 50%; background: rgba(15, 15, 15, 0.8); color: #fff; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, 0.9); transition: background 0.15s ease; }
.video-card:hover .video-card__play { background: var(--primary); }
.video-card__play svg { width: 18px; height: 18px; margin-left: 3px; }
.video-card.is-watched .video-card__play { background: var(--go); }
.video-card__body { padding: 0.85rem 1rem 1rem; display: grid; gap: 0.15rem; }
.video-card__name { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.video-card__meta { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }
.video-modal { border: none; padding: 0; background: transparent; width: min(96vw, 1000px); max-width: 100%; margin: auto; }
.video-modal::backdrop { background: rgba(0, 0, 0, 0.86); }
.video-modal__frame { background: var(--ink); border-radius: 8px; overflow: hidden; display: grid; }
.video-modal video { width: 100%; aspect-ratio: 16 / 9; max-height: min(76vh, 720px); background: #000; object-fit: contain; }
.video-modal__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 1rem; color: #fff; font-family: var(--font-sans); font-size: 0.875rem; }
.video-modal__caption strong { font-family: var(--font-serif); font-size: 1rem; margin-right: 0.5rem; }
.video-modal__caption span { color: var(--on-dark-muted); }
.video-modal__close { flex: none; background: transparent; border: 1px solid rgba(255, 255, 255, 0.45); color: #fff; border-radius: 4px; padding: 0.45rem 0.8rem; cursor: pointer; font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 600; }
.video-modal__close:hover { background: #fff; color: var(--ink); }

/* ---------- outcomes ---------- */
.outcomes h3 { margin: 2rem 0 1rem; font-size: 1.05rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0.02em; }
.employers { margin: 0; background: var(--card); border: 1px solid var(--line); padding: clamp(14px, 2.5vw, 28px); }
.name-grid { columns: 3 220px; column-gap: 2.5rem; list-style: none; margin: 0; padding: 0; font-family: var(--font-sans); font-size: 0.9375rem; }
.name-grid li { break-inside: avoid; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem 2.5rem; }
.fields h4 { font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0.75rem 0 0; }
.chips li { font-family: var(--font-sans); font-size: 0.875rem; padding: 0.35rem 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }

/* ---------- call to action ---------- */
.cta { background: var(--ink); color: #fff; padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 2.5rem; align-items: center; margin-top: clamp(28px, 4vw, 52px); }
.cta h2 { color: #fff; }
.cta p { color: var(--on-dark-muted); margin-top: 0.6rem; max-width: 56ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- rail layout (About, Curriculum) ---------- */
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: clamp(24px, 4vw, 64px); align-items: start; }
.rail-layout > * { min-width: 0; }
.rail { position: sticky; top: calc(var(--head-h) + 24px); display: grid; gap: 1.25rem; }
.rail__title { font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 0.5rem; }
.subnav { list-style: none; margin: 0; padding: 0; font-family: var(--font-sans); font-size: 0.9rem; border-left: 2px solid var(--line); }
.subnav a { display: block; padding: 0.45rem 0.9rem; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; margin-left: -2px; line-height: 1.35; }
.subnav a:hover { color: var(--text); }
.subnav a.is-active { color: var(--text); border-left-color: var(--primary); font-weight: 600; }
.subnav .subnav__sub a { padding-left: 1.6rem; font-size: 0.82rem; }
.rail-figure { border: 3px solid var(--panel-edge); background: var(--card); padding: 1rem; }
@media (max-width: 920px) {
  .rail-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .rail { position: static; order: -1; min-width: 0; }
  .rail > div { min-width: 0; }
  .rail__title, .rail-figure, .subnav__sub { display: none; }
  .subnav { display: flex; max-width: 100%; overflow-x: auto; gap: 0.25rem; border-left: none; border-bottom: 1px solid var(--line); padding-bottom: 0; -webkit-overflow-scrolling: touch; }
  .subnav li { flex: none; }
  .subnav a { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; margin: 0 0 -1px; padding: 0.6rem 0.8rem; }
  .subnav a.is-active { border-bottom-color: var(--primary); }
}
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 52px); }
.article section { scroll-margin-top: calc(var(--head-h) + 24px); }
.article section > h2 { margin-bottom: 1rem; }
.article .prose > h2:first-child { margin-top: 0; }

/* ---------- callouts, lists ---------- */
.callout { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--primary); padding: 1.1rem 1.3rem; font-weight: 700; line-height: 1.6; }
.callout--note { border-left-color: var(--muted); font-weight: 400; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 0.75rem; align-items: start; }
.checklist svg { width: 22px; height: 22px; color: var(--primary); margin-top: 0.25em; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 1rem; background: var(--card); border: 1px solid var(--line); padding: 1rem 1.2rem; line-height: 1.6; }
.steps li::before { content: counter(step); font-weight: 900; font-size: 1.6rem; color: var(--primary); line-height: 1; }
.steps li strong { display: block; margin-bottom: 0.2rem; }
.steps li a { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; }
.big-figure { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; background: var(--card); border: 1px solid var(--line); padding: 1.2rem 1.4rem; }
.big-figure strong { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.big-figure span { font-size: 0.95rem; line-height: 1.5; }
@media (max-width: 520px) { .big-figure { grid-template-columns: 1fr; } }
.figure-frame { border: 3px solid var(--panel-edge); background: var(--card); padding: 1rem; max-width: 420px; }

/* ---------- scholars ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; background: var(--card); border: 1px solid var(--line); padding: 0.25rem; border-radius: var(--radius); font-family: var(--font-sans); font-size: 0.875rem; }
.seg button { background: transparent; border: none; padding: 0.5rem 0.85rem; border-radius: 4px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg .count { font-weight: 400; color: var(--muted); margin-left: 0.3rem; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] .count { color: rgba(255, 255, 255, 0.85); }
.search { position: relative; flex: 1 1 240px; max-width: 380px; }
.search input { width: 100%; font-family: var(--font-sans); font-size: 0.9375rem; padding: 0.7rem 0.9rem 0.7rem 2.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.result-line { min-height: 1.5em; margin-bottom: 0.5rem; }
.cohort { padding-block: 1.5rem; }
.cohort + .cohort { border-top: 1px solid var(--line); }
.cohort__head { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.1rem; scroll-margin-top: calc(var(--head-h) + 24px); }
.scholar-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem 1rem; }
.scholar { display: grid; gap: 0.1rem; align-content: start; font-size: 0.9rem; }
.scholar__photo { aspect-ratio: 3 / 4; background: var(--card-alt); border: 1px solid var(--line); overflow: hidden; margin-bottom: 0.55rem; }
.scholar__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.scholar__name { font-weight: 700; line-height: 1.3; }
.scholar__home { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--muted); }
.scholar__school { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 600; text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }
.scholar__major { font-style: italic; font-size: 0.85rem; color: var(--muted); line-height: 1.4; margin-top: 0.1rem; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); font-family: var(--font-sans); background: var(--card); border: 1px dashed var(--line); }
@media (max-width: 600px) {
  .scholar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 0.75rem; }
  .scholar { font-size: 0.85rem; }
}

/* ---------- curriculum ---------- */
.year { scroll-margin-top: calc(var(--head-h) + 24px); }
.year + .year { margin-top: clamp(28px, 4vw, 52px); padding-top: clamp(28px, 4vw, 52px); border-top: 1px solid var(--line); }
.year__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 1.25rem; }
.year__head h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); font-weight: 900; }
.modules { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.module { background: var(--card); border: 1px solid var(--line); padding: 1.3rem 1.4rem; display: grid; grid-template-columns: 52px 1fr; gap: 1rem; scroll-margin-top: calc(var(--head-h) + 24px); }
.module__num { font-weight: 900; font-size: 1.4rem; color: var(--primary); line-height: 1.15; font-variant-numeric: tabular-nums; }
.module h3 { font-size: 1.15rem; margin-bottom: 0.7rem; }
.module ul { columns: 2 250px; column-gap: 2.25rem; padding-left: 1.1rem; margin: 0; font-size: 0.95rem; line-height: 1.55; }
.module li { break-inside: avoid; padding: 0.2rem 0; }
@media (max-width: 600px) { .module { grid-template-columns: 1fr; gap: 0.3rem; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.email-card { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--primary); padding: 1.5rem; display: grid; gap: 0.85rem; justify-items: start; }
.email-card__addr { font-family: var(--font-sans); font-size: clamp(1rem, 0.8rem + 1vw, 1.3rem); font-weight: 600; word-break: break-all; color: var(--text); text-decoration: none; }
.email-card__addr:hover { color: var(--primary); }
.email-card__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--on-dark-muted); font-family: var(--font-sans); font-size: 0.875rem; }
.footer__inner { max-width: 1200px; margin: 0 auto; padding-block: 2.5rem 2rem; padding-left: var(--gutter-l); padding-right: var(--gutter-r); display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1.2fr; gap: 2rem 3rem; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__brand { font-family: var(--font-serif); color: #fff; font-weight: 700; font-size: 1.1rem; display: flex; gap: 0.7rem; align-items: center; }
.footer__brand img { width: 36px; filter: invert(1); }
.footer__blurb { margin-top: 0.9rem; max-width: 46ch; line-height: 1.6; }
.footer .footer__label { margin: 0; color: #fff; font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer ul { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.45rem; }
.footer__legal { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer__legal div { max-width: 1200px; margin: 0 auto; padding-block: 1rem; padding-left: var(--gutter-l); padding-right: var(--gutter-r); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.8125rem; }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr; gap: 1.75rem; } }
