/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════ */
:root {
  --bg:       #0B0F19;
  --bg2:      #1A2235;
  --card:     #131A2A;
  --border:   #1E2A42;
  --border2:  #2A3A5C;

  --accent:   #00D4FF;
  --accent-d: rgba(0,212,255,0.12);
  --primary:  #4F8CFF;
  --primary-d:rgba(79,140,255,0.14);
  --ai:       #8B5CF6;
  --ai-d:     rgba(139,92,246,0.14);
  --green:    #00E676;
  --green-d:  rgba(0,230,118,0.12);
  --red:      #FF5252;
  --red-d:    rgba(255,82,82,0.12);
  --gold:     #FFB800;
  --gold-d:   rgba(255,184,0,0.12);
  --yellow:   #FFD60A;

  --text:     #D6E0F5;
  --text-hi:  #EDF2FF;
  --text-lo:  #6D85B0;

  --font:     'Inter', -apple-system, sans-serif;
  --mono:     'JetBrains Mono', 'Courier New', monospace;
  --r:        12px;
  --r-sm:     8px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 45% at 50% 0, rgba(0,212,255,.08) 0%, transparent 55%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.022) 1px, transparent 0);
  background-size: auto, 28px 28px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, button { font-family: inherit; }

/* ─── DISCLAIMER BANNER ─── */
.disclaimer-banner {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #0a1525;
  border-bottom: 2px solid var(--gold);
  padding: 12px 20px;
  align-items: center; gap: 12px; flex-wrap: wrap;
}
.disc-text {
  flex: 1; font-size: 12px; color: var(--text); line-height: 1.5;
  min-width: 200px;
}
.disc-text strong { color: var(--gold); }
.disc-btn {
  flex-shrink: 0;
  padding: 7px 18px;
  background: var(--gold); border: none; border-radius: 20px;
  color: #000; font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.disc-btn:hover { opacity: .85; }

/* ─── HEADER ─── */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: rgba(15,24,40,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,212,255,0.06), 0 4px 24px rgba(0,0,0,0.4);
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark  { flex-shrink: 0; display: block; filter: drop-shadow(0 2px 10px rgba(0,212,255,.4)) drop-shadow(0 4px 18px rgba(124,58,237,.25)); }
.logo-title { font-size: 16px; font-weight: 800; color: var(--text-hi); letter-spacing: -.02em; }
.logo-sub   { font-size: 11px; color: var(--text-lo); letter-spacing: .01em; }

.ticker {
  flex: 1;
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.ticker::-webkit-scrollbar { display: none; }
.ticker-loading { color: var(--text-lo); font-size: 12px; }

.ticker-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
}
.ticker-item:hover { border-color: var(--accent); background: var(--accent-d); }
.ticker-sym   { font-weight: 600; font-size: 12px; color: var(--text-hi); }
.ticker-price { font-size: 12px; font-family: var(--mono); }
.ticker-chg   { font-size: 11px; font-family: var(--mono); }
.ticker-chg.green { color: var(--green); }
.ticker-chg.red   { color: var(--red); }

.btn-hf-header {
  flex-shrink: 0;
  padding: 6px 14px;
  background: rgba(255,184,0,0.1);
  border: 1px solid rgba(255,184,0,0.3);
  border-radius: 20px;
  color: var(--gold);
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  transition: background .2s;
}
.btn-hf-header:hover { background: rgba(255,184,0,0.2); text-decoration: none; }

/* ─── AUTH BAR ─── */
.auth-bar { flex-shrink: 0; display: flex; align-items: center; }

.btn-google-signin {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: #fff;
  border: none; border-radius: 20px;
  color: #3c4043;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  transition: box-shadow .2s, opacity .2s;
}
.btn-google-signin:hover    { box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.btn-google-signin:disabled { opacity: .45; cursor: default; box-shadow: none; }

.user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.user-avatar-placeholder {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-d); color: var(--accent);
  border: 1px solid rgba(0,212,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.user-name {
  font-size: 12px; font-weight: 500; color: var(--text-hi);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-signout {
  padding: 4px 10px;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 20px; color: var(--text-lo);
  font-size: 11px; font-weight: 500; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-signout:hover { border-color: var(--red); color: var(--red); }

/* ─── LAYOUT ─── */
.layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 16px;
  padding: 16px 20px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 1060px) { .layout { grid-template-columns: 1fr; } }
.left-panel, .right-panel { display: flex; flex-direction: column; gap: 14px; }

/* ─── CARDS ─── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
}
.card-heading {
  font-size: 14px; font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 14px;
  letter-spacing: .02em;
}

/* ─── CHART ─── */
.chart-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.chart-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.coin-select {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  padding: 7px 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; outline: none;
  transition: border-color .2s;
}
.coin-select:focus { border-color: var(--accent); }

.live-price-box { display: flex; align-items: center; gap: 8px; }
.lp-val {
  font-family: var(--mono);
  font-size: 22px; font-weight: 700;
  color: var(--text-hi);
}
.lp-chg {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 20px;
}
.lp-chg.green { background: var(--green-d); color: var(--green); }
.lp-chg.red   { background: var(--red-d);   color: var(--red); }

/* ─── FRESHNESS INDICATOR ─── */
.freshness {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-lo);
  white-space: nowrap;
}
.fresh-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: fresh-pulse 2s ease-in-out infinite;
}
.freshness.stale { color: var(--gold); }
.freshness.stale .fresh-dot { background: var(--gold); box-shadow: 0 0 6px var(--gold); animation: none; }
@keyframes fresh-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Forecast horizon row inside chart card */
.hz-forecast-row {
  flex-basis: 100%;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.hz-row-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-lo);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.hz-row-hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text-lo);
}

/* Forecast horizon buttons */
.hz-btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 0; }
.hz-btn {
  padding: 5px 12px;
  border: 1px solid var(--border2);
  border-radius: 20px;
  background: transparent;
  color: var(--text-lo);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.hz-btn:hover { border-color: var(--accent); color: var(--accent); }
.hz-btn.active { background: var(--accent-d); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.hz-warning {
  font-size: 12px;
  color: var(--gold, #FFB800);
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,184,0,0.07);
  border-radius: 6px;
  border: 1px solid rgba(255,184,0,0.18);
}

/* Forecast readout beneath the chart (all timeframes) */
.forecast-summary {
  margin-top: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,184,0,0.05), rgba(255,184,0,0.02));
  border: 1px solid rgba(255,184,0,0.16);
  border-radius: 10px;
}
.forecast-summary:empty { display: none; }
.fc-sum-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.fc-sum-left { display: flex; align-items: center; gap: 8px; }
.fc-sum-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fc-sum-dot.up   { background: var(--green, #00E887); box-shadow: 0 0 8px rgba(0,232,135,0.6); }
.fc-sum-dot.down { background: var(--red, #FF3D3D);   box-shadow: 0 0 8px rgba(255,61,61,0.6); }
.fc-sum-label {
  font-size: 12px; font-weight: 600; color: var(--text-lo);
  text-transform: uppercase; letter-spacing: .04em;
}
.fc-sum-val { font-size: 18px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.fc-sum-val.up   { color: var(--green, #00E887); }
.fc-sum-val.down { color: var(--red, #FF3D3D); }
.fc-sum-chg { font-size: 13px; font-weight: 600; opacity: .85; }
.fc-sum-band { margin-top: 6px; font-size: 12px; color: var(--text-lo); }
.fc-sum-warn { color: var(--gold, #FFB800); font-weight: 600; }

.chart-wrap { position: relative; height: 320px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

.chart-loader {
  display: none;
  position: absolute; inset: 0;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(8,12,20,0.75);
  border-radius: var(--r-sm);
  color: var(--text-lo); font-size: 13px;
}
.chart-loader.visible { display: flex; }

/* ─── LOAD ERROR BANNER (CoinGecko failures) ─── */
.load-error {
  display: none;
  position: absolute; inset: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(8,12,20,0.92);
  border: 1px solid rgba(255,61,61,.3);
  border-radius: var(--r-sm);
  padding: 20px; text-align: center;
}
.le-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--red-d); color: var(--red);
  border: 1px solid rgba(255,61,61,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}
.le-text { font-size: 13px; color: var(--text); max-width: 360px; line-height: 1.5; }
.le-retry {
  padding: 8px 22px;
  background: var(--accent); border: none; border-radius: 20px;
  color: #001018; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: opacity .2s;
}
.le-retry:hover { opacity: .85; }

.spin {
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── TECHNICALS ─── */
.heading-sub { font-size: 12px; font-weight: 400; color: var(--text-lo); }

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .tech-grid { grid-template-columns: 1fr; } }

.tech-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px;
}
.ti-label { font-size: 12px; font-weight: 600; color: var(--text-lo); margin-bottom: 2px; }
.ti-desc  { font-size: 11px; color: var(--text-lo); opacity: 0.8; margin-bottom: 6px; font-style: italic; }
.ti-val {
  font-family: var(--mono);
  font-size: 20px; font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 7px;
}
.ti-bar-track {
  height: 6px;
  background: linear-gradient(to right,
    rgba(0,232,135,0.25) 0%, rgba(0,232,135,0.25) 30%,
    rgba(75,98,128,0.3) 30%, rgba(75,98,128,0.3) 70%,
    rgba(255,61,61,0.25) 70%, rgba(255,61,61,0.25) 100%
  );
  border-radius: 3px; overflow: hidden; margin-bottom: 4px;
  position: relative;
}
.ti-bar-fill {
  height: 100%; width: 50%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .5s ease, background .3s;
}
.rsi-zone-row {
  display: flex; justify-content: space-between;
  font-size: 9px; margin-bottom: 6px; opacity: 0.6;
}
.rz { flex: 1; }
.rz:nth-child(2) { text-align: center; }
.rz:last-child   { text-align: right; }
.green-text  { color: var(--green); }
.red-text    { color: var(--red); }
.neutral-text{ color: var(--text-lo); }
.ti-sig { font-size: 12px; color: var(--text-lo); }

/* ─── CALCULATOR ─── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px; font-weight: 500;
  color: var(--text-lo);
  margin-bottom: 6px;
}
.hint { font-weight: 400; font-style: italic; }
.accent { color: var(--accent); font-weight: 600; }

.form-group input[type="number"] {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  padding: 8px 12px;
  font-size: 14px;
  font-family: var(--mono);
  outline: none;
  transition: border-color .2s;
}
.form-group input[type="number"]:focus { border-color: var(--accent); }

.dir-toggle { display: flex; gap: 8px; }
.dir-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text-lo);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.dir-btn.long.active  { background: var(--green-d); border-color: var(--green); color: var(--green); }
.dir-btn.short.active { background: var(--red-d);   border-color: var(--red);   color: var(--red); }

.range-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: var(--border2);
  border-radius: 2px; outline: none; cursor: pointer;
  margin: 6px 0 2px;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  cursor: pointer;
}
.range-marks {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-lo); margin-top: 2px;
}
.lev-risk-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 1px 7px; border-radius: 10px;
  margin-left: 6px; vertical-align: middle;
}
.lev-low      { background: var(--green-d); color: var(--green); border: 1px solid rgba(0,232,135,.3); }
.lev-mod      { background: var(--accent-d); color: var(--accent); border: 1px solid rgba(0,212,255,.3); }
.lev-high     { background: var(--gold-d); color: var(--gold); border: 1px solid rgba(255,184,0,.3); }
.lev-extreme  { background: var(--red-d); color: var(--red); border: 1px solid rgba(255,61,61,.3); }
.lev-hint {
  font-size: 11px; color: var(--text-lo);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  margin-top: 6px;
  line-height: 1.5;
}

.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0;
  color: var(--text-lo); font-size: 11px; font-weight: 500; letter-spacing: .05em;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-analyze {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #0088AA, #00D4FF);
  border: none;
  border-radius: var(--r-sm);
  color: #fff;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-top: 4px;
}
.btn-analyze:hover   { opacity: .9; }
.btn-analyze:active  { transform: scale(.98); }
.btn-analyze:disabled { opacity: .5; cursor: default; }

/* ─── RESULTS ─── */
.results-grid { display: flex; flex-direction: column; gap: 8px; }
.result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.result-row.hl-green { border-color: rgba(0,232,135,0.3); background: var(--green-d); }
.result-row.hl-red   { border-color: rgba(255,61,61,0.3);  background: var(--red-d); }
.result-row.hl-gold  { border-color: rgba(255,184,0,0.3);  background: var(--gold-d); }
.res-label { font-size: 13px; font-weight: 500; color: var(--text); }
.res-val {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  color: var(--text-hi); text-align: right; flex-shrink: 0;
}
.res-val.green  { color: var(--green); }
.res-val.red    { color: var(--red); }
.res-val.gold   { color: var(--gold); }
.res-val.accent { color: var(--accent); }
.res-sub { font-size: 11px; color: var(--text-lo); margin-top: 3px; line-height: 1.4; }

/* ─── SIGNAL ─── */
.signal-heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  font-weight: 700; font-size: 15px;
}
.signal-heading.green  { background: var(--green-d); color: var(--green); border: 1px solid rgba(0,232,135,.3); }
.signal-heading.red    { background: var(--red-d);   color: var(--red);   border: 1px solid rgba(255,61,61,.3); }
.signal-heading.yellow { background: var(--gold-d);  color: var(--gold);  border: 1px solid rgba(255,184,0,.3); }
.signal-heading.neutral{ background: var(--bg2);     color: var(--text);  border: 1px solid var(--border); }
.sig-score {
  font-size: 12px; padding: 2px 8px;
  background: rgba(0,0,0,.3); border-radius: 20px;
}
.align-msg {
  padding: 7px 12px;
  border-radius: var(--r-sm);
  font-size: 12px; margin-bottom: 10px;
}
.align-msg.green { background: var(--green-d); color: var(--green); border: 1px solid rgba(0,232,135,.25); }
.align-msg.red   { background: var(--red-d);   color: var(--red);   border: 1px solid rgba(255,61,61,.25); }

.beginner-summary {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 12px;
  margin-bottom: 10px;
}
.bs-emoji { font-size: 22px; flex-shrink: 0; line-height: 1; }
.bs-text  { font-size: 13px; color: var(--text-hi); line-height: 1.6; }

.sig-section-title {
  font-size: 11px; font-weight: 600;
  color: var(--text-lo); letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 8px; margin-top: 4px;
}
.sig-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sig-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--bg2);
  border-radius: var(--r-sm);
  font-size: 12px; line-height: 1.5;
}
.sig-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sig-item.green  .sig-dot { background: var(--green); }
.sig-item.red    .sig-dot { background: var(--red); }
.sig-item.yellow .sig-dot { background: var(--gold); }
.sig-item.neutral .sig-dot{ background: var(--text-lo); }

.btn-hf-link {
  display: block; text-align: center;
  padding: 10px;
  background: rgba(255,184,0,0.1);
  border: 1px solid rgba(255,184,0,0.3);
  border-radius: var(--r-sm);
  color: var(--gold); font-size: 13px; font-weight: 600;
  transition: background .2s;
}
.btn-hf-link:hover { background: rgba(255,184,0,0.2); text-decoration: none; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-green  { background: var(--green-d); color: var(--green);   border: 1px solid rgba(0,232,135,.3); }
.badge-red    { background: var(--red-d);   color: var(--red);     border: 1px solid rgba(255,61,61,.3); }
.badge-yellow { background: var(--gold-d);  color: var(--gold);    border: 1px solid rgba(255,184,0,.3); }
.badge-neutral{ background: var(--bg2);     color: var(--text-lo); border: 1px solid var(--border); }
.badge-accent { background: var(--accent-d);color: var(--accent);  border: 1px solid rgba(0,212,255,.3); }

/* ─── ALERT CARD ─── */
.alert-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  cursor: pointer; margin-bottom: 0;
}
.alert-subhead { font-size: 11px; color: var(--text-lo); margin-top: 2px; }
.alert-caret   { color: var(--text-lo); font-size: 11px; margin-top: 2px; transition: transform .2s; }

.alert-body { margin-top: 14px; }
.alert-body.collapsed { display: none; }

.alert-note {
  font-size: 11px; color: var(--text-lo);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 10px;
  margin-bottom: 12px; line-height: 1.5;
}
.link-btn {
  background: none; border: none; color: var(--accent);
  font-size: 11px; cursor: pointer; padding: 0;
  text-decoration: underline;
}

.emailjs-help {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r-sm); padding: 12px; margin-bottom: 12px;
}
.help-step {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; color: var(--text); margin-bottom: 10px; line-height: 1.5;
}
.help-step:last-child { margin-bottom: 0; }
.help-num {
  background: var(--accent); color: var(--bg);
  min-width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.help-step code {
  font-family: var(--mono); font-size: 10px;
  background: var(--bg); padding: 2px 6px; border-radius: 3px;
  color: var(--accent); display: inline-block; margin-top: 4px;
  word-break: break-all;
}

.alert-form-group { margin-bottom: 10px; }
.alert-label {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--text-lo); margin-bottom: 4px;
}
.alert-input {
  width: 100%;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r-sm); color: var(--text-hi);
  padding: 7px 10px; font-size: 12px; outline: none;
  font-family: var(--mono); transition: border-color .2s;
}
.alert-input:focus { border-color: var(--accent); }
.alert-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.toggle-row {
  display: flex !important; flex-direction: row !important;
  justify-content: space-between; align-items: center;
  padding: 8px 10px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.sw-slider {
  position: absolute; inset: 0;
  background: var(--border2); border-radius: 22px; cursor: pointer;
  transition: background .3s;
}
.sw-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: transform .3s;
}
.switch input:checked + .sw-slider { background: var(--accent); }
.switch input:checked + .sw-slider::before { transform: translateX(18px); }

.thresh-row { display: flex; gap: 5px; margin-bottom: 5px; }
.thresh-btn {
  flex: 1; padding: 5px 0;
  border: 1px solid var(--border2); border-radius: 20px;
  background: transparent; color: var(--text-lo);
  font-size: 11px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.thresh-btn:hover, .thresh-btn.active {
  background: var(--accent-d); border-color: var(--accent); color: var(--accent);
}
.thresh-hint { font-size: 10px; color: var(--text-lo); font-style: italic; margin-top: 4px; }

.watch-coins { display: flex; flex-wrap: wrap; gap: 5px; }
.watch-coin-item {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--text-lo);
  transition: all .2s; user-select: none;
}
.watch-coin-item:has(input:checked) {
  background: var(--accent-d); border-color: var(--accent); color: var(--accent);
}
.watch-coin-item input { display: none; }

/* GDPR consent row */
.gdpr-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); margin-bottom: 10px;
}
.gdpr-row input[type=checkbox] { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.gdpr-row label { font-size: 11px; color: var(--text-lo); line-height: 1.5; cursor: pointer; }
.gdpr-row label a { color: var(--accent); }
.btn-forget {
  background: none; border: none; color: var(--text-lo);
  font-size: 11px; cursor: pointer; padding: 0; margin-top: 8px;
  text-decoration: underline;
}
.btn-forget:hover { color: var(--red); }

.alert-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-save-alert {
  flex: 1; padding: 8px;
  background: var(--accent-d); border: 1px solid rgba(0,212,255,.3);
  border-radius: var(--r-sm); color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s;
}
.btn-save-alert:hover { background: rgba(0,212,255,.2); }
.btn-test-alert {
  padding: 8px 12px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r-sm); color: var(--text-lo);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.btn-test-alert:hover { border-color: var(--gold); color: var(--gold); }

.alert-status {
  margin-top: 10px; padding: 8px 12px;
  border-radius: var(--r-sm); font-size: 12px; line-height: 1.5;
}
.alert-status.success { background: var(--green-d); color: var(--green); border: 1px solid rgba(0,232,135,.3); }
.alert-status.error   { background: var(--red-d);   color: var(--red);   border: 1px solid rgba(255,61,61,.3); }

/* ─── PAGE TABS (sticky) ─── */
.page-tabs {
  position: sticky; top: 54px; z-index: 90;
  display: flex; gap: 0;
  background: rgba(15,24,40,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,212,255,0.04), 0 4px 16px rgba(0,0,0,0.3);
}
.page-tab {
  padding: 12px 24px;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-lo); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  margin-bottom: -1px;
}
.page-tab:hover  { color: var(--text); }
.page-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── DASHBOARD VIEW ─── */
.dashboard-view {
  max-width: 1100px; margin: 0 auto;
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}

.dash-input-card { }
.dash-input-title { font-size: 20px; font-weight: 700; color: var(--text-hi); margin-bottom: 6px; }
.dash-input-sub   { font-size: 13px; color: var(--text-lo); margin-bottom: 18px; line-height: 1.5; }

.dash-input-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 12px;
}
.capital-field {
  display: flex; align-items: center;
  background: var(--bg2); border: 2px solid var(--accent);
  border-radius: var(--r-sm); padding: 0 14px;
  flex-shrink: 0;
}
.capital-sign { font-size: 22px; font-weight: 700; color: var(--accent); margin-right: 4px; }
.capital-field input {
  background: none; border: none; outline: none;
  color: var(--text-hi); font-size: 28px; font-weight: 700;
  font-family: var(--mono); width: 140px; padding: 10px 0;
}

.risk-profile { display: flex; gap: 6px; }
.risk-btn {
  padding: 8px 16px;
  border: 1px solid var(--border2); border-radius: 20px;
  background: var(--bg2); color: var(--text-lo);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.risk-btn:hover { border-color: var(--accent); color: var(--accent); }
.risk-btn.active { background: var(--accent-d); border-color: var(--accent); color: var(--accent); }

.risk-explain { margin-bottom: 16px; }
.re-item {
  display: none; font-size: 12px; color: var(--text-lo);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 9px 12px; line-height: 1.5;
}
.re-item.active { display: block; }

.btn-dash-analyze {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #005580, #00D4FF);
  border: none; border-radius: var(--r-sm);
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity .2s, transform .1s;
}
.btn-dash-analyze:hover   { opacity: .9; }
.btn-dash-analyze:active  { transform: scale(.99); }
.btn-dash-analyze:disabled { opacity: .5; cursor: default; }

.dash-loader {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px 20px;
}
.dl-title { font-size: 15px; font-weight: 600; color: var(--text-hi); margin-bottom: 4px; }
.dl-sub   { font-size: 12px; color: var(--text-lo); }

.dash-no-signal {
  text-align: center; padding: 40px 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text-lo);
}
.dash-no-signal h3 { color: var(--text-hi); margin: 12px 0 8px; }
.dash-no-signal p  { font-size: 13px; max-width: 400px; margin: 0 auto; line-height: 1.6; }
.no-signal-icon    { font-size: 32px; color: var(--text-lo); line-height: 1; }

.dash-error {
  background: var(--red-d); border: 1px solid rgba(255,61,61,.3);
  border-radius: var(--r); padding: 16px; color: var(--red); font-size: 13px;
}

/* ─── DASHBOARD SUMMARY ─── */
.dash-summary-card { }
.dash-sum-grid {
  display: flex; gap: 0; flex-wrap: wrap;
}
.dsi {
  flex: 1; min-width: 120px;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
}
.dsi:last-child { border-right: none; }
.dsi-label { font-size: 11px; color: var(--text-lo); margin-bottom: 5px; }
.dsi-val {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  color: var(--text-hi);
}
.dsi-val.green  { color: var(--green); }
.dsi-val.red    { color: var(--red); }
.dsi-val.accent { color: var(--accent); }

.dash-howto {
  background: var(--gold-d); border: 1px solid rgba(255,184,0,.3);
  border-radius: var(--r); padding: 14px 16px;
  font-size: 12px; color: var(--text); line-height: 1.6;
}

/* ─── TRADE CARDS GRID ─── */
.dash-trades-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .dash-trades-grid { grid-template-columns: 1fr; } }

.trade-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 18px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.trade-card.tc-long  { border-top: 3px solid var(--green); }
.trade-card.tc-short { border-top: 3px solid var(--red); }

.tc-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tc-dir {
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.tc-dir.long  { background: var(--green-d); color: var(--green); border: 1px solid rgba(0,232,135,.3); }
.tc-dir.short { background: var(--red-d);   color: var(--red);   border: 1px solid rgba(255,61,61,.3); }
.tc-name  { font-size: 14px; font-weight: 600; color: var(--text-hi); flex: 1; }
.tc-stars { font-size: 13px; flex-shrink: 0; }

.tc-alloc-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r-sm); padding: 10px 12px;
}
.tc-alloc-amt  { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--accent); }
.tc-alloc-pct  { font-size: 12px; color: var(--text-lo); flex: 1; }
.tc-lev-badge  {
  padding: 2px 8px; border-radius: 20px;
  background: var(--gold-d); color: var(--gold);
  border: 1px solid rgba(255,184,0,.3);
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.tc-margin-note { font-size: 11px; color: var(--text-lo); margin-top: -4px; }

.tc-prices-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.tcp {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 10px;
  text-align: center;
}
.tcp-label { font-size: 10px; color: var(--text-lo); margin-bottom: 4px; }
.tcp-val   { font-family: var(--mono); font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.tcp-val.green  { color: var(--green); }
.tcp-val.red    { color: var(--red); }
.tcp-val.accent { color: var(--accent); }
.tcp-sub   { font-size: 10px; color: var(--text-lo); }

.tc-outcome-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.tc-outcome {
  flex: 1; padding: 8px 12px;
  border-radius: var(--r-sm); font-size: 12px;
}
.tc-outcome.good { background: var(--green-d); color: var(--green); border: 1px solid rgba(0,232,135,.25); }
.tc-outcome.bad  { background: var(--red-d);   color: var(--red);   border: 1px solid rgba(255,61,61,.25); }

.tc-why { }
.tc-why-title { font-size: 11px; font-weight: 600; color: var(--text-lo); margin-bottom: 6px; letter-spacing: .03em; }
.tc-why-item  { font-size: 12px; color: var(--text); line-height: 1.6; padding: 2px 0; }

.dash-disclaimer {
  font-size: 11px; color: var(--text-lo); text-align: center;
  padding: 12px; border-top: 1px solid var(--border); margin-top: 4px;
}

/* ─── FOOTER ─── */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-lo); font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

.btn-analyze-once {
  padding: 10px 20px;
  background: linear-gradient(135deg, #0088AA, #00D4FF);
  border: none; border-radius: var(--r-sm);
  color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: opacity .2s, transform .1s;
}
.btn-analyze-once:hover   { opacity: .9; }
.btn-analyze-once:active  { transform: scale(.98); }
.btn-analyze-once:disabled { opacity: .5; cursor: default; }

/* ─── SENTIMENT CARD ─── */
.sentiment-card { padding: 18px 20px; }

.sent-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-lo); font-size: 13px; padding: 12px 0;
}

.sent-unavail { font-size: 12px; color: var(--text-lo); padding: 6px 0; }

.sent-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-lo);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.sent-src {
  font-weight: 400; text-transform: none; letter-spacing: 0;
  color: var(--border2); margin-left: 4px; font-size: 9px;
}

/* Top two-column grid: F&G + Community */
.sent-top-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  margin-bottom: 0;
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.sent-block-fg {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.sent-block-comm {
  padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: flex-start;
}
@media (max-width: 520px) {
  .sent-top-grid { grid-template-columns: 1fr; }
  .sent-block-fg { border-right: none; border-bottom: 1px solid var(--border); }
}

.sent-block-full {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px;
}

/* Fear & Greed — number row */
.fg-num-row {
  display: flex; align-items: center; gap: 14px;
  margin: 10px 0 14px;
}
.fg-big-num {
  font-size: 52px; font-weight: 800;
  font-family: var(--mono); line-height: 1; flex-shrink: 0;
}
.fg-num-info { flex: 1; min-width: 0; }
.fg-classify {
  font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  line-height: 1.2;
}
.fg-trend-text {
  font-size: 11px; color: var(--text-lo); margin-top: 4px;
}

/* Gradient bar */
.fg-bar-wrap { margin-bottom: 10px; }
.fg-bar-track {
  height: 10px;
  background: linear-gradient(90deg, #FF3D3D 0%, #F7C948 44%, #00E887 100%);
  border-radius: 5px; position: relative; margin-bottom: 5px;
}
.fg-bar-indicator {
  position: absolute; top: -4px;
  width: 4px; height: 18px;
  background: #fff; border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 1px 5px rgba(0,0,0,.6);
}
.fg-bar-axis {
  display: flex; justify-content: space-between;
  font-size: 10px; font-weight: 600;
}

/* 7-day spark bars */
.fg-spark-row { margin-bottom: 10px; }
.fg-spark {
  display: flex; align-items: flex-end; gap: 2px; height: 28px;
}
.fgs-bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 4px; transition: height .3s; }

/* Community bars */
.comm-bar-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.comm-side { font-size: 10px; font-weight: 700; width: 28px; flex-shrink: 0; }
.comm-track {
  flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.comm-fill { height: 100%; border-radius: 4px; transition: width .5s; }
.comm-fill.green { background: linear-gradient(90deg, #00E887, #00c97a); }
.comm-fill.red   { background: linear-gradient(90deg, #FF3D3D, #e02020); }
.comm-pct { font-size: 12px; font-weight: 600; width: 38px; text-align: right; flex-shrink: 0; }

/* News Sentiment bars */
.fb-bars { margin-bottom: 10px; }
.fb-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px;
}
.fb-lbl { font-size: 10px; font-weight: 700; width: 54px; flex-shrink: 0; letter-spacing: .03em; }
.fb-track {
  flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.fb-fill { height: 100%; border-radius: 4px; transition: width .6s; }
.fb-fill.green   { background: linear-gradient(90deg, #00E887, #00c97a); }
.fb-fill.neutral { background: linear-gradient(90deg, #F7C948, #e0aa20); }
.fb-fill.red     { background: linear-gradient(90deg, #FF3D3D, #e02020); }
.fb-pct { font-size: 11px; font-weight: 600; width: 32px; text-align: right; flex-shrink: 0; }

/* News article list */
.nl-list { margin-top: 12px; border-top: 1px solid var(--border); }
.nl-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: opacity .15s;
  cursor: pointer;
}
.nl-item:last-child { border-bottom: none; padding-bottom: 0; }
.nl-item:hover { opacity: .75; }
.nl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
}
.nl-pos { background: #00E887; box-shadow: 0 0 5px rgba(0,232,135,.6); }
.nl-neg { background: #FF3D3D; box-shadow: 0 0 5px rgba(255,61,61,.6); }
.nl-neu { background: var(--border2); }
.nl-body { flex: 1; min-width: 0; }
.nl-title {
  font-size: 12px; color: var(--text); line-height: 1.45;
  margin-bottom: 4px;
}
.nl-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nl-src {
  font-size: 10px; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.nl-time { font-size: 10px; color: var(--text-lo); white-space: nowrap; }

/* ═══════════════════════════════════════════════════════
   INTELLIGENCE HUB
═══════════════════════════════════════════════════════ */

/* ─── Hub Layout ─── */
.hub-view {
  max-width: 1400px; margin: 0 auto;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ─── Hub Controls ─── */
.hub-controls { padding: 14px 18px; }
.hub-ctrl-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.hub-coin-select { min-width: 180px; }
.hub-status-label {
  flex: 1; font-size: 12px; color: var(--text-lo);
  min-width: 120px;
}
.btn-hub-analyze {
  padding: 10px 22px;
  background: linear-gradient(135deg, #005a80, #00D4FF);
  border: none; border-radius: var(--r-sm);
  color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 0 16px rgba(0,212,255,0.25);
}
.btn-hub-analyze:hover   { opacity: .9; }
.btn-hub-analyze:active  { transform: scale(.98); }
.btn-hub-analyze:disabled{ opacity: .5; cursor: default; }

/* ─── Hub Grids ─── */
.hub-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hub-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 1024px) {
  .hub-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .hub-grid-3 { grid-template-columns: 1fr; }
  .hub-grid-2 { grid-template-columns: 1fr; }
  .hub-ctrl-row { flex-direction: column; align-items: stretch; }
  .btn-hub-analyze { text-align: center; }
}

/* ─── Hub Inner Cards ─── */
.hub-inner-card { padding: 16px; }

/* ─── Hub Score Card ─── */
.hub-score-card { padding: 22px 24px; }

.hub-score-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 30px; color: var(--text-lo);
}
.score-ring-placeholder {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: var(--border2);
}
.score-placeholder-text { font-size: 14px; text-align: center; }

.hub-score-layout {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}

.score-ring-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.score-ring {
  width: 120px; height: 120px; border-radius: 50%;
  border: 6px solid var(--score-color, var(--accent));
  box-shadow: 0 0 24px color-mix(in srgb, var(--score-color, var(--accent)) 40%, transparent);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.score-ring-inner { text-align: center; }
.score-number {
  font-family: var(--mono);
  font-size: 42px; font-weight: 800; line-height: 1;
}
.score-ring-label {
  font-size: 12px; color: var(--text-lo); margin-top: 2px;
}

/* Score signal pill */
.score-signal { font-size: 14px; font-weight: 700; padding: 5px 16px; border-radius: 20px; }

/* ─── Signal Pills ─── */
.signal-pill-bull {
  background: var(--green-d); color: var(--green);
  border: 1px solid rgba(0,232,135,.3);
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; display: inline-block;
}
.signal-pill-bear {
  background: var(--red-d); color: var(--red);
  border: 1px solid rgba(255,61,61,.3);
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; display: inline-block;
}
.signal-pill-neu {
  background: var(--bg2); color: var(--text-lo);
  border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; display: inline-block;
}

/* ─── Score Breakdown ─── */
.score-breakdown {
  flex: 1; min-width: 0;
}
.score-bd-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-lo);
  margin-bottom: 12px;
}
.score-breakdown-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.score-bd-label { font-size: 12px; color: var(--text); width: 80px; flex-shrink: 0; }
.score-bd-track {
  flex: 1; height: 8px; background: var(--border);
  border-radius: 4px; overflow: hidden;
}
.score-bd-fill { height: 100%; border-radius: 4px; transition: width .6s; }
.score-bd-val  { font-size: 12px; font-family: var(--mono); font-weight: 600; color: var(--text-hi); width: 28px; text-align: right; flex-shrink: 0; }
.score-note {
  font-size: 10px; color: var(--text-lo);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 6px 10px; margin-top: 10px; line-height: 1.5;
}

/* ─── Hub Metric Row ─── */
.hub-metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(26,37,64,0.5);
}
.hub-metric-row:last-of-type { border-bottom: none; }
.hub-metric-row span:first-child { color: var(--text-lo); }
.hub-metric-row span:last-child  { font-family: var(--mono); font-weight: 600; color: var(--text-hi); text-align: right; }
.hub-metric-row .green  { color: var(--green); }
.hub-metric-row .red    { color: var(--red); }
.hub-metric-row .accent { color: var(--accent); }
.hub-metric-row .gold   { color: var(--gold); }
.hub-metric-row .neutral-text { color: var(--text-lo); }

/* ─── Hub Divider ─── */
.hub-divider { height: 1px; background: var(--border); margin: 10px 0; }

/* ─── Hub Section Labels ─── */
.hub-sent-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-lo);
  margin: 8px 0 6px;
}
.hub-unavail {
  font-size: 12px; color: var(--text-lo);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 12px; margin: 8px 0;
  line-height: 1.5;
}
.hub-note {
  font-size: 10px; color: var(--text-lo);
  margin-top: 8px; line-height: 1.5; font-style: italic;
}

/* ─── Hub Card Loader ─── */
.hub-card-loader {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 0; color: var(--text-lo); font-size: 12px;
}

/* ─── Technical Analysis ─── */
.hub-sr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hub-sr-label { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.hub-signals-list {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px;
}

/* ─── Futures Intelligence ─── */
.ls-bar-label { font-size: 11px; color: var(--text-lo); margin-bottom: 6px; }
.ls-bar {
  display: flex; height: 22px; border-radius: 4px; overflow: hidden;
  margin-bottom: 12px;
}
.ls-bar-long {
  background: linear-gradient(90deg, #00c97a, #00E887);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #001a0e;
  min-width: 20px; transition: width .5s;
}
.ls-bar-short {
  background: linear-gradient(90deg, #e02020, #FF3D3D);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #1a0000;
  min-width: 20px; transition: width .5s;
}

.futures-metric {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.fm-label { font-size: 11px; color: var(--text-lo); width: 120px; flex-shrink: 0; }
.fm-bar-wrap { flex: 1; height: 7px; background: var(--border); border-radius: 3px; overflow: hidden; }
.fm-bar { height: 100%; border-radius: 3px; transition: width .5s; }
.fm-bar.red   { background: linear-gradient(90deg, #e02020, #FF3D3D); }
.fm-bar.green { background: linear-gradient(90deg, #00c97a, #00E887); }
.fm-val { font-family: var(--mono); font-size: 12px; font-weight: 700; width: 52px; text-align: right; flex-shrink: 0; }
.fm-val.red   { color: var(--red); }
.fm-val.green { color: var(--green); }

/* ─── Narrative Tags ─── */
.narrative-intro { font-size: 11px; color: var(--text-lo); margin-bottom: 10px; }
.narrative-tags  { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.narrative-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; cursor: default;
}
.narrative-hot  { background: rgba(255,184,0,.15); color: var(--gold); border: 1px solid rgba(255,184,0,.35); }
.narrative-warm { background: var(--accent-d); color: var(--accent); border: 1px solid rgba(0,212,255,.3); }
.narrative-cool { background: var(--bg2); color: var(--text-lo); border: 1px solid var(--border); }
.narr-score {
  background: rgba(0,0,0,.3); padding: 1px 5px; border-radius: 10px;
  font-size: 10px;
}

/* ─── Tokenomics ─── */
.tok-meter-wrap { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.tok-meter {
  flex: 1; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden;
}
.tok-meter-fill { height: 100%; border-radius: 5px; transition: width .6s; }
.tok-score { font-family: var(--mono); font-size: 14px; font-weight: 700; width: 52px; text-align: right; flex-shrink: 0; }

/* ─── On-Chain ─── */
.onchain-scores-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px;
}
.onchain-stat { }
.os-label { font-size: 10px; color: var(--text-lo); margin-bottom: 4px; }
.os-val   { font-family: var(--mono); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.os-bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.os-bar-fill  { height: 100%; border-radius: 3px; transition: width .6s; }

/* ─── Risk Dashboard ─── */
.risk-meter-wrap { margin-bottom: 4px; }
.risk-meter {
  height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; margin: 6px 0;
}
.risk-meter-fill { height: 100%; border-radius: 5px; transition: width .6s; }

/* ─── Hub News ─── */
.hub-news-item {
  display: block; text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .15s;
}
.hub-news-item:last-child { border-bottom: none; }
.hub-news-item:hover { opacity: .75; }
.hub-news-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.hub-news-impact {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px;
  flex-shrink: 0;
}
.hub-news-impact.green  { background: var(--green-d); color: var(--green); }
.hub-news-impact.red    { background: var(--red-d); color: var(--red); }
.hub-news-impact.neutral-text { background: var(--bg2); color: var(--text-lo); }
.hub-news-source {
  font-size: 10px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .04em; flex: 1;
}
.hub-news-time   { font-size: 10px; color: var(--text-lo); white-space: nowrap; }
.hub-news-title  { font-size: 12px; color: var(--text); line-height: 1.4; }

/* ─── AI Chat ─── */
.hub-chat-card { padding: 18px; }
.chat-messages {
  min-height: 180px; max-height: 360px;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.chat-msg { display: flex; }
.chat-msg.user      { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; }

.chat-bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.55;
}
.chat-msg.user .chat-bubble {
  background: var(--accent-d);
  border: 1px solid rgba(0,212,255,.25);
  color: var(--text-hi);
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-bubble {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-src { display: block; font-size: 10px; color: var(--text-lo); margin-top: 4px; }

.chat-input-row {
  display: flex; gap: 8px;
}
.chat-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  padding: 9px 13px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-lo); }

.btn-chat-send {
  padding: 9px 18px;
  background: var(--accent-d);
  border: 1px solid rgba(0,212,255,.3);
  border-radius: var(--r-sm);
  color: var(--accent);
  font-size: 13px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}
.btn-chat-send:hover { background: rgba(0,212,255,.2); }

/* color helpers for hub */
.green { color: var(--green); }
.red   { color: var(--red); }
.gold  { color: var(--gold); }

/* ═══════════════════════════════════════════════════════
   ADVANCED TECHNICAL ANALYSIS (Calculator page)
═══════════════════════════════════════════════════════ */
.adv-score-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.adv-score-badge {
  flex-shrink: 0;
  width: 60px; height: 60px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-family: var(--mono); font-size: 20px; font-weight: 700;
  line-height: 1;
}
.adv-score-badge small { font-size: 9px; font-weight: 400; color: var(--text-lo); }
.adv-score-title { font-size: 13px; font-weight: 700; color: var(--text-hi); }
.adv-score-sub   { font-size: 11px; color: var(--text-lo); margin-top: 2px; }

.adv-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.adv-metric {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.adv-m-label { font-size: 10px; color: var(--text-lo); text-transform: uppercase; letter-spacing: .04em; }
.adv-m-val   { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text-hi); }
.adv-m-val small { font-size: 10px; opacity: .8; font-weight: 400; }
.adv-m-val.green  { color: var(--green); }
.adv-m-val.red    { color: var(--red); }
.adv-m-val.accent { color: var(--accent); }
.adv-m-val.gold   { color: var(--gold); }

.adv-divider { height: 1px; background: var(--border); margin: 12px 0; }

.adv-sr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adv-sr-head {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 6px;
}
.adv-sr-head.green { color: var(--green); }
.adv-sr-head.red   { color: var(--red); }
.adv-sr-lvl {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 3px 0;
}
.adv-sr-lvl.green { color: var(--green); }
.adv-sr-lvl.red   { color: var(--red); }
.adv-sr-lvl.muted { color: var(--text-lo); }

.adv-signals { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 560px) {
  .adv-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   3D GLASSMORPHISM DESIGN SYSTEM
═══════════════════════════════════════════════════════ */

/* ─── Cards: layered glass depth ─── */
.card {
  background: linear-gradient(
    148deg,
    rgba(25,40,72,0.82) 0%,
    rgba(15,24,40,0.96) 35%,
    rgba(8,12,22,1) 100%
  );
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.055),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 2px 6px rgba(0,0,0,0.35),
    0 10px 28px rgba(0,0,0,0.45),
    0 28px 56px rgba(0,0,0,0.18);
  transition: border-color .28s, box-shadow .32s, transform .32s;
}
.card:hover {
  border-color: rgba(0,212,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 4px 12px rgba(0,0,0,0.38),
    0 16px 40px rgba(0,0,0,0.52),
    0 0 0 1px rgba(0,212,255,0.07),
    0 0 48px rgba(0,212,255,0.06);
  transform: translateY(-2px);
}

/* ─── Accent bar before card headings ─── */
.card-heading::before {
  content: '';
  display: inline-block;
  width: 3px; height: 14px;
  margin-right: 9px;
  vertical-align: -2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), #7C3AED);
  box-shadow: 0 0 10px rgba(0,212,255,0.55);
}
.card-heading .heading-sub::before { content: none; }

/* ─── Primary buttons: glow lift ─── */
.btn-analyze, .btn-hub-analyze, .btn-analyze-once {
  box-shadow: 0 4px 16px rgba(0,212,255,.28), 0 1px 4px rgba(0,0,0,.5);
  transition: opacity .2s, transform .15s, box-shadow .22s;
}
.btn-analyze:hover, .btn-hub-analyze:hover, .btn-analyze-once:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,212,255,.44), 0 2px 8px rgba(0,0,0,.4);
  opacity: 1;
}

/* ─── Page tabs: glow on active ─── */
.page-tab { transition: color .2s, border-color .2s, background .2s; }
.page-tab.active { text-shadow: 0 0 18px rgba(0,212,255,.4); }

/* ─── Score ring: multi-layer neon glow ─── */
.score-ring {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 20px -2px var(--score-color, var(--accent)),
    0 0 60px -10px var(--score-color, var(--accent)),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.3);
}

/* ─── Hub card fade-in ─── */
.hub-inner-card, .adv-tech-card { animation: cardFade .38s ease both; }
@keyframes cardFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ─── WHY FUTUREX STRIP ─── */
.why-strip {
  background: linear-gradient(90deg,
    rgba(0,212,255,0.04) 0%,
    rgba(124,58,237,0.04) 50%,
    rgba(0,212,255,0.04) 100%
  );
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.why-strip::-webkit-scrollbar { display: none; }
.why-inner {
  display: flex; align-items: center;
  max-width: 1400px; margin: 0 auto;
  min-height: 58px; gap: 0;
}
.why-feat {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px; flex-shrink: 0;
  cursor: default; border-radius: var(--r-sm);
  transition: background .2s;
}
.why-feat:hover { background: rgba(0,212,255,0.06); }
.why-icon-wrap {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.wi-accent { background: rgba(0,212,255,0.12); border: 1px solid rgba(0,212,255,0.22); }
.wi-purple { background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.22); }
.wi-green  { background: rgba(0,232,135,0.12); border: 1px solid rgba(0,232,135,0.22); }
.wi-gold   { background: rgba(255,184,0,0.12); border: 1px solid rgba(255,184,0,0.22); }
.wi-red    { background: rgba(255,61,61,0.12); border: 1px solid rgba(255,61,61,0.22); }
.why-title {
  font-size: 12px; font-weight: 700; color: var(--text-hi);
  margin: 0 0 1px; white-space: nowrap; letter-spacing: .01em;
}
.why-sub {
  font-size: 10px; color: var(--text-lo);
  margin: 0; white-space: nowrap;
}
.why-sep {
  width: 1px; height: 28px; background: rgba(255,255,255,0.07);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   HERO  (premium landing band)
═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(900px 320px at 18% -10%, rgba(79,140,255,0.16), transparent 60%),
    radial-gradient(760px 300px at 92% 0%, rgba(139,92,246,0.14), transparent 60%),
    linear-gradient(180deg, rgba(19,26,42,0.6), rgba(11,15,25,0));
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.03) 1px, transparent 0);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1400px; margin: 0 auto;
  padding: 40px 20px 36px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px;
  align-items: center;
}
@media (max-width: 940px) { .hero-inner { grid-template-columns: 1fr; gap: 26px; padding: 30px 20px; } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--primary);
  background: var(--primary-d);
  border: 1px solid rgba(79,140,255,0.28);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 18px;
}
.hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: fresh-pulse 2s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800; line-height: 1.05; letter-spacing: -.02em;
  color: var(--text-hi); margin-bottom: 16px;
}
.grad-text {
  background: linear-gradient(100deg, var(--primary) 0%, var(--accent) 45%, var(--ai) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub {
  font-size: 15px; line-height: 1.65; color: var(--text);
  max-width: 560px; margin-bottom: 24px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.btn-hero-primary {
  padding: 13px 26px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #6AA0FF);
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 26px rgba(79,140,255,.38), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s, box-shadow .2s;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(79,140,255,.5); }
.btn-hero-ghost {
  padding: 13px 24px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  color: var(--text-hi); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.btn-hero-ghost:hover { border-color: var(--ai); background: var(--ai-d); transform: translateY(-2px); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-chip {
  font-size: 11px; font-weight: 600; color: var(--text-lo);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 20px;
}

/* Hero live-metric cards (3D glass) */
.hero-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.hero-metric {
  background: linear-gradient(150deg, rgba(31,46,82,0.75), rgba(15,22,38,0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 10px 30px rgba(0,0,0,0.4);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.hero-metric:hover {
  transform: translateY(-3px);
  border-color: rgba(79,140,255,0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 16px 40px rgba(0,0,0,0.5), 0 0 36px rgba(79,140,255,0.1);
}
.hm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.hm-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: var(--primary-d);
  border: 1px solid rgba(79,140,255,0.25);
}
.hm-label { font-size: 11px; font-weight: 600; color: var(--text-lo); letter-spacing: .02em; }
.hm-value {
  font-family: var(--mono); font-size: 26px; font-weight: 800;
  color: var(--text-hi); line-height: 1.1;
}
.hm-value.green { color: var(--green); }
.hm-value.red   { color: var(--red); }
.hm-value.gold  { color: var(--gold); }
.hm-sub { font-size: 11px; color: var(--text-lo); margin-top: 3px; }
.hm-sub.green { color: var(--green); }
.hm-sub.red   { color: var(--red); }
@media (max-width: 420px) { .hero-metrics { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
═══════════════════════════════════════════════════════ */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: rgba(15,22,38,0.94);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.45);
    padding: 6px 8px env(safe-area-inset-bottom, 6px);
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; cursor: pointer;
    color: var(--text-lo); padding: 6px 0;
    transition: color .2s;
  }
  .bn-ico { font-size: 19px; line-height: 1; opacity: .8; transition: opacity .2s, transform .2s; }
  .bn-lbl { font-size: 10px; font-weight: 600; }
  .bn-item.active { color: var(--primary); }
  .bn-item.active .bn-ico { opacity: 1; transform: translateY(-1px); }
  /* keep content clear of the fixed nav */
  body { padding-bottom: 64px; }
  .footer { margin-bottom: 56px; }
}

/* ═══════════════════════════════════════════════════════
   AI INTELLIGENCE DASHBOARD  (Hub centerpiece)
═══════════════════════════════════════════════════════ */
.hub-score-card {
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(79,140,255,0.10), transparent 60%),
    radial-gradient(600px 220px at 100% 0%, rgba(139,92,246,0.10), transparent 60%),
    linear-gradient(150deg, rgba(31,46,82,0.55), rgba(15,22,38,0.96));
  border: 1px solid rgba(255,255,255,0.09);
}
.aidash-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.aidash-head .card-heading { margin-bottom: 0; }
.aidash-badge {
  font-size: 10px; font-weight: 600; letter-spacing: .03em;
  color: var(--primary);
  background: var(--primary-d); border: 1px solid rgba(79,140,255,0.25);
  padding: 4px 10px; border-radius: 20px;
}

.aidash-top {
  display: grid; grid-template-columns: 220px 1fr; gap: 26px;
  align-items: center;
}
@media (max-width: 720px) { .aidash-top { grid-template-columns: 1fr; gap: 18px; } }

.aidash-ring-col {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.aidash-verdict {
  font-size: 17px; font-weight: 800; letter-spacing: .04em;
  padding: 8px 20px; border-radius: 12px; text-align: center; white-space: nowrap;
}
.verdict-bull { color: var(--green); background: var(--green-d); border: 1px solid rgba(0,230,118,0.35); box-shadow: 0 0 26px rgba(0,230,118,0.15); }
.verdict-bear { color: var(--red);   background: var(--red-d);   border: 1px solid rgba(255,82,82,0.35); box-shadow: 0 0 26px rgba(255,82,82,0.15); }
.verdict-neu  { color: var(--gold);  background: var(--gold-d);  border: 1px solid rgba(255,184,0,0.35); }

.aidash-main { min-width: 0; }
.aidash-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px;
}
@media (max-width: 620px) { .aidash-stats { grid-template-columns: 1fr 1fr; } }
.aidash-stat {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.ad-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-lo); margin-bottom: 6px; }
.ad-stat-val { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--text-hi); line-height: 1.05; }
.ad-stat-val.green { color: var(--green); } .ad-stat-val.red { color: var(--red); }
.ad-stat-val.gold { color: var(--gold); } .ad-stat-val.accent { color: var(--accent); }
.ad-stat-sub { font-size: 10px; color: var(--text-lo); margin-top: 4px; }

.prob-title { font-size: 12px; font-weight: 700; color: var(--text-hi); margin-bottom: 10px; }
.prob-bars { display: flex; flex-direction: column; gap: 7px; }
.prob-row { display: flex; align-items: center; gap: 10px; }
.prob-lbl { font-size: 11px; font-weight: 600; width: 96px; flex-shrink: 0; }
.prob-lbl.bull { color: var(--green); } .prob-lbl.bear { color: var(--red); } .prob-lbl.neu { color: var(--text-lo); }
.prob-track { flex: 1; height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; }
.prob-fill { height: 100%; border-radius: 5px; transition: width .6s ease; }
.prob-fill.bull { background: linear-gradient(90deg, #00b85e, var(--green)); }
.prob-fill.bear { background: linear-gradient(90deg, #e03b3b, var(--red)); }
.prob-fill.neu  { background: linear-gradient(90deg, #c79410, var(--gold)); }
.prob-pct { font-family: var(--mono); font-size: 12px; font-weight: 700; width: 38px; text-align: right; flex-shrink: 0; color: var(--text-hi); }

.aidash-breakdown { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════
   AI ENSEMBLE FORECAST CARD
═══════════════════════════════════════════════════════ */
.hub-ensemble-card {
  padding: 22px 24px;
  background:
    radial-gradient(600px 180px at 0% 100%, rgba(0,212,255,0.06), transparent 60%),
    radial-gradient(400px 160px at 100% 0%, rgba(139,92,246,0.07), transparent 55%),
    linear-gradient(160deg, rgba(31,46,82,0.5), rgba(10,18,35,0.96));
  border: 1px solid rgba(255,255,255,0.07);
}

/* Signal badge */
.enm-signal-badge {
  font-size: 13px; font-weight: 800; letter-spacing: .07em;
  padding: 5px 18px; border-radius: 10px;
}
.enm-sig-green { color: var(--green); background: var(--green-d); border: 1px solid rgba(0,230,118,0.3); }
.enm-sig-red   { color: var(--red);   background: var(--red-d);   border: 1px solid rgba(255,82,82,0.3); }
.enm-sig-gold  { color: var(--gold);  background: var(--gold-d);  border: 1px solid rgba(255,184,0,0.3); }

/* Top layout: score dial + meta */
.enm-top {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px; align-items: start; margin-bottom: 20px;
}
@media (max-width: 700px) { .enm-top { grid-template-columns: 1fr; } }

/* Score column */
.enm-score-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.enm-score-num {
  font-family: var(--mono); font-size: 46px; font-weight: 800;
  line-height: 1; letter-spacing: -.02em;
}
.enm-score-sublabel { font-size: 10px; color: var(--text-lo); text-align: center; }

/* Score meter (−1 to +1 as thermometer) */
.enm-meter { width: 100%; padding: 0 4px; }
.enm-meter-track {
  position: relative; width: 100%; height: 8px;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 45%, var(--gold) 55%, var(--green) 100%);
  border-radius: 4px; opacity: 0.85; margin-bottom: 4px;
}
.enm-meter-marker {
  position: absolute; top: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.95);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0,0,0,0.7), 0 0 14px currentColor;
}
.enm-meter-labels {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--text-lo);
}

/* Meta column */
.enm-meta { display: flex; flex-direction: column; gap: 7px; }
.enm-meta-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid rgba(26,37,64,0.5); font-size: 12px;
}
.enm-meta-row:last-of-type { border-bottom: none; }
.enm-meta-label { color: var(--text-lo); }
.enm-meta-val   { font-family: var(--mono); font-weight: 600; }
.enm-meta-val.green { color: var(--green); }
.enm-meta-val.red   { color: var(--red);   }
.enm-meta-val.gold  { color: var(--gold);  }

/* Confidence bar */
.enm-conf-track {
  width: 100%; height: 6px;
  background: var(--border); border-radius: 3px; overflow: hidden;
}
.enm-conf-fill {
  height: 100%; border-radius: 3px; transition: width .6s;
}
.enm-conf-fill.green { background: linear-gradient(90deg, #009944, var(--green)); }
.enm-conf-fill.gold  { background: linear-gradient(90deg, #c79410, var(--gold)); }
.enm-conf-fill.red   { background: linear-gradient(90deg, #c02828, var(--red)); }

/* Indicator chips */
.enm-chips { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 4px; }
.enm-chip {
  font-size: 10px; font-family: var(--mono);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px; color: var(--text-lo);
}

/* Model breakdown */
.enm-bd-head {
  display: grid; grid-template-columns: 10px 1fr 1fr 64px 42px;
  gap: 10px; padding: 4px 0 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-lo);
}
.enm-rows { display: flex; flex-direction: column; gap: 6px; }
.enm-row {
  display: grid; grid-template-columns: 10px 1fr 1fr 64px 42px;
  gap: 10px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(26,37,64,0.4);
}
.enm-row:last-child { border-bottom: none; }
.enm-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.enm-model-info { min-width: 0; }
.enm-model-name { font-size: 12px; font-weight: 600; color: var(--text-hi); }
.enm-model-desc { font-size: 10px; color: var(--text-lo); margin-top: 1px; }
.enm-bar-wrap   { flex: 1; min-width: 0; }
.enm-bar-track  {
  position: relative; height: 8px;
  background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden;
}
.enm-bar-center {
  position: absolute; top: 0; left: 50%; width: 1px; height: 100%;
  background: rgba(255,255,255,0.2); z-index: 1;
}
.enm-bar-fill {
  position: absolute; top: 0; height: 100%; border-radius: 2px;
  transition: left .6s, width .6s;
}
.enm-bar-fill.bull { background: linear-gradient(90deg, rgba(0,230,118,0.45), var(--green)); }
.enm-bar-fill.bear { background: linear-gradient(270deg, rgba(255,82,82,0.45), var(--red)); }
.enm-bar-fill.neu  { background: var(--gold); opacity: 0.55; }
.enm-pct {
  font-size: 12px; font-family: var(--mono); font-weight: 700;
  text-align: right;
}
.enm-pct.green { color: var(--green); }
.enm-pct.red   { color: var(--red); }
.enm-weight { font-size: 11px; color: var(--text-lo); text-align: right; font-family: var(--mono); }

/* Real-AI vs Statistical badges */
.enm-real-badge {
  font-size: 9px;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}
.enm-stat-badge {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-lo);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}

/* Chart */
.enm-chart-section { margin-top: 4px; }
.enm-chart-title { font-size: 12px; font-weight: 700; color: var(--text-hi); margin-bottom: 8px; }
.enm-canvas-wrap { position: relative; height: 210px; }

/* ═══════════════════════════════════════════════════════
   TRADE PROBABILITY ENGINE  (Phase 3)
═══════════════════════════════════════════════════════ */
.hub-tpe-card {
  background:
    radial-gradient(640px 220px at 100% 0%, rgba(139,92,246,0.08), transparent 60%),
    linear-gradient(150deg, rgba(31,46,82,0.5), rgba(15,22,38,0.96));
  border: 1px solid rgba(255,255,255,0.08);
}
.tpe-top {
  display: grid; grid-template-columns: minmax(240px, 1fr) 1fr; gap: 22px;
  align-items: center; margin-bottom: 6px;
}
@media (max-width: 760px) { .tpe-top { grid-template-columns: 1fr; } }

.tpe-radar-wrap { position: relative; height: 260px; }
.tpe-radar-cap {
  text-align: center; font-size: 10px; color: var(--text-lo);
  margin-top: 6px; font-style: italic;
}
.tpe-proj { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tpe-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-lo);
  margin: 18px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.tpe-factors { display: flex; flex-direction: column; gap: 7px; }
.tpe-factor { display: flex; align-items: center; gap: 10px; }
.tpe-f-lbl { font-size: 11px; color: var(--text-lo); width: 104px; flex-shrink: 0; font-weight: 600; }
.tpe-f-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.tpe-f-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.tpe-f-val { font-family: var(--mono); font-size: 12px; font-weight: 700; width: 30px; text-align: right; flex-shrink: 0; }
.tpe-f-val.green { color: var(--green); }
.tpe-f-val.red   { color: var(--red); }
.tpe-f-val.gold  { color: var(--gold); }

/* ═══════════════════════════════════════════════════════
   PHASE 4 — Futures analytics / Whale / Liquidation
═══════════════════════════════════════════════════════ */
.est-badge, .live-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.est-badge  { color: var(--gold); background: var(--gold-d); border: 1px solid rgba(255,184,0,0.3); }
.live-badge { color: var(--green); background: var(--green-d); border: 1px solid rgba(0,230,118,0.3); }

/* ─── Liquidation Heatmap ─── */
.hub-liq-card {
  background:
    radial-gradient(640px 200px at 0% 0%, rgba(255,82,82,0.06), transparent 60%),
    radial-gradient(640px 200px at 100% 0%, rgba(0,230,118,0.06), transparent 60%),
    linear-gradient(150deg, rgba(31,46,82,0.5), rgba(15,22,38,0.96));
  border: 1px solid rgba(255,255,255,0.08);
}
.liq-summary {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 560px) { .liq-summary { grid-template-columns: 1fr; } }
.liq-sum-item {
  background: rgba(255,255,255,0.025); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; text-align: center;
}
.liq-sum-lbl { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-lo); margin-bottom: 5px; }
.liq-sum-lbl.green { color: var(--green); } .liq-sum-lbl.red { color: var(--red); }
.liq-sum-val { font-family: var(--mono); font-size: 15px; font-weight: 800; }
.liq-sum-val.green { color: var(--green); } .liq-sum-val.red { color: var(--red); } .liq-sum-val.accent { color: var(--accent); }

.liq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .liq-grid { grid-template-columns: 1fr; gap: 16px; } }
.liq-side-label { font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.liq-side-label.green { color: var(--green); } .liq-side-label.red { color: var(--red); }
.liq-ladder { display: flex; flex-direction: column; gap: 5px; }
.liq-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 10px; align-items: center; }
.liq-price { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.liq-price.green { color: var(--green); } .liq-price.red { color: var(--red); }
.liq-bar-track { height: 15px; background: rgba(255,255,255,0.04); border-radius: 4px; overflow: hidden; }
.liq-bar { height: 100%; border-radius: 4px; transition: width .6s ease; }
.liq-bar.long  { background: linear-gradient(90deg, rgba(255,82,82,0.45), var(--red)); }
.liq-bar.short { background: linear-gradient(90deg, rgba(0,230,118,0.45), var(--green)); }
.liq-meta { font-size: 10px; color: var(--text-lo); white-space: nowrap; font-family: var(--mono); }

/* ─── Whale Intelligence ─── */
.whale-verdict-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.whale-verdict { font-size: 14px; font-weight: 800; letter-spacing: .03em; padding: 5px 14px; border-radius: 10px; }
.whale-flow-note { font-size: 11px; color: var(--text-lo); }
.whale-timeline { display: flex; flex-direction: column; gap: 8px; }
.whale-sig { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.45; }
.whale-sig-ico {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.whale-sig-ico.green { color: var(--green); border-color: rgba(0,230,118,0.3); }
.whale-sig-ico.red   { color: var(--red);   border-color: rgba(255,82,82,0.3); }
.whale-sig-ico.gold  { color: var(--gold);  border-color: rgba(255,184,0,0.3); }
.whale-sig-ico.neutral-text { color: var(--text-lo); }
.whale-sig-txt { color: var(--text); padding-top: 2px; }

/* ═══════════════════════════════════════════════════════
   PHASE 5 — Wizard / Trade Coach / Progress checklist
═══════════════════════════════════════════════════════ */

/* ─── Calculator wizard ─── */
.wiz-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.wiz-head .card-heading { margin-bottom: 0; }
.wiz-steps { display: flex; align-items: center; gap: 6px; }
.wiz-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  background: var(--bg2); border: 1px solid var(--border2); color: var(--text-lo);
  transition: all .25s;
}
.wiz-dot.active { background: var(--primary-d); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 12px rgba(79,140,255,.3); }
.wiz-dot.done   { background: var(--green-d); border-color: var(--green); color: var(--green); }
.wiz-dot.done::before { content: '✓'; }
.wiz-dot.done { font-size: 0; }
.wiz-dot.done::before { font-size: 12px; }

.wiz-step { display: none; animation: cardFade .3s ease both; }
.wiz-step.active { display: block; }
.wiz-step-title { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .03em; margin-bottom: 12px; }
.wiz-coin { width: 100%; }

.wiz-nav { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.wiz-back, .wiz-next {
  padding: 11px 20px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 14px; font-weight: 700; transition: all .18s;
}
.wiz-back { background: var(--bg2); border: 1px solid var(--border2); color: var(--text-lo); }
.wiz-back:hover { border-color: var(--text-lo); color: var(--text); }
.wiz-next { flex: 1; background: linear-gradient(135deg, var(--primary), #6AA0FF); border: none; color: #fff; box-shadow: 0 4px 14px rgba(79,140,255,.3); }
.wiz-next:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,140,255,.42); }
.wiz-nav .btn-analyze { flex: 1; margin-top: 0; }

/* ─── AI Trade Coach ─── */
.coach-grade { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }
.coach-grade.green { color: var(--green); background: var(--green-d); border: 1px solid rgba(0,230,118,.3); }
.coach-grade.gold  { color: var(--gold);  background: var(--gold-d);  border: 1px solid rgba(255,184,0,.3); }
.coach-grade.red   { color: var(--red);   background: var(--red-d);   border: 1px solid rgba(255,82,82,.3); }
.coach-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.coach-tip { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; padding: 9px 11px; border-radius: var(--r-sm); }
.coach-tip.green { background: var(--green-d); border: 1px solid rgba(0,230,118,.22); color: var(--text); }
.coach-tip.gold  { background: var(--gold-d);  border: 1px solid rgba(255,184,0,.22); color: var(--text); }
.coach-tip.red   { background: var(--red-d);   border: 1px solid rgba(255,82,82,.22); color: var(--text); }
.coach-ico { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.coach-tip.green .coach-ico { background: var(--green); color: #04231a; }
.coach-tip.gold  .coach-ico { background: var(--gold);  color: #2a1f00; }
.coach-tip.red   .coach-ico { background: var(--red);   color: #2a0808; }

/* ─── Hub progress checklist ─── */
.hub-progress { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hub-prog-step {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; color: var(--text-lo);
  background: var(--bg2); border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 20px; transition: all .25s;
}
.hub-prog-step .hp-ico { font-size: 11px; display: inline-flex; }
.hub-prog-step.active { color: var(--primary); border-color: rgba(79,140,255,.4); background: var(--primary-d); }
.hub-prog-step.done { color: var(--green); border-color: rgba(0,230,118,.35); background: var(--green-d); }
.hp-spin { width: 11px; height: 11px; border: 2px solid var(--border2); border-top-color: var(--primary); border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }

/* ═══════════════════════════════════════════════════════
   PHASE 6 — News intelligence / Sentiment engine / Narratives
═══════════════════════════════════════════════════════ */

/* ─── News Impact: affected assets + auto-summary ─── */
.news-assets { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 3px; }
.news-asset-chip {
  font-size: 9px; font-weight: 700; letter-spacing: .03em;
  color: var(--primary); background: var(--primary-d);
  border: 1px solid rgba(79,140,255,.28);
  padding: 1px 7px; border-radius: 10px;
}
.news-summary { font-size: 11px; color: var(--text-lo); line-height: 1.45; font-style: italic; margin-top: 2px; }

/* ─── Sentiment Engine dimension bars ─── */
.sent-dims { display: flex; flex-direction: column; gap: 10px; }
.sent-dim.overall { padding-top: 10px; border-top: 1px dashed var(--border2); }
.sent-dim-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sent-dim-lbl { font-size: 12px; font-weight: 600; color: var(--text); }
.sent-dim.overall .sent-dim-lbl { font-weight: 800; color: var(--text-hi); }
.est-mini {
  font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gold); background: var(--gold-d); border: 1px solid rgba(255,184,0,.3);
  padding: 0 5px; border-radius: 8px; vertical-align: middle;
}
.sent-dim-val { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.sent-dim-val.green { color: var(--green); } .sent-dim-val.red { color: var(--red); } .sent-dim-val.gold { color: var(--gold); }
.sent-dim-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.sent-dim-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.sent-dim-src { font-size: 9px; color: var(--text-lo); margin-top: 3px; }

/* ─── Narrative momentum ─── */
.narr-mo { font-size: 9px; font-weight: 700; padding: 0 5px; border-radius: 8px; margin-left: 2px; }
.narr-mo.up   { color: var(--green); background: var(--green-d); }
.narr-mo.down { color: var(--red);   background: var(--red-d); }
.narr-mo.flat { color: var(--text-lo); background: rgba(255,255,255,.04); }

/* ═══════════════════════════════════════════════════════
   PHASE 7 — Education / Mobile polish / Performance
═══════════════════════════════════════════════════════ */

/* ─── Education view ─── */
.edu-view { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.edu-hero { text-align: center; margin-bottom: 24px; }
.edu-title {
  font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em;
  color: var(--text-hi); margin-bottom: 10px;
}
.edu-sub { font-size: 14px; color: var(--text-lo); max-width: 620px; margin: 0 auto; line-height: 1.6; }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .edu-grid { grid-template-columns: 1fr; } }
.edu-card { }
.edu-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.edu-list li {
  position: relative; padding-left: 22px; font-size: 13px; line-height: 1.55; color: var(--text);
}
.edu-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.edu-list-bad li::before { content: '✕'; color: var(--red); }
.edu-list strong { color: var(--text-hi); }
.edu-gloss { display: flex; flex-direction: column; gap: 8px; }
.edu-gloss dt { font-size: 12px; font-weight: 700; color: var(--primary); }
.edu-gloss dd { font-size: 12px; color: var(--text-lo); line-height: 1.5; margin: 2px 0 6px; }

/* ─── Sticky mobile analyze button ─── */
.mobile-analyze { display: none; }
@media (max-width: 760px) {
  .mobile-analyze.show {
    display: block;
    position: fixed; left: 16px; right: 16px; bottom: 74px; z-index: 190;
    padding: 14px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #6AA0FF);
    color: #fff; font-size: 15px; font-weight: 800;
    box-shadow: 0 8px 26px rgba(79,140,255,.45);
  }
}

/* ─── Mobile polish ─── */
@media (max-width: 760px) {
  /* Swipeable card decks for the Hub grids */
  .hub-grid-3, .hub-grid-2 {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -20px; padding: 0 20px;
  }
  .hub-grid-3::-webkit-scrollbar, .hub-grid-2::-webkit-scrollbar { display: none; }
  .hub-grid-3 > .card, .hub-grid-2 > .card {
    scroll-snap-align: center; flex: 0 0 86%; min-width: 86%;
  }
  /* Larger tap targets */
  .hz-btn, .thresh-btn, .risk-btn { min-height: 38px; }
  .dir-btn { padding: 12px 0; }
  .page-tab { padding: 12px 16px; font-size: 12px; }
  /* Responsive chart heights */
  .chart-wrap { height: 240px; }
  .tpe-radar-wrap { height: 230px; }
  /* Hero metrics stack to 2-up comfortably */
  .hero-inner { padding-top: 24px; }
}

/* ═══════════════════════════════════════════════════════
   AI PORTFOLIO INTELLIGENCE  (health, summary, scenario,
   rebalancing, daily briefing, floating copilot)
═══════════════════════════════════════════════════════ */

/* Shared AI badges */
.ai-chip, .ph-ai-badge, .ph-status {
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 20px; text-transform: uppercase;
}
.ai-chip {
  color: #fff; background: linear-gradient(135deg, var(--ai), var(--primary));
  box-shadow: 0 2px 10px rgba(139,92,246,.4);
}
.ph-ai-badge {
  color: var(--ai); background: var(--ai-d);
  border: 1px solid rgba(139,92,246,.35); padding: 2px 7px; margin-right: 6px;
}
.ph-status.green { color: var(--green); background: var(--green-d); border: 1px solid rgba(0,230,118,.3); }
.ph-status.gold  { color: var(--gold);  background: var(--gold-d);  border: 1px solid rgba(255,184,0,.3); }
.ph-status.red   { color: var(--red);   background: var(--red-d);   border: 1px solid rgba(255,82,82,.3); }

/* ─── FEATURE 1: Portfolio Health Score ─── */
.health-card { margin-bottom: 16px; }
.ph-body {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  padding: 6px 0 4px;
}
.ph-gauge-col { display: flex; justify-content: center; }
.ph-gauge-wrap { position: relative; width: 158px; height: 158px; }
.ph-gauge { display: block; }
.ph-gauge-bg { fill: none; stroke: var(--border2); stroke-width: 11; opacity: .55; }
.ph-gauge-fg {
  fill: none; stroke-width: 11; stroke-linecap: round;
  transition: stroke-dashoffset 1.05s cubic-bezier(.22,1,.36,1);
  filter: drop-shadow(0 0 6px rgba(0,212,255,.35));
}
.ph-gauge-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.ph-score { font-family: var(--mono); font-size: 42px; font-weight: 700; line-height: 1; }
.ph-score-max { font-size: 12px; color: var(--text-lo); margin-top: 2px; }
.ph-subs { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ph-sub { display: grid; grid-template-columns: 116px 1fr 34px; align-items: center; gap: 10px; }
.ph-sub-l { font-size: 12px; color: var(--text); }
.ph-sub-track { height: 8px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.ph-sub-fill { height: 100%; border-radius: 5px; transition: width .9s cubic-bezier(.22,1,.36,1); }
.ph-sub-v { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-hi); text-align: right; }
.ph-ai {
  margin-top: 18px; padding: 13px 15px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(79,140,255,.05));
  border: 1px solid rgba(139,92,246,.2);
  font-size: 13px; line-height: 1.6; color: var(--text);
}

/* ─── FEATURE 2: AI Portfolio Analysis ─── */
.aip-card { margin-bottom: 16px; }
.aip-summary {
  font-size: 14.5px; line-height: 1.7; color: var(--text-hi);
  padding: 4px 0 14px;
}
.aip-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border);
}
.aip-conf { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.aip-conf-l { font-size: 11px; color: var(--text-lo); white-space: nowrap; }
.aip-conf-track { flex: 1; max-width: 200px; height: 7px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.aip-conf-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--ai), var(--primary)); transition: width 1s ease; }
.aip-conf-v { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--ai); }
.aip-updated { font-size: 11px; color: var(--text-lo); }

/* ─── FEATURE 3: Scenario Simulator ─── */
.scenario-card { margin-bottom: 16px; }
.scen-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 6px 0 14px; }
.scen-chip {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; text-align: left;
  background: var(--bg2); border: 1px solid var(--border); transition: all .18s;
}
.scen-chip:hover { border-color: var(--border2); transform: translateY(-1px); }
.scen-chip.active { border-color: var(--primary); background: var(--primary-d); box-shadow: 0 0 0 1px var(--primary) inset; }
.scen-chip-l { font-size: 11.5px; font-weight: 600; color: var(--text); }
.scen-chip-v { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.scen-chip-v.up, .scen-asset-pnl.green, .scen-headline-v.green { color: var(--green); }
.scen-chip-v.down, .scen-asset-pnl.red, .scen-headline-v.red { color: var(--red); }
.scen-custom {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); margin-bottom: 14px;
}
.scen-custom-l { font-size: 12px; color: var(--text-lo); }
.scen-custom-input {
  width: 78px; padding: 7px 10px; background: var(--bg); border: 1px solid var(--border2);
  border-radius: var(--r-sm); color: var(--text-hi); font-family: var(--mono); font-size: 13px;
}
.scen-custom-pct { font-size: 13px; color: var(--text-lo); margin-left: -4px; }
.scen-custom-btn {
  margin-left: auto; padding: 8px 16px; border: none; border-radius: var(--r-sm);
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}
.scen-custom-btn:hover { opacity: .9; }
.scen-head-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; align-items: center; }
.scen-headline-l { font-size: 12px; color: var(--text-lo); }
.scen-headline-v { font-family: var(--mono); font-size: 34px; font-weight: 700; line-height: 1.1; margin: 4px 0; }
.scen-headline-sub { font-size: 12px; color: var(--text); }
.scen-chart-wrap { height: 150px; }
.scen-assets { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.scen-asset { display: grid; grid-template-columns: 96px 1fr 92px; align-items: center; gap: 10px; }
.scen-asset-sym { font-size: 12px; font-weight: 600; color: var(--text-hi); }
.scen-asset-dir { font-size: 10px; font-family: var(--mono); margin-left: 3px; }
.scen-asset-dir.long { color: var(--green); }
.scen-asset-dir.short { color: var(--red); }
.scen-asset-bar { height: 8px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.scen-asset-fill { height: 100%; border-radius: 5px; transition: width .8s cubic-bezier(.22,1,.36,1); }
.scen-asset-fill.up { background: var(--green); }
.scen-asset-fill.down { background: var(--red); }
.scen-asset-pnl { font-family: var(--mono); font-size: 12px; font-weight: 600; text-align: right; }

/* ─── FEATURE 4: Rebalancing ─── */
.rebalance-card { margin-bottom: 16px; }
.reb-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 18px; align-items: start; margin: 6px 0 4px; }
.reb-chart-col { text-align: center; }
.reb-chart-title { font-size: 12px; font-weight: 700; color: var(--text-lo); margin-bottom: 8px; }
.reb-chart-wrap { height: 168px; }
.reb-table { display: flex; flex-direction: column; gap: 6px; }
.reb-row { display: grid; grid-template-columns: 1fr 44px 18px 52px 46px; align-items: center; gap: 6px; font-size: 12.5px; }
.reb-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-lo); padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.reb-sym { font-weight: 600; color: var(--text-hi); }
.reb-dir { font-size: 10px; margin-left: 4px; }
.reb-dir.long { color: var(--green); } .reb-dir.short { color: var(--red); }
.reb-cur { font-family: var(--mono); color: var(--text-lo); text-align: right; }
.reb-arrow { color: var(--text-lo); text-align: center; }
.reb-tgt { font-family: var(--mono); font-weight: 700; text-align: right; }
.reb-delta { font-family: var(--mono); font-size: 11px; text-align: right; }
.reb-delta.green { color: var(--green); } .reb-delta.red { color: var(--red); }
.reb-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.reb-metric { text-align: center; padding: 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.reb-metric-v { font-family: var(--mono); font-size: 19px; font-weight: 700; color: var(--text-hi); }
.reb-metric-l { font-size: 10.5px; color: var(--text-lo); margin-top: 3px; line-height: 1.3; }
.reb-ai {
  padding: 13px 15px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(79,140,255,.05));
  border: 1px solid rgba(139,92,246,.2); font-size: 13px; line-height: 1.6; color: var(--text);
}

/* ─── FEATURE 5: Daily AI Briefing ─── */
.briefing-card { margin-bottom: 16px; }
.brief-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.brief-stat { padding: 13px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.brief-stat-l { font-size: 11px; color: var(--text-lo); }
.brief-stat-v { font-size: 17px; font-weight: 800; margin: 4px 0 2px; }
.brief-stat-v.green { color: var(--green); } .brief-stat-v.red { color: var(--red); } .brief-stat-v.gold { color: var(--gold); }
.brief-stat-s { font-size: 11px; color: var(--text-lo); }
.brief-stat-gauge { height: 9px; background: var(--bg); border-radius: 5px; overflow: hidden; margin: 8px 0 6px; }
.brief-gauge-fill { height: 100%; border-radius: 5px; transition: width 1s ease; }
.brief-gauge-fill.green { background: var(--green); } .brief-gauge-fill.red { background: var(--red); } .brief-gauge-fill.gold { background: var(--gold); }
.brief-movers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.brief-mv-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brief-mv-l { font-size: 11px; color: var(--text-lo); width: 80px; flex-shrink: 0; }
.brief-mv-list { display: flex; gap: 6px; flex-wrap: wrap; }
.brief-mv { font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--bg2); }
.brief-mv.green { color: var(--green); } .brief-mv.red { color: var(--red); }
.brief-outlook {
  margin-top: 14px; padding: 13px 15px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(79,140,255,.05));
  border: 1px solid rgba(139,92,246,.2);
}
.brief-outlook-head { font-size: 12px; font-weight: 700; color: var(--text-hi); margin-bottom: 6px; }
.brief-outlook-text { font-size: 13px; line-height: 1.6; color: var(--text); }
.briefing-err { color: var(--text-lo); font-size: 13px; padding: 8px 0; }

/* ─── FEATURE 6: Zorion — AI Market Intelligence ─── */
.copilot {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  /* Zorion energy palette — overridden per cognitive state */
  --zc1: #5B8CFF;       /* primary energy   */
  --zc2: #8B5CF6;       /* secondary energy */
  --zc-core: #CFE6FF;   /* core highlight   */
  --zc-flow-dur: 7s;    /* energy rotation  */
  --zc-core-dur: 3.6s;  /* core breathing   */
  --zc-part-dur: 6s;    /* particle drift   */
  --zc-scan-op: 0;      /* scan-ring opacity */
}
/* ── Cognitive states (set by zorionSetState in app.js) ── */
.copilot.z-thinking  { --zc1:#22D3EE; --zc2:#4F8CFF; --zc-core:#DCF7FF; --zc-flow-dur:3s;   --zc-core-dur:1.5s; --zc-part-dur:3s;   --zc-scan-op:.9; }
.copilot.z-analyzing { --zc1:#00D4FF; --zc2:#7C5CFF; --zc-core:#D6F2FF; --zc-flow-dur:2.4s; --zc-core-dur:1.7s; --zc-part-dur:2.6s; --zc-scan-op:1; }
.copilot.z-confident { --zc1:#2BE5A6; --zc2:#FFC53D; --zc-core:#EAFFF5; --zc-flow-dur:5s;   --zc-core-dur:2.6s; --zc-part-dur:5s;   --zc-scan-op:0; }
.copilot.z-warning   { --zc1:#FF9A3D; --zc2:#FF4D5E; --zc-core:#FFE6D6; --zc-flow-dur:2.2s; --zc-core-dur:.62s; --zc-part-dur:2.4s; --zc-scan-op:.5; }
.copilot.z-speaking  { --zc1:#7AA8FF; --zc2:#B47BFF; --zc-core:#EAF2FF; --zc-flow-dur:3.4s; --zc-core-dur:.4s;  --zc-part-dur:3s;   --zc-scan-op:.3; }

/* 3-D glass sphere */
.copilot-orb {
  position: relative; width: 44px; height: 44px; border-radius: 50%; z-index: 2;
  background:
    /* Primary specular highlight — simulates a light source hitting glass */
    radial-gradient(circle at 27% 20%, rgba(255,255,255,.88) 0%, rgba(210,235,255,.45) 16%, transparent 36%),
    /* Secondary fill light from above */
    radial-gradient(circle at 55% 12%, rgba(130,190,255,.32) 0%, transparent 42%),
    /* Subtle rim light on right edge */
    radial-gradient(circle at 90% 52%, rgba(150,100,255,.28) 0%, transparent 28%),
    /* Core depth shadow at bottom-right */
    radial-gradient(circle at 68% 80%, rgba(0,0,30,.95) 0%, transparent 45%),
    /* Base sphere gradient — light center to very dark edge */
    radial-gradient(circle at 42% 38%, #2e2480 0%, #160f50 30%, #0a0730 58%, #040218 80%, #010109 100%);
  box-shadow:
    /* Crisp rim outline */
    0 0 0 1px rgba(110,150,255,.35),
    /* Coloured halo */
    0 0 22px rgba(79,140,255,.65),
    0 0 44px rgba(139,92,246,.30),
    /* Natural drop shadow */
    0 8px 32px rgba(0,0,0,.85),
    /* Inner top-light */
    inset 0 3px 8px rgba(160,210,255,.2),
    /* Inner bottom-shadow for depth */
    inset 0 -5px 14px rgba(0,0,50,.9);
  animation: orbBreath 3.8s ease-in-out infinite;
}
/* Sharp gloss ellipse — top-left quadrant, never spins */
.copilot-orb::after {
  content: ''; position: absolute;
  top: 7%; left: 10%; width: 52%; height: 40%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 36% 36%,
    rgba(255,255,255,.90) 0%,
    rgba(235,248,255,.50) 30%,
    rgba(180,225,255,.12) 60%,
    transparent 100%);
  filter: blur(1.5px); pointer-events: none;
}
.copilot-orb.sm {
  width: 26px; height: 26px;
  box-shadow: 0 0 0 1px rgba(110,150,255,.3), 0 0 12px rgba(79,140,255,.5), 0 0 24px rgba(139,92,246,.22),
    inset 0 2px 5px rgba(160,210,255,.18), inset 0 -3px 8px rgba(0,0,50,.8);
}
@keyframes orbBreath {
  0%,100% {
    box-shadow: 0 0 0 1px rgba(110,150,255,.35), 0 0 22px rgba(79,140,255,.65), 0 0 44px rgba(139,92,246,.30),
      0 8px 32px rgba(0,0,0,.85), inset 0 3px 8px rgba(160,210,255,.2), inset 0 -5px 14px rgba(0,0,50,.9);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(110,150,255,.5), 0 0 36px rgba(79,140,255,.88), 0 0 68px rgba(139,92,246,.48),
      0 10px 38px rgba(0,0,0,.75), inset 0 3px 10px rgba(160,210,255,.28), inset 0 -5px 14px rgba(0,0,50,.9);
  }
}

/* The inner .zc-gloss supplies the highlight; drop the legacy ::after gloss
   on orbs that now carry the full layer stack (keeps the tiny .sm header orb). */
.copilot-orb:has(.zc-sphere)::after,
.cv-orb:has(.zc-sphere)::after { display: none; }

/* ═══ ZORION AI CORE — volumetric multi-layer energy sphere ═══
   Inner layers live inside .zc-sphere (clipped to the circle); the glow
   halo + specular highlight read as a true 3-D glass orb with living
   energy inside. All layers inherit colour/tempo from the --zc* vars,
   so a single state class re-tints and re-paces the whole core. */
.zc-sphere {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  isolation: isolate; pointer-events: none;
}
/* Inner plasma core — breathes; the "soul" of the orb */
.zc-core {
  position: absolute; inset: 16%; border-radius: 50%;
  background: radial-gradient(circle at 50% 44%,
    #ffffff 0%, var(--zc-core) 24%, var(--zc1) 52%, transparent 74%);
  filter: blur(2px); mix-blend-mode: screen;
  animation: zcCore var(--zc-core-dur) ease-in-out infinite;
}
@keyframes zcCore {
  0%,100% { transform: scale(.82); opacity: .78; }
  50%     { transform: scale(1.1);  opacity: 1; }
}
/* Flowing energy — a soft conic band sweeping through the core */
.zc-flow {
  position: absolute; inset: -12%; border-radius: 50%; mix-blend-mode: screen;
  background: conic-gradient(from 0deg,
    transparent 0deg, var(--zc1) 60deg, transparent 140deg,
    var(--zc2) 230deg, transparent 320deg);
  filter: blur(3px); opacity: .6;
  animation: zcSpin var(--zc-flow-dur) linear infinite;
}
@keyframes zcSpin { to { transform: rotate(360deg); } }
/* Scanning ring — only visible in thinking/analyzing states */
.zc-scan {
  position: absolute; inset: 0; border-radius: 50%; mix-blend-mode: screen;
  background: conic-gradient(from 0deg,
    transparent 0deg, rgba(255,255,255,.75) 16deg, transparent 52deg);
  -webkit-mask: radial-gradient(farthest-side, transparent 56%, #000 60%);
          mask: radial-gradient(farthest-side, transparent 56%, #000 60%);
  opacity: var(--zc-scan-op); transition: opacity .4s ease;
  animation: zcSpin 2.1s linear infinite;
}
/* Floating particles drifting inside the glass */
.zc-particles { position: absolute; inset: 0; }
.zc-particles i {
  position: absolute; width: 7.5%; height: 7.5%; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--zc-core) 55%, transparent 78%);
  box-shadow: 0 0 6px var(--zc1); mix-blend-mode: screen; opacity: .9;
  animation: zcFloat var(--zc-part-dur) ease-in-out infinite;
}
.zc-particles i:nth-child(1) { left: 28%; top: 30%; animation-delay: 0s;    }
.zc-particles i:nth-child(2) { left: 62%; top: 26%; animation-delay: -.9s; width: 5.5%; height: 5.5%; }
.zc-particles i:nth-child(3) { left: 46%; top: 58%; animation-delay: -1.8s; }
.zc-particles i:nth-child(4) { left: 70%; top: 60%; animation-delay: -2.6s; width: 5%;  height: 5%;  }
.zc-particles i:nth-child(5) { left: 34%; top: 66%; animation-delay: -3.4s; width: 6%;  height: 6%;  }
.zc-particles i:nth-child(6) { left: 54%; top: 40%; animation-delay: -4.2s; width: 4.5%; height: 4.5%; }
.zc-particles i:nth-child(7) { left: 40%; top: 44%; animation-delay: -1.2s; width: 5%;  height: 5%;  }
.zc-particles i:nth-child(8) { left: 64%; top: 48%; animation-delay: -3.0s; width: 4%;  height: 4%;  }
@keyframes zcFloat {
  0%,100% { transform: translate(0,0) scale(1);     opacity: .55; }
  25%     { transform: translate(14%,-10%) scale(1.2); opacity: 1; }
  50%     { transform: translate(-8%,8%) scale(.85);  opacity: .7; }
  75%     { transform: translate(-12%,-6%) scale(1.1); opacity: .95; }
}
/* Specular glass highlight — fixed, sells the 3-D read */
.zc-gloss {
  position: absolute; top: 7%; left: 11%; width: 52%; height: 40%; border-radius: 50%;
  background: radial-gradient(ellipse at 36% 36%,
    rgba(255,255,255,.92) 0%, rgba(225,242,255,.4) 42%, transparent 76%);
  filter: blur(1px);
}

/* Floating launcher button */
.copilot-fab {
  position: relative; width: 64px; height: 64px; padding: 0; border: none; border-radius: 50%;
  cursor: pointer; display: grid; place-items: center; overflow: visible;
  background: radial-gradient(circle at 50% 40%, #14103a, #07051a);
  border: 1px solid rgba(90,120,255,.18);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 8px 32px rgba(79,140,255,.28), 0 2px 8px rgba(0,0,0,.7);
}
.copilot-fab > * { grid-area: 1 / 1; }
.copilot-fab .copilot-orb { z-index: 2; }

/* SVG arc rings — positioned beyond the 64 px hit area */
.cf-arcs {
  position: absolute;
  inset: -16px;
  width: calc(100% + 32px); height: calc(100% + 32px);
  pointer-events: none; z-index: 3; overflow: visible;
}
/* stroke-dasharray defined in SVG attributes; rotation driven by <animateTransform> */
.cfa-r1 { stroke-dasharray: 170 56; }
.cfa-r2 { stroke-dasharray: 108 162; stroke-dashoffset: 54; }

/* Hover — magnetic attraction + energy surge */
.copilot-fab { transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease; }
.copilot-fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 14px 44px rgba(79,140,255,.5), 0 0 40px rgba(139,92,246,.4), 0 2px 8px rgba(0,0,0,.7);
}
.copilot-fab:hover .copilot-orb { filter: brightness(1.22) saturate(1.35); }
.copilot-fab:hover .zc-core { animation-duration: 1.3s; }
.copilot-fab:hover .cfa-r1 { animation-duration: 1.8s; }
.copilot-fab:hover .cfa-r2 { animation-duration: 2.9s; }
.copilot-fab:active { transform: scale(1.03); }
.copilot.open .copilot-fab { display: none; }

/* Glass panel */
.copilot-panel {
  display: none; flex-direction: column; position: relative;
  width: 384px; max-width: calc(100vw - 28px); height: 564px; max-height: calc(100vh - 90px);
  background: linear-gradient(180deg, #14122244 0%, #0B0F19 42%), var(--card);
  border: 1px solid rgba(139,92,246,.28); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(139,92,246,.12), 0 0 60px rgba(124,80,255,.18);
  overflow: hidden; animation: copilotIn .26s cubic-bezier(.22,1,.36,1);
}
.copilot.open .copilot-panel { display: flex; }
@keyframes copilotIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

.copilot-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(79,140,255,.10) 60%, transparent);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.copilot-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.copilot-title-txt { display: flex; flex-direction: column; line-height: 1.25; font-size: 14.5px; font-weight: 700; color: var(--text-hi); }
.copilot-sub { font-size: 10.5px; font-weight: 500; color: var(--text-lo); letter-spacing: .01em; }
.copilot-head-actions { display: flex; align-items: center; gap: 4px; }
.copilot-icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-size: 14px; line-height: 1; cursor: pointer; transition: all .15s;
}
.copilot-icon-btn:hover { color: var(--text-hi); border-color: var(--border2); background: rgba(255,255,255,.08); }
.copilot-icon-btn.off { opacity: .5; }

.copilot-quick { display: flex; gap: 7px; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
.copilot-quick button {
  padding: 6px 12px; font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--border2); border-radius: 20px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.copilot-quick button:hover {
  color: #fff; border-color: transparent; transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(139,92,246,.55), rgba(79,140,255,.55));
  box-shadow: 0 6px 18px rgba(124,80,255,.4);
}
.copilot-quick button:active { transform: translateY(0) scale(.96); }

.copilot-messages { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 13px; }
.copilot-msg { display: flex; animation: zMsgIn .42s cubic-bezier(.22,1,.36,1) both; }
.copilot-msg.user { justify-content: flex-end; }
@keyframes zMsgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.copilot-bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 13px; line-height: 1.58; position: relative; }
/* Assistant — frosted-glass intelligence surface with a soft inner glow */
.copilot-msg.assistant .copilot-bubble {
  background: linear-gradient(180deg, rgba(139,92,246,.09), rgba(255,255,255,.035));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(139,92,246,.22);
  color: var(--text); border-bottom-left-radius: 5px;
  box-shadow: 0 6px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(124,80,255,.05);
}
.copilot-msg.user .copilot-bubble {
  background: linear-gradient(135deg, #6B5CF0, #4F8CFF); color: #fff; border-bottom-right-radius: 5px;
  box-shadow: 0 4px 16px rgba(79,140,255,.35);
}

/* ── Intelligence report (structured analytical answer) ── */
.zr-report { display: flex; flex-direction: column; gap: 9px; }
.zr-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 1px; }
.zr-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 7px; line-height: 1;
  border: 1px solid transparent;
}
.zr-badge.buy   { color: #4DF0B0; background: rgba(0,230,118,.12); border-color: rgba(0,230,118,.3); }
.zr-badge.sell  { color: #FF7B7B; background: rgba(255,82,82,.12);  border-color: rgba(255,82,82,.3); }
.zr-badge.neutral{ color: #9FB4DC; background: rgba(159,180,220,.1); border-color: rgba(159,180,220,.25); }
.zr-badge.risk-low { color: #4DF0B0; background: rgba(0,230,118,.1); border-color: rgba(0,230,118,.25); }
.zr-badge.risk-mod { color: #FFD56A; background: rgba(255,184,0,.12); border-color: rgba(255,184,0,.3); }
.zr-badge.risk-high{ color: #FF9A6A; background: rgba(255,122,0,.14); border-color: rgba(255,122,0,.32); }
.zr-badge.senti { color: #B79CFF; background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.3); }
/* Source provenance badge (Analytical / Rule-based / AI-enhanced) */
.zr-src-tag { font-size: 10px; color: var(--text-lo); margin-top: 8px; text-align: right; opacity: .7; }
/* Confidence meter */
.zr-conf { display: flex; align-items: center; gap: 8px; }
.zr-conf-label { font-size: 10px; font-weight: 600; color: var(--text-lo); white-space: nowrap; }
.zr-conf-track { flex: 1; height: 6px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.zr-conf-fill { height: 100%; border-radius: 4px; width: 0; background: linear-gradient(90deg, var(--primary), var(--ai)); transition: width 1s cubic-bezier(.22,1,.36,1); box-shadow: 0 0 10px rgba(124,80,255,.5); }
.zr-conf-val { font-size: 11px; font-weight: 800; color: var(--text-hi); font-variant-numeric: tabular-nums; }
/* Probability split */
.zr-prob { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.05); }
.zr-prob-bull { background: linear-gradient(90deg, #00C566, #2BE5A6); }
.zr-prob-bear { background: linear-gradient(90deg, #FF6E6E, #FF4D4D); }
.zr-prob-row { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; margin-top: 3px; }
.zr-prob-row .bull { color: #4DF0B0; } .zr-prob-row .bear { color: #FF8A8A; }
/* Sections */
.zr-sec { font-size: 12.5px; line-height: 1.55; }
.zr-sec b { color: var(--text-hi); font-weight: 700; }
.zr-sec .lbl { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ai); margin-bottom: 1px; opacity: .85; }
.zr-levels { display: flex; gap: 8px; }
.zr-level { flex: 1; padding: 7px 9px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.zr-level .k { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-lo); }
.zr-level .v { font-size: 13px; font-weight: 800; color: var(--text-hi); font-variant-numeric: tabular-nums; }
.zr-level.sup .v { color: #4DF0B0; } .zr-level.res .v { color: #FF9A8A; }

/* ── Thinking sequence (replaces the spinner) ── */
.copilot-think { display: flex; flex-direction: column; gap: 7px; min-width: 180px; }
.cth-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-lo); opacity: .4; transition: opacity .35s, color .35s; }
.cth-row.active { opacity: 1; color: var(--text); }
.cth-row.done { opacity: .8; color: var(--text-lo); }
.cth-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: rgba(255,255,255,.15); transition: all .35s; }
.cth-row.active .cth-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: cthPulse 1s ease-in-out infinite; }
.cth-row.done .cth-dot { background: var(--green); box-shadow: 0 0 6px rgba(0,230,118,.5); }
@keyframes cthPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: .6; } }

.copilot-typing { display: inline-flex; gap: 4px; }
.copilot-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ai); animation: ctype 1s infinite; }
.copilot-typing i:nth-child(2) { animation-delay: .15s; }
.copilot-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ctype { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Voice mode overlay */
.copilot-voice {
  display: none; position: absolute; inset: 0; z-index: 5;
  flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(circle at 50% 36%, rgba(124,80,255,.20), rgba(11,15,25,.97) 70%);
  backdrop-filter: blur(10px);
}
.copilot.voice-active .copilot-voice { display: flex; }
.cv-orb {
  width: 138px; height: 138px; border-radius: 50%; position: relative;
  background:
    radial-gradient(circle at 27% 20%, rgba(255,255,255,.82) 0%, rgba(200,230,255,.4) 18%, transparent 38%),
    radial-gradient(circle at 55% 10%, rgba(130,190,255,.28) 0%, transparent 40%),
    radial-gradient(circle at 88% 52%, rgba(160,100,255,.25) 0%, transparent 28%),
    radial-gradient(circle at 65% 82%, rgba(0,0,30,.9) 0%, transparent 42%),
    radial-gradient(circle at 42% 38%, #2e2480 0%, #160f50 30%, #0a0730 58%, #040218 82%, #010109 100%);
  box-shadow:
    0 0 0 2px rgba(110,150,255,.3),
    0 0 50px rgba(124,80,255,.75),
    0 0 90px rgba(79,140,255,.4),
    0 16px 60px rgba(0,0,0,.8),
    inset 0 4px 14px rgba(160,210,255,.22),
    inset 0 -8px 22px rgba(0,0,50,.9);
  animation: cvBreath 2.4s ease-in-out infinite;
}
.cv-orb::after {
  content: ''; position: absolute;
  top: 7%; left: 10%; width: 52%; height: 40%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 36% 36%,
    rgba(255,255,255,.88) 0%, rgba(230,248,255,.45) 32%, rgba(180,225,255,.1) 65%, transparent 100%);
  filter: blur(3px);
}
@keyframes cvBreath {
  0%,100% { transform: scale(1);    box-shadow: 0 0 0 2px rgba(110,150,255,.3), 0 0 50px rgba(124,80,255,.75), 0 0 90px rgba(79,140,255,.4), 0 16px 60px rgba(0,0,0,.8), inset 0 4px 14px rgba(160,210,255,.22), inset 0 -8px 22px rgba(0,0,50,.9); }
  50%      { transform: scale(1.06); box-shadow: 0 0 0 2px rgba(110,150,255,.45), 0 0 70px rgba(124,80,255,.95), 0 0 120px rgba(79,140,255,.6), 0 18px 70px rgba(0,0,0,.7), inset 0 4px 16px rgba(160,210,255,.3), inset 0 -8px 22px rgba(0,0,50,.9); }
}
.copilot.speaking .cv-orb { animation: cvSpeak .55s ease-in-out infinite; }
@keyframes cvSpeak {
  0%,100% { transform: scale(1);    box-shadow: 0 0 0 2px rgba(110,150,255,.4), 0 0 55px rgba(124,80,255,.8), 0 0 95px rgba(79,140,255,.45), 0 16px 60px rgba(0,0,0,.8), inset 0 4px 14px rgba(160,210,255,.22), inset 0 -8px 22px rgba(0,0,50,.9); }
  50%      { transform: scale(1.12); box-shadow: 0 0 0 2px rgba(139,92,246,.7), 0 0 80px rgba(139,92,246,.95), 0 0 130px rgba(124,80,255,.65), 0 20px 70px rgba(0,0,0,.7), inset 0 4px 18px rgba(190,160,255,.35), inset 0 -8px 22px rgba(0,0,50,.9); }
}
.cv-wave { display: flex; gap: 5px; align-items: center; height: 26px; }
.cv-wave i { width: 4px; height: 8px; border-radius: 3px; background: linear-gradient(var(--ai), var(--primary)); animation: cvwave 1s ease-in-out infinite; }
.cv-wave i:nth-child(2) { animation-delay: .12s; }
.cv-wave i:nth-child(3) { animation-delay: .24s; }
.cv-wave i:nth-child(4) { animation-delay: .36s; }
.cv-wave i:nth-child(5) { animation-delay: .48s; }
@keyframes cvwave { 0%,100% { height: 8px; } 50% { height: 24px; } }
.cv-status { font-size: 15px; font-weight: 700; color: var(--text-hi); }
.cv-transcript { font-size: 13.5px; color: var(--text); max-width: 80%; text-align: center; min-height: 19px; line-height: 1.5; }
.cv-stop {
  padding: 9px 24px; border-radius: 22px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.06); border: 1px solid var(--border2); color: var(--text-hi);
}
.cv-stop:hover { background: rgba(255,82,82,.16); border-color: var(--red); color: #fff; }

/* Input row */
.copilot-input-row { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.06); }
.copilot-mic {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border2); color: var(--text);
  transition: all .18s;
}
.copilot-mic:hover { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--ai), var(--primary)); box-shadow: 0 4px 16px rgba(124,80,255,.4); }
.copilot.voice-active .copilot-mic { background: linear-gradient(135deg, var(--ai), var(--primary)); color: #fff; border-color: transparent; }
.copilot-input {
  flex: 1; min-width: 0; padding: 11px 14px; background: rgba(255,255,255,.05);
  border: 1px solid var(--border2); border-radius: 22px; color: var(--text-hi); font-size: 13px; outline: none;
}
.copilot-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,140,255,.14); }
.copilot-send {
  position: relative; flex-shrink: 0; width: 40px; height: 40px; border: none; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 15px; color: #fff; overflow: visible;
  background: linear-gradient(135deg, var(--ai), var(--primary));
  box-shadow: 0 4px 16px rgba(124,80,255,.4);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
.copilot-send:hover { transform: scale(1.1); box-shadow: 0 6px 22px rgba(124,80,255,.6); }
.copilot-send:active { transform: scale(.94); }
/* Energy ripple on press */
.copilot-send::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(124,80,255,.6); opacity: 0; pointer-events: none;
}
.copilot-send:active::after { animation: zRipple .5s ease-out; }
@keyframes zRipple { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.8); } }

/* ─── Responsive ─── */
@media (max-width: 760px) {
  .ph-body { grid-template-columns: 1fr; gap: 16px; justify-items: center; }
  .ph-subs { width: 100%; }
  .scen-chips { grid-template-columns: repeat(2, 1fr); }
  .scen-head-row { grid-template-columns: 1fr; }
  .scen-asset { grid-template-columns: 84px 1fr 84px; }
  .reb-grid { grid-template-columns: 1fr 1fr; }
  .reb-table { grid-column: 1 / -1; }
  .brief-grid { grid-template-columns: 1fr 1fr; }
  .brief-movers { grid-template-columns: 1fr; }
  /* Clear the bottom-nav (z200) and the sticky Analyze CTA (bottom:74px) */
  .copilot { right: 14px; bottom: 132px; }
  .copilot-fab { width: 56px; height: 56px; }
  .copilot-fab .copilot-orb { width: 38px; height: 38px; }
  .copilot-panel { height: 70vh; max-height: calc(100vh - 150px); }
}
@media (max-width: 420px) {
  .reb-grid { grid-template-columns: 1fr; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
