:root {
  --bg: #070b12;
  --card: rgba(18, 24, 36, 0.92);
  --border: #243247;
  --text: #eaf0fa;
  --muted: #8b9cb3;
  --accent: #4ea1ff;
  --teal: #2dd4bf;
  --good: #3dd68c;
  --warn: #f5b942;
  --danger: #ff6b7a;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  background: var(--bg);
}
.bg-grid {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(78, 161, 255, 0.16), transparent 55%),
    radial-gradient(700px 400px at 90% 0%, rgba(45, 212, 191, 0.12), transparent 50%),
    linear-gradient(rgba(36, 50, 71, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 50, 71, 0.25) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}
.app {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 16px 56px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  color: #041018;
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.35);
}
h1 { margin: 0; font-size: 1.3rem; letter-spacing: -0.02em; }
.sub { margin: 3px 0 0; color: var(--muted); font-size: 0.84rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted);
}
.dot.ok { background: var(--good); box-shadow: 0 0 0 4px rgba(61,214,140,.15); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,107,122,.15); }

.btn {
  border: 1px solid var(--border);
  background: #121a27;
  color: var(--text);
  border-radius: 11px;
  padding: 9px 14px;
  font-weight: 650;
  cursor: pointer;
}
.btn:hover { border-color: #3a516e; }
.btn.primary {
  border: none;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.55; cursor: wait; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0,0,0,.28);
}
.card-h {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.card-h h2 { margin: 0; font-size: 1rem; }

.progress-card .score-pill {
  font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.progress-bar {
  height: 10px; border-radius: 999px; background: #0d1420;
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 12px;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #2563eb, #14b8a6, #3dd68c);
  transition: width 0.6s ease;
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.45);
}
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.req {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #0d1420;
}
.req .layer { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .04em; }
.req .title { font-size: 0.86rem; font-weight: 650; margin: 4px 0; }
.req .detail { color: var(--muted); font-size: 0.75rem; line-height: 1.35; }
.req .st {
  display: inline-block; margin-top: 6px;
  font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
}
.st.done { background: rgba(61,214,140,.15); color: var(--good); }
.st.research { background: rgba(78,161,255,.15); color: var(--accent); }
.st.partial { background: rgba(245,185,66,.15); color: var(--warn); }
.st.todo { background: rgba(255,107,122,.12); color: var(--danger); }

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 4px;
}
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi .k-label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .k-val { font-size: 1.35rem; font-weight: 760; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.kpi.glow { box-shadow: inset 0 0 0 1px rgba(45,212,191,.2), 0 10px 40px rgba(0,0,0,.28); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.filters { display: flex; gap: 8px; }
select {
  background: #0d1420; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
}
.chart-wrap { position: relative; height: 280px; }
.chart-wrap.tall { height: 340px; }
.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: rgba(7, 11, 18, 0.72);
  z-index: 2;
}
.chart-empty.hidden { display: none; }

.badge {
  font-size: 0.7rem; padding: 3px 8px; border-radius: 999px;
  background: rgba(45,212,191,.12); color: var(--teal);
  border: 1px solid rgba(45,212,191,.25);
}
.badge.warn {
  background: rgba(245,185,66,.12); color: var(--warn);
  border-color: rgba(245,185,66,.28);
}
.muted { color: var(--muted); }
.small { font-size: 0.8rem; margin: 0; }

.table-scroll { overflow: auto; max-height: 400px; }
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem; font-variant-numeric: tabular-nums;
}
table.data th, table.data td {
  padding: 8px 9px; border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
table.data th {
  position: sticky; top: 0; z-index: 1;
  background: #152033; color: var(--muted); font-weight: 650;
}
table.data tr:hover td { background: rgba(78,161,255,.05); }
.pos { color: var(--good); }
.neg { color: var(--danger); }
.num { font-family: var(--mono); font-size: 0.78rem; }

.heat { width: 100%; border-collapse: collapse; font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.heat th, .heat td {
  border: 1px solid var(--border); padding: 7px 5px; text-align: center; min-width: 64px;
}
.heat th { background: #152033; color: var(--muted); position: sticky; top: 0; z-index: 1; }
.heat .sticky-col {
  position: sticky; left: 0; background: #121824; z-index: 2; text-align: left; font-weight: 650;
}
.heat th.sticky-col { z-index: 3; background: #152033; }

.code {
  margin: 0; padding: 12px; background: #0a1018; border-radius: 10px;
  border: 1px solid var(--border); overflow: auto;
  color: #c9d7ea; font-family: var(--mono); font-size: 0.78rem; line-height: 1.45;
}
.foot {
  display: flex; justify-content: space-between; gap: 10px;
  color: var(--muted); font-size: 0.78rem; flex-wrap: wrap;
}
.err { color: var(--danger); }
.empty { color: var(--muted); padding: 16px 4px; }

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  background: #122033; border: 1px solid #2d4a6f;
  color: var(--text); padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45); max-width: 360px;
  font-size: 0.86rem;
}
.toast.hidden { display: none; }

/* —— Tabs —— */
.tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  background: #0d1524;
  border: 1px solid var(--border);
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.15s ease;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.tab.active {
  color: #041018;
  background: linear-gradient(135deg, #2dd4bf, #60a5fa);
  box-shadow: 0 6px 18px rgba(45, 212, 191, 0.25);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.kpis-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 0;
}
@media (max-width: 700px) {
  .kpis-compact { grid-template-columns: 1fr; }
}

/* —— Strategy desk (boss-facing) —— */
.hero {
  background:
    radial-gradient(800px 280px at 10% 0%, rgba(52, 211, 153, 0.12), transparent 55%),
    radial-gradient(600px 240px at 90% 20%, rgba(167, 139, 250, 0.12), transparent 50%),
    var(--card);
  border-color: #2a3f5c;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.hero-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--teal);
  font-weight: 700;
}
.hero-title {
  margin: 6px 0 4px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.hero-sub { margin: 0; color: var(--muted); }
.hero-score {
  text-align: center;
  min-width: 100px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #0b1220;
  border: 1px solid #2d4a6f;
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.12);
}
.hero-score-val {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2dd4bf, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-score-label { font-size: 0.75rem; color: var(--muted); }
.hero-alloc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.alloc-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0d1524;
  border: 1px solid var(--border);
  min-width: 120px;
}
.alloc-chip .n { font-weight: 700; font-size: 0.9rem; }
.alloc-chip .p {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--teal);
}
.alloc-chip .u { font-size: 0.75rem; color: var(--muted); }
.hero-scenario {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.scenario-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(78, 161, 255, 0.08);
  border: 1px solid rgba(78, 161, 255, 0.2);
  font-size: 0.85rem;
}
.scenario-pill b { color: var(--accent); }
.playbook {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}
.playbook li { margin-bottom: 4px; }

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 1100px) {
  .strategy-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .strategy-grid { grid-template-columns: 1fr; }
}
.strat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.28);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.strat:hover {
  transform: translateY(-2px);
  border-color: #3d5a80;
}
.strat.hot {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.15), 0 10px 40px rgba(0,0,0,.35);
}
.strat .accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.strat-h {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.strat-name { font-weight: 750; font-size: 1.02rem; margin: 0; }
.strat-en { color: var(--muted); font-size: 0.72rem; margin-top: 2px; }
.strat-tag { color: var(--muted); font-size: 0.8rem; margin: 8px 0; min-height: 2.2em; }
.grade {
  font-weight: 800;
  font-size: 1.2rem;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: #0d1524;
  border: 1px solid var(--border);
}
.grade.S { color: #fbbf24; border-color: rgba(251,191,36,.4); }
.grade.A { color: #34d399; }
.grade.B { color: #60a5fa; }
.grade.C { color: #fbbf24; }
.grade.D { color: #f87171; }
.st-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.st-pill.hot { background: rgba(52,211,153,.15); color: #34d399; }
.st-pill.active { background: rgba(96,165,250,.15); color: #60a5fa; }
.st-pill.watch { background: rgba(251,191,36,.12); color: #fbbf24; }
.st-pill.sleep { background: rgba(148,163,184,.12); color: #94a3b8; }
.strat-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.m {
  background: #0b1220;
  border-radius: 10px;
  padding: 8px;
  border: 1px solid #1e2a3d;
}
.m .l { font-size: 0.68rem; color: var(--muted); }
.m .v { font-weight: 700; font-size: 0.95rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.strat-pitch {
  font-size: 0.8rem;
  color: #c5d0e0;
  line-height: 1.45;
  margin: 0 0 8px;
}
.strat ul {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}
.risk-dots { display: flex; gap: 3px; margin-top: 4px; }
.risk-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #243247;
}
.risk-dots i.on { background: #f59e0b; }

/* —— Research chart polish —— */
.section-rail {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(78,161,255,0.08), transparent 55%),
    rgba(13, 20, 32, 0.85);
  border: 1px solid rgba(36, 50, 71, 0.9);
}
.rail-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.rail-tag.p0 {
  background: linear-gradient(135deg, rgba(45,212,191,0.25), rgba(78,161,255,0.2));
  color: var(--teal);
  border: 1px solid rgba(45,212,191,0.35);
  box-shadow: 0 0 18px rgba(45,212,191,0.15);
}
.rail-tag.p1 {
  background: rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.rail-tag.p2 {
  background: rgba(245, 185, 66, 0.14);
  color: var(--warn);
  border: 1px solid rgba(245, 185, 66, 0.3);
}
.rail-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.rail-sub { margin: 0; }

.chart-card {
  position: relative;
  overflow: hidden;
}
.chart-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(78,161,255,0.35), transparent);
  pointer-events: none;
}
.accent-edge {
  box-shadow:
    inset 0 0 0 1px rgba(45, 212, 191, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.32);
}
.accent-edge.p1 {
  box-shadow:
    inset 0 0 0 1px rgba(167, 139, 250, 0.1),
    0 12px 40px rgba(0, 0, 0, 0.32);
}
.accent-edge.p2 {
  box-shadow:
    inset 0 0 0 1px rgba(245, 185, 66, 0.1),
    0 12px 40px rgba(0, 0, 0, 0.32);
}

.heat-scroll { max-height: 360px; }
.heat.matrix td { min-width: 56px; }
.heat .cell-sub {
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 2px;
}
.heat small {
  font-size: 0.62rem;
  color: var(--muted);
  margin-left: 1px;
}

.event-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  min-height: 28px;
}
.event-chip {
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(78, 161, 255, 0.1);
  border: 1px solid rgba(78, 161, 255, 0.22);
  color: #c5d4ea;
  font-family: var(--mono);
}
.event-chip.sign_flip {
  background: rgba(255, 107, 122, 0.12);
  border-color: rgba(255, 107, 122, 0.3);
  color: #ffb3bb;
}
.event-chip.cross {
  background: rgba(245, 185, 66, 0.12);
  border-color: rgba(245, 185, 66, 0.3);
  color: #fcd34d;
}

.health-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.h-pill {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0b1220;
  border: 1px solid var(--border);
  color: var(--muted);
}
.h-pill b { color: var(--text); margin-left: 4px; font-variant-numeric: tabular-nums; }
.h-pill.ok { border-color: rgba(61, 214, 140, 0.35); }
.h-pill.ok b { color: var(--good); }
.h-pill.warn { border-color: rgba(245, 185, 66, 0.35); }
.h-pill.warn b { color: var(--warn); }
.h-pill.bad { border-color: rgba(255, 107, 122, 0.35); }
.h-pill.bad b { color: var(--danger); }

.sym-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sym-pick select {
  min-width: 88px;
}

.chart-wrap {
  background:
    radial-gradient(500px 180px at 50% 0%, rgba(78,161,255,0.04), transparent 70%);
  border-radius: 12px;
}
.chart-empty {
  border-radius: 12px;
  border: 1px dashed rgba(36, 50, 71, 0.9);
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

/* Tooltip-friendly denser cards on wide screens */
@media (min-width: 1200px) {
  .chart-wrap.tall { height: 360px; }
}

/* Subtle card hover for research desks */
.chart-card:hover {
  border-color: #334866;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tall-table { max-height: 480px; }
#pairBookKpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 10px 0 12px;
}
@media (max-width: 1100px) {
  #pairBookKpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  #pairBookKpis { grid-template-columns: 1fr 1fr; }
}
.pill-live {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.pill-live.ok { background: rgba(45,212,191,.15); color: var(--teal); }
.pill-live.off { background: rgba(148,163,184,.12); color: #94a3b8; }
.pill-mis {
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 700;
}

/* —— Timeline Explorer —— */
.timeline-card {
  background:
    radial-gradient(900px 280px at 20% 0%, rgba(167,139,250,0.08), transparent 55%),
    var(--card);
}
.tl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 14px;
}
.tl-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.tl-pill.pos {
  background: rgba(45, 212, 191, 0.12);
  color: var(--teal);
  border-color: rgba(45, 212, 191, 0.3);
}
.tl-pill.neg {
  background: rgba(251, 113, 133, 0.12);
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.3);
}
.tl-pill.calm {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}
.tl-lanes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.tl-lane {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: center;
}
.tl-lane-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  font-family: var(--mono);
}
.tl-track {
  position: relative;
  height: 42px;
  border-radius: 10px;
  background: #0a1018;
  border: 1px solid var(--border);
  overflow: hidden;
}
.tl-seg {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 8px;
  min-width: 3px;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid transparent;
}
.tl-seg:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  z-index: 2;
}
.tl-seg.elevated_pos {
  background: linear-gradient(180deg, rgba(45,212,191,0.75), rgba(45,212,191,0.35));
  border-color: rgba(45,212,191,0.45);
  box-shadow: 0 0 16px rgba(45,212,191,0.15);
}
.tl-seg.elevated_neg {
  background: linear-gradient(180deg, rgba(251,113,133,0.75), rgba(251,113,133,0.35));
  border-color: rgba(251,113,133,0.45);
  box-shadow: 0 0 16px rgba(251,113,133,0.12);
}
.tl-seg.calm {
  background: rgba(100, 116, 139, 0.22);
  border-color: rgba(100, 116, 139, 0.25);
}
.tl-seg-txt {
  font-size: 0.62rem;
  font-weight: 700;
  color: #eaf0fa;
  white-space: nowrap;
  padding: 0 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  pointer-events: none;
}
.tl-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--mono);
  margin: 6px 0 14px 98px;
}
.tl-detail {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0b1220;
  border: 1px solid #2d4a6f;
  font-size: 0.84rem;
  line-height: 1.45;
}
.tl-detail b { color: var(--accent); }
.tl-detail .muted { font-size: 0.78rem; }
.tl-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
}
.tl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tl-pair-pick {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.tl-pair-pick.hidden { display: none; }
.tl-brush-host {
  position: relative;
  user-select: none;
  cursor: crosshair;
}
.tl-brush-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.55);
  pointer-events: none;
  z-index: 5;
  border-radius: 6px;
}
.tl-brush-overlay.hidden { display: none; }
.tl-pill.brush {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.35);
}
.tl-lane.role-short .tl-lane-label { color: #fbbf24; }
.tl-lane.role-long .tl-lane-label { color: #60a5fa; }
.tl-lane.role-spread .tl-lane-label { color: #c4b5fd; }
.tl-lane.role-spread .tl-track {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.08);
}
.tl-selection-box {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.28);
  font-size: 0.84rem;
}
.tl-selection-box.hidden { display: none; }
.tl-detail.hidden { display: none; }
.tl-lane-label { min-width: 0; word-break: break-all; }
@media (min-width: 900px) {
  .tl-lane { grid-template-columns: 120px 1fr; }
}
