/* ─────────────────────────────────────────────────────────────────
   MO(MEN)TUM — Members Portal Styles (Full Build)
   ───────────────────────────────────────────────────────────────── */

/* ── CRISIS FAB ──────────────────────────────────────────────────── */
.crisis-fab {
  position: fixed;
  bottom: max(1.5rem, var(--safe-b, 0px));
  right: max(1.5rem, var(--safe-r, 0px));
  z-index: 500;
}
.crisis-fab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(255,61,90,0.15);
  border: 1px solid rgba(255,61,90,0.4);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
  animation: crisisPulse 3s ease-in-out infinite;
}
.crisis-fab-btn:hover { background: rgba(255,61,90,0.25); border-color: var(--red); }
@keyframes crisisPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,61,90,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255,61,90,0); }
}
.crisis-fab-icon { font-size: 1.1rem; }
.crisis-fab-label { font-size: 0.85rem; }
.crisis-panel {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 280px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.crisis-title {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.crisis-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.crisis-line:hover { color: var(--white); }
.crisis-line:last-of-type { border-bottom: none; }
.crisis-line strong { color: var(--white); }
.crisis-tag {
  font-size: 0.7rem;
  background: rgba(228,195,74,0.12);
  color: var(--gold);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--display);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.crisis-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* ── PORTAL HERO ─────────────────────────────────────────────────── */
.portal-hero {
  background: radial-gradient(ellipse 80% 50% at 50% 20%, rgba(122,92,255,0.08) 0%, transparent 60%), var(--bg);
  min-height: 100svh;
}
.portal-hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.portal-hero-title { font-size: clamp(3rem, 9vw, 6.5rem); line-height: 0.92; margin-bottom: 1rem; }
.portal-hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); line-height: 1.6; max-width: 50ch; margin-bottom: 2.5rem; }

.portal-hero-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.portal-card {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease; cursor: pointer; text-decoration: none;
}
.portal-card:hover { border-color: var(--gold); background: rgba(228,195,74,0.04); transform: translateY(-4px); }
.portal-card--checkin { border-color: rgba(255,61,90,0.3); }
.portal-card--checkin:hover { border-color: var(--red); background: rgba(255,61,90,0.04); }
.portal-card-icon { font-size: 2rem; }
.portal-card-title { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.06em; color: var(--white); }
.portal-card-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }

@media (max-width: 900px) { .portal-hero-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .portal-hero-cards { grid-template-columns: 1fr; } }

/* ── PORTAL SECTION (shared) ─────────────────────────────────────── */
.portal-section { min-height: auto; padding-top: calc(var(--nav-h) + 60px); padding-bottom: 80px; }
.nav-back { color: var(--muted) !important; font-size: 0.9rem !important; }
.nav-back:hover { color: var(--gold) !important; }

/* ── DAILY CHECK-IN ──────────────────────────────────────────────── */
#checkin {
  background: radial-gradient(ellipse 60% 40% at 50% 40%, rgba(255,61,90,0.04) 0%, transparent 60%), var(--bg-2);
}
.checkin-inner { max-width: 640px; margin: 0 auto; width: 100%; }
.checkin-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.checkin-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; margin-bottom: 2rem; }

.checkin-tool { display: flex; flex-direction: column; gap: 1.5rem; }

.checkin-slider-wrap { text-align: center; }
.checkin-slider-label { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; margin-bottom: 1rem; }
.checkin-score {
  font-family: var(--display); font-size: clamp(5rem, 15vw, 8rem);
  color: var(--gold); line-height: 1; letter-spacing: 0.02em;
  transition: color 0.3s ease;
}
.checkin-score.is-low { color: var(--red); }
.checkin-score.is-high { color: #4ade80; }
.checkin-score-word { font-family: var(--display); font-size: 1.2rem; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }

.checkin-range {
  width: 100%; height: 8px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--red), var(--gold), #4ade80);
  border-radius: 4px; outline: none; cursor: pointer;
}
.checkin-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--bg); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.checkin-range::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; background: var(--white);
  border: 3px solid var(--bg); cursor: pointer;
}
.checkin-range-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 0.4rem; }

.checkin-emotion-label { font-family: var(--display); font-size: 1rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.5rem; }
.checkin-emotion-hint { font-size: 0.85rem; opacity: 0.6; }
.checkin-emotions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.checkin-emotion-btn {
  padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 20px;
  background: transparent; color: var(--muted); font-family: var(--body); font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s ease;
}
.checkin-emotion-btn:hover { border-color: rgba(228,195,74,0.4); color: var(--white); }
.checkin-emotion-btn.is-selected { background: rgba(228,195,74,0.12); border-color: var(--gold); color: var(--gold); }

.checkin-submit { align-self: center; margin-top: 0.5rem; }

/* Check-in result */
.checkin-result { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.checkin-result-card {
  text-align: center; padding: 2rem; border: 1px solid var(--border); border-radius: 16px;
  background: rgba(255,255,255,0.02); max-width: 480px; width: 100%;
}
.checkin-result-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.checkin-result-msg { font-size: 1.1rem; color: var(--muted); line-height: 1.5; margin-bottom: 1rem; }
.checkin-reframe {
  padding: 1.25rem; border: 1px solid rgba(228,195,74,0.2); border-radius: 10px;
  background: rgba(228,195,74,0.04); margin-bottom: 1rem; text-align: left;
}
.checkin-reframe-label { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.18em; color: var(--gold); margin-bottom: 0.4rem; }
.checkin-reframe-text { font-size: 1.1rem; color: var(--white); font-weight: 600; margin-bottom: 0.5rem; }
.checkin-reframe-move { font-size: 0.95rem; color: var(--muted); line-height: 1.5; }

.checkin-streak {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,0.03);
}
.checkin-streak-fire { font-size: 1.2rem; }
.checkin-streak-num { font-family: var(--display); font-size: 1.4rem; color: var(--gold); }
.checkin-streak-label { font-size: 0.85rem; color: var(--muted); }

.checkin-history-chart {
  display: flex; align-items: flex-end; gap: 3px; height: 60px; max-width: 300px; width: 100%;
}
.checkin-bar {
  flex: 1; border-radius: 2px 2px 0 0; min-width: 8px;
  background: var(--gold); opacity: 0.6; transition: height 0.3s ease;
}
.checkin-bar:last-child { opacity: 1; }

/* ── REFRAME ENGINE ──────────────────────────────────────────────── */
.reframe-engine {
  padding: 2rem; border: 1px solid rgba(228,195,74,0.15); border-radius: 16px;
  background: rgba(228,195,74,0.02); margin-bottom: 2.5rem; text-align: center;
}
.reframe-prompt {
  font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--white); letter-spacing: 0.04em; margin-bottom: 1.25rem;
}
.reframe-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.reframe-btn {
  padding: 0.55rem 1.1rem; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--muted); font-family: var(--display);
  font-size: 1rem; letter-spacing: 0.06em; cursor: pointer; transition: all 0.2s ease;
}
.reframe-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(228,195,74,0.06); transform: translateY(-2px); }

/* ── BEHAVIOURAL DICTIONARY ──────────────────────────────────────── */
#dictionary { background: radial-gradient(ellipse 60% 40% at 30% 50%, rgba(228,195,74,0.03) 0%, transparent 60%), var(--bg-2); }
.dict-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.dict-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.dict-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; max-width: 60ch; margin-bottom: 2rem; }

.dict-filter { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.dict-filter-btn {
  font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.1em;
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s ease;
}
.dict-filter-btn:hover { border-color: rgba(228,195,74,0.4); color: var(--white); }
.dict-filter-btn.is-active { background: rgba(228,195,74,0.1); border-color: var(--gold); color: var(--gold); }

.dict-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.dict-card {
  position: relative; padding: 1.5rem; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.015); cursor: pointer; transition: all 0.3s ease; overflow: hidden;
}
.dict-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.dict-card:hover::before { transform: scaleX(1); }
.dict-card:hover { border-color: rgba(228,195,74,0.3); background: rgba(228,195,74,0.03); transform: translateY(-2px); }
.dict-card-category { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); opacity: 0.7; margin-bottom: 0.4rem; }
.dict-card-word { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: 0.04em; color: var(--white); margin-bottom: 0.3rem; line-height: 1.1; }
.dict-card-conventional { font-size: 0.82rem; color: rgba(138,148,168,0.5); font-style: italic; text-decoration: line-through; margin-bottom: 0.6rem; }
.dict-card-definition { font-size: 0.95rem; color: var(--muted); line-height: 1.45; font-weight: 600; }
.dict-card-arrow { position: absolute; bottom: 1rem; right: 1rem; font-size: 1.2rem; color: var(--muted); opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; }
.dict-card:hover .dict-card-arrow { opacity: 1; transform: translateX(4px); }

/* Detail overlay */
.dict-detail-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(6,7,11,0.92);
  backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center;
  padding: 2rem; opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.dict-detail-overlay.is-open { opacity: 1; pointer-events: auto; }
.dict-detail-card {
  position: relative; max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem;
}
.dict-detail-close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  color: var(--muted); font-size: 1.4rem; cursor: pointer; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; transition: color 0.2s ease;
}
.dict-detail-close:hover { color: var(--white); }
.dict-detail-header { margin-bottom: 1.5rem; }
.dict-detail-category { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.dict-detail-word { font-family: var(--display); font-size: clamp(3rem, 8vw, 5rem); line-height: 0.92; margin: 0.3rem 0; letter-spacing: 0.02em; }
.dict-detail-conventional { font-size: 1rem; color: rgba(138,148,168,0.5); font-style: italic; text-decoration: line-through; }
.dict-detail-reframe {
  padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid rgba(228,195,74,0.2);
  border-radius: 10px; background: rgba(228,195,74,0.04);
}
.dict-detail-arrow { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.18em; color: var(--gold); margin-bottom: 0.5rem; }
.dict-detail-definition { font-size: clamp(1.2rem, 2.5vw, 1.6rem); color: var(--white); font-weight: 600; line-height: 1.4; }
.dict-detail-body { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.5rem; }
.dict-detail-section h4 { font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.dict-detail-section p { font-size: 1rem; color: var(--muted); line-height: 1.6; }
.dict-detail-quote { font-style: italic; font-size: 0.95rem; color: rgba(228,195,74,0.6); border-left: 2px solid rgba(228,195,74,0.3); padding-left: 1rem; line-height: 1.5; margin-bottom: 1rem; }
.dict-detail-quote:empty { display: none; }
.dict-detail-book-link { margin-top: 0.5rem; }

/* ── THE BOOK ────────────────────────────────────────────────────── */
#book { background: var(--bg); }
.book-inner { max-width: 900px; margin: 0 auto; width: 100%; }
.book-heading { font-size: clamp(3rem, 8vw, 6rem); line-height: 0.92; margin-bottom: 0.3rem; }
.book-subtitle { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--gold); font-style: italic; margin-bottom: 0.5rem; }
.book-lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem; }
.book-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* Pipeline */
.book-pipeline { margin-bottom: 2.5rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02); }
.book-pipeline-label { font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 1rem; }
.book-pipeline-steps { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.book-step {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--border); border-radius: 8px; font-size: 0.88rem; color: var(--muted);
  transition: all 0.2s ease; text-decoration: none;
}
.book-step:hover { border-color: var(--gold); color: var(--white); }
.book-step--done { border-color: rgba(74,222,128,0.3); }
.book-step-num {
  font-family: var(--display); font-size: 1rem; color: var(--gold);
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
}
.book-step--done .book-step-num { background: rgba(74,222,128,0.2); border-color: #4ade80; color: #4ade80; }
.book-step-arrow { color: var(--muted); opacity: 0.4; }

/* TOC */
.book-toc { border: 1px solid var(--border); border-radius: 12px; padding: 2rem; background: rgba(255,255,255,0.02); }
.book-toc-title { font-family: var(--display); font-size: 1.2rem; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 1.5rem; }
.book-toc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.book-toc-part { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem; border-left: 2px solid var(--border); transition: border-color 0.2s ease; }
.book-toc-part:hover { border-color: var(--gold); }
.book-toc-label { font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); opacity: 0.6; }
.book-toc-name { font-family: var(--display); font-size: 1.4rem; color: var(--white); letter-spacing: 0.04em; }
.book-toc-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
@media (max-width: 640px) { .book-toc-grid { grid-template-columns: 1fr; } .book-pipeline-steps { flex-direction: column; align-items: flex-start; } .book-step-arrow { transform: rotate(90deg); } }

/* ── 5 B's ASSESSMENT ────────────────────────────────────────────── */
#assessment { background: radial-gradient(ellipse 60% 40% at 70% 50%, rgba(122,92,255,0.04) 0%, transparent 60%), var(--bg-2); }
.assess-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.assess-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.assess-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 2rem; }
.assess-layout { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.assess-sliders { display: flex; flex-direction: column; gap: 1.5rem; }
.assess-slider-group {
  padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,0.015); transition: border-color 0.2s ease;
}
.assess-slider-group:hover { border-color: rgba(228,195,74,0.2); }
.assess-label {
  font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.06em; color: var(--white);
  display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem;
}
.assess-b-letter { color: var(--gold); }
.assess-val { margin-left: auto; font-size: 1.5rem; color: var(--gold); min-width: 2ch; text-align: right; }
.assess-range {
  width: 100%; height: 6px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.08); border-radius: 3px; outline: none; cursor: pointer;
}
.assess-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); cursor: pointer; box-shadow: 0 2px 8px rgba(228,195,74,0.4); }
.assess-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); cursor: pointer; }
.assess-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.4rem; opacity: 0.7; }
.assess-visual { display: flex; flex-direction: column; align-items: center; gap: 1rem; position: sticky; top: calc(var(--nav-h) + 2rem); }
#radar-chart { max-width: 340px; width: 100%; }
.assess-score-label { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.1em; color: var(--muted); }
.assess-score-num { color: var(--gold); font-size: 1.4rem; }
.assess-history { width: 100%; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.assess-history-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.75rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 6px; font-size: 0.8rem; color: var(--muted); }
.assess-history-score { font-family: var(--display); color: var(--gold); font-size: 1rem; }
@media (max-width: 900px) { .assess-layout { grid-template-columns: 1fr; } .assess-visual { position: static; } }

/* ── WEEKLY CHALLENGES ───────────────────────────────────────────── */
#challenges { background: var(--bg); }
.challenge-inner { max-width: 900px; margin: 0 auto; width: 100%; }
.challenge-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.challenge-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 2rem; }

.challenge-card {
  padding: 2rem; border: 2px solid var(--gold); border-radius: 16px;
  background: rgba(228,195,74,0.03); margin-bottom: 2rem;
}
.challenge-card-b { font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.18em; color: var(--gold); margin-bottom: 0.5rem; }
.challenge-card-title { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--white); line-height: 1; margin-bottom: 0.75rem; }
.challenge-card-desc { font-size: 1.05rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.5rem; max-width: 55ch; }
.challenge-done-btn { display: inline-flex; align-items: center; gap: 0.5rem; }
.challenge-done-btn.is-done { background: rgba(74,222,128,0.15); border-color: #4ade80; color: #4ade80; pointer-events: none; }

.challenge-history-title { font-family: var(--display); font-size: 1rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1rem; }
.challenge-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.challenge-hist-card {
  padding: 1rem; border: 1px solid var(--border); border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.challenge-hist-b { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--gold); opacity: 0.6; }
.challenge-hist-title { font-family: var(--display); font-size: 1.1rem; color: var(--white); margin: 0.2rem 0; }
.challenge-hist-status { font-size: 0.8rem; color: var(--muted); }
.challenge-hist-status.is-done { color: #4ade80; }

.challenge-community-stat { display: flex; align-items: baseline; gap: 0.5rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.02); margin-top: 2rem; }
.challenge-stat-num { font-family: var(--display); font-size: 2rem; color: var(--gold); }
.challenge-stat-label { font-size: 1rem; color: var(--muted); }

/* ── ANONYMOUS STORIES ───────────────────────────────────────────── */
#stories { background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(122,92,255,0.03) 0%, transparent 60%), var(--bg-2); }
.stories-inner { max-width: 900px; margin: 0 auto; width: 100%; }
.stories-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.stories-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 2rem; }

.stories-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.story-card {
  padding: 1.5rem; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.02); animation: pledgeFadeIn 0.4s ease;
}
.story-card-text { font-size: 1.05rem; color: var(--white); line-height: 1.55; margin-bottom: 0.75rem; font-style: italic; }
.story-card-meta { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; }

.stories-submit { margin-top: 1rem; }
.stories-submit-toggle {
  font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.08em;
  color: var(--gold); cursor: pointer; padding: 0.5rem 0; list-style: none;
}
.stories-submit-toggle::-webkit-details-marker { display: none; }
.stories-form { margin-top: 1rem; }
.stories-input {
  width: 100%; background: var(--bg-3); border: 1px solid var(--border); border-radius: 10px;
  color: var(--white); font-family: var(--body); font-size: 1.05rem; padding: 1rem 1.25rem;
  resize: vertical; min-height: 100px; outline: none; transition: border-color 0.2s ease; margin-bottom: 0.5rem;
}
.stories-input::placeholder { color: var(--muted); }
.stories-input:focus { border-color: var(--gold); }
.stories-form-row { display: flex; justify-content: space-between; align-items: center; }
.stories-char-count { font-size: 0.8rem; color: var(--muted); }

/* ── PLEDGE WALL ─────────────────────────────────────────────────── */
#wall { background: var(--bg); }
.wall-inner { max-width: 900px; margin: 0 auto; width: 100%; }
.wall-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.wall-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 2rem; }
.wall-form { margin-bottom: 2.5rem; }
.wall-input {
  width: 100%; background: var(--bg-3); border: 1px solid var(--border); border-radius: 10px;
  color: var(--white); font-family: var(--body); font-size: 1.05rem; padding: 1rem 1.25rem;
  resize: vertical; min-height: 80px; outline: none; transition: border-color 0.2s ease; margin-bottom: 0.5rem;
}
.wall-input::placeholder { color: var(--muted); }
.wall-input:focus { border-color: var(--gold); }
.wall-form-row { display: flex; justify-content: space-between; align-items: center; }
.wall-char-count { font-size: 0.8rem; color: var(--muted); }
.wall-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.wall-pledge { padding: 1.25rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.02); animation: pledgeFadeIn 0.4s ease; }
@keyframes pledgeFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.wall-pledge-text { font-size: 1rem; color: var(--white); line-height: 1.5; margin-bottom: 0.5rem; }
.wall-pledge-meta { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; }

/* ── SHAREABLE BADGE ─────────────────────────────────────────────── */
#badge { background: var(--bg-2); }
.badge-inner { max-width: 640px; margin: 0 auto; width: 100%; text-align: center; }
.badge-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.badge-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; margin-bottom: 2rem; }
.badge-preview { margin-bottom: 1.5rem; display: flex; justify-content: center; }
#badge-canvas { max-width: 360px; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--border); }
.badge-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ── RESOURCE DIRECTORY ──────────────────────────────────────────── */
#resources { background: var(--bg); }
.resource-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.resource-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.resource-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 2rem; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.resource-card {
  padding: 1.5rem; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.02); transition: all 0.2s ease; text-decoration: none;
}
.resource-card:hover { border-color: rgba(228,195,74,0.3); background: rgba(228,195,74,0.03); transform: translateY(-2px); }
.resource-name { font-family: var(--display); font-size: 1.4rem; color: var(--white); letter-spacing: 0.04em; margin-bottom: 0.5rem; }
.resource-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.75rem; }
.resource-meta {
  font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.12em;
  color: var(--gold); opacity: 0.7;
}

/* ── EMPTY STATE ──────────────────────────────────────────────────── */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem 2rem; border: 1px dashed var(--border); border-radius: 12px; }
.empty-state-text { font-size: 1rem; color: var(--muted); font-style: italic; }

/* ── SCROLL REVEAL ───────────────────────────────────────────────── */
.portal-body .reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.75s ease, transform 0.75s ease; }
.portal-body .reveal.is-visible { opacity: 1; transform: none; }
