:root {
  --bg: #0b0c0f;
  --bg-2: #111318;
  --panel: rgba(23, 25, 31, 0.7);
  --panel-2: rgba(35, 38, 46, 0.55);
  --border: rgba(255,255,255,0.08);
  --text: #f3f4f7;
  --muted: #a7acb7;
  --accent: #d3d5db;
  --green: #7ee6a2;
  --red: #ff8a8a;
  --amber: #f4d58d;
  --shadow: 0 24px 80px rgba(0,0,0,0.36);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Quicksand', system-ui, sans-serif;
  background: radial-gradient(circle at top, #1a1d24 0%, var(--bg) 34%, #07080a 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: .28;
  animation: floatGlow 14s ease-in-out infinite alternate;
}
.ambient-a { width: 34rem; height: 34rem; top: -8rem; right: -6rem; background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(119,127,148,.04)); }
.ambient-b { width: 28rem; height: 28rem; bottom: -8rem; left: -6rem; background: linear-gradient(135deg, rgba(148,163,184,.14), rgba(255,255,255,.04)); animation-duration: 18s; }
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.soft { box-shadow: 0 16px 50px rgba(0,0,0,0.22); }
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin: 1.25rem;
  padding: 2.25rem;
  border-radius: 28px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  font-size: .72rem;
  margin-bottom: .75rem;
  font-weight: 700;
}
h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 { font-size: clamp(2rem, 4vw, 4.2rem); max-width: 12ch; }
h2 { font-size: clamp(1.3rem, 2vw, 2rem); }
h3 { font-size: 1.06rem; margin-bottom: .6rem; }
.lede, .subcopy, .note, .method-card p, .fng-copy p { color: var(--muted); line-height: 1.65; }
.lede { max-width: 70ch; margin-top: 1rem; }
.hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .92rem 1.2rem; border-radius: 999px; text-decoration: none;
  font-weight: 700; transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #f3f4f7, #b6bbc5); color: #090a0c; }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(255,255,255,.16); }
.btn-secondary { color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--border); }
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  padding: 0 1.25rem 1.25rem;
}
.sidebar {
  position: sticky; top: 1.25rem; align-self: start;
  padding: 1.4rem;
  border-radius: 24px;
}
.brandmark {
  width: 3rem; height: 3rem; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.3rem; font-weight: 700;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.02));
  margin-bottom: 1rem;
}
.sidebar nav { display: grid; gap: .35rem; }
.sidebar a {
  color: var(--muted); text-decoration: none; padding: .8rem .9rem; border-radius: 14px;
  transition: all .25s ease;
}
.sidebar a:hover { background: rgba(255,255,255,.06); color: var(--text); transform: translateX(4px); }
.content { display: grid; gap: 1.25rem; }
.panel {
  border-radius: 28px;
  padding: 1.3rem;
}
.compact { padding: 1.15rem; }
.panel-head {
  display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem;
}
.panel-head.tight { align-items: center; }
.badge, .mini-meta {
  border: 1px solid var(--border); border-radius: 999px; padding: .55rem .8rem; color: var(--muted); font-size: .8rem;
  background: rgba(255,255,255,.04);
}
.badge.subtle { background: rgba(255,255,255,.03); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .95rem .75rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); }
thead th { color: var(--muted); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
tbody tr { transition: background .2s ease, transform .2s ease; }
tbody tr:hover { background: rgba(255,255,255,.04); }
.asset-cell { display: flex; align-items: center; gap: .8rem; }
.asset-icon { width: 2rem; height: 2rem; border-radius: 50%; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }
.grid.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.fng-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: center; min-height: 210px; }
.gauge-wrap { position: relative; width: 100%; max-width: 220px; aspect-ratio: 1 / 1; }
.feature-number { font-size: clamp(2.1rem, 6vw, 3.8rem); font-weight: 700; }
.feature-label { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.tv-widget-wrap { min-height: 250px; border-radius: 18px; overflow: hidden; background: rgba(0,0,0,.18); }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.chart-card {
  padding: 1rem;
  border-radius: 22px;
  min-height: 330px;
  transition: transform .28s ease, border-color .28s ease, background .28s ease;
}
.chart-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
.chart-card canvas { width: 100%; height: 220px; }
.heatmap-wrap { overflow: auto; max-height: 260px; }
.heatmap { width: 100%; border-collapse: separate; border-spacing: 6px; }
.heatmap th, .heatmap td { border: none; padding: .5rem; text-align: center; border-radius: 12px; }
.heatmap th { color: var(--muted); font-size: .76rem; text-transform: uppercase; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.method-card { padding: 1rem; border-radius: 20px; }
.error-banner {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  max-width: min(92vw, 980px); padding: .95rem 1.1rem; border-radius: 18px;
  background: rgba(120, 14, 14, 0.92); color: #fff; border: 1px solid rgba(255,255,255,.15); z-index: 50;
}
.hidden { display: none; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes floatGlow { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(25px,-18px,0) scale(1.08); } }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; top: 0; }
  .method-grid, .grid.two-up, .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .fng-layout { grid-template-columns: 1fr; }
  .panel, .topbar { padding: 1rem; margin: .85rem; }
  .shell { padding: 0 .85rem .85rem; }
  th, td { padding: .8rem .55rem; font-size: .88rem; }
  .chart-card { min-height: 290px; }
  .chart-card canvas { height: 200px; }
}
