/* ═══════════════════════════════════════════════════════════════════
   5280THETA DESIGN SYSTEM v2 — editorial fintech
   Type: Fraunces (display) · Inter (UI/body) · JetBrains Mono (figures)
   Loaded by every page via the shared nav component. Global overrides
   deliberately lift the generated pages (scan/briefing/weekly/…) into
   the same identity without touching their generators.
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Terminal-editorial palette: neutral graphite + warm paper ink.
     Deliberately NOT the navy+aqua default — this is a trading desk. */
  --bg: #0b0c0e;
  --surface: #131417;
  --surface-2: #0f1012;
  --line: #26282d;
  --line-soft: #1c1e22;
  --ink: #ece8dd;          /* warm paper, not blue-white */
  --ink-2: #cfc9bc;
  --muted: #98948a;
  --faint: #6b675e;
  --teal: #d4af37;         /* legacy alias — retargeted to editorial brass */
  --brite: #ffffff;        /* legacy alias — retargeted to stark white */
  --gold: #d4af37;         /* editorial brass — CTAs, kickers, wordmarks */
  --gold-2: #eecb6b;
  --up: #00e676;           /* momentum green — data only */
  --down: #ef5350;
  --amber: #d9a441;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --r: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 28px rgba(0,0,0,.3);
}

/* ── GLOBAL LIFT (applies to every page, incl. generated) ── */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans) !important;
  background: var(--bg) !important;
  color: var(--ink);
  font-feature-settings: "tnum" 1, "cv05" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
h1, h2 {
  font-family: var(--serif) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  color: var(--ink);
}
h3 { font-family: var(--sans); font-weight: 700; letter-spacing: .06em; }
a { transition: color .15s ease, border-color .15s ease, background .15s ease; }
::selection { background: var(--gold); color: #16130a; }
b, strong { font-weight: 600; }

/* figures read as figures */
td, .num { font-variant-numeric: tabular-nums; }

/* ── NAV (overrides the inline-styled shared component) ── */
nav {
  background: rgba(10, 14, 19, .88) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line) !important;
}
nav a {
  font-family: var(--sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: .02em !important;
  color: var(--muted) !important;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
nav a:hover { color: var(--ink) !important; }
nav a:first-child {
  font-family: var(--mono) !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: .14em !important;
  color: var(--ink) !important;
  border-bottom: none;
}

/* ── TABLES: the product is data — treat it like Barron's would ── */
table { border-collapse: collapse; }
th {
  font-family: var(--sans) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase;
  color: var(--faint) !important;
  border-bottom: 1px solid var(--line);
}
td { border-bottom-color: var(--line-soft) !important; }
tr:hover td { background: rgba(62, 198, 187, .045); }

/* ── CARDS (lifts every inline #101b26 box site-wide) ── */
div[style*="background:#101b26"], div[style*="background:#0d1f16"] {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  border-radius: var(--r) !important;
  box-shadow: var(--shadow);
}

/* ── LEGACY PALETTE REMAP — retires the navy/aqua defaults everywhere,
      including every generated page, without touching the generators ── */
[style*="background:#0a0f14"] { background: var(--bg) !important; }
[style*="background:rgba(10,15,20"] { background: rgba(11, 12, 14, .9) !important; }
[style*="border-bottom:1px solid #1c3040"], [style*="border:1px solid #1c3040"] { border-color: var(--line-soft) !important; }
[style*="color:#4ecdc4"] { color: var(--gold) !important; }
[style*="color:#5ee8df"] { color: #ffffff !important; }
[style*="color:#7d97a3"] { color: var(--muted) !important; }
[style*="color:#c8d6dc"], [style*="color:#dce8ec"] { color: var(--ink) !important; }
[style*="color:#9db4bf"], [style*="color:#c9dae2"], [style*="color:#93a9b4"] { color: var(--ink-2) !important; }
[style*="color:#52707e"], [style*="color:#5a7280"] { color: var(--faint) !important; }
[style*="color:#3fb950"], [style*="color:#2fbb4f"] { color: var(--up) !important; }
[style*="color:#e8766a"], [style*="color:#d64545"] { color: var(--down) !important; }
[style*="color:#e8a84e"] { color: var(--gold) !important; }

/* ── HOMEPAGE COMPONENT CLASSES ── */
.k {
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.display {
  font-family: var(--serif); font-weight: 500; color: var(--ink);
  font-size: clamp(34px, 6vw, 58px); line-height: 1.08; letter-spacing: -.01em;
}
.lede { font-size: clamp(15px, 2.2vw, 17.5px); color: var(--ink-2); line-height: 1.7; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: .01em;
  padding: 13px 24px; border-radius: 10px; text-decoration: none;
}
.btn.solid { background: var(--gold); color: #16130a; }
.btn.solid:hover { background: var(--gold-2); }
.btn.ghost { color: var(--ink-2); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px; box-shadow: var(--shadow);
}
.icon { width: 26px; height: 26px; stroke: var(--ink); fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rule { height: 1px; background: linear-gradient(90deg, var(--line), transparent); border: 0; }
.sec-h { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; }
.sec-h .t { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); font-weight: 500; }
.livedot { width: 7px; height: 7px; border-radius: 50%; background: var(--up);
  display: inline-block; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }

/* clickable data tiles (weekly/sectors boards) lift on hover */
a > div[style*="background:#101b26"] { transition: transform .15s ease, border-color .15s ease; }
a:hover > div[style*="background:#101b26"] { transform: translateY(-2px); border-color: var(--teal) !important; }

/* ── CLASS-BASED LEGACY TEAL (eth/leaps pages define their own <style>) ── */
h1, h2 { color: var(--ink) !important; border-left-color: var(--gold) !important; }
.s .v { color: #ffffff !important; }                 /* stat tile values */
.gate b, .mono, .math span { color: var(--gold-2) !important; }
.rule { background: var(--line) !important; }
a:not([style]):not(.btn):not(.brand) { color: var(--gold) !important; }
a[href*="tradingview.com"] { color: var(--gold) !important; }   /* every ticker link, site-wide */
[style*="border-left:3px solid #4ecdc4"] { border-left-color: var(--gold) !important; }
[style*="border-left:3px solid #5ee8df"] { border-left-color: var(--up) !important; }
[style*="rgba(78,205,196"] { background: var(--line) !important; }

/* ── THE FRONT RANGE — a hint of Rockies in shades of black ── */
body::before {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 34vh;
  z-index: -1; pointer-events: none; opacity: .6;
  background:
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%23121419' d='M0 320V246l68-52 54 40 74-78 62 52 88-96 72 66 60-38 84 70 66-52 92 82 76-58 90 72 70-44 88 66 72-50 84 60 60-34 80 56V320Z'/%3E%3Cpath fill='%230e1014' d='M0 320V212l96-70 70 54 96-104 84 78 74-48 100 84 88-66 104 90 92-60 108 78 96-52 112 72 100-58 120 76V320Z'/%3E%3C/svg%3E")
    bottom center / 100% 100% no-repeat;
}

/* ── MOBILE ── */
@media (max-width: 760px) {
  /* tables: horizontal scroll WITH a visible slim gold scrollbar so it's
     obvious they swipe, plus a right-edge fade cue that more exists */
  table {
    display: block; overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch; max-width: 100%;
    scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }
  table::-webkit-scrollbar { height: 5px; }
  table::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

  /* NAV: keep it swipeable but SHOW the scrollbar + a "swipe" hint + fade */
  nav > div, .nav .links {
    flex-wrap: nowrap !important; overflow-x: auto; white-space: nowrap;
    gap: 16px !important; scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
  }
  nav > div::-webkit-scrollbar, .nav .links::-webkit-scrollbar { height: 4px; }
  nav > div::-webkit-scrollbar-thumb, .nav .links::-webkit-scrollbar-thumb {
    background: var(--gold); border-radius: 3px; }
  nav a, .nav .links a { flex: 0 0 auto; }

  body { padding: 12px !important; }
  .wrap { padding: 18px 10px !important; }
  iframe { max-width: 100% !important; }

  /* one-line swipe cue under any wide data table */
  .scrollcue { display: block; color: var(--faint); font-size: 11px;
    letter-spacing: .04em; margin: 2px 2px 8px; }
}
@media (min-width: 761px) { .scrollcue { display: none; } }
@media (max-width: 420px) {
  .btn { padding: 11px 16px; font-size: 13px; }
}
