/* ── CoinPeek Global Styles ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Instrument+Serif:ital@0;1&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --brand:        #A78BFA;
  --brand-dim:    rgba(167,139,250,0.10);
  --brand-border: rgba(167,139,250,0.20);
  --bg:           #09090F;
  --bg2:          #11111C;
  --bg3:          #181825;
  --bg4:          #1E1E2E;
  --text:         #E8E6F0;
  --muted:        #6B6A8A;
  --border:       rgba(167,139,250,0.12);
  --border2:      rgba(167,139,250,0.22);
  --parchment:    #EDE9FE;
  --green:        #4ADE80;
  --amber:        #FBBF24;
  --orange:       #FB923C;
  --red:          #F87171;
  --blue:         #60A5FA;
  --purple:       #A78BFA;
  --cyan:         #22D3EE;
  --font:         'Instrument Sans', system-ui, sans-serif;
  --mono:         'DM Mono', 'Fira Mono', monospace;
  --serif:        'Instrument Serif', Georgia, serif;
  --radius:       8px;
  --radius-lg:    12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select { font-family: var(--font); }

/* ── Mood colours ─────────────────────────────────────────────────────────── */
.mood-vcalm     { color: var(--blue); }
.mood-calm      { color: var(--blue); }
.mood-unsettled { color: var(--amber); }
.mood-stressed  { color: var(--orange); }
.mood-danger    { color: var(--red); }

.bg-vcalm     { background: rgba(96,165,250,0.12); }
.bg-calm      { background: rgba(74,222,128,0.12); }
.bg-unsettled { background: rgba(251,191,36,0.12); }
.bg-stressed  { background: rgba(251,146,60,0.12); }
.bg-danger    { background: rgba(248,113,113,0.12); }

/* ── Coin icon ─────────────────────────────────────────────────────────────── */
.coin-icon {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 1.2em;
  background: linear-gradient(135deg, rgba(167,139,250,0.25) 0%, rgba(34,211,238,0.15) 100%);
  border: 1px solid rgba(167,139,250,0.25);
  flex-shrink: 0;
}
.coin-wrap {
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--bg3);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(9,9,15,0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 58px;
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 0; }
.nav-logo-coin { color: var(--brand); }
.nav-logo-peek { color: var(--text); }
.nav-logo-pro {
  font-size: 0.5rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: #FBBF24;
  background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.28);
  border-radius: 4px; padding: 1px 5px;
  margin-left: 5px; font-family: var(--mono); align-self: center;
}
.nav-links { display: flex; gap: 1.75rem; flex: 1; }
.nav-link {
  font-size: 0.85rem; color: var(--muted); font-weight: 500;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s; cursor: pointer;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); }
.nav-stamp {
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px; padding: 3px 9px; white-space: nowrap;
}
.nav-stamp span { color: var(--brand); font-weight: 600; }

/* Nav search */
.nav-search-wrap {
  position: relative; flex: 1; max-width: 280px; min-width: 120px;
}
.nav-search-bar {
  display: flex; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; transition: border-color 0.15s; height: 32px;
}
.nav-search-bar:focus-within { border-color: var(--brand); }
.nav-search-bar input {
  flex: 1; background: transparent; border: none;
  padding: 0 10px; color: var(--text); font-size: 0.78rem;
  outline: none; font-family: var(--font); min-width: 0;
}
.nav-search-bar input::placeholder { color: var(--muted); font-size: 0.75rem; }
.nav-search-bar button {
  background: transparent; border: none; border-left: 1px solid var(--border);
  padding: 0 10px; color: var(--muted); cursor: pointer; font-size: 0.75rem;
  transition: color 0.15s; white-space: nowrap;
}
.nav-search-bar button:hover { color: var(--brand); }
.nav-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg2); border: 1px solid var(--brand-border);
  border-radius: var(--radius); z-index: 600;
  max-height: 300px; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6); display: none;
  box-sizing: border-box;
}
.nav-search-results.open { display: block; }

/* Nav right cluster */
.nav-right {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.main { max-width: 1400px; margin: 0 auto; padding: 2.5rem 2rem; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-hd { margin-bottom: 1.5rem; }
.page-eyebrow {
  font-family: var(--mono); font-size: 0.68rem; color: var(--brand);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.3rem;
}
.page-title {
  font-family: var(--serif); font-size: 1.8rem; color: var(--parchment);
  font-style: italic; margin-bottom: 0.2rem;
}
.page-sub { font-size: 0.82rem; color: var(--muted); }

/* ── Controls row ─────────────────────────────────────────────────────────── */
.controls { display: flex; gap: 0.6rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }
.ctrl-input {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px;
  color: var(--text); font-size: 0.8rem; outline: none; width: 220px;
  transition: border-color 0.15s;
}
.ctrl-input:focus { border-color: var(--brand); }
.ctrl-input::placeholder { color: var(--muted); }
.ctrl-select {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 10px;
  color: var(--muted); font-size: 0.8rem; outline: none; cursor: pointer;
}
.ctrl-sep { flex: 1; }
.ctrl-toggle {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px;
  color: var(--muted); font-size: 0.8rem; cursor: pointer;
  white-space: nowrap; transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ctrl-toggle:hover { border-color: var(--brand); color: var(--text); }
.ctrl-toggle-on {
  background: var(--brand-dim); border-color: var(--brand) !important;
  color: var(--brand) !important; font-weight: 600;
}

/* ── Mood summary pills ──────────────────────────────────────────────────── */
.mood-summary { display: flex; gap: 0.4rem; align-items: center; }
.ms-pill {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 8px;
  font-size: 0.68rem; font-family: var(--mono); cursor: pointer;
  transition: border-color 0.15s;
}
.ms-pill:hover { border-color: var(--brand); }
.ms-pill.active { border-color: var(--brand); background: var(--brand-dim); }
.ms-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Mood chip ───────────────────────────────────────────────────────────── */
.mood-chip {
  font-size: 0.62rem; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; letter-spacing: 0.03em; white-space: nowrap;
}
.mc-blue   { background: rgba(96,165,250,0.12);  color: var(--blue); }
.mc-cool   { background: rgba(96,165,250,0.12);  color: var(--blue); }
.mc-green  { background: rgba(74,222,128,0.12);  color: var(--green); }
.mc-amber  { background: rgba(251,191,36,0.12);  color: var(--amber); }
.mc-orange { background: rgba(251,146,60,0.12);  color: var(--orange); }
.mc-red    { background: rgba(248,113,113,0.12); color: var(--red); }

/* ── Score pill ──────────────────────────────────────────────────────────── */
.score-pill {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; display: inline-block;
}
.sp-blue   { background: rgba(96,165,250,0.12);  color: var(--blue); }
.sp-green  { background: rgba(74,222,128,0.12);  color: var(--green); }
.sp-amber  { background: rgba(251,191,36,0.12);  color: var(--amber); }
.sp-orange { background: rgba(251,146,60,0.12);  color: var(--orange); }
.sp-red    { background: rgba(248,113,113,0.12); color: var(--red); }

/* ── Swing badge ─────────────────────────────────────────────────────────── */
.swing {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.sw-cooling { background: rgba(96,165,250,0.12);  color: var(--blue); }
.sw-warming { background: rgba(251,191,36,0.12);  color: var(--amber); }
.sw-heating { background: rgba(248,113,113,0.12); color: var(--red); }
.sw-flat    { background: var(--bg3); color: var(--muted); }

/* ── Indicator dot ───────────────────────────────────────────────────────── */
.ind-dot {
  width: 11px; height: 11px; border-radius: 50%;
  cursor: pointer; flex-shrink: 0;
  transition: transform 0.1s;
}
.ind-dot:hover { transform: scale(1.5); }
.d-green { background: var(--green); }
.d-amber { background: var(--amber); }
.d-red   { background: var(--red); }

/* ── Tooltip ─────────────────────────────────────────────────────────────── */
.tooltip {
  position: fixed; z-index: 9999; pointer-events: none;
  background: #18182A; border: 1px solid var(--brand-border);
  border-radius: 10px; padding: 10px 14px;
  min-width: 210px; max-width: 270px;
  opacity: 0; transition: opacity 0.15s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.tooltip.visible { opacity: 1; }
.tt-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.tt-value { font-size: 0.9rem; font-weight: 700; color: var(--parchment); margin-bottom: 3px; font-family: var(--mono); display: flex; align-items: center; gap: 6px; }
.tt-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tt-desc  { font-size: 0.72rem; color: var(--muted); line-height: 1.5; }

/* ── Table base ──────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 0.62rem; color: var(--muted); text-align: left;
  padding: 7px 10px; border-bottom: 1px solid var(--border);
  font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  white-space: nowrap; cursor: pointer; user-select: none;
}
.data-table th:hover { color: var(--brand); }
.data-table th.sorted { color: var(--brand); }
.sort-arr { opacity: 0.3; font-size: 0.55rem; margin-left: 2px; }
.data-table th.sorted .sort-arr { opacity: 1; }
.data-table th.center, .data-table td.center { text-align: center; }
.data-table td {
  font-size: 0.78rem; padding: 0.52rem 10px;
  border-bottom: 1px solid rgba(167,139,250,0.05);
  vertical-align: middle; white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { cursor: pointer; transition: background 0.1s; }
.data-table tbody tr:hover td { background: var(--bg3); }
.div-l { border-left: 1px solid var(--border); }
.ticker-cell { font-family: var(--mono); font-weight: 700; color: var(--brand); font-size: 0.8rem; }
.company-cell { color: var(--muted); font-size: 0.73rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

/* ── Table footer ─────────────────────────────────────────────────────────── */
.table-footer {
  padding: 0.65rem 1rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
.footer-txt { font-size: 0.72rem; color: var(--muted); }
.pagination { display: flex; gap: 4px; }
.pg-btn {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 4px; padding: 3px 8px;
  font-size: 0.7rem; color: var(--muted); cursor: pointer; font-family: var(--mono);
  transition: all 0.15s;
}
.pg-btn:hover, .pg-btn.active { background: var(--brand-dim); border-color: var(--brand); color: var(--brand); }

/* ── Legend ──────────────────────────────────────────────────────────────── */
.legend { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.leg-item { display: flex; align-items: center; gap: 5px; font-size: 0.67rem; color: var(--muted); }
.leg-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Stat card ────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1rem;
}
.stat-label { font-size: 0.6rem; color: var(--muted); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 4px; }
.stat-val { font-size: 1.15rem; font-weight: 700; font-family: var(--mono); }
.stat-sub { font-size: 0.62rem; color: var(--muted); margin-top: 2px; }

/* ── Panel ────────────────────────────────────────────────────────────────── */
.panel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.panel-hd {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-title { font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.panel-badge { font-size: 0.6rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-best  { background: rgba(96,165,250,0.12); color: var(--blue); }
.badge-worst { background: rgba(248,113,113,0.12); color: var(--red); }
.panel-count { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); }

/* ── Value colours ───────────────────────────────────────────────────────── */
.val-green { color: var(--green); font-family: var(--mono); font-weight: 700; }
.val-amber { color: var(--amber); font-family: var(--mono); font-weight: 700; }
.val-red   { color: var(--red);   font-family: var(--mono); font-weight: 700; }
.val-muted { color: var(--muted); font-family: var(--mono); }

/* ── Journey row ─────────────────────────────────────────────────────────── */
.journey { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.j-arrow { font-size: 0.7rem; color: var(--muted); }

/* ── Bar ─────────────────────────────────────────────────────────────────── */
.bar-wrap { height: 4px; background: var(--bg3); border-radius: 2px; width: 80px; }
.bar-fill { height: 4px; border-radius: 2px; }

/* ── Dots row ─────────────────────────────────────────────────────────────── */
.dots-row { display: flex; gap: 5px; align-items: center; }

/* ── Section header ──────────────────────────────────────────────────────── */
.section-hd { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1rem; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--parchment); }
.section-sub { font-size: 0.75rem; color: var(--muted); }

/* ── Filter toggle ───────────────────────────────────────────────────────── */
.filter-toggle {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px 10px;
  font-size: 0.72rem; color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.filter-toggle.on { background: rgba(251,191,36,0.08); border-color: var(--amber); color: var(--amber); }
.toggle-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; transition: background 0.15s; }
.filter-toggle.on .toggle-pip { background: var(--amber); }

/* ── Context bar ─────────────────────────────────────────────────────────── */
.context-bar {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.ctx-title { font-size: 0.85rem; font-weight: 700; color: var(--parchment); margin-bottom: 2px; }
.ctx-desc  { font-size: 0.73rem; color: var(--muted); }
.ctx-right { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.ctx-pill  { font-size: 0.68rem; font-family: var(--mono); background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; color: var(--muted); }

/* ── Indicator tabs ──────────────────────────────────────────────────────── */
.ind-tab-bar { display: flex; gap: 0.35rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ind-tab {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px 12px;
  font-size: 0.75rem; color: var(--muted); cursor: pointer;
  font-weight: 500; transition: all 0.15s; white-space: nowrap;
}
.ind-tab:hover { border-color: var(--brand); color: var(--brand); }
.ind-tab.active { background: var(--brand-dim); border-color: var(--brand); color: var(--brand); font-weight: 700; }
.ind-tab.swing-tab.active { background: rgba(251,191,36,0.08); border-color: var(--amber); color: var(--amber); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center; padding: 4rem 1rem 3rem;
  border-bottom: 1px solid var(--border); margin-bottom: 2.5rem;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(167,139,250,0.08) 0%, transparent 70%);
  pointer-events: none;
}
/* ── 3 Feature Cards ─────────────────────────────────────────────────────── */
.features-section { padding: 0.25rem 0 2rem; }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.feature-card {
  background: #11111C; border: 1px solid rgba(167,139,250,0.22);
  border-radius: var(--radius-lg); padding: 1.35rem 1.25rem 1.25rem;
  text-decoration: none; display: flex; flex-direction: column; gap: 0.6rem;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.feature-card:hover {
  border-color: rgba(167,139,250,0.45);
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
}
.fc-header { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.1rem; }
.fc-num {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.06em;
}
.fc-eyebrow {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); font-family: var(--mono);
}
.fc-01 .fc-num { color: var(--orange); }
.fc-02 .fc-num { color: var(--brand); }
.fc-03 .fc-num { color: var(--blue); }
.fc-title { font-size: 1.05rem; font-weight: 700; color: var(--parchment); }
.fc-desc  { font-size: 0.8rem; color: var(--muted); line-height: 1.65; }
.fc-preview {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.4rem; flex: 1;
}
.fc-chips-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.fc-preview-row {
  display: flex; align-items: center; gap: 0.35rem;
  margin-top: 0.25rem;
}
.fc-preview-label {
  font-family: var(--mono); font-size: 0.58rem; font-weight: 700;
  color: var(--muted); letter-spacing: 0.07em;
}
.fc-preview-val {
  font-size: 0.72rem; color: var(--text); font-weight: 500;
}
.fc-preview-sep { color: var(--border); font-size: 0.7rem; }
.fc-cmp-row { display: flex; align-items: center; gap: 0.5rem; }
.fc-cmp-ticker {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700;
  color: var(--parchment); min-width: 34px;
}
.fc-cmp-ind {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; margin-left: auto;
}
.fc-cmp-divider { height: 1px; background: var(--border); margin: 0.3rem 0; }
.fc-formula-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.fc-formula-tag {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  color: var(--parchment); min-width: 30px;
}
.fc-formula-op  { font-size: 0.7rem; color: var(--muted); font-family: var(--mono); flex:1; }
.fc-formula-eq  { font-size: 0.7rem; color: var(--muted); font-family: var(--mono); }
.fc-formula-result { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--red); }
.fc-cta {
  font-size: 0.8rem; font-weight: 600; color: var(--brand); margin-top: 0.15rem;
}
.feature-card:hover .fc-cta { color: var(--parchment); }
@media (max-width: 760px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ── Top Hero Banner ─────────────────────────────────────────────────────── */
.top-hero {
  width: 100%;
  padding: 4rem 0 3.25rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  position: relative;
}
.top-hero::before {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(167,139,250,0.1) 0%, transparent 72%);
  pointer-events: none;
}
.top-hero-inner { position: relative; z-index: 1; }
.top-hero-eyebrow {
  display: inline-block; font-family: var(--mono);
  font-size: 0.68rem; color: var(--brand); letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--brand-dim); border: 1px solid var(--brand-border);
  border-radius: 20px; padding: 4px 16px; margin-bottom: 1.4rem;
}
.top-hero-h1 {
  font-family: var(--serif); font-size: 3.8rem; font-weight: 700;
  color: var(--parchment); line-height: 1.08;
  font-style: italic; letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
}
.top-hero-sub {
  color: var(--text); font-size: 1.05rem; line-height: 1.6;
  margin: 0 auto 0.55rem; max-width: 480px;
}
.top-hero-dyor {
  color: var(--muted); font-size: 0.8rem; line-height: 1.5;
  margin: 0 auto 2rem; max-width: 480px;
}
.top-hero-ctas {
  display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap;
}
.top-hero-btn {
  display: inline-block; padding: 0.62rem 1.4rem;
  border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  text-decoration: none; transition: opacity 0.15s, transform 0.15s;
}
.top-hero-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.top-hero-btn-primary {
  background: var(--brand); color: #fff;
}
.top-hero-btn-secondary {
  background: transparent; color: var(--brand);
  border: 1px solid var(--brand-border);
}

/* ── Hero Eyebrow ─────────────────────────────────────────────────────────── */
.hero-eyebrow {
  display: inline-block; font-family: var(--mono);
  font-size: 0.72rem; color: var(--brand); letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 1.25rem;
  background: var(--brand-dim); border: 1px solid var(--brand-border);
  border-radius: 20px; padding: 4px 14px;
}
.hero-h1 {
  font-family: var(--serif); font-size: 3.6rem; font-weight: 700;
  color: var(--parchment); line-height: 1.1; margin-bottom: 1rem;
  font-style: italic; letter-spacing: -0.02em;
}
.hero-sub {
  color: var(--muted); font-size: 1rem; line-height: 1.6;
  margin-bottom: 2rem; max-width: 520px;
}
.hero-left {
  text-align: left !important;
  padding: 2rem 0 1.25rem !important;
  border-bottom: none !important;
  margin-bottom: 1rem !important;
}
.hero-left .hero-sub { margin-left: 0; margin-right: 0; }
.hero-left::before { background: none; }
.search-bar {
  display: flex; background: var(--bg2);
  border: 1px solid var(--brand-border); border-radius: var(--radius);
  overflow: hidden; transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--brand); }
.search-bar input {
  flex: 1; background: transparent; border: none;
  padding: 0.8rem 1.1rem; color: var(--text); font-size: 0.9rem;
  outline: none; font-family: var(--font);
}
.search-bar input::placeholder { color: var(--muted); }
.search-bar button {
  background: var(--brand); color: #09090F; border: none;
  padding: 0 1.4rem; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.02em; white-space: nowrap; transition: background 0.15s;
}
.search-bar button:hover { background: #c4b5fd; }
.view-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.85rem; color: var(--brand); font-weight: 600;
  cursor: pointer; transition: gap 0.15s; text-decoration: none;
}
.view-all:hover { gap: 9px; }

/* ── Mood levels (coin icons replace pandas) ─────────────────────────────── */
.levels-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem; margin-bottom: 2.5rem; }
.level-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 0.5rem;
  text-align: center; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.level-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.level-card-icon { font-size: 2.4rem; margin: 0 auto 0.6rem; display: block; line-height: 1; }
.level-card-mood { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 2px; }
.level-card-click { font-size: 0.65rem; color: var(--brand); opacity: 0.65; margin-top: 4px; letter-spacing: 0.05em; transition: opacity 0.15s; }
.level-card:hover .level-card-click { opacity: 1; }

/* Level popover */
.level-popover {
  position: fixed; z-index: 600;
  background: var(--bg3); border: 1px solid var(--brand-border);
  border-radius: 14px; padding: 1.25rem 1.25rem 1rem;
  width: 260px; box-shadow: 0 16px 48px rgba(0,0,0,0.7);
  opacity: 0; pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.level-popover.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.pop-icon   { font-size: 2.8rem; text-align: center; margin-bottom: 0.6rem; line-height: 1; }
.pop-mood   { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; margin-bottom: 0.5rem; }
.pop-desc   { font-size: 0.78rem; color: var(--muted); line-height: 1.65; text-align: center; }
.pop-close  { display: block; margin: 0.85rem auto 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 16px; font-size: 0.72rem; color: var(--muted); cursor: pointer; font-family: inherit; transition: all 0.15s; }
.pop-close:hover { border-color: var(--brand); color: var(--brand); }

/* ── Today's Mood grid ────────────────────────────────────────────────────── */
.mood-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.5rem; }
.mood-panel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem;
}
.mood-panel-title {
  font-size: 0.68rem; font-weight: 700; color: var(--muted);
  letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 0.85rem;
}
.full-col { grid-column: 1 / -1; }

/* Featured coins grid */
.coin-dot-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
.coin-dot-item {
  background: var(--bg3); border-radius: 5px; padding: 5px 7px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; transition: background 0.1s;
}
.coin-dot-item:hover { background: var(--bg4); }
.coin-dot-ticker { font-family: var(--mono); font-size: 0.68rem; color: var(--text); font-weight: 600; }
.coin-dot-ind { width: 8px; height: 8px; border-radius: 50%; }

/* Pulse tabs */
.pulse-tab {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px;
  font-size: 0.72rem; color: var(--muted); cursor: pointer;
  font-weight: 500; transition: all 0.15s; white-space: nowrap;
}
.pulse-tab:hover { border-color: var(--brand); color: var(--brand); }
.pulse-tab.active { background: var(--brand-dim); border-color: var(--brand); color: var(--brand); font-weight: 700; }

/* Pulse table */
.pulse-th { font-size: 0.58rem; color: var(--muted); text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--border); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.pulse-td { font-size: 0.72rem; padding: 0.42rem 8px; border-bottom: 1px solid rgba(167,139,250,0.04); vertical-align: middle; white-space: nowrap; }
.pulse-tr:last-child .pulse-td { border-bottom: none; }
.pulse-tr:hover .pulse-td { background: var(--bg3); }
.pulse-ticker { font-family: monospace; font-weight: 700; color: var(--brand); font-size: 0.74rem; }
.pulse-val-g { color: var(--green); font-family: monospace; font-weight: 700; font-size: 0.74rem; }
.pulse-val-r { color: var(--red); font-family: monospace; font-weight: 700; font-size: 0.74rem; }
.pulse-val-a { color: var(--amber); font-family: monospace; font-weight: 700; font-size: 0.74rem; }
.pulse-sw-cooling { display:inline-flex;align-items:center;gap:2px;font-family:monospace;font-size:0.72rem;font-weight:700;padding:1px 6px;border-radius:3px;background:rgba(96,165,250,0.12);color:var(--blue); }
.pulse-sw-heating { display:inline-flex;align-items:center;gap:2px;font-family:monospace;font-size:0.72rem;font-weight:700;padding:1px 6px;border-radius:3px;background:rgba(248,113,113,0.12);color:var(--red); }
.pulse-sw-warming { display:inline-flex;align-items:center;gap:2px;font-family:monospace;font-size:0.72rem;font-weight:700;padding:1px 6px;border-radius:3px;background:rgba(251,191,36,0.12);color:var(--amber); }

/* ── Search results overlay ──────────────────────────────────────────────── */
.search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  width: 100%; max-width: 100%;
  background: var(--bg2);
  border: 1px solid var(--brand-border); border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  z-index: 500; max-height: 320px; overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
  display: none; box-sizing: border-box;
}
.search-results.open { display: block; }
.sr-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--bg3); }
.sr-ticker { font-family: var(--mono); font-weight: 700; color: var(--brand); font-size: 0.85rem; width: 60px; flex-shrink: 0; }
.sr-company { font-size: 0.78rem; color: var(--text); flex: 1; }
.sr-exchange { font-size: 0.65rem; color: var(--muted); font-family: var(--mono); }
.sr-coin-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.sr-empty { padding: 1.5rem; text-align: center; color: var(--muted); font-size: 0.82rem; }

/* ── Coin detail sidebar ─────────────────────────────────────────────────── */
.sidebar-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.6);
  z-index: 400; display: none;
}
.sidebar-overlay.open { display: block; }
.sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw); background: var(--bg2);
  border-left: 1px solid var(--border); z-index: 500;
  transform: translateX(100%); transition: transform 0.25s ease;
  overflow-y: auto; display: flex; flex-direction: column;
}
.sidebar.open { transform: translateX(0); }
.sidebar-hd {
  padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  position: sticky; top: 0; background: var(--bg2); z-index: 10;
}
.sidebar-close {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px; font-size: 0.8rem;
  color: var(--muted); cursor: pointer; flex-shrink: 0; transition: all 0.15s;
}
.sidebar-close:hover { border-color: var(--brand); color: var(--brand); }
.sidebar-body { padding: 1.25rem; flex: 1; }
.sidebar-ticker { font-family: var(--mono); font-weight: 700; color: var(--brand); font-size: 1.1rem; }
.sidebar-company { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.ind-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.75rem 0; border-bottom: 1px solid rgba(167,139,250,0.06);
}
.ind-row:last-child { border-bottom: none; }
.ind-dot-lg { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.ind-name { font-size: 0.75rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.ind-value { font-family: var(--mono); font-size: 0.78rem; margin-bottom: 3px; }
.ind-explain { font-size: 0.72rem; color: var(--muted); line-height: 1.5; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 0.75rem;
}
.faq-q { font-size: 0.88rem; font-weight: 700; color: var(--parchment); margin-bottom: 0.4rem; }
.faq-a { font-size: 0.8rem; color: var(--muted); line-height: 1.65; }

/* ── About ────────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 2rem; }
.about-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.about-num { font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--brand-border); margin-bottom: 0.25rem; }
.about-card-title { font-size: 0.88rem; font-weight: 700; color: var(--parchment); margin-bottom: 0.4rem; }
.about-card-text { font-size: 0.8rem; color: var(--muted); line-height: 1.65; }

/* ── Coin detail page ────────────────────────────────────────────────────── */
.period-btn { background:var(--bg3);border:1px solid var(--border);border-radius:5px;padding:3px 10px;font-size:0.72rem;color:var(--muted);cursor:pointer;font-family:var(--font);transition:all 0.15s; }
.period-btn:hover,.period-btn.active { background:var(--brand-dim);border-color:var(--brand);color:var(--brand); }
.chart-wrap { background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.25rem;margin-bottom:1.25rem; }
.chart-hd { display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;flex-wrap:wrap;gap:0.5rem; }
.chart-title { font-size:0.85rem;font-weight:700;color:var(--parchment); }
.chart-legend { display:flex;gap:1rem;align-items:center; }
.legend-item { display:flex;align-items:center;gap:5px;font-size:0.7rem;color:var(--muted); }
.legend-line { width:20px;height:2px;border-radius:1px; }
.period-btns { display:flex;gap:4px; }
.raw-table { width:100%;border-collapse:collapse; }
.raw-table th { font-size:0.65rem;color:var(--muted);text-align:left;padding:6px 10px;border-bottom:1px solid var(--border);font-weight:600;letter-spacing:0.07em;text-transform:uppercase;white-space:nowrap; }
.raw-table td { font-size:0.8rem;padding:0.55rem 10px;border-bottom:1px solid rgba(167,139,250,0.05);vertical-align:middle; }
.raw-table tr:last-child td { border-bottom:none; }
.ind-name-cell { font-weight:600;color:var(--text); }
.ind-val-cell { font-family:var(--mono);font-weight:700; }
.ind-desc-cell { font-size:0.72rem;color:var(--muted);line-height:1.5; }
.mood-hist-row { display:grid;grid-template-columns:repeat(4,1fr);gap:0.75rem;margin-bottom:1.25rem; }
.mood-hist-card { background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);padding:0.85rem;text-align:center; }
.mood-hist-period { font-size:0.62rem;font-weight:700;color:var(--muted);letter-spacing:0.08em;text-transform:uppercase;margin-bottom:0.5rem; }
.mood-hist-icon { font-size:2rem;margin:0 auto 0.4rem;line-height:1;display:block; }
.mood-hist-label { font-size:0.7rem;font-weight:700;margin-bottom:2px; }
.mood-hist-date { font-size:0.62rem;color:var(--muted);font-family:var(--mono); }
.mood-hist-price { font-size:0.72rem;color:var(--muted);font-family:var(--mono);margin-top:2px; }

/* Health history cards — StockPanda card style */
.health-hist-list { display:grid;grid-template-columns:repeat(4,1fr);gap:0.75rem;margin-bottom:1.25rem; }
.hhist-card {
  background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);
  padding:1rem 0.75rem;text-align:center;
}
.hhist-period {
  font-size:0.65rem;font-weight:700;color:var(--muted);
  letter-spacing:0.08em;text-transform:uppercase;
  margin-bottom:0.85rem;line-height:1.4;
}
.hhist-coin-wrap {
  position:relative;width:64px;height:64px;margin:0 auto 0.65rem;
}
.hhist-coin-img {
  width:64px;height:64px;border-radius:50%;
  background:var(--bg3);display:block;
}
.hhist-coin-fallback {
  width:64px;height:64px;border-radius:50%;
  background:linear-gradient(135deg,rgba(167,139,250,0.2),rgba(34,211,238,0.1));
  border:1px solid rgba(167,139,250,0.2);
  align-items:center;justify-content:center;
  font-size:1.8rem;line-height:1;
}
.hhist-dot {
  position:absolute;bottom:2px;right:2px;
  width:16px;height:16px;border-radius:50%;
  border:2px solid var(--bg2);
}
.hhist-label { font-size:0.78rem;font-weight:700;margin-bottom:4px; }
.hhist-date  { font-size:0.65rem;color:var(--muted);font-family:var(--mono);margin-bottom:2px; }
.hhist-price { font-size:0.72rem;color:var(--muted);font-family:var(--mono); }
.stat-grid { display:grid;grid-template-columns:repeat(4,1fr);gap:0.6rem;margin-bottom:1.25rem; }
.back-btn { display:inline-flex;align-items:center;gap:5px;font-size:0.8rem;color:var(--muted);cursor:pointer;margin-bottom:1.5rem;text-decoration:none;transition:color 0.15s; }
.back-btn:hover { color:var(--brand); }
.coin-header { background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.25rem 1.5rem;margin-bottom:1.25rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem; }
.coin-hd-left { display:flex;align-items:center;gap:1rem; }
.coin-hd-icon { font-size:2.4rem;line-height:1;flex-shrink:0; }
.coin-hd-ticker { font-family:var(--mono);font-size:1.5rem;font-weight:700;color:var(--brand); }
.coin-hd-name { font-size:0.85rem;color:var(--muted);margin-top:2px; }
.coin-hd-badges { display:flex;gap:0.5rem;align-items:center;margin-top:6px;flex-wrap:wrap; }
.coin-hd-right { text-align:right; }
.coin-hd-price { font-family:var(--mono);font-size:1.6rem;font-weight:700;color:var(--parchment); }
.coin-hd-change { font-family:var(--mono);font-size:0.85rem;margin-top:2px; }
.section-label { font-size:0.68rem;font-weight:700;color:var(--muted);letter-spacing:0.1em;text-transform:uppercase;margin-bottom:0.75rem; }
.dot-indicator { display:inline-flex;align-items:center;justify-content:center;width:11px;height:11px;border-radius:50%;flex-shrink:0; }

/* ── Pro pill ─────────────────────────────────────────────────────────────── */
.pro-pill {
  display:inline-flex;align-items:center;gap:5px;
  background:rgba(167,139,250,0.10);border:1px solid rgba(167,139,250,0.35);
  border-radius:20px;padding:3px 12px;font-size:0.72rem;
  color:var(--brand);font-weight:700;letter-spacing:0.03em;
  cursor:pointer;text-decoration:none;transition:all 0.15s;white-space:nowrap;
}
.pro-pill:hover { background:rgba(167,139,250,0.18); }

/* ── Hero Wizard Card ───────────────────────────────────────────────────── */
.hw-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: visible;
  margin-bottom: 1rem;
}

/* Step indicator bar */
.hw-steps-bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(167,139,250,0.03);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.hw-step-pill {
  display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0;
}
.hw-step-num {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 800;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #0a0a12;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: 0;
}
.hw-step-lbl {
  font-size: 0.72rem; font-weight: 600; color: var(--parchment);
  white-space: nowrap;
}
.hw-step-connector {
  flex: 1; height: 1px; background: var(--border); min-width: 16px;
}

/* Step blocks inside hw-body */
.hw-step-block { padding: 1.4rem 1.5rem; min-width: 0; }
.hw-step-hd {
  display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1rem;
}
.hw-step-badge {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 800;
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: rgba(167,139,250,0.1); border: 1.5px solid rgba(167,139,250,0.35);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
}
.hw-step-title {
  font-size: 0.82rem; font-weight: 700; color: var(--parchment);
}
.hw-step-hint {
  font-size: 0.62rem; color: var(--muted); margin-top: 0.5rem;
}

.hw-body {
  display: flex; flex-direction: column; gap: 0;
}
.hw-divider {
  height: 1px; width: auto; background: var(--border); margin: 0 1.5rem;
}
.hw-section-label {
  font-size: 0.6rem; font-weight: 700; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem;
}
.hw-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.hwpill {
  font-size: 0.72rem; font-weight: 600; padding: 4px 11px;
  border-radius: 99px; border: 1px solid var(--border);
  cursor: pointer; color: var(--muted); background: var(--bg3);
  transition: all 0.15s;
}
.hwpill:hover { border-color: var(--brand); color: var(--brand); }
.hwpill-cool.hw-active  { background:rgba(96,165,250,0.12);  border-color:#60A5FA; color:#60A5FA; }
.hwpill-warm.hw-active  { background:rgba(251,191,36,0.12);  border-color:var(--amber); color:var(--amber); }
.hwpill-hot.hw-active   { background:rgba(251,146,60,0.12);  border-color:var(--orange); color:var(--orange); }
.hwpill-vhot.hw-active  { background:rgba(248,113,113,0.12); border-color:var(--red); color:var(--red); }
.hw-coin-row {
  display: grid; grid-template-columns: 1fr 1fr 28px;
  gap: 6px; align-items: center; margin-bottom: 7px;
}
.hw-select, .hw-input {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 10px;
  color: var(--text); font-size: 0.78rem; outline: none;
  font-family: var(--font); width: 100%; box-sizing: border-box;
  transition: border-color 0.15s;
}
.hw-select:focus, .hw-input:focus { border-color: var(--brand); }
.hw-rm-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--muted);
  cursor: pointer; font-size: 0.72rem;
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.hw-rm-btn:hover { border-color: var(--red); color: var(--red); }
.hw-ta-hint {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  margin-bottom: 8px; margin-top: 2px;
}
.hw-ta-badge {
  font-size: 0.62rem; font-weight: 700; font-family: var(--mono);
  color: var(--brand); background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 4px; padding: 1px 5px;
}
.hw-ta-hint-text { font-size: 0.65rem; color: var(--muted); }
.hw-add-btn {
  width: 100%; background: none; border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 7px; font-size: 0.75rem;
  color: var(--muted); cursor: pointer; font-family: var(--font);
  transition: all 0.15s;
}
.hw-add-btn:hover { border-color: var(--brand); color: var(--brand); }
.hw-typeahead-wrap { position: relative; }
.hw-ta-dropdown {
  display: none; position: absolute; top: calc(100% + 2px); left: 0; right: 0;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  max-height: 200px; overflow-y: auto;
}
.hw-ta-item {
  padding: 6px 10px; font-size: 0.78rem; font-family: var(--mono);
  font-weight: 700; color: var(--brand); cursor: pointer; transition: background 0.1s;
}
.hw-ta-item:hover, .hw-ta-item.active { background: var(--bg3); }
.hw-metrics {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem;
}
.hw-metric { background: var(--bg3); border-radius: var(--radius); padding: 0.65rem 0.85rem; }
.hw-metric-label { font-size: 0.6rem; color: var(--muted); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 3px; }
.hw-metric-val { font-size: 1rem; font-weight: 700; font-family: var(--mono); }
.hw-results-divider { height: 1px; background: rgba(167,139,250,0.08); margin-bottom: 0.85rem; }
.hw-coin-result {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0; border-bottom: 1px solid rgba(167,139,250,0.06);
}
.hw-coin-result:last-child { border-bottom: none; }
.hw-cr-ticker { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--brand); }
.hw-cr-formula { font-size: 0.65rem; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.hw-cr-val { font-family: var(--mono); font-size: 0.88rem; font-weight: 700; text-align: right; }
.hw-cr-chg { font-size: 0.65rem; text-align: right; font-family: var(--mono); margin-top: 2px; }
.hw-empty { font-size: 0.78rem; color: var(--muted); text-align: center; padding: 1.5rem 0; }
.hw-footer {
  border-top: 1px solid var(--border); background: var(--bg3);
  padding: 0.6rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.hw-footer-note { font-size: 0.65rem; color: var(--muted); }
.hw-footer-cta {
  font-size: 0.75rem; font-weight: 700; color: var(--brand);
  text-decoration: none; white-space: nowrap; transition: opacity 0.15s;
}
.hw-footer-cta:hover { opacity: 0.75; }
.hw-quicklinks {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; margin-bottom: 2rem;
}
.hw-quicklink {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0.85rem 1rem;
  text-decoration: none; transition: border-color 0.15s;
}
.hw-quicklink:hover { border-color: rgba(167,139,250,0.35); }
.hw-ql-label { font-size: 0.6rem; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.hw-ql-link { font-size: 0.78rem; color: var(--brand); font-weight: 600; }

@media (max-width: 900px) {
  .hw-steps-bar { gap: 0.4rem; padding: 0.75rem 1rem; flex-wrap: wrap; }
  .hw-step-lbl { font-size: 0.65rem; }
  .hw-step-connector { min-width: 10px; }
  .hw-quicklinks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .hw-quicklinks { grid-template-columns: 1fr; }
  .hw-metrics { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Portfolio Heat Wizard (old — kept for compat) ──────────────────────── */
.wizard-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-bottom: 2.5rem;
}
.wizard-panel { display: flex; flex-direction: column; gap: 0; }
.wizard-block {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.wizard-block:last-child { margin-bottom: 0; flex: 1; }
.wizard-block-title {
  font-size: 0.68rem; font-weight: 700; color: var(--muted);
  letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 0.85rem;
}
.wizard-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.wpill {
  font-size: 0.72rem; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s; color: var(--muted);
  background: var(--bg3);
}
.wpill-cool.active  { background:rgba(96,165,250,0.12); border-color:#60A5FA; color:#60A5FA; }
.wpill-warm.active  { background:rgba(251,191,36,0.12);  border-color:var(--amber); color:var(--amber); }
.wpill-hot.active   { background:rgba(251,146,60,0.12);  border-color:var(--orange); color:var(--orange); }
.wpill-vhot.active  { background:rgba(248,113,113,0.12); border-color:var(--red); color:var(--red); }
.wpill:hover { border-color: var(--brand); color: var(--brand); }
.wiz-coin-row {
  display: grid; grid-template-columns: 1fr 1fr 30px;
  gap: 6px; align-items: center; margin-bottom: 8px;
}
.wiz-select, .wiz-input {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 10px;
  color: var(--text); font-size: 0.78rem; outline: none;
  font-family: var(--font); width: 100%; box-sizing: border-box;
}
.wiz-select:focus, .wiz-input:focus { border-color: var(--brand); }
.wiz-rm-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--muted); cursor: pointer; font-size: 0.75rem;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.wiz-rm-btn:hover { border-color: var(--red); color: var(--red); }
.wiz-metric {
  background: var(--bg3); border-radius: var(--radius); padding: 0.6rem 0.75rem;
}
.wiz-metric-label { font-size: 0.6rem; color: var(--muted); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 3px; }
.wiz-metric-val { font-size: 1rem; font-weight: 700; font-family: var(--mono); }
.wiz-coin-result {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0; border-bottom: 1px solid rgba(167,139,250,0.06);
}
.wiz-coin-result:last-child { border-bottom: none; }
.wcr-ticker { font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--brand); }
.wcr-detail { font-size: 0.65rem; color: var(--muted); margin-top: 2px; }
.wcr-newval { font-family: var(--mono); font-size: 0.85rem; font-weight: 700; text-align: right; }
.wcr-change { font-size: 0.65rem; text-align: right; margin-top: 2px; font-family: var(--mono); }

@media (max-width: 768px) {
  .wizard-wrap { grid-template-columns: 1fr; }
}

/* ── Site footer ─────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 2rem 2rem;
  width: 100%;
  background: var(--bg2);
}
.site-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-footer-text { flex: 1; min-width: 260px; }
.site-footer p {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.2rem;
}
.site-footer p:last-of-type { margin-bottom: 0; }
.footer-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.45rem 1.1rem; text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  font-family: var(--font); white-space: nowrap; flex-shrink: 0;
}
.footer-cta:hover { border-color: var(--brand); color: var(--brand); }
@media (max-width: 900px) {
  .main { padding: 1.5rem 1rem; }
  .top-hero { padding: 2.75rem 0 2.25rem; }
  .top-hero-h1 { font-size: 2.8rem; }
  .hero-h1 { font-size: 2.4rem; }
  .levels-row { grid-template-columns: repeat(3,1fr); }
  .mood-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .mood-hist-row { grid-template-columns: repeat(2,1fr); }
  .health-hist-list { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 600px) {
  /* Nav */
  .nav { padding: 0 0.85rem; gap: 0.5rem; height: auto; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .nav-links { gap: 0.85rem; order: 3; width: 100%; padding-bottom: 6px; }
  .nav-link { font-size: 0.76rem; }
  .nav-right { gap: 0.4rem; }
  .nav-search-wrap { max-width: 160px; min-width: 100px; }
  .nav-stamp { display: none; }

  /* Layout */
  .main { padding: 1rem 0.85rem; }
  .top-hero { padding: 2rem 0 1.75rem; margin-bottom: 1.75rem; }
  .top-hero-h1 { font-size: 2.1rem; }
  .top-hero-sub { font-size: 0.93rem; }
  .hero { padding: 2rem 0.75rem 1.75rem; }
  .hero-h1 { font-size: 1.9rem; }
  .hero-sub { font-size: 0.88rem; }
  .hero-eyebrow { font-size: 0.65rem; }

  /* Levels */
  .levels-row { grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
  .level-card { padding: 0.85rem 0.4rem; }
  .level-card-icon { font-size: 2rem; }
  .level-card-mood { font-size: 0.65rem; }
  .level-card-click { display: none; }

  /* Coin dot grid */
  .coin-dot-grid { grid-template-columns: repeat(3,1fr); }

  /* Controls */
  .controls { gap: 0.45rem; }
  .ctrl-input { width: 100%; }
  .ctrl-select { width: 100%; }
  .ctrl-sep { display: none; }
  .mood-summary { flex-wrap: wrap; }

  /* Stats row — leaderboard */
  #stats-row { grid-template-columns: repeat(2,1fr) !important; }

  .site-footer { padding: 1.5rem 0.85rem; }
  .site-footer-inner { flex-direction: column; gap: 1rem; align-items: flex-start; }
  /* Best/Worst panels — stack on mobile */
  .lb-panels-wrap { grid-template-columns: 1fr !important; }
  /* Pulse panels — stack on mobile */
  .pulse-panels-grid { grid-template-columns: 1fr !important; }

  /* Stat grid — coin detail */
  .stat-grid { grid-template-columns: repeat(2,1fr); }

  /* Mood history — coin detail */
  .mood-hist-row { grid-template-columns: repeat(2,1fr); }
  .health-hist-list { grid-template-columns: repeat(2,1fr); }

  /* About grid */
  .about-grid { grid-template-columns: 1fr; }

  /* Table — hide less critical columns on mobile */
  .data-table .company-cell { display: none; }
  .data-table th:nth-child(2) { display: none; }

  /* Ind tabs */
  .ind-tab { font-size: 0.7rem; padding: 4px 8px; }

  /* Section headers */
  .section-hd { flex-direction: column; gap: 0.2rem; align-items: flex-start; }

  /* Context bar */
  .context-bar { padding: 0.6rem 0.75rem; }
  .ctx-right { flex-wrap: wrap; }

  /* Chart */
  .chart-wrap { padding: 0.85rem 0.75rem; }

  /* Coin header */
  .coin-header { padding: 1rem; }
  .coin-hd-price { font-size: 1.3rem; }

  /* Page header */
  .page-title { font-size: 1.5rem; }

  /* Table footer legend — wrap nicely */
  .legend { gap: 0.6rem; }
  .leg-item { font-size: 0.62rem; }

  /* Sidebar full width on mobile */
  .sidebar { width: 100vw; }

  /* Pro pill — hide text on very small */
  .pro-pill { padding: 3px 8px; font-size: 0.65rem; }

  /* Filter toggle */
  .filter-toggle { font-size: 0.65rem; padding: 4px 7px; }
}

/* Pulse panels grid — defined for JS inline style override */
.pulse-panels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

/* ── Share & Export toolbar ─────────────────────────────────────────────── */
.share-toolbar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  align-items: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem 0.78rem;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
  white-space: nowrap;
}
.share-btn:hover          { background: var(--bg3); border-color: var(--brand); color: var(--brand); }
.share-btn:disabled       { opacity: 0.5; cursor: wait; }
.share-btn-pdf            { border-color: rgba(251,146,60,0.45); color: var(--orange); }
.share-btn-pdf:hover      { background: rgba(251,146,60,0.09); border-color: var(--orange); color: var(--orange); }
.share-btn-icon           { border-color: rgba(74,222,128,0.35); color: var(--green); }
.share-btn-icon:hover     { background: rgba(74,222,128,0.08); border-color: var(--green); color: var(--green); }

/* panel-level share button */
.panel-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s;
}
.panel-share-btn:hover     { border-color: var(--brand); color: var(--brand); }
.panel-share-btn:disabled  { opacity: 0.5; cursor: wait; }

/* ── Share Modal ────────────────────────────────────────────────────────── */
.cp-share-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.cp-share-modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
}

.cp-share-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.cp-share-title   { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.cp-share-close   { background: none; border: none; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.cp-share-close:hover { color: var(--text); }

.cp-share-preview {
  margin-bottom: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 200px;
}
.cp-share-preview img { display: block; width: 100%; object-fit: cover; }

.cp-share-soc {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.cp-soc-btn {
  flex: 1;
  text-align: center;
  padding: 0.42rem 0.4rem;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.14s;
  text-decoration: none;
  display: block;
}
.cp-soc-btn:hover { opacity: 0.82; }
.cp-soc-tw { background: #000; color: #fff; border: 1px solid #333; }
.cp-soc-wa { background: #25D366; color: #fff; }
.cp-soc-li { background: #0A66C2; color: #fff; }
.cp-soc-fb { background: #1877F2; color: #fff; }

.cp-share-link-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.cp-share-link-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-family: var(--mono);
  padding: 0.42rem 0.6rem;
  min-width: 0;
}
.cp-share-copy {
  padding: 0.42rem 0.8rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s, color 0.14s;
}
.cp-share-copy:hover { border-color: var(--brand); color: var(--brand); }

.cp-share-dl-btn {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.42rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: block;
  transition: border-color 0.14s, color 0.14s;
}
.cp-share-dl-btn:hover       { border-color: var(--green); color: var(--green); }
.cp-share-pdf-btn:hover      { border-color: var(--orange) !important; color: var(--orange) !important; }
.cp-share-dl-btn:disabled    { opacity: 0.5; cursor: wait; }

