/* ─────────────────────────────────────────
   GOOGLE FONTS
───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --bg:          #0b0e14;
  --surface:     #131720;
  --surface2:    #1a1f2e;
  --surface3:    #212636;
  --border:      #2a3040;
  --border2:     #1e2433;
  --accent:      #2962ff;
  --accent-dim:  rgba(41,98,255,.12);
  --accent-glow: rgba(41,98,255,.25);
  --accent-lit:  #5b8def;
  --green:       #26a69a;
  --green-dim:   rgba(38,166,154,.12);
  --green-lit:   #4dd0c4;
  --red:         #ef5350;
  --red-dim:     rgba(239,83,80,.12);
  --red-lit:     #ff7b7b;
  --yellow:      #f7b924;
  --yellow-dim:  rgba(247,185,36,.12);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167,139,250,.12);
  --orange:      #fb8c00;
  --orange-dim:  rgba(251,140,0,.12);
  --teal:        #00bfa5;
  --teal-dim:    rgba(0,191,165,.12);
  --pink:        #ec407a;
  --pink-dim:    rgba(236,64,122,.12);
  --text:        #e1e7ef;
  --text2:       #b0bac9;
  --muted:       #7a8599;
  --muted2:      #545e72;
  --sidebar-w:   240px;
  --header-h:    56px;
  --ticker-h:    40px;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 4px 24px rgba(0,0,0,.5);
  --shadow-glow: 0 0 20px rgba(41,98,255,.08);
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --ease-out:    cubic-bezier(0, 0, .2, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

html { scroll-behavior: smooth; font-size: 14px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-lit); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #7aa5ff; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img { max-width: 100%; }
p { color: var(--text2); line-height: 1.75; }

/* noise texture overlay (opt-in) */
.noise-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ─────────────────────────────────────────
   FOCUS STATES (accessibility)
───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-in {
  animation: fadeIn .5s var(--ease-out) both;
}
.fade-in-up {
  animation: fadeInUp .6s var(--ease-out) both;
}

/* ─────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--muted2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ─────────────────────────────────────────
   TICKER TAPE
───────────────────────────────────────── */
#ticker-tape {
  width: 100%;
  height: var(--ticker-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: hidden;
}
#ticker-tape .tradingview-widget-container,
#ticker-tape .tradingview-widget-container__widget {
  height: 100% !important;
}

/* ─────────────────────────────────────────
   APP SHELL
───────────────────────────────────────── */
.app {
  display: flex;
  height: calc(100vh - var(--ticker-h));
  position: sticky;
  top: var(--ticker-h);
}

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  position: fixed;
  top: var(--ticker-h);
  bottom: 0;
  left: 0;
  z-index: 100;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-logo {
  padding: 20px 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #7c4dff);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(41,98,255,.3);
}
.sidebar-logo .logo-text { font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.sidebar-logo .logo-text small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: .02em; }

.sidebar-section { padding: 16px 8px 4px; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 0 8px;
  margin-bottom: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-lit);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item .nav-icon { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent-lit);
  padding: 1px 6px;
  border-radius: 99px;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}
.market-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: var(--radius);
  background: var(--surface2);
  font-size: 12px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--red);
}
.status-dot.open { background: var(--green); animation: pulse 2s infinite; box-shadow: 0 0 8px rgba(38,166,154,.4); }
.status-text { flex: 1; }
.status-text strong { display: block; color: var(--text); }
.status-text span { color: var(--muted); font-size: 11px; }

/* sidebar card header (from inline styles) */
.sidebar-card-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* watchlist container (from inline styles) */
.wl-container {
  max-height: 320px;
  overflow-y: auto;
}
.wl-container::-webkit-scrollbar { width: 3px; }
.wl-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--ticker-h));
  overflow-y: auto;
}

.page-header {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(19,23,32,.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title { font-size: 16px; font-weight: 700; flex: 1; letter-spacing: -.02em; }
.page-title small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  width: 240px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.header-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.header-search input {
  background: none;
  border: none;
  outline: none;
  font: inherit;
  color: var(--text);
  font-size: 13px;
  width: 100%;
}
.header-search input::placeholder { color: var(--muted); }
.header-search .search-icon { color: var(--muted); font-size: 14px; }

.content-area { padding: 24px; }

/* ─────────────────────────────────────────
   SECTIONS
───────────────────────────────────────── */
.section { display: none; }
.section.active { display: block; animation: fadeIn .35s var(--ease-out); }

/* ─────────────────────────────────────────
   CARDS & GRID
───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 4px 20px rgba(41,98,255,.06);
}
.card-sm { padding: 14px 16px; }
.card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title .card-title-icon { font-size: 14px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ─────────────────────────────────────────
   STAT CARDS (dashboard)
───────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--border);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.stat-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25), var(--shadow-glow);
}
.stat-card:hover::before { opacity: 1; }

/* colored top borders per stat card */
.stat-card:nth-child(1) { border-top-color: var(--accent); }
.stat-card:nth-child(2) { border-top-color: var(--green); }
.stat-card:nth-child(3) { border-top-color: var(--purple); }
.stat-card:nth-child(4) { border-top-color: var(--orange); }
.stat-card:nth-child(5) { border-top-color: var(--teal); }
.stat-card:nth-child(6) { border-top-color: var(--pink); }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  background: linear-gradient(135deg, var(--text) 60%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-sub { font-size: 12px; color: var(--muted); }
.up   { color: var(--green); }
.down { color: var(--red); }
.neutral { color: var(--yellow); }

/* ─────────────────────────────────────────
   ASSET CARDS (markets)
───────────────────────────────────────── */
.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  cursor: pointer;
}
.asset-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.3), 0 0 16px rgba(41,98,255,.06);
}
.asset-card-header {
  padding: 14px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.asset-ticker {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.01em;
}
.asset-name { font-size: 11px; color: var(--muted); margin-top: 3px; }
.asset-price-wrap { text-align: right; }
.asset-price { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.asset-change {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
}
.asset-change.up   { background: var(--green-dim); color: var(--green-lit); }
.asset-change.down { background: var(--red-dim); color: var(--red-lit); }
.asset-chart { height: 80px; }

/* tabs for markets section */
.market-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.market-tab {
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.market-tab:hover { color: var(--text); background: var(--surface2); }
.market-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(41,98,255,.3);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─────────────────────────────────────────
   SECTION HEADERS
───────────────────────────────────────── */
.section-intro {
  margin-bottom: 28px;
}
.section-intro .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-lit);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.section-intro .eyebrow::before {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.section-intro h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 8px;
  line-height: 1.2;
}
.section-intro p { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ─────────────────────────────────────────
   EDUCATION — MODULE NAV
───────────────────────────────────────── */
.edu-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
.edu-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.edu-nav::-webkit-scrollbar { width: 3px; }
.edu-nav::-webkit-scrollbar-thumb { background: var(--border); }
.edu-nav-section { margin-bottom: 16px; }
.edu-nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 6px 8px 4px;
}
.edu-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
  margin-bottom: 1px;
}
.edu-nav-item:hover { background: var(--surface2); color: var(--text); }
.edu-nav-item.active { background: var(--accent-dim); color: var(--accent-lit); }
.edu-nav-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background .2s var(--ease);
}
.edu-nav-item.active .dot { background: var(--accent); box-shadow: 0 0 6px rgba(41,98,255,.4); }
.edu-nav-item.done .dot { background: var(--green); box-shadow: 0 0 6px rgba(38,166,154,.4); }

/* ─────────────────────────────────────────
   ACCORDION (module blocks)
───────────────────────────────────────── */
.module-block { margin-bottom: 12px; }
.module-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all .25s var(--ease);
  user-select: none;
  position: relative;
}
.module-header:hover {
  border-color: var(--accent-glow);
  background: var(--surface2);
}
.module-header.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--accent);
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface) 100%);
  box-shadow: 0 2px 12px rgba(41,98,255,.08);
}
.module-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.module-info { flex: 1; }
.module-title { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.module-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.module-chevron {
  color: var(--muted);
  font-size: 16px;
  transition: transform .3s var(--ease), color .2s var(--ease);
  flex-shrink: 0;
}
.module-header.open .module-chevron { transform: rotate(180deg); color: var(--accent-lit); }

.module-body {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-left: 3px solid var(--accent);
  border-top: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease), padding .25s var(--ease);
}
.module-body.open {
  max-height: 9999px;
  padding: 0 0 4px;
}
.module-content { padding: 20px 24px 8px; }

/* lesson items inside module */
.lesson {
  border-bottom: 1px solid var(--border2);
  padding: 14px 0;
}
.lesson:last-child { border-bottom: none; padding-bottom: 0; }
.lesson-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 2px 0;
  transition: color .2s var(--ease);
}
.lesson-header:hover { color: var(--accent-lit); }
.lesson-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-lit);
  background: var(--accent-dim);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lesson-title { font-size: 13px; font-weight: 600; flex: 1; }
.lesson-chevron { color: var(--muted); font-size: 12px; transition: transform .25s var(--ease); }
.lesson-header.open .lesson-chevron { transform: rotate(180deg); }
.lesson-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease);
}
.lesson-body.open { max-height: 9999px; }
.lesson-text { padding: 12px 0 4px 34px; }
.lesson-text p { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.lesson-text ul, .lesson-text ol { margin: 8px 0 10px 20px; color: var(--text2); font-size: 13px; }
.lesson-text li { margin-bottom: 5px; }
.lesson-text strong { color: var(--text); }
.lesson-text h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-lit);
  letter-spacing: .04em;
  margin: 14px 0 6px;
  text-transform: uppercase;
}

/* callout / example boxes */
.callout {
  margin: 10px 0;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.65;
  border-left: 3px solid;
  backdrop-filter: blur(4px);
}
.callout.example { background: var(--green-dim); border-color: var(--green); color: var(--green-lit); }
.callout.warning { background: var(--red-dim); border-color: var(--red); color: var(--red-lit); }
.callout.tip     { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-lit); }
.callout.info    { background: var(--yellow-dim); border-color: var(--yellow); color: #fdd835; }
.callout strong  { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; opacity: .85; }

/* ─────────────────────────────────────────
   DATA TABLE
───────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border2);
  color: var(--text2);
  vertical-align: middle;
  transition: background .15s var(--ease);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(41,98,255,.03); }
.data-table td:first-child { font-weight: 600; color: var(--accent-lit); }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

/* ─────────────────────────────────────────
   PILLS / TAGS
───────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .01em;
}
.pill-green  { background: var(--green-dim); color: var(--green-lit); }
.pill-red    { background: var(--red-dim); color: var(--red-lit); }
.pill-yellow { background: var(--yellow-dim); color: var(--yellow); }
.pill-blue   { background: var(--accent-dim); color: var(--accent-lit); }
.pill-purple { background: var(--purple-dim); color: var(--purple); }
.pill-orange { background: var(--orange-dim); color: var(--orange); }

/* ─────────────────────────────────────────
   GLOSSARY
───────────────────────────────────────── */
.glossary-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 20px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.glossary-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.glossary-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font: inherit;
  color: var(--text);
  font-size: 15px;
}
.glossary-search input::placeholder { color: var(--muted); }
.glossary-search span { font-size: 18px; color: var(--muted); }

.glossary-alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.alpha-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
}
.alpha-btn:hover, .alpha-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(41,98,255,.25);
}

.glossary-letter-group { margin-bottom: 28px; }
.glossary-letter {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-lit);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  letter-spacing: -.02em;
}
.glossary-terms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gterm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.gterm::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.gterm:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 4px 16px rgba(0,0,0,.2), 0 0 12px rgba(41,98,255,.05);
  transform: translateY(-1px);
}
.gterm:hover::before { opacity: 1; }
.gterm h4 { font-size: 13px; font-weight: 700; color: var(--accent-lit); margin-bottom: 6px; letter-spacing: -.01em; }
.gterm p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.gterm.hidden { display: none; }

/* ─────────────────────────────────────────
   RESEARCH SECTION
───────────────────────────────────────── */
.research-step {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: all .25s var(--ease);
}
.research-step:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 4px 16px rgba(0,0,0,.15), var(--shadow-glow);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c4dff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(41,98,255,.3);
}
.step-body h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.step-body p  { font-size: 13px; color: var(--muted); }
.step-body ul { font-size: 13px; color: var(--text2); margin: 6px 0 0 18px; }
.step-body li { margin-bottom: 3px; }

.news-source {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s var(--ease);
}
.news-source:hover {
  border-color: var(--accent-glow);
  background: var(--surface2);
}
.news-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 8px;
  flex-shrink: 0;
}
.news-body h4 { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.news-body p  { font-size: 12px; color: var(--muted); }
.news-type { margin-left: auto; }

/* ─────────────────────────────────────────
   DISCLAIMER BANNER
───────────────────────────────────────── */
.disclaimer {
  background: linear-gradient(135deg, rgba(247,185,36,.08) 0%, rgba(251,140,0,.06) 100%);
  border: 1px solid rgba(247,185,36,.25);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  font-size: 12px;
  color: #fdd835;
  line-height: 1.7;
  margin-bottom: 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.disclaimer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--orange), var(--yellow));
}
.disclaimer-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

/* ─────────────────────────────────────────
   WATCHLIST
───────────────────────────────────────── */
.watchlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.watchlist-item:hover { background: var(--surface2); }
.wl-ticker { font-size: 13px; font-weight: 700; width: 60px; flex-shrink: 0; letter-spacing: -.01em; }
.wl-name { font-size: 11px; color: var(--muted); flex: 1; }
.wl-price { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wl-change {
  font-size: 11px;
  font-weight: 600;
  width: 56px;
  text-align: right;
}

/* ─────────────────────────────────────────
   DASHBOARD LAYOUT
───────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.dash-main { display: flex; flex-direction: column; gap: 20px; }
.dash-side { display: flex; flex-direction: column; gap: 16px; }

/* TradingView widget sizing */
.tv-widget {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.tv-widget iframe {
  display: block;
}
.screener-wrap .tv-widget {
  border-radius: 0;
  overflow: visible;
  border: none;
  transform: none;
}

/* ─────────────────────────────────────────
   MODULE COLOR THEMES
───────────────────────────────────────── */
.mod-blue   { background: var(--accent-dim); }
.mod-green  { background: var(--green-dim); }
.mod-purple { background: var(--purple-dim); }
.mod-orange { background: var(--orange-dim); }
.mod-red    { background: var(--red-dim); }
.mod-yellow { background: var(--yellow-dim); }
.mod-teal   { background: var(--teal-dim); }
.mod-pink   { background: var(--pink-dim); }

/* ─────────────────────────────────────────
   PROGRESS BAR
───────────────────────────────────────── */
.progress-bar {
  background: var(--surface3);
  border-radius: 99px;
  height: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c4dff);
  border-radius: 99px;
  transition: width .5s var(--ease);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  animation: shimmer 2s infinite;
  background-size: 200% 100%;
}

/* ─────────────────────────────────────────
   QUICK START CARDS (from inline styles)
───────────────────────────────────────── */
.quick-start-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.quick-start-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.quick-start-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2), var(--shadow-glow);
}
.quick-start-card:hover::before { opacity: 1; }
.quick-start-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}
.quick-start-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.01em;
  color: var(--text);
}
.quick-start-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.quick-start-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-lit);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s var(--ease), color .2s var(--ease);
}
.quick-start-link:hover {
  gap: 8px;
  color: #7aa5ff;
  text-decoration: none;
}

/* ─────────────────────────────────────────
   MISTAKE CARDS (from inline styles)
───────────────────────────────────────── */
.mistake-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all .25s var(--ease);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.mistake-card:hover {
  border-color: rgba(239,83,80,.2);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.mistake-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--red-dim);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.mistake-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -.01em;
}
.mistake-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────────
   EVENT ROW & BADGES (from inline styles)
───────────────────────────────────────── */
.event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  transition: background .15s var(--ease);
  border-bottom: 1px solid var(--border2);
}
.event-row:last-child { border-bottom: none; }
.event-row:hover { background: var(--surface2); }

.event-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.event-badge.earnings { background: var(--accent-dim); color: var(--accent-lit); }
.event-badge.fomc     { background: var(--purple-dim); color: var(--purple); }
.event-badge.cpi      { background: var(--yellow-dim); color: var(--yellow); }
.event-badge.jobs     { background: var(--green-dim); color: var(--green-lit); }
.event-badge.gdp      { background: var(--orange-dim); color: var(--orange); }
.event-badge.ipo      { background: var(--pink-dim); color: var(--pink); }
.event-badge.fed      { background: var(--red-dim); color: var(--red-lit); }
.event-badge.opex     { background: var(--teal-dim); color: var(--teal); }

/* ─────────────────────────────────────────
   SCROLL TO TOP BUTTON
───────────────────────────────────────── */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .3s var(--ease);
  box-shadow: 0 4px 16px rgba(41,98,255,.35);
  z-index: 999;
  border: none;
}
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-to-top:hover {
  background: #1e56e0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(41,98,255,.45);
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.page-footer {
  margin-top: 60px;
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.page-footer a { color: var(--muted); transition: color .2s var(--ease); }
.page-footer a:hover { color: var(--accent-lit); }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .edu-layout { grid-template-columns: 1fr; }
  .edu-nav { position: static; max-height: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-240px);
    width: 240px;
    transition: transform .3s var(--ease);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,.5);
  }
  .main { margin-left: 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .glossary-terms { grid-template-columns: 1fr; }
  .content-area { padding: 16px; }
  .hamburger { display: flex !important; }
  .section-intro h2 { font-size: 22px; }
  .stat-value { font-size: 22px; }
  .header-search { width: 180px; }
  .dash-grid { grid-template-columns: 1fr; }
  .scroll-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
}
@media (max-width: 480px) {
  .content-area { padding: 12px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .page-header { padding: 0 14px; gap: 10px; }
  .header-search { width: 140px; padding: 5px 10px; }
  .section-intro h2 { font-size: 20px; }
  .market-tabs { padding: 4px; gap: 2px; }
  .market-tab { padding: 6px 12px; font-size: 12px; }
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
  transition: all .2s var(--ease);
}
.hamburger:hover { background: var(--surface3); border-color: var(--accent-glow); }

/* ─────────────────────────────────────────
   UTILITY CLASSES
───────────────────────────────────────── */
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-accent { color: var(--accent-lit); }
.text-muted  { color: var(--muted); }
.text-purple { color: var(--purple); }

.bg-surface  { background: var(--surface); }
.bg-surface2 { background: var(--surface2); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────────────────
   CARD VARIANTS
───────────────────────────────────────── */
.card-flush { padding: 0; overflow: hidden; }
.no-margin { margin: 0 !important; }
.card-badge { font-size: 11px; color: var(--muted); }

/* ─────────────────────────────────────────
   SECTION SPACING HELPERS
───────────────────────────────────────── */
.sub-intro { margin-bottom: 16px; }
.h3 { font-size: 20px; }
.qs-intro { margin-top: 8px; margin-bottom: 12px; }
.section-block { margin-bottom: 32px; }
.screener-wrap { margin-top: 24px; }
.research-steps-wrap { margin-bottom: 32px; }
.table-inline { margin: 10px 0; }

/* ─────────────────────────────────────────
   DASHBOARD SIDEBAR CARDS
───────────────────────────────────────── */
.concept-text { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.concept-highlight { color: var(--accent-lit); }
.concept-sub { font-size: 12px; color: var(--muted); }
.concept-rule {
  margin-top: 12px;
  padding: 10px;
  background: var(--green-dim);
  border-radius: 6px;
  font-size: 12px;
  color: var(--green-lit);
}

.events-list { display: flex; flex-direction: column; gap: 8px; }
.event-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.event-high { background: var(--red-dim); color: var(--red-lit); }
.event-med  { background: var(--yellow-dim); color: var(--yellow); }
.event-low  { background: var(--green-dim); color: var(--green-lit); }

.card-desc { font-size: 13px; color: var(--text2); margin-bottom: 16px; }
.list-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-lit);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.spaced-list {
  font-size: 13px;
  color: var(--text2);
  margin-left: 16px;
  line-height: 2;
}

/* ─────────────────────────────────────────
   MISTAKES LIST (MODULE 8)
───────────────────────────────────────── */
.mistakes-intro { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.mistakes-list { display: flex; flex-direction: column; gap: 10px; }
.mistake-title { font-size: 13px; display: block; margin-bottom: 3px; }
.mistake-desc { font-size: 12px; color: var(--muted); margin: 0; }

/* ─────────────────────────────────────────
   GLOBAL SEARCH DROPDOWN
───────────────────────────────────────── */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  display: none;
  overflow: hidden;
}
.search-dropdown.visible { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s var(--ease);
  border-bottom: 1px solid var(--border2);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface2); }
.search-result-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-lit);
  background: var(--accent-dim);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.search-result-label {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-no-result {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ─────────────────────────────────────────
   SEARCH RESULTS OVERLAY (unused fallback)
───────────────────────────────────────── */
.search-results-overlay { display: none; }

/* ─────────────────────────────────────────
   SCROLL-TO-TOP (from HTML)
───────────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), background .15s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(41,98,255,.35);
  pointer-events: none;
}
.scroll-top-btn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top-btn:hover { background: var(--accent-lit); }

/* ─────────────────────────────────────────
   SHORTCUT TOOLTIP
───────────────────────────────────────── */
.shortcut-tooltip {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  z-index: 9999;
  font-size: 13px;
  color: var(--text2);
  opacity: 0;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  min-width: 220px;
  text-align: center;
}
.shortcut-tooltip.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.shortcut-tooltip strong { display: block; color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.shortcut-row { display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 4px; }
.shortcut-row kbd {
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-lit);
  font-family: inherit;
}
.shortcut-dismiss {
  margin-top: 10px;
  padding: 6px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s;
}
.shortcut-dismiss:hover { background: var(--accent-lit); }

/* ─────────────────────────────────────────
   PRICE FLASH ANIMATIONS
───────────────────────────────────────── */
.flash-green { background: var(--green-dim) !important; transition: background .1s; }
.flash-red   { background: var(--red-dim) !important; transition: background .1s; }

@media (max-width: 768px) {
  .scroll-top-btn { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
  .shortcut-tooltip { display: none !important; }
  .search-dropdown { left: -60px; right: auto; min-width: 280px; }
}
