/* ═══════════════════════════════════════════════════════════
   SCIOSOUND LMS — members.css
   Design system for the full member area.
   Fonts: Bebas Neue (display) + Barlow (body) — same as scionaugh.com
═══════════════════════════════════════════════════════════ */

/* ── RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Base palette — matches scionaugh.com */
  --base:          #0d0f12;
  --muted:         #111417;
  --muted2:        #141720;
  --white:         #f2ede4;
  --black:         #060709;
  --border:        rgba(242,237,228,0.08);
  --border-strong: rgba(242,237,228,0.16);

  /* Brand */
  --amber: #e8960a;
  --blue:  #2864b7;

  /* Stage accent colours */
  --s0: #6c63d4;
  --s1: #2864b7;
  --s2: #1a9e8a;
  --s3: #e8960a;
  --s4: #5ca84a;
  --s5: #c44d7a;
  --s6: #4a7fc4;
  --s7: #bb512f;

  /* Layout */
  --nav-h:     60px;
  --max-w:     1200px;
  --content-w: 780px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--base);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: 'Barlow', sans-serif; cursor: pointer; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── MEMBER NAV ────────────────────────────────────────── */
.m-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(13,15,18,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex; align-items: center;
}
.m-nav-inner {
  max-width: var(--max-w); margin: 0 auto; width: 100%;
  padding: 0 32px;
  display: flex; align-items: center; gap: 24px;
}
.m-nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 0.1em; color: var(--white);
  flex-shrink: 0;
}
.m-nav-logo span { color: var(--amber); }
.m-nav-links {
  display: flex; gap: 0; margin-left: auto;
}
.m-nav-link {
  padding: 10px 18px; background: none; border: none;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.32; color: var(--white);
  transition: opacity 0.2s; display: block;
}
.m-nav-link:hover { opacity: 0.65; }
.m-nav-link.active { opacity: 1; }
.m-nav-user {
  display: flex; align-items: center; gap: 14px;
  padding-left: 24px; border-left: 1px solid var(--border);
}
.m-nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); opacity: 0.75;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--white); flex-shrink: 0;
}
.m-nav-signout {
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; opacity: 0.28; color: var(--white);
  border: none; background: none; transition: opacity 0.2s;
}
.m-nav-signout:hover { opacity: 0.6; }

/* Page body offset for fixed nav */
.m-page { padding-top: var(--nav-h); min-height: 100vh; }


/* ── LOGIN / SIGNUP PAGE ───────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--base); position: relative; overflow: hidden;
}
.auth-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(40,100,183,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40,100,183,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}
.auth-accent {
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; background: var(--blue);
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; margin: 24px;
  background: var(--muted2); border: 1px solid var(--border);
  padding: 52px 44px;
}
.auth-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 0.1em; margin-bottom: 6px;
}
.auth-brand span { color: var(--amber); }
.auth-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.28; margin-bottom: 36px;
}
.auth-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px; letter-spacing: 0.04em; line-height: 0.9;
  margin-bottom: 36px;
}

/* Form fields */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.38;
}
.form-input {
  background: var(--muted); border: 1px solid var(--border);
  padding: 13px 16px; color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: 14px; outline: none;
  transition: border-color 0.2s; width: 100%;
}
.form-input:focus { border-color: var(--blue); }
.form-input::placeholder { color: rgba(242,237,228,0.2); }
.form-input.error { border-color: var(--s5); }

.form-error {
  font-size: 12px; color: #e06080; margin-top: -10px;
  margin-bottom: 8px; display: none;
}
.form-error.visible { display: block; }

.btn-auth {
  width: 100%; padding: 15px; margin-top: 8px;
  background: var(--amber); color: var(--black);
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; border: none; transition: filter 0.2s;
}
.btn-auth:hover { filter: brightness(0.9); }

.auth-footer {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 12px; opacity: 0.32; text-align: center; line-height: 1.75;
}
.auth-footer a { color: var(--amber); opacity: 1; }

.auth-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0; opacity: 0.2;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--white); }
.auth-divider span { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }

/* Consent checkbox (signup) */
.form-consent {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 20px; margin-top: 4px;
}
.form-consent input[type="checkbox"] {
  width: 16px; height: 16px; min-width: 16px;
  margin-top: 2px; accent-color: var(--amber); cursor: pointer;
}
.form-consent-label {
  font-size: 11px; line-height: 1.75; opacity: 0.45;
}
.form-consent-label a { color: var(--amber); opacity: 1; }


/* ── DASHBOARD ─────────────────────────────────────────── */
.dash-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 64px 32px 96px;
}

.dash-header { margin-bottom: 48px; }
.dash-greeting {
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px;
}
.dash-greeting::before { content: ''; width: 24px; height: 1.5px; background: var(--blue); }
.dash-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 7vw, 96px); line-height: 0.88;
  letter-spacing: 0.04em; margin-bottom: 36px;
}

/* Progress bar widget */
.progress-widget {
  padding: 24px 28px; background: var(--muted2);
  border: 1px solid var(--border); margin-bottom: 40px; max-width: 560px;
}
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.progress-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; opacity: 0.32;
}
.progress-fraction {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 0.06em;
}
.progress-track {
  height: 3px; background: var(--border-strong); position: relative; overflow: hidden;
}
.progress-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--blue); transition: width 0.6s ease;
}
.progress-stages {
  display: flex; gap: 6px; margin-top: 14px;
}
.progress-stage-dot {
  flex: 1; height: 2px; background: var(--border-strong); border-radius: 1px;
}
.progress-stage-dot.done { background: var(--blue); }
.progress-stage-dot.current { background: var(--amber); }

/* Upgrade banner — sits between fixed nav and .m-page */
.upgrade-banner {
  background: rgba(232,150,10,0.08); border-bottom: 1px solid rgba(232,150,10,0.2);
  padding: 12px 32px;
  position: relative; z-index: 90;
  /* Nav is fixed, so push banner below it */
  margin-top: var(--nav-h);
}
/* When banner is visible, remove .m-page's own top padding to avoid double gap */
.upgrade-banner:not([hidden]) + .m-page { padding-top: 0; }
.upgrade-banner-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
}
.upgrade-banner-text { font-size: 12px; opacity: 0.65; flex: 1; }
.upgrade-banner-cta {
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--amber); flex-shrink: 0;
}
.upgrade-banner-close {
  background: none; border: none; color: var(--white);
  font-size: 18px; opacity: 0.3; line-height: 1; padding: 0 4px;
  transition: opacity 0.2s; flex-shrink: 0;
}
.upgrade-banner-close:hover { opacity: 0.7; }

/* Tier nudge below heading (free users only) */
.dash-tier {
  font-size: 11px; opacity: 0.28; margin-top: -24px; margin-bottom: 36px;
  font-style: italic;
}

/* Continue CTA */
.dash-continue {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 32px; background: var(--amber); color: var(--black);
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 72px;
  transition: filter 0.2s, transform 0.15s;
}
.dash-continue:hover { filter: brightness(0.9); transform: translateY(-1px); }

/* Stage section */
.dash-stage { margin-bottom: 56px; }
.dash-stage-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.stage-pip { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stage-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px; letter-spacing: 0.06em;
}
.stage-mod-count {
  margin-left: auto; font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.22;
}

/* Module cards grid */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
}


/* ── MODULE CARD ───────────────────────────────────────── */
.mod-card {
  --stage-color: var(--blue);
  position: relative; overflow: hidden;
  background: var(--muted2); border: 1px solid var(--border);
  padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
  color: var(--white); text-decoration: none;
}
a.mod-card:not(.locked):hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
a.mod-card:not(.locked):hover .mod-card-title { opacity: 0.85; }
.mod-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--stage-color);
}

.mod-card-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 52px; letter-spacing: 0.04em; line-height: 1;
  opacity: 0.1; margin-bottom: 4px;
}
.mod-card-stage {
  font-size: 9px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.28;
}
.mod-card-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.mod-card-theme { font-size: 11px; opacity: 0.28; font-style: italic; }

.mod-card-footer {
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
/* Groups badge + check/lock on the right side of the card footer */
.mod-card-right {
  display: flex; align-items: center; gap: 10px;
}
.mod-card-status {
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; padding: 5px 10px;
}

/* Complete */
.mod-card.complete { border-color: rgba(255,255,255,0.06); }
.mod-card.complete .mod-card-num { opacity: 0.15; }
.mod-card.complete .mod-card-status {
  background: rgba(255,255,255,0.05);
  color: var(--stage-color);
}
.mod-check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--stage-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--black); flex-shrink: 0;
}

/* Current */
.mod-card.current {
  border-color: rgba(232,150,10,0.28);
  background: rgba(232,150,10,0.025);
}
.mod-card.current::before { background: var(--amber); }
.mod-card.current .mod-card-status {
  background: rgba(232,150,10,0.14);
  color: var(--amber);
}
.mod-card-cta {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber);
  display: flex; align-items: center; gap: 6px;
}

/* Locked */
.mod-card.locked { opacity: 0.45; pointer-events: none; }
.mod-card.locked::before { opacity: 0.18; }
.mod-card.locked .mod-card-status {
  background: rgba(242,237,228,0.04);
  color: rgba(242,237,228,0.25);
}
.mod-lock {
  font-size: 13px; opacity: 0.35;
}


/* ── MODULE PAGE ───────────────────────────────────────── */
.module-header {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 48px 32px 44px;
  position: relative;
}
.module-header::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--stage-color, var(--blue));
}
.module-header-inner { max-width: var(--content-w); margin: 0 auto; }

.module-back {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.3;
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 36px; transition: opacity 0.2s;
}
.module-back:hover { opacity: 0.6; }

.module-stage-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.45; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.module-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 10vw, 130px); line-height: 0.82;
  letter-spacing: 0.04em; opacity: 0.08; margin-bottom: -6px;
}
.module-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 4vw, 54px); line-height: 0.93;
  letter-spacing: 0.03em; margin-bottom: 20px;
}
.module-theme {
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.28;
  display: flex; align-items: center; gap: 14px;
}
.module-theme::before {
  content: ''; width: 24px; height: 1px; background: currentColor;
}

/* Block-count progress strip */
.module-progress-strip {
  background: var(--muted2); border-bottom: 1px solid var(--border);
  padding: 14px 32px;
}
.module-progress-strip-inner {
  max-width: var(--content-w); margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
}
.module-progress-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.28; flex-shrink: 0;
}
.module-progress-dots { display: flex; gap: 6px; }
.module-progress-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong); transition: background 0.3s;
}
.module-progress-dot.seen { background: var(--blue); }
.module-progress-dot.current-dot { background: var(--amber); }

/* Content area */
.module-content {
  max-width: var(--content-w); margin: 0 auto;
  padding: 0 32px 96px;
}

/* ── CONTENT BLOCKS ────────────────────────────────────── */
.content-block {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}
.content-block:last-of-type { border-bottom: none; }

/* Headspace */
.block-headspace {
  padding: 56px 52px; margin: 60px 0;
  background: var(--muted2); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.block-headspace::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--stage-color, var(--blue));
}
.block-headspace-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--stage-color, var(--blue));
  margin-bottom: 28px;
}
.block-headspace-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5.5vw, 64px); line-height: 0.88;
  letter-spacing: 0.03em; margin-bottom: 40px;
}
.block-headspace-theme {
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.28; margin-bottom: 36px;
  display: flex; align-items: center; gap: 14px;
}
.block-headspace-theme::before { content: ''; width: 20px; height: 1px; background: currentColor; }
.block-headspace-body p {
  font-size: clamp(14px, 1.8vw, 17px); line-height: 1.92;
  opacity: 0.65; margin-bottom: 20px;
}
.block-headspace-body p:last-child { margin-bottom: 0; }

/* Text */
.block-text {}
.block-text h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px; letter-spacing: 0.04em; margin-bottom: 20px;
}
.block-text p {
  font-size: 15px; line-height: 1.88; opacity: 0.6; margin-bottom: 18px;
}
.block-text p:last-child { margin-bottom: 0; }

/* Video */
.block-video {}
.block-video-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.block-video-label::before { content: ''; width: 20px; height: 1.5px; background: var(--blue); }
.block-video-frame {
  aspect-ratio: 16/9; background: var(--muted2);
  border: 1px solid var(--border); overflow: hidden; position: relative;
}
.block-video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.block-video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; opacity: 0.2;
}
.block-video-play {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; padding-left: 4px;
}
.block-video-placeholder span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.block-video-caption {
  margin-top: 14px; font-size: 12px; opacity: 0.3;
  font-style: italic; text-align: center;
}

/* App embed — sandboxed interactive mini-app; mirrors the video frame */
.block-app-embed {}
.block-app-embed-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.block-app-embed-label::before { content: ''; width: 20px; height: 1.5px; background: var(--blue); }
.block-app-embed-frame {
  aspect-ratio: 16/9; background: var(--muted2);
  border: 1px solid var(--border); overflow: hidden; position: relative;
}
.block-app-embed-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.block-app-embed-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; opacity: 0.2;
}
.block-app-embed-glyph {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.block-app-embed-placeholder span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.block-app-embed-title {
  margin-top: 14px; font-size: 12px; opacity: 0.3;
  font-style: italic; text-align: center;
}

/* Activity */
.block-activity {
  background: rgba(40,100,183,0.05);
  border: 1px solid rgba(40,100,183,0.18);
  padding: 36px 40px;
}
.block-activity-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.block-activity-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--blue);
}
.block-activity-time {
  margin-left: auto; font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 12px; border: 1px solid rgba(40,100,183,0.25);
  color: rgba(100,165,230,0.65); flex-shrink: 0;
}
.block-activity-brief {
  font-size: 16px; font-weight: 600; line-height: 1.45; margin-bottom: 28px;
}
.block-activity-instructions {
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 24px; border-top: 1px solid rgba(40,100,183,0.12);
  margin-bottom: 28px;
}
.block-activity-instructions li {
  display: flex; gap: 18px; align-items: flex-start;
  font-size: 14px; opacity: 0.65; line-height: 1.65;
}
.block-activity-instructions li::before {
  content: attr(data-n); flex-shrink: 0;
  font-family: 'Bebas Neue', sans-serif; font-size: 20px;
  color: var(--blue); opacity: 0.5; margin-top: 0px; width: 20px;
}

/* Activity submission form (Phase 8) */
.block-activity-form { display: flex; flex-direction: column; gap: 12px; }
.block-activity-textarea {
  background: var(--muted); border: 1px solid rgba(40,100,183,0.2);
  padding: 14px 16px; color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: 14px;
  resize: vertical; min-height: 100px; outline: none;
  transition: border-color 0.2s;
}
.block-activity-textarea:focus { border-color: var(--blue); }
.btn-submit-activity {
  align-self: flex-start; padding: 12px 28px;
  background: var(--blue); color: var(--white);
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; border: none; transition: filter 0.2s;
}
.btn-submit-activity:hover { filter: brightness(1.15); }
.btn-submit-activity:disabled { opacity: 0.55; cursor: default; filter: none; }

/* Prior-submission status line */
.block-activity-status { font-size: 11px; opacity: 0.4; font-style: italic; }

/* Submit feedback */
.block-activity-feedback { font-size: 12px; line-height: 1.5; }
.block-activity-feedback.is-ok { color: rgba(130,200,110,0.85); }
.block-activity-feedback.is-error { color: #e06080; }

/* Nerd (Go deeper) */
.block-nerd details {
  border: 1px solid var(--border); overflow: hidden;
}
.block-nerd summary {
  padding: 18px 24px; list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  background: var(--muted2); transition: background 0.15s;
  user-select: none;
}
.block-nerd summary::-webkit-details-marker { display: none; }
.block-nerd summary:hover { background: var(--muted); }
.block-nerd-icon {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; opacity: 0.5; flex-shrink: 0;
  transition: opacity 0.2s;
}
details[open] .block-nerd-icon { opacity: 0.8; }
.block-nerd-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.3;
}
.block-nerd-title { font-size: 14px; font-weight: 600; }
.block-nerd-toggle {
  margin-left: auto; font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; opacity: 0.28; transition: transform 0.2s;
}
details[open] .block-nerd-toggle { transform: rotate(45deg); }
.block-nerd-body {
  padding: 28px 24px; border-top: 1px solid var(--border);
}
.block-nerd-body p {
  font-size: 14px; line-height: 1.9; opacity: 0.55; margin-bottom: 16px;
}
.block-nerd-body p:last-child { margin-bottom: 0; }

/* Table */
.block-table { overflow-x: auto; }
.block-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.block-table th {
  padding: 12px 16px; text-align: left;
  font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0.38; border-bottom: 1px solid var(--border-strong);
  background: var(--muted2);
}
.block-table td {
  padding: 14px 16px; opacity: 0.6; line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.block-table tr:last-child td { border-bottom: none; }
.block-table tr:hover td { background: rgba(242,237,228,0.015); }

/* Image */
.block-image figure { display: flex; flex-direction: column; gap: 12px; }
.block-image img { width: 100%; border: 1px solid var(--border); }
.block-image figcaption {
  font-size: 12px; opacity: 0.3; font-style: italic; text-align: center;
}
.block-image-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: var(--muted2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.block-image-placeholder span {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.18;
}


/* ── COMPLETION CTA ────────────────────────────────────── */
.module-completion {
  margin: 64px 0 0;
  padding: 48px 52px;
  background: var(--muted2); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.module-completion::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px; background: var(--amber);
}
.module-completion-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 14px;
}
.module-completion-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px; letter-spacing: 0.04em; margin-bottom: 12px;
}
.module-completion-body {
  font-size: 14px; opacity: 0.45; line-height: 1.78;
  max-width: 440px; margin-bottom: 28px;
}
.btn-complete {
  display: inline-block; padding: 14px 36px;
  background: var(--amber); color: var(--black);
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; border: none; transition: filter 0.2s;
}
.btn-complete:hover { filter: brightness(0.9); }

/* Module nav (prev/next) */
.module-nav {
  display: flex; justify-content: space-between; align-items: stretch; gap: 2px;
  margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border);
}
.module-nav-btn {
  flex: 1; max-width: 300px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 24px; background: var(--muted2); border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.module-nav-btn:hover { border-color: var(--border-strong); }
.module-nav-btn.next { text-align: right; margin-left: auto; }
.module-nav-direction {
  font-size: 9px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.28;
}
.module-nav-title { font-size: 13px; font-weight: 600; line-height: 1.35; }


/* ── RESOURCES PAGE ────────────────────────────────────── */
.resources-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 64px 32px 96px;
}
.resources-header { margin-bottom: 72px; }
.resources-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.resources-eyebrow::before { content: ''; width: 24px; height: 1.5px; background: var(--blue); }
.resources-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 7vw, 96px); line-height: 0.88;
  letter-spacing: 0.04em; margin-bottom: 20px;
}
.resources-lead {
  font-size: 15px; opacity: 0.45; line-height: 1.8; max-width: 480px;
}

.resources-section { margin-bottom: 80px; }
.resources-section-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.resources-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--blue);
}
.resources-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 0.04em;
}
.resources-section-count {
  margin-left: auto; font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.22;
}

/* Search */
.resources-search-wrap { position: relative; margin-bottom: 20px; max-width: 480px; }
.resources-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  opacity: 0.28; font-size: 14px; pointer-events: none;
}
.resources-search {
  width: 100%; background: var(--muted2); border: 1px solid var(--border);
  padding: 13px 16px 13px 44px; color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.resources-search:focus { border-color: var(--blue); }
.resources-search::placeholder { color: rgba(242,237,228,0.2); }

/* Glossary */
.glossary-grid { display: flex; flex-direction: column; gap: 2px; }
.glossary-term {
  padding: 20px 24px; background: var(--muted2); border: 1px solid var(--border);
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start;
  transition: background 0.15s;
}
.glossary-term:hover { background: var(--muted); }
.glossary-term-word { font-size: 14px; font-weight: 700; }
.glossary-term-def { font-size: 13px; opacity: 0.5; line-height: 1.75; }
.glossary-term-module {
  display: inline-block; margin-top: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 3px 8px; background: rgba(40,100,183,0.1); color: rgba(100,165,230,0.65);
}

/* Downloads */
.downloads-list { display: flex; flex-direction: column; gap: 2px; }
.download-item {
  padding: 20px 24px; background: var(--muted2); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 20px; transition: background 0.15s;
}
.download-item:hover { background: var(--muted); }
.download-icon { font-size: 20px; opacity: 0.35; flex-shrink: 0; }
.download-info { flex: 1; }
.download-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.download-meta { font-size: 11px; opacity: 0.28; }
.download-btn {
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 9px 18px; border: 1px solid var(--border);
  background: none; color: var(--white); flex-shrink: 0;
  transition: border-color 0.2s;
}
.download-btn:hover { border-color: var(--border-strong); }
.download-btn:disabled { opacity: 0.3; cursor: default; }

/* Locked resource */
.download-item.locked { opacity: 0.4; pointer-events: none; }


/* ── ERROR STATE ───────────────────────────────────────── */
.fetch-error {
  padding: 64px 32px; text-align: center;
  border: 1px solid var(--border); background: var(--muted2);
}
.fetch-error-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 0.04em; margin-bottom: 12px;
}
.fetch-error-body { font-size: 13px; opacity: 0.38; line-height: 1.8; }
.fetch-error-action {
  display: inline-block; margin-top: 24px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue);
  background: none; border: none; cursor: pointer; opacity: 0.75;
  transition: opacity 0.2s;
}
.fetch-error-action:hover { opacity: 1; }

/* ── LOADING SKELETONS ─────────────────────────────────── */
.skel-card { height: 168px; border-radius: 0; }
.skel-bar-lg { height: 16px; width: 220px; margin-bottom: 20px; border-radius: 2px; }
.skel-bar-sm { height: 12px; width: 120px; border-radius: 2px; }
.skel-block { height: 220px; margin: 60px 0; border-radius: 0; }
.skel-row { height: 60px; margin-bottom: 2px; border-radius: 0; }

/* ── COMPLETION REVEAL ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.module-completion.revealed { animation: fadeUp 0.45s ease both; }

/* ── UTILITIES ─────────────────────────────────────────── */
.section-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.3; margin-bottom: 12px;
}

.badge {
  display: inline-block; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 10px;
}
.badge-free { background: rgba(92,168,74,0.14); color: rgba(130,200,110,0.7); }
.badge-paid { background: rgba(40,100,183,0.14); color: rgba(100,165,230,0.7); }

.loading-shimmer {
  background: linear-gradient(90deg, var(--muted2) 25%, var(--muted) 50%, var(--muted2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }


/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .glossary-term { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 680px) {
  :root { --content-w: 100%; }
  .dash-inner { padding: 40px 20px 64px; }
  .mod-grid { grid-template-columns: 1fr; }
  .m-nav-inner { padding: 0 20px; }
  .m-nav-links { display: none; }
  .module-header { padding: 36px 20px 32px; }
  .module-content { padding: 0 20px 64px; }
  .block-headspace { padding: 36px 24px; }
  .block-activity { padding: 28px 20px; }
  .module-completion { padding: 36px 24px; }
  .resources-inner { padding: 40px 20px 64px; }
  .auth-card { padding: 40px 28px; }
}

@media (max-width: 480px) {
  .module-nav { flex-direction: column; }
  .module-nav-btn { max-width: 100%; }
  .module-nav-btn.next { text-align: left; margin-left: 0; }
  .download-item { flex-wrap: wrap; }
  .download-btn { width: 100%; text-align: center; }
}
