/* =====================================================================
   PUPMC — MAIN STYLESHEET
   Colors live in :root. Change them once and the whole site updates.
   Design rules for this file are in CLAUDE.md at the project root.
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Club palette: green is the brand colour, used for headings, links,
     buttons, the home hero and the footer. Everything else is paper and ink. */
  --primary: #004703;        /* deep green: headings, buttons, hero, footer */
  --primary-mid: #006C28;    /* links, hover states, roles */
  --primary-light: #00A13B;  /* thin accent lines only, never fills or text */
  --paper: #FBFAF7;          /* page background (warm white) */
  --paper-2: #F3F2ED;        /* quiet sections */
  --tint: #EFF5EF;           /* pale green wash, used sparingly */
  --white: #FFFFFF;
  --ink: #161616;            /* body text */
  --muted: #5F605B;          /* secondary text */
  --rule: #DDDCD6;           /* hairlines */
  --rule-strong: #8B8B86;    /* input borders, chips */
  --rule-green: #CFDDD0;     /* hairlines on the green tint */
  /* Graph paper for the home hero only: minor squares + a heavier line every 5th. */
  --grid-minor: 24px;
  --grid-major: 120px;

  /* Role names (kept so every page and the admin panel share them) */
  --primary-dark: var(--primary);
  --primary-soft: var(--paper-2);
  --accent: var(--primary-light);
  --accent-dark: var(--primary-mid);
  --accent-soft: var(--paper-2);
  --gray: var(--paper-2);
  --black: var(--ink);
  --bg: var(--paper);
  --surface: var(--white);
  --surface-alt: var(--paper-2);
  --text: var(--ink);
  --border: var(--rule);
  --input-border: var(--rule-strong);

  --ok-bg: var(--white);   --ok-text: var(--primary);
  --err-bg: #FBEEEC;       --err-text: #8C1D1D;
  --info-bg: var(--white); --info-text: var(--ink);

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Spacing scale: 4 8 12 16 24 32 48 64 96 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px;
  --section-y: var(--s-16);

  --r-sm: 4px; --r-md: 4px; --r-lg: 6px;
  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgba(22, 22, 22, .10);
  --container: 1120px;
  --header-h: 64px;
  --measure: 62ch;
}
@media (max-width: 719px) { :root { --section-y: 40px; --header-h: 60px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--font-body);
  display: flex; flex-direction: column; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; color: var(--primary); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.015em; line-height: 1.2; }
h3 { font-size: 1.2rem; letter-spacing: -.005em; }
h4 { font-family: var(--font-body); font-size: 1rem; color: var(--ink); }
p { margin: 0 0 1em; }
a { color: var(--primary-mid); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hero :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--white); color: var(--ink); padding: .6rem 1rem; border: 2px solid var(--ink); font-weight: 600; }
.skip-link:focus { top: 1rem; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

/* Small section label (sentence case, never all caps). */
.label { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.prose { max-width: var(--measure); }
.prose p, .prose li { max-width: var(--measure); }

/* ---------- 3. Header & navigation ---------- */
#site-header { min-height: var(--header-h); background: var(--paper); border-bottom: 1px solid var(--rule); } /* reserves space until JS renders the nav */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--rule); }
.site-header.scrolled { box-shadow: 0 6px 16px rgba(22, 22, 22, .06); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--primary); text-decoration: none; font-weight: 700; }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: var(--white); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -.01em; }
.brand-text small { font-family: var(--font-body); font-weight: 400; font-size: .76rem; color: var(--muted); letter-spacing: 0; }
.brand:hover { color: var(--primary); }

.nav-toggle { display: inline-flex; align-items: center; gap: .45rem; background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: .5rem .8rem; min-height: 44px; font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { 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); }

.nav-menu { list-style: none; margin: 0; padding: 0; }
.nav-menu a, .nav-menu .submenu-btn { color: var(--ink); text-decoration: none; font: inherit; font-weight: 500; font-size: 1rem; background: none; border: 0; cursor: pointer; display: block; width: 100%; text-align: left; padding: .75rem .9rem; min-height: 44px; }
.nav-menu a:hover, .nav-menu .submenu-btn:hover { color: var(--primary); }
.nav-menu a[aria-current="page"], .nav-menu .submenu-btn.is-current { color: var(--primary); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.submenu-btn::after { content: "\25BE"; margin-left: .35em; font-size: .8em; opacity: .7; }
.submenu { list-style: none; margin: 0; padding: 0 0 0 .9rem; display: none; }
.has-submenu.open > .submenu { display: block; }

/* Mobile: collapsible panel */
@media (max-width: 979px) {
  .nav { flex-wrap: wrap; }
  .nav-menu { display: none; width: 100%; padding: .25rem 0 1rem; border-top: 1px solid var(--rule); }
  .nav-menu.open { display: block; }
  .submenu a { color: var(--muted); font-weight: 400; }
}
/* Desktop: horizontal bar with drop-downs */
@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .nav-menu { display: flex; align-items: center; gap: .25rem; }
  .nav-menu > li > a, .nav-menu .submenu-btn { padding: 0 .85rem; width: auto; min-height: var(--header-h); display: flex; align-items: center; }
  .nav-menu > li > a[aria-current="page"], .nav-menu .submenu-btn.is-current { box-shadow: inset 0 -2px 0 var(--primary); }
  .has-submenu { position: relative; }
  .submenu { position: absolute; top: calc(100% - 1px); left: 0; min-width: 240px; background: var(--white); border: 1px solid var(--rule); border-top: 2px solid var(--primary); box-shadow: var(--shadow-md); padding: .35rem 0; }
  .submenu a { color: var(--ink); font-weight: 400; padding: .6rem 1rem; }
  .submenu a:hover { background: var(--paper-2); color: var(--primary); }
  .submenu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--primary); font-weight: 600; }
}

/* ---------- 4. Hero & page headers ---------- */
/* The home hero is the one place the graph paper is visible. */
.hero {
  color: var(--white); background-color: var(--primary);
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: var(--grid-major) var(--grid-major), var(--grid-major) var(--grid-major), var(--grid-minor) var(--grid-minor), var(--grid-minor) var(--grid-minor);
  background-position: center top;
}
.hero-inner { padding-block: 3.5rem 4rem; text-align: center; }
.hero-inner > div { margin-inline: auto; }
@media (min-width: 880px) { .hero-inner { padding-block: 5.5rem 6rem; } .hero-inner > div { max-width: 44rem; } }
.hero h1 { color: var(--white); font-size: clamp(2.5rem, 6.5vw, 4.25rem); letter-spacing: -.025em; line-height: 1.05; margin-bottom: .45em; }
.eyebrow { font-size: .95rem; font-weight: 500; margin: 0 0 1rem; }
.hero .eyebrow { opacity: .85; }
.hero .lede { font-size: 1.15rem; max-width: 46ch; margin-inline: auto; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; margin-top: 2rem; }
.hero .hero-actions { justify-content: center; }
.hero-actions a:not(.btn) { color: var(--white); font-weight: 600; }

/* Inner pages: a plain title block on paper. */
.page-header { padding: 2.25rem 0 1.25rem; border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) { .page-header { padding: 3.25rem 0 1.75rem; } }
.page-header h1 { margin: 0; }
.page-header p { margin: .6rem 0 0; max-width: var(--measure); color: var(--muted); font-size: 1.05rem; }

/* ---------- 5. Sections & layouts ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { border-top: 1px solid var(--rule); }
.section-tint { background: var(--paper-2); border-block: 1px solid var(--rule); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .4rem 0 0; color: var(--muted); max-width: var(--measure); }
.section-head > a:not(.btn) { font-weight: 600; }
/* Title column on the left (sticky on desktop), content on the right. */
.split { display: grid; gap: 1.5rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 4rem; align-items: start; }
  .split-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.split-aside h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .5rem; }
.split-aside p { color: var(--muted); max-width: 32ch; }
.split-aside .btn { margin-top: .5rem; }

.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.grid > .empty { grid-column: 1 / -1; }
@media (min-width: 800px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-2 { display: grid; gap: 2rem; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 3rem; } }

/* Ruled list of editorial rows (announcements, programs, documents, contacts). */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rows > * { border-bottom: 1px solid var(--rule); }
.row { display: grid; gap: .35rem 2rem; padding: 1.25rem 0; }
@media (min-width: 720px) { .row { grid-template-columns: 9.5rem minmax(0, 1fr); } .row.has-side { grid-template-columns: 9.5rem minmax(0, 1fr) auto; } }
.row-when { color: var(--muted); font-size: .92rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.row-when .badge { margin-top: .4rem; }
.row h2, .row h3 { font-size: 1.2rem; margin: 0 0 .2rem; color: var(--ink); }
.row h2 a, .row h3 a { color: inherit; text-decoration: none; }
.row h2 a:hover, .row h3 a:hover { color: var(--primary); text-decoration: underline; }
.row .meta { font-size: .92rem; color: var(--muted); margin: 0 0 .4rem; }
.row .body { max-width: var(--measure); font-size: 1rem; }
.row .body p:last-child { margin-bottom: 0; }
.row .body ul, .row .body ol { padding-left: 1.25rem; }
.row-side { align-self: start; }
.row-side img { width: 128px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--paper-2); }
.row .btn { margin-top: .75rem; }
.rows-compact .row { padding: .85rem 0; }
.rows-compact .row h3 { font-size: 1.05rem; }

/* Cards are reserved for things that are objects: merch, partner logos. */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 1.25rem; }
.card h3 { margin-bottom: .35rem; }
.card-media { margin: -1.25rem -1.25rem 1rem; border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card .meta { font-size: .88rem; color: var(--muted); }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--primary-mid); }

/* ---------- 6. Home ---------- */
/* Latest announcements beside upcoming programs. */
.home-updates { gap: 2.5rem; }
@media (min-width: 800px) { .home-updates { gap: 4rem; } }
.home-updates .section-head { margin-bottom: 0; padding-bottom: .5rem; border-bottom: 2px solid var(--primary); }
.home-updates .section-head h2 { font-size: 1.3rem; }
.home-updates .rows { border-top: 0; }

/* Committees: ruled list, not cards. */
.committee-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 700px) { .committee-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .committee-list { grid-template-columns: repeat(3, 1fr); } }
.committee-list li { border-top: 2px solid var(--primary); padding: .9rem 0 1.75rem; }
.committee-list h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.committee-list h3 a { color: var(--primary); text-decoration: none; }
.committee-list h3 a:hover { text-decoration: underline; }
.committee-list p { margin: 0 0 .35rem; }
.committee-list .committee-head { font-size: .9rem; color: var(--muted); }

/* This year's board: names in two ruled columns. */
.board-list { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 2.5rem; }
@media (min-width: 600px) { .board-list { grid-template-columns: 1fr 1fr; } }
.board-list li { display: flex; flex-direction: column; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.board-list li:first-child { grid-column: 1 / -1; border-bottom: 2px solid var(--primary); padding-bottom: .9rem; }
.board-list li:first-child .board-name { font-size: 1.35rem; }
.board-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.board-role { font-size: .92rem; color: var(--primary-mid); }

/* ---------- 7. About ---------- */
/* Preamble / Mission / Vision as ruled rows (label left, text right). */
.statements { margin: 0; display: grid; }
.statements > div { display: grid; gap: .25rem 2rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.statements > div:first-child { border-top: 2px solid var(--primary); }
.statements > div:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .statements > div { grid-template-columns: 9rem 1fr; } }
.statements dt { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--primary); }
.statements dd { margin: 0; font-size: 1.1rem; max-width: var(--measure); }

.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: grid; gap: .15rem 2rem; padding: .85rem 0; border-top: 1px solid var(--rule); }
.facts > div:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .facts > div { grid-template-columns: 9rem 1fr; } }
.facts dt { font-weight: 600; color: var(--ink); font-size: .95rem; }
.facts dd { margin: 0; max-width: var(--measure); }
.emblem { margin: 0; display: grid; place-items: center; }
.emblem img { width: min(100%, 260px); border-radius: 50%; }
.split-aside .emblem { place-items: start; margin-top: 1.25rem; }
.split-aside .emblem img { width: 160px; }
.split-aside .hint { max-width: 32ch; }

/* Degree programs on Academics: two ruled columns, not cards. */
.defs { display: grid; gap: 2rem; }
@media (min-width: 800px) { .defs { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.defs > * { border-top: 2px solid var(--primary); padding-top: .9rem; }
.defs h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.defs h4 { margin: 1.1rem 0 .35rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.defs ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.defs li { padding: .1rem 0; }

/* ---------- 8. People (officers, faculty) ---------- */
.term { color: var(--muted); font-weight: 500; margin: 0 0 .25rem; }
.people-top { display: grid; gap: 2rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .people-top { grid-template-columns: repeat(2, minmax(0, 300px)); gap: 3rem; } }
.people-group { border-top: 2px solid var(--primary); padding-top: 1rem; margin-top: 2.5rem; }
.people-group h3 { font-size: 1.25rem; margin: 0 0 1.25rem; }
.portraits { display: grid; gap: 1.75rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.portrait { display: flex; flex-direction: column; min-width: 0; }
.portrait-body { min-width: 0; }
.portrait img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--paper-2); margin-bottom: .75rem; transition: box-shadow .15s; flex: none; }
/* Phones: one person per line, photo on the left. */
@media (max-width: 639px) {
  .portraits { grid-template-columns: 1fr; gap: 0; }
  .portrait { flex-direction: row; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--rule); }
  .portrait:last-child { border-bottom: 0; }
  .portrait img, .portrait.is-lead img { width: 64px; height: 64px; margin: 0; }
  .people-top { gap: 0; margin-bottom: 0; }
  .people-top .portrait:last-child { border-bottom: 0; }
}
.portrait:hover img { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--primary-light); }
.portrait h3, .portrait h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; color: var(--ink); margin: 0 0 .15rem; overflow-wrap: anywhere; text-wrap: pretty; }
.portrait .role { font-size: .88rem; color: var(--primary-mid); line-height: 1.35; margin: 0; }
.portrait .program, .portrait .spec { font-size: .85rem; color: var(--muted); margin: .25rem 0 0; }
.portrait .contact { font-size: .88rem; margin: .4rem 0 0; word-break: break-word; }
.portrait.is-lead img { width: 120px; height: 120px; }
.portrait.is-lead h3 { font-size: 1.3rem; }
.portrait.is-lead .role { font-size: .95rem; }
.portraits-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

/* ---------- 9. Buttons & badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1.15rem; border-radius: var(--r-sm); font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; min-height: 44px; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-mid); color: var(--white); }
.btn-light, .btn-accent { background: var(--white); color: var(--primary); }
.btn-light:hover, .btn-accent:hover { background: var(--paper-2); color: var(--primary); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-outline-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn-outline-light:hover { background: var(--white); color: var(--primary); }
.btn-sm { padding: .35rem .8rem; font-size: .9rem; min-height: 36px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; line-height: 1.4; padding: .1rem .5rem; border-radius: var(--r-sm); border: 1px solid var(--rule-strong); color: var(--muted); background: transparent; white-space: nowrap; }
.badge-event, .badge-academic, .badge-upcoming, .badge-available, .badge-preorder { border-color: var(--primary-mid); color: var(--primary-mid); }
.badge-ongoing, .badge-pinned, .badge-urgent { border-color: var(--primary); color: var(--white); background: var(--primary); }
.badge-soldout, .badge-past, .badge-general { border-color: var(--rule-strong); color: var(--muted); }

/* ---------- 10. Toolbars, filters, tabs, forms ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end; margin-bottom: 1.5rem; }
.field { display: block; font-size: .92rem; font-weight: 600; }
.field input, .field select, .field textarea { display: block; width: 100%; margin-top: .3rem; }
.field > .chips { margin-top: .35rem; }
.field input, .field select, .field textarea, .input { font: inherit; font-weight: 400; padding: .55rem .75rem; border: 1px solid var(--input-border); border-radius: var(--r-sm); background: var(--white); color: var(--text); min-height: 44px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: 2px solid var(--primary-light); outline-offset: 0; }
.toolbar .grow { flex: 1 1 220px; }
.hint { font-size: .86rem; color: var(--muted); font-weight: 400; }
.result-count { font-size: .92rem; color: var(--muted); margin: -.75rem 0 1rem; }
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.form .btn { justify-self: start; }
.form-note { font-size: .9rem; color: var(--muted); margin: 0; }

/* Member List: one tab per committee */
.member-heading { font-size: 1.3rem; display: flex; align-items: center; gap: .55rem; margin: 0 0 .8rem; }
.member-count { font-family: var(--font-body); font-size: .8rem; font-weight: 600; color: var(--primary); background: var(--paper-2); border-radius: 999px; padding: .1rem .6rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: inherit; font-size: .92rem; font-weight: 600; padding: .35rem .85rem; border-radius: var(--r-sm); border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); cursor: pointer; min-height: 40px; text-decoration: none; display: inline-flex; align-items: center; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--white); border-color: var(--primary); }

.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }
.tab { font: inherit; font-weight: 600; background: none; border: 0; padding: .7rem 1.1rem; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 44px; }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--primary); }

/* ---------- 11. Timeline (history) ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.75rem; position: relative; max-width: var(--measure); }
.timeline::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--rule); }
.timeline li { position: relative; padding-bottom: 2rem; }
.timeline li::before { content: ""; position: absolute; left: -1.75rem; top: .4rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--primary); }
.timeline li.empty::before { display: none; }
.timeline time { font-weight: 600; color: var(--primary-mid); font-size: .95rem; display: block; margin-bottom: .2rem; }
.timeline h3 { margin-bottom: .3rem; color: var(--ink); }
.timeline img { border-radius: var(--r-sm); margin-top: .75rem; max-height: 260px; object-fit: cover; }

/* ---------- 12. Tables (curriculum, members, committees) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; }
thead th { color: var(--ink); font-weight: 600; font-size: .85rem; border-bottom: 2px solid var(--primary); }
tbody th { font-weight: 600; }
caption { text-align: left; padding: 0 0 .6rem; font-weight: 600; color: var(--muted); font-size: .85rem; }

.sem-grid { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.sem-card h4 { color: var(--primary); font-family: var(--font-display); font-size: 1.05rem; margin-bottom: .5rem; border-top: 2px solid var(--primary); padding-top: .6rem; }
.sem-card ul { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.sem-card li { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--rule); }
.sem-card .code { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--primary-mid); }

/* ---------- 13. Documents list ---------- */
.doc-group { margin-bottom: 2.5rem; }
.doc-group h3 { margin-bottom: .5rem; }
.doc { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .9rem 0; }
.doc h4 { font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; margin: 0; color: var(--ink); }
.doc p { margin: .15rem 0 0; font-size: .92rem; color: var(--muted); max-width: var(--measure); }
.pdf-frame { width: 100%; height: min(80vh, 900px); border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--white); }

/* ---------- 14. Shop & partners ---------- */
.product .price { font-family: var(--font-display); font-size: 1.3rem; color: var(--primary); margin: .25rem 0; }
.product .sizes { display: flex; flex-wrap: wrap; gap: .3rem; margin: .5rem 0 1rem; list-style: none; padding: 0; }
.product .sizes li { font-size: .82rem; font-weight: 600; border: 1px solid var(--rule-strong); padding: .1rem .5rem; border-radius: var(--r-sm); }
.product { display: flex; flex-direction: column; }
.product .badge { align-self: flex-start; }
.product .btn { margin-top: auto; }
.partner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.partner .logo { width: 140px; height: 90px; object-fit: contain; margin-bottom: .75rem; }

/* ---------- 15. Alerts & states ---------- */
.alert { padding: .85rem 1.1rem; border-radius: var(--r-sm); margin: 0 0 1rem; font-size: .97rem; border: 1px solid var(--rule); border-left-width: 3px; background: var(--white); color: var(--ink); }
.alert-ok { border-left-color: var(--primary-light); }
.alert-info { border-left-color: var(--primary-mid); }
.alert-err { background: var(--err-bg); color: var(--err-text); border-color: #E7B9B9; border-left-color: var(--err-text); }
.empty { color: var(--muted); padding: 1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0; max-width: var(--measure); }
.empty-line { color: var(--muted); margin: 0; padding: .5rem 0; }
.loading { color: var(--muted); padding: 1.25rem 0; }
.loading::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -.15em; border: 2px solid var(--rule); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 16. Footer ---------- */
.site-footer { background: var(--primary); color: var(--white); margin-top: var(--section-y); font-size: .92rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--white); }
.footer-main { display: grid; gap: 1.75rem; padding-block: 2.25rem 1.75rem; }
@media (min-width: 800px) { .footer-main { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.site-footer h2 { color: var(--white); font-size: .8rem; font-family: var(--font-body); font-weight: 600; opacity: .8; margin-bottom: .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.footer-brand { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.footer-brand img { width: 44px; height: 44px; border-radius: 50%; background: var(--white); }
.footer-brand strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--white); letter-spacing: -.01em; }
.footer-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.social { display: flex; gap: .5rem; }
.social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); }
.social a:hover { background: var(--white); color: var(--primary); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footnote-links { border-top: 1px solid rgba(255,255,255,.2); padding-block: 1rem; font-size: .85rem; }
.footnote-links p { margin: 0 0 .4rem; opacity: .8; }
.footnote-links ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: 0; margin: 0; }
.copyright { border-top: 1px solid rgba(255,255,255,.2); padding-block: 1rem 1.5rem; font-size: .85rem; opacity: .85; }

/* ---------- 17. Misc ---------- */
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.list-check { padding-left: 1.2rem; margin: 0 0 1rem; display: grid; gap: .3rem; }
.list-check li::marker { color: var(--primary-mid); }
.hp-field { position: absolute; left: -9999px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .toolbar { display: none; }
}
[hidden] { display: none !important; }
