/* ============================================================
   ZEME AI — Professional Financial Platform
   White theme · Bloomberg-inspired · 2026
   ============================================================ */

/* Google Fonts loaded via HTML <link> — removed @import to prevent double request */

:root {
  --bg:      #FFFFFF;
  --bg2:     #F8FAFC;
  --bg3:     #F1F5F9;
  --card:    #FFFFFF;
  --border:  #E2E8F0;
  --border2: #CBD5E1;

  --navy:    #0F2850;
  --blue:    #1D4ED8;
  --blue2:   #3B82F6;
  --blue-lt: #EFF6FF;
  --teal:    #0891B2;

  --green:   #15803D;
  --green-bg:#F0FDF4;
  --green-bd:#BBF7D0;

  --red:     #DC2626;
  --red-bg:  #FEF2F2;
  --red-bd:  #FECACA;

  --yellow:  #B45309;
  --yellow-bg:#FFFBEB;

  --text:    #0F172A;
  --text2:   #475569;
  --text3:   #94A3B8;
  --text4:   #CBD5E1;

  --font:    'Inter', -apple-system, sans-serif;
  --mono:    'DM Mono', 'Courier New', monospace;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.06);

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; }
/* overflow-x:clip on <html> caps the layout viewport at device width so a stray
   over-wide element can't expand it and zoom the whole page out on mobile (UAT
   2026-07-15). clip (not hidden) is used so position:sticky nav still works. */
body  { background: var(--bg2); color: var(--text); font-family: var(--font); line-height: 1.6; overflow-x: clip; }
h1,h2,h3,h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p  { color: var(--text2); }
a  { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--navy); }
img { max-width: 100%; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container   { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.page-wrap   { padding-top: 64px; } /* navbar height */

.section     { padding: 64px 0; }
.section-sm  { padding: 40px 0; }

/* ── TYPOGRAPHY UTILITIES ────────────────────────────────────── */
.text-sm  { font-size: .82rem; }
.text-xs  { font-size: .72rem; }
.mono     { font-family: var(--mono); }
.fw-600   { font-weight: 600; }
.fw-700   { font-weight: 700; }
.fw-800   { font-weight: 800; }
.text2    { color: var(--text2); }
.text3    { color: var(--text3); }

/* ── COLORS ──────────────────────────────────────────────────── */
.green  { color: var(--green); }
.red    { color: var(--red); }
.blue   { color: var(--blue); }
.navy   { color: var(--navy); }
.teal   { color: var(--teal); }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-block; font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 100px; letter-spacing: .3px;
  white-space: nowrap;
}
.badge-green  { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-bd); }
.badge-red    { background: var(--red-bg);    color: var(--red);    border: 1px solid var(--red-bd); }
.badge-blue   { background: #EFF6FF; color: var(--blue);   border: 1px solid #BFDBFE; }
.badge-teal   { background: #F0FDFA; color: var(--teal);   border: 1px solid #99F6E4; }
.badge-navy   { background: #EFF6FF; color: var(--navy);   border: 1px solid #BFDBFE; }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid #FDE68A; }
.badge-gray   { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--r);
  font-size: .88rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .18s; text-decoration: none;
  font-family: var(--font);
}
.btn-primary {
  background: var(--navy); color: #fff;
  box-shadow: 0 2px 8px rgba(15,40,80,.2);
}
.btn-primary:hover { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(29,78,216,.3); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--blue2); color: var(--blue); background: #EFF6FF; }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .8rem; border-radius: var(--r-sm); }
.btn-lg { padding: 12px 28px; font-size: .95rem; }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-hover { transition: box-shadow .2s, border-color .2s, transform .2s; }
.card-hover:hover {
  box-shadow: var(--shadow);
  border-color: var(--border2);
  transform: translateY(-1px);
}

/* ── NAV ─────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 64px; background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.nav-inner {
  height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 0;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.25rem; color: var(--navy);
  text-decoration: none; flex-shrink: 0; margin-right: 20px;
}
.nav-logo-icon {
  width: 32px; height: 32px; background: var(--navy);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1rem;
}
.nav-logo-sub { color: var(--blue2); }
/* (BETA badge removed from the ZEME logo) */

.nav-links {
  display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0;
  flex-wrap: nowrap;   /* no overflow clip — dropdown menus must be able to escape */
}
/* stock search in the navbar — professional always-visible bar with prefix
   autocomplete (search.js): typing "HB" lists HBL, HBLPS, HUBC… sym-first. */
.nav-search { margin-left: auto; flex-shrink: 1; min-width: 150px; max-width: 230px; }
.nav-search input {
  width: 100%; padding: 7px 12px 7px 32px; border: 1px solid var(--border2);
  border-radius: 999px; font-size: .82rem; font-family: var(--font); color: var(--text);
  background: var(--bg2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394A3B8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 11px center;
  outline: none; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.nav-search input::placeholder { color: var(--text3); }
.nav-search input:focus { border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 3px rgba(29,78,216,.10); }

/* AI Chat — a professional accent pill so the flagship feature stands out */
.nav-chat {
  margin-left: 8px; padding: 6px 13px !important; border-radius: 999px;
  background: var(--blue-lt, #EFF6FF); color: var(--blue) !important; font-weight: 700 !important;
  border: 1px solid #DBEAFE; flex-shrink: 0;
}
.nav-chat:hover { background: var(--blue); color: #fff !important; border-color: var(--blue); }
/* ZEME Blue premium-feature marker — a small "ZEME" in blue */
.zblue-tag { font-size: .5rem; font-weight: 800; letter-spacing: .05em; color: #1d4ed8;
  background: rgba(29,78,216,.12); padding: 1px 5px; border-radius: 5px; margin-left: 5px;
  vertical-align: middle; text-transform: uppercase; }
.nav-link {
  padding: 6px 7px; border-radius: var(--r-sm);
  font-size: .82rem; font-weight: 500; color: var(--text2);
  text-decoration: none; white-space: nowrap; transition: all .15s;
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.nav-link:hover { background: var(--bg3); color: var(--text); }
.nav-link.active { background: #EFF6FF; color: var(--blue); font-weight: 600; }

.nav-divider { width: 1px; height: 24px; background: var(--border); margin: 0 8px; flex-shrink: 0; }

/* ── NAV DROPDOWN ────────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 5px;
}
.nav-dropdown-toggle .dd-arrow {
  font-size: .6rem; color: var(--text3); transition: transform .2s;
  line-height: 1;
}
.nav-dropdown:hover .dd-arrow,
.nav-dropdown.open .dd-arrow { transform: rotate(180deg); color: var(--blue); }

.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  min-width: 260px; z-index: 600; padding: 6px;
  animation: dd-fade .15s ease;
}
@keyframes dd-fade { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu { display: block; }   /* hover fallback for pages without main.js */

/* ── SIGN-IN GATE (blur premium content for logged-out visitors) ── */
#zeme-gate {
  position: fixed; inset: 0; z-index: 900; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(15,40,80,.30);
}
.zeme-gate-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(15,40,80,.28); max-width: 420px; width: 100%;
  padding: 36px 32px; text-align: center;
}
.zeme-gate-ic {
  font-size: 1.8rem; width: 62px; height: 62px; margin: 0 auto 16px;
  background: var(--blue-lt); border-radius: 16px; display: flex;
  align-items: center; justify-content: center;
}
.zeme-gate-card h2 { font-size: 1.28rem; color: var(--navy); margin-bottom: 10px; letter-spacing: -.4px; }
.zeme-gate-card p { color: var(--text2); font-size: .92rem; margin-bottom: 22px; line-height: 1.6; }
.zeme-gate-btns { display: flex; flex-direction: column; gap: 10px; }
.zeme-gate-p { background: var(--blue); color: #fff; padding: 13px; border-radius: 10px; font-weight: 700; font-size: .95rem; text-decoration: none; }
.zeme-gate-p:hover { background: var(--navy); }
.zeme-gate-s { color: var(--blue); padding: 11px; border-radius: 10px; font-weight: 600; font-size: .9rem; text-decoration: none; border: 1px solid var(--border2); }
.zeme-gate-s:hover { background: var(--bg3); }
.zeme-gate-note { color: var(--text3); font-size: .76rem; margin-top: 16px; }

.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: .85rem; font-weight: 500; color: var(--text2);
  text-decoration: none; transition: all .12s; cursor: pointer;
}
.nav-dropdown-item:hover { background: #EFF6FF; color: var(--blue); }
.nav-dropdown-item.active { background: #EFF6FF; color: var(--blue); font-weight: 600; }
.nav-dropdown-item .dd-icon {
  width: 28px; height: 28px; border-radius: 7px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0; transition: background .12s;
}
.nav-dropdown-item:hover .dd-icon { background: #DBEAFE; }
.nav-dropdown-item .dd-badge {
  margin-left: auto; font-size: .65rem; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; background: linear-gradient(135deg,#1d4ed8,#0891b2);
  color: #fff; letter-spacing: .3px; white-space: nowrap;
}
.nav-dropdown-sep {
  height: 1px; background: var(--border); margin: 5px 6px;
}
.nav-dropdown-section {
  font-size: .68rem; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .8px;
  padding: 8px 12px 3px;
}

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* ── NAV MID-WIDTH DEAD ZONE (1025–1400px) ────────────────────────────
   The mobile nav only takes over at <=1024px, but the full desktop set
   (6 links + search + Ask-ZEME pill + Pricing/Login/Join Free) needs ~1400px.
   Between those widths .nav-links — flex-wrap:nowrap and deliberately NOT
   overflow-clipped so its dropdowns can escape — overflowed its box and
   painted straight OVER .nav-right: at 1280px "Ask ZEME" collided with the
   search box and Login, rendering as "Ask ZEMEg ZE". 1280/1366 are very
   common laptop + Chromebook widths, so real users saw a broken header.
   Found + verified 2026-07-15. Fix: shed width progressively instead of
   letting content collide. */
@media (min-width: 1025px) and (max-width: 1400px) {
  .nav-inner { padding: 0 12px; }
  .nav-logo  { margin-right: 10px; font-size: 1.12rem; }
  .nav-link  { padding: 6px 5px; font-size: .78rem; }
  .nav-search { min-width: 110px; max-width: 160px; }
  .nav-chat  { margin-left: 6px; padding: 5px 9px !important; }
  .nav-chat .zblue-tag { display: none; }   /* the pill text alone reads fine here */
  .nav-right { gap: 6px; }
}
/* Tightening alone is not enough below ~1180px. Shed the two most discretionary
   blocks so the primary links + auth actions never collide: the search bar
   (every page carries its own search) and the Pricing link (still in the
   footer, the hamburger menu, and reachable from Join Free). Verified at
   1030px — the tightest desktop width, one pixel above the mobile nav. */
@media (min-width: 1025px) and (max-width: 1180px) {
  .nav-search { display: none; }
  .nav-right .nav-link { display: none; }   /* Pricing — kept in footer + hamburger */
  .nav-link { padding: 5px 4px; font-size: .75rem; }
  .nav-chat { margin-left: 4px; padding: 5px 7px !important; }
  .nav-logo { font-size: 1.05rem; margin-right: 6px; }
}

/* ── GLOBAL STOCK SEARCH ─────────────────────────────────────── */
.nav-search-wrap { position: relative; flex-shrink: 0; }
.nav-search-input {
  width: 220px; height: 36px; padding: 0 12px 0 34px;
  border: 1.5px solid var(--border); border-radius: 20px;
  font-size: .84rem; color: var(--text1); background: var(--bg2);
  outline: none; transition: border .2s, width .2s, box-shadow .2s;
  font-family: var(--sans);
}
.nav-search-input:focus {
  border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12); width: 260px;
}
.nav-search-input::placeholder { color: var(--text3); }
.nav-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text3); pointer-events: none; font-size: .9rem;
}
.nav-search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  min-width: 300px; max-height: 360px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 9999; display: none;
}
.nav-search-dropdown.open { display: block; }
.nsd-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; cursor: pointer; transition: background .12s;
  border-bottom: 1px solid var(--bg3); gap: 8px;
}
.nsd-item:last-child { border-bottom: none; }
.nsd-item:hover { background: var(--bg2); }
.nsd-sym  { font-weight: 700; font-size: .84rem; color: var(--navy); min-width: 52px; font-family: var(--mono); }
.nsd-name { font-size: .78rem; color: var(--text2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsd-price{ font-size: .78rem; color: var(--text3); font-family: var(--mono); flex-shrink: 0; }
.nsd-empty{ padding: 14px; text-align: center; color: var(--text3); font-size: .82rem; }

.hamburger { display: none; border: none; background: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text2); margin: 4px 0; border-radius: 2px; transition: .3s; }

/* ── MARKET TICKER BAR ───────────────────────────────────────── */
.ticker-bar {
  background: var(--navy);
  padding: 0;
  overflow: hidden;
  height: 36px;
}
.ticker-inner {
  display: flex; align-items: center; height: 100%;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-bar:hover .ticker-inner { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 24px; }
.ticker-sym { font-weight: 700; font-size: .8rem; color: #fff; }
.ticker-price { font-family: var(--mono); font-size: .78rem; color: #CBD5E1; }
.ticker-chg { font-family: var(--mono); font-size: .75rem; font-weight: 600; }
.ticker-chg.up   { color: #4ADE80; }
.ticker-chg.down { color: #F87171; }
.ticker-sep { color: #334155; padding: 0 4px; }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.section-title { font-size: 1.05rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-icon { font-size: 1rem; }
.section-link { font-size: .82rem; color: var(--blue); font-weight: 600; white-space: nowrap; }

/* ── INDEX CARDS ─────────────────────────────────────────────── */
.index-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 1px; background: var(--border); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.idx-card {
  background: var(--card); padding: 18px 22px;
  cursor: default; transition: background .15s;
}
.idx-card:hover { background: var(--bg2); }
.idx-label { font-size: .72rem; font-weight: 700; color: var(--text3); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 6px; }
.idx-val   { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--text); }
.idx-chg   { font-family: var(--mono); font-size: .82rem; font-weight: 600; margin-top: 4px; }

/* ── DATA TABLE ──────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  padding: 10px 14px; text-align: left; font-size: .72rem; font-weight: 700;
  color: var(--text3); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--border); background: var(--bg2);
  white-space: nowrap; cursor: pointer; user-select: none;
}
.data-table th:hover { color: var(--text); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--bg3); vertical-align: middle; }
.data-table tbody tr:hover td { background: var(--bg2); }
.data-table tbody tr:last-child td { border-bottom: none; }

.sym-cell { font-weight: 700; color: var(--navy); font-size: .9rem; }
.sym-cell a { color: inherit; }
.sym-cell a:hover { color: var(--blue); }
.co-name  { font-size: .78rem; color: var(--text3); margin-top: 2px; }
.price-cell { font-family: var(--mono); font-weight: 600; text-align: right; }
.chg-cell   { font-family: var(--mono); font-weight: 700; text-align: right; font-size: .85rem; }
.chg-cell.up   { color: var(--green); }
.chg-cell.down { color: var(--red); }
.vol-cell   { font-family: var(--mono); font-size: .82rem; color: var(--text2); text-align: right; }
.num-cell   { font-family: var(--mono); text-align: right; }

/* ── TABS ────────────────────────────────────────────────────── */
.tab-bar { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 16px; gap: 0; overflow-x: auto; }
.tab-btn {
  padding: 10px 20px; font-size: .85rem; font-weight: 600; color: var(--text3);
  background: none; border: none; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .15s; font-family: var(--font);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: .72rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); font-family: var(--mono); }
.stat-sub   { font-size: .78rem; color: var(--text3); margin-top: 4px; }

/* ── MINI SPARKLINE ──────────────────────────────────────────── */
.sparkline { display: inline-flex; align-items: flex-end; gap: 2px; height: 28px; }
.spark-bar { width: 4px; border-radius: 2px 2px 0 0; background: var(--border2); }
.spark-bar.up   { background: var(--green); opacity: .7; }
.spark-bar.down { background: var(--red); opacity: .7; }
.spark-bar.last { opacity: 1; }

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.progress-wrap { height: 5px; background: var(--bg3); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 100px; }

/* ── FV METER (discount visual) ─────────────────────────────── */
.fv-meter { height: 6px; background: var(--bg3); border-radius: 100px; overflow: hidden; position: relative; }
.fv-fill  { height: 100%; border-radius: 100px; }
.fv-fill.cheap    { background: linear-gradient(90deg, #15803D, #4ADE80); }
.fv-fill.pricey   { background: linear-gradient(90deg, #DC2626, #F87171); }
.fv-fill.fair     { background: linear-gradient(90deg, #1D4ED8, #60A5FA); }

/* ── SIGNAL CARDS ────────────────────────────────────────────── */
.sig-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--shadow-sm); transition: all .2s;
  position: relative; overflow: hidden;
}
.sig-card:hover { box-shadow: var(--shadow); border-color: var(--border2); transform: translateY(-2px); }
.sig-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; }
.sig-fl::before  { background: #15803D; }
.sig-la::before  { background: var(--blue); }
.sig-el::before  { background: var(--yellow); }

.sig-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.sig-sym { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.sig-conf-num { font-size: .78rem; font-weight: 700; color: var(--text3); }

.conf-meter { height: 4px; background: var(--bg3); border-radius: 100px; overflow: hidden; margin: 4px 0 12px; }
.conf-fill  { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--blue2), var(--navy)); }

.sig-mets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.sig-met-lbl { font-size: .66rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.sig-met-val { font-size: .88rem; font-weight: 600; font-family: var(--mono); margin-top: 1px; }

/* ── PHASE PILL ──────────────────────────────────────────────── */
.phase-pill { font-size: .65rem; font-weight: 700; padding: 3px 8px; border-radius: 100px; letter-spacing: .5px; white-space: nowrap; }
.ph-fl  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.ph-la  { background: #EFF6FF; color: var(--blue); border: 1px solid #BFDBFE; }
.ph-el  { background: var(--yellow-bg); color: var(--yellow); border: 1px solid #FDE68A; }
.ph-wa  { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }
.ph-ru  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.ph-di  { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-bd); }

/* ── HERO HOMEPAGE ───────────────────────────────────────────── */
.homepage-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1E3A5F 40%, #0C4A6E 100%);
  padding: 72px 0 80px; position: relative; overflow: hidden;
}
.homepage-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero-label  { font-size: .75rem; font-weight: 700; color: #7DD3FC; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.hero-h1     { color: #fff; margin-bottom: 20px; font-size: clamp(2rem, 4vw, 3rem); }
.hero-h1 span{ color: #7DD3FC; }
.hero-p      { color: #BAE6FD; font-size: 1.1rem; max-width: 580px; margin-bottom: 36px; }
.hero-btns   { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-white   { background: #fff; color: var(--navy); }
.btn-white:hover { background: #F1F5F9; color: var(--navy); }
.btn-ghost-white { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost-white:hover { background: rgba(255,255,255,.2); color: #fff; }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.h-stat-num { font-size: 1.8rem; font-weight: 800; color: #fff; font-family: var(--mono); line-height: 1; }
.h-stat-lbl { font-size: .75rem; color: #7DD3FC; margin-top: 4px; font-weight: 500; }

.hero-graphic {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-xl); padding: 20px;
}

/* ── FEATURE CARDS ───────────────────────────────────────────── */
.feat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
  box-shadow: var(--shadow-sm); transition: all .2s;
}
.feat-card:hover { box-shadow: var(--shadow); border-color: var(--border2); }
.feat-icon-wrap { width: 44px; height: 44px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 16px; }
.feat-icon-blue   { background: #EFF6FF; }
.feat-icon-green  { background: var(--green-bg); }
.feat-icon-teal   { background: #F0FDFA; }
.feat-icon-yellow { background: var(--yellow-bg); }
.feat-icon-red    { background: var(--red-bg); }
.feat-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feat-card p  { font-size: .88rem; line-height: 1.65; }

/* ── CHART PREVIEW ───────────────────────────────────────────── */
.chart-preview {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px; overflow: hidden;
}
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.chart-bar  { flex: 1; border-radius: 2px 2px 0 0; }

/* ── NEWS CARDS ──────────────────────────────────────────────── */
.news-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm);
  transition: all .2s;
}
.news-card:hover { box-shadow: var(--shadow); }
.news-tag   { font-size: .68rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.news-title { font-size: .92rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.news-meta  { font-size: .75rem; color: var(--text3); }

/* ── PRICING ─────────────────────────────────────────────────── */
.price-card { background: var(--card); border: 2px solid var(--border); border-radius: var(--r-xl); padding: 36px 28px; position: relative; transition: all .2s; }
.price-card:hover { border-color: var(--border2); box-shadow: var(--shadow); }
.price-featured { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(15,40,80,.06); }
.price-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 3px 14px; border-radius: 100px; font-size: .68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.price-name   { font-size: .75rem; font-weight: 700; color: var(--text3); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.price-amount { font-size: 2.8rem; font-weight: 800; color: var(--navy); line-height: 1; font-family: var(--mono); }
.price-period { color: var(--text3); font-size: .85rem; margin-bottom: 24px; margin-top: 4px; }
.price-divider { height: 1px; background: var(--border); margin-bottom: 24px; }
.price-list   { list-style: none; margin-bottom: 28px; }
.price-list li { padding: 7px 0; font-size: .88rem; border-bottom: 1px solid var(--bg3); display: flex; align-items: flex-start; gap: 8px; }
.price-list li:last-child { border: none; }
.price-list li.yes { color: var(--text2); }
.price-list li.yes::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.price-list li.no  { color: var(--text3); }
.price-list li.no::before  { content: '—'; color: var(--text4); font-weight: 700; flex-shrink: 0; }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q    { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; cursor: pointer; font-weight: 600; gap: 16px; color: var(--text); }
.faq-q:hover { color: var(--blue); }
.faq-icon { font-size: 1.2rem; color: var(--text3); flex-shrink: 0; transition: transform .25s; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--blue); }
.faq-ans { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s; color: var(--text2); font-size: .92rem; line-height: 1.7; }
.faq-item.open .faq-ans { max-height: 300px; padding-bottom: 16px; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer { background: var(--navy); color: #94A3B8; padding: 60px 0 32px; }
.footer-logo { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-tagline { font-size: .85rem; color: #64748B; max-width: 260px; line-height: 1.5; }
.footer-col h5 { font-size: .72rem; font-weight: 700; color: #CBD5E1; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a  { display: block; font-size: .88rem; color: #64748B; margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: .8rem; color: #475569; }

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.page-header { background: var(--card); border-bottom: 1px solid var(--border); padding: 32px 0 28px; }
.page-header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-header p  { font-size: .92rem; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text3); margin-bottom: 12px; }
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--blue); }

/* ── SIDEBAR LAYOUT ──────────────────────────────────────────── */
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.content-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; align-items: start; }

/* ── LOADING / EMPTY ─────────────────────────────────────────── */
/* Skeleton shimmer (2026-07-13, audit #7 loading UX): turns "Loading…"
   placeholders into an animated grey bar so first paint reads as working,
   not broken. Applied to .loading-row / .loading-msg and any element the
   skeletonizer in main.js tags with .zskel. */
@keyframes zshimmer { 0% { background-position: -360px 0; } 100% { background-position: 360px 0; } }
.loading-row, .loading-msg, .zskel {
  color: transparent !important;
  background-image: linear-gradient(90deg, var(--bg2,#f1f5f9) 8%, var(--border,#e2e8f0) 24%, var(--bg2,#f1f5f9) 42%) !important;
  background-size: 720px 100%;
  animation: zshimmer 1.25s linear infinite;
  border-radius: 8px;
  user-select: none;
}
.loading-row *, .loading-msg *, .zskel * { visibility: hidden; }
.loading-row { text-align: center; padding: 40px; color: var(--text3); font-size: .9rem; }
.empty-state { text-align: center; padding: 60px 24px; color: var(--text3); }
.empty-icon  { font-size: 2.5rem; margin-bottom: 12px; }

/* ── PILL FILTERS ────────────────────────────────────────────── */
.pill-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { padding: 5px 14px; border-radius: 100px; font-size: .8rem; font-weight: 600; border: 1px solid var(--border); color: var(--text2); background: var(--card); cursor: pointer; transition: all .15s; }
.pill:hover  { border-color: var(--blue2); color: var(--blue); }
.pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── INLINE TOOLTIP ──────────────────────────────────────────── */
.tip {
  position: relative; border-bottom: 1px dashed var(--border2);
  cursor: help; color: inherit;
}
.tip-box {
  position: fixed; z-index: 9999; background: var(--navy); color: #fff;
  border-radius: var(--r); padding: 8px 14px; font-size: .78rem; line-height: 1.5;
  max-width: 240px; pointer-events: none; opacity: 0; transition: opacity .15s;
  box-shadow: var(--shadow-lg);
}
.tip-box.show { opacity: 1; }

/* ── SCROLL REVEAL ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content-grid   { grid-template-columns: 1fr; }
  .content-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  /* dense 6-direct-link nav needs real width; below 1200 use the stacked
     hamburger menu instead of a cramped/overflowing horizontal bar. */
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 16px 20px; gap: 4px; z-index: 499; box-shadow: var(--shadow); max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-links.open .nav-search input { width: 100%; }
  .nav-links.open .nav-dropdown-menu { position: static; display: block; box-shadow: none; border: none; padding-left: 12px; }
  .hamburger { display: block; }
  .homepage-hero { padding: 48px 0 56px; }
  .hero-stats { gap: 24px; }
  .content-grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-btns { flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
  .nav-search-wrap { display: none; }
  /* MOBILE NAV OVERFLOW FIX (2026-07-17): on phones the hamburger appears but
     .nav-right (Pricing + Login + Join Free) was never trimmed, so it spilled
     ~100px past a 390px screen and clipped the hamburger. Keep only the primary
     Join Free CTA + hamburger; Pricing & Login stay reachable in the hamburger
     menu and footer. Verified via CDP at 390px (offenders 6 -> 0). */
  .nav-right .nav-link,
  .nav-right .btn-secondary { display: none; }
  .section { padding: 40px 0; }
  .section-sm { padding: 24px 0; }
  h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .sig-card { padding: 16px; }
  .feat-card { padding: 18px; }
  .data-table { font-size: .82rem; }
  .data-table th, .data-table td { padding: 8px 10px; }
}

/* ── RESPONSIVE DATA TABLES (mobile UAT fix 2026-07-15) ───────────
   Wide multi-column tables were forcing the whole layout viewport wider than
   the phone (e.g. valuation 944px, fundamentals 861px, screener 1040px). With
   body{overflow-x:hidden} that CLIPPED the extra columns off-screen and made
   them unreachable. Make the table its own horizontal-scroll box so the page
   body stays at device width and only the table scrolls. */
@media (max-width: 768px) {
  .data-table, .data-tbl, .flow-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── TOUCH TARGETS — 44×44px minimum per Google/WCAG ─────────── */
.btn, .nav-link, .tab-btn, .pill { min-height: 40px; }
.hamburger { min-width: 44px; min-height: 44px; display: flex; flex-direction: column; justify-content: center; align-items: center; }

/* ── REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker-inner { animation: none; }
}

/* ── PRINT ───────────────────────────────────────────────────── */
@media print {
  .navbar, .ticker-bar, .footer, .chatbot-widget, .nav-right { display: none !important; }
  .page-wrap { padding-top: 0; }
  body { background: #fff; color: #000; }
}
