/*!
 * MRSGREN — Design System v2.0
 * design-system.css
 *
 * Used by: index.html, shop.html, science.html, finance.html,
 *          citizenship-hub.html, courses.html, learn.html, free-resources.html
 *
 * DO NOT import in course-content pages (part*.html, mock-exam.html, citizenship.html)
 * — those pages use mrsgren-ui.css exclusively.
 */

/* ═══════════════════════════════════════════════════
   1. CSS VARIABLES
   ═══════════════════════════════════════════════════ */
:root {
  /* --- Dark palette (primary) --- */
  --c-bg:     #0a0f1e;
  --c-bg2:    #0d1327;
  --c-bg3:    #111930;
  --c-card:   #101828;
  --c-card2:  #141f35;

  /* --- Light palette --- */
  --c-light:  #f8f9fa;
  --c-check:  #eef2f7;

  /* --- Brand accents --- */
  --c-accent:      #00c878;
  --c-accent-d:    #00a35f;
  --c-accent-glow: rgba(0,200,120,.18);

  /* --- Subject colors --- */
  --c-sci:  #0078c8;
  --c-fin:  #ffb400;
  --c-cit:  #00a050;

  /* --- Text on dark --- */
  --c-text:  #eef1f8;
  --c-text2: #8892aa;
  --c-text3: #535e78;

  /* --- Text on light --- */
  --c-dk:  #1a1a2e;
  --c-dk2: #646e82;

  /* --- Borders --- */
  --c-border:  rgba(255,255,255,.07);
  --c-bm:      rgba(255,255,255,.13);
  --c-bl:      #dce1eb;

  /* --- Typography --- */
  --fh: 'Inter', 'Outfit', sans-serif;
  --fb: 'Outfit', 'Inter', sans-serif;

  /* --- Layout --- */
  --mw:  1200px;
  --rw:  720px;

  /* --- Spacing scale --- */
  --sp:   96px;
  --spm:  48px;
  --r:    16px;
  --rsm:  10px;
  --rlg:  24px;

  /* --- Fluid spacing tokens --- */
  --nav-h:    64px;
  --pad-x:    clamp(16px, 5vw, 24px);
  --card-pad: clamp(1.25rem, 3vw, 2rem);
  --sec-gap:  clamp(3rem, 8vw, 6rem);
}

/* ═══════════════════════════════════════════════════
   2. BASE RESET
   ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
::-webkit-scrollbar { display: none; }

body.ds {
  font-family: var(--fb);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════════
   3. SCROLL PROGRESS INDICATOR
   (Styles for elements animated by mrsgren-ui.js)
   ═══════════════════════════════════════════════════ */
.scroll-prog {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 98;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 40vh;
}
.sp-track {
  width: 2px;
  height: 100%;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  position: relative;
}
.sp-fill {
  width: 100%;
  background: var(--c-accent);
  border-radius: 2px;
  position: absolute;
  top: 0; left: 0;
  height: 0%;
  z-index: 1;
  transition: height .15s linear;
}
.sp-fixed-dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: background .3s ease, box-shadow .3s ease;
}
.sp-fixed-dot.active {
  background: var(--c-accent);
  box-shadow: 0 0 8px var(--c-accent-glow);
}
.sp-dot {
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 0%;
  box-shadow: 0 0 10px rgba(255,255,255,.4), 0 0 20px rgba(255,255,255,.15);
  z-index: 3;
}

/* ═══════════════════════════════════════════════════
   4. LAYOUT UTILITIES
   ═══════════════════════════════════════════════════ */
.ds-wrap {
  width: 100%;
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Generic container alias used in some pages */
.container {
  width: 100%;
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.ds-section     { padding: var(--sec-gap) 0; }
.ds-section-alt { padding: var(--sec-gap) 0; background: var(--c-bg2); }
.ds-section-light { padding: var(--sec-gap) 0; background: var(--c-light); color: var(--c-dk); }

/* ═══════════════════════════════════════════════════
   5. TYPOGRAPHY SCALE
   ═══════════════════════════════════════════════════ */
.ds-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-accent);
  display: block;
  margin-bottom: .6rem;
}
.ds-h1 {
  font-family: var(--fh);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.ds-h2 {
  font-family: var(--fh);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.ds-h3 {
  font-family: var(--fh);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}
.ds-sub {
  font-size: clamp(.95rem, 2vw, 1.1rem);
  color: var(--c-text2);
  line-height: 1.75;
}

.ds-section-head           { text-align: center; margin-bottom: 3.5rem; }
.ds-section-head .ds-h2    { margin-bottom: .75rem; }
.ds-section-head .ds-sub   { max-width: 560px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════
   6. BUTTONS
   ═══════════════════════════════════════════════════ */
.ds-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1.65rem;
  border-radius: var(--rsm);
  font-family: var(--fh);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  line-height: 1;
  transition: background .2s, transform .2s, box-shadow .2s, border-color .2s, color .2s;
}
.ds-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.ds-btn-primary {
  background: var(--c-accent);
  color: #fff;
}
.ds-btn-primary:hover {
  background: var(--c-accent-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--c-accent-glow), 0 0 0 1px rgba(0,200,120,.2);
}
.ds-btn-primary:active { transform: translateY(0); }

.ds-btn-outline {
  background: transparent;
  color: var(--c-text);
  border: 1.5px solid var(--c-bm);
}
.ds-btn-outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  transform: translateY(-2px);
  background: rgba(0,200,120,.05);
}
.ds-btn-outline:active { transform: translateY(0); }

.ds-btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1rem;
  border-radius: var(--r);
}

/* Gold CTA variant (courses, crypto) */
.ds-btn-gold {
  background: var(--c-fin);
  color: #0a0f1e;
  font-weight: 700;
}
.ds-btn-gold:hover {
  background: #e6a200;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,180,0,.35);
}

/* ═══════════════════════════════════════════════════
   7. NAVIGATION
   ═══════════════════════════════════════════════════ */
.ds-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(16px, 4vw, 32px);
  height: var(--nav-h);
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
/* Transparent by default — becomes frosted on scroll */
.ds-nav.scrolled,
.ds-nav.shrink {
  background: rgba(10, 15, 30, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 24px rgba(0,0,0,.25);
}

.ds-nav-logo {
  font-family: var(--fh);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.01em;
  color: var(--c-text);
  flex-shrink: 0;
}
.ds-nav-logo span { color: var(--c-accent); }

.ds-nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: .1rem;
  flex: 1;
  justify-content: center;
}
.ds-nav-links a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--c-text2);
  padding: .45rem .85rem;
  border-radius: 8px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.ds-nav-links a:hover { color: var(--c-text); background: rgba(255,255,255,.07); }
.ds-nav-links a.active {
  color: var(--c-text);
  background: rgba(255,255,255,.09);
  font-weight: 600;
}

/* Hamburger */
.ds-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}
.ds-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: all .25s ease;
}
.ds-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ds-hamburger.open span:nth-child(2) { opacity: 0; }
.ds-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.ds-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8999;
  background: rgba(10,15,30,.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  padding: max(5rem, env(safe-area-inset-top, 5rem)) 2rem 2rem;
}
.ds-mobile-nav.open { display: flex; opacity: 1; pointer-events: all; }
.ds-mobile-nav a {
  font-family: var(--fh);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-text2);
  padding: .65rem 1.5rem;
  border-radius: 12px;
  transition: color .15s, background .15s;
  width: 100%;
  text-align: center;
  max-width: 280px;
}
.ds-mobile-nav a:hover,
.ds-mobile-nav a.active {
  color: var(--c-text);
  background: rgba(255,255,255,.06);
}
.ds-mobile-nav a:hover { color: var(--c-accent); }
.ds-mobile-close {
  position: absolute;
  top: max(1.25rem, env(safe-area-inset-top, 1.25rem));
  right: max(1.5rem, env(safe-area-inset-right, 1.5rem));
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  color: var(--c-text2);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: color .15s, background .15s;
}
.ds-mobile-close:hover { color: var(--c-text); background: rgba(255,255,255,.14); }

/* ═══════════════════════════════════════════════════
   8. HERO SECTION
   ═══════════════════════════════════════════════════ */
.ds-hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + clamp(3rem, 8vw, 5rem)) var(--pad-x) clamp(3rem, 8vw, 5rem);
  background: var(--c-bg);
  overflow: hidden;
  text-align: center;
}

/* Animated radial glow mesh */
.ds-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 18% 55%, rgba(0,200,120,.09) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 82% 22%, rgba(0,100,230,.08) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 55% 92%, rgba(100,0,230,.055) 0%, transparent 65%);
  animation: heroGlow 13s ease-in-out infinite alternate;
}

/* Subtle dot-grid texture */
.ds-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 25%, transparent 75%);
}

@keyframes heroGlow {
  from { opacity: .6; transform: scale(1); }
  to   { opacity: 1;  transform: scale(1.07); }
}

.ds-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto;
}

/* Badge */
.ds-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1.1rem;
  border-radius: 100px;
  background: rgba(0,200,120,.1);
  border: 1px solid rgba(0,200,120,.25);
  font-size: .72rem;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  animation: fadeUp .6s ease .1s both;
}
.ds-hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:.2} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:none} }

.ds-hero .ds-h1 {
  color: var(--c-text);
  margin-bottom: 1.25rem;
  animation: fadeUp .75s ease .2s both;
}
.ds-hero .ds-h1 em { color: var(--c-accent); font-style: normal; }

.ds-hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--c-text2);
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  animation: fadeUp .75s ease .35s both;
}

.ds-hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeUp .75s ease .5s both;
}

/* Social proof row */
.ds-hero-proof {
  display: flex;
  align-items: center;
  gap: .85rem;
  justify-content: center;
  animation: fadeUp .75s ease .65s both;
}
.ds-avatars { display: flex; }
.ds-avatars .av {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  font-weight: 700;
  margin-left: -10px;
  color: #fff;
  flex-shrink: 0;
}
.ds-avatars .av:first-child { margin-left: 0; }
.ds-proof-text { font-size: .85rem; color: var(--c-text2); }
.ds-proof-text strong { color: var(--c-text); }

/* ═══════════════════════════════════════════════════
   9. CATEGORY CARDS
   ═══════════════════════════════════════════════════ */
.ds-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.cat-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--rlg);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
/* Coloured top accent bar */
.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--rlg) var(--rlg) 0 0;
}
.cat-card.sci::before { background: linear-gradient(90deg, var(--c-sci), rgba(0,120,200,.35)); }
.cat-card.fin::before { background: linear-gradient(90deg, var(--c-fin), rgba(255,180,0,.35)); }
.cat-card.cit::before { background: linear-gradient(90deg, var(--c-cit), rgba(0,160,80,.35)); }

.cat-card:hover { transform: translateY(-8px); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.cat-card.sci:hover { border-color: rgba(0,120,200,.35); box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(0,120,200,.15); }
.cat-card.fin:hover { border-color: rgba(255,180,0,.35); box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(255,180,0,.15); }
.cat-card.cit:hover { border-color: rgba(0,160,80,.35); box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(0,160,80,.15); }

.cat-icon { font-size: 2.4rem; line-height: 1; transition: transform .25s ease; display: inline-block; }
.cat-card:hover .cat-icon { transform: scale(1.15) rotate(-3deg); }
.cat-name {
  font-family: var(--fh);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-text);
}
.cat-desc { font-size: .875rem; color: var(--c-text2); line-height: 1.65; flex: 1; }
.cat-count { font-size: .72rem; font-weight: 600; color: var(--c-text3); letter-spacing: .05em; }
.cat-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
  transition: gap .18s ease, color .18s ease;
}
.cat-cta:hover { gap: .8rem; }
.cat-card.sci .cat-cta:hover { color: #4ab8ff; }
.cat-card.fin .cat-cta:hover { color: var(--c-fin); }
.cat-card.cit .cat-cta:hover { color: var(--c-accent); }

/* ═══════════════════════════════════════════════════
   10. TRUST PILLARS
   ═══════════════════════════════════════════════════ */
.ds-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.pillar {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: border-color .2s ease;
}
.pillar:hover { border-color: var(--c-bm); }
.pillar-icon  { font-size: 1.65rem; flex-shrink: 0; line-height: 1; }
.pillar-title {
  font-family: var(--fh);
  font-size: .975rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .4rem;
}
.pillar-desc  { font-size: .86rem; color: var(--c-text2); line-height: 1.65; }

/* ═══════════════════════════════════════════════════
   11. FREE RESOURCES SECTION
   ═══════════════════════════════════════════════════ */
.ds-free-banner {
  padding: var(--sp) 0;
  background: linear-gradient(135deg, rgba(0,200,120,.08), rgba(0,80,200,.06));
  border-top: 1px solid rgba(0,200,120,.12);
  border-bottom: 1px solid rgba(0,200,120,.12);
}
.ds-free-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.free-card {
  background: var(--c-card2);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.free-card:hover {
  border-color: rgba(0,200,120,.3);
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0,0,0,.3);
}
.free-card-icon  { font-size: 1.75rem; }
.free-card-title {
  font-family: var(--fh);
  font-size: .975rem;
  font-weight: 700;
  color: var(--c-text);
}
.free-card-desc { font-size: .855rem; color: var(--c-text2); line-height: 1.65; flex: 1; }
.free-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-accent);
  transition: gap .15s ease;
}
.free-card-cta:hover { gap: .75rem; }

/* ═══════════════════════════════════════════════════
   12. COURSE CARDS
   ═══════════════════════════════════════════════════ */
.ds-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.course-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--rlg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(0,0,0,.5);
  border-color: var(--c-bm);
}

/* Category tags */
.course-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 100px;
}
.tag-sci { background: rgba(0,120,200,.15); color: #4ab4ff; }
.tag-fin { background: rgba(255,180,0,.15);  color: #ffd14a; }
.tag-cit { background: rgba(0,160,80,.15);   color: #4ae094; }

.course-title {
  font-family: var(--fh);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}
.course-desc { font-size: .875rem; color: var(--c-text2); line-height: 1.65; flex: 1; }

.course-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge-pill {
  font-size: .7rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 100px;
  background: rgba(255,255,255,.06);
  color: var(--c-text2);
  border: 1px solid var(--c-border);
}
.badge-pill.hi {
  background: rgba(0,200,120,.1);
  color: var(--c-accent);
  border-color: rgba(0,200,120,.22);
}

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}
.course-price-old {
  font-size: .82rem;
  color: var(--c-text3);
  text-decoration: line-through;
  display: block;
  margin-bottom: .1rem;
}
.course-price {
  font-family: var(--fh);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-text);
}

/* ═══════════════════════════════════════════════════
   13. TESTIMONIALS
   ═══════════════════════════════════════════════════ */
.ds-testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testi-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.testi-card:hover {
  border-color: var(--c-bm);
  border-left-color: var(--c-accent);
  box-shadow: 0 12px 36px rgba(0,0,0,.3);
  transform: translateY(-3px);
}
.testi-stars   { color: var(--c-fin); font-size: .9rem; letter-spacing: .05em; }
.testi-quote   { font-size: .875rem; color: var(--c-text2); line-height: 1.7; flex: 1; font-style: italic; }
.testi-author  { display: flex; align-items: center; gap: .75rem; }
.testi-av {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.testi-name { font-weight: 600; font-size: .875rem; color: var(--c-text); }
.testi-meta { font-size: .78rem; color: var(--c-text3); }

/* ═══════════════════════════════════════════════════
   14. FINAL CTA BANNER
   ═══════════════════════════════════════════════════ */
.ds-cta-banner {
  text-align: center;
  padding: var(--sp) 24px;
  background: linear-gradient(180deg, var(--c-bg3) 0%, var(--c-bg) 100%);
  border-top: 1px solid var(--c-border);
}
.ds-cta-banner .ds-h2    { margin-bottom: .75rem; }
.ds-cta-banner .ds-sub   { max-width: 520px; margin: 0 auto 2.5rem; }
.ds-cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════
   15. FOOTER
   ═══════════════════════════════════════════════════ */
.ds-footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 64px 24px 32px;
}
.ds-footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 3rem;
  max-width: var(--mw);
  margin: 0 auto;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--c-border);
}
.foot-brand-name {
  font-family: var(--fh);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: .6rem;
}
.foot-brand-name span { color: var(--c-accent); }
.foot-brand-desc {
  font-size: .85rem;
  color: var(--c-text2);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.foot-socials { display: flex; gap: .65rem; }
.foot-social-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text2);
  transition: border-color .15s, color .15s;
}
.foot-social-link:hover { border-color: var(--c-accent); color: var(--c-accent); }
.foot-col-head {
  font-family: var(--fh);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-text3);
  margin-bottom: 1rem;
}
.foot-links { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.foot-links a { font-size: .875rem; color: var(--c-text2); transition: color .15s; }
.foot-links a:hover { color: var(--c-text); }

.ds-footer-bottom {
  max-width: var(--mw);
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.foot-copy  { font-size: .78rem; color: var(--c-text3); }
.foot-legal { display: flex; gap: 1.5rem; }
.foot-legal a { font-size: .78rem; color: var(--c-text3); transition: color .15s; }
.foot-legal a:hover { color: var(--c-text); }

/* ═══════════════════════════════════════════════════
   16. REVEAL ANIMATION
   (Replaces .reveal/.vis from mrsgren-ui on new pages)
   ═══════════════════════════════════════════════════ */
.ds-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
}
.ds-reveal.visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════
   17. RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .ds-categories   { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .ds-courses-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .ds-testi-grid   { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .ds-footer-top   { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .ds-section-head { margin-bottom: 2.5rem; }
}

@media (max-width: 767px) {
  :root {
    --sp: 56px;
    --sec-gap: clamp(2.5rem, 6vw, 3.5rem);
    --nav-h: 60px;
  }

  .ds-nav { padding: 0 var(--pad-x); }
  .ds-nav-links, .ds-nav > .ds-btn { display: none; }
  .ds-hamburger { display: flex; }

  .ds-categories   { grid-template-columns: 1fr; gap: 1rem; }
  .ds-pillars      { grid-template-columns: 1fr; gap: 1rem; }
  .ds-free-grid    { grid-template-columns: 1fr; gap: 1rem; }
  .ds-courses-grid { grid-template-columns: 1fr; gap: 1rem; }
  .ds-testi-grid   { grid-template-columns: 1fr; gap: 1rem; }

  .ds-footer-top { grid-template-columns: 1fr 1fr; }
  .ds-footer-bottom { flex-direction: column; text-align: center; }

  .ds-hero-ctas { flex-direction: column; align-items: center; }
  .ds-hero-ctas .ds-btn { width: 100%; max-width: 300px; justify-content: center; }

  .ds-section-head { margin-bottom: 2rem; }

  /* Smaller buttons on mobile */
  .ds-btn { padding: .8rem 1.5rem; font-size: .875rem; }
  .ds-btn-lg { padding: .95rem 1.85rem; font-size: .95rem; }

  /* Tables scroll on mobile */
  table, .bio-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--rsm); }

  /* Form inputs — prevent iOS auto-zoom */
  input, textarea, select { font-size: max(16px, 1rem) !important; }

  .scroll-prog { left: .5rem; height: 30vh; }
  .sp-dot      { width: 12px; height: 12px; }
  .sp-fixed-dot{ width: 7px;  height: 7px; }
}

@media (max-width: 480px) {
  .ds-footer-top { grid-template-columns: 1fr; }
  .pillar { flex-direction: column; }
  .scroll-prog { display: none; }

  /* Very small phones: tighter wrap padding */
  .ds-wrap, .container { padding: 0 clamp(12px, 4vw, 16px); }

  .ds-categories, .ds-courses-grid { gap: .75rem; }
  .cat-card, .course-card { border-radius: var(--r); }
}

/* ═══════════════════════════════════════════════════
   PHASE 2 COMPONENTS
   ═══════════════════════════════════════════════════ */

/* ── Light page body (Science section) ── */
body.ds-light {
  background: #fff;
  color: var(--c-dk);
}
body.ds-light .ds-nav {
  background: rgba(10,15,30,.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.08) !important;
}
body.ds-light .scroll-prog { opacity: .4; }

/* ── Breadcrumb ── */
.ds-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  color: var(--c-dk2);
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.ds-breadcrumb a   { color: var(--c-dk2); transition: color .15s; }
.ds-breadcrumb a:hover { color: var(--c-sci); }
.ds-breadcrumb .sep { color: #c0c8d8; }
/* Dark variant */
.ds-breadcrumb.dark { color: var(--c-text3); }
.ds-breadcrumb.dark a { color: var(--c-text2); }
.ds-breadcrumb.dark a:hover { color: var(--c-accent); }
.ds-breadcrumb.dark .sep { color: var(--c-text3); }

/* ══════════════════════════════════════════════════
   NIH-STYLE LAYOUT  (Science pages — light bg)
   ══════════════════════════════════════════════════ */
.nih-page { padding-top: var(--nav-h); background: #fff; min-height: 100vh; }

.nih-page-header {
  background: var(--c-check);
  border-bottom: 1px solid var(--c-bl);
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad-x) clamp(1.5rem, 4vw, 2.5rem);
}
.nih-page-header-inner { max-width: var(--mw); margin: 0 auto; }
.nih-page-title {
  font-family: var(--fh);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--c-dk);
  line-height: 1.15;
  letter-spacing: -.022em;
  margin-bottom: .5rem;
}
.nih-page-subtitle { font-size: 1rem; color: var(--c-dk2); line-height: 1.65; max-width: 620px; }

.nih-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 3rem;
  max-width: var(--mw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--pad-x) clamp(3rem, 8vw, 5rem);
  align-items: start;
}

/* Sidebar */
.nih-sidebar { position: sticky; top: 88px; }
.nih-sidebar-box {
  background: #f8f9fa;
  border: 1px solid var(--c-bl);
  border-radius: var(--r);
  padding: 1.25rem;
}
.nih-sidebar-head {
  font-family: var(--fh);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-dk2);
  margin-bottom: .85rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--c-bl);
}
.nih-sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: .05rem; }
.nih-sidebar-nav a {
  display: block;
  font-size: .85rem;
  color: var(--c-dk2);
  padding: .4rem .65rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
  line-height: 1.4;
}
.nih-sidebar-nav a:hover,
.nih-sidebar-nav a.active { color: var(--c-sci); background: rgba(0,120,200,.07); }

.nih-sidebar-cta {
  margin-top: 1.25rem;
  padding: 1.1rem;
  background: linear-gradient(135deg,rgba(0,120,200,.07),rgba(0,200,120,.05));
  border: 1px solid rgba(0,120,200,.18);
  border-radius: var(--rsm);
}
.nih-sidebar-cta p { font-size: .78rem; color: var(--c-dk2); line-height: 1.5; margin-bottom: .75rem; }
.nih-sidebar-cta a {
  display: block; text-align: center;
  font-size: .8rem; font-weight: 700; color: var(--c-sci);
  padding: .55rem; border: 1px solid rgba(0,120,200,.25); border-radius: 6px;
  transition: background .15s;
}
.nih-sidebar-cta a:hover { background: rgba(0,120,200,.08); }

/* Main content */
.nih-main { max-width: var(--rw); min-width: 0; }
.nih-section { margin-bottom: 3rem; scroll-margin-top: 90px; }
.nih-section h2 {
  font-family: var(--fh);
  font-size: 1.45rem; font-weight: 700;
  color: var(--c-dk); line-height: 1.2; letter-spacing: -.015em;
  margin-bottom: .9rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--c-sci);
  display: inline-block;
}
.nih-section h3 {
  font-family: var(--fh);
  font-size: 1.05rem; font-weight: 700;
  color: var(--c-dk); margin-bottom: .5rem;
}
.nih-section p { font-size: .94rem; color: #2c3244; line-height: 1.8; margin-bottom: .9rem; }
.nih-section ul { padding-left: 1.25rem; display: flex; flex-direction: column; gap: .4rem; margin-bottom: .9rem; }
.nih-section ul li { font-size: .92rem; color: #2c3244; line-height: 1.6; }

/* Learning objectives */
.learn-obj {
  background: var(--c-check);
  border-left: 4px solid var(--c-sci);
  border-radius: 0 var(--rsm) var(--rsm) 0;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}
.learn-obj-head {
  font-family: var(--fh); font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--c-sci); margin-bottom: .8rem;
}
.learn-obj ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.learn-obj li {
  font-size: .9rem; color: var(--c-dk); padding-left: 1.4rem;
  position: relative; line-height: 1.5;
}
.learn-obj li::before { content: '✓'; position: absolute; left: 0; color: var(--c-sci); font-weight: 700; }

/* Knowledge check */
.knowledge-check {
  background: var(--c-check);
  border: 1px solid rgba(0,120,200,.2);
  border-radius: var(--r);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}
.kc-head {
  font-family: var(--fh); font-size: .85rem; font-weight: 700;
  color: var(--c-sci); margin-bottom: .85rem;
  display: flex; align-items: center; gap: .45rem;
}
.kc-question { font-size: .95rem; font-weight: 600; color: var(--c-dk); line-height: 1.5; margin-bottom: 1rem; }
.kc-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.15rem;
  background: var(--c-sci); color: #fff;
  border: none; border-radius: var(--rsm);
  font-family: var(--fh); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .15s;
}
.kc-btn:hover { background: #0065a8; transform: translateY(-1px); }
.kc-answer {
  display: none;
  background: #fff; border: 1px solid var(--c-bl); border-radius: var(--rsm);
  padding: 1rem 1.25rem; margin-top: .85rem;
  font-size: .9rem; color: var(--c-dk); line-height: 1.65;
}
.kc-answer.open { display: block; }
.kc-answer strong { color: var(--c-sci); }

/* NIH Subject cards */
.nih-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1.1rem; margin: 1.5rem 0 2.5rem;
}
.nih-subject-card {
  background: #fff; border: 1px solid var(--c-bl); border-radius: var(--r);
  padding: 1.4rem; display: flex; flex-direction: column; gap: .65rem;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.nih-subject-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.09);
  border-color: rgba(0,120,200,.25); transform: translateY(-3px);
}
.nih-subject-icon { font-size: 1.6rem; }
.nih-subject-name { font-family: var(--fh); font-size: .975rem; font-weight: 700; color: var(--c-dk); }
.nih-subject-topics { font-size: .82rem; color: var(--c-dk2); line-height: 1.6; flex: 1; }
.nih-subject-cta {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; color: var(--c-sci);
  transition: gap .15s;
}
.nih-subject-cta:hover { gap: .6rem; }

/* NIH Bridge to course */
.nih-bridge {
  background: linear-gradient(135deg,rgba(0,120,200,.06),rgba(0,200,120,.04));
  border: 1px solid rgba(0,120,200,.18);
  border-radius: var(--r); padding: 2rem; margin-top: 3rem;
}
.nih-bridge p { font-size: .95rem; color: var(--c-dk); line-height: 1.75; margin-bottom: 1.25rem; }
.nih-bridge p strong { color: var(--c-sci); }

/* How to study block */
.study-tip {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .9rem 1rem;
  background: #f8f9fa; border-radius: var(--rsm);
  margin-bottom: .65rem;
}
.study-tip-icon { font-size: 1.1rem; flex-shrink: 0; }
.study-tip-text { font-size: .88rem; color: var(--c-dk); line-height: 1.6; }
.study-tip-text strong { color: var(--c-dk); }

/* ══════════════════════════════════════════════════
   FINANCE PAGE  (Investopedia + TRW style)
   ══════════════════════════════════════════════════ */
.fin-header {
  background: linear-gradient(135deg,#0a0f1e 0%,#0d1a2e 100%);
  padding: calc(var(--nav-h) + clamp(2.5rem, 7vw, 4rem)) var(--pad-x) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 2px solid rgba(255,180,0,.15);
}
.fin-header-inner { max-width: var(--mw); margin: 0 auto; }
.fin-header .ds-label { color: var(--c-fin); margin-bottom: .65rem; }
.fin-header h1 {
  font-family: var(--fh);
  font-size: clamp(1.8rem,4vw,3rem);
  font-weight: 800; color: var(--c-text); line-height: 1.12;
  letter-spacing: -.022em; margin-bottom: .85rem; max-width: 700px;
}
.fin-header h1 em { color: var(--c-fin); font-style: normal; }
.fin-header p { font-size: 1rem; color: var(--c-text2); max-width: 580px; line-height: 1.7; }

.fin-body { background: #fff; }
.fin-layout {
  display: grid; grid-template-columns: 1fr 270px; gap: 3rem;
  max-width: var(--mw); margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--pad-x) clamp(3rem, 8vw, 5rem);
  align-items: start;
}

/* Finance sidebar */
.fin-sidebar { position: sticky; top: 88px; }
.fin-sidebar-box {
  background: #f8f9fa; border: 1px solid var(--c-bl);
  border-radius: var(--r); padding: 1.25rem; margin-bottom: 1.1rem;
}
.fin-sidebar-head {
  font-family: var(--fh); font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--c-dk2);
  margin-bottom: .85rem; padding-bottom: .55rem; border-bottom: 1px solid var(--c-bl);
}
.fin-sidebar-links { list-style: none; display: flex; flex-direction: column; gap: .2rem; }
.fin-sidebar-links a {
  display: block; font-size: .85rem; color: var(--c-dk2);
  padding: .4rem .6rem; border-radius: 6px; transition: color .15s, background .15s;
}
.fin-sidebar-links a:hover { color: var(--c-fin); background: rgba(255,180,0,.07); }

/* Finance main content */
.fin-main { min-width: 0; max-width: var(--rw); }
.fin-section { margin-bottom: 2.75rem; scroll-margin-top: 90px; }
.fin-section h2 {
  font-family: var(--fh); font-size: 1.4rem; font-weight: 700;
  color: var(--c-dk); letter-spacing: -.015em; line-height: 1.2;
  margin-bottom: .85rem; padding-bottom: .45rem;
  border-bottom: 2px solid var(--c-fin); display: inline-block;
}
.fin-section h3 { font-family: var(--fh); font-size: 1rem; font-weight: 700; color: var(--c-dk); margin-bottom: .5rem; }
.fin-section p { font-size: .94rem; color: #2c3244; line-height: 1.8; margin-bottom: .9rem; }
.fin-section ul { padding-left: 1.25rem; display: flex; flex-direction: column; gap: .4rem; margin-bottom: .9rem; }
.fin-section ul li { font-size: .92rem; color: #2c3244; line-height: 1.6; }

/* Investopedia "What is X?" block */
.invest-block {
  background: #f8f9fa; border-left: 3px solid var(--c-fin);
  border-radius: 0 var(--rsm) var(--rsm) 0;
  padding: 1.25rem 1.5rem; margin: 1.75rem 0;
}
.invest-block-label {
  font-family: var(--fh); font-size: .72rem; font-weight: 700;
  color: var(--c-dk2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem;
}
.invest-block p { font-size: .92rem; color: var(--c-dk); line-height: 1.75; margin: 0; }

/* Finance subject breakdown cards */
.fin-subject-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin: 1.5rem 0;
}
.fin-subject-card {
  background: #fff; border: 1px solid var(--c-bl); border-radius: var(--r);
  padding: 1.4rem; display: flex; flex-direction: column; gap: .65rem;
  transition: box-shadow .2s, border-color .2s;
}
.fin-subject-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); border-color: rgba(255,180,0,.3); }
.fin-subject-name { font-family: var(--fh); font-size: .975rem; font-weight: 700; color: var(--c-dk); }
.fin-subject-topics { font-size: .84rem; color: var(--c-dk2); line-height: 1.6; flex: 1; }

/* Risk disclaimer */
.risk-notice {
  background: rgba(255,180,0,.06); border: 1px solid rgba(255,180,0,.22);
  border-radius: var(--r); padding: 1.1rem 1.35rem;
  display: flex; gap: .75rem; align-items: flex-start; margin: 1.75rem 0;
}
.risk-notice-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.risk-notice p { font-size: .88rem; color: var(--c-dk); line-height: 1.65; margin: 0; }

/* Finance bridge */
.fin-bridge {
  background: linear-gradient(135deg,rgba(255,180,0,.06),rgba(10,15,30,.03));
  border: 1px solid rgba(255,180,0,.2); border-radius: var(--r);
  padding: 1.75rem; margin-top: 2rem;
}
.fin-bridge p { font-size: .94rem; color: var(--c-dk); line-height: 1.75; margin-bottom: 1.25rem; }
.fin-bridge p strong { color: #7a5000; }

/* ══════════════════════════════════════════════════
   CRYPTO PAGE  (Bold dark, TRW energy)
   ══════════════════════════════════════════════════ */
.crypto-hero {
  min-height: 55vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + clamp(2.5rem, 7vw, 4rem)) var(--pad-x) clamp(2rem, 5vw, 3.5rem);
  background: var(--c-bg);
  position: relative; overflow: hidden;
}
.crypto-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 60% at 25% 50%, rgba(255,180,0,.07) 0%, transparent 60%),
    radial-gradient(ellipse 55% 50% at 75% 30%, rgba(0,100,230,.06) 0%, transparent 60%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}
.crypto-hero-inner { position: relative; z-index: 1; max-width: 720px; }

/* Accordion (course curriculum) */
.accordion { display: flex; flex-direction: column; gap: .5rem; }
.accordion-item { border: 1px solid var(--c-bl); border-radius: var(--rsm); overflow: hidden; }
.accordion-btn {
  width: 100%; background: #f8f9fa; border: none;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  cursor: pointer; text-align: left;
  font-family: var(--fh); font-size: .9rem; font-weight: 600; color: var(--c-dk);
  transition: background .15s;
}
.accordion-btn:hover { background: var(--c-check); }
.accordion-btn.open { background: var(--c-check); color: var(--c-sci); }
.accordion-icon { font-size: 1.1rem; color: var(--c-dk2); transition: transform .25s ease; flex-shrink: 0; }
.accordion-btn.open .accordion-icon { transform: rotate(45deg); color: var(--c-sci); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height .45s cubic-bezier(.16,1,.3,1); }
/* max-height for open state is set dynamically by JS: content.style.maxHeight = content.scrollHeight + 'px' */
/* CSS fallback in case JS hasn't run */
.accordion-content.open { max-height: 2000px; }
.accordion-body { padding: .85rem 1.25rem 1.25rem; background: #fff; }
.accordion-body ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.accordion-body li {
  font-size: .875rem; color: var(--c-dk2); padding-left: 1.2rem;
  position: relative; line-height: 1.5;
}
.accordion-body li::before { content: '→'; position: absolute; left: 0; color: var(--c-sci); font-size: .8rem; }

/* ══════════════════════════════════════════════════
   FREE RESOURCES PAGE
   ══════════════════════════════════════════════════ */
.resource-tabs {
  display: flex; gap: .5rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 2.5rem;
}
.resource-tab {
  padding: .6rem 1.35rem; border-radius: 100px;
  border: 1.5px solid var(--c-border);
  background: none; color: var(--c-text2);
  font-family: var(--fh); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.resource-tab:hover { border-color: var(--c-bm); color: var(--c-text); }
.resource-tab.active { border-color: var(--c-accent); color: var(--c-accent); background: rgba(0,200,120,.08); }
.resource-section { display: none; }
.resource-section.active { display: block; }

/* Interactive quiz (dark) */
.quiz-wrap { max-width: 660px; margin: 0 auto; }
.quiz-prog-bar { height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; margin-bottom: 2rem; }
.quiz-prog-fill { height: 100%; background: var(--c-accent); border-radius: 2px; transition: width .35s ease; }
.quiz-card {
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--rlg); padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.25rem;
}
.quiz-q-num {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--c-accent); margin-bottom: .75rem;
}
.quiz-q-text {
  font-family: var(--fh); font-size: 1.05rem; font-weight: 700;
  color: var(--c-text); line-height: 1.4; margin-bottom: 1.35rem;
}
.quiz-options { display: flex; flex-direction: column; gap: .6rem; }
.quiz-opt {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1.1rem; border: 1.5px solid var(--c-border);
  border-radius: var(--rsm); cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: .9rem; color: var(--c-text2);
  background: none; text-align: left;
  font-family: var(--fb); width: 100%;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--c-bm); color: var(--c-text); background: rgba(255,255,255,.04); }
.quiz-opt.correct { border-color: var(--c-accent); background: rgba(0,200,120,.09); color: var(--c-text); }
.quiz-opt.wrong   { border-color: #f87171; background: rgba(248,113,113,.09); color: var(--c-text); }
.quiz-opt .opt-letter {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid currentColor; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800;
}
.quiz-explain {
  display: none; margin-top: .9rem; padding: .9rem 1.1rem;
  background: rgba(0,200,120,.07); border: 1px solid rgba(0,200,120,.18);
  border-radius: var(--rsm); font-size: .85rem; color: var(--c-text2); line-height: 1.65;
}
.quiz-explain.open { display: block; }
.quiz-foot { display: flex; justify-content: flex-end; margin-top: 1rem; }
.quiz-score-display {
  text-align: center; background: var(--c-card);
  border: 1px solid var(--c-border); border-radius: var(--rlg);
  padding: 3rem 2rem; display: none;
}
.quiz-score-display.open { display: block; }
.quiz-score-num { font-family: var(--fh); font-size: 4.5rem; font-weight: 800; color: var(--c-accent); line-height: 1; }
.quiz-score-label { font-size: .85rem; color: var(--c-text3); margin-bottom: 1.5rem; }
.quiz-result-msg { font-size: 1rem; color: var(--c-text2); line-height: 1.7; max-width: 480px; margin: 0 auto 2rem; }

/* Checklist component */
.checklist { display: flex; flex-direction: column; gap: .7rem; max-width: 660px; margin: 0 auto; }
.checklist-item {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--r); padding: 1.1rem 1.25rem;
}
.checklist-num {
  font-family: var(--fh); font-size: .78rem; font-weight: 800;
  color: var(--c-accent); background: rgba(0,200,120,.1);
  border-radius: 6px; width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.checklist-text { font-size: .88rem; color: var(--c-text2); line-height: 1.6; }
.checklist-text strong { color: var(--c-text); }

/* ══════════════════════════════════════════════════
   PHASE 2 RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nih-layout { grid-template-columns: 200px 1fr; gap: 2rem; }
  .fin-layout  { grid-template-columns: 1fr 220px; gap: 2rem; }
  .fin-subject-grid { gap: .85rem; }
}
@media (max-width: 767px) {
  .nih-layout { grid-template-columns: 1fr; gap: 0; }
  .nih-sidebar { position: static; margin-bottom: 1.5rem; }
  .fin-layout  { grid-template-columns: 1fr; }
  .fin-sidebar { position: static; margin-top: 2rem; }
  .fin-subject-grid { grid-template-columns: 1fr; }
  .nih-subject-grid { grid-template-columns: 1fr 1fr; gap: .85rem; }
  .nih-section h2, .fin-section h2 { font-size: 1.2rem; }
  .resource-tabs { gap: .4rem; }
  .resource-tab { padding: .5rem 1rem; font-size: .8rem; }
  .quiz-wrap { max-width: 100%; }
  .checklist { max-width: 100%; }
}
@media (max-width: 480px) {
  .nih-subject-grid { grid-template-columns: 1fr; }
  .fin-subject-grid { grid-template-columns: 1fr; }
  .resource-tab { padding: .45rem .85rem; font-size: .78rem; }
}

/* ══════════════════════════════════════════════════
   COMPATIBILITY ALIASES  (BEM ↔ flat class bridge)
   ══════════════════════════════════════════════════ */

/* NIH subject card BEM aliases */
.nih-subject-card__icon { font-size: 1.6rem; display: block; }
.nih-subject-card__link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; color: var(--c-sci);
  transition: gap .15s; margin-top: auto;
}
.nih-subject-card:hover .nih-subject-card__link { gap: .6rem; }

/* Finance subject card BEM aliases */
.fin-subject-card__icon { font-size: 1.6rem; display: block; }
.fin-subject-card__link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; color: var(--c-fin);
  transition: gap .15s; margin-top: auto;
}
.fin-subject-card:hover .fin-subject-card__link { gap: .6rem; }
/* fin-subject-card on dark pages */
.ds .fin-subject-card {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1);
}
.ds .fin-subject-card h3 { color: var(--c-text); }
.ds .fin-subject-card p  { color: var(--c-text2); }
.ds .fin-subject-card:hover { border-color: rgba(255,180,0,.35); background: rgba(255,180,0,.04); }

/* Quiz class aliases (free-resources.html uses these) */
.quiz-progress-bar {
  height: 4px; background: rgba(255,255,255,.1);
  border-radius: 2px; margin-bottom: 1.5rem;
}
.quiz-progress-fill {
  height: 100%; background: var(--c-accent);
  border-radius: 2px; transition: width .35s ease;
}
.quiz-counter {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--c-accent); margin-bottom: .75rem;
}
.quiz-question {
  font-family: var(--fh); font-size: 1.05rem; font-weight: 700;
  color: var(--c-text); line-height: 1.4; margin-bottom: 1.2rem;
}
.quiz-q { display: none; }
.quiz-q.active { display: block; }
.quiz-score-emoji { font-size: 2.8rem; margin-bottom: 8px; }
.quiz-score-number {
  font-family: var(--fh); font-size: 3.5rem; font-weight: 800;
  color: var(--c-accent); line-height: 1;
}

/* Checklist interactive styles */
.checklist-item {
  border-radius: var(--r); padding: 1.1rem 1.25rem;
  transition: background .15s, border-color .15s;
}
.checklist-item label {
  display: flex; align-items: flex-start; gap: 1rem;
  cursor: pointer; width: 100%;
}
.checklist-item label > div { flex: 1; }
.checklist-item label strong { color: var(--c-text); display: block; margin-bottom: .4rem; font-size: .9rem; }
.checklist-item label p { color: var(--c-text2); font-size: .82rem; line-height: 1.6; margin: 0; }
.checklist-check {
  width: 18px; height: 18px; accent-color: var(--c-accent);
  cursor: pointer; flex-shrink: 0; margin-top: .15rem;
}
.checklist-item.done { border-color: rgba(0,200,120,.3); background: rgba(0,200,120,.04); }
.checklist-item.done strong { color: var(--c-accent); }

/* Accordion on dark pages (crypto.html body.ds) */
.ds .accordion-item { border-color: rgba(255,255,255,.1); }
.ds .accordion-btn {
  background: rgba(255,255,255,.04); color: var(--c-text);
}
.ds .accordion-btn:hover { background: rgba(255,255,255,.07); }
.ds .accordion-btn.open { background: rgba(255,180,0,.08); color: var(--c-fin); }
.ds .accordion-content { background: transparent; }
.ds .accordion-content h3 { color: var(--c-text); font-size: 1rem; margin-bottom: .5rem; }
.ds .accordion-content p  { color: var(--c-text2); font-size: .9rem; line-height: 1.7; margin-bottom: .75rem; }
.ds .accordion-content ul { padding-left: 1.2rem; }
.ds .accordion-content li { color: var(--c-text2); font-size: .88rem; line-height: 1.65; margin-bottom: .4rem; }
.ds .accordion-content strong { color: var(--c-text); }
/* Padding for accordion-content when there's no .accordion-body wrapper */
.accordion-content > *:not(.accordion-body) { padding: 0; }
.accordion-content > h3:first-child,
.accordion-content > p:first-child,
.accordion-content > ul:first-child { padding-top: 1rem; }
.ds .accordion-content { padding: 0 1.25rem; }
.ds .accordion-content.open { padding-bottom: 1.25rem; }

/* Fin header title/sub BEM classes */
.fin-header__title {
  font-family: var(--fh); font-size: clamp(1.8rem,4vw,3rem);
  font-weight: 800; color: var(--c-text); line-height: 1.12;
  letter-spacing: -.022em; margin-bottom: .65rem; max-width: 700px;
}
.fin-header__sub {
  font-size: 1rem; color: var(--c-text2); max-width: 580px; line-height: 1.7; margin-bottom: 0;
}

/* NIH bridge inner wrapper */
.nih-bridge__inner { max-width: 620px; }
.nih-bridge h2 {
  font-family: var(--fh); font-size: 1.5rem; font-weight: 800;
  color: var(--c-sci); margin-bottom: .65rem;
}

/* fin-bridge h2 */
.fin-bridge h2 {
  font-family: var(--fh); font-size: 1.3rem; font-weight: 800;
  color: var(--c-fin); margin-bottom: .5rem;
}

/* Fin sidebar inner */
.fin-sidebar__inner { padding: 1.5rem; background: rgba(255,255,255,.03); border-radius: var(--r); border: 1px solid rgba(255,255,255,.07); }
.fin-sidebar__cta { background: rgba(255,180,0,.06); border: 1px solid rgba(255,180,0,.18); border-radius: var(--r); padding: 1.25rem; }
.fin-sidebar__cta h3 { color: var(--c-text); font-family: var(--fh); font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.fin-sidebar__cta p  { font-size: .83rem; color: var(--c-text2); line-height: 1.6; margin: 0; }
.fin-sidebar__cta-label { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--c-fin); margin-bottom: .5rem; }

/* ══════════════════════════════════════════════════
   NAV BEM ALIASES  (Phase 2/3 pages use BEM naming)
   ══════════════════════════════════════════════════ */
.ds-nav__logo               { font-family: var(--fh); font-size: 1.15rem; font-weight: 800; color: var(--c-text); letter-spacing: -.02em; display: flex; align-items: center; gap: .35rem; text-decoration: none; }
.ds-nav__logo span:first-child,
.ds-logo-mark               { color: var(--c-accent); }
.ds-nav__links              { display: flex; align-items: center; gap: .25rem; list-style: none; padding: 0; margin: 0; flex: 1; justify-content: center; }
.ds-nav__links a            { font-size: .85rem; font-weight: 500; color: var(--c-text2); padding: .45rem .85rem; border-radius: 8px; transition: color .15s, background .15s; white-space: nowrap; text-decoration: none; }
.ds-nav__links a:hover      { color: var(--c-text); background: rgba(255,255,255,.07); }
.ds-nav__links a.active     { color: var(--c-text); background: rgba(255,255,255,.09); font-weight: 600; }
.ds-mobile-nav__close {
  position: absolute;
  top: max(1.25rem, env(safe-area-inset-top, 1.25rem));
  right: max(1.5rem, env(safe-area-inset-right, 1.5rem));
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  color: var(--c-text2); font-size: 1.2rem;
  cursor: pointer; padding: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; transition: color .15s, background .15s;
}
.ds-mobile-nav__close:hover { color: var(--c-text); background: rgba(255,255,255,.14); }

@media (max-width: 767px) {
  .ds-nav__links, .ds-nav > .ds-btn { display: none; }
}

/* ══════════════════════════════════════════════════
   PHASE 3 — LEARN / ARTICLE / COURSES PAGE STYLES
   ══════════════════════════════════════════════════ */

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3.5rem;
  max-width: var(--mw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--pad-x) clamp(3rem, 8vw, 5rem);
  align-items: start;
}
.article-sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.article-body { min-width: 0; max-width: var(--rw); }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-sidebar { position: static; margin-top: 2.5rem; display: none; }
}

/* Learn hub — article card grid */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1024px) { .learn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .learn-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* Science page hero (blue/purple/green gradient pages) */
.nih-hero {
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad-x);
  color: #fff;
}
.nih-hero .container { padding: 0; }

/* Courses page hero (replaces inline padding) */
.courses-hero {
  padding: calc(var(--nav-h) + clamp(3rem, 8vw, 5rem)) var(--pad-x) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  background: var(--c-bg);
  position: relative;
}

/* Courses grid (overrides inline styles) */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}
@media (max-width: 600px) {
  .courses-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ══════════════════════════════════════════════════
   GLOBAL VISUAL POLISH
   ══════════════════════════════════════════════════ */

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Better section heading rhythm */
.ds-section-head {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* Pillar cards — fluid padding */
.pillar {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Smoother link transitions globally */
a { transition: color .15s, opacity .15s; }

/* Footer fluid padding */
.ds-footer { padding: clamp(3rem, 6vw, 4rem) var(--pad-x) clamp(1.5rem, 3vw, 2rem); }
.ds-footer-top { padding-bottom: clamp(1.5rem, 3vw, 3rem); }

/* CTA banner fluid padding */
.ds-cta-banner { padding: var(--sec-gap) var(--pad-x); }
