@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ============================================================
   LET-iReview-U — modern student theme (2026)
   Palette: blue / green with amber energy accents.
   ============================================================ */
:root {
  /* Primary blue family (aliases kept for compatibility with inline styles) */
  --navy-darker: #0d2b4a;
  --navy-dark:   #0f3a5f;
  --navy:        #2563eb;
  --navy-light:  #60a5fa;
  /* Accent gradients */
  --gold:        #ffb020;
  --gold-light:  #ffd666;
  --violet:      #16a34a;
  --pink:        #0d9488;
  --teal:        #14b8a6;
  /* Semantic */
  --green:       #16a34a;
  --red:         #ef4444;
  --bg-soft:     #edf5f9;
  --text:        #16324a;
  --text-muted:  #5f7d95;
  /* Surfaces (light values; redefined under [data-theme="dark"]) */
  --surface:     #ffffff;
  --surface-2:   #f4f8fb;
  --line:        #e3ebf3;
  /* Radii */
  --radius-lg:   20px;
  --radius-md:   14px;
  --radius-sm:   10px;
  /* Gradients */
  --grad-primary: linear-gradient(120deg, #2563eb, #16a34a);
  --grad-cta:     linear-gradient(120deg, #ffb020, #ff9d3d);
  --grad-hero:    linear-gradient(135deg, #0a2744 0%, #0f4880 40%, #1f7a6d 80%, #16a34a 130%);
  /* Shadows */
  --shadow-soft:  0 10px 30px rgba(37, 99, 235, .08);
  --shadow-hover: 0 16px 40px rgba(37, 99, 235, .16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-soft);
  color: var(--text);
  font-family: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: 'liga';
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Soft ambient glows behind content */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 480px at 100% -10%, rgba(22, 163, 74, .10), transparent 60%),
    radial-gradient(700px 420px at -5% 30%, rgba(37, 99, 235, .08), transparent 60%),
    radial-gradient(600px 400px at 55% 110%, rgba(20, 184, 166, .07), transparent 60%);
}

a { text-decoration: none; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.2px; }

::selection { background: rgba(37, 99, 235, .22); }

/* ----- custom scrollbar ----- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #9ec0f0, #60a5fa); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Brand ---------- */
.brand-mark {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; color: #fff;
}
.brand-mark .brand-icon {
  width: 40px; height: 40px; border-radius: 14px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-darker);
  font-size: 1.15rem;
  box-shadow: 0 8px 18px rgba(255, 176, 32, .35);
  transform: rotate(-6deg);
  transition: transform .2s ease;
}
.brand-mark:hover .brand-icon { transform: rotate(0deg) scale(1.05); }
.brand-mark small {
  display: block; font-weight: 500; font-size: .64rem;
  color: var(--gold-light); letter-spacing: .08em;
}

/* ---------- Topbar (glass) ---------- */
.app-topbar {
  background: linear-gradient(120deg, rgba(10, 39, 68, .92), rgba(15, 72, 128, .92));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: .7rem 1rem;
  box-shadow: 0 8px 28px rgba(8, 42, 74, .28);
  position: sticky; top: 0; z-index: 1030;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.app-topbar .streak-pill,
.app-topbar .level-pill,
.app-topbar .points-pill,
.app-topbar .tier-pill {
  background: rgba(255, 255, 255, .10);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  border-radius: 999px;
  padding: .3rem .75rem;
  font-size: .78rem;
  font-weight: 600;
}
.app-topbar .streak-pill i { color: #ffb347; }
.app-topbar .level-pill i { color: var(--gold-light); }
.app-topbar .points-pill i { color: var(--gold-light); }
.app-topbar .tier-pill {
  background: linear-gradient(120deg, rgba(255, 176, 32, .38), rgba(255, 157, 61, .30));
  border-color: rgba(255, 176, 32, .35);
}
.app-topbar .tier-pill i { color: var(--gold-light); }
.app-topbar .dropdown-menu { border-radius: 16px; border: none; box-shadow: var(--shadow-hover); }
.app-topbar .dropdown-menu .dropdown-item { border-radius: 10px; font-weight: 500; }
.app-topbar .dropdown-menu .dropdown-item:hover { background: #e3f0fb; }

.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad-cta); color: var(--navy-darker);
  font-weight: 800; font-size: .9rem; margin-right: .45rem;
  box-shadow: 0 3px 8px rgba(255, 176, 32, .35);
}

/* ---------- Rewards shop ---------- */
.reward-card .item-icon {
  width: 64px; height: 64px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.reward-card .owned-badge { background: #e6fbf3; color: #047857; border-radius: 999px; padding: .25rem .6rem; font-size: .72rem; font-weight: 700; }
.reward-card .flair-active { box-shadow: 0 0 0 3px rgba(20, 184, 166, .45); }

/* ---------- Type-aware practice options ---------- */
.exam-choice {
  display: block; width: 100%; text-align: left;
  border: 2px solid #dce8f3; border-radius: var(--radius-md);
  padding: .8rem 1rem; margin-bottom: .6rem; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .12s ease;
}
.exam-choice:hover { border-color: var(--navy-light); cursor: pointer; transform: translateY(-1px); }
.exam-choice.selected { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.exam-choice.selected .letter { background: var(--grad-primary); color: #fff; }
.exam-choice .letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 10px;
  background: #e3f0fb; color: var(--navy); font-weight: 700; font-size: .85rem;
  margin-right: .6rem;
}
.match-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.match-row select { max-width: 240px; border-radius: 10px; }
.multi-hint { font-size: .8rem; color: var(--text-muted); }

/* ---------- Sidebar (desktop) ---------- */
.app-sidebar {
  background: linear-gradient(180deg, #0d2b4a 0%, #155e87 55%, #178a6f 100%);
  min-height: 100vh;
  padding: 1.25rem 1rem;
  position: sticky; top: 0;
}
.app-sidebar .nav-link {
  color: rgba(255, 255, 255, .78);
  border-radius: var(--radius-md);
  padding: .65rem .9rem;
  margin-bottom: .25rem;
  font-weight: 600;
  font-size: .92rem;
  display: flex; align-items: center; gap: .65rem;
  transition: background .15s ease, transform .12s ease, color .15s ease;
}
.app-sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.app-sidebar .nav-link.active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .4);
}
.app-sidebar .nav-link:hover:not(.active) {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  transform: translateX(3px);
}
.app-sidebar hr { opacity: .3; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(37, 99, 235, .12);
  display: flex;
  justify-content: space-around;
  padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom));
  z-index: 1030;
  box-shadow: 0 -8px 24px rgba(8, 42, 74, .10);
}
.bottom-nav a {
  color: var(--text-muted);
  font-size: .66rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex: 1;
  border-radius: 14px;
  padding: .15rem .3rem;
  transition: color .15s ease;
}
.bottom-nav a i { font-size: 1.25rem; }
.bottom-nav a.active { color: var(--navy); font-weight: 700; }
.bottom-nav a.active i {
  background: var(--grad-primary);
  color: #fff;
  border-radius: 12px;
  padding: 0 .45rem;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .35);
}

@media (min-width: 992px) {
  .bottom-nav { display: none; }
}
@media (max-width: 991.98px) {
  .app-sidebar { display: none; }
  body { padding-bottom: 84px; }
  main { padding-bottom: 1rem; }
  .app-topbar { flex-wrap: wrap; gap: .4rem; }
}

/* ---------- Timer ---------- */
.timer-pill {
  background: #ffe7e7; color: var(--red); font-weight: 800;
  border: 1px solid #ffd0d0;
  border-radius: 999px; padding: .35rem .9rem; font-size: .9rem;
  font-variant-numeric: tabular-nums;
  min-width: 108px; text-align: center;
  box-shadow: 0 4px 12px rgba(239, 68, 68, .12);
}

/* ---------- Mock exam item map ---------- */
.item-map-btn { font-weight: 700; border-radius: 8px; }
.item-map-btn.answered { background: var(--grad-primary); color: #fff; border-color: transparent; }
.item-map-btn.current { box-shadow: 0 0 0 3px var(--gold); }

/* ---------- Progress ---------- */
.progress-thin { height: 8px; border-radius: 999px; background: #dce8f3; overflow: hidden; }
.progress-thin .progress-bar { border-radius: 999px; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid rgba(37, 99, 235, .07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-flat { border-radius: var(--radius-md); }

.hero-progress-card {
  background: var(--grad-hero);
  color: #fff;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}
.hero-progress-card::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(300px 200px at 90% 10%, rgba(20, 184, 166, .35), transparent 65%),
    radial-gradient(260px 200px at 10% 100%, rgba(255, 176, 32, .25), transparent 65%);
  pointer-events: none;
}
.hero-progress-card .progress { background: rgba(255, 255, 255, .18); height: 10px; border-radius: 999px; }
.hero-progress-card .progress-bar { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.hero-progress-card .col-4 > .fw-bold { text-shadow: 0 2px 8px rgba(0, 0, 0, .25); }

.stat-chip {
  background: #fff;
  border: 1px solid rgba(37, 99, 235, .07);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-chip .stat-value { font-size: 1.35rem; font-weight: 800; color: var(--navy-dark); }
.stat-chip .stat-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

.quick-action {
  background: #fff;
  border: 1px solid rgba(37, 99, 235, .08);
  border-radius: var(--radius-md);
  padding: 1rem .5rem;
  text-align: center;
  color: var(--text);
  font-weight: 700;
  font-size: .82rem;
  box-shadow: var(--shadow-soft);
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
}
.quick-action:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--navy); }
.quick-action i { font-size: 1.6rem; display: block; margin-bottom: .4rem; }
.quick-action.qa-review i { color: #2563eb; }
.quick-action.qa-practice i { color: #0ea5e9; }
.quick-action.qa-quiz i { color: #16a34a; }
.quick-action.qa-mock i { color: #0d9488; }

.badge-pill { border-radius: 999px; font-weight: 700; font-size: .72rem; padding: .35em .75em; }

.subject-card { border-left: 5px solid var(--gold); }
.subject-card.cat-gen_ed { border-left-color: #2563eb; }
.subject-card.cat-prof_ed { border-left-color: #16a34a; }
.subject-card.cat-specialization { border-left-color: var(--gold); transition: transform .15s ease, box-shadow .15s ease; }
.subject-card.cat-specialization:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.badge-tile {
  text-align: center;
  padding: 1rem .5rem;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid rgba(37, 99, 235, .07);
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease;
}
.badge-tile:hover { transform: translateY(-3px); }
.badge-tile .badge-icon {
  width: 56px; height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .5rem;
  font-size: 1.5rem;
}
.badge-tile.earned .badge-icon { background: var(--grad-cta); color: #4a2c00; box-shadow: 0 6px 14px rgba(255, 157, 61, .35); }
.badge-tile.locked .badge-icon { background: #eef0f5; color: #b7bfcf; }
.badge-tile.locked { opacity: .65; }

.leaderboard-row {
  display: flex; align-items: center; gap: .85rem;
  padding: .7rem .5rem; border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.leaderboard-row:hover { background: rgba(37, 99, 235, .04); }
.leaderboard-row.top1 { background: linear-gradient(90deg, rgba(255, 176, 32, .16), transparent); }
.leaderboard-row.top2 { background: linear-gradient(90deg, rgba(180, 180, 180, .16), transparent); }
.leaderboard-row.top3 { background: linear-gradient(90deg, rgba(205, 127, 50, .16), transparent); }
.rank-circle {
  width: 36px; height: 36px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; background: #eef0f5; color: #3a4152; flex-shrink: 0;
}
.rank-circle.gold { background: linear-gradient(145deg, var(--gold-light), var(--gold)); color: #4a2c00; box-shadow: 0 4px 10px rgba(255, 176, 32, .4); }
.rank-circle.silver { background: linear-gradient(145deg, #d4d7e2, #aab0c2); color: #333; }
.rank-circle.bronze { background: linear-gradient(145deg, #d99a5d, #b56a2e); color: #fff; }

.choice-option {
  display: block;
  padding: .85rem 1rem;
  border: 2px solid #dce8f3;
  border-radius: var(--radius-md);
  margin-bottom: .6rem;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .12s ease;
  background: #fff;
}
.choice-option:hover { border-color: var(--navy-light); transform: translateY(-1px); }
.choice-option input { margin-right: .6rem; }
.choice-option.selected { border-color: var(--navy); background: #e8f4fc; box-shadow: 0 0 0 4px rgba(37, 99, 235, .10); }
.choice-option.correct { border-color: var(--green); background: #eafbf3; }
.choice-option.incorrect { border-color: var(--red); background: #fff0f0; }

.progress-bar { transition: width .3s ease; }

/* ---------- Buttons ---------- */
.btn-gold {
  background: linear-gradient(120deg, var(--gold), var(--gold-light));
  color: #4a2c00; font-weight: 700; border: none;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(255, 176, 32, .35);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-gold:hover { color: #4a2c00; filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(255, 176, 32, .4); }
.btn-navy {
  background: var(--grad-primary); color: #fff; border: none; font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-navy:hover { background: var(--grad-primary); color: #fff; filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(37, 99, 235, .38); }

/* ---------- Bootstrap chrome ---------- */
.btn { border-radius: 12px; font-weight: 600; }
.btn-outline-secondary, .btn-outline-light, .btn-outline-primary { border-radius: 12px; }
.form-control, .form-select {
  border-radius: 12px;
  border-color: #d5e4ef;
  padding: .6rem .85rem;
  font-weight: 500;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}
.form-label { font-weight: 600; }

.alert { border-radius: 14px; border: none; }
.table > :not(caption) > * > * { padding: .7rem .6rem; }
.progress { background: #dce8f3; border-radius: 999px; }

/* ---------- Auth screens ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-hero);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}
.auth-wrapper::before,
.auth-wrapper::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  pointer-events: none;
}
.auth-wrapper::before {
  width: 380px; height: 380px;
  background: #16a34a;
  top: -120px; right: -90px;
  animation: floatBlob 14s ease-in-out infinite alternate;
}
.auth-wrapper::after {
  width: 420px; height: 420px;
  background: #0ea5e9;
  bottom: -150px; left: -110px;
  animation: floatBlob 18s ease-in-out infinite alternate-reverse;
}
@keyframes floatBlob {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.15); }
}
.auth-card {
  max-width: 440px; width: 100%;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 24px 60px rgba(8, 30, 50, .4);
  position: relative;
  z-index: 1;
}
.brand-icon {
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  color: var(--navy-darker);
  border-radius: 16px;
}

/* ---------- Content niceties ---------- */
.lesson-content { line-height: 1.75; font-size: 1.02rem; }
.lesson-content p { margin-bottom: 1rem; }

.streak-flame { color: #ff8a3d; filter: drop-shadow(0 2px 4px rgba(255, 138, 61, .4)); }

/* ---------- Small helpers ---------- */
.text-brand { color: var(--navy) !important; }
.bg-brand-soft { background: #e3f0fb; }
.fw-800 { font-weight: 800; }
.subtle-hover { transition: transform .15s ease, box-shadow .15s ease; }
.subtle-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* ---------- Tiny fade-up for mission/chart bars ---------- */
@keyframes riseIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.dash-in { animation: riseIn .35s ease both; }

/* ============================================================
   DARK MODE — enabled by data-theme="dark" on <html>.
   A body.dark or <html data-theme="dark"> re-tints surfaces and
   drives Bootstrap 5.3 CSS variables.
   ============================================================ */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-soft:     #0b1626;
  --surface:     #16263c;
  --surface-2:   #0f2138;
  --line:        #2a3f57;
  --text:        #e5eef7;
  --text-muted:  #8ba3bd;
  --navy-light:  #7db4ff;
  --shadow-soft:  0 10px 30px rgba(0, 0, 0, .38);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, .5);

  /* Bootstrap 5.3 theme hooks */
  --bs-body-bg:                #0b1626;
  --bs-body-color:             #e5eef7;
  --bs-secondary-color:        #8ba3bd;
  --bs-emphasis-color:         #f1f7fc;
  --bs-border-color:           #2a3f57;
  --bs-border-color-translucent: rgba(255, 255, 255, .08);
  --bs-secondary-bg:           #16263c;
  --bs-tertiary-bg:            #0f2138;
  --bs-card-bg:                #16263c;
  --bs-card-color:             #e5eef7;
  --bs-card-border-color:      #2a3f57;
  --bs-card-cap-bg:            #182b43;
  --bs-dropdown-bg:            #16263c;
  --bs-dropdown-color:         #e5eef7;
  --bs-dropdown-link-color:    #dbe7f2;
  --bs-dropdown-link-hover-bg: #223750;
  --bs-dropdown-link-hover-color: #ffffff;
  --bs-modal-bg:               #16263c;
  --bs-table-bg:               transparent;
  --bs-table-color:            #dbe7f2;
  --bs-table-border-color:     #2a3f57;
  --bs-table-striped-bg:       rgba(255, 255, 255, .025);
  --bs-table-striped-color:    #dbe7f2;
  --bs-table-active-bg:        rgba(255, 255, 255, .08);
}

[data-theme="dark"] body::before {
  opacity: .2;
}

/* App essentials */
[data-theme="dark"] .app-topbar { background: linear-gradient(120deg, rgba(6, 18, 34, .95), rgba(11, 42, 77, .95)); }
[data-theme="dark"] .app-topbar .dropdown-menu .dropdown-item:hover { background: #223750; }
[data-theme="dark"] .bottom-nav { background: rgba(11, 22, 38, .94); border-top-color: #1d324a; }
[data-theme="dark"] .app-sidebar { background: linear-gradient(180deg, #0d1b30, #0a1626); }

[data-theme="dark"] .card,
[data-theme="dark"] .stat-chip,
[data-theme="dark"] .quick-action,
[data-theme="dark"] .badge-tile,
[data-theme="dark"] .exam-choice,
[data-theme="dark"] .choice-option,
[data-theme="dark"] .fixture-option { background: var(--surface); color: var(--text); }
[data-theme="dark"] .stat-chip .stat-value { color: var(--navy-light); }

[data-theme="dark"] .exam-choice .letter,
[data-theme="dark"] .bg-brand-soft,
[data-theme="dark"] .choice-option.selected { background: #223750; color: var(--navy-light); }

[data-theme="dark"] .progress,
[data-theme="dark"] .progress-thin { background: #223750; }
[data-theme="dark"] .badge-tile.locked .badge-icon,
[data-theme="dark"] .rank-circle.none { background: #223750; color: #64748b; }
[data-theme="dark"] .badge-tile.locked { opacity: .55; }

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { background-color: var(--surface-2); color: var(--text); }
[data-theme="dark"] .form-control::placeholder { color: #6b859f; }

[data-theme="dark"] .table { color: var(--text); }
[data-theme="dark"] .table thead th { color: #c3d5e6; border-color: var(--line); }
[data-theme="dark"] .table td { border-color: var(--line); }

[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }

/* Landing page elements (public pages can inherit the persisted theme) */
[data-theme="dark"] .lp-section.bg-white { background: var(--bg-soft); }
[data-theme="dark"] .lp-card,
[data-theme="dark"] .lp-weight-card,
[data-theme="dark"] .lp-mock,
[data-theme="dark"] .lp-stat,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .pr-method-chip,
[data-theme="dark"] .pr-card { background: var(--surface); color: var(--text); }
[data-theme="dark"] .lp-mock-bar { background: var(--surface-2); }
[data-theme="dark"] .lp-mock-url { background: var(--surface); color: var(--text-muted); border-color: var(--line); }
[data-theme="dark"] .lp-mock-tile { background: var(--surface-2); border-color: var(--line); }
[data-theme="dark"] .faq-item { border-color: var(--line); }
[data-theme="dark"] .lp-lead,
[data-theme="dark"] .pr-fine { color: #9db4c9; }
[data-theme="dark"] .lp-pill { background: rgba(255, 255, 255, .14); }

/* Theme toggle button rides the topbar */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--gold-light);
  font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .18); color: #fff; }