@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,500;0,600;0,700;1,600&family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg-0:       #07050f;
  --bg-1:       #0f0a24;
  --bg-2:       #16103a;
  --surface:    #1a1340;
  --surface-2:  #221a52;
  --surface-hi: #2a2068;
  --magenta:      #ff2e97;
  --magenta-soft: #ff6fbd;
  --cyan:         #25e8e6;
  --cyan-soft:    #7ff6f4;
  --purple:       #b14aed;
  --gradient-sunset: linear-gradient(135deg, #ffd23f 0%, #ff7b3d 32%, #ff3d8b 66%, #c026d3 100%);
  --accent:   var(--cyan);
  --accent-2: var(--magenta);
  --font-display: 'Chakra Petch', sans-serif;
  --font-sans:    'Space Grotesk', system-ui;
  --font-mono:    'Space Mono', monospace;
  --up:   #2cf6b3;
  --down: #ff2e97;
  --warn: #ff7b3d;
  --line:        rgba(125, 111, 176, 0.22);
  --line-bright: rgba(125, 111, 176, 0.40);
  --glow-magenta: 0 0 6px rgba(255,46,151,.55), 0 0 22px rgba(255,46,151,.35);
  --glow-cyan:    0 0 6px rgba(37,232,230,.55),  0 0 22px rgba(37,232,230,.35);
  --glow-up:      0 0 6px rgba(44,246,179,.50),  0 0 18px rgba(44,246,179,.28);
  --glow-down:    0 0 6px rgba(255,46,151,.50),  0 0 18px rgba(255,46,151,.28);
  --bg:            var(--bg-1);
  --panel:         var(--surface);
  --border:        var(--line);
  --text:          #f4efff;
  --muted:         #7d6fb0;
  --risk:          var(--down);
  --positive:      #0d2a1a;
  --positive-bright: var(--up);
  --neutral:       #564a82;
  --input-bg:      var(--bg-0);
}
.dir-grid   { --accent: var(--cyan);    --accent-2: var(--magenta); }
.dir-outrun { --accent: var(--magenta); --accent-2: var(--cyan);    }
.dir-miami  { --accent: var(--purple);  --accent-2: var(--cyan);    }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

/* Placeholder text color for all inputs and textareas */
::placeholder {
  color: var(--neutral);
  opacity: 1;
}

/* Ticker symbol utility — monospace with subtle gold tint */
.ticker {
  font-family: var(--font-mono);
  background: rgba(37, 232, 230, 0.15);
  color: #25e8e6;
  padding: 1px 6px;
  border-radius: 0;
  font-size: 0.9em;
  letter-spacing: 0.04em;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.2px;
}

.login-card .brand-sub {
  text-align: center;
  margin: -14px 0 20px;
  font-size: 12px;
}

/* ---- Top navigation ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  height: 56px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.topbar .brand { font-size: 18px; }

.tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}

.tab {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 2px;
  font-size: 14px;
}

.tab:hover { color: var(--text); background: #221a52; }

.tab.active {
  color: var(--accent);
  background: #221a52;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.logout {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.logout:hover { color: var(--text); }

/* ---- Content ---- */
.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px;
}

.content h1 { margin: 0 0 8px; }
.muted { color: var(--muted); }

/* ---- Login ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 320px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.login-card .brand {
  font-size: 22px;
  text-align: center;
  margin-bottom: 4px;
}

.login-card .brand-wrap {
  margin-bottom: 20px;
}

.login-card label {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 6px;
}

.login-card input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-sans);
}

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-card button {
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}
.login-card button:hover { filter: brightness(1.15); }

.error {
  background: #1a001a;
  border: 1px solid rgba(255,46,151,0.4);
  color: #ff6fbd;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 2px;
  margin: 0;
}

/* ---- Cards ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 22px 24px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
}

/* ---- Form fields ---- */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.field-grid .field { margin-bottom: 0; }

.field label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  width: 100%;
  font-family: var(--font-sans);
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---- Progress bars ---- */
.progress-block {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.progress-track {
  height: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ---- Buttons ---- */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}
.btn-primary:hover { filter: brightness(1.15); }

.btn-sm {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: rgba(37,232,230,0.12); }
.btn-ghost:disabled { opacity: 0.4; cursor: default; }

.btn-danger {
  background: transparent;
  color: #ff6fbd;
  border: 1px solid rgba(255,46,151,0.45);
}
.btn-danger:hover { background: rgba(180,0,90,0.2); }

/* ---- Settings: section header with action button ---- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; }

/* ---- Watchlist inline form ---- */
.wl-form {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px;
  margin-bottom: 14px;
}

/* ---- Journal admin stats row ---- */
.stat-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.stat-chip {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.stat-num {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
}

/* ---- System health status chips ---- */
.health-ok   { color: #2cf6b3; font-weight: 700; }
.health-fail { color: #ff6fbd; font-weight: 700; }
.health-never { color: var(--muted); }

/* ---- Banners ---- */
.saved-banner {
  background: #0d1f17;
  border: 1px solid var(--positive);
  color: #2cf6b3;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
}

/* ---- Revision log ---- */
.revlog {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.revlog th,
.revlog td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}

.revlog th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.revlog tbody tr:last-child td { border-bottom: none; }

.small { font-size: 12px; }

/* ---- Select dropdowns ---- */
.field select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px 32px 10px 12px;
  color: var(--text);
  font-size: 14px;
  width: 100%;
  font-family: var(--font-sans);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237d6fb0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field select option {
  background: var(--panel);
  color: var(--text);
}

/* ---- Journal section dividers ---- */
.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 22px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-family: var(--font-sans);
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
}

.section-divider:first-child { margin-top: 0; }

/* ---- Journal index ---- */
.journal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.journal-header h1 { margin: 0; }

.trade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.trade-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.trade-card-head .ticker { font-size: 18px; }

.badge-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 9px;
  border-radius: 2px;
  font-family: var(--font-sans);
  text-transform: uppercase;
}

.badge-gold {
  background: rgba(37, 232, 230, 0.18);
  color: #25e8e6;
  border: 1px solid rgba(37, 232, 230, 0.4);
}

.badge-blue {
  background: rgba(37, 232, 230, 0.18);
  color: #25e8e6;
  border: 1px solid rgba(37, 232, 230, 0.35);
}

.trade-card-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.pnl {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-display);
}

.pnl-pos  { color: #2cf6b3; }
.pnl-neg  { color: #ff6fbd; }
.pnl-flat { color: var(--muted); font-size: 16px; font-weight: 400; }

/* ---- Journal filter bar ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group > label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
  height: 34px;
}

.filter-input:focus {
  outline: none;
  border-color: var(--accent);
}

.toggle-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  height: 34px;
}

.toggle-btn {
  background: var(--input-bg);
  border: none;
  border-right: 1px solid var(--border);
  padding: 0 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s;
}

.toggle-btn:last-child { border-right: none; }

.toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

.toggle-btn:hover:not(.active) {
  background: #221a52;
  color: var(--text);
}

/* ---- Card expand / detail ---- */
.trade-card-summary {
  cursor: pointer;
  user-select: none;
}

.trade-card-summary:hover .ticker { color: #25e8e6; }

.expand-icon {
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.trade-card.expanded .expand-icon { transform: rotate(180deg); }

.card-detail {
  display: none;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.trade-card.expanded .card-detail { display: block; }

.detail-section { margin-bottom: 20px; }

.detail-section:last-of-type { margin-bottom: 0; }

.detail-section .section-divider {
  font-size: 10px;
  margin: 0 0 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 16px;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-value {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.detail-field-full {
  margin-top: 10px;
}

.detail-field-full .detail-value {
  white-space: pre-wrap;
  line-height: 1.55;
}

.card-detail-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── Bulk selection toolbar ── */
.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0 10px;
  min-height: 34px;
}

.bulk-select-all-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

/* ── Card checkbox ── */
.card-check-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.card-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Delete / restore modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 5, 15, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 28px;
  width: 440px;
  max-width: 95vw;
}

.btn-sm {
  padding: 7px 18px;
  font-size: 13px;
}

/* ---- Positions / P&L Dashboard ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

.stat-card {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.stat-value.pos { color: #2cf6b3; }
.stat-value.neg { color: #ff6fbd; }
.stat-value.gold { color: #25e8e6; }

/* ---- Dashboard / Brief ---- */
.brief-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}

.brief-date {
  font-size: 13px;
  color: var(--muted);
}

.brief-section {
  margin-bottom: 20px;
}

.brief-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brief-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(37,232,230,0.12);
  border: 1px solid rgba(37,232,230,0.3);
  border-radius: 0;
  padding: 1px 7px;
  flex-shrink: 0;
}

.brief-section h2 {
  margin: 0;
  font-size: 17px;
}

.brief-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.brief-body ul {
  margin: 6px 0 0 0;
  padding-left: 18px;
}

.brief-body li { margin-bottom: 5px; }

.catalyst-card {
  background: rgba(125,111,176,0.08);
  border: 1px solid rgba(125,111,176,0.20);
  border-radius: 2px;
  padding: 8px 12px;
  margin-bottom: 2px;
}

.catalyst-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.catalyst-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(37,232,230,0.12);
  border: 1px solid rgba(37,232,230,0.25);
  border-radius: 0;
  padding: 1px 7px;
}

.catalyst-date {
  font-size: 12px;
}

.catalyst-si {
  font-size: 11px;
  font-weight: 700;
  background: rgba(224,123,84,0.12);
  border: 1px solid rgba(224,123,84,0.3);
  border-radius: 0;
  padding: 1px 7px;
}

.catalyst-thesis {
  font-size: 13px;
  line-height: 1.5;
}

/* ── Live market data table (Section 2) ─────────────────────────────── */
.live-data-block {
  background: rgba(125,111,176,0.08);
  border: 1px solid rgba(125,111,176,0.20);
  border-radius: 2px;
  padding: 12px 14px;
  margin-bottom: 4px;
}

.live-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.live-data-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 7px 0;
  border-bottom: 1px solid rgba(125,111,176,0.20);
}

.live-data-table td {
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid rgba(125,111,176,0.10);
  vertical-align: middle;
}

.live-data-table tr:last-child td {
  border-bottom: none;
}

.live-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.live-data-timestamp {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  text-align: right;
  letter-spacing: 0.03em;
}

.brief-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 0;
  margin-right: 6px;
  vertical-align: middle;
}

.brief-tag-bull { background: rgba(44,246,179,0.3); color: #2cf6b3; border:1px solid rgba(44,246,179,0.5); }
.brief-tag-bear { background: rgba(180,0,90,0.3); color: #ff6fbd; border:1px solid rgba(180,0,90,0.5); }
.brief-tag-neut { background: rgba(85,85,85,0.3); color: #7d6fb0; border:1px solid rgba(85,85,85,0.5); }

.empty-brief {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-brief h2 { margin-bottom: 10px; color: var(--text); }

/* ---- Wheel ---- */
.wheel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.wheel-header h1 { margin: 0; }

.scan-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.score-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 2px;
  text-transform: uppercase;
}

.score-strong {
  background: rgba(37, 232, 230, 0.2);
  color: #25e8e6;
  border: 1px solid rgba(37, 232, 230, 0.45);
}

.score-acceptable {
  background: rgba(44, 246, 179, 0.2);
  color: #2cf6b3;
  border: 1px solid rgba(44, 246, 179, 0.45);
}

.score-borderline {
  background: rgba(85, 85, 85, 0.25);
  color: #7d6fb0;
  border: 1px solid rgba(85, 85, 85, 0.45);
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.candidate-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.candidate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.candidate-company {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.candidate-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 12px;
}

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

.cstat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.cstat-value {
  font-size: 14px;
  font-family: var(--font-display);
  color: var(--text);
}

.cstat-value.gold { color: #25e8e6; font-weight: 700; }

.candidate-rationale {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.risk-tag {
  display: inline-block;
  font-size: 10px;
  background: rgba(180,0,90,0.2);
  color: #ff6fbd;
  border: 1px solid rgba(180,0,90,0.35);
  border-radius: 0;
  padding: 1px 6px;
  margin-right: 4px;
  margin-top: 4px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 24px 0 12px;
}

.section-label:first-child { margin-top: 0; }

.premium-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.premium-table th,
.premium-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.premium-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.premium-table tbody tr:last-child td { border-bottom: none; }

.tier-bar-track {
  height: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}

.tier-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  color: var(--neutral);
  font-size: 12px;
}

.site-footer p { margin: 0; }

/* ================================================================
   Learn & Research additions
================================================================ */

/* ---- Lesson rows ---- */
.lesson-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover { background: #221a52; }

.lesson-id-num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  min-width: 24px;
  flex-shrink: 0;
}

.lesson-title-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.lesson-unit-text {
  font-size: 12px;
  color: var(--muted);
  min-width: 140px;
  text-align: right;
  flex-shrink: 0;
}

.lesson-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 110px;
  justify-content: flex-end;
}

/* ---- Lesson status badges ---- */
.lesson-status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 10px;
  border-radius: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.status-complete {
  background: rgba(44, 246, 179, 0.25);
  color: #2cf6b3;
  border: 1px solid rgba(44, 246, 179, 0.5);
}

.status-progress {
  background: rgba(37, 232, 230, 0.2);
  color: #25e8e6;
  border: 1px solid rgba(37, 232, 230, 0.45);
}

.status-not-started {
  background: rgba(85, 85, 85, 0.2);
  color: var(--muted);
  border: 1px solid rgba(85, 85, 85, 0.4);
}

/* ---- Flagged star ---- */
.flagged-star {
  color: #25e8e6;
  font-size: 16px;
  line-height: 1;
  cursor: help;
}

/* ---- Exercise card ---- */
.exercise-card {
  border-left: 3px solid var(--accent) !important;
  background: rgba(37, 232, 230, 0.05);
}

.exercise-card h2 { color: var(--accent); }

/* ---- Quiz section ---- */
.quiz-section {
  border: 1px solid var(--border);
}

.quiz-question-text {
  font-size: 16px;
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.55;
  margin: 0 0 8px;
}

/* ---- Brief archive ---- */
.brief-archive-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.brief-archive-item:last-of-type { border-bottom: none; }
.brief-archive-item:hover { background: #221a52; }

.brief-archive-date {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent);
  min-width: 100px;
  flex-shrink: 0;
}

.brief-archive-type {
  font-size: 13px;
  color: var(--text);
  text-transform: capitalize;
}

.brief-archive-content {
  border-bottom: 1px solid var(--border);
  background: var(--input-bg);
}

.brief-archive-content:last-child { border-bottom: none; }

/* ---- Scorecard table ---- */
.scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.scorecard-table th,
.scorecard-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.scorecard-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.scorecard-table tbody tr:last-child td { border-bottom: none; }

/* ---- Scratchpad notes ---- */
.scratchpad-note {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.scratchpad-note:last-child { margin-bottom: 0; }

.scratchpad-note-time {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.scratchpad-note-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Badge colour extensions ─────────────────────────────────────── */
.badge-gray {
  background: rgba(125, 111, 176, 0.15);
  color: var(--muted);
  border: 1px solid rgba(125, 111, 176, 0.35);
}
.badge-red {
  background: rgba(255, 46, 151, 0.15);
  color: #ff6fbd;
  border: 1px solid rgba(255, 46, 151, 0.4);
}
.badge-green {
  background: rgba(44, 246, 179, 0.15);
  color: #2cf6b3;
  border: 1px solid rgba(44, 246, 179, 0.4);
}

/* ── Section 0: Morning Check-In ─────────────────────────────────── */
.s0-subheader {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 18px 0 10px;
  font-weight: 600;
}
.s0-positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.s0-position-card {
  background: rgba(125,111,176,0.08);
  border: 1px solid rgba(125,111,176,0.20);
  border-radius: 2px;
  padding: 14px 16px;
}
.s0-pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.s0-pos-ticker {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.s0-pos-rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  font-size: 12px;
  align-items: baseline;
}
.s0-pos-label { color: var(--muted); font-size: 11px; white-space: nowrap; }
.s0-pos-value { color: var(--text); font-weight: 500; }

.s0-watchlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 4px;
}
.s0-watchlist-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid rgba(125,111,176,0.15);
}
.s0-watchlist-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(125,111,176,0.10);
  vertical-align: middle;
}
.s0-watchlist-table tr:last-child td { border-bottom: none; }

.s0-action {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(125,111,176,0.15);
}
.wsid-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent), #25e8e6);
  color: #0f0a24;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  text-transform: uppercase;
}
.wsid-btn:hover  { filter: brightness(1.12); transform: translateY(-1px); }
.wsid-btn:active { transform: translateY(0); }
.wsid-btn:disabled { opacity: 0.6; cursor: wait; }
.wsid-results { margin-top: 16px; display: none; }
.wsid-results.visible { display: block; }
.wsid-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(125,111,176,0.12);
  font-size: 13px;
  line-height: 1.5;
}
.wsid-item:last-child { border-bottom: none; }
.wsid-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  min-width: 18px;
  padding-top: 1px;
  flex-shrink: 0;
}
.wsid-error { color: #ff6fbd; font-size: 13px; padding: 10px 0; }

/* ── Deep Dive saved research list ──────────────────────────────── */
.dd-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(125,111,176,0.15);
}
.dd-filters select,
.dd-filters input[type="text"],
.dd-filters input[type="date"] {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 12px;
  font-family: var(--font-sans);
}
.dd-filters input[type="text"] { width: 110px; }
.dd-filters input[type="date"] { width: 130px; }
.dd-filters label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.dd-row {
  border-bottom: 1px solid rgba(125,111,176,0.12);
}
.dd-row:last-child { border-bottom: none; }

.dd-row-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  cursor: pointer;
  user-select: none;
}
.dd-row-summary:hover { background: rgba(125,111,176,0.05); border-radius: 2px; }

.dd-row-q {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dd-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.dd-row-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.dd-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}
.dd-star:hover { color: #25e8e6; }
.dd-star.starred { color: #25e8e6; }
.dd-arrow {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s;
}

.dd-detail {
  padding: 0 4px 14px;
}
.dd-thread-msg {
  margin-bottom: 14px;
}
.dd-thread-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.dd-thread-user   { color: var(--accent); }
.dd-thread-assist { color: var(--muted); }
.dd-thread-body {
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.dd-thread-body.user-body {
  color: var(--muted);
  background: rgba(125,111,176,0.08);
  border: 1px solid rgba(125,111,176,0.15);
  border-radius: 2px;
  padding: 8px 12px;
}
.dd-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(125,111,176,0.15);
  flex-wrap: wrap;
}
.dd-controls select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 10px;
  color: var(--text);
  font-size: 12px;
  font-family: var(--font-sans);
}
.btn-danger {
  background: rgba(255, 46, 151, 0.15);
  color: #ff6fbd;
  border: 1px solid rgba(255, 46, 151, 0.4);
  border-radius: 2px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: rgba(255, 46, 151, 0.28); }

/* followup area inside Deep Dive card */
.dd-followup-area {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(125,111,176,0.15);
}
.dd-followup-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.dd-new-thread-btn {
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid rgba(125,111,176,0.25);
  border-radius: 2px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.dd-new-thread-btn:hover { color: var(--text); border-color: rgba(125,111,176,0.40); }

/* ── Refresh widget ──────────────────────────────────────────────── */
.refresh-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(37,232,230,0.12);
  color: #25e8e6;
  border: 1px solid rgba(37,232,230,0.35);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.refresh-btn:hover    { background: rgba(37,232,230,0.22); }
.refresh-btn:disabled { opacity: 0.5; cursor: wait; }
.refresh-ts { font-size: 11px; color: var(--muted); white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin 0.9s linear infinite; display: inline-block; }

/* Price badge — injected next to .ticker elements on price move */
.price-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 0;
  margin-left: 5px;
  vertical-align: middle;
  font-family: var(--font-mono);
}
.price-badge-up   { background:rgba(44,246,179,0.15); color:#2cf6b3; border:1px solid rgba(44,246,179,0.3); }
.price-badge-down { background:rgba(255,46,151,0.15); color:#ff6fbd; border:1px solid rgba(255,46,151,0.3); }

/* Position alert bar — above main content */
.pos-alert-bar { padding: 6px 20px 0; }
.pos-alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 4px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}
.pos-alert-stop   { background:rgba(255,46,151,0.15); border-left:3px solid #ff6fbd; color:#ff6fbd; }
.pos-alert-target { background:rgba(37,232,230,0.12);  border-left:3px solid #25e8e6; color:#25e8e6; }
.pos-alert-ticker { font-family:'Courier New',monospace; font-size:14px; font-weight:700; }
.pos-alert-label  { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; padding:2px 7px; border-radius:0; background:rgba(125,111,176,0.20); }
.pos-alert-claude { font-size:12px; color:var(--text); font-weight:400; width:100%; margin-top:2px; }

/* News alert bar */
.news-alert-bar   { padding: 0 20px 6px; }
.news-alert-inner {
  background: rgba(37,232,230,0.08);
  border: 1px solid rgba(37,232,230,0.25);
  border-radius: 2px;
  padding: 10px 14px;
}
.news-alert-header { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.09em; color:#25e8e6; margin-bottom:8px; }
.news-alert-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(125,111,176,0.10);
  font-size: 12px;
  flex-wrap: wrap;
}
.news-alert-item:last-child { border-bottom: none; }
.news-alert-ticker { font-family:'Courier New',monospace; font-size:11px; font-weight:700; color:#25e8e6; flex-shrink:0; }
.news-alert-source { font-size:10px; color:var(--muted); flex-shrink:0; }
.news-alert-link   { color:var(--text); text-decoration:none; }
.news-alert-link:hover { color:#25e8e6; }
.news-alert-time   { font-size:10px; color:var(--muted); flex-shrink:0; margin-left:auto; }

/* ── Level card (entry/stop/target compact display) ─────────────── */
.level-card {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(125,111,176,0.05);
  border: 1px solid rgba(125,111,176,0.17);
  border-radius: 2px;
  font-size: 12px;
}
.level-card-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.level-card-changed .level-card-header {
  color: #25e8e6;
}
.level-rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: baseline;
}
.level-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
.level-value { color: var(--text); font-weight: 600; }
.level-reason {
  font-size: 11px;
  color: var(--muted);
  grid-column: 1 / -1;
  margin-left: 0;
  line-height: 1.4;
  margin-bottom: 3px;
}
.level-rr {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.level-old {
  font-size: 10px;
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 4px;
}
.level-updated-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 0;
  background: rgba(37,232,230,0.15);
  color: #25e8e6;
  border: 1px solid rgba(37,232,230,0.35);
  margin-left: 6px;
}

/* "Review Your Stop / Review Your Target" badge */
.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 0;
  background: rgba(37,232,230,0.12);
  color: #25e8e6;
  border: 1px solid rgba(37,232,230,0.35);
  white-space: nowrap;
}

/* ── Wheel: Savings Ladder ────────────────────────────────────────── */
.ladder { display: flex; flex-direction: column; gap: 2px; }

.ladder-row {
  display: grid;
  grid-template-columns: 160px repeat(3, 1fr) 120px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 2px;
  font-size: 13px;
  transition: background 0.1s;
}

.tier-current {
  background: rgba(37, 232, 230, 0.12);
  border: 1px solid rgba(37, 232, 230, 0.4);
}
.tier-unlocked {
  background: rgba(44, 246, 179, 0.07);
  border: 1px solid rgba(44, 246, 179, 0.2);
}
.tier-locked {
  background: rgba(125,111,176,0.05);
  border: 1px solid rgba(125,111,176,0.15);
  opacity: 0.7;
}

.ladder-tier-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ladder-tier-num {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text);
}
.tier-current  .ladder-tier-num { color: #25e8e6; }
.tier-unlocked .ladder-tier-num { color: #2cf6b3; }
.tier-locked   .ladder-tier-num { color: var(--muted); }

.ladder-col { display: flex; flex-direction: column; gap: 2px; }
.ladder-col-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.ladder-col-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.tier-current  .ladder-col-value { color: #25e8e6; }
.tier-unlocked .ladder-col-value { color: #2cf6b3; }
.tier-locked   .ladder-col-value { color: var(--muted); }

/* Paper example card highlight */
.paper-example-card {
  border: 1px solid rgba(37, 232, 230, 0.3) !important;
  background: rgba(37, 232, 230, 0.04);
}

@media (max-width: 640px) {
  .ladder-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ── Watchlist page ─────────────────────────────────────────────────── */

.wl-summary-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 14px 22px;
  margin-bottom: 0;
}

.wl-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

.wl-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}

.wl-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wl-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

.wl-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.wl-section-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.wl-section-count {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 11px;
  color: var(--muted);
  padding: 1px 8px;
}

.wl-table-wrap {
  overflow-x: auto;
  margin: 0 -24px;
  padding: 0 24px;
}

.wl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.wl-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}

.wl-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(125,111,176,0.5);
  vertical-align: middle;
}

.wl-table tbody tr:last-child td { border-bottom: none; }

.wl-table tbody tr:hover { background: rgba(125,111,176,0.08); }

.wl-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wl-mismatch { background: rgba(180,0,90,0.08); }

.wl-flag {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  background: #5a0030;
  color: #fff;
  border-radius: 0;
  font-size: 9px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

/* Watchlist modal */
.wl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.wl-modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 28px 30px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}

.wl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.wl-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-family: var(--font-display);
}

.wl-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 2px;
}
.wl-modal-close:hover { color: var(--text); background: var(--input-bg); }


/* ═══════════════════════════════════════════════════════════════
   SYNTHWAVE CANVAS + COMPONENT OVERRIDES
   ═══════════════════════════════════════════════════════════════ */

/* ── Global canvas ── */
html {
  background:
    radial-gradient(ellipse 130% 55% at 50% -10%, rgba(255,46,151,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 115%, rgba(37,232,230,0.05) 0%, transparent 50%),
    linear-gradient(175deg, #16103a 0%, #0f0a24 45%, #07050f 100%);
  background-attachment: fixed;
  min-height: 100%;
}

body {
  background: transparent;
  position: relative;
  z-index: 0;
  min-height: 100vh;
}

/* Perspective grid */
body::before {
  content: '';
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 42vh;
  background-image:
    linear-gradient(rgba(37,232,230,0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,232,230,0.07) 1px, transparent 1px);
  background-size: 80px 55px;
  transform: perspective(600px) rotateX(50deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

/* Scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent 0, transparent 2px,
    rgba(0,0,0,0.028) 2px, rgba(0,0,0,0.028) 4px
  );
  pointer-events: none;
  z-index: 500;
  mix-blend-mode: multiply;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Nav bar ── */
.topbar {
  background: rgba(10, 6, 30, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(37, 232, 230, 0.28);
}

.tab {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active {
  color: var(--cyan);
  background: rgba(37, 232, 230, 0.10);
  box-shadow: inset 0 -2px 0 var(--cyan), var(--glow-cyan);
}

/* ── Brand ── */
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}
.brand-sub {
  color: var(--magenta-soft);
  font-style: italic;
  font-size: 11px;
  text-shadow: 0 0 8px rgba(255, 46, 151, 0.45);
}
.topbar .brand { font-size: 17px; }
.login-card .brand { font-size: 22px; }

/* ── Ticker chips ── */
.ticker {
  font-family: var(--font-mono);
  background: rgba(37, 232, 230, 0.10);
  color: var(--cyan);
  border: 1px solid rgba(37, 232, 230, 0.32);
  border-radius: 0;
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.06em;
}

/* ── Primary buttons → sunset gradient ── */
.btn-primary,
.wsid-btn,
.login-card button {
  background: var(--gradient-sunset);
  color: #07050f;
  border: none;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.btn-primary:hover, .wsid-btn:hover, .login-card button:hover {
  filter: brightness(1.1) saturate(1.1);
  transform: translateY(-1px);
}

/* ── Ghost button ── */
.btn-ghost {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid rgba(37, 232, 230, 0.55);
  box-shadow: 0 0 8px rgba(37, 232, 230, 0.20);
  border-radius: 2px;
}
.btn-ghost:hover { background: rgba(37, 232, 230, 0.10); }

/* ── Progress / tier bars → sunset fill ── */
.progress-fill, .tier-bar-fill { background: var(--gradient-sunset); border-radius: 2px; }
.progress-track, .tier-bar-track {
  background: rgba(125, 111, 176, 0.12);
  border: 1px solid var(--line-bright);
  border-radius: 2px;
}

/* ── P&L numbers ── */
.pnl-pos, .stat-value.pos { color: var(--up); text-shadow: var(--glow-up); }
.pnl-neg, .stat-value.neg { color: var(--down); text-shadow: var(--glow-down); }
.stat-value.gold, .cstat-value.gold { color: var(--cyan); text-shadow: var(--glow-cyan); font-family: var(--font-mono); }

/* ── Brief section index chips → sunset ── */
.brief-num {
  background: var(--gradient-sunset);
  color: #07050f;
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  border-radius: 0;
}

/* ── Cards ── */
.card, .trade-card, .candidate-card, .filter-bar, .stat-card {
  background: var(--surface);
  border: 1.5px solid var(--line-bright);
  border-radius: 2px;
}
.card:hover, .trade-card:hover { border-color: rgba(37, 232, 230, 0.32); }

/* ── Watchlist summary bar ── */
.wl-summary-bar {
  background: var(--surface);
  border: 1.5px solid var(--line-bright);
  border-radius: 2px;
}

/* ── Login card ── */
.login-card {
  background: var(--surface);
  border: 1.5px solid rgba(37, 232, 230, 0.28);
  border-radius: 2px;
  box-shadow: 0 0 40px rgba(37, 232, 230, 0.08), 0 0 80px rgba(255, 46, 151, 0.06);
}

/* ── Refresh button ── */
.refresh-btn {
  background: rgba(37, 232, 230, 0.08);
  color: var(--cyan);
  border: 1.5px solid rgba(37, 232, 230, 0.35);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: 2px;
}
.refresh-btn:hover { background: rgba(37, 232, 230, 0.16); }

/* ── Section label / divider ── */
.section-label, .section-divider {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  font-family: var(--font-mono);
}

/* ── Stat numbers ── */
.stat-num, .level-rr {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  font-family: var(--font-mono);
}
.wl-stat-value { font-family: var(--font-mono); }

/* ── Badges ── */
.badge-gold {
  background: rgba(37, 232, 230, 0.10);
  color: var(--cyan);
  border: 1px solid rgba(37, 232, 230, 0.35);
  border-radius: 2px;
}
.badge-blue {
  background: rgba(177, 74, 237, 0.12);
  color: var(--purple);
  border: 1px solid rgba(177, 74, 237, 0.35);
  border-radius: 2px;
}
.score-strong {
  background: rgba(37, 232, 230, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(37, 232, 230, 0.42);
  border-radius: 2px;
}

/* ── Wheel tiers ── */
.tier-current  { background: rgba(37,232,230,0.08);  border: 1.5px solid rgba(37,232,230,0.38); }
.tier-unlocked { background: rgba(44,246,179,0.06);  border: 1px solid rgba(44,246,179,0.24); }
.tier-locked   { background: rgba(125,111,176,0.05); border: 1px solid rgba(125,111,176,0.16); opacity: 0.72; }
.tier-current  .ladder-tier-num, .tier-current  .ladder-col-value { color: var(--cyan); }
.tier-unlocked .ladder-tier-num, .tier-unlocked .ladder-col-value { color: var(--up); }

/* ── Alert bars ── */
.pos-alert-stop   { background: rgba(255,46,151,0.10); border-left: 3px solid var(--down); color: var(--down); }
.pos-alert-target { background: rgba(37,232,230,0.08); border-left: 3px solid var(--cyan); color: var(--cyan); }

/* ── Inputs ── */
.field input, .field textarea, .field select,
.filter-input, .login-card input,
.dd-filters select, .dd-filters input[type="text"], .dd-filters input[type="date"],
.dd-controls select {
  font-family: var(--font-mono);
  border: 1px solid var(--line-bright);
  border-radius: 2px;
}
.field input:focus, .field textarea:focus, .field select:focus,
.filter-input:focus, .login-card input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(37,232,230,0.28);
  outline: none;
}

/* ── Toggle buttons ── */
.toggle-group { border-color: var(--line-bright); border-radius: 2px; }
.toggle-btn.active { background: rgba(37,232,230,0.16); color: var(--cyan); text-shadow: var(--glow-cyan); }
.toggle-btn:hover:not(.active) { background: var(--surface-2); color: var(--text); }

/* ── Status badges ── */
.status-complete  { background: rgba(44,246,179,0.14); color: var(--up);   border: 1px solid rgba(44,246,179,0.40); border-radius: 2px; }
.status-progress  { background: rgba(37,232,230,0.12); color: var(--cyan); border: 1px solid rgba(37,232,230,0.40); border-radius: 2px; }
.status-not-started { background: rgba(125,111,176,0.10); color: var(--muted); border: 1px solid rgba(125,111,176,0.28); border-radius: 2px; }

/* ── Brief tags ── */
.brief-tag-bull { background: rgba(44,246,179,0.14); color: var(--up);   border: 1px solid rgba(44,246,179,0.40); }
.brief-tag-bear { background: rgba(255,46,151,0.14); color: var(--down); border: 1px solid rgba(255,46,151,0.40); }
.brief-tag-neut { background: rgba(125,111,176,0.12); color: var(--muted); border: 1px solid rgba(125,111,176,0.28); }

/* ── Health indicators ── */
.health-ok   { color: var(--up);   text-shadow: var(--glow-up); }
.health-fail { color: var(--down); text-shadow: var(--glow-down); }

/* ── S0 position ticker / archive dates ── */
.s0-pos-ticker, .brief-archive-date { color: var(--cyan); text-shadow: var(--glow-cyan); font-family: var(--font-mono); }

/* ── Banners ── */
.saved-banner {
  background: rgba(44, 246, 179, 0.08);
  border: 1px solid rgba(44, 246, 179, 0.38);
  color: var(--up);
  border-radius: 2px;
}
.error {
  background: rgba(255, 46, 151, 0.08);
  border: 1px solid rgba(255, 46, 151, 0.40);
  color: var(--magenta-soft);
  border-radius: 2px;
}

/* ── Hover rows ── */
.brief-archive-item:hover, .lesson-row:hover { background: var(--surface-2); }
.wl-table tbody tr:hover { background: rgba(37,232,230,0.04); }
.dd-row-summary:hover { background: rgba(125,111,176,0.08); border-radius: 2px; }
.trade-card-summary:hover .ticker { color: var(--cyan); }

/* ── Mismatch / flag ── */
.wl-mismatch { background: rgba(180,0,90,0.08); }
.wl-flag { background: var(--down); border-radius: 0; }

/* ── DD star ── */
.dd-star:hover, .dd-star.starred { color: var(--cyan); }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line-bright); color: var(--neutral); }

/* ── Modals ── */
.modal, .wl-modal { background: var(--surface); border: 1.5px solid var(--line-bright); border-radius: 2px; }

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(37,232,230,0.38); }

/* ── News alert ── */
.news-alert-inner {
  background: rgba(37,232,230,0.06);
  border: 1px solid rgba(37,232,230,0.20);
  border-radius: 2px;
}
.news-alert-header { color: var(--cyan); }
.news-alert-ticker { color: var(--cyan); }
.news-alert-link:hover { color: var(--cyan); }

/* ── Level card ── */
.level-card-changed .level-card-header { color: var(--cyan); }
.level-updated-badge, .review-badge {
  background: rgba(37,232,230,0.12);
  color: var(--cyan);
  border: 1px solid rgba(37,232,230,0.35);
  border-radius: 0;
}

/* ── Lesson / flagged ── */
.lesson-id-num { color: var(--cyan); font-family: var(--font-mono); }
.flagged-star { color: var(--purple); }
.exercise-card { border-left: 3px solid var(--cyan) !important; background: rgba(37,232,230,0.04); }
.exercise-card h2 { color: var(--cyan); }

/* ── WSID results ── */
.wsid-num { color: var(--cyan); font-family: var(--font-mono); }

/* ── Price badges ── */
.price-badge-up   { background: rgba(44,246,179,0.14); color: var(--up);   border: 1px solid rgba(44,246,179,0.35); }
.price-badge-down { background: rgba(255,46,151,0.14); color: var(--down); border: 1px solid rgba(255,46,151,0.35); }

/* ── Paper example highlight ── */
.paper-example-card {
  border: 1px solid rgba(37,232,230,0.30) !important;
  background: rgba(37,232,230,0.03);
}

/* ── Catalyst / risk tags ── */
.catalyst-type {
  background: rgba(37,232,230,0.10);
  color: var(--cyan);
  border: 1px solid rgba(37,232,230,0.28);
  border-radius: 0;
}
.risk-tag {
  background: rgba(180,0,90,0.16);
  color: var(--magenta-soft);
  border: 1px solid rgba(255,46,151,0.30);
  border-radius: 0;
}
