/* ===========================================================================
   Morning Glory Alumni Network — design system
   ---------------------------------------------------------------------------
   Mobile-first. Brand colours taken from the live school site:
     #0033A0 royal blue · #001A70 deep navy · #FFD700 gold · #228B22 green

   Typography pairs a warm display serif with a clean UI sans, so the pages
   read as a thirty-year-old school rather than a generic web form.
   =========================================================================== */
/* import premium fonts */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@200;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");
:root {
  /* ---- brand ---- */
  --blue: #0033a0;
  --blue-700: #002b86;
  --navy: #001a70;
  --navy-900: #000f46;
  --navy-800: #001355;
  --gold: #ffd700;
  --gold-300: #ffe88a;
  --gold-600: #d9a400;
  --green: #228b22;
  --sky: #38b6ff;

  /* ---- warm neutrals: a touch of warmth stops it feeling clinical ---- */
  --ink: #141a2e;
  --ink-2: #3f4761;
  --ink-3: #6e7693;
  --ink-4: #9aa1b8;
  --line: #e6e4df;
  --line-2: #d4d1ca;
  --paper: #ffffff;
  --paper-2: #faf8f4;
  --paper-3: #f3f0e9;
  --canvas: #f7f5f1;
  --tint-blue: #eef2fc;
  --tint-gold: #fdf6dd;
  --tint-green: #ecf6ec;
  --tint-red: #fdeeeb;

  /* ---- semantic ---- */
  --danger: #b3301f;
  --warn: #8a5a00;
  --ok: #1c6b2b;

  /* ---- shape ---- */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---- elevation: tinted navy, never grey-black ---- */
  --e1: 0 1px 2px rgba(0, 26, 112, 0.05), 0 1px 3px rgba(0, 26, 112, 0.04);
  --e2: 0 2px 4px rgba(0, 26, 112, 0.04), 0 6px 16px -4px rgba(0, 26, 112, 0.1);
  --e3:
    0 4px 8px rgba(0, 26, 112, 0.05), 0 18px 40px -12px rgba(0, 26, 112, 0.18);
  --e4: 0 30px 70px -20px rgba(0, 26, 112, 0.35);
  --ring: 0 0 0 3px rgba(0, 51, 160, 0.16);

  /* ---- type ---- */
  --display:
    "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1160px;
  --nav-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------ typography -- */

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.85rem, 1.25rem + 2.6vw, 2.6rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.8rem);
}

h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 0.98rem;
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: 0;
}

p {
  margin: 0 0 1.05em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

a:hover {
  text-decoration: underline;
}

strong,
b {
  font-weight: 650;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.6rem 0;
}

small,
.small {
  font-size: 0.875rem;
}

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

.faint {
  color: var(--ink-3);
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

::selection {
  background: var(--gold-300);
  color: var(--navy);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.8rem 1.1rem;
  border-radius: 0 0 var(--r) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------- structure -- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.15rem;
}

.wrap--narrow {
  max-width: 540px;
}

.wrap--mid {
  max-width: 820px;
}

main {
  display: block;
  min-height: 60vh;
  padding: 1.5rem 0 4rem;
}

/* A page that opens with a full-bleed section sits flush under the header. */
.main--bleed {
  padding-top: 0;
}

/* A flash message is the one thing that may appear above the hero, and it
   still needs room. */
.main--bleed>.wrap:first-child {
  padding-top: 1.25rem;
}

.section {
  margin: 0 0 3rem;
}

/* Section heading: small eyebrow rule in gold, then the title. */
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  position: relative;
}

.section__head::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.section__head h2 {
  margin: 0;
}

.section__head a {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.stack > * + * {
  margin-top: 1.1rem;
}

.stack-sm > * + * {
  margin-top: 0.6rem;
}

.stack-lg > * + * {
  margin-top: 2rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.row--between {
  justify-content: space-between;
  align-items: center;
}

.row--middle {
  align-items: center;
}

.row--tight {
  gap: 0.4rem;
}

.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}

/* ---------------------------------------------------------------- ribbon -- */

.ribbon {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0.5rem 1rem;
}

.ribbon strong {
  color: var(--gold);
  font-weight: 650;
}

/* -------------------------------------------------------------- masthead -- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--nav-h);
}

/* A hairline of brand colour along the bottom edge of the header. */
.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold-600) 7%,
    transparent 34%
  );
  opacity: 0.9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

/* The school's own lockup, then a rule, then the sub-brand. The logo already
   carries "Morning Glory Montessori", so the label beside it says only what
   this particular site is. */
.brand__logo {
  height: 34px;
  width: auto;
  flex: none;
}

.brand__divider {
  flex: none;
  width: 1px;
  align-self: stretch;
  min-height: 28px;
  background: var(--line-2);
}

.brand__label {
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -.01em;
  white-space: nowrap;
}

/* Below this the header has no room for the logo, the rule and the label
   alongside the menu button, so the logo carries the identity on its own. */
@media (max-width: 400px) {

  .brand__divider,
  .brand__label {
    display: none;
  }
}

@media (min-width: 560px) {
  .brand__logo {
    height: 38px;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--paper);
  border: 1px solid var(--line-2);
  color: var(--navy);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  box-shadow: var(--e1);
}

.nav-toggle:hover {
  background: var(--paper-2);
}

.nav-toggle__bars {
  display: grid;
  gap: 3.5px;
}

.nav-toggle__bars span {
  display: block;
  width: 15px;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
}

.nav {
  display: none;
}

.nav[data-open="true"] {
  display: block;
  padding: 0.6rem 0 1.1rem;
  border-top: 1px solid var(--line);
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.nav__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-weight: 550;
  font-size: 0.95rem;
}

.nav__list a:hover {
  background: var(--paper-3);
  color: var(--navy);
  text-decoration: none;
}

.nav__list a[aria-current="page"] {
  background: var(--tint-blue);
  color: var(--navy);
  font-weight: 650;
}

.nav__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.nav__count {
  background: var(--blue);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 19px;
  height: 19px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  padding: 0 0.35rem;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------- account menu -- */

/* The signed-in menu plus three account buttons will not fit one row inside
   the 1160px container, so the account controls collapse into a single chip.
   <details> means it works with JavaScript switched off. */
.account {
  position: relative;
}

.account__trigger {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .6rem .3rem .35rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--paper);
  cursor: pointer;
  list-style: none;
  font-size: .86rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  box-shadow: var(--e1);
  transition: background .14s ease, border-color .14s ease;
}

.account__trigger::-webkit-details-marker {
  display: none;
}

.account__trigger:hover {
  background: var(--paper-2);
  border-color: var(--ink-4);
}

.account[open] .account__trigger {
  background: var(--tint-blue);
  border-color: var(--blue);
}

.account__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-3);
  margin-left: .1rem;
  transition: transform .15s ease;
}

.account[open] .account__caret {
  transform: rotate(180deg);
}

.account__menu {
  margin-top: .5rem;
  padding: .4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--e3);
  display: grid;
  gap: 1px;
}

.account__who {
  padding: .6rem .7rem .7rem;
  margin: 0 0 .25rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.35;
}

.account__who strong {
  display: block;
  color: var(--navy);
  font-size: .92rem;
  font-weight: 650;
}

.account__who span {
  display: block;
  font-size: .78rem;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.account__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: .58rem .7rem;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font: inherit;
  font-size: .89rem;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
}

.account__item:hover {
  background: var(--paper-3);
  color: var(--navy);
  text-decoration: none;
}

.account__item--strong {
  color: var(--blue);
  font-weight: 650;
}

.account__item--signout {
  color: var(--danger);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  margin-top: .25rem;
}

.account__item--signout:hover {
  background: var(--tint-red);
  color: var(--danger);
}

.account form {
  display: block;
  margin: 0;
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  padding: 0.75rem 1.2rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  min-height: 46px;
  transition:
    transform 0.14s cubic-bezier(0.2, 0.8, 0.3, 1),
    box-shadow 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1.5px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--primary {
  background: linear-gradient(180deg, var(--blue) 0%, var(--navy) 100%);
  color: #fff;
  box-shadow:
    var(--e2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn--primary:hover {
  background: linear-gradient(180deg, var(--blue-700) 0%, var(--navy-800) 100%);
  box-shadow:
    var(--e3),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn--gold {
  background: linear-gradient(
    180deg,
    var(--gold-300) 0%,
    var(--gold) 55%,
    #f0c400 100%
  );
  color: var(--navy-900);
  box-shadow:
    var(--e2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--gold:hover {
  box-shadow:
    var(--e3),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--outline {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--line-2);
  box-shadow: var(--e1);
}

.btn--outline:hover {
  background: var(--paper-2);
  border-color: var(--ink-4);
}

.btn--ghost {
  background: transparent;
  color: var(--blue);
}

.btn--ghost:hover {
  background: var(--tint-blue);
}

.btn--danger {
  background: var(--paper);
  color: var(--danger);
  border-color: #e9c3bc;
}

.btn--danger:hover {
  background: var(--tint-red);
}

.btn--sm {
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  min-height: 38px;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: grid;
  gap: 0.6rem;
}

/* ----------------------------------------------------------------- cards -- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  box-shadow: var(--e1);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

a.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--e3);
  border-color: var(--line-2);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

/* Gold spine on the cards that carry an invitation. */
.card--accent {
  position: relative;
  padding-left: 1.5rem;
}

.card--accent::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-600));
}

.card__media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--paper-3), var(--tint-blue));
  overflow: hidden;
  position: relative;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.card--flush:hover .card__media img {
  transform: scale(1.035);
}

.card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 15, 70, 0.14));
  pointer-events: none;
}

.card__body {
  padding: 1.35rem;
}

.card__title {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.card__title a {
  color: var(--navy);
}

.card__meta {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: 0;
}

.card__foot {
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding: 3rem 0 3.25rem;
  background:
    radial-gradient(
      900px 420px at 88% -15%,
      rgba(255, 215, 0, 0.2),
      transparent 62%
    ),
    radial-gradient(
      760px 420px at 6% 110%,
      rgba(56, 182, 255, 0.22),
      transparent 60%
    ),
    linear-gradient(
      158deg,
      var(--navy-900) 0%,
      var(--navy) 42%,
      var(--blue) 100%
    );
}

/* Fine dot texture, so the large navy field is not a flat slab. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.13) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 70% at 30% 20%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    70% 70% at 30% 20%,
    #000 0%,
    transparent 78%
  );
}

.hero > .wrap {
  position: relative;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.05rem, 1.3rem + 3.6vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
  max-width: 22ch;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.32);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.36rem 0.8rem;
  border-radius: var(--r-pill);
  margin-bottom: 1.15rem;
  backdrop-filter: blur(4px);
}

.hero__lead {
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 48ch;
  line-height: 1.6;
}

.hero__actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.7rem;
}

.hero__actions .btn--outline {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.hero__actions .btn--outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Stats as glass tiles rather than bare numbers. */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 2.1rem 0 0;
}

.hero__stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--r);
  padding: 0.8rem 0.9rem;
  backdrop-filter: blur(6px);
}

.hero__stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__stat span {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
  display: block;
  margin-top: 0.15rem;
}

/* ------------------------------------------------------------- page head -- */

.page-head {
  margin-bottom: 1.9rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.page-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.page-head h1 {
  margin-bottom: 0.4rem;
}

.page-head p {
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0;
}

/* --------------------------------------------------------------- avatars -- */

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--paper-3);
  box-shadow:
    0 0 0 1px var(--line),
    var(--e1);
}

.avatar--initials {
  background: linear-gradient(145deg, var(--blue), var(--navy));
  color: var(--gold);
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  box-shadow:
    0 0 0 1px rgba(0, 26, 112, 0.12),
    var(--e1);
}

.avatar--sm {
  width: 36px;
  height: 36px;
  font-size: 0.78rem;
}

.avatar--md {
  width: 58px;
  height: 58px;
  font-size: 1.1rem;
}

.avatar--lg {
  width: 88px;
  height: 88px;
  font-size: 1.6rem;
}

.avatar--xl {
  width: 116px;
  height: 116px;
  font-size: 2.1rem;
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 5px var(--line),
    var(--e2);
}

/* ---------------------------------------------------------------- badges -- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  padding: 0.26rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--paper-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.badge--blue {
  background: var(--tint-blue);
  color: var(--blue);
  border-color: #cfdcf7;
}

.badge--gold {
  background: var(--tint-gold);
  color: var(--warn);
  border-color: #efdca6;
}

.badge--green {
  background: var(--tint-green);
  color: var(--ok);
  border-color: #c6e3c8;
}

.badge--red {
  background: var(--tint-red);
  color: var(--danger);
  border-color: #eec6bf;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ----------------------------------------------------------------- forms -- */

.field {
  margin-bottom: 1.15rem;
}

.field > label,
.field__label {
  display: block;
  font-weight: 600;
  font-size: 0.91rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  letter-spacing: -0.005em;
}

.field__hint {
  display: block;
  font-size: 0.83rem;
  color: var(--ink-3);
  margin: -0.15rem 0 0.45rem;
  line-height: 1.5;
}

.field__error {
  display: block;
  font-size: 0.85rem;
  color: var(--danger);
  margin-top: 0.4rem;
  font-weight: 600;
}

.req {
  color: var(--danger);
}

.optional {
  font-weight: 450;
  color: var(--ink-4);
  font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0.72rem 0.85rem;
  min-height: 46px;
  appearance: none;
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    background 0.14s ease;
  box-shadow: inset 0 1px 2px rgba(20, 26, 46, 0.03);
}

textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.6;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236e7693' d='M6 7.5 .5 1h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-4);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: var(--ring);
  outline: none;
  background: var(--paper);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffbfa;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-4);
}

input[type="file"] {
  font-size: 0.9rem;
  padding: 0.6rem;
  background: var(--paper-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  width: 100%;
  cursor: pointer;
}

/* Checkbox rows read as selectable cards. */
.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  cursor: pointer;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.check:hover {
  background: var(--paper-2);
  border-color: var(--line-2);
}

.check:has(input:checked) {
  border-color: var(--blue);
  background: var(--tint-blue);
  box-shadow: var(--ring);
}

.check:has(input:disabled) {
  opacity: 0.72;
  cursor: default;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0.18rem 0 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.check__text {
  font-size: 0.92rem;
  line-height: 1.5;
}

.check__text strong {
  display: block;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 650;
}

.check__text span {
  color: var(--ink-2);
  font-size: 0.86rem;
}

.check-list {
  display: grid;
  gap: 0.5rem;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.3rem;
}

legend {
  font-family: var(--display);
  font-weight: 600;
  color: var(--navy);
  font-size: 1.12rem;
  padding: 0;
  margin-bottom: 0.3rem;
}

.form-section {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.form-section:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 0 1.1rem;
  grid-template-columns: 1fr;
}

.form-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.7rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

/* ----------------------------------------------------------- staged form -- */

/* A long form is walked one section at a time. Everything stays inside a
   single <form> and a single submit, so with JavaScript off the steps simply
   render as the stacked sections they already were. */
.stepper {
  margin-bottom: 1.6rem;
}

.stepper__rail {
  display: flex;
  gap: .3rem;
  margin-bottom: .75rem;
}

.stepper__tick {
  flex: 1;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--line);
  transition: background .25s ease;
}

.stepper__tick.is-done {
  background: var(--green);
}

.stepper__tick.is-current {
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.stepper__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: .85rem;
  color: var(--ink-3);
}

.stepper__meta strong {
  color: var(--navy);
  font-weight: 650;
  font-size: .95rem;
}

.stepper__count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Steps the stepper is not showing. */
.form-section[hidden] {
  display: none;
}

/* When stepping, a section no longer needs its own divider. */
form[data-stepper] .form-section {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.step-nav {
  display: grid;
  gap: .6rem;
  margin-top: 1.7rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.step-nav__spacer {
  display: none;
}

@media (min-width: 560px) {
  .step-nav {
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }

  .step-nav__spacer {
    display: block;
  }
}

/* A field revealed by a checkbox. Hidden only once the script takes over, so
   it is always reachable without JavaScript. */
[data-shown-by] {
  animation: reveal .18s ease;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------- messages -- */

.flash {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1.05rem;
  border-radius: var(--r);
  border: 1px solid;
  font-size: 0.93rem;
  box-shadow: var(--e1);
}

.alert__icon {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.1rem;
}

.alert--success {
  background: var(--tint-green);
  border-color: #c6e3c8;
  color: #14521d;
}

.alert--success .alert__icon {
  background: var(--ok);
}

.alert--error {
  background: var(--tint-red);
  border-color: #eec6bf;
  color: #842516;
}

.alert--error .alert__icon {
  background: var(--danger);
}

.alert--info {
  background: var(--tint-blue);
  border-color: #cfdcf7;
  color: #10306e;
}

.alert--info .alert__icon {
  background: var(--blue);
}

.alert--warn {
  background: var(--tint-gold);
  border-color: #efdca6;
  color: #68450a;
}

.alert--warn .alert__icon {
  background: var(--gold-600);
}

.notice {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-sm);
  padding: 0.95rem 1.05rem;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.notice--gold {
  border-left-color: var(--gold);
  background: var(--tint-gold);
  color: #68450a;
}

.notice--green {
  border-left-color: var(--green);
  background: var(--tint-green);
  color: #14521d;
}

.notice strong {
  color: inherit;
  font-weight: 650;
}

blockquote.notice {
  font-style: italic;
}

.empty {
  text-align: center;
  padding: 3rem 1.4rem;
  color: var(--ink-2);
  background:
    radial-gradient(420px 160px at 50% 0%, var(--tint-blue), transparent 70%),
    var(--paper);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
}

.empty h3 {
  margin-bottom: 0.45rem;
}

.empty p {
  max-width: 44ch;
  margin: 0 auto 1.2rem;
  font-size: 0.93rem;
}

/* --------------------------------------------------------------- filters -- */

.filters {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.2rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--e1);
}

.filters__grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

.filters__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

/* Horizontally scrolling filter chips, with soft fade at the edge. */
.chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.2rem 0.2rem 0.5rem;
  margin: 0 -0.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(
    90deg,
    #000 0,
    #000 calc(100% - 28px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0,
    #000 calc(100% - 28px),
    transparent 100%
  );
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.48rem 0.9rem;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  text-decoration: none;
  background: var(--paper-2);
  border-color: var(--ink-4);
  color: var(--navy);
}

.chip[aria-current="true"] {
  background: linear-gradient(180deg, var(--blue), var(--navy));
  border-color: var(--navy);
  color: #fff;
  box-shadow:
    var(--e2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.chip__n {
  opacity: 0.62;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.result-count {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 0.95rem;
}

/* ------------------------------------------------------- people / mentors -- */

.person {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  box-shadow: var(--e1);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

.person:hover {
  transform: translateY(-2px);
  box-shadow: var(--e3);
  border-color: var(--line-2);
}

.person__top {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.person__name {
  font-family: var(--display);
  font-weight: 600;
  color: var(--navy);
  font-size: 1.06rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.person__name a {
  color: inherit;
}

.person__year {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-top: 0.1rem;
}

.person__role {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin-top: 0.25rem;
}

.person__facts {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.person__fact {
  display: flex;
  gap: 0.5rem;
}

.person__fact b {
  color: var(--navy);
  font-weight: 600;
  flex: none;
  min-width: 4.4rem;
}

.person__foot {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- events -- */

.event-date {
  flex: none;
  width: 58px;
  text-align: center;
  border-radius: var(--r);
  background: linear-gradient(170deg, var(--navy), var(--navy-900));
  color: #fff;
  padding: 0.5rem 0.25rem 0.45rem;
  line-height: 1.05;
  box-shadow:
    var(--e2),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.event-date b {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.event-date span {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 600;
}

.event-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.event-meta {
  display: grid;
  gap: 0.45rem;
  font-size: 0.87rem;
  color: var(--ink-2);
  margin: 0.9rem 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.event-meta div {
  display: flex;
  gap: 0.6rem;
}

.event-meta b {
  color: var(--navy);
  font-weight: 600;
  flex: none;
  min-width: 5.6rem;
}

.capacity {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--warn);
  background: var(--tint-gold);
  border: 1px solid #efdca6;
  padding: 0.24rem 0.6rem;
  border-radius: var(--r-pill);
}

/* ------------------------------------------------------ funding progress -- */

.meter {
  height: 10px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--paper-3);
  box-shadow: inset 0 1px 2px rgba(20, 26, 46, 0.07);
}

.meter__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(
    90deg,
    var(--green) 0%,
    #37a63c 60%,
    #4cb851 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.meter__fill--school {
  background: linear-gradient(90deg, var(--blue), var(--sky));
}

.figures {
  display: grid;
  gap: 0.4rem;
  margin: 1.1rem 0;
}

.figure {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.figure dt {
  color: var(--ink-2);
}

.figure dd {
  margin: 0;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.figure--received {
  background: var(--tint-green);
  border-color: #c6e3c8;
}

.figure--received dd {
  color: var(--ok);
}

.figure--gap {
  background: var(--tint-red);
  border-color: #eec6bf;
}

.figure--gap dd {
  color: var(--danger);
}

.figure--pledge {
  background: var(--tint-gold);
  border-color: #efdca6;
}

.figure--pledge dd {
  color: var(--warn);
}

/* ---------------------------------------------------------------- tables -- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--e1);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--paper-2);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--paper-2);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- dashboard -- */

.tiles {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, 1fr);
}

.tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.95rem 1rem;
  text-align: left;
  box-shadow: var(--e1);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.tile:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--e2);
}

.tile b {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tile span {
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.35;
  display: block;
  margin-top: 0.15rem;
}

.tile--alert {
  border-color: #efdca6;
  background: linear-gradient(180deg, #fffdf4, var(--tint-gold));
}

.tile--alert b {
  color: var(--warn);
}

.tile a:hover {
  text-decoration: none;
}

.progress-note {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: linear-gradient(135deg, var(--tint-blue), #f7faff);
  border: 1px solid #cfdcf7;
  border-radius: var(--r-lg);
  padding: 1rem 1.1rem;
  font-size: 0.92rem;
  box-shadow: var(--e1);
}

.progress-ring {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--blue);
  font-size: 0.95rem;
  background: var(--paper);
  box-shadow:
    0 0 0 2px var(--blue) inset,
    var(--e1);
}

/* Numbered vertical timeline used for the joining journey. */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.timeline li {
  position: relative;
  padding: 0 0 1.4rem 2.1rem;
  border-left: 2px solid var(--line);
  margin-left: 0.55rem;
  counter-increment: step;
}

.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline li::before {
  content: counter(step);
  position: absolute;
  left: -12px;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line-2);
  color: var(--ink-3);
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.timeline li.is-done::before {
  content: "✓";
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.timeline li.is-current::before {
  background: var(--gold);
  border-color: var(--gold-600);
  color: var(--navy-900);
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.26);
}

.timeline__title {
  display: block;
  font-weight: 650;
  color: var(--navy);
  font-size: 0.96rem;
}

.timeline__meta {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.notif {
  display: flex;
  gap: 0.8rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.notif:last-child {
  border-bottom: 0;
}

.notif--unread {
  background: linear-gradient(90deg, var(--tint-blue), transparent 70%);
  margin: 0 -0.6rem;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  border-radius: var(--r-sm);
}

.notif__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 0.55rem;
  box-shadow: 0 0 0 3px rgba(0, 51, 160, 0.14);
}

.notif__body {
  min-width: 0;
  flex: 1;
}

.notif__subject {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.94rem;
}

.notif__text {
  font-size: 0.88rem;
  color: var(--ink-2);
}

.notif__time {
  font-size: 0.78rem;
  color: var(--ink-4);
  margin-top: 0.15rem;
}

/* ----------------------------------------------------------- admin shell -- */

.admin-bar {
  background: var(--navy-900);
  color: #fff;
}

.admin-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 54px;
}

.admin-bar__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
}

.admin-bar__title span {
  color: var(--gold);
  font-weight: 400;
}

.admin-bar a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.admin-bar a:hover {
  color: var(--gold);
}

.admin-nav {
  background: var(--navy);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--navy-900);
  position: sticky;
  top: 0;
  z-index: 30;
}

.admin-nav::-webkit-scrollbar {
  display: none;
}

.admin-nav ul {
  display: flex;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0 1.15rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.8rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 3px solid transparent;
}

.admin-nav a:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
}

.admin-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav .nav__count {
  background: var(--gold);
  color: var(--navy-900);
}

.queue-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 0.9rem;
  box-shadow: var(--e1);
}

.queue-item__head {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.queue-item__facts {
  display: grid;
  gap: 0.35rem;
  margin: 0.95rem 0;
  padding: 0.85rem 1rem;
  background: var(--paper-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--ink-2);
}

.queue-item__facts b {
  color: var(--navy);
  font-weight: 600;
}

.queue-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}

details.inline-form {
  margin-top: 0.6rem;
}

details.inline-form > summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  padding: 0.45rem 0;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

details.inline-form > summary::-webkit-details-marker {
  display: none;
}

details.inline-form > summary::before {
  content: "+";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tint-blue);
  border: 1px solid #cfdcf7;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}

details.inline-form[open] > summary::before {
  content: "−";
}

details.inline-form > div {
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-top: 0.45rem;
}

/* ---------------------------------------------------------------- footer -- */

.foot {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.74);
  padding: 3rem 0 1.6rem;
  font-size: 0.89rem;
  margin-top: 3rem;
  position: relative;
}

.foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--gold),
    var(--blue) 55%,
    var(--green)
  );
}

.foot h4 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.foot a {
  color: rgba(255, 255, 255, 0.74);
}

.foot a:hover {
  color: var(--gold);
}

.foot__grid {
  display: grid;
  gap: 2rem;
}

.foot__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.foot__base {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  display: grid;
  gap: 0.5rem;
}

.foot__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.foot__brand strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
}

/* ------------------------------------------------------------ breadcrumb -- */

.crumbs {
  font-size: 0.84rem;
  color: var(--ink-4);
  margin-bottom: 1.1rem;
}

.crumbs a {
  color: var(--ink-2);
  font-weight: 600;
}

.crumbs span {
  margin: 0 0.4rem;
  color: var(--line-2);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .75rem 1.1rem;
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.pager__info {
  font-size: .87rem;
  color: var(--ink-2);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.pager__info strong {
  color: var(--navy);
  font-weight: 650;
}

.pager__pages {
  display: flex;
  align-items: center;
  gap: .2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pager__page,
.pager__step {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 .5rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink-2);
  font-size: .87rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--e1);
}

.pager__page:hover,
.pager__step:hover {
  text-decoration: none;
  background: var(--paper-2);
  border-color: var(--ink-4);
  color: var(--navy);
}

.pager__page.is-current {
  background: linear-gradient(180deg, var(--blue), var(--navy));
  border-color: var(--navy);
  color: #fff;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255, 255, 255, .15);
}

.pager__step.is-off {
  opacity: .4;
  box-shadow: none;
  cursor: default;
}

.pager__gap {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 36px;
  color: var(--ink-4);
}

.pager__size {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  font-size: .82rem;
  color: var(--ink-3);
}

.pager__size-link {
  padding: .2rem .45rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  color: var(--ink-2);
}

.pager__size-link:hover {
  background: var(--paper-3);
  text-decoration: none;
}

.pager__size-link.is-current {
  background: var(--tint-blue);
  color: var(--blue);
}

/* On a narrow screen the numbered pages are dropped in favour of the arrows
   and the count, which is all that fits comfortably. */
@media (max-width: 519px) {
  .pager {
    justify-content: space-between;
  }

  .pager__pages li:not(:first-child):not(:last-child) {
    display: none;
  }
}

/* ================================ 560px ================================== */
@media (min-width: 560px) {
  .btn-row,
  .hero__actions,
  .filters__actions,
  .queue-actions,
  .nav__actions {
    grid-auto-flow: column;
    justify-content: start;
  }

  .form-actions {
    grid-auto-flow: column;
    justify-content: space-between;
  }

  .grid--2,
  .form-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .tiles {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero__stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .foot__base {
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }
}

/* ================================ 800px ================================== */
@media (min-width: 800px) {
  body {
    font-size: 16.5px;
  }

  main {
    padding: 2.5rem 0 5rem;
  }

  .main--bleed {
    padding-top: 0;
  }

  .wrap {
    padding: 0 1.6rem;
  }

  .hero {
    padding: 4.5rem 0 4.75rem;
  }

  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters__grid {
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
  }

  .filters__actions {
    grid-auto-flow: column;
    justify-content: end;
    margin-top: 0;
  }

  .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 2.2rem;
    align-items: start;
  }

  .split--wide {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .split__aside {
    position: sticky;
    top: calc(var(--nav-h) + 1.25rem);
  }

  .foot__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  .card {
    padding: 1.6rem;
  }

  .card__body {
    padding: 1.6rem;
  }
}

/* =============================== 1040px ================================== */
@media (min-width: 1040px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================== header: desktop row ========================== */
/* Width budget, measured rather than guessed. The body container is 1160px,
   which is too narrow for the signed-in menu, so the header gets its own
   wider container.

     brand (logo + rule + label) ~265px
     eight menu items            ~678px tight / ~758px roomy
     account chip                ~103px
     gaps                         ~44px
     ------------------------------------
     total                      ~1090px tight / ~1170px roomy
     available at 1200px         1149px   at 1400px: 1269px
   
   Below 1200px the menu button takes over. `overflow-x` on the list is the
   safety net: if the budget is ever exceeded the links scroll inside their
   own box rather than spilling across the account chip. */
@media (min-width: 1200px) {
  .masthead>.wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--nav-h);
    max-width: 1320px;
  }

  .masthead__bar {
    flex: none;
    min-height: 0;
    gap: 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex !important;
    flex: 1;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0;
    border-top: 0;
  }

  .nav__list {
    display: flex;
    flex-wrap: nowrap;
    gap: .05rem;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav__list::-webkit-scrollbar {
    display: none;
  }

  .nav__list a {
    position: relative;
    padding: .45rem .6rem;
    font-size: .855rem;
    white-space: nowrap;
    border-radius: var(--r-sm);
    color: var(--ink-2);
  }

  .nav__list a:hover {
    background: var(--paper-3);
    color: var(--navy);
  }

  /* The current page is marked with a gold rule, not a filled pill. */
  .nav__list a[aria-current="page"] {
    background: transparent;
    color: var(--navy);
    font-weight: 650;
  }

  .nav__list a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: .6rem;
    right: .6rem;
    bottom: -.1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
  }

  .nav__actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: .45rem;
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .nav__actions .btn {
    min-height: 38px;
    padding: .45rem .85rem;
    font-size: .85rem;
    white-space: nowrap;
  }

  /* The account menu hangs below the chip, anchored to its right edge. */
  .account__menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    z-index: 60;
  }
}

@media (min-width: 1400px) {
  .masthead>.wrap {
    gap: 1.75rem;
  }

  .nav__list a {
    padding: .45rem .75rem;
    font-size: .9rem;
  }

  .nav__list a[aria-current="page"]::after {
    left: .75rem;
    right: .75rem;
  }
}

/* On smaller screens the account controls sit inside the open menu panel as
   an ordinary block, rather than as a floating dropdown. */
@media (max-width: 1199px) {
  .account {
    width: 100%;
  }

  .account__trigger {
    width: 100%;
    justify-content: flex-start;
    padding: .6rem .8rem;
    min-height: 46px;
  }

  .account__caret {
    margin-left: auto;
  }

  .account__menu {
    position: static;
    width: auto;
    box-shadow: none;
    background: var(--paper-2);
  }
}

/* ----------------------------------------------------------------- print -- */
@media print {
  .masthead,
  .admin-nav,
  .admin-bar,
  .foot,
  .btn,
  .filters,
  .nav,
  .ribbon {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .card,
  .queue-item,
  .table-wrap,
  .person {
    box-shadow: none;
    border-color: #999;
    break-inside: avoid;
  }

  .hero {
    background: #fff;
    color: #000;
    padding: 0 0 1rem;
  }

  .hero h1,
  .hero__lead {
    color: #000;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .btn:hover,
  .card:hover,
  .person:hover,
  .tile:hover {
    transform: none;
  }
}

/* ------------------------------------------------------- feature panels -- */

/* The dark invitation panel used for "Help shape the network". */
.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 2rem 1.5rem;
  color: #fff;
  background:
    radial-gradient(
      640px 320px at 100% 0%,
      rgba(255, 215, 0, 0.16),
      transparent 60%
    ),
    linear-gradient(150deg, var(--navy-900), var(--navy) 55%, var(--blue));
  box-shadow: var(--e3);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.12) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
  mask-image: radial-gradient(80% 80% at 90% 10%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(
    80% 80% at 90% 10%,
    #000,
    transparent 75%
  );
}

.panel h2 {
  color: #fff;
  margin-bottom: 0.6rem;
}

.panel p {
  color: rgba(255, 255, 255, 0.86);
}

.panel .small {
  color: rgba(255, 255, 255, 0.64);
}

.panel .btn--outline {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.panel .btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Numbered "what the network offers" cards. */
.feature {
  position: relative;
  display: flex;
  flex-direction: column;
}

.feature .card__title {
  padding-right: 2.5rem;
}

.feature::after {
  content: attr(data-n);
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--paper-3);
  pointer-events: none;
}

.feature .card__foot {
  margin-top: auto;
}

/* A compact person row, for the mentor preview on the homepage. */
.mini-person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.mini-person__text {
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.35;
}

.mini-person__text strong {
  display: block;
  color: var(--navy);
  font-weight: 650;
}

/* A plain list that still reads as a list of links. */
.link-list {
  list-style: none;
  margin: 0.9rem 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.link-list li {
  font-size: 0.88rem;
  padding-left: 0.9rem;
  position: relative;
  line-height: 1.45;
}

.link-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-600);
}

@media (min-width: 800px) {
  .panel {
    padding: 2.75rem 2.5rem;
  }
}

/* ===========================================================================
   Homepage: hero slider, social rail, events band
   =========================================================================== */

.hero-slider {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--navy-900);

  /* Full screen, less the header above it, so the hero and the header
     together are exactly one viewport. svh is the small viewport height:
     it ignores mobile browser chrome that comes and goes while scrolling,
     which otherwise makes the hero jump. */
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
}

/* On the public pages an announcement ribbon sits above the header, so take
   that off the hero as well. The selector works because the ribbon, the
   header and main are siblings. */
.ribbon~main .hero-slider {
  min-height: calc(100vh - var(--nav-h) - 2.25rem);
  min-height: calc(100svh - var(--nav-h) - 2.25rem);
}

.hero-slider__stage {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s ease, transform 7s linear;
  will-change: opacity, transform;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* A slight overlay — enough for the text to hold, not so much that the
   photograph is lost. Darker at the left, where the type sits. */
.hero-slider__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 12, 56, .78) 0%, rgba(0, 12, 56, .55) 45%, rgba(0, 12, 56, .25) 100%),
    linear-gradient(180deg, rgba(0, 12, 56, .35) 0%, transparent 35%, rgba(0, 12, 56, .45) 100%);
}

.hero-slider__content {
  position: relative;
  width: 100%;
  padding: 3.5rem 0;
}

.hero-slider h1 {
  color: #fff;
  font-size: clamp(2.1rem, 1.3rem + 3.8vw, 3.5rem);
  letter-spacing: -.03em;
  margin-bottom: .75rem;
  max-width: 18ch;
  text-shadow: 0 2px 24px rgba(0, 10, 45, .45);
}

.hero-slider .hero__lead {
  max-width: 44ch;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 1px 14px rgba(0, 10, 45, .4);
}

.hero-slider .hero__eyebrow {
  backdrop-filter: blur(6px);
}

/* ---- the social rail: far left, vertically centred ---- */

.social-rail {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  flex-direction: column;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-rail__link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  /* White outline, nothing filled. */
  border: 1px solid rgba(255, 255, 255, .55);
  background: transparent;
  color: #fff;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.social-rail__link:hover,
.social-rail__link:focus-visible {
  background: rgba(255, 255, 255, .14);
  border-color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

/* The rail needs room beside the headline, so it only appears once there is
   space for it. Below that the links live in the footer, where they already
   are. */
@media (min-width: 900px) {
  .social-rail {
    display: flex;
    left: 1.5rem;
  }

  .hero-slider__content .wrap {
    padding-left: 5.5rem;
  }
}

@media (min-width: 1280px) {
  .social-rail {
    left: 2.25rem;
  }
}

/* ---- slider dots ---- */

.hero-slider__dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex;
  gap: .45rem;
}

.hero-slider__dot {
  width: 30px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: background .2s ease, width .2s ease;
}

.hero-slider__dot:hover {
  background: rgba(255, 255, 255, .6);
}

.hero-slider__dot.is-active {
  background: var(--gold);
  width: 44px;
}

@media (min-width: 900px) {
  .hero-slider__dots {
    left: auto;
    right: 2.25rem;
    transform: none;
  }
}

/* ---- the events band ---- */

.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding: 3.5rem 0;
  margin: 0;
}

.band__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}

.band__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 10, 45, .82), rgba(0, 10, 45, .72));
}

.band__inner {
  position: relative;
}

.band__head {
  margin-bottom: 1.75rem;
}

.band__eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .4rem;
}

.band h2 {
  color: #fff;
  margin: 0;
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem);
}

.band__empty {
  color: rgba(255, 255, 255, .8);
  max-width: 52ch;
  margin: 0 0 1.75rem;
}

.band__list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: .5rem;
}

.band__item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  backdrop-filter: blur(4px);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.band__item a:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .34);
  transform: translateX(3px);
}

.band__date {
  flex: none;
  width: 54px;
  text-align: center;
  line-height: 1.05;
}

.band__date b {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
}

.band__date span {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .7);
}

.band__text {
  min-width: 0;
}

.band__text strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.band__text span {
  font-size: .85rem;
  color: rgba(255, 255, 255, .72);
}

.band__cta {
  display: inline-flex;
}

@media (min-width: 800px) {
  .band {
    padding: 5rem 0;
  }

  .band__list {
    gap: .6rem;
  }
}

.section--projects {
  padding: 3.5rem 0 1rem;
  margin: 0;
}

.section--projects .section__head {
  border-top: 0;
  padding-top: 0;
}

.section--projects .section__head::before {
  display: none;
}

@media (prefers-reduced-motion: reduce) {

  .hero-slide,
  .hero-slide.is-active {
    transition: opacity .2s ease;
    transform: none;
  }
}
