/* ================================================================
   AIM  |  "Zucker Blueprint" Design Language
   Zucker School of Medicine palette, uplifted.
   Institutional whitespace  x  colesurfs/CSHI metadata precision.
   ================================================================ */

/* ── Self-hosted faces — no external font requests ─────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/static/fonts/jetbrains-mono-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ================================================================
   TOKENS
   ================================================================ */

/* Light — the default. Every colour gets its definition here. */
:root {
  /* Brand — sampled from medicine.hofstra.edu theme CSS */
  --ink:        #001254;   /* deep navy, display type          */
  --primary:    #003594;   /* Hofstra Blue                     */
  --primary-2:  #4068af;
  --accent:     #2e96ff;
  --gold:       #ffc72c;
  --gold-2:     #ffe395;

  /* Surfaces */
  --bg-0:       #ffffff;
  --bg-1:       #f8f9fa;
  --bg-2:       #eef1f6;
  --bg-sunken:  #f2f4f8;

  /* Lines */
  --border-0:   #e6e9ef;
  --border-1:   #d3d9e3;
  --border-2:   #b9c2d1;

  /* Text */
  --text-0:     #16192b;   /* body                             */
  --text-1:     #45506b;   /* secondary                        */
  --text-2:     #6c7791;   /* metadata                         */
  --text-3:     #96a0b5;   /* faint                            */
  --on-primary: #ffffff;

  /* Status */
  --ok:         #197a4b;
  --ok-bg:      #e4f3ea;
  --warn:       #8a6100;
  --warn-bg:    #fdf3d8;
  --alert:      #b3261e;
  --alert-bg:   #fdeceb;

  /* Effects */
  --shadow-1:   0 1px 2px rgba(0, 18, 84, .06), 0 2px 8px rgba(0, 18, 84, .05);
  --shadow-2:   0 2px 4px rgba(0, 18, 84, .07), 0 12px 32px rgba(0, 18, 84, .09);
  --focus:      0 0 0 3px rgba(46, 150, 255, .35);
  --hero-wash:  linear-gradient(168deg, #f4f7fc 0%, #ffffff 62%);

  /* Type */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: var(--font-body);
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;

  /* Geometry */
  --radius:     6px;
  --radius-lg:  12px;
  --container:  1120px;
  --measure:    680px;
  --rail:       clamp(20px, 5vw, 48px);

  /* Spacing scale — 4px base. Every gap on the site is one of these.
     Nothing should introduce a one-off pixel value. */
  --s-1:  4px;
  --s-2:  8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Vertical rhythm */
  --section-y: clamp(56px, 6.5vw, 96px);   /* padding inside a .section     */
  --head-y:    clamp(40px, 5vw, 64px);     /* top padding of a .page-head   */
  --hero-y:    clamp(48px, 5.5vw, 72px);   /* padding inside the hero       */
}

/* Dark — navy-tinted, never neutral black. Keeps Hofstra identity. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:        #dfe8fb;
    --primary:    #6ba8f5;
    --primary-2:  #86bafc;
    --accent:     #2e96ff;

    --bg-0:       #0b0e17;
    --bg-1:       #111624;
    --bg-2:       #161d30;
    --bg-sunken:  #0e131f;

    --border-0:   #1e2740;
    --border-1:   #2c3a5c;
    --border-2:   #3d4f78;

    --text-0:     #e6ecf7;
    --text-1:     #a8b6d1;
    --text-2:     #7d8caa;
    --text-3:     #5d6b87;
    --on-primary: #06101f;

    --ok:         #63d197;
    --ok-bg:      #10301f;
    --warn:       #f2c14e;
    --warn-bg:    #33270a;
    --alert:      #ff8a80;
    --alert-bg:   #351615;

    --shadow-1:   0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2:   0 2px 4px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .5);
    --hero-wash:  linear-gradient(168deg, #131a2c 0%, #0b0e17 62%);
  }
}

:root[data-theme="dark"] {
  --ink:        #dfe8fb;
  --primary:    #6ba8f5;
  --primary-2:  #86bafc;
  --accent:     #2e96ff;

  --bg-0:       #0b0e17;
  --bg-1:       #111624;
  --bg-2:       #161d30;
  --bg-sunken:  #0e131f;

  --border-0:   #1e2740;
  --border-1:   #2c3a5c;
  --border-2:   #3d4f78;

  --text-0:     #e6ecf7;
  --text-1:     #a8b6d1;
  --text-2:     #7d8caa;
  --text-3:     #5d6b87;
  --on-primary: #06101f;

  --ok:         #63d197;
  --ok-bg:      #10301f;
  --warn:       #f2c14e;
  --warn-bg:    #33270a;
  --alert:      #ff8a80;
  --alert-bg:   #351615;

  --shadow-1:   0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2:   0 2px 4px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .5);
  --hero-wash:  linear-gradient(168deg, #131a2c 0%, #0b0e17 62%);
}


/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  background: var(--bg-0);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-0);
  background: var(--bg-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv05' 1, 'cv08' 1, 'ss03' 1;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }

::selection { background: color-mix(in srgb, var(--gold) 45%, transparent); color: var(--text-0); }

/* No scrollbar styling on purpose — neither ::-webkit-scrollbar nor
   scrollbar-color. Both flip Chrome from native overlay scrollbars to
   custom-drawn ones (extra paint while scrolling, and a permanent gutter),
   while Safari ignores the styling entirely under macOS overlay scrollbars.
   Native scrollbars are the only variant that scrolls identically in both. */

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: var(--on-primary);
  padding: var(--s-3) var(--s-4); border-radius: 0 0 var(--radius) 0;
  font: 600 .8rem/1 var(--font-body);
}
.skip-link:focus { left: 0; }


/* ================================================================
   TYPOGRAPHY
   ================================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.4vw, 3rem); font-weight: 720; letter-spacing: -.033em; line-height: 1.08; }
h2 { font-size: clamp(1.42rem, 1.18rem + .95vw, 1.85rem); letter-spacing: -.026em; }
h3 { font-size: 1.18rem; letter-spacing: -.018em; }
h4 { font-size: 1.02rem; font-weight: 660; letter-spacing: -.011em; }

/* The gold rule — Zucker's signature, kept as a hairline marker only. */
.rule-gold {
  width: 72px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-top: var(--s-5);
}

/* Monospace metadata rail — the colesurfs carry-over. */
.meta {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55em;
}
.meta .sep { color: var(--border-2); }
.meta strong { color: var(--text-1); font-weight: 700; }

/* A link that carries the visual weight of a section heading — used where a
   pointer to another page IS the content, with no prose around it. */
.link-lead {
  display: inline-flex; align-items: baseline; gap: var(--s-3);
  font-size: clamp(1.42rem, 1.18rem + .95vw, 1.85rem);
  font-weight: 680; letter-spacing: -.026em; line-height: 1.25;
  color: var(--ink); text-decoration: none;
  text-wrap: balance;
  transition: color .15s;
}
.link-lead:hover { color: var(--primary); }
.link-lead .arrow { color: var(--gold); transition: transform .18s; }
.link-lead:hover .arrow { transform: translateX(5px); }
@media (prefers-reduced-motion: reduce) { .link-lead:hover .arrow { transform: none; } }

/* An eyebrow doubles as a back-link on detail pages. */
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--primary); }


/* Facilitators are people, not metadata — same weight and colour the club
   cards give speakers, so names read consistently across the site. */
.facilitators { margin-top: var(--s-5); }
.facilitators-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .64rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--s-2);
}
.facilitators-names {
  display: block;
  font-size: 1rem; font-weight: 600; letter-spacing: -.008em;
  line-height: 1.45; color: var(--primary);
  text-wrap: pretty;
}

/* Slightly larger meta rail for detail-page headers. */
.meta-lg { font-size: .78rem; }

.pager {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  justify-content: space-between;
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid var(--border-0);
}

.btn-block { width: 100%; justify-content: center; }

.note { font-size: .9rem; color: var(--text-2); max-width: var(--measure); }

/* The RSVP ask under an event writeup: bold primary-blue type so it reads as
   a call to action, not the last paragraph of the description. */
.rsvp-note {
  font-size: .95rem; line-height: 1.55; font-weight: 600;
  color: var(--primary);
  max-width: var(--measure);
  margin-top: var(--s-5);
}
.rsvp-note a { font-weight: 700; text-decoration-color: currentColor; }

/* Small caps eyebrow above section headings. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 12px;
}

.lede {
  font-size: clamp(1.06rem, 1rem + .3vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-1);
  max-width: var(--measure);
}

.muted { color: var(--text-2); }


/* ================================================================
   LAYOUT
   ================================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--rail);
}
.prose-container { max-width: calc(var(--measure) + var(--rail) * 2); }

.section { padding-block: var(--section-y); }
.section-sunken { background: var(--bg-1); border-block: 1px solid var(--border-0); }

/* Two sections on the SAME background would otherwise stack a full pad twice.
   Collapse there — but never across a tint change, where the boundary needs
   air on both sides to read as a band rather than a seam. */
.section + .section { padding-top: 0; }
.section + .section-sunken,
.section-sunken + .section { padding-top: var(--section-y); }

/* The first section after a title block. Its own pad plus the head's bottom pad
   is one gap, not two — so this one is deliberately short. Must come after the
   rules above: same specificity, so source order decides. */
.hero + .section,
.page-head + .section { padding-top: var(--s-6); }

.hero + .section-sunken,
.page-head + .section-sunken { padding-top: var(--section-y); }

.section-head { margin-bottom: var(--s-6); }
.section-head h2 { margin-bottom: var(--s-2); }
.section-head .lede { margin-top: var(--s-4); }
.section-head .note { font-size: .9rem; color: var(--text-2); margin-top: var(--s-2); max-width: var(--measure); }

.stack    { display: flex; flex-direction: column; gap: var(--s-4); }
.hairline { border: 0; border-top: 1px solid var(--border-0); margin-block: var(--s-7); }

/* ── Spacing utilities — the only sanctioned way to add space in a
      template. If you reach for an inline margin, add a class here instead. */
.measure  { max-width: var(--measure); }
.subhead  { margin-bottom: var(--s-3); }
.actions  { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }

/* Stacked content blocks inside a page body (pre-work, objectives, files…). */
.block + .block { margin-top: var(--s-7); }

/* On narrow screens the section pad bottoms out at 56px, so a 48px block gap
   would read as almost the same break. Tighten the inner gap to keep the
   hierarchy legible. */
@media (max-width: 620px) {
  .block + .block { margin-top: var(--s-6); }
  .pager { margin-top: var(--s-6); }

  /* A wrapped meta rail strands its separator at the end of a line. Below this
     width the parts always wrap, so stack them and drop the separators —
     same treatment the event cards get at every width. */
  .page-head .meta { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
  .page-head .meta .sep { display: none; }
}
.block > h2 { margin-bottom: var(--s-4); }
/* The session goal is the framing statement for the page — a touch larger than
   body copy, but not the page-head lede it used to be. */
.session-goal { font-size: 1.06rem; line-height: 1.6; color: var(--text-1); max-width: var(--measure); }
/* A note explains the heading it follows, so it sits closer than a list would. */
.block > h2:has(+ .note) { margin-bottom: var(--s-2); }


/* ================================================================
   HEADER / NAV
   ================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  /* No backdrop-filter and no translucency here on purpose: blurring or even
     alpha-blending the content moving under a sticky header costs work on
     every scroll frame, and it made Chrome scrolling visibly choppy (Safari
     has a fast native blur path, so it hid the cost). Fully opaque lets the
     compositor treat the header as simple occlusion. */
  background: var(--bg-0);
  border-bottom: 1px solid var(--border-0);
}
.site-header .container {
  display: flex; align-items: center; gap: var(--s-5);
  min-height: 66px;
}

.brand { display: flex; align-items: baseline; gap: var(--s-3); text-decoration: none; margin-right: auto; }
.brand-mark {
  font-family: var(--font-mono);
  font-size: 1.05rem; font-weight: 700; letter-spacing: .22em;
  color: var(--primary);
}
.brand-sub {
  font-size: .78rem; color: var(--text-2);
  letter-spacing: .01em;
  border-left: 1px solid var(--border-1);
  padding-left: 10px;
}

.nav { display: flex; align-items: center; gap: var(--s-1); }
.nav a {
  font-size: .875rem; font-weight: 520;
  color: var(--text-1); text-decoration: none;
  padding: var(--s-2) var(--s-3); border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 640; }
.nav a[aria-current="page"]::after {
  content: ''; display: block; height: 2px; border-radius: 2px;
  background: var(--gold); margin-top: 5px;
}

.theme-toggle {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--border-1); border-radius: var(--radius);
  background: var(--bg-0); color: var(--text-1);
  cursor: pointer; transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--border-2); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun  { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle { display: none; }

@media (max-width: 780px) {
  .brand-sub { display: none; }
  .nav-toggle {
    display: grid; place-items: center;
    width: 34px; height: 34px; flex: none;
    border: 1px solid var(--border-1); border-radius: var(--radius);
    background: var(--bg-0); color: var(--text-1); cursor: pointer;
  }
  .nav-toggle svg { width: 17px; height: 17px; }
  .nav {
    position: absolute; inset: 66px 0 auto; z-index: 49;
    flex-direction: column; align-items: stretch; gap: var(--s-1);
    background: var(--bg-0);
    border-bottom: 1px solid var(--border-0);
    box-shadow: var(--shadow-2);
    padding: var(--s-2) var(--rail) var(--s-5);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: var(--s-3); font-size: .95rem; }
  .nav a[aria-current="page"]::after { width: 26px; }
}


/* ================================================================
   HERO
   ================================================================ */
.hero {
  background: var(--hero-wash);
  border-bottom: 1px solid var(--border-0);
  padding-block: var(--hero-y) calc(var(--hero-y) * .55);
}
.hero-inner { max-width: 780px; }
.hero h1 { margin-top: var(--s-3); }
.hero .lede { margin-top: var(--s-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.page-head {
  border-bottom: 1px solid var(--border-0);
  padding-block: var(--head-y) calc(var(--head-y) * .6);
}
.page-head h1 { margin-top: var(--s-3); }
.page-head .lede { margin-top: var(--s-5); }
.page-head .meta { margin-top: var(--s-5); }
.facilitators + .meta { margin-top: var(--s-5); }
.page-head .hero-actions { margin-top: var(--s-6); }
.page-head .event-chips { margin-top: var(--s-4); }

/* The gold rule needs equal air above and below, or the lede crowds it. */
.rule-gold + .lede,
.rule-gold + .meta { margin-top: var(--s-5); }


/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font: 600 .875rem/1 var(--font-body);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  /* A label that wraps splits into evenly-filled lines instead of a long
     first line with an orphan under it. No effect on single-line buttons.
     btn-wrap.js refines this further (top line kept at least as wide as the
     bottom); this is the no-JS fallback. */
  text-wrap: balance;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 86%, #000); }
:root[data-theme="dark"] .btn-primary:hover { background: color-mix(in srgb, var(--primary) 86%, #fff); }
.btn-ghost { background: var(--bg-0); border-color: var(--border-1); color: var(--text-0); }
.btn-ghost:hover { border-color: var(--border-2); background: var(--bg-1); }
/* Gold stays gold in both themes, so the dark text needs no theme override. */
.btn-gold { background: var(--gold); color: #1c1400; }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 88%, #000); }
/* Same reasoning as gold: the accent fill reads the same in both themes, so
   the navy text is fixed rather than a theme variable. */
.btn-accent { background: var(--accent); color: #001254; }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-sm { padding: var(--s-2) var(--s-4); font-size: .8rem; }


/* ================================================================
   CHIPS / BADGES
   ================================================================ */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font: 700 .66rem/1 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  padding: 5px var(--s-2); border-radius: 4px;
  border: 1px solid var(--border-1);
  color: var(--text-2); background: var(--bg-1);
  white-space: nowrap;
}
.chip-next   { color: #6b4a00; background: var(--gold-2); border-color: var(--gold); }
:root[data-theme="dark"] .chip-next { color: #1c1400; background: var(--gold); border-color: var(--gold); }
.chip-open   { color: var(--ok);    background: var(--ok-bg);    border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.chip-locked { color: var(--warn);  background: var(--warn-bg);  border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
/* A chip inside a heading (the Materials passcode tag) baseline-aligns by
   default, so it sags below the large glyphs — pull it to the optical middle. */
h1 .chip, h2 .chip, h3 .chip { vertical-align: middle; position: relative; top: -2px; }
.chip-past   { color: var(--text-3); background: transparent; }
.chip-tbd    { color: var(--text-3); background: transparent; border-style: dashed; }


/* ================================================================
   EVENT CARDS  — Zucker Modern: gold left rule + date stamp
   ================================================================ */
.card-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Preview grid (home page) — auto-fit so two cards split the row evenly rather
   than sitting in the first two of three tracks with a hole beside them. */
.card-grid-preview { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }


.event-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  background: var(--bg-0);
  border: 1px solid var(--border-0);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.event-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--border-1); border-left-color: var(--gold); }
.event-card.is-past { border-left-color: var(--border-2); opacity: .92; }

.event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 1px; padding: var(--s-5) var(--s-2);
  background: var(--bg-1);
  border-right: 1px solid var(--border-0);
  font-family: var(--font-mono);
}
.event-date .mon { font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); }
.event-date .day { font-size: 1.75rem; font-weight: 600; line-height: 1.05; color: var(--ink); letter-spacing: -.02em; }
.event-date .yr  { font-size: .6rem; font-weight: 500; letter-spacing: .12em; color: var(--text-3); }
.event-date.is-tbd .day { font-size: 1rem; letter-spacing: .06em; color: var(--text-3); }

.event-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }

/* ── Speaker block — sits under the title/time, never mistaken for either ──
   Title  : ink, 700, tight tracking, 1.12rem
   Speaker: brand blue, 600, 0.95rem, gold tick
   Role   : muted, 0.8rem
   Three distinct weights and colours, so the eye separates them instantly. */
.speaker-block {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding-left: var(--s-3);
  border-left: 2px solid var(--gold);
  margin-top: var(--s-1);
}
.speaker { display: block; }
.speaker-name {
  display: block;
  font-size: .95rem; font-weight: 600; letter-spacing: -.008em;
  line-height: 1.3; color: var(--primary);
  text-wrap: pretty;
}
.speaker-role {
  display: block; margin-top: 1px;
  font-size: .8rem; line-height: 1.4; color: var(--text-2);
  text-wrap: pretty;
}
.event-card.is-past .speaker-block { border-left-color: var(--border-2); }
.event-card.is-past .speaker-name { color: var(--text-1); }

/* Detail-page speaker cards — same content, given room to breathe. */
.speaker-cards { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.speaker-card {
  padding: var(--s-4) var(--s-5);
  background: var(--bg-1);
  border: 1px solid var(--border-0);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}
.speaker-card .speaker-name { font-size: 1.08rem; font-weight: 680; color: var(--ink); letter-spacing: -.018em; }
.speaker-card .speaker-role { font-size: .875rem; }
.speaker-card .speaker-org {
  display: block; margin-top: var(--s-1);
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-3);
}
.event-body h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.024em; text-wrap: pretty; margin-top: var(--s-1); }
.event-card:hover .event-body h3 { color: var(--primary); }
.event-summary { font-size: .9rem; color: var(--text-1); line-height: 1.55; }
.event-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }

/* Cards are narrow enough that the time/room meta always wrapped, stranding a
   separator at the end of a line. Stack it instead and drop the separators. */
.event-body .meta { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
.event-body .meta + .speaker-block { margin-top: var(--s-2); }
.event-body .meta .sep { display: none; }
.meta-part { white-space: nowrap; }
.event-body .meta-part { white-space: normal; }


/* ================================================================
   CLUB-FAIR LANDING (/fair)
   Mobile-first: nearly every visitor arrives by phone camera. One column,
   one accent, two tap targets. Nothing that isn't load-bearing.
   ================================================================ */
.fair {
  min-height: 100svh;               /* svh, so iOS toolbars don't clip it */
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-7) var(--rail);
  background: var(--bg-0);
}
.fair-inner { width: 100%; max-width: 430px; text-align: center; }

/* With the name and school removed, the wordmark carries the page. */
.fair-mark {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(3.2rem, 2.2rem + 5vw, 4.2rem);
  font-weight: 700; letter-spacing: .26em;
  text-indent: .2em;                /* optical centring: cancels the trailing
                                       letter-space plus the A/M side-bearing
                                       difference. Measured, not guessed. */
  color: var(--primary);
  line-height: 1;
}
.fair .rule-gold {
  display: block;
  margin: var(--s-6) auto 0;
  width: 56px; height: 3px;
}

.fair .lede {
  margin-top: var(--s-7);
  font-size: clamp(1.15rem, 1.02rem + .6vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-1);
  text-wrap: pretty;
}

.fair-actions {
  display: flex; flex-direction: column; gap: var(--s-3);
  margin-top: var(--s-7);
}
/* Comfortably above the 44px minimum tap target. */
.btn-lg {
  padding: var(--s-4) var(--s-5);
  font-size: 1.05rem;
  min-height: 58px;
  justify-content: center;
  text-wrap: balance;
}

.fair-prose { margin-top: var(--s-6); text-align: left; }

/* ── Join strip — an eyebrow and the button, nothing else ──────── */
.join-strip .container { display: flex; flex-direction: column; align-items: flex-start; }
.join-strip .eyebrow { margin-bottom: var(--s-4); }
/* Both buttons take the FIRST button's natural width, on every screen size:
   the wrapper shrink-wraps to the GroupMe button, and any button after it is
   kept from widening the wrapper (width: 0) then stretched back to match
   (min-width: 100%). A longer label wraps to two centered rows instead. */
.join-actions { display: inline-flex; flex-direction: column; gap: var(--s-3); max-width: 100%; }
.join-actions .btn + .btn { width: 0; min-width: 100%; justify-content: center; text-align: center; }

/* ── Past events: same card, laid out horizontally ─────────────── */
.card-list { display: flex; flex-direction: column; gap: var(--s-3); }

.event-card.is-compact .event-body {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-4) var(--s-5);
}
.compact-main { min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.compact-side { display: flex; flex-wrap: wrap; gap: var(--s-2); flex: none; }

.event-card.is-compact h3 { font-size: 1.02rem; margin-top: 0; }
/* Horizontal band: the meta reads better inline than stacked. */
.event-card.is-compact .event-body .meta { flex-direction: row; align-items: baseline; gap: .55em; }
.event-card.is-compact .event-body .meta .sep { display: inline; }
.event-card.is-compact .event-date { padding-block: var(--s-4); }
.event-card.is-compact .event-date .day { font-size: 1.4rem; }

/* Speaker on one line, behind the same gold tick, at metadata scale. */
.speaker-inline {
  flex-direction: row; align-items: baseline; flex-wrap: wrap;
  gap: .5em; margin-top: var(--s-1);
  padding-left: var(--s-2); border-left-width: 2px;
}
.speaker-inline .speaker-name { display: inline; font-size: .85rem; }
.speaker-inline .speaker-role { display: inline; margin-top: 0; font-size: .8rem; }
.speaker-inline .speaker-role::before { content: '· '; color: var(--border-2); }

@media (max-width: 680px) {
  .event-card.is-compact .event-body { flex-direction: column; align-items: stretch; gap: var(--s-3); }
  .event-card.is-compact .event-body .meta { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
  .event-card.is-compact .event-body .meta .sep { display: none; }
}


/* ================================================================
   COURSE SPINE  — Blueprint: numbered 01…05 rail
   ================================================================ */
.spine { position: relative; }
.spine::before {
  content: ''; position: absolute; left: 27px; top: 14px; bottom: 14px;
  width: 1px; background: var(--border-1);
}

.spine-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--s-5);
  align-items: start;
  padding: var(--s-5) var(--s-5) var(--s-5) 0;
  border-bottom: 1px solid var(--border-0);
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.spine-row:first-child { border-top: 1px solid var(--border-0); }
.spine-row:hover { background: var(--bg-1); }
.spine-row:hover .spine-title { color: var(--primary); }

.spine-num {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 1px solid var(--border-1);
  font-family: var(--font-mono);
  font-size: 1rem; font-weight: 700; letter-spacing: .02em;
  color: var(--primary);
}
.spine-row.is-next .spine-num {
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 26%, transparent);
}
.spine-row.is-done .spine-num { color: var(--text-3); }

.spine-main { min-width: 0; }
.spine-title { display: block; font-size: 1.14rem; font-weight: 680; letter-spacing: -.024em; color: var(--ink); margin-bottom: var(--s-2); text-wrap: pretty; }
.spine-goal  { font-size: .9rem; color: var(--text-1); line-height: 1.55; max-width: 60ch; margin-top: var(--s-2); }
.spine-side  { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); padding-top: var(--s-1); }

@media (max-width: 720px) {
  .spine::before { display: none; }
  .spine-row { grid-template-columns: 44px 1fr; gap: var(--s-4); padding-right: 0; }
  .spine-num { width: 44px; height: 44px; font-size: .85rem; }
  .spine-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
}


/* ================================================================
   PRE-WORK LIST
   ================================================================ */
.prework { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.prework li {
  display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3);
  padding: var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--border-0);
  border-radius: var(--radius);
}
.prework .box {
  width: 16px; height: 16px; margin-top: 4px;
  border: 1.5px solid var(--border-2);
  border-radius: 3px;
}
.prework .label { display: block; font-weight: 580; color: var(--text-0); line-height: 1.45; }
.prework .detail { display: block; font-size: .875rem; color: var(--text-2); margin-top: var(--s-1); }
.prework a { color: var(--primary); font-weight: 580; text-decoration: underline; text-decoration-thickness: 1px; }
.prework a:hover { color: var(--accent); }

/* Learning objectives — numbered, tight */
.objectives { list-style: none; counter-reset: lo; display: flex; flex-direction: column; gap: var(--s-3); }
.objectives li {
  counter-increment: lo;
  position: relative;
  padding-left: 44px;
  line-height: 1.55;
}
.objectives li::before {
  content: 'LO' counter(lo);
  position: absolute; left: 0; top: .28em;
  font: 700 .64rem/1 var(--font-mono);
  letter-spacing: .06em; color: var(--primary-2);
}

/* Plain description list — a term and its explanation, no counter. */
.deflist { list-style: none; display: flex; flex-direction: column; gap: var(--s-4); }
.deflist li { line-height: 1.55; }
.deflist .term { display: block; font-weight: 640; color: var(--ink); }


/* ================================================================
   DOWNLOAD ROWS
   ================================================================ */
.downloads { border: 1px solid var(--border-0); border-radius: var(--radius-lg); overflow: hidden; }
.dl-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--s-4); align-items: center;
  padding: var(--s-4);
  background: var(--bg-0);
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.dl-row + .dl-row { border-top: 1px solid var(--border-0); }
.dl-row:hover { background: var(--bg-1); }
.dl-row:hover .dl-name { color: var(--primary); }

.dl-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--bg-2); color: var(--primary);
  font: 700 .58rem/1 var(--font-mono); letter-spacing: .06em;
}
.dl-name { display: block; font-weight: 570; font-size: .94rem; }
.dl-meta { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin-top: var(--s-1); }
.dl-action { font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.dl-row:hover .dl-action { color: var(--primary); }


/* ================================================================
   CALLOUT / LOCK PANEL
   ================================================================ */
.callout {
  display: grid; gap: var(--s-2);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border-1);
  border-left: 3px solid var(--primary-2);
  border-radius: var(--radius);
  background: var(--bg-1);
}
.callout-gold { border-left-color: var(--gold); }

.callout p  { font-size: .92rem; color: var(--text-1); }


/* ================================================================
   FORMS
   ================================================================ */
.form-card {
  max-width: 420px;
  padding: var(--s-6);
  background: var(--bg-0);
  border: 1px solid var(--border-0);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.field label {
  font: 700 .68rem/1 var(--font-mono);
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-2);
}
.field input {
  font: 400 .95rem/1 var(--font-body);
  padding: var(--s-3) var(--s-4);
  color: var(--text-0);
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.form-error {
  font-size: .85rem; color: var(--alert);
  background: var(--alert-bg);
  border: 1px solid color-mix(in srgb, var(--alert) 30%, transparent);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4); margin-bottom: var(--s-5);
}


/* ================================================================
   PROSE (rendered markdown)
   ================================================================ */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
/* A body that opens with a heading was inheriting the heading's top margin,
   adding ~57px on top of the section pad. Spacing above the first element is
   the section's job, never the content's. */
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 1.9em; padding-bottom: .35em; border-bottom: 1px solid var(--border-0); }
.prose h3 { margin-top: 1.7em; }
.prose :is(h2, h3, h4) + * { margin-top: .65em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  border-left: 3px solid var(--gold);
  padding: var(--s-1) 0 var(--s-1) var(--s-5);
  color: var(--text-1);
  font-size: 1.02rem;
  font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--bg-2); border: 1px solid var(--border-0);
  padding: .12em .35em; border-radius: 4px;
}
.prose pre {
  background: var(--bg-sunken); border: 1px solid var(--border-0);
  border-radius: var(--radius); padding: var(--s-4); overflow-x: auto;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: .84rem; }
.prose img { border-radius: var(--radius); border: 1px solid var(--border-0); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--border-0); }
.prose th { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.table-wrap { overflow-x: auto; }


/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  margin-top: auto;
  background: var(--bg-1);
  border-top: 1px solid var(--border-0);
  padding-block: var(--s-7);
}
.footer-grid { display: flex; flex-wrap: wrap; gap: var(--s-6); justify-content: space-between; align-items: flex-start; }
.footer-brand .brand-mark { font-size: .95rem; }
/* Full container width so the whole sentence fits on one line; it only wraps
   once the viewport genuinely can't hold it. */
.footer-tag { font-size: .8rem; color: var(--text-2); margin-top: var(--s-4); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer-links a { font-size: .85rem; color: var(--text-1); text-decoration: none; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }
.footer-fine {
  margin-top: var(--s-6); padding-top: var(--s-4);
  border-top: 1px solid var(--border-0);
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-3);
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4);
}


/* ================================================================
   STYLEGUIDE-ONLY
   ================================================================ */
.sg-swatches { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sg-swatch { border: 1px solid var(--border-0); border-radius: var(--radius); overflow: hidden; }
.sg-chip-lg { height: 62px; }
.sg-swatch .sg-label { padding: var(--s-2) var(--s-3); font-family: var(--font-mono); font-size: .64rem; letter-spacing: .06em; background: var(--bg-0); }
.sg-swatch .sg-label b { display: block; text-transform: uppercase; color: var(--text-1); margin-bottom: 2px; }
.sg-swatch .sg-label span { color: var(--text-3); }
.sg-demo { border: 1px dashed var(--border-1); border-radius: var(--radius-lg); padding: var(--s-5); background: var(--bg-0); }
.sg-scale { display: flex; flex-direction: column; gap: var(--s-2); }
.sg-scale-row { display: grid; grid-template-columns: 52px 68px 48px 1fr; gap: var(--s-4); align-items: center; }
.sg-scale-name, .sg-scale-px { font-family: var(--font-mono); font-size: .7rem; color: var(--text-2); }
.sg-scale-px { text-align: right; }
.sg-scale-bar { height: 12px; border-radius: 2px; background: var(--gold); }
.sg-scale-use { font-size: .84rem; color: var(--text-2); }
@media (max-width: 560px) {
  .sg-scale-row { grid-template-columns: 46px 1fr 44px; }
  .sg-scale-use { display: none; }
}
