:root {
  --tl-bg: #0b0d10;
  --tl-card: #12161b;
  --tl-border: #222933;
  --tl-text: #eef2f6;
  --tl-dim: #8d96a5;
  --tl-green: #2ee59d;
  --tl-red: #f46a6a;
  --tl-amber: #f5b942;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--tl-bg);
  color: var(--tl-text);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
}

.tl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: #0e1116;
  border-bottom: 1px solid var(--tl-border);
  flex-wrap: wrap;
  gap: 12px;
}

.tl-brand {
  color: var(--tl-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tl-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: #172220;
  border: 1px solid rgba(46, 229, 157, 0.4);
  font: 700 13px/1 "Geist Mono Variable", ui-monospace, monospace;
}
.tl-mark i { color: var(--tl-green); font-style: normal; }

.tl-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.tl-nav a {
  color: var(--tl-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
.tl-nav a:hover, .tl-nav a[aria-current="page"] { color: var(--tl-text); }
.tl-nav a.tl-cta {
  background: var(--tl-green);
  color: #08130e;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 7px;
}

.tl-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 18px 64px;
}

.tl-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tl-hero-copy { max-width: 780px; }
.tl-kicker {
  margin: 0 0 6px;
  font: 700 11px/1.2 "Geist Mono Variable", ui-monospace, monospace;
  letter-spacing: 0.08em;
  color: var(--tl-green);
}
.tl-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.025em;
}
.tl-hero p {
  margin: 0;
  color: var(--tl-dim);
  line-height: 1.55;
  font-size: 14.5px;
}

.tl-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  border: 1px solid var(--tl-border);
  background: #171c24;
  color: var(--tl-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
}
.tl-btn.primary {
  background: var(--tl-green);
  border-color: var(--tl-green);
  color: #07130e;
  font-weight: 700;
}

.tl-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 1020px) {
  .tl-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tl-kpi {
  background: var(--tl-card);
  border: 1px solid var(--tl-border);
  border-radius: 9px;
  padding: 12px 14px;
}
.tl-kpi span { display: block; font-size: 11.5px; color: var(--tl-dim); }
.tl-kpi strong {
  display: block;
  margin: 4px 0 2px;
  font: 700 17px/1.2 "Geist Mono Variable", ui-monospace, monospace;
}
.tl-kpi small { font-size: 11px; color: var(--tl-dim); }

.tl-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tl-tab {
  background: var(--tl-card);
  color: var(--tl-dim);
  border: 1px solid var(--tl-border);
  border-radius: 7px;
  padding: 8px 13px;
  font: 600 13px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
}
.tl-tab.is-active {
  background: #eef2f6;
  color: #0b0d10;
  border-color: #eef2f6;
}

.tl-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 980px) {
  .tl-grid-2 { grid-template-columns: 1fr; }
}

.tl-spacer { margin-top: 14px; }

.tl-card {
  background: var(--tl-card);
  border: 1px solid var(--tl-border);
  border-radius: 11px;
  padding: 18px;
}
.tl-card[hidden] { display: none !important; }

.tl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.tl-eyebrow {
  margin: 0 0 3px;
  font: 700 10.5px/1.2 "Geist Mono Variable", ui-monospace, monospace;
  color: var(--tl-dim);
  letter-spacing: 0.06em;
}
.tl-card-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.tl-mini-link {
  color: var(--tl-green);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tl-pill {
  font: 700 11px/1 "Geist Mono Variable", ui-monospace, monospace;
  padding: 5px 9px;
  border-radius: 6px;
  background: #1b222c;
}

.tl-fg-summary { margin-bottom: 12px; }
.tl-fg-score-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.tl-fg-big {
  font: 800 36px/1 "Geist Mono Variable", ui-monospace, monospace;
}
.tl-fg-score-box p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--tl-dim);
}

.tl-meter-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 35%, #eab308 50%, #22c55e 75%, #10b981 100%);
}
.tl-meter-pin {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #0b0d10;
}

#tlFgCanvas {
  width: 100%;
  height: 200px;
  display: block;
  background: #0d1015;
  border-radius: 8px;
  border: 1px solid #1b212b;
}

.tl-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--tl-dim);
  line-height: 1.45;
}

.tl-flow-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.tl-flow-item {
  background: #0d1015;
  border: 1px solid #1c222c;
  border-radius: 8px;
  padding: 10px 12px;
}
.tl-flow-item span { display: block; font-size: 11.5px; color: var(--tl-dim); }
.tl-flow-item strong {
  display: block;
  margin: 4px 0 2px;
  font: 700 15px/1.25 "Geist Mono Variable", ui-monospace, monospace;
}
.tl-flow-item small { font-size: 11px; color: var(--tl-dim); }

.tl-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 9px;
  background: rgba(46, 229, 157, 0.08);
  border: 1px solid rgba(46, 229, 157, 0.3);
  flex-wrap: wrap;
}
.tl-cta-box p { margin: 4px 0 0; font-size: 12.5px; color: var(--tl-dim); }

.tl-dca-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .tl-dca-layout { grid-template-columns: 1fr; }
}

.tl-dca-tiers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-dca-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 7px;
  background: #0d1015;
  border: 1px solid #1c222c;
  font: 600 12.5px/1.2 "Geist Mono Variable", ui-monospace, monospace;
}
.tl-dca-row.is-current {
  border-color: var(--tl-green);
  box-shadow: 0 0 0 1px rgba(46, 229, 157, 0.25);
}

.tl-dca-calc {
  background: #0d1015;
  border: 1px solid #1c222c;
  border-radius: 9px;
  padding: 14px 16px;
}
.tl-dca-calc h3 { margin: 0 0 6px; font-size: 15px; }
.tl-dca-calc p { margin: 0 0 12px; font-size: 12.5px; color: var(--tl-dim); line-height: 1.45; }

.tl-field {
  display: block;
  margin-bottom: 12px;
}
.tl-field span { display: block; font-size: 12px; color: var(--tl-dim); margin-bottom: 5px; }
.tl-field input, .tl-inline-input input {
  width: 100%;
  background: #131820;
  color: var(--tl-text);
  border: 1px solid var(--tl-border);
  border-radius: 6px;
  padding: 8px 10px;
  font: 700 14px/1 "Geist Mono Variable", ui-monospace, monospace;
}
.tl-inline-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tl-dim);
}
.tl-inline-input input { width: 108px; padding: 6px 8px; font-size: 12.5px; }

.tl-dca-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tl-dca-result div {
  background: #12171f;
  border: 1px solid #1f2733;
  border-radius: 6px;
  padding: 8px 10px;
}
.tl-dca-result span { display: block; font-size: 11px; color: var(--tl-dim); }
.tl-dca-result strong { font: 700 14px/1.3 "Geist Mono Variable", ui-monospace, monospace; }

.tl-table-scroll { overflow-x: auto; }

.tl-ret-table, .tl-venue-table {
  width: 100%;
  border-collapse: collapse;
  font: 600 11.5px/1.25 "Geist Mono Variable", ui-monospace, monospace;
}
.tl-ret-table th, .tl-ret-table td, .tl-venue-table th, .tl-venue-table td {
  padding: 8px 7px;
  text-align: right;
  border-bottom: 1px solid #1b212b;
  white-space: nowrap;
}
.tl-ret-table th:first-child, .tl-ret-table td:first-child,
.tl-venue-table th:first-child, .tl-venue-table td:first-child {
  text-align: left;
}
.tl-ret-table th, .tl-venue-table th {
  color: var(--tl-dim);
  font-weight: 600;
}

.tl-macro-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.tl-macro-row {
  background: #0d1015;
  border: 1px solid #1c222c;
  border-radius: 8px;
  padding: 10px 12px;
}
.tl-macro-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.tl-macro-top strong { font-size: 13.5px; }
.tl-macro-meta {
  font: 600 11.5px/1.3 "Geist Mono Variable", ui-monospace, monospace;
  color: var(--tl-amber);
}
.tl-macro-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--tl-dim);
}

.pos { color: var(--tl-green); }
.neg { color: var(--tl-red); }
