/* ==========================================================================
   EA Morris Fellowship — Portal styles
   Brand: deep teal, cream, serif headlines (IvyPresto → Fraunces),
   sans body (Muli → Mulish).
   ========================================================================== */

:root {
  --teal-950: #0A2126;
  --teal-900: #0E2A2F;
  --teal-800: #12343A; /* primary brand colour, sampled from the logo */
  --teal-700: #18444C;
  --teal-600: #235C66;
  --teal-500: #2F7480;
  --teal-300: #9CC2C6;
  --teal-100: #DCEAEB;

  --cream: #F7F5F0;
  --cream-dark: #EDE9E1;
  --paper: #FFFFFF;
  --ink: #16211F;
  --muted: #5E6E6C;
  --line: #E6E1D8;
  --line-soft: #F0ECE4;

  --gold: #C8A24A;

  --deep-teal: #0E414D;
  --olive-green: #6B804D;
  --pale-mint: #D0E3E1;
  --dark-teal: #12343A; /* same as --teal-800 */
  --color-white: #FFFFFF; /* same as --paper */

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(18, 52, 58, 0.06), 0 2px 8px rgba(18, 52, 58, 0.05);
  --shadow-md: 0 6px 22px rgba(18, 52, 58, 0.10);
  --shadow-lg: 0 24px 60px rgba(18, 52, 58, 0.22);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* The `hidden` attribute must always win. Several components below set an
   explicit `display` (e.g. `.gate { display: flex }`), which otherwise
   overrides the browser's default `[hidden] { display: none }`. */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; }

a { color: var(--teal-700); }

button { font-family: inherit; cursor: pointer; }

input, select { font-family: inherit; }

/* ==========================================================================
   Buttons & form controls
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--teal-800);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.12s ease;
}
.btn-primary:hover { background: var(--teal-700); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary.loading { pointer-events: none; }
.btn-primary .spinner { display: none; }

.btn-primary.loading .btn-label { opacity: 0.55; }
.btn-primary.loading .spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-small {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s ease;
}
.btn-small:hover { background: var(--teal-300); }

.btn-ghost {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-800);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.btn-ghost:hover { border-color: var(--teal-500); background: var(--teal-100); }

input[type="password"],
input[type="text"],
input[type="search"],
.select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
input:focus, .select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(47, 116, 128, 0.15);
}
.select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312343A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  cursor: pointer;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Auth (login) page
   ========================================================================== */
.auth-body { min-height: 100vh; }

.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 15% 0%, var(--teal-700) 0%, var(--teal-800) 45%, var(--teal-950) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 64px clamp(28px, 4vw, 64px) 64px clamp(32px, 6vw, 96px);
}
.auth-brand-inner { position: relative; z-index: 2; max-width: 520px; width: 100%; margin-right: auto; }

.brand-link { display: inline-flex; align-items: center; margin-bottom: 44px; }
.brand-logo { height: auto; width: auto; max-height: clamp(110px, 12vw, 170px); max-width: 100%; }

.auth-headline {
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.auth-sub {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 440px;
  margin: 0;
}

.auth-points { list-style-type: disc; margin: 0; padding-left: 22px; }
.auth-points li {
  margin-bottom: 14px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

/* Decorative tree icon, echoing the brand mark */
.auth-ring {
  position: absolute;
  right: -120px; bottom: -140px;
  width: 420px; height: auto;
  opacity: 0.08;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
}
.auth-ring-link {
  display: contents;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--cream);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: var(--shadow-md);
}
.auth-card-logo { display: none; height: 34px; width: auto; margin-bottom: 24px; }

.auth-title { font-size: 30px; margin-bottom: 6px; }
.auth-hint { color: var(--muted); font-size: 14.5px; margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 8px;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; }
.toggle-pw {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--teal-600);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 7px;
}
.toggle-pw:hover { background: var(--teal-100); }

.error-message {
  color: #B4341F;
  font-size: 13.5px;
  margin: 9px 0 0;
  min-height: 18px;
}

.auth-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ==========================================================================
   App shell
   ========================================================================== */
.app-body { background: var(--cream); }

.gate {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--cream);
  color: var(--muted);
  z-index: 50;
}
.gate-spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--teal-100);
  border-top-color: var(--teal-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.app-logo { height: 48px; width: auto; }
.app-logo-link { display: inline-flex; align-items: center; }

.tabs { display: flex; gap: 4px; margin-left: 8px; }
.tab {
  border: none;
  background: none;
  padding: 10px 16px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.tab:hover { color: var(--teal-600); border-bottom-color: var(--teal-300); }
.tab.active { color: var(--teal-800); border-bottom-color: var(--teal-800); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.app-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.panel { display: none; }
.panel.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.panel-title { font-size: 34px; letter-spacing: -0.01em; }
.panel-desc { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.count {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-700);
  background: var(--teal-100);
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.search {
  position: relative;
  flex: 1 1 320px;
  min-width: 240px;
}
.search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.search input { padding-left: 44px; }
.toolbar .select { flex: 0 1 190px; min-width: 150px; cursor: pointer; }

/* --------------------------- Job cards -------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.job-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.job-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--teal-300);
}
.job-card.featured { border-color: var(--teal-500); }
.job-card.featured {
  border-left: 4px solid var(--teal-700);
}
.ribbon {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(200, 162, 74, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}
.job-top { display: flex; gap: 14px; align-items: center; }
.job-mark {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--teal-800);
  color: #fff;
  font-family: var(--serif);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.job-title { font-size: 20px; line-height: 1.25; }
.job-company { margin: 3px 0 0; font-size: 14px; font-weight: 600; color: var(--teal-700); }
.job-desc { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; flex-grow: 1; }
.job-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.job-date { font-size: 12.5px; color: var(--muted); }

/* --------------------------- Fellow cards ----------------------------- */
.fellow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.fellow-card {
  display: flex;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.fellow-card:hover,
.fellow-card:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--teal-300);
  outline: none;
}
.fellow-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.fellow-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-800);
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.fellow-link svg { width: 15px; height: 15px; }
.fellow-link:hover {
  background: var(--teal-800);
  color: #fff;
  transform: translateY(-1px);
}
.avatar {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--teal-600), var(--teal-800));
  color: #fff;
  font-family: var(--serif);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-lg { width: 78px; height: 78px; font-size: 28px; margin: 0 auto 16px; }
.fellow-info { min-width: 0; }
.fellow-name { font-size: 19px; }
.fellow-title { margin: 3px 0 1px; font-size: 14px; color: var(--ink); }
.fellow-company { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--teal-700); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--pale-mint);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}
.chip-solid { background: var(--teal-100); border-color: transparent; color: var(--teal-700); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
  font-size: 15px;
}

.app-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.footer-note { font-style: italic; }

/* ----------------------------- Drawer --------------------------------- */
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(14, 42, 47, 0.45);
  z-index: 40;
  animation: fade 0.2s ease;
}
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(430px, 92vw);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  z-index: 41;
  padding: 34px 30px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--teal-800);
  font-size: 22px;
  line-height: 1;
}
.drawer-close:hover { background: var(--teal-100); }
.drawer-head { text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 27px; margin-bottom: 4px; }
.drawer-block { margin-top: 26px; }
.drawer-block h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 10px;
}
.drawer-block p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.detail-list { margin: 24px 0 0; display: grid; gap: 14px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 16px; }
.detail-list dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.detail-list dd { margin: 0; font-size: 14px; font-weight: 600; text-align: right; }
.drawer-actions { display: flex; gap: 12px; margin-top: 32px; }
.drawer-actions .btn-primary { width: auto; flex: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { padding: 48px 28px 40px; }
  .brand-link { margin-bottom: 28px; }
  .brand-logo { max-height: 110px; max-width: 100%; }
  .auth-brand-inner .brand-link { display: flex; justify-content: center; }
  .auth-ring { display: none; }
  .auth-card-logo { display: block; }
  .auth-card { border: none; box-shadow: none; background: transparent; padding: 8px 4px 32px; }
  .auth-panel { background: var(--cream); }
}

@media (max-width: 720px) {
  .app-header-inner { flex-wrap: wrap; gap: 12px; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .header-actions { margin-left: auto; }
  .panel-title { font-size: 27px; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .app-main { padding: 28px 18px 64px; }
  .app-header-inner { padding: 12px 18px; }
  .mode-pill { display: none; }
  .app-footer { padding: 20px 18px 40px; flex-direction: column; }
}

/* ==========================================================================
   Public landing page
   ========================================================================== */
html { scroll-behavior: smooth; }

.landing-body { background: var(--cream); }

/* --------------------------- Site header ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 245, 240, 0.9);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}
.site-logo-link { display: inline-flex; align-items: center; margin-left: -12px; }
.site-logo { height: 55px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav > a:not(.btn-ghost) {
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--teal-800);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.site-nav > a:not(.btn-ghost):hover { color: var(--teal-600); border-bottom-color: var(--teal-300); }
.site-nav > a.btn-apply {
  width: auto;
  padding: 10px 20px;
  border-bottom: none;
  border-radius: 999px;
  font-size: 14px;
  color: #fff;
}
.site-nav > a.btn-apply:hover { border-bottom: none; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 9px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--teal-800);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* -------------------------------- Hero --------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 12% 0%, var(--teal-700) 0%, var(--teal-800) 42%, var(--teal-950) 100%);
  color: #fff;
  padding: clamp(64px, 10vw, 122px) 24px clamp(72px, 11vw, 130px);
  scroll-margin-top: 76px;
}
.hero-inner { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; }

.eyebrow {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive-green);
  margin: 0 0 18px;
}
.hero .eyebrow {
  font-size: clamp(12px, 1.6vw, 20px);
  letter-spacing: 0.12em;
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.1;
}
.eyebrow-dark { color: var(--teal-600); }

.hero-title {
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 16ch;
  margin: 0 0 24px;
}
.hero-sub {
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
  margin: 0 0 36px;
}
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn-inline { width: auto; padding: 14px 26px; border-radius: 999px; }

.btn-ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  padding: 13px 24px;
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.68);
}

.hero-ring {
  position: absolute;
  left: -150px;
  bottom: -90px;
  width: 520px;
  height: auto;
  opacity: 0.10;
  z-index: 1;
  pointer-events: none;
}

/* ------------------------------ Sections ------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 24px; scroll-margin-top: 76px; }

.section-head {
  max-width: 1180px;
  margin: 0 auto 44px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 780px;
}
.section-title {
  font-size: clamp(27px, 3.4vw, 42px);
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--teal-900);
  margin: 0;
}
.section-sub {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
  margin: 14px 0 0;
  max-width: 640px;
}
.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

.about-section { background: var(--cream); }
.legacy-section { background: var(--paper); }
.program-section { background: var(--cream-dark); }
.selection-section { background: var(--paper); }
.calendar-section { background: var(--cream); }
.fellows-section { background: var(--paper); }
.leadership-section { background: var(--cream-dark); }

/* ------------------------------- About --------------------------------- */
.about-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.about-copy p { font-size: 16.5px; line-height: 1.75; color: var(--muted); margin: 0 0 18px; }
.about-copy .lede { font-size: 19px; line-height: 1.6; color: var(--ink); }
.about-copy .section-title { margin-bottom: 20px; }

.about-stats {
  display: grid;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 28px;
  box-shadow: var(--shadow-sm);
}
.stat {
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.stat:last-child { border-bottom: none; }
.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
  color: var(--teal-800);
  margin-bottom: 8px;
}
.stat-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------- Prose --------------------------------- */
.bio-intro {
  max-width: 760px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
}
.bio-portrait {
  margin: 0;
}
.bio-portrait img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.bio-intro-copy p {
  font-size: 17px;
  line-height: 1.78;
  color: #2A3835;
  margin: 0 0 20px;
}
.bio-wide {
  max-width: 760px;
  margin: 32px auto;
}
.bio-wide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.78;
  color: #2A3835;
}
.prose p { margin: 0 0 20px; }
.prose-head {
  font-size: clamp(21px, 2.4vw, 26px);
  color: var(--teal-800);
  margin: 40px 0 16px;
}
.prose-note {
  font-style: italic;
  color: var(--muted);
  font-size: 15.5px;
  border-left: 3px solid var(--teal-300);
  padding-left: 18px;
  margin-top: 30px;
}

.pullquote {
  margin: 38px 0;
  padding: 30px 34px;
  background: var(--cream);
  border-left: 4px solid var(--teal-700);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pullquote blockquote {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.3;
  color: var(--teal-800);
}
.pullquote figcaption {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ------------------------------ Program -------------------------------- */
.feature-grid {
  max-width: 1180px;
  margin: 0 auto 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 20px;
}

/* Program cards: 4 -> 2 columns, never a lone third card */
#program .feature-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  #program .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  #program .feature-grid { grid-template-columns: 1fr; }
}
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  overflow: hidden;
}

.feature-img {
  display: block;
  width: calc(100% + 52px);
  margin: -26px -26px 16px -26px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.feature h3 { font-size: 21px; color: var(--teal-800); margin-bottom: 10px; }
.feature p { margin: 0; font-size: 14.8px; line-height: 1.65; color: var(--muted); }

/* Leadership cards: headshot left, bio right */
#leadership .feature.leadership-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.leader-photo {
  flex: none;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.leader-body { min-width: 0; flex: 1; }
.leader-body h3 { font-size: 21px; color: var(--teal-800); margin-bottom: 10px; }
.leader-body p { margin: 0; font-size: 14.8px; line-height: 1.65; color: var(--muted); }

.topics {
  max-width: 940px;
  margin: 0 auto;
  background: var(--teal-800);
  border-radius: 20px;
  padding: clamp(30px, 4vw, 52px) clamp(24px, 4vw, 56px);
}
.topics-head {
  font-size: clamp(20px, 2.3vw, 24px);
  color: #fff;
  margin: 0 0 24px;
}
.topics-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 48px;
}
.topics-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  break-inside: avoid;
}
.topics-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-300);
}

/* ----------------------------- Selection ------------------------------- */
.selection-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 36px;
  align-items: start;
}
.selection-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 96px;
}
.selection-photo img {
  width: 100%;
  height: auto;
  max-height: 640px;
  min-height: 360px;
  object-fit: cover;
  display: block;
}
.selection-steps { min-width: 0; }

.application-form {
  max-width: 880px;
  margin: 40px auto 0;
  padding: 28px 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.application-form-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--teal-900);
}
.application-form-note {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 18px;
}
.application-form-link {
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 600;
}
.application-form-link a {
  color: var(--teal-800);
  text-decoration: none;
}
.application-form-link a:hover {
  text-decoration: underline;
}
.formstack-embed {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.formstack-embed iframe {
  display: block;
  width: 100%;
  border: 0;
  min-height: 700px;
}
.steps {
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}
.steps > li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.steps > li:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--teal-300);
  background: #fff;
}
.step-num {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal-800);
  color: #fff;
  font-family: var(--serif);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { font-size: 19px; color: var(--teal-900); margin-bottom: 3px; }
.steps p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

.steps details {
  margin-top: 10px;
}
.steps details summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-800);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.steps details summary::-webkit-details-marker { display: none; }
.steps details summary::marker { display: none; }
.step-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  flex: none;
}
.steps details[open] .step-chevron {
  transform: rotate(180deg);
}
.eligibility ul {
  margin: 10px 0 0;
  padding: 0 0 0 20px;
  list-style: disc;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}
.eligibility li { margin-bottom: 6px; }
.eligibility h4 {
  margin: 14px 0 8px;
  font-size: 15px;
  color: var(--teal-800);
}

/* ------------------------------ Calendar ------------------------------- */
.calendar-table {
  max-width: 880px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 19px 28px;
  border-bottom: 1px solid var(--line-soft);
}
.cal-row:last-child { border-bottom: none; }
.cal-date {
  flex: 0 0 210px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--teal-800);
}
.cal-event { font-size: 15px; color: var(--ink); }
.cal-event em { color: var(--muted); font-style: italic; }
.calendar-note {
  max-width: 880px;
  margin: 22px auto 0;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}

/* ------------------------------ Fellows -------------------------------- */
.fellow-class {
  margin: 2px 0 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-600);
}
.fellow-bio {
  margin: 0 0 12px;
  font-size: 13.8px;
  line-height: 1.62;
  color: var(--muted);
}
.read-more { font-size: 13px; font-weight: 700; color: var(--teal-700); }

.load-more-wrap { text-align: center; margin-top: 36px; }
.load-more-wrap .btn-ghost { padding: 13px 28px; font-size: 15px; }

/* ------------------------------- Modal --------------------------------- */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(14, 42, 47, 0.5);
  backdrop-filter: blur(2px);
  z-index: 60;
  animation: fade 0.2s ease;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(660px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  z-index: 61;
  padding: 42px clamp(24px, 4vw, 46px);
  opacity: 0;
  transform: translate(-50%, -46%) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--teal-800);
  font-size: 22px;
  line-height: 1;
}
.modal-close:hover { background: var(--teal-100); }
.modal-head {
  text-align: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.modal-head h2 { font-size: 28px; color: var(--teal-900); margin-bottom: 6px; }
.modal-meta { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.modal-bio p { margin: 0 0 18px; font-size: 15.5px; line-height: 1.76; color: var(--ink); }
.modal .btn-primary { width: auto; }

/* ------------------------------- Footer -------------------------------- */
.site-footer { background: var(--teal-950); color: #fff; }
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}
.footer-brand { display: flex; align-items: center; }
.footer-logo-link { display: inline-flex; align-items: center; }
.footer-logo { height: 138px; width: auto; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 60px; }
.footer-cols h4 {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-300);
  margin: 0 0 14px;
}
.footer-cols a {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: color 0.16s ease;
}
.footer-cols a:hover { color: #fff; }
.footer-fine {
  margin: 0;
  padding: 22px 24px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------------------------- Final CTA ------------------------------- */
.final-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(88px, 11vw, 150px) 24px;
  color: #fff;
  text-align: center;
}
.final-cta-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}
.final-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 33, 38, 0.45) 0%,
    rgba(10, 33, 38, 0.78) 55%,
    rgba(10, 33, 38, 0.9) 100%);
  z-index: 1;
}
.final-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}
.final-cta-title {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  margin: 0 0 30px;
  color: #fff;
}
.final-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* ---------------------------- Landing responsive ----------------------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { position: static; }
  .topics-list { columns: 1; }
  .cal-date { flex: 0 0 170px; }
  .bio-intro { grid-template-columns: 1fr; }
  .bio-portrait { max-width: 280px; margin: 0 auto; }
  .selection-layout { grid-template-columns: 1fr; }
  .selection-photo img { max-height: 320px; min-height: 0; }
}
@media (max-width: 600px) {
  #leadership .feature.leadership-card { flex-direction: column; align-items: center; text-align: center; }
  .leader-photo { width: 96px; height: 96px; }
}

@media (max-width: 780px) {
  .site-nav { gap: 14px; }
  .menu-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(247, 245, 240, 0.98);
    backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 8px 18px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav > a.btn-apply,
  .site-nav > a.btn-ghost { width: 100%; justify-content: center; margin-top: 8px; }
}

@media (max-width: 900px) {
  .hero-inner { position: relative; z-index: 2; max-width: none; margin: 0 auto; }
}
@media (max-width: 720px) {
  .section { padding: 52px 18px; }
  .site-header-inner { padding: 12px 18px; }
  .site-logo-link { margin-left: -6px; }
  .site-logo { height: 48px; }
  .hero { padding: 68px 18px 72px; }
  .hero-title { max-width: none; }
  .cal-row { flex-direction: column; gap: 5px; padding: 18px 22px; }
  .cal-date { flex: none; }
  .footer-cols { gap: 34px; }
  .footer-logo { height: 79px; }
  .site-footer-inner { padding: 44px 18px 32px; }
}
