/* Stride — Per-Screen Layout */

html, body {
  height: 100%;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────
   SCREEN SHELL
───────────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  position: relative;
  z-index: 1;
}
.screen.active { display: block; }

/* Fluid single-column wrapper (all app screens) — grows with viewport,
   stays one column per the chosen "scaled" responsive strategy. */
.mobile-wrap {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--space-4);
  padding-bottom: var(--space-12);
}

@media (min-width: 600px) {
  .mobile-wrap { padding: var(--space-6); padding-bottom: var(--space-12); }
}
@media (min-width: 900px) {
  .mobile-wrap { padding: var(--space-8); padding-bottom: var(--space-12); }
}

/* Wide dashboard variant — used on Home/Draft/Published/Collab only.
   Onboarding/Nudge intentionally keep plain .mobile-wrap (narrow, centered). */
.wrap-dashboard {
  max-width: var(--dashboard-w);
  padding-bottom: var(--space-6);
}

/* ─────────────────────────────────────────
   SCREEN 0 — LANDING PAGE
───────────────────────────────────────── */
/* Single hue-family gradient (blue/teal only), replacing the multi-hue
   ambient blobs for this screen — lightness varies top-to-bottom, hue
   never does. Opaque, so it fully occludes the blob layer beneath it. */
/* ─────────────────────────────────────────
   LANDING NAV
───────────────────────────────────────── */
#landing-nav {
  display: none; /* hidden by default; shown via body.on-landing below */
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: 88px;
  background: rgba(255,255,255,0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.on-landing #landing-nav { display: flex; }
body.on-landing .bg-blobs { display: none; }

.lnav-inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0 6vw;
  display: flex; align-items: center;
}

.lnav-logo { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
/* Force dark wordmark regardless of app theme (nav is always on white) */
.lnav-logo .navbar-logo-text { color: #0E1116 !important; }

.lnav-links {
  display: flex; align-items: center; gap: 28px;
  margin-left: auto; margin-right: 28px;
}
.lnav-link {
  font-size: 17px; font-weight: 500; color: #374151;
  text-decoration: none; transition: color 0.15s;
}
.lnav-link:hover { color: #0E1116; }

.lnav-cta {
  font-size: 15px; font-weight: 600;
  padding: 10px 24px; border-radius: 999px;
  background: #1746C8; color: #ffffff;
  border: none; cursor: pointer; white-space: nowrap;
  transition: opacity 0.15s;
}
.lnav-cta:hover { opacity: 0.88; }

/* ─────────────────────────────────────────
   LANDING SCREEN — all colors hardcoded (dark-mode-immune)
───────────────────────────────────────── */
#screen-landing {
  background: #f7f6f3;
  font-family: 'DM Sans', system-ui, sans-serif;
  overflow-y: auto; overflow-x: hidden;
  color: #0E1116; /* base dark color for all text inside */
}

/* ── Hero ── */
.lhero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #f7f6f3;
}

.lhero-copy {
  position: absolute;
  left: 6vw; top: 43%; transform: translateY(-50%);
  width: 46vw; max-width: 480px;
  z-index: 10;
  padding-top: 88px; /* clear fixed nav */
}

.lhero-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #1746C8;
  margin: 0 0 18px;
}

.lhero-h1 {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700; line-height: 0.96;
  letter-spacing: -0.038em; color: #0E1116;
  margin: 0 0 24px;
}

.lhero-body {
  font-size: clamp(14px, 1vw, 17px);
  color: #374151; line-height: 1.65; max-width: 380px;
  margin: 0 0 36px;
}

.lhero-ctas { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.lhero-btn-primary {
  font-size: 15px; font-weight: 600;
  padding: 14px 28px; border-radius: 999px;
  background: #1746C8; color: #ffffff;
  border: none; cursor: pointer;
  box-shadow: 0 2px 12px rgba(23,70,200,0.3);
  transition: opacity 0.15s, box-shadow 0.15s;
}
.lhero-btn-primary:hover { opacity: 0.9; box-shadow: 0 4px 20px rgba(23,70,200,0.4); }

.lhero-btn-replay {
  font-size: 15px; font-weight: 500; color: #374151;
  background: none; border: none; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.15s;
}
.lhero-btn-replay:hover { color: #0E1116; }

/* Blue floating panel */
.lhero-panel {
  position: absolute;
  left: 60vw; right: 6vw;
  top: 18vh; bottom: 8vh;
  background: #1746C8;
  border-radius: 30px;
  z-index: 5;
}

/* Hero figure */
.lhero-figure {
  position: absolute;
  left: 77vw; transform: translateX(-50%);
  bottom: 14vh;
  height: 60vh; width: auto;
  z-index: 6;
  pointer-events: none;
}

/* ── Built With ── */
.lbuilt {
  border-top: 1px solid #e2e5ea;
  padding: 120px 6vw 90px;
  text-align: center;
  background: #f7f6f3;
}

.lbuilt-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8a939f;
  margin: 0 0 36px;
}

.lbuilt-logos {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 40px 56px;
}

.lbuilt-logo {
  width: 28px; height: 28px;
  opacity: 0.7; vertical-align: middle;
}

.lbuilt-logo-name {
  font-size: 18px; font-weight: 600; color: #9aa1ad;
  vertical-align: middle;
  display: inline-flex; align-items: center; gap: 10px;
  margin-left: -44px; /* collapse with preceding svg */
}

/* Use flex items so we can pair svg+name */
.lbuilt-logos {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 16px 48px;
}

/* Each partner = svg immediately followed by a span — treat as a pair */
.lbuilt-logos svg.lbuilt-logo { flex-shrink: 0; }

/* Reset the negative margin hack — use a flex sub-group instead */
.lbuilt-logo-name { margin-left: 0; }

/* Wrap each pair */
.lbuilt-pair {
  display: flex; align-items: center; gap: 10px;
}

/* ── Below-the-fold content ── */
.landing-inner {
  max-width: var(--dashboard-w);
  margin: 0 auto;
  padding: 80px var(--space-5) var(--space-12);
  background: #ffffff;
}

.landing-section { margin-bottom: clamp(56px, 7vw, 80px); }
.landing-section-header { text-align: center; margin-bottom: var(--space-6); }

.landing-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: #1746C8;
  margin-bottom: var(--space-2);
}

.landing-section-title {
  font-size: clamp(22px, 1.6vw + 16px, 28px);
  font-weight: 800; letter-spacing: -0.3px;
  color: #0E1116;
}

.problem-cards, .how-steps, .feature-cards {
  display: flex; flex-direction: column; gap: var(--space-4);
  align-items: stretch;
}

@media (min-width: 900px) {
  .problem-cards, .how-steps, .feature-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4);
  }
}

.problem-card, .how-step, .feature-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4);
  border-radius: var(--radius-lg); padding: var(--space-6);
}

.problem-card {
  background: #f9f9f9; border: 1px solid #e8e8e8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.problem-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: rgba(231,76,60,0.10); border: 1px solid rgba(231,76,60,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #c0392b;
}
.problem-text { font-size: 15px; color: #374151; line-height: 1.65; }

.how-step {
  background: linear-gradient(160deg, rgba(23,70,200,0.06), #f9f9f9 60%);
  border: 1px solid rgba(23,70,200,0.15);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.how-step-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: rgba(23,70,200,0.10); border: 1px solid rgba(23,70,200,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #1746C8;
}
.how-step-icon .icon svg { stroke-width: 2; }
.how-step-text { font-size: 15px; color: #374151; line-height: 1.65; }

.feature-card {
  background: #ffffff;
  border: 1.5px solid rgba(23,70,200,0.2);
  box-shadow: 0 2px 8px rgba(23,70,200,0.08);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: rgba(23,70,200,0.10); display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0; color: #1746C8;
  border: 1px solid rgba(23,70,200,0.2);
}

.feature-card-title { font-size: 17px; font-weight: 600; color: #0E1116; margin-bottom: 4px; }
.feature-card-desc  { font-size: 15px; color: #374151; line-height: 1.65; }

.landing-cta { padding: var(--space-8) var(--space-6) var(--space-4); text-align: center; background: #ffffff; }
.landing-cta p { font-size: 13px; color: #6B7280; margin-top: var(--space-3); }

/* ── "What Stride does" body copy ───────────────── */
.landing-prose {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.landing-prose p {
  font-size: clamp(15px, 1.2vw + 12px, 17px);
  line-height: 1.8;
  color: #374151;
  margin-bottom: var(--space-4);
}
.landing-prose p:last-child { margin-bottom: 0; }

/* ── "AI + human" permission table ─────────────── */
.ai-human-intro {
  display: block;
  max-width: 600px;
  margin: 0 auto var(--space-7);
  font-size: clamp(15px, 1.2vw + 12px, 17px);
  line-height: 1.8;
  color: #374151;
}
#screen-landing .ai-human-intro { text-align: center; }
.ai-permission-eyebrow {
  max-width: 600px;
  margin: 0 auto var(--space-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9CA3AF;
}
.ai-human-permissions {
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #FAFAFA;
}
.ai-permission-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid #E5E7EB;
  align-items: baseline;
}
.ai-permission-row:last-child { border-bottom: none; }
.ai-permission-label {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.ai-permission-desc {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.65;
}
@media (max-width: 560px) {
  .ai-permission-row { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* ── Landing footer ─────────────────────────────── */
.landing-footer {
  width: 100%;
  box-sizing: border-box;
  padding: 56px var(--space-6) 80px;
  text-align: center;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
}
.landing-footer-byline {
  font-size: 13px;
  color: #9CA3AF;
  margin-bottom: var(--space-3);
}
.landing-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.landing-footer-links a {
  font-size: 13px;
  color: #6B7280;
  text-decoration: none;
}
.landing-footer-links a:hover { color: var(--color-stride-blue); }

/* Mobile: stack hero vertically */
@media (max-width: 768px) {
  .lhero { min-height: 100svh; }
  .lhero-copy {
    position: relative; left: auto; top: auto; transform: none;
    width: 100%; max-width: 100%; padding: 120px 24px 320px;
  }
  .lhero-panel {
    left: 10vw; right: 10vw;
    top: auto; bottom: 0; height: 260px;
  }
  .lhero-figure {
    left: 50%; bottom: 0; height: 250px;
  }
  .lnav-links { display: none; }
}

/* ─────────────────────────────────────────
   SCREEN LOGIN
───────────────────────────────────────── */
#screen-login { background: transparent; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--glass-shadow), inset 0 1px 1px var(--glass-highlight);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.login-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.login-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

.input-glass {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-glass:focus {
  outline: none;
  border-color: var(--color-stride-blue);
  box-shadow: 0 0 0 2px rgba(46, 127, 184, 0.2);
}

/* ─────────────────────────────────────────
   SCREEN 1 — ONBOARDING
───────────────────────────────────────── */
#screen-onboarding {
  background: linear-gradient(180deg, var(--landing-bg-1) 0%, var(--landing-bg-2) 50%, var(--landing-bg-3) 100%);
}

.onboarding-inner {
  max-width: 550px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Widen inner when profile payoff is active */
.onboarding-inner.payoff-wide {
  max-width: 920px;
}

.onboarding-logo {
  margin-bottom: var(--space-10);
  transform: scale(1.3);
  transform-origin: center;
}

.onboarding-step {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: var(--space-4);
  animation: stepFadeIn var(--motion-draft) ease-out;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  padding: var(--space-5);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
.onboarding-step.active { display: flex; }

@media (min-width: 600px) {
  .onboarding-step { padding: var(--space-8); }
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.onboarding-question {
  font-size: var(--fs-h2);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  text-align: center;
}

.onboarding-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.onboarding-chips .chip {
  font-size: 14px;
  padding: var(--space-2) var(--space-4);
  transition: all var(--motion-fast);
}

.onboarding-chips .chip.selected {
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(46,127,184,0.22);
}

.slider-wrap {
  width: 100%;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.slider-track {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--color-stride-blue) 50%, var(--color-pale-blue) 50%);
  outline: none;
  cursor: pointer;
}
.slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-stride-blue), var(--color-deep-blue));
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  background: var(--color-green-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--color-green);
}

/* Paste power-up step (between step 5 and profile payoff) */
.paste-powerup-header { text-align: center; }

.paste-powerup-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(46,127,184,0.18), rgba(46,127,184,0.08));
  border: 1px solid rgba(46,127,184,0.28);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-stride-blue);
  margin-bottom: var(--space-3);
}

.paste-journal-wrap {
  position: relative;
  width: 100%;
}

.paste-journal-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 160px;
  background: #FDFAF4;
  border: 1.5px solid #E4DFD0;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-primary);
  font-family: var(--font-family);
  resize: vertical;
  transition: border-color var(--motion-base), box-shadow var(--motion-base);
}
[data-theme="dark"] .paste-journal-textarea {
  background: rgba(255,249,235,0.06);
  border-color: rgba(228,223,208,0.25);
}
.paste-journal-textarea::placeholder { color: var(--text-muted); }
.paste-journal-textarea:focus {
  outline: none;
  border-color: var(--color-stride-blue);
  box-shadow: 0 0 0 3px rgba(46,127,184,0.12);
}

.paste-char-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-1);
  text-align: right;
}

/* ─────────────────────────────────────────
   SCREEN 2 — HOME
───────────────────────────────────────── */
#screen-home {
  background: linear-gradient(180deg, var(--landing-bg-1) 0%, var(--landing-bg-2) 50%, var(--landing-bg-3) 100%);
}

.home-section { margin-bottom: var(--space-6); }

/* Wide dashboard 2-col grid: main = pillar coverage, side = moment + ghost CTAs */
.home-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 900px) {
  .home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
    align-items: start;
  }
}
@media (min-width: 1200px) {
  .home-grid {
    grid-template-columns: 2.5fr 1fr;
    gap: var(--space-10);
  }
}

@media (max-width: 768px) {
  .home-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }
  .home-grid-main,
  .home-grid-side {
    width: 100%;
  }
}

.home-grid-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pillar-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 700px) {
  .pillar-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
  .pillar-item-header { flex-wrap: wrap; row-gap: 4px; }
}

.pillar-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.pillar-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.pillar-item-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pillar-item-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.moment-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: var(--space-4);
}

/* ─────────────────────────────────────────
   SCREEN 3 — STREAK NUDGE
───────────────────────────────────────── */
#screen-nudge {
  background: transparent;
}

.nudge-card {
  background: linear-gradient(160deg, rgba(245,166,35,0.22), rgba(245,166,35,0.08));
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-streak);
  padding: var(--space-8) var(--space-6);
  margin: var(--space-8) 0 var(--space-6);
  text-align: center;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

.nudge-flame {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-amber), #D4911F);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  box-shadow: var(--shadow-streak);
}

.nudge-headline {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.nudge-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.nudge-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 600px) {
  .nudge-actions {
    flex-direction: row;
  }
}

/* ─────────────────────────────────────────
   SCREEN 4 — DRAFT EDITOR
───────────────────────────────────────── */
#screen-draft {
  background: transparent;
}

.draft-section {
  margin-bottom: var(--space-5);
}

/* Wide dashboard 2-col editor: main = Hook/Story/Takeaway/CTA, side = Visuals */
.draft-grid {
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  .draft-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
    align-items: start;
  }
  .draft-grid-side {
    position: sticky;
    top: calc(var(--space-3) + 56px + var(--space-4));
  }
}
@media (min-width: 1200px) {
  .draft-grid {
    grid-template-columns: 2.5fr 1fr;
    gap: var(--space-10);
  }
}

.draft-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.draft-section-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-pale-blue);
  color: var(--color-deep-blue);
}

.draft-section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Hook option cards */
.hook-options { display: flex; flex-direction: column; gap: var(--space-2); }

.hook-card {
  background: var(--glass-surface);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  transition: border-color var(--motion-fast), background var(--motion-fast);
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}
.hook-card:hover { border-color: var(--color-sky-blue); }
.hook-card.selected {
  border-color: var(--color-stride-blue);
  background: rgba(46,127,184,0.16);
  color: var(--text-primary);
}

/* Story bullets — editable */
.story-bullets { display: flex; flex-direction: column; gap: var(--space-2); }
.story-bullet {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}
.story-bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-stride-blue);
  flex-shrink: 0;
  margin-top: 9px;
}
.story-bullet-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: var(--font-family);
  resize: none;
  padding: 0;
  min-height: 44px;
}
.story-bullet-textarea::placeholder { color: var(--text-muted); }

/* CTA chips */
.cta-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Generate button — sits in the draft-section-header */
.btn-generate {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-stride-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background var(--motion-fast), opacity var(--motion-fast);
  white-space: nowrap;
}
.btn-generate:hover:not(:disabled) { background: var(--color-deep-blue); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }

/* AI pulse — loading state while generating */
.ai-pulse-wrap {
  background: var(--glass-surface);
  border: 1.5px solid var(--color-stride-blue);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  animation: ai-pulse-glow 1.5s ease-in-out infinite;
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}
.ai-pulse-text {
  color: var(--color-stride-blue);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.ai-pulse-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-stride-blue);
  animation: ai-dot-bounce 1.2s ease-in-out infinite;
}
.ai-pulse-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-pulse-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,127,184,0); }
  50%       { box-shadow: 0 0 0 5px rgba(46,127,184,0.15); }
}
@keyframes ai-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-5px); opacity: 1; }
}

/* Draft output — editable generated post */
.draft-placeholder {
  background: var(--glass-surface);
  border: 1.5px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}
.draft-placeholder strong { color: var(--text-secondary); }

.draft-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 220px;
  background: var(--glass-surface);
  border: 1.5px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--fs-draft);
  line-height: 1.75;
  color: var(--text-primary);
  font-family: var(--font-family);
  resize: vertical;
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
  transition: border-color var(--motion-base);
}
.draft-textarea:focus {
  outline: none;
  border-color: var(--color-stride-blue);
  box-shadow: 0 0 0 3px rgba(46,127,184,0.12);
}

/* Inline error */
.draft-error-msg {
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-red-light);
  color: var(--color-red);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

/* Publish error — full-width banner fixed just above the sticky publish bar */
.draft-error-banner {
  position: fixed;
  bottom: 64px; /* sits above the ~64px tall sticky bar */
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--color-red-light);
  color: var(--color-red);
  font-size: 13px;
  line-height: 1.5;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid var(--color-red);
}
.draft-error-banner[hidden] { display: none; }

.draft-error-reconnect {
  flex-shrink: 0;
  background: var(--color-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 6px var(--space-3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
}
.draft-error-reconnect[hidden] { display: none; }

@media (min-width: 600px) {
  .draft-error-banner {
    bottom: calc(var(--space-4) + 64px);
  }
}

/* Visuals */
.visual-thumb {
  width: 100%;
  height: 140px;
  background: var(--glass-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-mist);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  position: relative;
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}
.visual-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}
.visual-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  gap: var(--space-1);
}

/* Sticky publish bar */
.draft-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--color-background-primary);
  padding: var(--space-3) var(--space-4);
  border-top: 0.5px solid var(--border-default);
}

@media (min-width: 600px) {
  .draft-sticky-bar {
    bottom: var(--space-4);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
  }
}

/* Keep the floating dev-menu / theme-toggle buttons clear of the
   sticky publish bar so they don't overlap it on the Draft screen. */
body:has(#screen-draft.active) #dev-menu,
body:has(#screen-draft.active) #theme-toggle {
  bottom: calc(var(--space-4) + 64px);
}

/* ─────────────────────────────────────────
   SCREEN 5 — PUBLISHED
───────────────────────────────────────── */
#screen-published {
  background: transparent;
}

.published-hero {
  text-align: center;
  padding: var(--space-10) 0 var(--space-8);
}

.published-icon {
  width: 72px;
  height: 72px;
  background: var(--color-green-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  color: var(--color-green);
}

.analytics-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.analytics-card {
  flex: 1;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}

.analytics-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.analytics-num.counting { color: var(--color-stride-blue); }

.analytics-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Wide dashboard 2-col: main = hero + analytics, side = pillar unlocked + CTA */
.published-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 900px) {
  .published-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
    align-items: start;
  }
  .published-grid-main .published-hero {
    text-align: left;
    padding: var(--space-6) 0 var(--space-6);
  }
  .published-grid-main .published-icon {
    margin: 0 0 var(--space-4);
  }
}
@media (min-width: 1200px) {
  .published-grid {
    grid-template-columns: 2.5fr 1fr;
    gap: var(--space-10);
  }
}

.published-grid-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ─────────────────────────────────────────
   SCREEN — COLLAB ENTRY
───────────────────────────────────────── */
#screen-collab-entry { background: transparent; }

/* Option buttons on entry default screen */
.collab-option-btn {
  align-items: center;
  justify-content: flex-start;
  height: auto;
  padding: 14px 18px;
  gap: 12px;
}
.collab-option-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.collab-option-label { font-size: 15px; font-weight: 600; }
.collab-option-sub   { font-size: 12px; font-weight: 400; opacity: 0.72; }

/* Proximity / remote chips */
.collab-method-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-4);
  margin-top: var(--space-1);
}
.chip-proximity {
  background: rgba(23,70,200,0.10);
  color: #1746C8;
}
[data-theme="dark"] .chip-proximity {
  background: rgba(91,163,208,0.15);
  color: #5BA3D0;
}
.chip-remote {
  background: rgba(39,174,96,0.10);
  color: #1E8449;
}
[data-theme="dark"] .chip-remote {
  background: rgba(39,174,96,0.15);
  color: #5dcb89;
}

/* QR countdown */
.collab-ttl-row {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: var(--space-1) 0 var(--space-3);
  font-size: 13px;
  color: var(--text-muted);
}
.collab-ttl-label { font-size: 12px; }
.collab-ttl-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono, 'Courier New', monospace);
  color: var(--text-primary);
  transition: color 0.4s ease;
  min-width: 2.6ch;
}
.collab-ttl-urgent { color: #E53E3E !important; }

/* Expired state */
.collab-expired-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  color: var(--color-stride-blue, #1746C8);
  cursor: pointer;
  text-decoration: underline;
}
.collab-qr-box.collab-qr-expired {
  opacity: 0.25;
  filter: grayscale(1);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* Keyword expiry line */
.collab-kw-expiry {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}

.collab-qr-box {
  display: inline-block;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-4);
}
.collab-qr-svg {
  width: 160px;
  height: 160px;
  display: block;
}
.collab-room-code {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
  font-family: var(--font-mono, 'Courier New', monospace);
}
.collab-keyword-badge {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  border-radius: 14px;
  padding: 18px 32px;
  margin-bottom: var(--space-4);
  font-family: var(--font-mono, 'Courier New', monospace);
  color: var(--text-primary);
}
.collab-waiting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.collab-waiting-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-stride-blue, #1746C8);
  animation: collabPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes collabPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.75); }
  50%       { opacity: 1;    transform: scale(1);    }
}

/* ─────────────────────────────────────────
   SCREEN 6 — COLLAB
───────────────────────────────────────── */
#screen-collab {
  background: transparent;
}

.collab-authors {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.collab-author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  font-weight: 500;
}

.collab-plus {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 300;
}

.collab-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.collab-merged-wrap,
.collab-publish-wrap {
  grid-column: 1 / -1;
}

@media (max-width: 420px) {
  .collab-columns { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) {
  .collab-columns {
    grid-template-columns: 1fr 2.5fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
    align-items: stretch;
  }
  .collab-columns > .collab-col:nth-child(1) { grid-column: 1; grid-row: 1; }
  .collab-columns > .collab-col:nth-child(2) { grid-column: 1; grid-row: 2; }
  .collab-merged-wrap {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
  }
  .collab-merged-wrap .card { flex-grow: 1; }
  .collab-publish-wrap {
    grid-column: 1 / -1;
  }
}

.collab-col {
  background: var(--glass-surface);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}

.collab-col-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.collab-col-label.blue  { color: var(--color-stride-blue); }
.collab-col-label.purple { color: #8E44AD; }

.collab-bullet {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  padding: 4px 0;
  border-bottom: 1px solid var(--border-default);
}
.collab-bullet:last-child { border-bottom: none; }

.collab-merged {
  border-left: 3px solid var(--color-stride-blue);
}

.coauthor-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.coauthor-tag {
  font-size: 13px;
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--pillar-leadership-bg);
  color: var(--pillar-leadership-text);
  font-weight: 500;
}

/* ─────────────────────────────────────────
   SCREEN 7 — ADMIN DASHBOARD (desktop)
───────────────────────────────────────── */
#screen-admin {
  background: transparent;
}

.admin-wrap {
  max-width: var(--dashboard-w);
  margin: 0 auto;
  padding: var(--space-6);
}

@media (max-width: 600px) {
  .admin-wrap { padding: var(--space-4); }
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

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

.metric-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 1px var(--glass-highlight), inset 0 0 20px rgba(255,255,255,0.05);
  padding: var(--space-5);
  transition: box-shadow var(--motion-base), transform var(--motion-base);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
.metric-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.metric-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--space-1);
}
.metric-sub {
  font-size: 13px;
  color: var(--color-green);
  margin-top: var(--space-1);
  font-weight: 500;
}

/* Admin cohort table */
.admin-table-wrap {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 1px var(--glass-highlight), inset 0 0 20px rgba(255,255,255,0.05);
  overflow: hidden;
  overflow-x: auto;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

@media (max-width: 700px) {
  .admin-table { min-width: 640px; }
}

.admin-table th {
  background: rgba(46,127,184,0.06);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--border-default);
}

.admin-table td {
  padding: var(--space-4) var(--space-5);
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-default);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(46,127,184,0.06); }

.admin-table .streak-num { font-weight: 600; color: var(--color-amber); }
.admin-table .streak-num.low { color: var(--text-muted); }

.admin-name-cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ─────────────────────────────────────────
   DEV MENU (screen jumper)
───────────────────────────────────────── */
#dev-menu {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: 999;
}

#dev-menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--glass-surface-strong);
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(46,127,184,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-stride-blue);
  transition: background var(--motion-fast), transform var(--motion-fast);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
#dev-menu-toggle:hover { transform: scale(1.06); }

#dev-menu-panel {
  display: none;
  position: absolute;
  bottom: 48px;
  right: 0;
  background: var(--glass-surface-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  padding: var(--space-2);
  min-width: 180px;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
#dev-menu-panel.open { display: block; }

.dev-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: background var(--motion-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dev-menu-item:hover { background: rgba(46,127,184,0.1); }
.dev-menu-item .num {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  width: 14px;
}

/* ─────────────────────────────────────────
   SCREEN 8 — CONNECT (real Supabase backend)
───────────────────────────────────────── */
#screen-connect { background: transparent; }

/* State panels — only one visible at a time */
.connect-state-wrap { display: none; }
.connect-state-wrap.active { display: block; }

/* Centered loading / auth card */
.connect-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: var(--space-6);
}

/* QR card */
.connect-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6);
}
.connect-qr-canvas {
  width: 200px;
  height: 200px;
  background: #fff;  /* QR codes need white background */
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-3);
  box-shadow: var(--shadow-md);
}
.connect-qr-canvas canvas,
.connect-qr-canvas img { width: 100%; height: 100%; display: block; }
.connect-qr-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Code entry row */
.connect-code-row {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}
.connect-code-row .stride-input { flex: 1; }
.connect-code-row .btn { flex-shrink: 0; }

/* Pending request row */
.connect-pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--glass-surface);
  border: 1.5px solid var(--color-amber);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}
.connect-pending-row .pending-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.connect-pending-row .pending-actions { display: flex; gap: var(--space-2); }

/* Connection row */
.connect-person-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-default);
}
.connect-person-row:last-child { border-bottom: none; }
.connect-person-info { flex: 1; min-width: 0; }
.connect-person-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.connect-person-headline { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Inline feedback messages */
.connect-feedback-ok  { color: var(--color-green); }
.connect-feedback-err { color: var(--color-red); }

/* ─────────────────────────────────────────
   SCREEN — LOGIN (animated marquee)
───────────────────────────────────────── */
.login-split {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.login-marquee-panel {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--color-background-secondary);
  display: none;
}

@media (min-width: 768px) {
  .login-marquee-panel { display: block; }
  .login-form-panel { width: 400px; flex-shrink: 0; }
}

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--bg-surface);
}

.login-form-inner { width: 100%; max-width: 320px; }

.login-marquee-track {
  display: flex;
  gap: 12px;
  padding: 12px;
  height: 100%;
}

.login-marquee-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.scroll-up      { animation: scrollUp   25s linear infinite; }
.scroll-down    { animation: scrollDown 30s linear infinite; }
.scroll-up-slow { animation: scrollUp   38s linear infinite; }

@keyframes scrollUp   { 0% { transform: translateY(0); }    100% { transform: translateY(-50%); } }
@keyframes scrollDown { 0% { transform: translateY(-50%); } 100% { transform: translateY(0); } }

.lm-card {
  background: var(--color-background-primary);
  border: 0.5px solid var(--border-default);
  border-radius: var(--border-radius-lg);
  padding: 14px 16px;
  flex-shrink: 0;
}
.lm-card-accent { background: rgba(26,95,138,0.08);  border-color: rgba(26,95,138,0.2); }
.lm-card-green  { background: rgba(39,174,96,0.08);  border-color: rgba(39,174,96,0.2); }
.lm-card-blue   { background: rgba(90,110,220,0.08); border-color: rgba(90,110,220,0.2); }

.lm-author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lm-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; overflow: hidden; }
.lm-name   { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.lm-title { font-size: 13px; font-weight: 600; color: var(--text-primary);   margin: 0 0 6px; line-height: 1.4; }
.lm-sub   { font-size: 12px; color: var(--text-secondary); margin: 0 0 8px; line-height: 1.5; }
.lm-meta  { font-size: 11px; color: var(--text-muted); }

.login-marquee-fade-top,
.login-marquee-fade-bottom {
  position: absolute; left: 0; right: 0;
  height: 80px; pointer-events: none; z-index: 2;
}
.login-marquee-fade-top    { top: 0;    background: linear-gradient(to bottom, var(--color-background-secondary), transparent); }
.login-marquee-fade-bottom { bottom: 0; background: linear-gradient(to top,    var(--color-background-secondary), transparent); }

@media (prefers-reduced-motion: reduce) {
  .scroll-up, .scroll-down, .scroll-up-slow { animation: none; }
}

/* ─────────────────────────────────────────
   SETTINGS — inner tab switcher
───────────────────────────────────────── */
.settings-inner-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.05);
  padding: 4px;
  border-radius: 999px;
}
[data-theme="dark"] .settings-inner-tabs {
  background: rgba(255,255,255,0.08);
}
.settings-inner-tab {
  flex: 1;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
[data-theme="dark"] .settings-inner-tab { color: #8FA3B8; }
.settings-inner-tab:hover { color: var(--text-primary); }
.settings-inner-tab.active {
  background: #fff;
  color: var(--color-stride-blue);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
[data-theme="dark"] .settings-inner-tab.active {
  background: rgba(255,255,255,0.13);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* ─────────────────────────────────────────
   SETTINGS — Data & Privacy tab
───────────────────────────────────────── */
.dp-intro-card {
  background: linear-gradient(135deg, rgba(10,102,194,0.08) 0%, rgba(10,102,194,0.04) 100%);
  border: 1px solid rgba(10,102,194,0.18);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
[data-theme="dark"] .dp-intro-card {
  background: linear-gradient(135deg, rgba(10,102,194,0.14) 0%, rgba(10,102,194,0.07) 100%);
  border-color: rgba(10,102,194,0.30);
}
.dp-section-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
}
.dp-user-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius-sm);
}
[data-theme="dark"] .dp-user-row {
  background: rgba(255,255,255,0.05);
}
.dp-user-avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
  flex-shrink: 0;
}
.dp-gcal-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10,102,194,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-stride-blue);
  flex-shrink: 0;
}
.dp-user-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}
.dp-user-email {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
}
.dp-store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.dp-store-col ul {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
}
.dp-store-col ul li {
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
}
.dp-store-col ul li:last-child { border-bottom: none; }
.dp-store-heading {
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--border-default);
}
.dp-store-yes .dp-store-heading { color: #27AE60; border-color: #27AE60; }
.dp-store-no  .dp-store-heading { color: var(--color-red); border-color: var(--color-red); }
.dp-store-yes ul li::before { content: "✓ "; color: #27AE60; font-weight: 700; }
.dp-store-no  ul li::before { content: "✗ "; color: var(--color-red); font-weight: 700; }

/* Danger button */
.btn-danger {
  background: var(--color-red);
  color: #fff;
  border: none;
  width: 100%;
}
.btn-danger:hover { background: #c0392b; color: #fff; }
[data-theme="dark"] .btn-danger { background: #c0392b; }
[data-theme="dark"] .btn-danger:hover { background: #e74c3c; }

/* Delete account modal */
.dp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-5);
}
.dp-modal-overlay[hidden] { display: none !important; }
.dp-modal-box {
  background: var(--bg-surface, #fff);
  border-radius: var(--radius-lg, 16px);
  padding: var(--space-7);
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}
[data-theme="dark"] .dp-modal-box {
  background: #1A2028;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
}

/* ─────────────────────────────────────────
   LOGIN — OAuth button connected states
───────────────────────────────────────── */
.btn-oauth.btn-connected {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}
.btn-oauth.btn-connected::after {
  content: '✓';
  position: absolute;
  right: var(--space-4);
  font-size: 16px;
  color: #27AE60;
}
