:root {
  color-scheme: dark;
  --ink: #f4f0e8;
  --ink-muted: #a6a39b;
  --surface: #0b0c0b;
  --surface-raised: #131513;
  --line: rgba(244, 240, 232, 0.18);
  --gold: #d8ad4c;
  --gold-soft: #f0cf78;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

:root[data-theme='light'] {
  color-scheme: light;
  --ink: #141512;
  --ink-muted: #686b62;
  --surface: #f2f0e9;
  --surface-raised: #fffdf8;
  --line: rgba(20, 21, 18, 0.18);
  --gold: #a4771f;
  --gold-soft: #8d651a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--serif); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.site-shell { overflow: hidden; }
.site-header { align-items: center; display: flex; justify-content: space-between; margin: auto; max-width: 1440px; padding: 22px 5vw; position: relative; z-index: 3; }
.brand { align-items: center; display: flex; gap: 11px; }
.brand-mark { align-items: center; border: 1px solid var(--gold); color: var(--gold); display: flex; font-family: var(--sans); font-size: 18px; font-weight: 700; height: 35px; justify-content: center; width: 35px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-family: var(--sans); font-size: 13px; letter-spacing: .16em; }
.brand-copy small, .eyebrow, .card-topline, .hero-status, .site-footer { font-family: var(--mono); }
.brand-copy small { color: var(--gold); font-size: 9px; }
.site-nav { align-items: center; display: flex; gap: 22px; }
.site-nav > a { color: var(--ink-muted); font-family: var(--mono); font-size: 11px; }
.site-nav > a:hover, .site-nav > a:focus-visible { color: var(--gold-soft); }
.nav-login { color: var(--ink) !important; }
.nav-account { position: relative; }
.nav-profile { align-items: center; background: transparent; border: 1px solid var(--line); cursor: pointer; display: inline-flex; gap: 8px; padding: 6px 10px; }
.nav-profile strong { color: var(--ink); font-family: var(--sans); font-size: 11px; font-weight: 600; }
.nav-profile-image, .nav-profile-placeholder { background: var(--surface-raised); border: 1px solid var(--gold); border-radius: 50%; height: 25px; object-fit: cover; width: 25px; }
.nav-profile-placeholder { align-items: center; color: var(--gold); display: inline-flex; font-family: var(--display); font-size: 11px; justify-content: center; }
.profile-menu-chevron { color: var(--gold); font-size: 14px; line-height: 1; }
.profile-menu { background: var(--surface-raised); border: 1px solid var(--line); min-width: 260px; opacity: 0; padding: 6px; pointer-events: none; position: absolute; right: 0; top: calc(100% + 8px); transform: translateY(-8px) scale(.96); transform-origin: top right; transition: opacity .2s ease, transform .2s ease; z-index: 10; }
.profile-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.profile-menu a, .profile-menu button { background: transparent; border: 0; color: var(--ink); cursor: pointer; display: block; font-family: var(--mono); font-size: 10px; padding: 10px; text-align: left; width: 100%; }
.profile-menu.is-open a, .profile-menu.is-open button { animation: profile-menu-item-in .2s ease both; }
.profile-menu.is-open button { animation-delay: .04s; }
.profile-menu a:hover, .profile-menu a:focus-visible, .profile-menu button:hover, .profile-menu button:focus-visible { background: rgba(201,168,76,.08); color: var(--gold-soft); }
.site-nav [hidden] { display: none !important; }
@keyframes profile-menu-item-in { from { opacity: 0; transform: translateX(5px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .profile-menu { transition: none; } .profile-menu.is-open a, .profile-menu.is-open button { animation: none; } }
.theme-toggle { background: transparent; border: 1px solid var(--line); cursor: pointer; height: 34px; width: 34px; }
.theme-icon { color: var(--gold); font-size: 18px; }
.nav-links { align-items: center; display: flex; gap: 12px; }
.nav-links > a { color: var(--ink-muted); font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.nav-menu-toggle { align-items: center; background: transparent; border: 1px solid var(--line); cursor: pointer; display: none; font-family: var(--mono); height: 34px; justify-content: center; line-height: 1; padding: 0; width: 38px; }
.navigation-open { overflow: hidden; }
.sr-only { height: 1px; margin: -1px; overflow: hidden; position: absolute; width: 1px; clip: rect(0, 0, 0, 0); }
.hero { min-height: 680px; overflow: hidden; padding: 125px 5vw 90px; position: relative; }
.cinematic-animation { background: #000; height: 100vh; isolation: isolate; inset: 0; overflow: hidden; pointer-events: none; position: fixed; width: 100%; z-index: 0; }
.cinematic-video { bottom: 0; filter: contrast(1.04) saturate(.92); height: 100%; inset: 0; object-fit: cover; object-position: center bottom; opacity: 0; pointer-events: none; position: absolute; transform: scale(1.015); width: 100%; will-change: opacity, transform; z-index: 0; }
.cinematic-overlay { background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.35) 75%, rgba(0,0,0,.85) 100%); inset: 0; pointer-events: none; position: absolute; z-index: 2; }
.cinematic-glow { animation: cinematicFloat 12s ease-in-out infinite alternate; border-radius: 50%; filter: blur(100px); height: 45vw; opacity: .08; pointer-events: none; position: absolute; width: 45vw; z-index: 1; }
.cinematic-glow-1 { background: rgba(255,255,255,.5); left: -10%; top: -20%; }
.cinematic-glow-2 { animation-delay: -5s; background: rgba(255,255,255,.35); bottom: -20%; right: -15%; }
.site-shell > header, .site-shell > main, .site-shell > footer { position: relative; z-index: 1; }
.site-shell > header.site-header { z-index: 30; }
.hero.crimson-radial { background: transparent; }
@keyframes cinematicFloat { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(5%, -4%, 0) scale(1.12); } }
@media (max-width: 768px) {
  .cinematic-video { object-position: center center; transform: scale(1.03); }
  .cinematic-overlay { background: linear-gradient(to bottom, rgba(0,0,0,.2), rgba(0,0,0,.55)); }
  .cinematic-glow { filter: blur(80px); height: 70vw; width: 70vw; }
}
@media (prefers-reduced-motion: reduce) {
  .cinematic-glow { animation: none; }
  .cinematic-video { transform: none; }
  .hero-content > * { animation: none; opacity: 1; transform: none; }
}
.members-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.member-card { border: 1px solid var(--line); padding: 18px; }
.member-card-permanent { background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(201,168,76,.12)); border-color: rgba(201,168,76,.8); box-shadow: 0 12px 28px rgba(201,168,76,.12); }
.member-card-leader { background: linear-gradient(135deg, rgba(255,255,255,.15), rgba(216,173,76,.2)); border-color: rgba(255,255,255,.76); box-shadow: 0 18px 36px rgba(201,168,76,.18); }
.member-card-temporary { background: rgba(255,255,255,.02); }
.member-card-incomplete { border: 2px solid #ff5c70 !important; box-shadow: 0 0 0 2px rgba(255,92,112,.16), 0 12px 28px rgba(255,92,112,.12); }
.member-profile-missing { color: #ff9eaa; font-family: var(--mono); font-size: 10px; line-height: 1.5; margin: 12px 0 0; text-transform: uppercase; }
.member-card-header { align-items: center; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.member-avatar-wrap { flex-shrink: 0; }
.member-avatar-wrap img, .member-avatar-wrap .member-avatar-placeholder { background: var(--surface); border: 1px solid var(--gold); border-radius: 50%; height: 62px; object-fit: cover; width: 62px; }
.member-role-badge { border: 1px solid transparent; display: inline-flex; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; padding: 5px 8px; text-transform: uppercase; }
.permanent-badge { background: rgba(255,255,255,.12); border-color: rgba(201,168,76,.6); color: var(--gold-soft); }
.leader-badge { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.7); color: #fff5d6; }
.temp-badge { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.18); color: var(--ink-muted); }
.member-name-button { background: transparent; border: 0; color: inherit; cursor: pointer; display: block; padding: 0; text-align: left; width: 100%; }
.member-name-button h3 { font-family: var(--sans); font-size: 22px; margin: 0 0 8px; }
.member-name-button span { color: var(--gold-soft); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.member-name-button:hover h3, .member-name-button:focus-visible h3 { color: var(--gold-soft); }
.member-status-pill { display: inline-block; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; margin: 0 0 8px; text-transform: uppercase; }
.member-status-pill.leader { color: #fff7d8; }
.member-status-pill.premium { color: var(--gold-soft); }
.member-status-pill.standard { color: var(--ink-muted); }
.member-skills { color: var(--ink-muted); font-size: 14px; line-height: 1.45; margin: 14px 0 0; }
.member-role-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.member-role-button { background: rgba(201,168,76,.08); border: 1px solid rgba(201,168,76,.4); color: var(--gold-soft); cursor: pointer; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; padding: 7px 9px; text-transform: uppercase; }
.promote-button { background: rgba(255,255,255,.08); border-color: rgba(201,168,76,.7); }
.leave-button { border-color: rgba(255,255,255,.5); color: #fff8dc; }
.member-section { margin-top: 26px; }
.member-section-header { margin-bottom: 14px; }
.member-section-header .eyebrow { margin: 0; }
.leader-section { background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(201,168,76,.14)); border: 1px solid rgba(255,255,255,.65); padding: 18px; }
.leader-section .member-section-header .eyebrow { color: #fff5d6; }
.premium-section { border: 1px solid rgba(201,168,76,.5); background: rgba(255,255,255,.03); padding: 18px; }
.standard-section { border: 1px solid var(--line); background: rgba(255,255,255,.01); padding: 18px; }
.member-modal { inset: 0; position: fixed; z-index: 20; }
.member-modal-backdrop { background: rgba(10, 5, 3, .7); inset: 0; opacity: 0; position: absolute; transition: opacity .22s ease; }
.member-modal-card { background: var(--surface-raised); border: 1px solid var(--gold); left: 50%; max-width: 460px; opacity: 0; padding: 34px; position: absolute; top: 50%; transform: translate(-50%, calc(-50% + 22px)) scale(.94); transition: opacity .22s ease, transform .22s ease; width: calc(100% - 32px); }
.member-modal.is-open .member-modal-backdrop { opacity: 1; }
.member-modal.is-open .member-modal-card { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.member-modal-card h2 { color: var(--ink); font-family: var(--sans); font-size: 34px; letter-spacing: 0; margin: 12px 0 18px; }
.member-modal-role { color: var(--gold-soft); font-family: var(--mono); font-size: 11px; margin: 0 0 12px; text-transform: uppercase; }
.member-modal-bio, .member-modal-detail, .member-modal-skills { color: var(--ink-muted); font-size: 15px; line-height: 1.5; margin: 0 0 10px; }
.member-modal-skills { color: var(--ink-muted); font-size: 16px; line-height: 1.5; margin: 0; }
.member-modal-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.member-modal-links a { color: var(--gold-soft); font-family: var(--mono); font-size: 10px; }
.vault-materials { display: grid; gap: 14px; }
.vault-material { border: 1px solid var(--line); padding: 22px; }
.vault-material h2 { font-family: var(--sans); font-size: 25px; letter-spacing: 0; margin: 0 0 8px; }
.vault-material p { color: var(--ink-muted); line-height: 1.45; margin: 0 0 14px; }
.vault-material-meta { color: var(--gold); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.vault-material a { color: var(--gold-soft); display: inline-block; font-family: var(--mono); font-size: 10px; margin-top: 14px; }
.member-modal-close { background: transparent; border: 1px solid var(--line); color: var(--gold); cursor: pointer; font-size: 24px; line-height: 1; padding: 3px 9px; position: absolute; right: 14px; top: 14px; }
@media (prefers-reduced-motion: reduce) { .member-modal-backdrop, .member-modal-card { transition: none; } }
.hero-content, .hero-status, .scroll-cue { position: relative; z-index: 10; }
.hero-content { margin: auto; max-width: 1440px; }
.hero-content > * { animation: heroReveal .8s ease forwards; opacity: 0; transform: translateY(20px); }
.hero-content > *:nth-child(1) { animation-delay: .05s; }
.hero-content > *:nth-child(2) { animation-delay: .1s; }
.hero-content > *:nth-child(3) { animation-delay: .15s; }
.hero-content > *:nth-child(4) { animation-delay: .2s; }
.hero-content > *:nth-child(5) { animation-delay: .25s; }
.hero-content > *:nth-child(6) { animation-delay: .3s; }
.hero-content > *:nth-child(7) { animation-delay: .35s; }
.hero-content > *:nth-child(8) { animation-delay: .4s; }
@keyframes heroReveal { to { opacity: 1; transform: translateY(0); } }
.eyebrow { color: var(--gold); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: var(--sans); font-size: clamp(3.7rem, 9vw, 8.2rem); font-weight: 500; letter-spacing: -.05em; line-height: .88; margin: 26px 0 32px; max-width: 950px; }
h1 em { color: var(--gold-soft); font-family: var(--serif); font-weight: 400; }
.hero-intro { color: var(--ink-muted); font-size: 19px; line-height: 1.5; max-width: 475px; }
.hero-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 27px; margin-top: 38px; }
.button { display: inline-flex; font-family: var(--mono); font-size: 11px; gap: 20px; letter-spacing: .02em; padding: 15px 18px; }
.button-primary { background: var(--gold); color: #15130d; }
.button-outline { border: 1px solid var(--gold); color: var(--gold-soft); }
.text-link { border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--mono); font-size: 11px; padding-bottom: 5px; }
.hero-status { align-items: center; bottom: 38px; display: flex; font-size: 9px; gap: 8px; left: 5vw; position: absolute; text-transform: uppercase; }
.status-dot { background: #73b55b; border-radius: 100%; height: 6px; width: 6px; }
.status-time { color: var(--ink-muted); margin-left: 16px; }
.scroll-cue { bottom: 38px; color: var(--ink-muted); font-family: var(--mono); font-size: 9px; position: absolute; right: 5vw; text-transform: uppercase; }
.scroll-cue span { border-left: 1px solid var(--gold); display: inline-block; height: 27px; margin-right: 9px; vertical-align: middle; }
.section-pad { margin: auto; max-width: 1440px; padding: 110px 5vw; }
.section-heading { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); margin-bottom: 55px; }
.section-heading .eyebrow { grid-column: 1 / -1; }
h2 { font-family: var(--sans); font-size: clamp(2.3rem, 5vw, 4.8rem); font-weight: 500; letter-spacing: -.05em; line-height: .95; margin: 0; }
.section-heading > p:last-child { color: var(--ink-muted); font-size: 18px; line-height: 1.45; margin: 0; max-width: 400px; }
.project-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.project-card { border: 1px solid var(--gold); display: flex; flex-direction: column; min-height: 330px; padding: 23px; }
.card-topline { color: var(--gold); display: flex; font-size: 9px; justify-content: space-between; text-transform: uppercase; }
h3 { font-family: var(--sans); font-size: 28px; font-weight: 500; letter-spacing: -.04em; margin: 70px 0 13px; }
.project-card p { color: var(--ink-muted); font-size: 16px; line-height: 1.45; max-width: 310px; }
.project-card a { color: var(--gold-soft); font-family: var(--mono); font-size: 10px; margin-top: auto; }
.vault-strip { align-items: center; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; gap: 25px; grid-template-columns: 1.2fr 1fr auto; }
.vault-strip h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.vault-strip > p { color: var(--ink-muted); font-size: 17px; line-height: 1.4; max-width: 320px; }
.challenge-placeholder { align-items: center; border: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; justify-content: center; min-height: 260px; }
a.challenge-placeholder { transition: background .2s ease, border-color .2s ease; }
a.challenge-placeholder:hover, a.challenge-placeholder:focus-visible { background: rgba(201,168,76,.06); border-color: var(--gold); }
.challenge-placeholder span { color: var(--gold); font-family: var(--mono); font-size: 24px; letter-spacing: 10px; }
.challenge-placeholder strong { font-family: var(--sans); font-size: 17px; font-weight: 500; }
.challenge-placeholder small { color: var(--ink-muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.member-challenge-quiz { border: 1px solid var(--gold); padding: 28px; }
.quiz-leaderboard { border: 1px solid var(--line); margin-top: 18px; padding: 24px 28px; }
.quiz-leaderboard-heading { align-items: end; display: flex; justify-content: space-between; }
.quiz-leaderboard-heading h3 { font-family: var(--sans); font-size: 29px; font-weight: 500; margin: 8px 0 0; }
.quiz-leaderboard-note { color: var(--ink-muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.quiz-leaderboard-list { list-style: none; margin: 20px 0 0; padding: 0; }
.quiz-leaderboard-list li { align-items: center; animation: leaderboard-row-in .45s ease both; border-top: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 34px 1fr auto; padding: 14px 0; }
.quiz-leaderboard-list li:nth-child(2) { animation-delay: .06s; }
.quiz-leaderboard-list li:nth-child(3) { animation-delay: .12s; }
.quiz-leaderboard-list li:nth-child(4) { animation-delay: .18s; }
.quiz-leaderboard-list li:nth-child(5) { animation-delay: .24s; }
.leaderboard-rank { color: var(--gold); font-family: var(--display); font-size: 20px; }
.leaderboard-name { color: var(--ink); font-family: var(--sans); font-size: 18px; }
.leaderboard-level { color: var(--ink-muted); display: block; font-family: var(--mono); font-size: 9px; margin-top: 3px; text-transform: uppercase; }
.leaderboard-score { color: var(--gold-soft); font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.quiz-leaderboard-empty { color: var(--ink-muted); font-family: var(--mono); font-size: 11px; }
@keyframes leaderboard-row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.quiz-heading { align-items: flex-start; display: flex; gap: 24px; justify-content: space-between; }
.quiz-title { color: var(--gold-soft); font-family: var(--sans); font-size: 34px; font-weight: 500; margin: 10px 0 12px; }
.quiz-stats { display: flex; gap: 18px; white-space: nowrap; }
.quiz-stats span { color: var(--ink-muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.quiz-stats strong { color: var(--gold-soft); font-size: 18px; }
.quiz-level-label { color: var(--gold); display: block; font-family: var(--mono); font-size: 10px; margin-top: 24px; text-transform: uppercase; }
.quiz-level { margin-top: 8px; max-width: 280px; }
.quiz-start-screen { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.quiz-start-screen .button { margin-top: 16px; }
.quiz-progress-line { color: var(--ink-muted); display: flex; font-family: var(--mono); font-size: 10px; justify-content: space-between; margin: 30px 0 8px; text-transform: uppercase; }
.quiz-progress-track { background: var(--line); height: 4px; }
.quiz-progress-track span { background: var(--gold); display: block; height: 100%; transition: width .25s ease; width: 10%; }
.quiz-question { font-family: var(--sans); font-size: 27px; line-height: 1.15; margin: 30px 0 22px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option { background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; font-family: var(--sans); font-size: 16px; padding: 14px 16px; text-align: left; transition: border-color .2s ease, background .2s ease; }
.quiz-option:hover, .quiz-option:focus-visible { background: rgba(201,168,76,.07); border-color: var(--gold); }
.quiz-option.correct { background: rgba(114,173,104,.13); border-color: #72ad68; }
.quiz-option.incorrect { background: rgba(210,107,82,.13); border-color: #d26b52; }
.quiz-option:disabled { cursor: default; }
.quiz-feedback { color: var(--ink-muted); font-family: var(--mono); font-size: 11px; line-height: 1.5; min-height: 34px; margin: 18px 0 0; }
.quiz-next { margin-top: 6px; }
.quiz-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.quiz-actions .quiz-next { margin-left: auto; }
.quiz-result { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 28px; }
.quiz-result h3 { font-family: var(--sans); font-size: 34px; margin: 12px 0; }
.quiz-result p:not(.eyebrow) { color: var(--ink-muted); line-height: 1.5; }
@media (max-width: 560px) { .member-challenge-quiz { padding: 20px; } .quiz-heading { display: block; } .quiz-stats { margin-top: 18px; } .quiz-actions .quiz-next { margin-left: 0; } }
@media (max-width: 560px) { .quiz-leaderboard { padding: 20px; } .quiz-leaderboard-heading { align-items: flex-start; display: block; } .quiz-leaderboard-note { display: block; margin-top: 12px; } .quiz-leaderboard-list li { grid-template-columns: 28px 1fr auto; } .leaderboard-name { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .quiz-progress-track span, .quiz-leaderboard-list li { transition: none; animation: none; } }
.site-footer { border-top: 1px solid var(--line); color: var(--ink-muted); display: flex; font-size: 9px; justify-content: space-between; margin: 0 5vw; padding: 22px 0; text-transform: uppercase; }
.notice-float { background: #fffdf8; border: 1px solid #a4771f; bottom: 28px; box-shadow: 0 18px 50px rgba(24, 8, 3, .28); color: #a4771f; max-width: 340px; opacity: 0; padding: 28px 30px 24px; position: fixed; right: 28px; transform: translateY(24px) scale(.94); transition: opacity .28s ease, transform .28s ease; width: calc(100% - 56px); z-index: 15; }
.notice-float::before, .notice-float::after { background: #fffdf8; border: 1px solid #a4771f; border-radius: 50%; content: ''; height: 27px; position: absolute; width: 27px; z-index: -1; }
.notice-float::before { left: 30px; top: -13px; }
.notice-float::after { height: 20px; right: 42px; top: -10px; width: 20px; }
.notice-float.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.notice-float-label { color: #a4771f; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; margin: 0 0 10px; text-transform: uppercase; }
.notice-float h2 { color: #a4771f; font-family: var(--sans); font-size: 24px; letter-spacing: 0; line-height: 1.1; margin: 0 0 10px; }
.notice-float-message { color: #a4771f; font-family: var(--serif); font-size: 15px; line-height: 1.4; margin: 0 0 14px; }
.notice-float small { color: #a4771f; font-family: var(--mono); font-size: 9px; }
.notice-float-close { background: transparent; border: 1px solid #a4771f; color: #a4771f; cursor: pointer; font-size: 20px; line-height: 1; padding: 1px 7px; position: absolute; right: 12px; top: 12px; }
.donation-section { border-top: 1px solid var(--line); }
.donation-panel { border: 1px solid var(--gold); max-width: 720px; padding: 30px; }
.donation-question h3 { color: var(--ink); font-family: var(--sans); font-size: 26px; font-weight: 500; margin: 0 0 22px; }
.donation-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.donation-payment { animation: donation-reveal .45s ease both; text-align: center; }
.donation-qr { margin: 18px auto 22px; max-width: 100%; }
.donation-payment img { background: #fff; border: 8px solid #fff; display: block; height: var(--donation-qr-size, 300px); margin: 0 auto 14px; max-height: 70vw; max-width: 70vw; object-fit: contain; width: var(--donation-qr-size, 300px); }
.donation-qr-control { align-items: center; color: var(--ink-muted); display: flex; font-family: var(--mono); font-size: 10px; gap: 10px; justify-content: center; text-transform: uppercase; }
.donation-qr-control input { accent-color: var(--gold); max-width: 220px; width: 55vw; }
.donation-qr-control output { color: var(--gold-soft); min-width: 45px; text-align: left; }
.donation-back { cursor: pointer; margin-bottom: 4px; }
.donation-thanks { color: var(--gold-soft); font-family: var(--display); font-size: 22px; margin: 0 0 8px; }
.donation-help, .donation-dismissed { color: var(--ink-muted); line-height: 1.5; margin: 0; }
@keyframes donation-reveal { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .donation-payment { animation: none; } }
:root[data-theme='light'] .notice-float { background: #120504; border-color: #e8c469; box-shadow: 0 18px 50px rgba(0, 0, 0, .28); color: #e8c469; }
:root[data-theme='light'] .notice-float::before, :root[data-theme='light'] .notice-float::after { background: #120504; border-color: #e8c469; }
:root[data-theme='light'] .notice-float h2, :root[data-theme='light'] .notice-float-message, :root[data-theme='light'] .notice-float small, :root[data-theme='light'] .notice-float-label { color: #e8c469; }
:root[data-theme='light'] .notice-float-close { border-color: #e8c469; color: #e8c469; }
.notice-form { margin-top: 26px; max-width: 680px; }
.notice-history { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 22px; }
.notice-history-item { border-bottom: 1px solid var(--line); margin-bottom: 16px; padding-bottom: 16px; }
.notice-history-item h3 { font-family: var(--sans); font-size: 22px; margin: 0 0 6px; }
.notice-history-item p { color: var(--ink-muted); line-height: 1.45; margin: 0 0 8px; }
.notice-history-item small { color: var(--gold); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
@media (max-width: 560px) { .notice-float { bottom: 16px; padding: 24px 22px 20px; right: 16px; width: calc(100% - 32px); } }
@media (prefers-reduced-motion: reduce) { .notice-float { transition: none; } }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
@media (max-width: 1050px) {
  .section-heading { grid-template-columns: 1fr; gap: 22px; }
  .section-heading > p:last-child { max-width: 560px; }
}
@media (max-width: 760px) {
  .site-header { align-items: flex-start; }
  .site-nav > a:not(.nav-login) { display: none; }
  .site-nav { gap: 10px; }
  .nav-login { font-size: 9px !important; }
  .hero { min-height: 700px; padding-top: 115px; }
  .hero-intro { font-size: 17px; }
  .hero-status { bottom: 85px; left: 5vw; }
  .scroll-cue { bottom: 35px; left: 5vw; right: auto; }
  .section-pad { padding-bottom: 75px; padding-top: 75px; }
  .section-heading, .vault-strip { display: block; }
  .section-heading > p:last-child, .vault-strip > p { margin-top: 25px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 285px; }
  h3 { margin-top: 55px; }
  .vault-strip .button { margin-top: 12px; }
  .site-footer { gap: 14px; justify-content: flex-start; }
  .site-footer span:last-child { margin-left: auto; }
}

/* Reference-inspired crimson and brass identity */
:root {
  --surface: #120504;
  --surface-raised: #1a0806;
  --ink: #f0e8d8;
  --ink-muted: #9a8868;
  --line: rgba(201, 168, 76, 0.22);
  --gold: #c9a84c;
  --gold-soft: #e8c469;
  --serif: 'IM Fell English', serif;
  --sans: 'Rajdhani', sans-serif;
  --mono: 'Space Mono', monospace;
  --display: 'Cinzel', serif;
  --devanagari: 'Noto Serif Devanagari', serif;
}

:root[data-theme='light'] {
  --surface: #f5ede0;
  --surface-raised: #e8d8be;
  --ink: #1a0a04;
  --ink-muted: #6a4830;
  --line: rgba(154, 104, 32, 0.28);
  --gold: #9a6820;
  --gold-soft: #b8842a;
}

body { transition: background .35s ease, color .35s ease; }
.site-header { background: rgba(18, 5, 4, .86); border-bottom: 1px solid var(--line); max-width: none; padding: 13px 5vw; }
:root[data-theme='light'] .site-header { background: rgba(245, 237, 224, .9); }
.brand { gap: 12px; }
.brand-shield { height: 43px; width: 38px; }
.brand-copy { gap: 1px; }
.brand-copy strong { color: var(--gold-soft); font-family: var(--display); font-size: 16px; letter-spacing: .18em; }
.brand-copy small { color: var(--ink-muted); font-family: var(--devanagari); font-size: 8px; }
.site-nav { gap: 12px; }
.site-nav > a { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.nav-login { border: 1px solid var(--line); padding: 9px 13px; }
.theme-toggle { background: rgba(201,168,76,.08); border-color: var(--line); }
.hero { align-items: center; display: flex; justify-content: center; min-height: calc(100vh - 69px); overflow: hidden; padding: 80px 24px 105px; text-align: center; }
.crimson-radial { background: radial-gradient(ellipse 75% 72% at 50% 42%, rgba(90, 22, 13, .8), var(--surface) 72%); }
:root[data-theme='light'] .crimson-radial { background: radial-gradient(ellipse 75% 72% at 50% 42%, rgba(181, 128, 42, .15), var(--surface) 72%); }
:root[data-theme='light'] .hero.crimson-radial { background: transparent; }
.hero-content { max-width: 850px; width: 100%; }
.hero-signal { align-items: center; color: var(--gold); display: flex; font-family: var(--mono); font-size: 9px; gap: 12px; justify-content: center; letter-spacing: .16em; margin: 0 auto 28px; opacity: .9; }
.hero-signal span { background: var(--gold); border-radius: 50%; display: inline-block; height: 6px; width: 6px; }
.hero-emblem { animation: float-slow 5s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(201,168,76,.26)); margin: 0 auto 19px; width: 112px; }
.hero-emblem svg { display: block; height: auto; width: 100%; }
.hero h1 { color: var(--gold-soft); font-family: var(--display); font-size: clamp(3.6rem, 11vw, 7.4rem); font-weight: 900; letter-spacing: .18em; line-height: .9; margin: 0 0 10px; padding-left: .18em; text-shadow: 0 0 30px rgba(201,168,76,.25); }
.hero-collective { color: var(--gold); font-family: var(--display); font-size: clamp(11px, 2vw, 17px); letter-spacing: .48em; margin: 0 0 22px; padding-left: .48em; }
.hero-sanskrit { color: var(--gold-soft); font-family: var(--devanagari); font-size: clamp(17px, 2.8vw, 27px); line-height: 1.5; margin: 0 0 7px; text-shadow: 0 0 22px rgba(201,168,76,.42); }
.hero-translation { color: var(--ink-muted); font-family: var(--serif); font-size: 14px; font-style: italic; letter-spacing: .06em; margin: 0; }
.hero-divider { align-items: center; display: flex; gap: 14px; margin: 23px auto 30px; max-width: 470px; }
.hero-divider::before, .hero-divider::after { background: linear-gradient(90deg, transparent, var(--line), transparent); content: ''; flex: 1; height: 1px; }
.hero-divider span { color: var(--ink-muted); font-family: var(--mono); font-size: 8px; letter-spacing: .16em; white-space: nowrap; }
.hero-actions { justify-content: center; margin-top: 0; }
.button { font-family: var(--sans); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.button-primary { background: linear-gradient(135deg, #b98e36, #e8c469, #b98e36); box-shadow: 0 2px 20px rgba(201,168,76,.24); }
.button-outline { background: rgba(201,168,76,.04); }
.hero-stack { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; margin-top: 38px; }
.hero-stack span { border: 1px solid var(--line); color: var(--ink-muted); font-family: var(--mono); font-size: 8px; letter-spacing: .13em; padding: 4px 9px; }
.auth-shell { min-height: 100vh; }
.auth-main { align-items: center; display: flex; justify-content: center; min-height: calc(100vh - 69px); padding: 64px 24px; position: relative; }
.auth-main::before { border: 1px solid rgba(201,168,76,.16); border-radius: 50%; content: ''; height: min(82vw, 680px); left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); width: min(82vw, 680px); }
.auth-card { background: rgba(26, 8, 6, .86); border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0,0,0,.28); max-width: 460px; padding: 38px; position: relative; width: 100%; z-index: 1; }
:root[data-theme='light'] .auth-card { background: rgba(255, 253, 248, .9); box-shadow: 0 24px 70px rgba(86,57,21,.12); }
.auth-card h1 { color: var(--gold-soft); font-family: var(--display); font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: .08em; line-height: 1; margin: 10px 0 14px; max-width: none; }
.auth-intro { color: var(--ink-muted); line-height: 1.5; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { color: var(--gold); display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; margin-bottom: 8px; text-transform: uppercase; }
.form-input { background: rgba(0,0,0,.16); border: 1px solid var(--line); color: var(--ink); font-family: var(--sans); font-size: 16px; outline: none; padding: 12px; width: 100%; }
:root[data-theme='light'] .form-input { background: rgba(255,255,255,.55); }
.form-input:focus { border-color: var(--gold); }
.auth-submit { border: 0; cursor: pointer; justify-content: center; margin-top: 5px; width: 100%; }
.text-button { background: transparent; border: 0; color: var(--gold-soft); cursor: pointer; font-family: var(--mono); font-size: 10px; margin: 14px auto 0; padding: 0; text-decoration: underline; }
.text-button:hover { color: var(--gold); }
.google-button { align-items: center; background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; display: flex; font-family: var(--sans); font-size: 14px; font-weight: 700; gap: 12px; justify-content: center; letter-spacing: .06em; padding: 13px; width: 100%; }
.google-button:hover { border-color: var(--gold); color: var(--gold-soft); }
.google-button span { align-items: center; background: #fff; border-radius: 50%; color: #4285f4; display: inline-flex; font-family: Arial, sans-serif; font-weight: 700; height: 20px; justify-content: center; width: 20px; }
.auth-divider { align-items: center; color: var(--ink-muted); display: flex; font-family: var(--mono); font-size: 9px; gap: 12px; margin: 22px 0; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { background: var(--line); content: ''; flex: 1; height: 1px; }
.error-message { color: #e37469; font-family: var(--mono); font-size: 11px; line-height: 1.45; margin: 15px 0 0; }
.auth-switch { color: var(--ink-muted); font-size: 14px; margin: 25px 0 0; text-align: center; }
.auth-switch a { color: var(--gold-soft); }
.auth-switch a:hover { text-decoration: underline; }
.auth-card button:disabled { cursor: not-allowed; opacity: .6; }
.hero-status, .scroll-cue { bottom: 30px; }
.section-heading h2, .vault-strip h2, .challenge-placeholder strong { font-family: var(--display); letter-spacing: .06em; text-transform: uppercase; }
.project-card { background: var(--surface-raised); }
@media (max-width: 760px) {
  .site-header { padding: 11px 5vw; }
  .brand-shield { height: 37px; width: 33px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 7px; }
  .hero { min-height: calc(100vh - 60px); padding-bottom: 125px; padding-top: 65px; }
  .hero-signal { font-size: 7px; line-height: 1.5; }
  .hero-signal span { display: none; }
  .hero-emblem { width: 90px; }
  .auth-main { min-height: calc(100vh - 60px); padding: 36px 16px; }
  .auth-card { padding: 28px 22px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .hero-divider span { font-size: 7px; }
  .hero-status { bottom: 77px; }
  .scroll-cue { bottom: 28px; }
}

@keyframes float-slow { 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* --- AUTHENTICATION PAGES --- */
.auth-page { display: flex; flex-direction: column; min-height: 100vh; }
.auth-shell { display: flex; flex-direction: column; flex: 1; }
.auth-main { display: flex; align-items: center; justify-content: center; flex: 1; padding: 40px 5vw; }

.auth-card { 
  background: var(--surface-raised); 
  border: 1px solid var(--line); 
  padding: 40px; 
  width: 100%; 
  max-width: 440px; 
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.auth-card .eyebrow { margin-bottom: 10px; }
.auth-intro { color: var(--ink-muted); font-size: 14px; margin-bottom: 30px; }

/* Google Button */
.google-button { 
  display: flex; align-items: center; justify-content: center; gap: 10px; 
  width: 100%; padding: 12px; background: #ffffff; color: #000000; 
  font-family: var(--sans); font-weight: 600; font-size: 14px; 
  border: none; cursor: pointer; transition: background 0.2s ease; 
}
.google-button:hover { background: #e4e4e4; }
.google-button span { font-weight: 900; font-size: 16px; } /* Simple G logo */

/* Divider */
.auth-divider { 
  display: flex; align-items: center; text-align: center; margin: 25px 0; 
  color: var(--ink-muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; 
}
.auth-divider::before, .auth-divider::after { 
  content: ''; flex: 1; border-bottom: 1px solid var(--line); 
}
.auth-divider span { padding: 0 10px; }

/* Form Elements */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { 
  display: block; font-family: var(--mono); font-size: 11px; 
  color: var(--gold); margin-bottom: 8px; text-transform: uppercase; 
}
.form-input { 
  width: 100%; padding: 12px; background: var(--surface); 
  border: 1px solid var(--line); color: var(--ink); 
  font-family: var(--sans); font-size: 16px; outline: none; transition: border-color 0.3s;
}
.form-input:focus { border-color: var(--gold-soft); }
.field-status { color: var(--ink-muted); font-family: var(--mono); font-size: 10px; line-height: 1.4; margin: 7px 0 0; }
.password-strength { align-items: center; display: flex; gap: 4px; margin-top: 8px; }
.password-strength span { background: var(--line); height: 4px; width: 25%; }
.password-strength strong { color: var(--ink-muted); font-family: var(--mono); font-size: 9px; font-weight: 400; margin-left: 6px; }
.password-strength[data-level='1'] span:nth-child(1), .password-strength[data-level='2'] span:nth-child(-n+2) { background: #d26b52; }
.password-strength[data-level='3'] span:nth-child(-n+3) { background: #d4aa4f; }
.password-strength[data-level='4'] span { background: #72ad68; }

/* Password Toggle */
.password-input { position: relative; display: flex; align-items: center; }
.password-toggle { 
  position: absolute; right: 12px; background: transparent; border: none; 
  color: var(--ink-muted); font-family: var(--mono); font-size: 11px; 
  text-transform: uppercase; cursor: pointer; padding: 0;
}
.password-toggle:hover { color: var(--gold-soft); }

/* Submit & Links */
.auth-submit { width: 100%; justify-content: center; margin-top: 10px; }
.text-button { 
  background: transparent; border: none; color: var(--gold-soft); 
  font-family: var(--mono); font-size: 11px; cursor: pointer; 
  margin-top: 15px; text-decoration: underline; text-underline-offset: 4px;
}
.error-message { 
  color: #ff6b6b; font-family: var(--mono); font-size: 11px; 
  margin-top: 15px; padding: 10px; background: rgba(255,107,107,0.1); border: 1px solid #ff6b6b;
}
.auth-switch { 
  margin-top: 30px; font-family: var(--sans); font-size: 14px; 
  color: var(--ink-muted); text-align: center; 
}
.auth-switch a { color: var(--gold-soft); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; text-underline-offset: 4px; }

.dashboard-layout { display: grid; gap: 36px; grid-template-columns: 220px minmax(0, 1fr); margin: 0 auto; max-width: 1440px; padding: 42px 5vw 80px; }
.sidebar-nav { align-self: start; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; padding-right: 20px; position: sticky; top: 24px; }
.sidebar-nav button { background: transparent; border: 1px solid transparent; color: var(--ink-muted); cursor: pointer; font-family: var(--mono); font-size: 11px; padding: 12px; text-align: left; text-transform: uppercase; }
.sidebar-nav button:hover, .sidebar-nav button.active { background: rgba(201,168,76,.08); border-color: var(--line); color: var(--gold-soft); }
.dashboard-content { min-width: 0; }
.dashboard-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 28px; }
.profile-block { align-items: center; display: flex; gap: 16px; min-width: 0; }
.profile-img { background: var(--surface-raised); border: 1px solid var(--gold); border-radius: 50%; height: 62px; object-fit: cover; width: 62px; }
.dashboard-panel { background: rgba(26,8,6,.72); border: 1px solid var(--line); padding: 28px; }
.dashboard-panel-title { color: var(--gold-soft); font-family: var(--display); font-size: 30px; letter-spacing: .04em; margin: 10px 0 12px; }
.dashboard-copy, .task-instructions { color: var(--ink-muted); line-height: 1.5; }
.task-panel { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
.task-panel h3 { color: var(--gold-soft); font-family: var(--display); font-size: 25px; margin: 8px 0 12px; }
.task-panel-heading { align-items: flex-start; display: flex; gap: 18px; justify-content: space-between; }
.task-icon { color: var(--gold); font-size: 24px; }
.lifeline-icon { color: #e37469; }
.task-deadline, .task-used, .task-success { color: var(--gold-soft); font-family: var(--mono); font-size: 11px; line-height: 1.5; }
.task-form { display: grid; gap: 14px; margin-top: 22px; max-width: 680px; }
.task-form label { color: var(--gold); display: grid; font-family: var(--mono); font-size: 10px; gap: 7px; text-transform: uppercase; }
.task-roster { display: grid; gap: 10px; margin-top: 26px; }
.task-roster-item { align-items: center; border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: space-between; padding: 14px; }
.task-roster-item strong { color: var(--ink); font-family: var(--sans); font-size: 17px; }
.task-roster-item > span { color: var(--ink-muted); font-family: var(--mono); font-size: 10px; margin-right: auto; }
.task-choice-row, .qr-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.whatsapp-handoff { align-items: center; border: 1px solid var(--line); display: flex; gap: 18px; margin-top: 22px; padding: 14px; }
.whatsapp-handoff img { background: #fff; height: 120px; object-fit: contain; width: 120px; }
.whatsapp-handoff.qr-expanded img { height: 180px; width: 180px; }
.member-role-button:disabled, .button:disabled { cursor: wait; opacity: .6; }

/* Responsive layout safeguards */
html, body { max-width: 100%; overflow-x: hidden; }
img, canvas { max-width: 100%; }
.site-header { min-height: 69px; }
.hero-content { min-width: 0; }
.project-card, .dashboard-panel { min-width: 0; }

@media (max-width: 1050px) {
  .site-header { flex-wrap: nowrap; }
  .site-header .site-nav { flex: 0 1 auto; }
  .site-nav { position: relative; }
  .nav-menu-toggle { display: inline-flex; }
  .nav-links { background: var(--surface-raised); border: 1px solid var(--line); box-shadow: 0 14px 32px rgba(0, 0, 0, .3); display: none; flex-direction: column; gap: 0; min-width: min(240px, calc(100vw - 32px)); padding: 6px; position: absolute; right: 0; top: calc(100% + 8px); z-index: 12; }
  .site-nav.is-open { z-index: 20; }
  .site-nav.is-open::after { background: rgba(0, 0, 0, .3); content: ''; inset: 0; pointer-events: none; position: fixed; z-index: 1; }
  .site-nav.is-open .nav-links { display: flex; }
  .site-nav.is-open .nav-menu-toggle { position: relative; z-index: 23; }
  .nav-links > a { color: var(--ink) !important; display: block; padding: 11px 10px; width: 100%; }
  .site-header { padding-left: 4vw; padding-right: 4vw; }
  .hero { padding-left: 4vw; padding-right: 4vw; }
  .section-pad { padding-left: 4vw; padding-right: 4vw; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card:last-child { grid-column: 1 / -1; }
  .dashboard-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; padding-left: 4vw; padding-right: 4vw; }
  .sidebar-nav button { font-size: 14px; }
  .dashboard-header { align-items: flex-start; gap: 20px; }
  .file-table { min-width: 600px; }
  .dashboard-panel { overflow-x: auto; }
}

@media (max-width: 760px) {
  .site-header { align-items: center; gap: 14px; padding: 11px 16px; }
  .brand { min-width: 0; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-nav { flex-shrink: 0; }
  .nav-menu-toggle { min-height: 44px; min-width: 44px; }
  .hero { min-height: 650px; padding: 72px 16px 125px; }
  .hero h1 { font-size: clamp(2.8rem, 17vw, 5rem); letter-spacing: .1em; padding-left: .1em; }
  .hero-collective { letter-spacing: .3em; padding-left: .3em; }
  .hero-intro { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 12px; margin-left: auto; margin-right: auto; max-width: 280px; width: 100%; }
  .hero-actions .button { justify-content: center; width: 100%; }
  .hero-status { bottom: 82px; left: 16px; max-width: calc(100% - 32px); }
  .status-time { margin-left: auto; }
  .scroll-cue { bottom: 30px; left: 16px; }
  .section-pad { padding: 64px 16px; }
  .section-heading { margin-bottom: 34px; }
  h2 { font-size: clamp(2rem, 12vw, 3.5rem); }
  .section-heading > p:last-child, .vault-strip > p { font-size: 16px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card:last-child { grid-column: auto; }
  .project-card { min-height: 270px; padding: 18px; }
  h3 { font-size: 24px; margin-top: 48px; }
  .vault-strip .button { max-width: 100%; }
  .site-footer { align-items: flex-start; flex-wrap: wrap; margin: 0 16px; }
  .site-footer span:last-child { margin-left: 0; }
  .auth-main { padding: 32px 16px; }
  .auth-card { max-width: 100%; padding: 28px 20px; }
  .auth-card h1 { font-size: clamp(2.3rem, 12vw, 3.6rem); }
  .dashboard-layout { display: block; padding: 24px 16px 48px; }
  .sidebar-nav { border-bottom: 1px solid var(--line); border-right: 0; flex-direction: row; gap: 4px; margin-bottom: 26px; overflow-x: auto; padding: 0 0 12px; }
  .sidebar-nav button { flex: 0 0 auto; font-size: 11px; padding: 9px 11px; white-space: nowrap; }
  .dashboard-header { align-items: stretch; flex-direction: column; margin-bottom: 22px; }
  .profile-block { gap: 13px; }
  .profile-img { flex: 0 0 50px; height: 50px; width: 50px; }
  .dashboard-header .hero-actions { align-items: stretch; max-width: none; }
  .dashboard-header .button { width: 100%; }
  .dashboard-panel { padding: 18px; }
  .dashboard-panel-title { font-size: 22px; }
}

@media (max-width: 760px) {
  .dashboard-panel[data-panel-content='vault'] { overflow: hidden; }
  .dashboard-panel[data-panel-content='vault'] .material-form,
  .dashboard-panel[data-panel-content='vault'] .form-input { max-width: 100%; min-width: 0; }
  .dashboard-panel[data-panel-content='vault'] .file-table { display: block; min-width: 0; width: 100%; }
  .dashboard-panel[data-panel-content='vault'] .file-table thead { display: none; }
  .dashboard-panel[data-panel-content='vault'] .file-table tbody,
  .dashboard-panel[data-panel-content='vault'] .file-table tr,
  .dashboard-panel[data-panel-content='vault'] .file-table td { display: block; width: 100%; }
  .dashboard-panel[data-panel-content='vault'] .file-table tr { border: 1px solid var(--line); margin-bottom: 12px; padding: 10px; }
  .dashboard-panel[data-panel-content='vault'] .file-table td { border-bottom: 0; display: grid; gap: 8px; grid-template-columns: 86px minmax(0, 1fr); padding: 8px 0; overflow-wrap: anywhere; }
  .dashboard-panel[data-panel-content='vault'] .file-table td::before { color: var(--gold); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
  .dashboard-panel[data-panel-content='vault'] .file-table td:nth-child(1)::before { content: 'Name'; }
  .dashboard-panel[data-panel-content='vault'] .file-table td:nth-child(2)::before { content: 'Type'; }
  .dashboard-panel[data-panel-content='vault'] .file-table td:nth-child(3)::before { content: 'Uploader'; }
  .dashboard-panel[data-panel-content='vault'] .file-table td:nth-child(4)::before { content: 'Size'; }
}

@media (max-width: 420px) {
  .brand-copy small { max-width: 125px; }
  .site-nav > a:not(.nav-login) { display: none; }
  .nav-login { font-size: 9px !important; }
  .hero { min-height: 620px; }
  .hero-signal { font-size: 7px; letter-spacing: .08em; }
  .hero-emblem { width: 78px; }
  .hero-status { font-size: 8px; }
  .status-time { display: none; }
  .auth-card { padding-left: 16px; padding-right: 16px; }
}

/* Keep dense content usable between the established breakpoints. */
@media (max-width: 760px) {
  .site-header,
  .dashboard-header,
  .profile-block,
  .task-panel-heading,
  .quiz-heading,
  .quiz-leaderboard-heading {
    min-width: 0;
  }

  .site-header { flex-wrap: nowrap; }
  .brand-copy strong,
  .dashboard-panel-title,
  .task-panel h3,
  .quiz-title,
  .quiz-question,
  .vault-material h2,
  .notice-history-item h3 {
    overflow-wrap: anywhere;
  }

  .dashboard-content,
  .dashboard-panel,
  .task-panel,
  .member-card,
  .vault-material,
  .member-challenge-quiz,
  .quiz-leaderboard,
  .donation-panel {
    min-width: 0;
  }

  .dashboard-panel { overflow-x: hidden; }
  .dashboard-header .profile-block { align-items: flex-start; }
  .profile-block > div:last-child { min-width: 0; }
  .dashboard-header h1 { overflow-wrap: anywhere; }
  .profile-form-actions,
  .task-panel-heading,
  .whatsapp-handoff { align-items: flex-start; }
  .profile-form-actions { flex-wrap: wrap; }
  .task-panel-heading { flex-wrap: wrap; }
  .task-panel-heading .task-icon { flex: 0 0 auto; }

  .section-heading h1 { font-size: clamp(2.5rem, 14vw, 4.5rem); }
  .hero-divider span { max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
  .button { max-width: 100%; overflow-wrap: anywhere; }
  .member-modal-card { max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px 22px; }
}

@media (max-width: 420px) {
  .site-header { gap: 8px; }
  .brand-copy strong { font-size: 11px; letter-spacing: .12em; }
  .nav-links { max-width: calc(100vw - 32px); right: 0; }
  .dashboard-layout { padding-left: 16px; padding-right: 16px; }
  .dashboard-panel { padding: 16px; }
  .profile-block { gap: 10px; }
  .profile-block h1 { font-size: 20px !important; }
  .member-card-header { align-items: flex-start; flex-direction: column; }
  .quiz-leaderboard-list li { gap: 8px; grid-template-columns: 24px minmax(0, 1fr); }
  .leaderboard-score { grid-column: 2; }
}

/* Let member cards adapt to names and available column width. */
.members-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.member-card { min-width: 0; }
.member-card h3,
.member-name-button h3 {
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.member-name-button h3 { margin-top: 0; }

@media (max-width: 760px) {
  .members-grid { gap: 12px; }
  .member-card { padding: 14px; }
  .member-card h3,
  .member-name-button h3 { font-size: clamp(16px, 5vw, 20px); }
}

:root[data-theme='light'] body { background: #fff; color: #1a0a04; }
:root[data-theme='light'] body { background: transparent; }
:root[data-theme='light'] .site-shell,
:root[data-theme='light'] .auth-shell,
:root[data-theme='light'] .hero.crimson-radial,
:root[data-theme='light'] .projects,
:root[data-theme='light'] .vault-strip,
:root[data-theme='light'] .members-section,
:root[data-theme='light'] .challenges,
:root[data-theme='light'] .donation-section { background: transparent; }
:root[data-theme='light'] .site-header { background: rgba(255,255,255,.72); }
:root[data-theme='light'] .projects,
:root[data-theme='light'] .vault-strip,
:root[data-theme='light'] .members-section,
:root[data-theme='light'] .challenges,
:root[data-theme='light'] .donation-section { color: #1a0a04; }
:root[data-theme='light'] .project-card,
:root[data-theme='light'] .member-card,
:root[data-theme='light'] .quiz-leaderboard,
:root[data-theme='light'] .donation-panel { background: #fff; }
:root[data-theme='light'] .section-heading h2,
:root[data-theme='light'] .vault-strip h2,
:root[data-theme='light'] .quiz-title,
:root[data-theme='light'] .quiz-leaderboard-heading h3,
:root[data-theme='light'] .donation-question h3 { color: #1a0a04; }
:root[data-theme='light'] .section-heading > p:last-child,
:root[data-theme='light'] .vault-strip > p,
:root[data-theme='light'] .project-card p,
:root[data-theme='light'] .member-skills,
:root[data-theme='light'] .quiz-stats span,
:root[data-theme='light'] .quiz-feedback,
:root[data-theme='light'] .donation-help,
:root[data-theme='light'] .donation-dismissed { color: #4f392c; }
:root[data-theme='light'] .site-nav > a,
:root[data-theme='light'] .hero-translation,
:root[data-theme='light'] .hero-divider span,
:root[data-theme='light'] .hero-stack span,
:root[data-theme='light'] .scroll-cue { color: #3f2b20; }
:root[data-theme='light'] .member-challenge-quiz { background: #fff; }