/* Staunch Equities — Member dashboard (demo base)
   Dark navy · SE green #4FB94B · mint #8BE08A · DM Sans / Inter */

:root {
  --bg: #060914;
  --bg-2: #080C1A;
  --sidebar: #090D1C;
  --surface: #0E1324;
  --surface-2: #121830;
  --surface-hover: #141B33;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --text: #F3F6FB;
  --text-muted: #A3ACC0;
  --text-dim: #6A7389;
  --green: #4FB94B;
  --green-rgb: 79, 185, 75;
  --mint: #8BE08A;
  --red: #EF5350;
  --amber: #E8B04B;
  --blue: #5B8DEF;
  --teal: #26A69A;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Inter", "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "DM Sans", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(79, 185, 75, 0.07), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(91, 141, 239, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: #b6f0b5; }
button { font: inherit; color: inherit; }
code, kbd { font-family: var(--mono); font-size: 0.86em; }
code {
  background: rgba(139, 224, 138, 0.08);
  border: 1px solid rgba(139, 224, 138, 0.16);
  color: var(--mint);
  padding: 0.08em 0.4em;
  border-radius: 5px;
}
kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.75rem;
}

:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--green); color: #041005; padding: 0.5rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ───────────────────── Shell ───────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0A0F20 0%, var(--sidebar) 100%);
  border-right: 1px solid var(--border);
  z-index: 60;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: var(--topbar-h);
  padding: 0 1.15rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand a.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); min-width: 0; }
.sidebar-brand img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.brand-text {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  white-space: nowrap;
}
.brand-text .s { color: var(--green); }
.brand-text .e { color: #E8EDF5; font-weight: 500; }

.pro-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #041005;
  background: linear-gradient(135deg, var(--mint), var(--green));
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(79, 185, 75, 0.3);
  white-space: nowrap;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-label {
  margin: 0.9rem 0.65rem 0.45rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nav-label:first-child { margin-top: 0.15rem; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.58rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.side-nav a.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(79, 185, 75, 0.16), rgba(79, 185, 75, 0.04));
  box-shadow: inset 0 0 0 1px rgba(79, 185, 75, 0.18);
}
.side-nav a.is-active svg { color: var(--mint); opacity: 1; }
.side-nav a.is-active::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--green);
  box-shadow: 0 0 12px rgba(79, 185, 75, 0.7);
}
.side-nav .nav-meta {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
}
.side-nav a.is-active .nav-meta { color: var(--mint); border-color: rgba(79,185,75,0.25); background: rgba(79,185,75,0.08); }
.side-nav .ext { margin-left: auto; width: 13px !important; height: 13px !important; opacity: 0.5; }

.sidebar-card {
  margin: 1.1rem 0.15rem 0;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 141, 239, 0.22);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(91, 141, 239, 0.18), transparent 60%),
    var(--surface);
}
.sidebar-card h4 { margin: 0.5rem 0 0.25rem; font-size: 0.92rem; }
.sidebar-card p { margin: 0 0 0.8rem; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
.discord-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(88, 101, 242, 0.18); color: #9AA4FF;
  border: 1px solid rgba(88, 101, 242, 0.32);
}

.sidebar-foot {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.status-dot {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.status-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 8px rgba(232, 176, 75, 0.7);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.65);
  backdrop-filter: blur(3px);
  z-index: 55;
}

/* Main column */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1.5rem;
  background: rgba(6, 9, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.menu-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: transparent;
  cursor: pointer;
  place-items: center;
  color: var(--text);
  flex-shrink: 0;
}

.crumbs {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.86rem; color: var(--text-dim);
  min-width: 0;
  white-space: nowrap;
}
.crumbs strong { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { opacity: 0.5; }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.top-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.84rem; font-weight: 500;
  color: var(--text-muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.top-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.top-link svg { width: 15px; height: 15px; }

.member {
  position: relative;
}
.member-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.25rem 0.7rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.member-chip:hover { border-color: rgba(79, 185, 75, 0.35); background: rgba(79,185,75,0.05); }
.avatar {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  color: #041005;
  background: linear-gradient(135deg, var(--mint), var(--green));
  box-shadow: 0 0 0 2px rgba(6, 9, 20, 1), 0 0 0 3px rgba(79, 185, 75, 0.45);
  flex-shrink: 0;
}
.member-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.member-meta strong { font-size: 0.82rem; font-weight: 600; }
.member-meta span { font-size: 0.7rem; color: var(--mint); font-weight: 600; letter-spacing: 0.02em; }
.member-chip .caret { width: 14px; height: 14px; color: var(--text-dim); }

.member-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 250px;
  padding: 0.45rem;
  border-radius: var(--radius);
  background: #0F1428;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
  display: none;
}
.member-menu.is-open { display: block; animation: pop 0.14s ease-out; }
.member-menu .mm-head {
  padding: 0.6rem 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
}
.member-menu .mm-head strong { display: block; font-size: 0.88rem; }
.member-menu .mm-head span { font-size: 0.76rem; color: var(--text-dim); }
.member-menu a, .member-menu button {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.55rem 0.65rem; border-radius: 8px;
  font-size: 0.85rem; color: var(--text-muted);
  background: none; border: 0; cursor: pointer; text-align: left;
}
.member-menu a:hover, .member-menu button:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.member-menu svg { width: 16px; height: 16px; opacity: 0.8; }
.member-menu hr { border: 0; border-top: 1px solid var(--border); margin: 0.35rem 0; }

@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Demo banner */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.1rem 1.5rem 0;
  padding: 0.6rem 0.65rem 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(232, 176, 75, 0.32);
  background: linear-gradient(90deg, rgba(232, 176, 75, 0.07), rgba(232, 176, 75, 0.02));
  color: var(--text-muted);
  font-size: 0.82rem;
}
.demo-banner[hidden] { display: none; }
.demo-banner .tag-demo {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber); border: 1px solid rgba(232, 176, 75, 0.35);
  padding: 0.12rem 0.45rem; border-radius: 999px; flex-shrink: 0;
}
.demo-banner p { margin: 0; flex: 1; }
.demo-banner strong { color: var(--text); font-weight: 600; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 0; background: transparent; color: var(--text-dim); cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* Content */
.content {
  width: 100%;
  max-width: 1320px;
  padding: 1.6rem 1.5rem 2.5rem;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
}
.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.page-head .sub { margin: 0.45rem 0 0; color: var(--text-muted); max-width: 640px; font-size: 0.95rem; }
.page-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; }

.section { margin-top: 2rem; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 0.9rem;
}
.section-head h2 {
  margin: 0; font-family: var(--font-display);
  font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em;
}
.section-head .more { font-size: 0.84rem; font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  font-size: 0.86rem; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--green); color: #041005;
  box-shadow: 0 0 0 1px rgba(79, 185, 75, 0.25), 0 6px 22px rgba(79, 185, 75, 0.25);
}
.btn-primary:hover { background: #5fc85a; color: #041005; box-shadow: 0 0 0 1px rgba(79,185,75,0.4), 0 8px 28px rgba(79,185,75,0.35); }
.btn-ghost { background: rgba(255,255,255,0.02); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); color: var(--text); background: rgba(255,255,255,0.05); }
.btn-discord { background: #5865F2; color: #fff; }
.btn-discord:hover { background: #6b77f5; color: #fff; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}
.card h3 { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.88rem; }

/* Welcome */
.welcome {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.6rem 1.7rem;
  border-radius: 18px;
  border: 1px solid rgba(79, 185, 75, 0.22);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(79, 185, 75, 0.16), transparent 55%),
    linear-gradient(180deg, #0F1529, #0B1020);
  box-shadow: 0 0 50px rgba(79, 185, 75, 0.06);
}
.welcome h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.welcome h1 .accent { color: var(--mint); }
.welcome p.lead { margin: 0 0 1.1rem; color: var(--text-muted); max-width: 520px; }
.welcome .cta-row { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.welcome-visual {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: #0A0D18;
  aspect-ratio: 16 / 9;
}
.welcome-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.welcome-visual .ribbon { position: absolute; left: 10px; top: 10px; }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}
.stat {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.55rem; }
.stat-label { font-size: 0.76rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0.04em; text-transform: uppercase; }
.stat-icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(79, 185, 75, 0.1); border: 1px solid rgba(79, 185, 75, 0.22); color: var(--mint);
}
.stat-icon svg { width: 16px; height: 16px; }
.stat-icon.blue { background: rgba(88,101,242,0.14); border-color: rgba(88,101,242,0.3); color: #9AA4FF; }
.stat-icon.amber { background: rgba(232,176,75,0.12); border-color: rgba(232,176,75,0.28); color: var(--amber); }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.65rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}
.stat-value small { font-size: 0.85rem; font-weight: 500; color: var(--text-dim); letter-spacing: 0; }
.stat-foot { margin-top: 0.35rem; font-size: 0.78rem; color: var(--text-muted); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

/* Tags / pills */
.pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  background: rgba(6, 9, 20, 0.7);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.pill-example { color: var(--amber); border-color: rgba(232, 176, 75, 0.4); background: rgba(20, 14, 4, 0.75); }
.pill-bands { color: #7FE3D8; border-color: rgba(38, 166, 154, 0.45); }
.pill-trend { color: #9DB9FF; border-color: rgba(91, 141, 239, 0.45); }
.pill-stretch { color: #F6A6A4; border-color: rgba(239, 83, 80, 0.4); }
.pill-suite { color: var(--mint); border-color: rgba(79, 185, 75, 0.45); }
.pill-soon { color: var(--text-dim); }
.pill-ready { color: var(--mint); border-color: rgba(79,185,75,0.4); }

/* Example cards */
.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}
.example-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.example-card:hover {
  border-color: rgba(79, 185, 75, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}
.ex-thumb {
  position: relative;
  aspect-ratio: 16 / 8.5;
  background: #0A0E1B;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ex-thumb img, .ex-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ex-thumb .pills { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 0.4rem; z-index: 2; }
.ex-thumb .tf {
  position: absolute; bottom: 9px; right: 10px; z-index: 2;
  font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted);
  background: rgba(6, 9, 20, 0.75); border: 1px solid var(--border); padding: 0.1rem 0.4rem; border-radius: 6px;
}
.ex-body { padding: 0.95rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.ex-asset { display: flex; align-items: center; gap: 0.65rem; }
.ticker-dot {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-2); color: var(--text);
  flex-shrink: 0;
}
.ex-asset h3 { margin: 0; font-size: 0.98rem; font-weight: 650; line-height: 1.2; }
.ex-asset .meta { font-size: 0.76rem; color: var(--text-dim); }
.ex-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(6, 9, 20, 0.45);
}
.ex-metrics div { padding: 0.55rem 0.65rem; }
.ex-metrics div + div { border-left: 1px solid var(--border); }
.ex-metrics dt { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.ex-metrics dd { margin: 0.1rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.ex-metrics dd.neg { color: #F08A88; }
.ex-metrics dd.pos { color: var(--mint); }
.ex-dl { margin: 0; }
.ex-note { margin: 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.ex-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding-top: 0.7rem; border-top: 1px solid var(--border);
}
.ex-foot .fine { font-size: 0.7rem; color: var(--text-dim); }
.link-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--mint); font-size: 0.84rem; font-weight: 600;
}
.link-btn:hover { color: #b6f0b5; }

/* Data table (Backtests library) */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.5rem;
}
.data-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
  line-height: 1.35;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0A0F1F;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
  user-select: none;
}
.data-table thead th.num { text-align: right; }
.data-table .th-sort {
  cursor: pointer;
}
.data-table .th-sort:hover,
.data-table .th-sort:focus-visible {
  color: var(--mint);
}
.data-table .th-sort.is-active {
  color: var(--mint);
}
.data-table .th-sort.is-active::after {
  content: " ↓";
  font-size: 0.75em;
  opacity: 0.85;
}
.data-table .th-sort.is-active[aria-sort="ascending"]::after {
  content: " ↑";
}
.data-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:nth-child(even) td {
  background: rgba(6, 9, 20, 0.35);
}
.data-table tbody tr.data-row {
  cursor: pointer;
  transition: background 0.15s;
}
.data-table tbody tr.data-row:hover td,
.data-table tbody tr.data-row:focus-within td {
  background: var(--surface-hover);
  color: var(--text);
}
.data-table .td-symbol strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.data-table .td-asset {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}
.data-table .td-period {
  color: var(--text-dim);
  font-size: 0.78rem;
}
.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--text);
}
.data-table td.num.pos { color: var(--mint); }
.data-table td.num.neg { color: #F08A88; }
.data-table .td-actions {
  text-align: right;
  white-space: nowrap;
}
.data-table .td-actions .btn {
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
}
.data-table .pill {
  font-size: 0.62rem;
  padding: 0.18rem 0.5rem;
}
.table-wrap .empty {
  margin: 0;
  border: 0;
  border-radius: 0;
  grid-column: auto;
}

/* Toolbar / filters */
.toolbar {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(14, 19, 36, 0.7);
  margin-bottom: 0.85rem;
  position: sticky;
  top: calc(var(--topbar-h) + 8px);
  z-index: 20;
  backdrop-filter: blur(10px);
}
.chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.chip .count { font-size: 0.7rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] {
  color: #041005; background: var(--green); border-color: var(--green);
  box-shadow: 0 4px 16px rgba(79, 185, 75, 0.25);
}
.chip[aria-pressed="true"] .count { color: rgba(4, 16, 5, 0.65); }
.chip .swatch { width: 8px; height: 8px; border-radius: 50%; }

.search {
  position: relative;
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 340px;
  margin-left: auto;
}
.search svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-dim); pointer-events: none; }
.search input {
  width: 100%;
  padding: 0.55rem 2.6rem 0.55rem 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(6, 9, 20, 0.6);
  color: var(--text);
  font: inherit; font-size: 0.86rem;
}
.search input::placeholder { color: var(--text-dim); }
.search input:focus { outline: none; border-color: rgba(79, 185, 75, 0.5); box-shadow: 0 0 0 3px rgba(79, 185, 75, 0.12); }
.search kbd { position: absolute; right: 0.65rem; top: 50%; transform: translateY(-50%); }

.select {
  appearance: none;
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(6, 9, 20, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23A3ACC0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  color: var(--text);
  font: inherit; font-size: 0.84rem; font-weight: 500;
  cursor: pointer;
}
.select:focus { outline: none; border-color: rgba(79, 185, 75, 0.5); }
.select option { background: #0E1324; }

.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 0.9rem;
  font-size: 0.82rem; color: var(--text-dim);
}
.results-bar strong { color: var(--text); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.empty h3 { margin: 0 0 0.35rem; color: var(--text); }

/* Disclaimer block */
.disclaimer-inline {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(232, 176, 75, 0.22);
  background: rgba(232, 176, 75, 0.05);
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.disclaimer-inline svg { width: 18px; height: 18px; color: var(--amber); flex-shrink: 0; margin-top: 1px; }
.disclaimer-inline strong { color: var(--text); }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.check-item {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(6, 9, 20, 0.35);
  transition: border-color 0.15s, background 0.15s;
}
.check-item:hover { border-color: var(--border-2); }
.check-item input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 6px; border: 1.5px solid rgba(255,255,255,0.25);
  display: grid; place-items: center; cursor: pointer;
  transition: all 0.15s;
}
.check-box svg { width: 12px; height: 12px; color: #041005; opacity: 0; transform: scale(0.6); transition: all 0.15s; }
.check-item input:checked + .check-box { background: var(--green); border-color: var(--green); }
.check-item input:checked + .check-box svg { opacity: 1; transform: none; }
.check-item input:focus-visible + .check-box { outline: 2px solid var(--mint); outline-offset: 2px; }
.check-item.is-done { background: rgba(79, 185, 75, 0.05); border-color: rgba(79, 185, 75, 0.2); }
.check-item.is-done .check-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.25); }
.check-text { flex: 1; min-width: 0; cursor: pointer; }
.check-title { display: block; font-weight: 600; font-size: 0.9rem; }
.check-desc { display: block; margin-top: 0.15rem; color: var(--text-dim); font-size: 0.8rem; }
.check-item .link-btn { font-size: 0.78rem; white-space: nowrap; margin-top: 2px; }

.progress {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; margin: 0.55rem 0 1rem;
}
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--mint)); border-radius: inherit; transition: width 0.3s ease; }

/* Discord CTA card */
.discord-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid rgba(88, 101, 242, 0.3);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(88, 101, 242, 0.25), transparent 55%),
    var(--surface);
}
.discord-card h3 { margin: 0.75rem 0 0.35rem; font-size: 1.05rem; }
.discord-card p { margin: 0 0 1rem; color: var(--text-muted); font-size: 0.86rem; }
.discord-card .fine { margin: 0.7rem 0 0; font-size: 0.74rem; color: var(--text-dim); }

/* Model quick links */
.model-tile {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.model-tile:hover { border-color: rgba(79, 185, 75, 0.3); color: var(--text); transform: translateY(-2px); }
.model-tile .mt-head { display: flex; align-items: center; justify-content: space-between; }
.model-tile h3 { margin: 0; font-size: 1rem; }
.model-tile p { margin: 0; font-size: 0.84rem; color: var(--text-muted); flex: 1; }
.model-tile .go { font-size: 0.82rem; font-weight: 600; color: var(--mint); }
.model-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: rgba(79, 185, 75, 0.1); border: 1px solid rgba(79, 185, 75, 0.22); color: var(--mint);
}
.model-icon svg { width: 18px; height: 18px; }

.model-tile--media { padding: 0; overflow: hidden; }
.model-tile--media .mt-media {
  position: relative; aspect-ratio: 16 / 10; background: #080a14; overflow: hidden;
  margin: 0 0 0.85rem;
}
.model-tile--media .mt-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.model-tile--media .mt-head,
.model-tile--media h3,
.model-tile--media p,
.model-tile--media .go { padding-left: 1.1rem; padding-right: 1.1rem; }
.model-tile--media .go { padding-bottom: 1.1rem; }
.suite-badge {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  background: rgba(5, 8, 16, 0.82); border: 1px solid rgba(79, 185, 75, 0.45);
  color: #b6f0b5; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; backdrop-filter: blur(6px);
}
.chart-frame .suite-badge { top: auto; left: 10px; bottom: 44px; } /* clear legend */


/* Feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-top: 1px solid var(--border); }
.feed li:first-child { border-top: 0; padding-top: 0.2rem; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 0.45rem; background: var(--green); flex-shrink: 0; box-shadow: 0 0 10px rgba(79,185,75,0.6); }
.feed .dot.muted { background: var(--text-dim); box-shadow: none; }
.feed strong { display: block; font-size: 0.88rem; }
.feed span { font-size: 0.8rem; color: var(--text-muted); }

/* Indicator panels */
.ind-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.ind-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent), var(--surface);
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.ind-panel + .ind-panel { margin-top: 1.1rem; }
.ind-panel.reverse .ind-copy { order: 2; }
.ind-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.ind-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.02em; }
.ind-head .model-icon { width: 42px; height: 42px; border-radius: 12px; }
.ind-copy > p { margin: 0 0 1rem; color: var(--text-muted); }
.ind-copy h4 {
  margin: 1.1rem 0 0.5rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
}
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.ticks li { position: relative; padding-left: 1.5rem; color: var(--text-muted); font-size: 0.88rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.32em;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(79,185,75,0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2.5 5.2l1.6 1.6 3.4-3.6' stroke='%238BE08A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  border: 1px solid rgba(79,185,75,0.3);
}
.ticks li strong { color: var(--text); font-weight: 600; }
.spec-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }
.spec {
  font-size: 0.74rem; color: var(--text-muted);
  padding: 0.22rem 0.55rem; border-radius: 7px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.spec b { color: var(--text); font-weight: 600; }
.ind-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-top: 1.3rem; }
.ind-visual { display: flex; flex-direction: column; gap: 0.55rem; }
.chart-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: #0A0E1B;
  aspect-ratio: 16 / 10;
}
.chart-frame img, .chart-frame svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.chart-frame .pill { position: absolute; top: 10px; left: 10px; z-index: 2; }
.chart-frame .legend {
  position: absolute; bottom: 10px; left: 10px; right: 10px; z-index: 2;
  display: flex; gap: 0.4rem 0.9rem; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--text-muted);
}
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 0.35rem; }
.caption { margin: 0; font-size: 0.74rem; color: var(--text-dim); }

/* Alert code block */
.codebox {
  margin-top: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #070A15;
  overflow: hidden;
}
.codebox-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.04em;
}
.codebox pre {
  margin: 0; padding: 0.75rem; overflow-x: auto;
  font-family: var(--mono); font-size: 0.8rem; color: #CFE9CE; line-height: 1.6;
}
.copy-btn {
  background: none; border: 1px solid var(--border-2); color: var(--text-muted);
  font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 6px; cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

/* Lessons */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.lesson {
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.lesson:hover { border-color: rgba(79, 185, 75, 0.28); transform: translateY(-2px); }
.lesson-cover {
  position: relative;
  height: 112px;
  padding: 0.9rem 1rem;
  display: flex; align-items: flex-start; justify-content: space-between;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(79, 185, 75, 0.2), transparent 60%),
    linear-gradient(135deg, #10172D, #0B1020);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.lesson-cover .num {
  position: absolute; right: 0.9rem; bottom: -0.9rem;
  font-family: var(--font-display); font-weight: 700; font-size: 4.6rem; letter-spacing: -0.05em;
  color: rgba(255,255,255,0.05); line-height: 1;
}
.lesson-cover .model-icon { position: absolute; left: 1rem; bottom: 0.9rem; }
.lesson-cover.c2 { background: radial-gradient(120% 140% at 100% 0%, rgba(239, 83, 80, 0.18), transparent 60%), linear-gradient(135deg, #10172D, #0B1020); }
.lesson-cover.c3 { background: radial-gradient(120% 140% at 100% 0%, rgba(91, 141, 239, 0.22), transparent 60%), linear-gradient(135deg, #10172D, #0B1020); }
.lesson-cover.c4 { background: radial-gradient(120% 140% at 100% 0%, rgba(232, 176, 75, 0.18), transparent 60%), linear-gradient(135deg, #10172D, #0B1020); }
.lesson-cover.c5 { background: radial-gradient(120% 140% at 100% 0%, rgba(38, 166, 154, 0.22), transparent 60%), linear-gradient(135deg, #10172D, #0B1020); }
.lesson-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.lesson-body h3 { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; }
.lesson-body > p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.lesson-meta { display: flex; gap: 0.9rem; font-size: 0.76rem; color: var(--text-dim); }
.lesson-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.lesson-meta svg { width: 13px; height: 13px; }
.lesson details { margin-top: 0.15rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.lesson summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--mint); list-style: none; display: flex; align-items: center; gap: 0.35rem; }
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary::after { content: "+"; margin-left: auto; color: var(--text-dim); font-weight: 400; font-size: 1.05rem; }
.lesson details[open] summary::after { content: "−"; }
.lesson ol { margin: 0.55rem 0 0; padding-left: 1.15rem; color: var(--text-muted); font-size: 0.83rem; }
.lesson ol li + li { margin-top: 0.3rem; }
.lesson-foot { margin-top: auto; padding-top: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

/* Lesson body (expanded written lessons) */
.lesson-content {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.lesson-content h4 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
}
.lesson-content p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.58;
  color: var(--text-muted);
}
.lesson-content ul,
.lesson-content ol {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.83rem;
}
.lesson-content li + li { margin-top: 0.28rem; }
.lesson-content .disclaimer {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-style: italic;
}
.lesson-content .callout {
  margin-top: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-xs);
  background: rgba(79, 185, 75, 0.06);
  border: 1px solid rgba(79, 185, 75, 0.22);
}
.lesson-content .callout.warn {
  background: rgba(232, 176, 75, 0.07);
  border-color: rgba(232, 176, 75, 0.28);
}
.lesson-content .callout strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mint);
}
.lesson-content .callout.warn strong { color: var(--amber); }
.lesson-content .callout ol,
.lesson-content .callout ul { margin-top: 0.2rem; }

/* Dialog */
dialog.ex-dialog {
  width: min(860px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 18px;
  background: #0D1224;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}
dialog.ex-dialog::backdrop { background: rgba(2, 4, 10, 0.7); backdrop-filter: blur(4px); }
dialog.ex-dialog[open] { animation: pop 0.16s ease-out; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.dlg-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.dlg-head .meta { font-size: 0.8rem; color: var(--text-dim); }
.dlg-body { padding: 1.2rem; display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.dlg-body .chart-frame { aspect-ratio: 16 / 10; }
.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; font-size: 0.84rem; }
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.dlg-section h4 { margin: 0 0 0.55rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.dlg-section + .dlg-section { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.dlg-section p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.dlg-foot { padding: 0 1.2rem 1.2rem; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 200;
  transform: translate(-50%, 20px);
  max-width: min(460px, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #121A33; border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
  font-size: 0.85rem; color: var(--text);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.dash-footer {
  margin-top: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(4, 6, 13, 0.6);
}
.dash-footer .risk {
  max-width: 1000px;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.dash-footer .risk strong { color: var(--text-muted); }
.dash-footer .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; color: var(--text-dim); }
.dash-footer .row a { color: var(--text-muted); }
.dash-footer .row a:hover { color: var(--text); }
.dash-footer .links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.login-card {
  width: min(440px, 100%);
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(79, 185, 75, 0.22);
  background:
    radial-gradient(100% 80% at 50% 0%, rgba(79, 185, 75, 0.14), transparent 60%),
    #0D1224;
  box-shadow: 0 0 60px rgba(79, 185, 75, 0.08), var(--shadow);
  text-align: center;
}
.login-card img.logo { width: 64px; height: 64px; margin: 0 auto 0.9rem; }
.login-card h1 { margin: 0 0 0.35rem; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 1.3rem; color: var(--text-muted); font-size: 0.9rem; }
.login-card .stack { display: flex; flex-direction: column; gap: 0.6rem; }
.login-card .divider { display: flex; align-items: center; gap: 0.75rem; margin: 0.4rem 0; color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; }
.login-card .divider::before, .login-card .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-card .fine { margin: 1.2rem 0 0; font-size: 0.72rem; color: var(--text-dim); line-height: 1.55; }

/* ───────────────────── Responsive ───────────────────── */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ind-panel { grid-template-columns: 1fr; }
  .ind-panel.reverse .ind-copy { order: 0; }
}

@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(290px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.25s ease;
    box-shadow: 20px 0 60px rgba(0,0,0,0.5);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .menu-btn { display: inline-grid; }
  .grid-2 { grid-template-columns: 1fr; }
  .welcome { grid-template-columns: 1fr; }
  .dlg-body { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { padding: 0 1rem; gap: 0.6rem; }
  .top-link .label, .member-meta, .member-chip .caret { display: none; }
  .member-chip { padding: 0.2rem; }
  .content { padding: 1.2rem 1rem 2rem; }
  .demo-banner { margin: 0.9rem 1rem 0; align-items: flex-start; }
  .grid-3 { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.4rem; }
  .welcome { padding: 1.25rem; }
  .ind-panel { padding: 1.1rem; }
  .toolbar { position: static; }
  .search { max-width: none; margin-left: 0; flex-basis: 100%; }
  .search kbd { display: none; }
  .dash-footer { padding: 1.1rem 1rem 1.3rem; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .stat { padding: 0.85rem; }
  .crumbs .crumb-root, .crumbs .sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* Lightweight Charts (example OHLC) */
.lw-chart-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: #0A0E1B;
}
.lw-chart-wrap.featured { margin-top: 0.15rem; }
.lw-chart-badges {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 0.35rem; pointer-events: none;
}
.pill-hist {
  background: rgba(91, 141, 239, 0.16);
  color: #A8C4F5;
  border: 1px solid rgba(91, 141, 239, 0.28);
}
.lw-chart {
  width: 100%;
  height: 320px;
  min-height: 260px;
}
.lw-chart-wrap.featured .lw-chart { height: 260px; min-height: 220px; }
.chart-disclaimer {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(232, 176, 75, 0.06);
  border: 1px solid rgba(232, 176, 75, 0.18);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.chart-disclaimer strong { color: var(--amber); font-weight: 600; }
.featured-chart-section .section-head { margin-bottom: 0.65rem; }
.featured-chart-section .more.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--mint); font-size: 0.86rem; font-weight: 600;
}
.featured-chart-section .more.link-btn:hover { color: #b6f0b5; }

dialog.ex-dialog { width: min(980px, calc(100vw - 2rem)); }
.dlg-body .lw-chart { height: 300px; }
.dlg-body .ind-visual { min-width: 0; }

@media (max-width: 820px) {
  .dlg-body { grid-template-columns: 1fr; }
  .lw-chart { height: 260px; }
  .dlg-body .lw-chart { height: 250px; }
}

/* —— Screener embed + video lessons —— */
.screener-frame-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  background: #0b0f0c;
  min-height: 70vh;
}
.screener-frame-wrap iframe {
  width: 100%;
  height: 1860px;
  border: 0;
  display: block;
  background: #0b0f0c;
}
.video-lessons {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.35rem;
  border: 1px dashed rgba(79, 185, 75, 0.35);
  border-radius: 14px;
  background: rgba(79, 185, 75, 0.05);
}
.video-lessons h2 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}
.video-lessons p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 62ch;
}
.video-lessons .vid-placeholder {
  margin-top: 0.9rem;
  min-height: 160px;
  border-radius: 12px;
  background: #0A0E1B;
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 1rem;
}
.video-lessons .vid-placeholder strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.25rem;
}
@media (max-width: 760px) {
  .screener-frame-wrap iframe { height: 2400px; }
  .content { overflow-x: hidden; }
}

/* Keep STAUNCH EQUITIES + SE Pro badge visible in the 256px sidebar */
.sidebar-brand .brand-text {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  white-space: normal;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.sidebar-brand { gap: 0.45rem; }
.sidebar-brand a.brand { flex: 1; min-width: 0; }

/* Launch: compact member-preview banner on phones */
@media (max-width: 640px) {
  .demo-banner { flex-direction: column; align-items: flex-start; gap: 0.45rem; }
  .demo-banner p { font-size: 0.86rem; line-height: 1.45; }
}
