:root {
  --tr-bg: #f8fafc;
  --tr-surface: #ffffff;
  --tr-line: #e2e8f0;
  --tr-ink: #0f172a;
  --tr-body: #475569;
  --tr-accent: #0077b6;
}
* { box-sizing: border-box; }
.tr-body {
  margin: 0;
  background: var(--tr-bg);
  color: var(--tr-ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.tr-app { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

.tr-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--tr-line); margin-bottom: 1.5rem;
}
.tr-back { color: var(--tr-accent); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.tr-back:hover { text-decoration: underline; }
.tr-header h1 { margin: 0.5rem 0 0.35rem; font-size: 1.7rem; line-height: 1.2; }
.tr-years { color: var(--tr-accent); font-weight: 700; }
.tr-tagline { margin: 0; color: var(--tr-body); font-size: 0.95rem; max-width: 60ch; }

.lang-switcher { font-size: 0.85rem; white-space: nowrap; }
.lang-btn { color: var(--tr-body); text-decoration: none; padding: 0.15rem 0.35rem; border-radius: 4px; }
.lang-btn.active { background: var(--tr-accent); color: #fff; font-weight: 700; }
.lang-sep { color: var(--tr-line); }

/* callouts */
.tr-callouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.75rem; }
.tr-callout {
  background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 12px;
  padding: 0.9rem 0.75rem; text-align: center; border-top: 4px solid var(--tr-line);
}
.tr-callout.tr-down { border-top-color: #dc2626; }
.tr-callout.tr-up { border-top-color: #16a34a; }
.tr-num { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.tr-down .tr-num { color: #dc2626; }
.tr-up .tr-num { color: #16a34a; }
.tr-lbl { font-weight: 700; margin-top: 0.3rem; font-size: 0.95rem; }
.tr-sub { color: var(--tr-body); font-size: 0.75rem; }

/* panels */
.tr-panel {
  background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 14px;
  padding: 1.25rem 1.35rem 1.5rem; margin-bottom: 1.5rem;
}
.tr-panel h2 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.tr-desc { margin: 0 0 1rem; color: var(--tr-body); font-size: 0.9rem; max-width: 68ch; }
.tr-chart { position: relative; height: 300px; }
.tr-chart-tall { height: 460px; }

/* age -> championship coverage band */
.tr-champband { margin-top: 0.4rem; }
.tr-cb-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.tr-cb-name { flex: 0 0 68px; text-align: right; font-weight: 700; font-size: 0.85rem; }
.tr-cb-track { flex: 1; display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; }
.tr-cb-bar { color: #fff; font-size: 0.74rem; font-weight: 700; text-align: center; padding: 0.32rem 0; border-radius: 5px; white-space: nowrap; }
.tr-cb-ruler { margin-top: 0.15rem; }
.tr-cb-ruler span { text-align: center; font-size: 0.72rem; color: var(--tr-body); font-variant-numeric: tabular-nums; }
.tr-cb-stat { flex: 0 0 92px; display: flex; flex-direction: column; line-height: 1.1; }
.tr-cb-stat b { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tr-cb-stat em { font-style: normal; font-size: 0.72rem; color: var(--tr-body); }
.tr-cb-note { font-size: 0.78rem; color: var(--tr-body); margin: 0.6rem 0 0; }

/* highlighted fact box */
.tr-fact { margin: 0.9rem 0 0; padding: 0.6rem 0.85rem; background: #eff6ff; border-left: 4px solid var(--tr-accent); border-radius: 6px; font-size: 0.86rem; color: var(--tr-ink); }

/* count / share toggle */
.tr-toggle { display: flex; gap: 0.4rem; margin-bottom: 0.8rem; }
.tr-tg { font: inherit; font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.75rem; border: 1px solid var(--tr-line); background: var(--tr-surface); color: var(--tr-body); border-radius: 6px; cursor: pointer; }
.tr-tg.active { background: var(--tr-accent); color: #fff; border-color: var(--tr-accent); }

.tr-break { display: flex; align-items: center; gap: 0.9rem; margin: 2.25rem 0 1.5rem; }
.tr-break::before, .tr-break::after { content: ""; flex: 1; height: 1px; background: var(--tr-line); }
.tr-break span { font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; color: var(--tr-accent); }
.tr-desc a { color: var(--tr-accent); }

.tr-foot { color: var(--tr-body); font-size: 0.78rem; margin-top: 1.5rem; }
.tr-footer { border-top: 1px solid var(--tr-line); margin-top: 2rem; padding-top: 1rem; color: var(--tr-body); font-size: 0.8rem; text-align: center; }

@media (max-width: 640px) {
  .tr-callouts { grid-template-columns: repeat(2, 1fr); }
  .tr-header h1 { font-size: 1.4rem; }
  .tr-chart-tall { height: 520px; }
}

/* Competitive-tiers benchmark table */
.tr-tiers { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tr-tiers th, .tr-tiers td { padding: .4rem .6rem; text-align: right; border-bottom: 1px solid #eef2f7; white-space: nowrap; }
.tr-tiers thead th { color: #64748b; font-weight: 600; border-bottom: 2px solid #e2e8f0; }
.tr-iqr { color: #94a3b8; font-size: .82em; }
