/* =============================================================================
   DHS CS Club — design system + components
   Sections: 1 Fonts · 2 Tokens · 3 Base · 4 Layout · 5 Header/Nav · 6 Buttons &
   small UI · 7 Cards · 8 Hero · 9 Home · 10 Learn Java · 11 Slides ·
   12 Calendar · 13 Points · 14 Officers · 15 Contact · 16 Footer · 17 Modal,
   toast, setup · 18 Skeletons & states · 19 Motion · 20 Embed mode
   ========================================================================== */

/* 1 ─ Fonts (self-hosted, latin subset, variable weights) ------------------ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

/* 2 ─ Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Surfaces: deep navy (school navy, darkened for a dark UI) */
  --bg: #060a17;
  --bg-2: #081026;
  --surface: #0c1530;
  --surface-2: #111c3d;
  --surface-3: #17244d;
  --border: rgba(170, 190, 255, 0.08);
  --border-strong: rgba(170, 190, 255, 0.15);
  --glow-inset: 0 0 #0000;

  /* Text */
  --text: #eef1f8;
  --text-2: #bcc5dc;
  --muted: #8e9ab8;

  /* School colors. Navy = backgrounds and surfaces. Crimson = highlights.
   * Solid colors only: no gradients or glows. */
  --crimson: #c8102e;
  --navy: #13235b;
  --a1: #e8354f; /* light crimson: highlights, icons, dots */
  --a2: #d4213f; /* crimson */
  --a3: #bd1a3a; /* dark crimson */
  --grad: var(--a2); /* solid accent (kept as a token so it's easy to change) */
  --grad-btn: #c8102e;
  --link: #f5657c;
  --link-hover: #ffa3b2;
  --focus: #f5657c;

  /* Event types */
  --c-meeting: #f0506a;
  --c-contest: #fbbf24;
  --c-workshop: #7f9cff;
  --c-other: #94a3b8;
  --c-msa: #a78bfa;
  --c-school: #fb923c;

  /* Status */
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;

  /* Type */
  --font-head: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --fs-h1: clamp(2.6rem, 1.55rem + 4.6vw, 5.25rem);
  --fs-page-h1: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);

  /* Spacing scale (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section-y: clamp(3rem, 2.4rem + 3vw, 5.5rem);

  /* Shape + motion */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.35s;

  --container: 1200px;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --header-h: 64px;
}

/* 3 ─ Base ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main {
  flex: 1;
  display: block;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
}
:where(ul[role='list'], ol[role='list']) {
  list-style: none;
  margin: 0;
  padding: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
code,
kbd,
.mono {
  font-family: var(--font-mono);
}
code {
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
::selection {
  background: rgba(214, 41, 77, 0.45);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 1000;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: #fff;
  color: #060a17;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--s-3);
}
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}
.grad-text {
  color: var(--a1);
}
.prose a,
.text-link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 157, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.prose a:hover,
.text-link:hover {
  text-decoration-color: currentColor;
}

/* 4 ─ Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
  margin-bottom: var(--s-6);
}
.section-title {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  margin-bottom: var(--s-6);
}
.section-head .section-title {
  margin-bottom: 0;
}
.section--last {
  padding-bottom: var(--section-y);
}
.section-head__text {
  max-width: 44rem;
}
.section-head h2 {
  font-size: var(--fs-h2);
}
.section-head p:not(.eyebrow) {
  margin-top: var(--s-4);
  color: var(--text-2);
  font-size: var(--fs-lg);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b7c2de;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.lead {
  font-size: var(--fs-lg);
  color: var(--text-2);
  max-width: 40rem;
}
.stack > * + * {
  margin-top: var(--s-4);
}

/* 5 ─ Header / Nav ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(6, 10, 23, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur), background var(--dur);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(6, 10, 23, 0.78);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin-right: auto;
}
.brand__mark {
  width: 34px;
  height: 34px;
}
.nav-links {
  position: relative;
  display: none;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--text);
}
.nav-links a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  border-radius: 2px;
  background: var(--grad);
}
.nav-pill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 36px;
  margin-top: -18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
}
.nav-pill.is-ready {
  transition:
    transform 0.35s var(--ease),
    width 0.35s var(--ease),
    opacity 0.2s;
}
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.nav-toggle .icon {
  width: 22px;
  height: 22px;
}
.nav-toggle[aria-expanded='true'] .icon-menu,
.nav-toggle[aria-expanded='false'] .icon-close {
  display: none;
}
.nav-drawer {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: rgba(4, 7, 18, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in 0.25s var(--ease);
}
.nav-drawer__panel {
  margin-left: auto;
  width: min(100%, 380px);
  height: 100%;
  overflow-y: auto;
  padding: var(--s-5) var(--gutter) var(--s-7);
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  animation: slide-in 0.35s var(--ease);
}
.nav-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-drawer li + li {
  border-top: 1px solid var(--border);
}
.nav-drawer a:not(.btn) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-2);
}
.nav-drawer a[aria-current='page'] {
  color: var(--text);
}
.nav-drawer a[aria-current='page']::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}
body.drawer-open {
  overflow: hidden;
}
@media (min-width: 60em) {
  .nav-links {
    display: flex;
  }
  .nav-toggle,
  .nav-drawer {
    display: none !important;
  }
}

/* 6 ─ Buttons & small UI ------------------------------------------------------ */
.btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: var(--btn-h);
  padding: 0 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.btn .icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.25s var(--ease);
}
.btn:hover .icon:last-child {
  transform: translateX(2px);
}
.btn--primary {
  color: #fff;
  background: var(--grad-btn);
}
.btn--primary:hover {
  background: #a50e27;
}
.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}
.btn--sm {
  --btn-h: 44px;
  padding: 0 1rem;
  font-size: var(--fs-sm);
}
.btn--lg {
  --btn-h: 56px;
  padding: 0 1.75rem;
  font-size: var(--fs-md);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}
.icon-btn .icon {
  width: 20px;
  height: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}
.badge--accent {
  color: #fff;
  background: var(--grad-btn);
}
.badge--muted {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.badge--demo {
  color: #1a1204;
  background: var(--warn);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tag {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
/* Announcement bar (config.ANNOUNCEMENTS) */
.announce {
  background: #c8102e;
  color: #fff;
  font-size: var(--fs-sm);
}
.announce__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2) var(--s-4);
  padding-block: 0.6rem;
  text-align: center;
}
.announce p {
  margin: 0;
  font-weight: 500;
}
.announce__link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.announce__link:hover {
  text-decoration-thickness: 2px;
}
.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px dashed rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.06);
  color: #f5dfa6;
  font-size: var(--fs-sm);
}
.msa-detail {
  display: block;
  margin: var(--s-2) 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  overflow-wrap: anywhere;
}
.demo-banner--info {
  border-style: solid;
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
}
.demo-banner--info strong {
  color: var(--text);
}
.demo-banner--info .icon {
  color: var(--a1);
}
.demo-banner .icon {
  color: var(--warn);
  margin-top: 2px;
}
.input,
.select {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.input::placeholder {
  color: #7f8aa8;
}
.input:focus,
.select:focus {
  outline: none;
  border-color: rgba(255, 79, 106, 0.7);
}
.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9bfd0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 16px;
  cursor: pointer;
}
.select option {
  background: var(--surface-2);
}
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 38px;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.segmented button[aria-selected='true'],
.segmented button[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: var(--glow-inset);
}
.chip {
  min-height: 38px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}
.chip[aria-pressed='true'] {
  color: #fff;
  border-color: transparent;
  background: var(--grad-btn);
}

/* 7 ─ Cards ----------------------------------------------------------------- */
.card {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--glow-inset);
}
.card--pad {
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}
.card--hover {
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur),
    box-shadow var(--dur) var(--ease);
}
.card--hover:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #ffd3da;
  background: rgba(212, 33, 63, 0.12);
  border: 1px solid rgba(140, 160, 255, 0.25);
}
.icon-tile .icon {
  width: 24px;
  height: 24px;
}

/* 8 ─ Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 6vw, 7.5rem) clamp(3rem, 2rem + 4vw, 6rem);
}
.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero__lead {
  margin-top: var(--s-5);
  font-size: var(--fs-lg);
  color: var(--text-2);
  max-width: 36rem;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
@media (min-width: 62em) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

/* Sub-page hero */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
}
.page-hero h1 {
  font-size: var(--fs-page-h1);
  letter-spacing: -0.02em;
}
.page-hero .lead {
  margin-top: var(--s-4);
}

/* Page-header photo */
.page-hero__grid {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  align-items: center;
}
.hero-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 70%, rgba(6, 10, 23, 0.35));
}
@media (max-width: 55.99em) {
  .hero-photo {
    max-height: 18rem;
  }
}
@media (min-width: 56em) {
  .page-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
  .hero-photo {
    aspect-ratio: 3 / 2;
  }
}

/* 9 ─ Home ------------------------------------------------------------------ */
.features {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  overflow: hidden;
}
.feature h3 {
  font-size: var(--fs-h3);
}
.feature p {
  color: var(--text-2);
}
.upcoming {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  overflow: hidden;
}
.upcoming::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad);
}
.upcoming__label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}
.upcoming__title {
  margin-top: var(--s-2);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
}
.upcoming__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-3);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.upcoming__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.upcoming__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}
@media (min-width: 56em) {
  .upcoming {
    grid-template-columns: minmax(0, 1.4fr) auto auto;
  }
}
.countdown {
  display: flex;
  gap: var(--s-2);
}
.countdown > div {
  min-width: 3.6rem;
  padding: 0.55rem 0.4rem;
  border-radius: var(--r-sm);
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.countdown__num {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.roll-group {
  display: inline-flex;
}
/* One digit window: shows a single row of its 0–9 strip. */
.roll {
  display: inline-block;
  height: 1.1em;
  overflow: hidden;
}
.roll__strip {
  display: flex;
  flex-direction: column;
  transition: transform 0.45s var(--ease);
}
.roll__strip > span {
  height: 1.1em;
  line-height: 1.1;
}
.roll__strip.no-anim {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .roll__strip {
    transition: none;
  }
}
.countdown small {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.gallery {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
}
.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.gallery figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 10, 23, 0.75));
  pointer-events: none;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.gallery figure:hover img {
  transform: scale(1.04);
}
.gallery figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  font-size: var(--fs-sm);
  color: #e6e9f2;
}
.gallery .is-wide {
  grid-column: span 2;
}
.gallery .is-tall {
  grid-row: span 2;
}
@media (min-width: 48em) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
  }
}

/* 10 ─ Learn Java ------------------------------------------------------------- */
.resource-groups {
  display: grid;
  gap: var(--s-6);
}
.resource-group h2 {
  margin-bottom: var(--s-4);
  font-size: var(--fs-h3);
}
.resources {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.resource {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--s-4) var(--s-5);
  text-decoration: none;
}
.resource__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.resource__title .icon {
  width: 0.95em;
  height: 0.95em;
  color: var(--muted);
  transition: transform 0.25s var(--ease), color 0.2s;
}
.resource:hover .resource__title .icon {
  transform: translate(2px, -2px);
  color: var(--text);
}
.resource__desc {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.resource__host {
  display: block;
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.tip {
  color: var(--text-2);
}
.tip strong {
  color: var(--text);
}

/* 11 ─ Slides ----------------------------------------------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-6);
}
.toolbar__search {
  flex: 1 1 18rem;
}
.toolbar__chips {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  flex-basis: 100%;
}
.toolbar .select {
  width: auto;
  min-width: 11rem;
}
.search-field {
  position: relative;
}
.search-field > .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  color: var(--muted);
  pointer-events: none;
}
.search-field .input {
  padding-left: 2.75rem;
}
.result-count {
  min-height: 1.6em;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.slide-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.slide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--glow-inset);
  transition:
    transform 0.4s var(--ease),
    border-color var(--dur),
    box-shadow var(--dur) var(--ease);
}
.slide-card:not(.slide-card--skeleton):hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.slide-card__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.slide-card__cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.slide-card--open:hover .slide-card__cover > img,
.slide-card--open:hover .gen-cover {
  transform: scale(1.035);
}
.slide-card--upcoming .slide-card__cover > *:first-child,
.slide-card--pending .slide-card__cover > *:first-child {
  filter: saturate(0.35) brightness(0.55);
}
.slide-card__lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  color: #e3e7f3;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: center;
  background: rgba(6, 10, 23, 0.25);
}
.slide-card__lock .icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  background: rgba(6, 10, 23, 0.65);
  border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.slide-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--s-5);
}
.slide-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.slide-card__meta time {
  margin-right: auto;
  letter-spacing: 0.04em;
}
.slide-card__title {
  margin-top: var(--s-3);
  font-size: 1.2rem;
  line-height: 1.2;
}
.slide-card__desc {
  margin-top: var(--s-2);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.slide-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: auto;
  padding-top: var(--s-5);
}
.slide-card--upcoming .slide-card__title,
.slide-card--pending .slide-card__title {
  color: #d3d8e6;
}
/* Generated covers (used when a slide has no coverImage) */
.gen-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  transition: transform 0.8s var(--ease);
}
.gen-cover__num {
  font-size: clamp(3.5rem, 3rem + 2vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(232, 53, 79, 0.45);
}

/* 12 ─ Calendar --------------------------------------------------------------- */
.next-card {
  min-height: 18.75rem; /* matches the loaded card on phones: no layout shift */
}
.next-card__main {
  flex: 1;
  min-width: 14rem;
}
.legend--card {
  margin-top: var(--s-4);
}
.demo-banner--spaced {
  margin-bottom: var(--s-5);
}
.cal-skeleton {
  height: 30rem;
}
@media (min-width: 48em) {
  .cal-skeleton {
    height: 47rem;
  }
  .next-card {
    min-height: 10.5rem;
  }
}
.cal-top {
  display: grid;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
@media (min-width: 56em) {
  .cal-top {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}
.next-card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}
.next-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad);
}
.next-card h2 {
  margin-top: var(--s-2);
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.7rem);
}
.next-card__when {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--type-color);
}
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.cal-toolbar h2 {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  min-width: 11ch;
  margin-right: auto;
}
.cal-toolbar__nav {
  display: flex;
  gap: var(--s-2);
}
.cal-toolbar__nav .icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.cal-shell {
  position: relative;
  padding: var(--s-2);
}
.month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
}
.month__dow {
  padding: var(--s-2) var(--s-3);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.day {
  position: relative;
  min-height: 7.25rem;
  padding: var(--s-2);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.day--out {
  background: #0a1128;
}
.day--out .day__num {
  color: #7d88a6;
}
.day__num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.day--today {
  background: rgba(212, 33, 63, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 79, 106, 0.5);
}
.day--today .day__num {
  color: #fff;
  background: var(--grad-btn);
}
.pill {
  --type-color: var(--c-other);
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 24px;
  padding: 2px 7px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--type-color) 16%, transparent);
  color: color-mix(in srgb, var(--type-color) 55%, #fff);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s;
}
.pill:hover {
  background: color-mix(in srgb, var(--type-color) 28%, transparent);
}
.pill span:not(.sr-only) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill time {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.85;
}
.pill::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--type-color);
}
.pill--allday {
  background: color-mix(in srgb, var(--type-color) 30%, transparent);
  color: #fff;
}
.pill--cont-l {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.pill--cont-r {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.more-btn {
  align-self: flex-start;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.more-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
[data-type='meeting'] {
  --type-color: var(--c-meeting);
}
[data-type='contest'] {
  --type-color: var(--c-contest);
}
[data-type='workshop'] {
  --type-color: var(--c-workshop);
}
[data-type='other'] {
  --type-color: var(--c-other);
}
[data-type='msa'] {
  --type-color: var(--c-msa);
}
[data-type='school'] {
  --type-color: var(--c-school);
}
.agenda {
  display: grid;
  gap: var(--s-5);
}
.agenda--pad {
  padding: var(--s-4);
}
.agenda__day {
  display: grid;
  gap: var(--s-3);
}
@media (min-width: 40em) {
  .agenda__day {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }
}
.agenda__date {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  padding-top: var(--s-3);
}
.agenda__date b {
  font-family: var(--font-head);
  font-size: 1.8rem;
  line-height: 1;
}
.agenda__date span {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.agenda__date--today b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.agenda__list {
  display: grid;
  gap: var(--s-2);
}
.agenda-item {
  --type-color: var(--c-other);
  display: flex;
  width: 100%;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  border-left: 3px solid var(--type-color);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.25s var(--ease),
    border-color 0.2s;
}
.agenda-item:hover {
  background: var(--surface-2);
  transform: translateX(3px);
}
.agenda-item__time {
  flex: none;
  width: 5.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.agenda-item__main {
  flex: 1;
  min-width: 0;
}
.agenda-item__title {
  display: block;
  font-weight: 600;
}
.agenda-item__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--s-3);
  margin-top: 2px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.agenda-item__type {
  color: color-mix(in srgb, var(--type-color) 70%, #fff);
}
.agenda-item > .icon {
  color: var(--muted);
}
@media (max-width: 47.99em) {
  .day {
    min-height: 4.5rem;
    padding: 4px;
  }
  .pill {
    min-height: 8px;
    padding: 0;
    font-size: 0;
    border-radius: 4px;
    background: var(--type-color);
  }
  .pill::before,
  .pill time {
    display: none;
  }
  .more-btn {
    font-size: 0.65rem;
    padding: 0 2px;
  }
  .month__dow {
    padding: var(--s-2) 4px;
    text-align: center;
    font-size: 0.62rem;
  }
  .day__num {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
}

/* 13 ─ Points ----------------------------------------------------------------- */
.points-search {
  position: relative;
  max-width: 44rem;
  margin-inline: auto;
}
.points-search .search-field .input {
  min-height: 64px;
  padding-left: 3.4rem;
  border-radius: var(--r-lg);
  font-size: var(--fs-md);
  background: rgba(12, 21, 48, 0.9);
}
.points-search .search-field > .icon {
  left: 1.25rem;
  width: 22px;
  height: 22px;
  margin-top: -11px;
}
.search-kbd {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  pointer-events: none;
}
.listbox {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  max-height: 22rem;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: rgba(17, 28, 61, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
}
.listbox li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 48px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.listbox li[aria-selected='true'],
.listbox li:hover {
  background: rgba(212, 33, 63, 0.16);
}
.listbox mark {
  background: none;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--a1);
  text-underline-offset: 3px;
}
.listbox .li-main {
  flex: 1;
  min-width: 0;
}
.listbox .li-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.listbox__empty {
  cursor: default !important;
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.listbox__empty:hover {
  background: none !important;
}
.avatar {
  --av: 44px;
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--av);
  height: var(--av);
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: calc(var(--av) * 0.36);
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--av-bg);
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar--sm {
  --av: 34px;
}
.avatar--h0 {
  --av-bg: #b3122f;
}
.avatar--h1 {
  --av-bg: #c8102e;
}
.avatar--h2 {
  --av-bg: #9f0f29;
}
.avatar--h3 {
  --av-bg: #a3142f;
}
.avatar--h4 {
  --av-bg: #8e0e26;
}
.avatar--h5 {
  --av-bg: #b8163a;
}
.result {
  margin: var(--s-6) auto 0;
  max-width: 56rem;
  overflow: hidden;
}
.result::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
}
.result__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.result__who {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
}
.result__who .avatar {
  --av: 72px;
}
.result__name {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  word-break: break-word;
}
.result__rank {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.result__rank .badge {
  font-size: 0.72rem;
}
.result__total {
  text-align: right;
  margin-left: auto;
}
.result__total-num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 2.4rem + 3.5vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result__total-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.breakdown {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.metric {
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}
.metric__head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.metric__head .icon {
  color: var(--metric-color);
}
.metric__value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--s-2);
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.metric__value small {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--muted);
}
.bar {
  height: 8px;
  margin-top: var(--s-3);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--metric-bar);
  transition: width 1s var(--ease);
}
.metric--meetings {
  --metric-color: var(--a1);
  --metric-bar: var(--a2);
}
.metric--problems {
  --metric-color: var(--a1);
  --metric-bar: var(--a2);
}
.metric--contests {
  --metric-color: var(--a1);
  --metric-bar: var(--a2);
}
.result__next {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.result__next .icon {
  color: var(--a3);
}
.no-results {
  margin: var(--s-6) auto 0;
  max-width: 44rem;
  text-align: center;
}
.no-results p {
  color: var(--text-2);
}
.no-results__suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-5);
}
.board-head h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
  margin-right: auto;
}
.updated {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.updated .live-dot {
  width: 6px;
  height: 6px;
}
.is-spinning .icon {
  animation: spin 0.8s linear infinite;
}
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  align-items: end;
  margin-bottom: var(--s-6);
}
.podium__spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-3);
  text-align: center;
  min-width: 0;
}
.podium__spot .avatar {
  --av: 56px;
}
.podium__spot--1 {
  order: 2;
  padding-block: var(--s-7) var(--s-6);
  border-color: rgba(251, 191, 36, 0.35);
  background: var(--surface);
}
.podium__spot--1 .avatar {
  --av: 72px;
}
.podium__spot--2 {
  order: 1;
}
.podium__spot--3 {
  order: 3;
}
.podium__medal {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: #111;
}
.podium__spot--1 .podium__medal {
  background: #f5c542;
}
.podium__spot--2 .podium__medal {
  background: #cbd2dc;
}
.podium__spot--3 .podium__medal {
  background: #d08a4c;
}
.podium__name {
  max-width: 100%;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium__pts {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.table-wrap {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  /* clip (not hidden) so the sticky header still sticks to the page */
  overflow: clip;
}
.board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.board thead th {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  padding: 0;
  background: rgba(17, 28, 61, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
}
.board thead th button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--s-4);
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.board thead th button:hover,
.board thead th[aria-sort] button {
  color: var(--text);
}
.board thead th button .icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}
.board thead th[aria-sort] button .icon {
  opacity: 1;
  color: var(--a1);
}
.board .num {
  text-align: right;
}
.board th.num button {
  justify-content: flex-end;
}
.board td {
  padding: 0.75rem var(--s-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.board tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.018);
}
.board tbody tr:hover td {
  background: rgba(40, 70, 180, 0.06);
}
.board tbody tr.is-me td {
  background: rgba(212, 33, 63, 0.14);
}
.board tbody tr.is-me td:first-child {
  box-shadow: inset 3px 0 0 var(--a1);
}
.board .rank {
  width: 4.5rem;
  font-family: var(--font-mono);
  color: var(--muted);
}
.who-btn {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.who-btn:hover .who__name {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}
.who__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.who__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who__sub {
  display: none;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--muted);
}
.board .total {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.pager__btns {
  display: flex;
  gap: var(--s-2);
}
.pager .icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
/* Mobile: the table collapses into compact cards (rank · name + breakdown · total). */
@media (max-width: 47.99em) {
  .board thead th:not(:first-child):not(:nth-child(2)):not(:last-child),
  .board td.cat {
    display: none;
  }
  .board thead th button {
    padding: 0 var(--s-3);
  }
  .board td {
    padding: 0.7rem var(--s-3);
  }
  .board .rank {
    width: 3.2rem;
  }
  .who__sub {
    display: block;
  }
  .podium {
    gap: var(--s-2);
  }
  .podium__spot {
    padding: var(--s-4) var(--s-2);
  }
  .podium__spot .avatar {
    --av: 44px;
  }
  .podium__spot--1 .avatar {
    --av: 56px;
  }
  .podium__name {
    font-size: var(--fs-sm);
  }
}
.explainer {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.explainer .metric__value {
  font-size: 1.6rem;
}
.explainer .metric__value span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.soon-notice {
  margin: 0;
  font-size: var(--fs-base);
}
.soon-notice strong {
  color: #fde7a8;
}
.goal-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-7);
  overflow: hidden;
}
.goal-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad);
}
.goal-card__num {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 2.8rem + 3vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.goal-card__num small {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.goal-card h3 {
  font-size: var(--fs-h3);
}
.goal-card p {
  margin-top: var(--s-2);
  color: var(--text-2);
  max-width: 34rem;
}
.rules-title {
  margin: var(--s-7) 0 var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.rules {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}
.rule {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-2) var(--s-4);
  align-items: start;
  padding: var(--s-5);
}
.rule h4 {
  font-size: 1.05rem;
}
.rule p {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.rule__pts {
  grid-column: 2;
  justify-self: start;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: #ffc9d2;
  background: rgba(212, 33, 63, 0.12);
  border: 1px solid rgba(232, 53, 79, 0.3);
}
.privacy-note {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  margin-top: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* 14 ─ Officers --------------------------------------------------------------- */
.officers {
  display: grid;
  gap: var(--s-7) var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
}
.officer-group--featured {
  grid-column: 1 / -1;
}
.officer-group__title {
  margin-bottom: var(--s-4);
}
.officer-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.officer {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--glow-inset);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur);
}
.officer:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.officer .avatar {
  --av: 60px;
}
.officer__name {
  font-size: 1.15rem;
}
.officer__role {
  margin-top: 4px;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.officer-grid--featured {
  grid-template-columns: 1fr;
}
.officer--featured {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  text-align: center;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) var(--s-5);
  border-color: rgba(140, 160, 255, 0.3);
  background: var(--surface);
}
.officer--featured::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
}
.officer--featured .avatar {
  --av: 112px;
}
.officer--featured .officer__name {
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
}
.officer--featured .officer__role {
  font-size: var(--fs-sm);
  color: #ff9fb0;
}
@media (min-width: 48em) {
  .officer-grid.officer-grid--featured {
    max-width: 34rem;
    margin-inline: auto;
  }
  .officer-group--featured .officer-group__title {
    display: flex;
    justify-content: center;
  }
}
.sponsors-block {
  margin-top: var(--s-8);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--r-xl);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.015);
}
.sponsors-block h2 {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem);
}
.sponsors-block > p {
  margin-top: var(--s-2);
  color: var(--text-2);
}
.sponsor-grid {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.sponsor {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.sponsor .avatar {
  --av: 56px;
  border-radius: 16px;
}
.sponsor__name {
  font-size: 1.15rem;
}
.sponsor__role {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.sponsor__room {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: #ffc9d2;
  background: rgba(212, 33, 63, 0.12);
  border: 1px solid rgba(232, 53, 79, 0.3);
}

/* 15 ─ Contact ---------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 56em) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}
.email-card {
  overflow: hidden;
}
.email-card h2 {
  font-size: var(--fs-h3);
}
.email-card .lead {
  margin-top: var(--s-3);
}
.email-card .contact-actions {
  margin-top: var(--s-5);
}
.copy-email {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-4);
  width: 100%;
  margin-top: var(--s-5);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  border: 1px solid rgba(140, 160, 255, 0.3);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s,
    transform 0.25s var(--ease),
    box-shadow 0.25s;
}
.copy-email:hover {
  border-color: rgba(255, 79, 106, 0.6);
  transform: translateY(-2px);
}
.copy-email__addr {
  min-width: 0;
  font-family: var(--font-head);
  font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.25rem);
  font-weight: 700;
}
.copy-email__hint {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #fff;
  background: var(--grad-btn);
}
.copy-email.is-copied .copy-email__hint {
  background: #0f7a55;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-4);
}
.info-list {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-4);
}

.info-list b {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot-list > :not([hidden]) ~ :not([hidden])::before {
  content: ' · ';
  color: var(--muted);
}
.stack-sm {
  display: grid;
  gap: 2px;
}
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* 16 ─ Footer ----------------------------------------------------------------- */
.site-footer {
  margin-top: var(--s-8);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__grid {
  display: grid;
  gap: var(--s-6);
  padding-block: var(--s-7);
}
@media (min-width: 48em) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer__about p {
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: var(--fs-sm);
  max-width: 24rem;
}
.footer__title {
  margin-bottom: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px var(--s-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__links a,
.footer__contact a:not(.icon-btn) {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 36px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__links a:hover,
.footer__contact a:not(.icon-btn):hover {
  color: var(--text);
}
.footer__contact {
  display: grid;
  gap: var(--s-2);
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  padding-block: var(--s-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer__bottom .mono {
  letter-spacing: 0.04em;
}

/* 17 ─ Modal, toast, setup panel ---------------------------------------------- */
.modal {
  --modal-accent: var(--a1);
  width: min(100% - 2rem, 34rem);
  max-height: min(100% - 2rem, 44rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: pop-in 0.3s var(--ease);
}
.modal::backdrop {
  background: rgba(3, 6, 15, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal__inner {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
}
.modal__inner::before {
  content: '';
  position: sticky;
  top: 0;
  display: block;
  height: 3px;
  background: var(--modal-accent);
}
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-5) 0;
}
.modal__eyebrow {
  margin-bottom: 6px;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--modal-accent) 70%, #fff);
}
.modal__title {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
}
.modal__body {
  padding: var(--s-5);
}
.facts {
  display: grid;
  gap: 4px;
  margin: var(--s-2) 0 0;
  padding-left: 1.1rem;
  color: var(--text-2);
}
.facts li::marker {
  color: var(--a1);
}
.event-detail__desc {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.event-detail__desc ul,
.event-detail__desc ol {
  padding-left: 1.2rem;
}
.event-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.day-list {
  display: grid;
  gap: var(--s-2);
}
body.modal-open {
  overflow: hidden;
}
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  display: grid;
  gap: var(--s-2);
  width: min(100% - 2rem, 28rem);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: rgba(23, 36, 77, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
  font-size: var(--fs-sm);
  animation: toast-in 0.35s var(--ease);
}
.toast--success .icon {
  color: var(--ok);
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s var(--ease);
}
.setup-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  width: min(100% - 2rem, 22rem);
  max-height: 70vh;
  overflow-y: auto;
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: #171108;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.9);
  font-size: var(--fs-sm);
}
.setup-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.setup-panel p {
  margin: var(--s-2) 0;
  color: var(--text-2);
}
.setup-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.setup-panel li {
  display: flex;
  gap: var(--s-2);
  color: #f5dfa6;
}
.setup-panel li.is-done {
  color: var(--muted);
  text-decoration: line-through;
}

/* 18 ─ Skeletons & states ----------------------------------------------------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.4s infinite;
}
.skeleton--line {
  height: 12px;
  margin-top: 12px;
  border-radius: 6px;
}
.skeleton--line.h-lg {
  height: 20px;
}
.skeleton--block {
  border-radius: var(--r-md);
}
.w-30 {
  width: 30%;
}
.w-40 {
  width: 40%;
}
.w-80 {
  width: 80%;
}
.w-100 {
  width: 100%;
}
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  padding: clamp(2.5rem, 2rem + 3vw, 4rem) var(--s-5);
  text-align: center;
  color: var(--text-2);
}
.state > .icon {
  width: 52px;
  height: 52px;
  padding: 13px;
  border-radius: 16px;
  color: #dbe3ff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
}
.state--error > .icon {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.35);
}
.state h3 {
  color: var(--text);
  font-size: 1.2rem;
}
.state p {
  max-width: 30rem;
}
.state .btn {
  margin-top: var(--s-2);
}
.state--full {
  grid-column: 1 / -1;
}

/* 19 ─ Motion ------------------------------------------------------------------ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.7s var(--ease) var(--reveal-delay, 0ms),
    transform 0.7s var(--ease) var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes slide-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .slide-card {
    transform: none !important;
  }
}

/* 20 ─ Embed mode (inside an iframe, e.g. Weebly) ------------------------------ */
.is-embedded body {
  min-height: 0;
}
.is-embedded .site-header {
  position: relative;
}
.is-embedded .nav-drawer {
  position: absolute;
  inset: auto 0 auto 0;
  top: calc(var(--vp-top, 0px) + var(--header-h));
  height: calc(var(--vp-height, 100vh) - var(--header-h));
  min-height: 70vh;
}
.is-embedded .modal {
  position: absolute;
  top: calc(var(--vp-top, 0px) + 1rem);
  margin: 0 auto;
  max-height: calc(var(--vp-height, 100vh) - 2rem);
}
.is-embedded .board thead th {
  top: 0;
}
.is-embedded .toast-region {
  position: absolute;
  bottom: auto;
  top: calc(var(--vp-top, 0px) + var(--vp-height, 100vh) - 90px);
}
.is-embedded .setup-panel {
  position: absolute;
  bottom: auto;
  top: calc(var(--vp-top, 0px) + 16px);
}
.no-chrome .skip-link,
.no-chrome .site-header,
.no-chrome .nav-drawer,
.no-chrome .site-footer {
  display: none !important;
}
