/* Investment Advisor homepage + shared advisor styles. Tokens from styles.css. */
.invest-body {
  position: static; inset: auto; width: 100%;
  height: 100dvh; max-height: 100dvh; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(212,175,55,.07), transparent 60%),
    radial-gradient(800px 450px at -10% 15%, rgba(76,141,255,.05), transparent 55%),
    var(--bg);
}
#invest-hud { position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  gap: 18px; padding: 0 20px; height: 58px; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
#invest-hud .brand { font-family: var(--font-display); font-weight: 700; color: var(--gold-2); }
#invest-main { max-width: 1180px; margin: 0 auto; padding: 26px 20px 80px; }

.hero h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 40px); font-weight: 700; }
.hero-sub { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; max-width: 720px; margin: 8px 0 22px; }

#invest-map { height: 480px; border-radius: var(--radius); border: 1px solid var(--line);
  overflow: hidden; margin-bottom: 34px; background: var(--bg-2); }

.sec { margin: 0 0 38px; }
.sec h2 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.sec-sub { font-size: 12px; color: var(--text-dim); font-weight: 400; margin-left: 8px; }
.sec-lede { color: var(--text-dim); font-size: 13px; max-width: 720px; margin-bottom: 14px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.area-card { display: block; padding: 16px; border-radius: 14px; text-decoration: none; color: var(--text);
  background: rgba(255,255,255,.03); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.area-card:hover { border-color: rgba(212,175,55,.45); transform: translateY(-2px); }
.area-card .rank { font-family: var(--font-display); font-size: 11px; letter-spacing: .18em;
  color: var(--gold); text-transform: uppercase; }
.area-card h3 { font-family: var(--font-display); font-size: 16.5px; margin: 4px 0 8px; }
.area-card .stats { display: flex; gap: 12px; font-size: 12.5px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.area-card .stats b { color: var(--text); font-weight: 600; }
.area-card .bullet { font-size: 12px; color: var(--text-dim); margin-top: 9px; line-height: 1.5; }
.card-grid.whynot .area-card:hover { border-color: rgba(224,85,85,.45); }
.card-grid.whynot .rank { color: #E05555; }

.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dev-tile { padding: 14px 16px; border-radius: 13px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.dev-tile .nm { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; }
.dev-tile .nm i { width: 10px; height: 10px; border-radius: 50%; }
.dev-tile .tr { display: flex; gap: 12px; margin: 8px 0 7px; font-size: 12px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.dev-tile .tr b { color: var(--text); }
.dev-tile .blurb { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.excluded { margin-top: 16px; padding: 14px 16px; border-radius: 13px;
  border: 1px dashed rgba(224,85,85,.35); font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.excluded b { color: var(--text); }

.invest-footer { margin-top: 46px; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--text-dim); font-size: 12px; line-height: 1.6; }
.invest-footer a { color: var(--gold-2); }
.invest-footer .honesty { margin-top: 6px; opacity: .8; }

#tooltip { position: fixed; z-index: 200; pointer-events: none; opacity: 0;
  transform: translate(-50%, -110%); transition: opacity .1s;
  background: rgba(8,10,14,.96); border: 1px solid rgba(212,175,55,.35); border-radius: 10px;
  padding: 9px 11px; font-size: 12px; line-height: 1.5; max-width: 260px; }
#tooltip.show { opacity: 1; }
#tooltip .tt-title { font-weight: 600; color: var(--gold-2); font-family: var(--font-display); }
#tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; }
#tooltip .tt-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 640px) { #invest-map { height: 340px; } #invest-main { padding: 18px 12px 60px; } }

.stale-badge { font-size: 11px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.stale-warn { color: #E8A33D; border-color: rgba(232,163,61,.5); }

/* Dark MapLibre popups — why-not rebuttal panels */
.maplibregl-popup-content { background: rgba(8,10,14,.96); color: var(--text);
  border: 1px solid rgba(212,175,55,.35); border-radius: 10px; font: 12px var(--font-body); }
.maplibregl-popup-tip { border-top-color: rgba(8,10,14,.96) !important; }
.maplibregl-popup-close-button { color: var(--text-dim); }
