:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #e8e8e8;
  --text: #161616;
  --muted: #525252;
  --border: #d4d4d4;
  --accent: #0f62fe;
  --accent-hover: #0043ce;
  --accent-text: #ffffff;
  --accent-soft: #e5edff;
  --green: #198038;
  --term-bg: #0b0f14;
  --term-text: #a6f0b8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-2: #21262d;
    --text: #f2f4f8;
    --muted: #a8b0bb;
    --border: #30363d;
    --accent: #4589ff;
    --accent-hover: #78a9ff;
    --accent-text: #0d1117;
    --accent-soft: #10213f;
    --green: #42be65;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #21262d;
  --text: #f2f4f8;
  --muted: #a8b0bb;
  --border: #30363d;
  --accent: #4589ff;
  --accent-hover: #78a9ff;
  --accent-text: #0d1117;
  --accent-soft: #10213f;
  --green: #42be65;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
code, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }

[hidden] { display: none !important; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 6px; background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 600;
}
.nav-links { display: none; margin-left: auto; gap: 24px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-actions { margin-left: 8px; }
  .menu-btn { display: none; }
}
/* The club page has eight links: keep the menu button until they fit on one row. */
@media (min-width: 900px) and (max-width: 1239px) {
  .nav-links.nav-long { display: none; }
  .nav:has(.nav-long) .menu-btn { display: grid; }
}
@media (min-width: 1240px) { .nav-links.nav-long { gap: 20px; } }
.icon-btn {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { border-color: var(--muted); }
.mobile-menu { border-top: 1px solid var(--border); padding: 8px 0 16px; }
.mobile-menu a { display: block; padding: 10px 0; color: var(--text); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-lg { padding: 15px 26px; font-size: 17px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Sections ────────────────────────────────────── */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }
.eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px;
}
h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 16px; }
h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 640px; margin: 20px 0 32px; }
.section-intro { color: var(--muted); max-width: 640px; margin: 0 0 40px; }

/* ── Hero ────────────────────────────────────────── */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 500; margin-bottom: 24px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.terminal {
  background: var(--term-bg); color: var(--term-text); border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: "IBM Plex Mono", monospace; font-size: 14px; line-height: 1.7; overflow: hidden;
}
.terminal-bar { display: flex; gap: 6px; padding: 12px 14px; background: #161b22; }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #30363d; }
.terminal pre { margin: 0; padding: 18px 20px 22px; white-space: pre-wrap; word-break: break-word; }
.terminal .c { color: #6e7681; }
.terminal .k { color: #78a9ff; }
.terminal .ok { color: #42be65; }
.cursor { display: inline-block; width: 8px; height: 1em; background: var(--term-text); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } html { scroll-behavior: auto; } }

/* ── Cards / grids ───────────────────────────────── */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card-icon {
  width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px; font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 14px;
}

/* ── Path (learning steps) ───────────────────────── */
.path { display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 900px) { .path { grid-template-columns: repeat(3, 1fr); } }
.path .card { position: relative; }
.path .level { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--accent); margin-bottom: 8px; display: block; }

/* ── Steps (referral) ────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.steps li {
  counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.steps li::before {
  content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-weight: 600; font-family: "IBM Plex Mono", monospace;
}
.steps h3 { font-size: 18px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* ── Events ──────────────────────────────────────── */
.events { display: grid; gap: 16px; }
.event {
  display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.event-date {
  text-align: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); padding: 8px 0;
  font-family: "IBM Plex Mono", monospace; line-height: 1.2;
}
.event-date .d { display: block; font-size: 26px; font-weight: 600; }
.event-date .m { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.event h3 { font-size: 18px; margin-bottom: 2px; }
.event .meta { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.event p { margin: 0; color: var(--muted); font-size: 16px; }
.event.past { opacity: 0.55; }
.event .tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-left: 8px; vertical-align: 2px; }
.empty { color: var(--muted); }

/* ── Team ────────────────────────────────────────── */
.member { text-align: left; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); color: var(--text);
  display: grid; place-items: center; font-weight: 600; margin-bottom: 14px; font-family: "IBM Plex Mono", monospace;
}
.member h3 { font-size: 17px; margin-bottom: 2px; }
.member p { font-size: 15px; }
.member a { font-size: 14px; display: inline-block; margin-top: 8px; }

/* ── FAQ ─────────────────────────────────────────── */
.faq { display: grid; gap: 12px; max-width: 820px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px; }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: "IBM Plex Mono", monospace; color: var(--accent); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 18px; color: var(--muted); }

/* ── CTA band ────────────────────────────────────── */
.cta {
  background: var(--accent); color: var(--accent-text); border-radius: 16px; padding: 48px 32px;
  display: grid; gap: 24px; align-items: center;
}
@media (min-width: 860px) { .cta { grid-template-columns: 1fr auto; padding: 56px; } }
.cta h2 { margin: 0 0 8px; }
.cta p { margin: 0; opacity: 0.9; }
.cta .btn { background: var(--accent-text); color: var(--accent); }
.cta .btn:hover { opacity: 0.92; color: var(--accent); }
.cta .btn-ghost { background: transparent; color: var(--accent-text); border-color: currentColor; }
.cta .btn-ghost:hover { color: var(--accent-text); }

/* ── Referral box ────────────────────────────────── */
.refer-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow);
  display: grid; gap: 20px;
}
.refer-box .label { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.copy-field { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
.copy-field input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 12px 14px;
  font-family: "IBM Plex Mono", monospace; font-size: 14px;
}
.copy-field button {
  border: 0; border-left: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 0 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.copy-field button:hover { background: var(--accent-soft); color: var(--accent); }
.qr-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr { background: #fff; padding: 10px; border-radius: 8px; border: 1px solid var(--border); width: 160px; height: 160px; }
.qr img, .qr canvas { width: 140px !important; height: 140px !important; }
.qr-wrap p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; min-width: 160px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button { font-size: 14px; padding: 8px 14px; }

.ambassador { display: flex; gap: 16px; align-items: center; }
.ambassador .avatar { margin: 0; width: 64px; height: 64px; font-size: 20px; overflow: hidden; }
.ambassador .avatar img { width: 100%; height: 100%; object-fit: cover; }
.ambassador strong { display: block; }
.ambassador span { color: var(--muted); font-size: 15px; }

.notice {
  border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 8px 8px 0;
  font-size: 15px; color: var(--text); margin: 0;
}
.config-warning {
  background: #fff1c2; color: #3d2e00; border-bottom: 1px solid #f1c21b; text-align: center; padding: 10px 16px; font-size: 14px;
}

/* ── Footer ──────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--muted); font-size: 14px; }
footer .container { display: grid; gap: 20px; }
@media (min-width: 760px) { footer .container { grid-template-columns: 1fr auto; } }
footer .links { display: flex; flex-wrap: wrap; gap: 16px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.disclaimer { max-width: 680px; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-size: 14px;
  transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.after-path { margin-top: 28px; }
.footer-title { margin: 0 0 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.program-summary .section-intro { margin-bottom: 16px; }
.program-highlights { margin-top: 24px; }
section[id] { scroll-margin-top: 60px; }

/* ── Images ──────────────────────────────────────── */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item figcaption { padding: 12px 16px; color: var(--muted); font-size: 15px; }
.step-shot { margin: 14px 0 0; }
.step-shot img { border: 1px solid var(--border); border-radius: 8px; max-width: 520px; width: 100%; }
.step-shot figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }

.member .avatar { width: 88px; height: 88px; font-size: 22px; }
.subhead { font-size: 18px; color: var(--muted); font-weight: 500; margin: 8px 0 16px; }
.people { display: grid; gap: 32px; }
@media (min-width: 960px) { .people { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (min-width: 480px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Sub-pages (events, team) ────────────────────── */
.page-hero { padding: 64px 0 24px; }
.page-hero .lead { margin-bottom: 0; }
section.tight { padding: 32px 0 48px; border-top: 0; }
.list-title { font-size: 22px; margin-bottom: 20px; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.event-link { color: inherit; text-decoration: none; }
.event-link:hover { color: var(--accent); text-decoration: underline; }

/* ── Designed banners ────────────────────────────── */
.banner {
  --b1: #0f62fe; --b2: #001d6c;
  position: relative; overflow: hidden; color: #fff; min-height: 168px; padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, var(--b1), var(--b2));
}
.banner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(115deg, transparent 20%, #000 75%);
          mask-image: linear-gradient(115deg, transparent 20%, #000 75%);
}
.banner::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 14px; height: 6px; opacity: 0.35;
  background-image: radial-gradient(circle, #fff 1.2px, transparent 1.6px);
  background-size: 10px 6px;
}
.banner > * { position: relative; z-index: 1; }
.banner.has-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.banner.has-image::before { background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55)); -webkit-mask-image: none; mask-image: none; }
.banner-tag {
  display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.25); padding: 4px 10px; border-radius: 999px;
}
.banner-big { font-family: "IBM Plex Mono", monospace; line-height: 1.1; margin-bottom: 12px; }
.banner-big span { display: block; font-size: 40px; font-weight: 600; letter-spacing: -0.01em; }
.banner-big small { display: block; font-size: 13px; opacity: 0.85; margin-top: 4px; }
.banner-motif {
  position: absolute; right: -14px; top: 50%; transform: translateY(-50%); width: 150px; height: 150px; z-index: 0;
  fill: none; stroke: #fff; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: 0.22;
}
.accent-blue    { --b1: #0f62fe; --b2: #001d6c; }
.accent-cyan    { --b1: #1192e8; --b2: #00274f; }
.accent-teal    { --b1: #009d9a; --b2: #022b30; }
.accent-purple  { --b1: #8a3ffc; --b2: #2b0d57; }
.accent-magenta { --b1: #d02670; --b2: #4a0322; }
.accent-red     { --b1: #e60028; --b2: #4d0310; }

/* ── Event cards ─────────────────────────────────── */
.event-cards { display: grid; gap: 24px; }
.event-card {
  display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  scroll-margin-top: 80px; transition: box-shadow 0.2s, border-color 0.2s;
}
@media (min-width: 860px) { .event-card { grid-template-columns: 320px 1fr; } .event-card .banner { min-height: 100%; } }
.event-card-body { padding: 24px; }
.event-card-body h3 { font-size: 22px; margin-bottom: 10px; }
.event-card-body > p { color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.event-facts { margin: 0 0 16px; display: grid; gap: 4px; font-size: 15px; }
.event-facts > div { display: grid; grid-template-columns: 56px 1fr; gap: 10px; }
.event-facts dt { font-family: "IBM Plex Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 2px; }
.event-facts dd { margin: 0; color: var(--text); }
.event-actions .btn { font-size: 15px; padding: 10px 16px; }
.event-card.past { opacity: 0.6; }
.is-target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ── Profiles ────────────────────────────────────── */
.profiles { display: grid; gap: 24px; }
@media (min-width: 720px) { .profiles { grid-template-columns: repeat(2, 1fr); } }
.profile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  scroll-margin-top: 80px; transition: box-shadow 0.2s, border-color 0.2s;
}
.profile .banner { min-height: 120px; }
.profile .banner-motif { width: 120px; height: 120px; }
.profile-body { padding: 0 24px 24px; }
.profile-body .avatar {
  width: 104px; height: 104px; margin-top: -52px; margin-bottom: 14px; font-size: 28px;
  border: 4px solid var(--surface); position: relative; z-index: 2;
}
.profile-body h3 { font-size: 22px; margin-bottom: 2px; }
.profile-role { color: var(--muted); margin: 0 0 12px; font-size: 16px; }
.profile-bio { margin: 0 0 18px; font-size: 16px; }
.profile-actions .btn { font-size: 14px; padding: 8px 14px; }

/* ── Hub: resources + Discord ────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 24px; }
.chip {
  font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border);
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
a.resource { display: block; color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
a.resource:hover { border-color: var(--accent); box-shadow: var(--shadow); }
a.resource h3 { font-size: 18px; margin: 0 0 6px; }
.resource-topic { display: block; font-family: "IBM Plex Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 8px; }
.discord-detail { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 900px) { .discord-detail { grid-template-columns: 1.4fr 1fr; gap: 40px; } }
.channel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.channel-list li {
  display: grid; gap: 2px; padding: 10px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
}
.channel-name, .channel-list code { font-family: "IBM Plex Mono", monospace; font-size: 14px; font-weight: 600; color: var(--text); }
.channel-topic { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

/* ── Join form (RMIT students) ───────────────────── */
@media (min-width: 860px) { .join-cta { grid-template-columns: 1fr 1fr; align-items: start; } }
.join-alt { margin-top: 16px !important; }
.join-alt a { color: inherit; font-weight: 600; }
.join-form { display: grid; gap: 14px; min-width: 0; }
.join-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.join-form input:not([type="checkbox"]) {
  font: inherit; font-size: 16px; font-weight: 400; width: 100%; padding: 12px 14px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.join-form input:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 1px; }
.join-form .join-consent { grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-weight: 400; line-height: 1.45; }
.join-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent-text); }
.join-form .btn { justify-self: start; }
.join-status { min-height: 1.4em; font-size: 15px; }
.join-done { outline: none; }
.join-done h3 { font-size: 22px; margin: 0 0 8px; }
.join-done p { margin: 0 0 18px !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── QR display (full-screen overlay on refer.html) ── */
/* Its own fixed club palette (deep IBM blue) in both themes, so the stall screen looks the same everywhere. */
.qr-display {
  position: fixed; inset: 0; z-index: 100; overflow: auto; color: #fff;
  background:
    radial-gradient(1100px 760px at 88% -12%, rgba(69, 137, 255, 0.55), transparent 62%),
    radial-gradient(900px 700px at -12% 112%, rgba(138, 63, 252, 0.32), transparent 60%),
    linear-gradient(160deg, #001141 0%, #001d6c 55%, #0b0f14 100%);
}
.qr-display::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
}
body.qr-open { overflow: hidden; }
.qr-deco { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.qr-rack { position: absolute; left: 3vw; bottom: 3vh; width: clamp(64px, 12vmin, 140px); opacity: 0.6; }
.rack-body { fill: rgba(255, 255, 255, 0.06); stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.5; }
.rack-line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.2; }
.rack-led { fill: #42be65; animation: rack-led 1.6s steps(1) infinite; }
.rack-led.led-b { fill: #78a9ff; animation-duration: 2.3s; }
.rack-led.led-c { fill: #f1c21b; animation-duration: 3.1s; }
.rack-label { fill: rgba(255, 255, 255, 0.65); font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 600; }
@keyframes rack-led { 50% { opacity: 0.2; } }
.qr-tag {
  position: absolute; font-family: "IBM Plex Mono", monospace; font-size: clamp(12px, 1.8vmin, 16px); padding: 4px 11px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.5);
}
.qr-tag.t1 { top: 6%; left: 5%; transform: rotate(-6deg); }
.qr-tag.t2 { top: 14%; right: 6%; transform: rotate(5deg); }
.qr-tag.t3 { top: 33%; left: 3%; transform: rotate(3deg); }
.qr-tag.t4 { top: 45%; right: 3%; transform: rotate(-4deg); }
.qr-tag.t5 { top: 60%; left: 4%; transform: rotate(-3deg); }
.qr-tag.t6 { bottom: 12%; right: 5%; transform: rotate(4deg); }
.qr-tag.t7 { top: 3%; right: 28%; transform: rotate(-2deg); }
.qr-tag.t8 { bottom: 5%; right: 30%; transform: rotate(3deg); }
/* Keep tags clear of the text and buttons: phones keep only the two along the top edge,
   landscape drops the ones on the text side and the one near the rack. */
@media (max-width: 640px) { .qr-tag.t2, .qr-tag.t3, .qr-tag.t4, .qr-tag.t5, .qr-tag.t6, .qr-tag.t8 { display: none; } }
@media (orientation: landscape) {
  .qr-tag.t2, .qr-tag.t3, .qr-tag.t4, .qr-tag.t5, .qr-tag.t6, .qr-tag.t8 { display: none; }
  .qr-tag.t7 { right: auto; left: 24%; }
}
@media (orientation: landscape) and (max-height: 560px) { .qr-tag, .qr-rack { display: none; } }
@media (prefers-reduced-motion: reduce) { .rack-led { animation: none; } }

.qr-stage {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}
.qr-brand { display: inline-flex; align-items: center; gap: 12px; text-align: left; margin-bottom: clamp(10px, 2.2vmin, 22px); }
.qr-badge {
  width: clamp(40px, 6vmin, 56px); height: clamp(40px, 6vmin, 56px); border-radius: 12px; display: grid; place-items: center; flex: none;
  background: #fff; color: #0f62fe; font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: clamp(13px, 2vmin, 17px);
}
.qr-brand strong { display: block; font-size: clamp(16px, 2.4vmin, 22px); line-height: 1.2; }
.qr-brand strong + span { display: block; color: rgba(255, 255, 255, 0.75); font-size: clamp(13px, 1.8vmin, 16px); }
.qr-title { color: #fff; font-size: clamp(30px, 6.2vmin, 62px); line-height: 1.08; margin: 0 0 8px; }
.qr-sub { color: rgba(255, 255, 255, 0.8); font-size: clamp(15px, 2.2vmin, 21px); margin: 0 0 clamp(12px, 2.2vmin, 22px); max-width: 30em; }
.qr-steps { list-style: none; margin: 0 0 clamp(14px, 2.6vmin, 28px); padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.qr-steps li {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); font-size: clamp(13px, 1.9vmin, 17px); font-weight: 600;
}
.qr-step-n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #0f62fe; font-family: "IBM Plex Mono", monospace; font-size: 13px;
}
.qr-card {
  position: relative; flex: none; width: min(80vw, 42vh, 560px); width: min(80vw, 42dvh, 560px); aspect-ratio: 1;
  background: #fff; border-radius: 22px; padding: clamp(8px, 1.4vmin, 14px);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.14), 0 24px 70px rgba(0, 0, 0, 0.5);
}
.qr-code, .qr-code svg { display: block; width: 100%; height: 100%; }
.qr-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 18%; aspect-ratio: 1; border-radius: 18%;
  display: grid; place-items: center; background: #0f62fe; color: #fff; box-shadow: 0 0 0 clamp(4px, 0.9vmin, 8px) #fff;
  font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: clamp(11px, 2.2vmin, 22px);
}
.qr-url { font-family: "IBM Plex Mono", monospace; color: rgba(255, 255, 255, 0.85); font-size: clamp(13px, 2vmin, 19px); margin: clamp(12px, 2.2vmin, 22px) 0 clamp(10px, 1.8vmin, 18px); overflow-wrap: anywhere; }
.qr-team { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 10px; font-size: clamp(14px, 2vmin, 18px); }
.qr-faces { display: flex; }
.qr-faces .avatar {
  width: clamp(34px, 5vmin, 46px); height: clamp(34px, 5vmin, 46px); margin: 0 0 0 -10px; font-size: 13px; overflow: hidden;
  border: 2px solid #001d6c; background: #fff; color: #0f62fe;
}
.qr-faces .avatar:first-child { margin-left: 0; }
.qr-faces .avatar img { width: 100%; height: 100%; object-fit: cover; }
.qr-term { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: #a6f0b8; opacity: 0.8; margin: 0 0 14px; }
.qr-term .cursor { margin-left: 4px; }
.qr-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.qr-switch button {
  font: inherit; font-size: 15px; font-weight: 600; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4);
}
.qr-switch button:hover { background: rgba(255, 255, 255, 0.12); }
/* Short portrait screens (most phones): drop the extras so the code stays big */
@media (orientation: portrait) and (max-height: 900px) { .qr-term { display: none; } }
@media (orientation: portrait) and (max-height: 760px) { .qr-sub, .qr-steps { display: none; } }
/* Landscape tablets/phones: words on the left, code on the right */
@media (orientation: landscape) and (min-width: 700px) {
  .qr-stage {
    display: grid; grid-template-columns: minmax(0, 34rem) auto; column-gap: 6vw; align-content: center; justify-content: center; text-align: left;
    grid-template-rows: 1fr repeat(8, auto) 1fr;
    grid-template-areas: ". card" "brand card" "title card" "sub card" "steps card" "url card" "team card" "term card" "sw card" ". card";
  }
  .qr-brand { grid-area: brand; justify-self: start; } .qr-title { grid-area: title; } .qr-sub { grid-area: sub; }
  .qr-steps { grid-area: steps; justify-content: flex-start; } .qr-url { grid-area: url; }
  .qr-team { grid-area: team; justify-content: flex-start; } .qr-term { grid-area: term; } .qr-switch { grid-area: sw; justify-content: flex-start; }
  .qr-card { grid-area: card; width: min(44vw, 80vh, 640px); width: min(44vw, 80dvh, 640px); }
}
@media (orientation: landscape) and (max-height: 500px) { .qr-sub, .qr-term, .qr-team { display: none; } }

/* ── Get-started flow (refer.html) ───────────────── */
.flow-steps { border-top: 1px solid var(--border); }
.flow-steps .container { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.flow-steps .container::-webkit-scrollbar { display: none; }
.flow-steps a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 6px 12px 6px 6px;
  border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none;
}
.flow-steps a span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted);
}
.flow-steps a[aria-current="step"] { color: var(--text); background: var(--accent-soft); font-weight: 600; }
.flow-steps a[aria-current="step"] span { background: var(--accent); color: var(--accent-text); }
.flow-page section[id] { scroll-margin-top: 112px; }
.flow-hero { padding: 56px 0 40px; }
.flow-subhead { margin-top: 40px; }
.flow-action { margin-top: 12px !important; }
.flow-copy { margin-top: 12px; max-width: 420px; }
.cta .flow-eyebrow { color: inherit; opacity: 0.85; }
.nav-links .qr-link { font-size: 15px; color: var(--muted); text-decoration: none; padding: 0; }
.nav-links .qr-link:hover { color: var(--text); }
.share-box { display: grid; gap: 16px; }
.share-note { margin: 0; color: var(--muted); }

/* ── Stats page (stats.html) ─────────────────────── */
.stats-title { font-size: clamp(26px, 4vw, 36px); margin: 8px 0 8px; }
.stats-intro { margin-bottom: 28px; }
.stats-login { display: grid; gap: 12px; max-width: 360px; }
.stats-login label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.stats-login input { font: inherit; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.stats-login .btn { justify-self: start; }
.stats-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.stats-filters .chips { margin: 0; }
.stats-tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
@media (min-width: 860px) { .stats-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; }
.stat-label { font-size: 14px; color: var(--muted); }
.stat-value { font-size: clamp(28px, 4vw, 38px); font-weight: 600; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 13px; color: var(--muted); }
.stats-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.stats-panel h2 { font-size: 20px; margin: 0 0 4px; }
.stats-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.stats-panel-head .chips { margin: 0; }
.stats-note { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 12px; align-items: center; }
@media (min-width: 720px) { .funnel-row { grid-template-columns: 220px minmax(0, 1fr) 96px; } }
.funnel-label { font-size: 14px; color: var(--text); }
.funnel-track { height: 22px; border-radius: 4px; background: var(--surface-2); overflow: hidden; outline-offset: 2px; }
.funnel-bar { height: 100%; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; }
.funnel-value { font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.funnel-value small { font-weight: 400; color: var(--muted); }
@media (min-width: 720px) { .funnel-value { text-align: right; } }
.daily-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; height: 180px; }
.daily-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.daily-cols { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--border); background-image: linear-gradient(var(--border) 1px, transparent 1px); background-size: 100% 50%; }
.daily-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 0; outline-offset: 1px; }
.daily-col:hover .daily-bar, .daily-col:focus .daily-bar { background: var(--accent-hover); }
.daily-bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.daily-cols.dense { gap: 1px; }
.daily-cols.dense .daily-bar { border-radius: 1px 1px 0 0; }
.daily-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 6px 0 0 36px; }
.stats-table-toggle { margin-top: 14px; }
.stats-table-toggle summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.stats-table-wrap { overflow-x: auto; margin-top: 10px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table th, .stats-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.stats-table th { color: var(--muted); font-weight: 500; }
.stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table .mono { font-family: "IBM Plex Mono", monospace; }
.stats-tip {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; display: grid; gap: 2px;
  background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 6px; font-size: 13px; box-shadow: var(--shadow);
}
.stats-tip[hidden] { display: none; }
.privacy-note { font-size: 13px; color: var(--muted); margin: 0; }
.members-count { color: var(--muted); font-weight: 400; font-size: 16px; }
.members-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.members-actions input { font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); min-width: 220px; }
.members-actions .btn { font-size: 14px; padding: 8px 14px; }
#members-login { margin-bottom: 4px; }
#members-table td a { color: var(--accent); }
/* Text-style buttons ("Log out", "Remove", "Show QR") */
.qr-link { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 4px; cursor: pointer; text-decoration: underline; }
.qr-link:hover { color: var(--text); }
#members-table .qr-link { padding: 0; }
