/* World Knowledge — UI. Light-first, welcoming (NerdWallet) with a data-pro feel
   (TradingView) and a Finviz-style insider heatmap. Light/dark via [data-theme]. */

:root {
  /* ---- Dark theme (default) — "Download Anything", lime on black ---- */
  --bg: #000000;
  --bg-2: #0c0c10;
  --card: #15151c;
  --card-2: #1e1e27;
  --ink: #f4f4f6;
  --ink-2: #c7c7d2;
  --muted: #9a9aab;
  --border: #25252f;
  --border-2: #1e1e27;

  --accent: #c8ff2e;        /* vert citron, couleur de marque */
  --accent-deep: #d7ff63;   /* survol (plus clair) */
  --accent-ink: #c8ff2e;    /* texte/lien accent sur fond sombre */
  --accent-soft: #1f2a0a;
  --on-accent: #0b0b0f;     /* texte noir sur un fond accent */

  --red: #ff7b6e;
  --red-ink: #ff9d93;
  --red-soft: rgba(255,123,110,.14);
  --amber: #d4a24a;

  --chip-bg: #1e1e27;
  --chip-ink: #c7c7d2;

  --nav-bg: rgba(0,0,0,.8);
  --hero-wash: transparent;
  --hero-grid: transparent;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow-md: 0 2px 14px -4px rgba(0,0,0,.55);
  --shadow-lg: 0 12px 36px -16px rgba(0,0,0,.65);

  --r: 12px;
  --r-sm: 9px;
  --maxw: 1120px;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: var(--sans);
  --pie1:#c8ff2e; --pie2:#62b6ff; --pie3:#ffb24d; --pie4:#b98bff;
  --pie5:#3fd6c9; --pie6:#ff7b6e; --pie7:#ffe24d; --pie8:#9a9aab;
}

:root[data-theme="light"] {
  --bg: #f4f4f1;
  --bg-2: #ecece6;
  --card: #ffffff;
  --card-2: #ecece6;
  --ink: #111115;
  --ink-2: #3a3a44;
  --muted: #5d5e6c;
  --border: #e2e2dc;
  --border-2: #ecece6;

  --accent: #c8ff2e;
  --accent-deep: #b8f016;
  --accent-ink: #4d7c0f;    /* lime lisible en texte sur fond clair */
  --accent-soft: #f2fbd9;
  --on-accent: #0b0b0f;

  --red: #b42318;
  --red-ink: #9a1d13;
  --red-soft: #f6e3e1;
  --amber: #a56a0c;

  --chip-bg: #ecece6;
  --chip-ink: #3a3a44;

  --nav-bg: rgba(244,244,241,.85);
  --hero-wash: transparent;
  --hero-grid: transparent;

  --shadow-sm: 0 1px 2px rgba(20,20,18,.05);
  --shadow-md: 0 2px 10px -4px rgba(20,20,18,.12);
  --shadow-lg: 0 10px 30px -14px rgba(20,20,18,.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  background-image: radial-gradient(60rem 36rem at 85% -12rem,
    color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  background-repeat: no-repeat; background-attachment: fixed;
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 30; background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--on-accent); font-size: 14px; line-height: 1; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 400; padding: 2px 0;
  transition: color .14s; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .nav-links { gap: 15px; } }
.nav-meta { color: var(--muted); font-size: 12px; margin: 0 4px; font-variant-numeric: tabular-nums; }
.theme-toggle { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  margin-left: 4px; transition: background .14s, color .14s, border-color .14s; }
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .nav-meta { display: none; } .nav-link { padding: 7px 10px; } }

/* ---- Buttons / pills ---- */
.pill { border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--ink);
  transition: transform .05s, box-shadow .15s, background .15s; }
.pill:hover { box-shadow: var(--shadow-sm); }
.pill:active { transform: translateY(1px); }
.pill-green { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill-green:hover { background: var(--accent-deep); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: -.01em;
  padding: 12px 22px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  transition: transform .06s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.btn:active { transform: translateY(1px); }
.btn { font-weight: 700; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); background: var(--card-2); }

/* ---- Layout wrappers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 28px 22px 72px; width: 100%; }
.loading-full { max-width: var(--maxw); margin: 90px auto; text-align: center; color: var(--muted); }

/* ---- HERO (editorial, left-aligned) ---- */
.hero { position: relative; background: transparent; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 58px 22px 44px; text-align: left; }
.hero-kicker { display: inline-block; font-size: 12.5px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--muted);
  background: none; border: 0; padding: 0; border-radius: 0; margin-bottom: 18px; }
.hero-kicker::before { content: none; }
.hero h1 { font-family: var(--serif); font-weight: 800;
  font-size: clamp(44px, 7vw, 76px); line-height: 1.0; letter-spacing: -.035em; margin: 0 0 18px; color: var(--ink); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--accent-ink); font-weight: 800; }
.hero p { color: var(--muted); font-size: clamp(15px, 1.8vw, 17px); line-height: 1.6;
  margin: 0 0 28px; max-width: 540px; }
.hero-cta { display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }
.hero-stat { margin-top: 26px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-start; }
.hero-stat b { color: var(--ink-2); font-weight: 700; }
.hero-stat .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }

/* ---- Section shell ---- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; width: 100%; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 0 0 4px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: -.02em; margin: 0; }
.section-head .sub { color: var(--muted); font-size: 13.5px; }

/* ---- Finviz-style heatmap ---- */
.heatmap-section { max-width: var(--maxw); margin: 34px auto 10px; padding: 0 22px; width: 100%; }
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.hm-head h2 { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: -.02em; margin: 0; }
.hm-head p { color: var(--muted); font-size: 13px; margin: 4px 0 0; max-width: 620px; }
.hm-seg { display: inline-flex; background: var(--chip-bg); border-radius: 999px; padding: 3px; gap: 2px; }
.hm-seg button { border: none; background: transparent; color: var(--ink-2); font-family: inherit;
  font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: all .14s; white-space: nowrap; }
.hm-seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Dark substrate so the colored tiles read like an embedded market widget, in both themes. */
.hm-panel { background: #0c1016; border: 1px solid #1c232d; border-radius: var(--r);
  padding: 10px; box-shadow: var(--shadow-md); }
.heatmap { position: relative; width: 100%; }
.hm-tile { position: absolute; overflow: hidden; border-radius: 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-align: center; padding: 2px; transition: filter .12s, transform .12s; }
.hm-tile:hover { filter: brightness(1.12); z-index: 5; }
.hm-tile .t { font-weight: 800; letter-spacing: -.02em; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.hm-tile .c { font-weight: 600; opacity: .95; line-height: 1.1; margin-top: 2px; text-shadow: 0 1px 2px rgba(0,0,0,.3); font-variant-numeric: tabular-nums; }
.hm-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px;
  color: var(--muted); font-size: 12px; }
.hm-scale { display: inline-flex; align-items: center; gap: 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.hm-scale span { width: 26px; height: 14px; display: block; }
.hm-scale-lbl { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 560px) { .hm-head h2 { font-size: 21px; } }

/* En-tête compact : la carte prime, le texte est minimal. */
.hm-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 12px; }
.hm-bar h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.025em; margin: 0; }
.hm-legend-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 12px; font-variant-numeric: tabular-nums; }
.hm-foot { color: var(--muted); font-size: 11.5px; margin: 10px 2px 0; }

/* ---- Toolbar / search ---- */
.wrap-list { padding-top: 34px; }
.toolbar { display: flex; gap: 12px; align-items: center; margin: 20px 0 18px; }
.search { flex: 1; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); font-size: 14.5px; font-family: inherit; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: border-color .14s, box-shadow .14s; }
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.count-chip { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- People cards grid (3 per row, large portrait) ---- */
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 920px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .people-grid { grid-template-columns: 1fr; } }

.pcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 24px 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 3px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .12s, border-color .18s; }
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--accent); }

.avatar { border-radius: 13px; display: grid; place-items: center;
  color: #fff; font-weight: 700; letter-spacing: -.02em; flex: none; }

.pc-media { position: relative; margin-bottom: 11px; }
.avatar-xl { position: relative; width: 96px; height: 96px; border-radius: 50%; font-size: 30px;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.4), inset 0 0 0 3px rgba(255,255,255,.22); overflow: hidden; }
/* Photo réelle (si fournie) : recouvre le monogramme. */
.pc-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: top center; border-radius: inherit; z-index: 1; }
.pc-media .rk { position: absolute; top: 2px; left: -2px; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: var(--ink); color: var(--card); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; border: 3px solid var(--card); font-variant-numeric: tabular-nums; }
.lg-top { position: absolute; bottom: -4px; right: -6px; width: 34px; height: 34px; border-radius: 10px;
  border: 3px solid var(--card); box-shadow: 0 3px 8px -3px rgba(0,0,0,.4); }
.lg-top i { font-size: 10px; }

.pc-name { font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; color: var(--ink);
  line-height: 1.2; max-width: 100%; }
.pc-role { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 100%; }
.pc-val { font-weight: 800; font-size: 21px; font-variant-numeric: tabular-nums; margin-top: 9px;
  letter-spacing: -.01em; }
.pc-meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-ink); margin-left: 6px; vertical-align: middle; }

/* ---- Trader detail ---- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 13.5px; font-weight: 500; margin-bottom: 18px; cursor: pointer; transition: color .14s; }
.back:hover { color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.profile { background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 26px 24px; text-align: center; box-shadow: var(--shadow-sm); position: sticky; top: 84px; }
@media (max-width: 900px) { .profile { position: static; } }
.profile .avatar-lg { position: relative; width: 86px; height: 86px; border-radius: 22px; margin: 0 auto 15px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 27px; letter-spacing: -.02em;
  overflow: hidden; }
.profile h2 { font-family: var(--serif); font-weight: 500; margin: 0 0 4px; font-size: 23px; letter-spacing: -.02em; }
.profile .role { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.profile .badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: var(--chip-bg); color: var(--chip-ink); }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; padding-top: 20px; border-top: 1px solid var(--border); }
.profile-stats .s .n { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.profile-stats .s .l { color: var(--muted); font-size: 11.5px; }
.profile .port { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.profile .port .l { color: var(--muted); font-size: 12px; }
.profile .port .v { font-family: var(--serif); font-weight: 600; font-size: 28px; color: var(--accent); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.detail-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 620px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 17px; box-shadow: var(--shadow-sm); }
.tile .n { font-weight: 700; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 22px 24px; box-shadow: var(--shadow-sm); }
.panel h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 18px; font-size: 18px; letter-spacing: -.01em; }
.panel h3 .muted { color: var(--muted); font-weight: 400; font-size: 12.5px; font-family: var(--sans); }

svg.chart { width: 100%; height: auto; display: block; }
.gridline { stroke: var(--border-2); }
.axislbl { fill: var(--muted); font-size: 10px; }
.dot { fill: var(--accent); }

.pie-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center; }
@media (max-width: 560px) { .pie-wrap { grid-template-columns: 1fr; } }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--border-2); font-size: 13.5px; }
.legend li:last-child { border-bottom: none; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; }
.legend .lt { font-weight: 550; }
.legend .lv { font-variant-numeric: tabular-nums; font-weight: 700; }
.legend .lp { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }

/* ---- Portfolio infographic (donut + brand logos) ------------------------- */
.folio-panel { overflow: hidden; }
.folio-head { margin-bottom: 6px; }
.folio-kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); }
.folio-title { font-family: var(--serif); font-weight: 500; font-size: clamp(20px, 3.4vw, 30px);
  letter-spacing: -.02em; margin: 4px 0 0; color: var(--ink); line-height: 1.12; }
.folio-title em { font-style: normal; color: var(--accent-ink); }

/* Figure radiale (grands écrans) */
.folio-fig { position: relative; width: 100%; max-width: 560px; margin: 6px auto 0;
  aspect-ratio: 1 / 1; }
.folio-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* Avatar / total au centre du donut */
.folio-core { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%);
  width: 30%; aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.4), inset 0 0 0 3px rgba(255,255,255,.22); }
.folio-core .fc-ini { font-weight: 800; font-size: clamp(16px, 3.2vw, 26px); letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.folio-core .fc-tot { font-size: clamp(9px, 1.5vw, 12px); font-weight: 600; opacity: .92;
  font-variant-numeric: tabular-nums; margin-top: 1px; }
.folio-core .fc-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: top center; border-radius: 50%; }
.folio-core.has-photo .fc-ini { display: none; }
.folio-core.has-photo .fc-tot { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1;
  padding: 10px 0 6px; opacity: 1;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent); }

/* Puces d'étiquette positionnées autour de l'anneau */
.folio-chip { position: absolute; transform: translateY(-50%); display: flex; align-items: center;
  gap: 6px; max-width: 17%; }
.folio-chip.r { flex-direction: row; }
.folio-chip.l { flex-direction: row-reverse; text-align: right; }
.folio-chip .fc-txt { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.folio-chip .fc-txt b { font-size: clamp(10px, 1.7vw, 13px); font-weight: 700; color: var(--ink);
  white-space: nowrap; }
.folio-chip .fc-pct { font-size: clamp(10px, 1.7vw, 13px); font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--muted); }

/* Pastille logo (image de marque + repli badge coloré) */
.lg { position: relative; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; overflow: hidden; background: var(--lg, var(--chip-bg)); flex: none; }
.lg-sm { width: clamp(24px, 4vw, 34px); height: clamp(24px, 4vw, 34px); }
.lg i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-weight: 800; color: #fff; font-size: 9px; letter-spacing: .02em; }
.lg img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain;
  background: #fff; }

/* Liste de repli (petits écrans) */
.folio-list { display: none; list-style: none; margin: 10px 0 0; padding: 0; }
.folio-list li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 11px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border-2); font-size: 13.5px; }
.folio-list li:last-child { border-bottom: none; }
.folio-list .fl-nm { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.folio-list .fl-tk { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.folio-list .fl-v { font-variant-numeric: tabular-nums; font-weight: 700; }
.folio-list .fl-pct { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 42px;
  text-align: right; }

@media (max-width: 560px) {
  .folio-fig { display: none; }
  .folio-list { display: block; }
}

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em; padding: 0 10px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 13px 10px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--card-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.iss { display: flex; align-items: center; gap: 10px; }
.iss .tk-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--chip-bg); color: var(--chip-ink);
  font-weight: 700; font-size: 11px; display: grid; place-items: center; flex: none; }
.iss .nm { font-weight: 600; }
.iss .tk { color: var(--muted); font-size: 11.5px; }
.datecell .d { font-weight: 600; }
.datecell .y { color: var(--muted); font-size: 11.5px; }
.side { font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.side.BUY { background: var(--accent-soft); color: var(--accent-ink); }
.side.SELL { background: var(--red-soft); color: var(--red-ink); }
.side.__ { background: var(--chip-bg); color: var(--muted); }
.delay { color: var(--muted); font-variant-numeric: tabular-nums; }

.sub-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--accent); color: #fff; border-radius: var(--r); padding: 20px 24px; flex-wrap: wrap;
  background-image: linear-gradient(120deg, var(--accent), var(--accent-deep)); }
.sub-cta .t { font-weight: 650; }
.sub-cta .s { color: rgba(255,255,255,.82); font-size: 12.5px; }
.sub-cta .pill-green { background: #fff; color: var(--accent-deep); border-color: #fff; }
.sub-cta .pill-green:hover { background: #f0fff6; }

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

/* ---- Blog ---- */
.blog-head { padding: 10px 0 10px; text-align: center; max-width: 620px; margin: 0 auto; }
.blog-head h1 { font-family: var(--serif); font-size: 38px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 10px; }
.blog-head p { color: var(--muted); margin: 0; font-size: 16px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 30px; }
.post-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .12s, border-color .18s; display: flex; flex-direction: column; }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--accent); }
.post-cover { height: 128px; background: linear-gradient(135deg, var(--accent-deep), #0c3a24); position: relative; }
.post-cover .emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; opacity: .92; }
.post-body { padding: 17px 19px 19px; }
.post-body .cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.post-body h3 { font-family: var(--serif); font-weight: 500; margin: 7px 0 8px; font-size: 19px; letter-spacing: -.01em; line-height: 1.22; }
.post-body .ex { color: var(--ink-2); font-size: 13.5px; margin: 0 0 12px; line-height: 1.5; }
.post-body .meta { color: var(--muted); font-size: 12px; }

.article { max-width: 700px; margin: 0 auto; }
.article .cover { height: 190px; border-radius: var(--r); background: linear-gradient(135deg, var(--accent-deep), #0c3a24);
  display: grid; place-items: center; font-size: 62px; margin-bottom: 24px; }
.article .cat { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.article h1 { font-family: var(--serif); font-size: 38px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 8px 0 12px; }
.article .byline { color: var(--muted); font-size: 13.5px; margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.article .content { font-size: 16.5px; line-height: 1.72; color: var(--ink-2); }
.article .content h2 { font-family: var(--serif); color: var(--ink); font-size: 25px; font-weight: 500; letter-spacing: -.01em; margin: 36px 0 12px; }
.article .content p { margin: 0 0 16px; }
.article .content ul { margin: 0 0 16px; padding-left: 22px; }
.article .content li { margin-bottom: 7px; }
.article .content strong { color: var(--ink); font-weight: 650; }
.article .content em { font-style: italic; }
.article .content blockquote { font-family: var(--serif); font-size: 19px; font-style: italic; margin: 24px 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent); color: var(--ink); }
.article .callout { background: var(--card-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 16px 18px; margin: 24px 0; font-size: 14.5px; }

/* ---- Dip Radar ---- */
.opp-head { padding: 6px 0 8px; text-align: center; max-width: 660px; margin: 0 auto; }
.opp-head h1 { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 10px; }
.opp-head p { color: var(--ink-2); font-size: 15.5px; margin: 0 auto; }
.opp-head em { color: var(--ink); font-style: italic; }
.opp-meta { color: var(--muted); font-size: 12.5px; margin-top: 14px; }

.opp-guide { background: var(--card-2); border: 1px solid var(--border-2); border-radius: 14px;
  padding: 18px 20px; margin: 22px 0 4px; }
.opp-guide .g-title { font-family: var(--serif); font-weight: 500; font-size: 16px; margin-bottom: 12px; color: var(--ink); }
.opp-guide .g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 640px) { .opp-guide .g-grid { grid-template-columns: 1fr; } }
.opp-guide b { color: var(--ink-2); font-weight: 650; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px 0 16px; }
.chip { border: 1px solid var(--border); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 550; font-family: inherit; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: all .14s; }
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chips .count-chip { margin-left: auto; }

.opp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.opp { background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 17px 19px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--border);
  display: flex; flex-direction: column; gap: 12px; transition: box-shadow .18s, transform .12s; }
.opp:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.opp.sev-1 { border-left-color: var(--amber); }
.opp.sev-2 { border-left-color: #d9671d; }
.opp.sev-3 { border-left-color: var(--red); }

.opp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.opp-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.opp-badge { width: 42px; height: 42px; border-radius: 11px; background: var(--ink); color: var(--card);
  font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; letter-spacing: -.02em; }
.opp-nm { font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; }
.opp-sec { color: var(--muted); font-size: 12px; margin-top: 1px; }
.opp-drop { text-align: right; flex: none; }
.opp-drop .dd { font-weight: 750; font-size: 20px; color: var(--red); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.opp.sev-0 .opp-drop .dd { color: var(--muted); }
.opp.sev-1 .opp-drop .dd { color: var(--amber); }
.opp-drop .ddl { color: var(--muted); font-size: 10.5px; }

.opp-mid { display: flex; align-items: center; gap: 14px; }
svg.spark { width: 150px; height: 44px; flex: none; }
@media (max-width: 420px) { svg.spark { width: 110px; } }
.opp-price { min-width: 0; }
.opp-price .pp { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.opp-price .pr { font-size: 12.5px; color: var(--ink-2); }
.opp-price .pr.muted { color: var(--muted); font-size: 11.5px; }
.chg { font-weight: 650; font-variant-numeric: tabular-nums; }
.chg.up { color: var(--accent); }
.chg.down { color: var(--red); }
.chg.flat { color: var(--muted); }

.opp-read { font-size: 13px; line-height: 1.5; color: var(--ink-2);
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 14px; }
.opp-read strong { color: var(--ink); font-weight: 650; }

.ins-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
  color: var(--accent-ink); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.ins-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.opp-links { display: flex; gap: 8px; flex-wrap: wrap; }
.opp-links a { font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; transition: all .14s; }
.opp-links a:hover { background: var(--ink); color: var(--card); border-color: var(--ink); }

.opp-note { margin-top: 24px; font-size: 12.5px; color: var(--muted); line-height: 1.55;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 15px 17px; }
.opp-note b { color: var(--ink-2); }

/* ---- Footer ---- */
.site-foot { margin-top: auto; border-top: 1px solid var(--border); background: var(--bg-2); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 24px 22px; color: var(--muted); font-size: 12.5px; }
.foot-inner strong { color: var(--ink-2); font-weight: 650; }
.disclaimer { margin: 5px 0 0; }

/* ---- Toast ---- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(70px);
  background: var(--ink); color: var(--bg); padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; transition: all .28s; pointer-events: none; max-width: 90%; font-size: 14px; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---- Market Summary cards (TradingView-style) ---- */
.hero-slim .hero-inner { padding: 52px 24px 40px; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ms-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 15px 17px 8px; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow .18s, transform .12s, border-color .18s; }
.ms-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.ms-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-price { font-size: 24px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.ms-change { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ms-change.up { color: var(--accent); }
.ms-change.down { color: var(--red); }
.ms-spark { display: block; width: 100%; height: 46px; margin-top: 8px; }

/* ---- "Market value moved today" headline ---- */
.mkt-headline { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px 22px; box-shadow: var(--shadow-sm); }
.mh-fig { font-size: clamp(30px, 5vw, 40px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.mh-fig.up { color: var(--accent); }
.mh-fig.down { color: var(--red); }
.mh-cap { color: var(--muted); font-size: 13.5px; }

/* ---- Heatmap sector frames (on the dark panel) ---- */
.hm-sector { position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 3px; pointer-events: none; }
.hm-sector-lbl { position: absolute; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: rgba(255,255,255,.52); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; pointer-events: none; z-index: 2; }

@media (max-width: 760px) {
  .nav-links { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Pre-rendered SEO pages (company / insider) ---- */
.lnk { color: var(--accent-ink); text-decoration: none; }
.lnk:hover { text-decoration: underline; }
.blog-head .cat { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent-ink); margin-bottom: 8px; }
.blog-head h1 .muted { color: var(--muted); font-weight: 400; }
.callout { background: var(--card-2); border: 1px solid var(--border-2); border-radius: 12px;
  padding: 16px 18px; margin: 4px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.callout strong { color: var(--ink); font-weight: 650; }
.avatar-sm { position: relative; width: 34px; height: 34px; font-size: 12px;
  border-radius: 10px; overflow: hidden; }
.ins-row { display: inline-flex; align-items: center; gap: 10px; }

/* ---- Education consent gate ---- */
.consent-open, .consent-open body { overflow: hidden; }
.consent { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  padding: 22px; background: rgba(20,20,18,.42); backdrop-filter: blur(3px);
  animation: consentIn .18s ease; }
.consent[hidden] { display: none; }
@keyframes consentIn { from { opacity: 0; } to { opacity: 1; } }
.consent-card { width: 100%; max-width: 440px; background: var(--card); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 28px 28px 24px;
  box-shadow: var(--shadow-md); animation: consentPop .2s ease; }
@keyframes consentPop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.consent-card h2 { font-weight: 500; font-size: 21px; letter-spacing: -.02em;
  line-height: 1.25; margin: 0 0 14px; }
.consent-card > p { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin: 0 0 13px; }
.consent-card > p:last-of-type { margin-bottom: 22px; }
.consent-btn { border: 0; cursor: pointer; font-family: inherit; font-size: 14.5px;
  font-weight: 700; padding: 11px 22px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  transition: background .15s ease; }
.consent-btn:hover { background: var(--accent-deep); }
@media (max-width: 480px) { .consent-card { padding: 22px 20px 20px; } }

/* ---- Heatmap page: contained + educational framing ---- */
.hm-lead { color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 640px; margin: 2px 0 20px; }
.hm-panel.hm-compact { max-width: 100%; }
.hm-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px;
  margin: 22px 0 8px; }
.hm-guide-item { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--card);
  padding: 15px 16px; }
.hm-guide-item h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
.hm-guide-item p { font-size: 13px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.hm-swatch { display: inline-flex; gap: 3px; margin-right: 7px; vertical-align: middle; }
.hm-swatch span { width: 13px; height: 13px; border-radius: 3px; display: block; }
