/* ===========================================================
   IB Business Mastery — Design System v2 "Aurora"
   Light pages punctuated by deep-blue bands. Gold is the action
   colour. Inter everywhere (tabular figures for data). Light and
   dark are both first-class; the student chooses.
   Legacy token names (--bg-base, --shadow-md…) are kept as aliases
   so every existing page and lesson.css/blog.css keep working.
   =========================================================== */

:root {
  /* Brand */
  --blue-deep:   #0F1F4D;
  --blue-primary:#1E3A8A;
  --blue-mid:    #3B82F6;
  --blue-glow:   #60A5FA;
  --blue-soft:   #93C5FD;
  --gold:        #FBBF24;
  --gold-deep:   #D97706;
  --green:       #10B981;
  --red:         #EF4444;

  /* Surfaces & text (light) */
  --bg:          #F7F9FC;
  --surface:     #FFFFFF;
  --surface-2:   #F1F5FB;
  --text-dark:   #1E293B;
  --text-soft:   #475569;
  --text-muted:  #64748B;
  --line:        #E2E8F0;
  --line-strong: #CBD5E1;
  --tint:        #EEF4FF;
  --tint-gold:   #FEF3C7;
  --tint-green:  #DCFCE7;
  --tint-red:    #FEE2E2;
  --on-gold:     #0F1F4D;

  /* Dark band (same in both themes) */
  --band:        #0F1F4D;
  --band-surface:rgba(255,255,255,.05);
  --band-line:   rgba(255,255,255,.1);
  --on-band:     #F1F5F9;
  --on-band-muted:#A9B8D6;

  /* Legacy aliases */
  --bg-base:     var(--surface);
  --bg-soft:     var(--surface-2);
  --bg-softer:   var(--line);
  --shadow-light:transparent;
  --shadow-dark: transparent;

  /* Radii */
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px; --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 180ms var(--ease);
  --t: 280ms var(--ease);

  /* Elevation (soft, blue-tinted) */
  --ring: 0 0 0 1px var(--line);
  --shadow-sm: 0 1px 2px rgba(15,31,77,.05), 0 0 0 1px var(--line);
  --shadow-md: 0 1px 2px rgba(15,31,77,.04), 0 12px 32px -18px rgba(15,31,77,.25), 0 0 0 1px var(--line);
  --shadow-lg: 0 2px 4px rgba(15,31,77,.04), 0 30px 60px -30px rgba(15,31,77,.35), 0 0 0 1px var(--line);
  --shadow-inset: inset 0 0 0 1px var(--line);
  --shadow-inset-sm: inset 0 0 0 1px var(--line);
  --shadow-pressed: 0 0 0 1px var(--line-strong);
  --shadow-glow: 0 8px 24px -12px rgba(217,119,6,.6);

  --nav-h: 72px;
  color-scheme: light;
}

/* Dark theme: explicit choice, or system preference with no choice made */
[data-theme="dark"] {
  --bg:          #0A1226;
  --surface:     #111D3F;
  --surface-2:   #0E1835;
  --text-dark:   #E8EEFA;
  --text-soft:   #AEBBD9;
  --text-muted:  #7F93C3;
  --line:        rgba(255,255,255,.1);
  --line-strong: rgba(255,255,255,.2);
  --tint:        rgba(59,130,246,.16);
  --tint-gold:   rgba(251,191,36,.16);
  --tint-green:  rgba(16,185,129,.16);
  --tint-red:    rgba(239,68,68,.16);
  --blue-primary:#93C5FD;
  --band:        #060D22;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 0 0 1px var(--line);
  --shadow-md: 0 12px 32px -18px rgba(0,0,0,.6), 0 0 0 1px var(--line);
  --shadow-lg: 0 30px 60px -30px rgba(0,0,0,.8), 0 0 0 1px var(--line);
  color-scheme: dark;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-mid); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--blue-primary); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-dark);
  line-height: 1.1;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); letter-spacing: -.015em; line-height: 1.3; }
h4 { font-size: 1.05rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; color: var(--text-soft); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6; }
.eyebrow {
  font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 1rem; display: inline-block;
}
.num, .tabular, .stat-num, .plan-price, .dash-stat-num, .admin-stat-num { font-variant-numeric: tabular-nums; }

/* ----- Layout ----- */
.container { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.narrow    { width: min(820px, 100% - 2rem); margin-inline: auto; }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ----- Skip link ----- */
.skip-link {
  position: absolute; left: -9999px; top: 1rem;
  background: var(--blue-deep); color: #fff;
  padding: .6rem 1rem; border-radius: var(--r-md);
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { left: 1rem; }

/* ----- Surfaces (legacy neumorphic names, now flat cards) ----- */
.neu, .neu-sm, .neu-lg { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.neu-sm { border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.neu-lg { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.neu-inset, .neu-inset-sm { background: var(--surface-2); border-radius: var(--r-md); box-shadow: var(--shadow-inset); }
.neu-circle, .neu-circle-inset { border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--nav-h);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand-logo { width: 38px; height: 38px; display: block; border-radius: 10px; box-shadow: none; background: transparent; flex: none; }
.brand-name {
  display: grid; line-height: 1.05;
  font-weight: 800; letter-spacing: -.02em; font-size: 1.02rem; color: var(--blue-primary);
}
.brand-name span { display: block; color: var(--text-soft); font-weight: 500; font-size: .92rem; }

.nav-list { list-style: none; display: flex; gap: .25rem; padding: 0; margin: 0; }
.nav-list a {
  display: inline-block; position: relative;
  padding: .5rem .8rem;
  font-size: .92rem; font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-list a::after {
  content: ""; position: absolute; left: .8rem; right: 100%; bottom: .25rem; height: 2px;
  background: var(--gold); border-radius: 1px; transition: right var(--t);
}
.nav-list a:hover { color: var(--text-dark); }
.nav-list a:hover::after { right: .8rem; }
.nav-list a[aria-current="page"] { color: var(--text-dark); font-weight: 600; }
.nav-list a[aria-current="page"]::after { right: .8rem; }
.header-actions { display: flex; gap: .5rem; align-items: center; }

.icon-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--line); cursor: pointer;
  background: var(--surface);
  color: var(--text-soft);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  transition: transform var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { transform: translateY(-1px); color: var(--text-dark); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .ico-moon { display: none; }
[data-theme="dark"] .icon-btn .ico-moon { display: block; }
[data-theme="dark"] .icon-btn .ico-sun { display: none; }

.menu-toggle { display: none; }
.nav-mobile-only { display: none; }
@media (max-width: 960px) {
  .nav-list { display: none; }
  .nav-list.open {
    display: flex; flex-direction: column; gap: .15rem;
    position: absolute; top: calc(var(--nav-h) + 6px); right: 1rem; left: 1rem;
    background: var(--surface);
    padding: .75rem;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
  }
  .nav-list.open a { padding: .75rem .9rem; font-size: 1rem; }
  .nav-list.open a::after { display: none; }
  .nav-list.open a[aria-current="page"] { background: var(--tint); color: var(--blue-primary); }
  .menu-toggle { display: grid; }
  .header-actions .btn { display: none; }
  .nav-mobile-only { display: block; border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .35rem; }
  .nav-list.open .nav-cta { background: var(--gold); color: var(--on-gold); font-weight: 700; text-align: center; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; cursor: pointer;
  border: 1px solid var(--line);
  font-family: inherit; font-weight: 600; font-size: .95rem;
  padding: .8rem 1.4rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-dark);
  transition: transform var(--t), box-shadow var(--t), background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  text-decoration: none;
  position: relative; overflow: hidden;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-strong); color: var(--text-dark); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--gold);
  color: var(--on-gold);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s;
}
.btn-primary:hover { color: var(--on-gold); box-shadow: 0 14px 30px -12px rgba(217,119,6,.7); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-blue { background: var(--blue-deep); color: #fff; border-color: transparent; }
.btn-blue:hover { color: #fff; }
[data-theme="dark"] .btn-blue { background: var(--blue-mid); }
/* Home: one gold button per screen (the hero CTA), so the header CTA goes blue */
body.home .site-header .btn-primary { background: var(--blue-deep); color: #fff; border-color: transparent; }
body.home .site-header .btn-primary::after { display: none; }
[data-theme="dark"] body.home .site-header .btn-primary { background: var(--blue-mid); }
.btn-lg { font-size: 1.05rem; padding: 1rem 1.8rem; }
.btn-sm { font-size: .85rem; padding: .55rem 1rem; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn[disabled], .btn:disabled { opacity: .55; pointer-events: none; }

/* ----- Badges & chips ----- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .35rem .7rem;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--blue-primary);
}
.badge-free { background: var(--tint-green); color: #166534; }
[data-theme="dark"] .badge-free { color: #86EFAC; }
.badge-premium { background: var(--gold); color: var(--on-gold); }
.badge-soft { background: var(--surface-2); color: var(--text-soft); font-weight: 600; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  cursor: pointer; border: 1px solid var(--line);
  font-family: inherit; font-size: .85rem; font-weight: 500;
  padding: .5rem 1rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-soft);
  transition: all var(--t-fast);
}
.chip:hover { color: var(--text-dark); border-color: var(--line-strong); }
.chip[aria-pressed="true"], .chip.active {
  background: var(--blue-deep); border-color: var(--blue-deep);
  color: #fff; font-weight: 600;
}
[data-theme="dark"] .chip[aria-pressed="true"], [data-theme="dark"] .chip.active { background: var(--blue-mid); border-color: var(--blue-mid); }

/* ----- Cards ----- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
  transition: transform var(--t), box-shadow var(--t);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-hover-press:hover { transform: translateY(-3px); }

.feature-card {
  display: flex; flex-direction: column; gap: .9rem;
  padding: 1.6rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
  position: relative; overflow: hidden;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .icon-circle {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 1.3rem;
  border-radius: 12px;
  background: var(--blue-deep); color: #fff;
  box-shadow: none;
}
[data-theme="dark"] .feature-card .icon-circle { background: var(--blue-mid); }
.feature-card h3 { margin: 0; }
.feature-card p { margin: 0; font-size: .95rem; }

/* ----- Hero ----- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }
.hero h1 { margin-bottom: 1rem; }
.hero .lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 58ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.5rem; }
.trust {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 1.75rem; align-items: center;
  color: var(--text-soft); font-size: .9rem;
}
.trust strong { color: var(--text-dark); }
.stars { color: var(--gold); letter-spacing: .15em; }

.hero-panel {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: .85rem;
}
.progress-card {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.progress-card .pc-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--tint); color: var(--blue-primary);
  display: grid; place-items: center;
  font-size: 1.2rem;
}
.progress-card .pc-body { flex: 1; min-width: 0; }
.progress-card .pc-title { font-weight: 600; font-size: .92rem; }
.progress-card .pc-meta { font-size: .8rem; color: var(--text-muted); }
.progress-bar {
  height: 6px; border-radius: 999px;
  background: var(--line);
  overflow: hidden; margin-top: .4rem;
}
.progress-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--blue-mid), var(--blue-glow));
  border-radius: 999px;
}
.pc-score { font-weight: 700; color: var(--blue-primary); font-variant-numeric: tabular-nums; }

/* ----- Stats ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.stat {
  text-align: left;
  padding: 1.5rem 1.5rem 1.6rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); }
.stat-num { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 800; color: var(--text-dark); letter-spacing: -.04em; line-height: 1; }
.stat-label { color: var(--text-soft); font-size: .9rem; margin-top: .5rem; }

/* ----- Unit cards ----- */
.unit-card {
  display: flex; flex-direction: column; gap: .9rem;
  padding: 1.6rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
  position: relative; overflow: hidden;
}
.unit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.unit-card .unit-head { display: flex; justify-content: space-between; align-items: center; }
.unit-num {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em;
  color: #fff;
  border-radius: 12px;
  background: var(--blue-deep);
}
[data-theme="dark"] .unit-num { background: var(--blue-mid); }
.unit-card h3 { margin: 0; }
.unit-card details summary {
  cursor: pointer; font-weight: 600; color: var(--blue-primary);
  list-style: none; padding: .6rem 0;
  display: flex; align-items: center; gap: .5rem; font-size: .92rem;
}
.unit-card details summary::after { content: '↓'; transition: transform var(--t-fast); }
.unit-card details[open] summary::after { transform: rotate(180deg); }
.unit-card details summary::-webkit-details-marker { display: none; }
.unit-card ol { padding-left: 1.3rem; color: var(--text-soft); font-size: .92rem; }
.unit-card ol li { margin-bottom: .35rem; }
.unit-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .83rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.unit-meta span { display: inline-flex; align-items: center; gap: .35rem; }

/* ----- Testimonials ----- */
.testimonial {
  padding: 1.6rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 1rem;
}
.testimonial blockquote { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--text-dark); }
.testimonial-foot { display: flex; align-items: center; gap: .85rem; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .85rem;
  background: linear-gradient(135deg, var(--blue-soft), #1E3A8A);
}
.t-name { font-weight: 700; font-size: .95rem; }
.t-meta { font-size: .8rem; color: var(--text-muted); }
.score-pill {
  margin-left: auto;
  padding: .35rem .7rem;
  border-radius: var(--r-pill);
  background: var(--tint-gold);
  font-weight: 700; color: #92400E;
  font-size: .85rem;
}
[data-theme="dark"] .score-pill { color: var(--gold); }

/* ----- Pricing ----- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; align-items: center;
}
.plan {
  padding: 1.9rem 1.75rem;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 1.1rem;
  position: relative;
}
.plan-featured {
  background: var(--blue-deep);
  color: #fff;
  box-shadow: 0 40px 80px -40px rgba(15,31,77,.8);
  transform: scale(1.03);
  overflow: hidden;
}
.plan-featured::after {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(96,165,250,.35), transparent 65%); pointer-events: none;
}
.plan-featured::before {
  content: 'Most popular';
  position: absolute; top: 1.1rem; right: 1.1rem; z-index: 1;
  background: var(--gold); color: var(--on-gold);
  font-size: .68rem; font-weight: 700;
  padding: .3rem .7rem; border-radius: var(--r-pill);
  letter-spacing: .08em; text-transform: uppercase;
}
.plan h3 { margin: 0; color: var(--blue-primary); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.plan-featured h3 { color: var(--gold); }
.plan-price { font-size: 2.75rem; font-weight: 800; letter-spacing: -.04em; color: var(--text-dark); line-height: 1; }
.plan-featured .plan-price { color: #fff; }
.plan-price small { font-size: .9rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-featured .plan-price small, .plan-featured p { color: #C7D2FE; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; position: relative; }
.plan ul li { font-size: .92rem; color: var(--text-soft); padding-left: 1.6rem; position: relative; }
.plan-featured ul li { color: #C7D2FE; }
.plan ul li::before {
  content: ''; position: absolute; left: 0; top: .15rem;
  width: 1.05rem; height: 1.05rem;
  border-radius: 999px;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='%233B82F6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.plan-featured ul li::before {
  background-color: rgba(255,255,255,.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='%23FBBF24' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.plan-featured .btn:not(.btn-primary) { background: rgba(255,255,255,.08); border-color: var(--band-line); color: #fff; }

/* ----- Toggle ----- */
.billing-toggle {
  display: inline-flex; padding: .3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  margin: 1rem auto 2.5rem;
}
.billing-toggle button {
  border: 0; cursor: pointer; font-family: inherit;
  padding: .5rem 1.2rem; font-size: .9rem; font-weight: 600;
  background: transparent; color: var(--text-soft);
  border-radius: var(--r-pill);
  transition: all var(--t-fast);
}
.billing-toggle button.active { background: var(--blue-deep); color: #fff; }
[data-theme="dark"] .billing-toggle button.active { background: var(--blue-mid); }

/* ----- Dark band ----- */
.section-dark, .band {
  background: var(--band);
  color: var(--on-band);
  position: relative; overflow: hidden;
}
.section-dark {
  border-radius: var(--r-xl);
  margin: 4rem auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3.5rem);
  width: min(1180px, 100% - 2rem);
}
.section-dark::before, .band::before {
  content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%;
  background: radial-gradient(closest-side, rgba(59,130,246,.4), transparent); filter: blur(30px); pointer-events: none;
}
.section-dark > *, .band > * { position: relative; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .band h1, .band h2, .band h3, .band h4 { color: #fff; }
.section-dark p, .band p { color: var(--on-band-muted); }
.section-dark .eyebrow, .band .eyebrow { color: var(--gold); }
.section-dark .btn, .band .btn { background: rgba(255,255,255,.06); color: #fff; border-color: var(--band-line); }
.section-dark .btn-primary, .band .btn-primary { background: var(--gold); color: var(--on-gold); border-color: transparent; }
.section-dark .card, .band .card, .band .unit-card, .band .feature-card {
  background: var(--band-surface); box-shadow: 0 0 0 1px var(--band-line); color: #fff;
}
.band .unit-card:hover, .band .feature-card:hover { box-shadow: 0 0 0 1px var(--blue-glow); background: rgba(255,255,255,.08); }
.band .unit-meta, .band .card p, .band .unit-card p, .band .feature-card p { color: var(--on-band-muted); }
.band .badge-premium { background: rgba(255,255,255,.1); color: #fff; }

/* ----- Forms ----- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text-soft); }
input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="number"], input[type="date"], input[type="month"], input[type="url"], textarea, select {
  font-family: inherit; font-size: 1rem;
  width: 100%;
  padding: .85rem 1rem;
  background: var(--surface);
  color: var(--text-dark);
  border: 1px solid var(--line); outline: 0;
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
textarea { min-height: 140px; resize: vertical; }

.email-form {
  display: flex; gap: .4rem; flex-wrap: wrap;
  padding: .35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.email-form input { flex: 1; min-width: 180px; border: 0; box-shadow: none; background: transparent; padding: .6rem .85rem; }
.email-form input:focus { box-shadow: none; outline: 0; }
.email-form button { white-space: nowrap; }
.band .email-form, .section-dark .email-form { background: rgba(255,255,255,.06); border-color: var(--band-line); }
.band .email-form input, .section-dark .email-form input { color: #fff; }
.band .email-form input::placeholder, .section-dark .email-form input::placeholder { color: #7F93C3; }
.form-success {
  display: none; padding: .65rem 1rem;
  background: var(--tint-green);
  border-radius: var(--r-sm);
  color: #166534; font-weight: 600; font-size: .9rem;
  margin-top: .65rem;
}
[data-theme="dark"] .form-success { color: #86EFAC; }
.form-success.show { display: block; }

/* ----- Callouts ----- */
.callout {
  background: var(--tint);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  display: flex; gap: .9rem; align-items: flex-start;
  border-left: 3px solid var(--blue-mid);
}
.callout .callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--surface);
  color: var(--blue-primary);
}
.callout p { margin: 0; color: var(--text-dark); font-size: .94rem; }
.callout strong { color: var(--blue-primary); }

/* ----- Paywall ----- */
.paywall {
  margin: 2.5rem 0;
  padding: 2.5rem;
  background: var(--band); color: var(--on-band);
  border-radius: var(--r-xl);
  text-align: center;
  position: relative; overflow: hidden;
}
.paywall::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(96,165,250,.35), transparent 65%); pointer-events: none; }
.paywall > * { position: relative; }
.paywall .lock {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 18px;
  background: var(--gold); color: var(--on-gold);
  display: grid; place-items: center;
  font-size: 1.6rem;
}
.paywall h3 { color: #fff; }
.paywall p { color: var(--on-band-muted); }
.paywall ul {
  list-style: none; padding: 0; margin: 1.25rem auto 1.5rem;
  max-width: 380px;
  display: flex; flex-direction: column; gap: .5rem;
  text-align: left;
}
.paywall ul li { padding-left: 1.6rem; position: relative; font-size: .92rem; color: var(--on-band-muted); }
.paywall ul li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.paywall .btn { background: rgba(255,255,255,.06); color: #fff; border-color: var(--band-line); }
.paywall .btn-primary { background: var(--gold); color: var(--on-gold); border-color: transparent; }

/* ----- Article body ----- */
.article-body { max-width: 720px; margin-inline: auto; }
.article-body h2 { margin-top: 2.5rem; color: var(--text-dark); }
.article-body h3 { margin-top: 1.75rem; }
.article-body p, .article-body li { font-size: 1.04rem; line-height: 1.75; color: var(--text-soft); }
.article-body strong { color: var(--text-dark); }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin: 1em 0; }
.article-body li { margin-bottom: .5rem; }
.article-body blockquote {
  margin: 1.75rem 0; padding: 1.25rem 1.5rem;
  background: var(--tint);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic; color: var(--text-dark);
}
.article-body code {
  font-family: inherit; font-weight: 600; font-size: .95em;
  background: var(--tint);
  padding: .1em .45em; border-radius: 6px;
  color: var(--blue-primary);
  font-variant-numeric: tabular-nums;
}
.article-body table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.article-body th, .article-body td { padding: .75rem 1rem; text-align: left; font-size: .92rem; color: var(--text-soft); }
.article-body th {
  background: var(--surface-2);
  color: var(--text-muted); font-weight: 600;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
}
.article-body tr + tr td { border-top: 1px solid var(--line); }

/* ----- Breadcrumb ----- */
.breadcrumb {
  font-size: .8rem; color: var(--text-muted);
  padding: 1.25rem 0; display: flex; flex-wrap: wrap; gap: .4rem;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue-primary); }
.breadcrumb span[aria-current] { color: var(--text-dark); }
.breadcrumb-sep { color: var(--line-strong); }

/* ----- Quiz ----- */
.quiz-shell {
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  max-width: 720px; margin: 0 auto;
}
.quiz-progress { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.quiz-progress .progress-bar { flex: 1; height: 8px; margin: 0; }
.quiz-progress .counter { font-weight: 700; color: var(--blue-primary); font-size: .85rem; font-variant-numeric: tabular-nums; }
.quiz-question { font-size: 1.2rem; font-weight: 700; margin: 1rem 0 1.5rem; color: var(--text-dark); letter-spacing: -.01em; }
.quiz-options { display: flex; flex-direction: column; gap: .65rem; }
.quiz-option {
  cursor: pointer; font-family: inherit; text-align: left;
  padding: .95rem 1.2rem;
  background: var(--surface);
  color: var(--text-dark); font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}
.quiz-option:hover:not(:disabled) { border-color: var(--blue-mid); background: var(--tint); }
.quiz-option.correct { border-color: var(--green); background: var(--tint-green); color: #166534; font-weight: 600; }
.quiz-option.incorrect { border-color: #FCA5A5; background: var(--tint-red); color: #991B1B; font-weight: 600; }
[data-theme="dark"] .quiz-option.correct { color: #86EFAC; }
[data-theme="dark"] .quiz-option.incorrect { color: #FCA5A5; }
.quiz-option:disabled { cursor: default; opacity: .92; }
.quiz-feedback {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--tint);
  border-radius: var(--r-md);
  border-left: 3px solid var(--blue-mid);
  display: none;
}
.quiz-feedback.show { display: block; }
.quiz-feedback p { margin: 0; font-size: .92rem; color: var(--text-dark); }
.quiz-actions { display: flex; justify-content: flex-end; margin-top: 1.25rem; }
.quiz-result { text-align: center; padding: 1rem; }
.quiz-result .score-circle {
  width: 140px; height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 999px;
  background: conic-gradient(var(--blue-mid) calc(var(--p, 0) * 1%), var(--line) 0);
  display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -.04em; position: relative;
}
.quiz-result .score-circle::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.quiz-result .score-circle > * { position: relative; }

/* ----- Ad slot ----- */
.ad-slot {
  margin: 2rem auto;
  padding: 2.5rem 1rem; text-align: center;
  background: var(--surface-2);
  border-radius: var(--r-md);
  color: var(--text-muted); font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  border: 1px dashed var(--line-strong);
}

/* ----- Footer ----- */
.site-footer {
  margin-top: 5rem;
  padding: 4rem 0 2rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem; margin-bottom: 2.5rem;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-muted); margin-bottom: 1rem; font-weight: 600;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-grid a { color: var(--text-soft); font-size: .92rem; }
.footer-grid a:hover { color: var(--blue-primary); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: .82rem; color: var(--text-muted);
}
.disclaimer { font-size: .78rem; color: var(--text-muted); margin-top: 1rem; }

/* ----- Utilities ----- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-2 { margin-bottom: 2rem; }
.gap-sm { gap: .5rem; }
.flex { display: flex; } .flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.text-soft { color: var(--text-soft); } .text-muted { color: var(--text-muted); } .text-primary { color: var(--blue-primary); }
.divider { height: 1px; background: var(--line); margin: 3rem 0; }

/* ----- Certificate ----- */
.cert-page { padding: 3rem 0; }
.certificate {
  width: min(940px, 100% - 2rem);
  margin: 0 auto;
  aspect-ratio: 1.414 / 1;
  padding: 3.5rem;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex; flex-direction: column; text-align: center;
}
.certificate::before {
  content: ''; position: absolute; inset: 1.25rem;
  border: 2px solid var(--gold);
  border-radius: calc(var(--r-xl) - 6px);
  pointer-events: none; opacity: .6;
}
.certificate .cert-logo { width: 72px; height: 72px; margin: 0 auto 1rem; display: grid; place-items: center; }
.certificate .cert-logo svg { width: 72px; height: 72px; display: block; }
.cert-disclaimer { margin-top: 1.25rem; font-size: .7rem; color: var(--text-muted); text-align: center; }
.cert-eyebrow { text-transform: uppercase; letter-spacing: .25em; font-size: .82rem; color: var(--blue-mid); font-weight: 700; }
.cert-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--text-dark); margin: .5rem 0 1.5rem; letter-spacing: -.03em; }
.cert-name {
  font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; color: var(--text-dark); margin: 1rem 0;
  text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 12px;
}
.cert-course { font-size: 1.2rem; font-weight: 600; color: var(--blue-primary); margin: .75rem 0; }
.cert-footline { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; font-size: .85rem; color: var(--text-soft); }
.cert-signature { font-style: italic; font-weight: 600; font-size: 1.1rem; color: var(--blue-primary); border-bottom: 1px solid var(--line-strong); padding-bottom: .35rem; min-width: 200px; }
.cert-seal { width: 56px; height: 56px; border-radius: 999px; background: var(--gold); position: relative; }
.cert-actions { text-align: center; margin: 2rem 0; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden; }
  .certificate, .certificate * { visibility: visible; }
  .site-header, .site-footer, .cert-actions, .breadcrumb { display: none !important; }
  .certificate { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; max-width: none; box-shadow: none; border-radius: 0; background: #fff !important; }
}

/* ----- Auth pages ----- */
.auth-shell {
  max-width: 460px; margin: 0 auto; padding: 2.5rem;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.auth-shell h1 { font-size: 1.8rem; text-align: center; margin-bottom: .5rem; }
.auth-shell .lead { text-align: center; margin-bottom: 2rem; font-size: 1rem; }
.auth-error {
  display: none; background: var(--tint-red); color: #991B1B;
  padding: .75rem 1rem; border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 600; margin-bottom: 1rem;
}
[data-theme="dark"] .auth-error { color: #FCA5A5; }
.auth-error.show { display: block; }
.auth-foot { text-align: center; margin-top: 1.5rem; font-size: .92rem; color: var(--text-soft); }

/* ----- Dashboard ----- */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-stat { padding: 1.25rem 1.5rem; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.dash-stat-num { font-size: 2.2rem; font-weight: 800; color: var(--text-dark); letter-spacing: -.04em; line-height: 1; }
.dash-stat-label { color: var(--text-soft); font-size: .88rem; margin-top: .35rem; }
.unit-row {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1rem; margin-bottom: .6rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.unit-row:hover { border-color: var(--blue-soft); transform: translateX(2px); }
.unit-row .row-num {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--tint);
  font-weight: 700; color: var(--blue-primary); flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.unit-row.done .row-num { background: var(--tint-green); color: #166534; }
.unit-row .row-body { flex: 1; min-width: 0; }
.unit-row .row-title { font-weight: 600; color: var(--text-dark); font-size: .96rem; }
.unit-row .row-meta { font-size: .82rem; color: var(--text-muted); }

/* ----- Discount field ----- */
.discount-field { display: flex; gap: .4rem; max-width: 380px; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.discount-field input { flex: 1; border: 0; background: transparent; box-shadow: none; padding: .55rem .9rem; }
.discount-field input:focus { box-shadow: none; }
.discount-msg { display: none; margin-top: .5rem; font-size: .88rem; padding: .5rem .85rem; border-radius: var(--r-sm); font-weight: 600; }
.discount-msg.ok { display: block; color: #166534; background: var(--tint-green); }
.discount-msg.err { display: block; color: #991B1B; background: var(--tint-red); }

/* ===========================================================
   Admin panel
   =========================================================== */
.admin-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: var(--bg); }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  padding: 1.25rem 1rem;
  background: var(--band); color: var(--on-band);
  display: flex; flex-direction: column; gap: 1.5rem;
}
@media (max-width: 900px) { .admin-sidebar { position: static; height: auto; } }
.admin-brand { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; }
.admin-brand img { width: 34px; height: 34px; border-radius: 9px; }
.admin-brand .label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.admin-brand .name { font-weight: 700; font-size: .95rem; color: #fff; }
.admin-nav { flex: 1; display: flex; flex-direction: column; gap: .2rem; }
.admin-nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .85rem; border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 500; color: var(--on-band-muted);
  transition: all 180ms;
}
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.admin-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-sidebar-foot { padding: .5rem .75rem; font-size: .8rem; color: var(--on-band-muted); display: flex; flex-direction: column; gap: .5rem; }
.admin-sidebar-foot a { color: var(--on-band-muted); font-size: .85rem; }
.admin-sidebar-foot a:hover { color: #fff; }
.admin-main { padding: 2.5rem 2rem; max-width: 100%; overflow-x: auto; }
@media (max-width: 600px) { .admin-main { padding: 1.5rem 1rem; } }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.admin-header h1 { margin: 0; font-size: 1.8rem; }
.admin-header .text-soft { margin: .25rem 0 0; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.admin-stat { padding: 1.4rem 1.25rem; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.admin-stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); }
.admin-stat-num { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; color: var(--text-dark); line-height: 1.1; }
.admin-stat-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: .35rem; font-weight: 600; }
.admin-stat-delta { font-size: .85rem; margin-top: .5rem; color: var(--green); font-weight: 600; }
.admin-stat-delta.down { color: var(--red); }
.admin-table-wrap { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; min-width: 600px; }
.admin-table thead th {
  text-align: left; padding: .9rem 1.25rem;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); background: var(--surface-2);
}
.admin-table tbody td { padding: .9rem 1.25rem; color: var(--text-soft); border-top: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody td strong { color: var(--text-dark); }
.admin-table tbody tr:hover td { background: var(--surface-2); }
.admin-table .row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.admin-table .row-actions button {
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; color: var(--text-soft); transition: all 180ms;
}
.admin-table .row-actions button:hover { border-color: var(--blue-mid); color: var(--blue-primary); }
.admin-table .row-actions button.danger:hover { color: var(--red); border-color: var(--red); }
.admin-table .row-actions svg { width: 14px; height: 14px; }
.admin-pill {
  display: inline-flex; padding: .2rem .6rem; border-radius: 999px;
  background: var(--surface-2); font-size: .7rem; font-weight: 700;
  color: var(--text-soft); text-transform: uppercase; letter-spacing: .06em;
}
.admin-pill.premium { background: var(--tint-gold); color: #92400E; }
.admin-pill.admin { background: var(--tint); color: var(--blue-primary); }
.admin-pill.unread { background: var(--tint-red); color: #991B1B; }
.admin-pill.green { background: var(--tint-green); color: #166534; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.admin-toolbar .search-bar { margin: 0; flex: 1; max-width: 360px; }
.admin-empty { padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); font-size: .92rem; }
.admin-empty .icon-circle { margin: 0 auto 1rem; }
.admin-modal-bg { position: fixed; inset: 0; background: rgba(15, 31, 77, .55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 200ms; }
.admin-modal-bg.open { opacity: 1; visibility: visible; }
.admin-modal {
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  width: min(480px, calc(100vw - 2rem)); max-height: calc(100vh - 4rem); overflow-y: auto;
  padding: 2rem; transform: translateY(20px); transition: transform 200ms var(--ease);
}
.admin-modal-bg.open .admin-modal { transform: none; }
.admin-modal h2 { margin: 0 0 1.25rem; }
.admin-modal .actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }
.danger-zone { margin-top: 2rem; padding: 1.5rem; background: var(--tint-red); border-radius: var(--r-md); border-left: 3px solid var(--red); }
.danger-zone h3 { color: #991B1B; margin: 0 0 .5rem; font-size: 1.05rem; }
[data-theme="dark"] .danger-zone h3 { color: #FCA5A5; }
.danger-zone p { font-size: .9rem; }

/* ----- Section header ----- */
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head p { font-size: 1.05rem; }
.section-head.left { margin-inline: 0; text-align: left; }

/* ===== Icon utility ===== */
svg.icon, .icon > svg, .icon svg.icon { display: inline-block; vertical-align: -.15em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.icon { width: 1em; height: 1em; }
.card.card-active { border-color: var(--blue-mid); box-shadow: 0 0 0 2px rgba(59,130,246,.18); }
.quiz-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-dark); } .quiz-clock.late { color: var(--red, #EF4444); }
.quiz-breakdown { display: grid; gap: .5rem; max-width: 420px; margin: 1rem auto; text-align: left; }
.qb-row { display: grid; grid-template-columns: 1fr 120px 44px; gap: .75rem; align-items: center; font-size: .9rem; }
.qb-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.btn svg.icon { width: 1em; height: 1em; vertical-align: -.12em; margin-right: .1em; }
.unit-meta svg.icon { width: 1em; height: 1em; vertical-align: -.15em; margin-right: .15em; }
.unit-num svg.icon { width: 22px; height: 22px; stroke-width: 2; }
.icon-circle { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--tint); color: var(--blue-primary); }
.icon-circle svg { width: 24px; height: 24px; }
.icon-circle-sm { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--tint); color: var(--blue-primary); }
.icon-circle-sm svg { width: 18px; height: 18px; }

/* ===== Motion (js/motion.js adds .in; everything is visible without JS) ===== */
.rv { opacity: 1; transform: none; }
.js .rv:not(.in) { opacity: 0; transform: translateY(22px); }
.rv.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .js .rv:not(.in) { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
