/* Team Pipeline page. Uses the global nav/theme tokens from styles.css. */
:root {
  --tp-bg: #f5f7fb;
  --tp-surface: #ffffff;
  --tp-surface-2: #f8fafc;
  --tp-border: #d9e4f4;
  --tp-border-2: #c1d1e8;
  --tp-text: #0a1628;
  --tp-text-2: #334155;
  --tp-muted: #64748b;
  --tp-accent: #2563eb;
  --tp-accent-soft: rgba(37, 99, 235, 0.1);
  --tp-green: #047857;
  --tp-green-soft: rgba(5, 150, 105, 0.12);
  --tp-gold: #b45309;
  --tp-gold-soft: rgba(245, 158, 11, 0.14);
  --tp-shadow: 0 10px 28px rgba(10, 22, 40, 0.08);
}

[data-theme="dark"] {
  --tp-bg: #050a16;
  --tp-surface: #0f1e36;
  --tp-surface-2: rgba(255, 255, 255, 0.04);
  --tp-border: rgba(255, 255, 255, 0.08);
  --tp-border-2: rgba(255, 255, 255, 0.16);
  --tp-text: #f1f5f9;
  --tp-text-2: #cbd5e1;
  --tp-muted: #94a3b8;
  --tp-accent: #60a5fa;
  --tp-accent-soft: rgba(96, 165, 250, 0.16);
  --tp-green: #34d399;
  --tp-green-soft: rgba(52, 211, 153, 0.14);
  --tp-gold: #fbbf24;
  --tp-gold-soft: rgba(251, 191, 36, 0.14);
  --tp-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

html.tp-page-root[data-theme="dark"] {
  --frost: #f5f7fb;
  --frost-2: #e8efff;
  --frost-3: #d8e4f8;
  --rink: #ffffff;
  --line: #d9e4f4;
  --line-2: #c1d1e8;
  --line-strong: #93a8c8;
  --muted: #5b6b85;
  --muted-2: #8497b5;
  --ink: #0a1628;
  --ink-2: #0f1e36;
  --ink-3: #1a2c4d;
  --ink-4: #2a3f64;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-deep: #1e3a8a;
  --gold-bg: #fef3c7;
  --red-bg: #ffe1e6;
  --green-bg: #d1fae5;
  --purple-bg: #ede9fe;
  --shadow-xs: 0 1px 2px rgba(10, 22, 40, 0.06);
  --shadow-sm: 0 2px 6px rgba(10, 22, 40, 0.08);
  --shadow: 0 14px 30px rgba(10, 22, 40, 0.10);
  --shadow-lg: 0 28px 60px rgba(10, 22, 40, 0.18);
  --bg: var(--frost);
  --surface: #ffffff;
  --surface-2: #f7faff;
  --border: var(--line);
  --border-2: var(--line-2);
  --text: var(--ink);
  --text-2: #334155;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --tp-bg: #f5f7fb;
  --tp-surface: #ffffff;
  --tp-surface-2: #f8fafc;
  --tp-border: #d9e4f4;
  --tp-border-2: #c1d1e8;
  --tp-text: #0a1628;
  --tp-text-2: #334155;
  --tp-muted: #64748b;
  --tp-accent: #2563eb;
  --tp-accent-soft: rgba(37, 99, 235, 0.1);
  --tp-green: #047857;
  --tp-green-soft: rgba(5, 150, 105, 0.12);
  --tp-gold: #b45309;
  --tp-gold-soft: rgba(245, 158, 11, 0.14);
  --tp-shadow: 0 10px 28px rgba(10, 22, 40, 0.08);
}

html.tp-page-root,
body.tp-page {
  background:
    radial-gradient(1000px 460px at 82% -140px, rgba(37, 99, 235, 0.06), transparent 68%),
    linear-gradient(180deg, #f8fbff 0%, var(--tp-bg) 340px, #f8fafc 100%);
}

body.tp-page {
  overflow-x: hidden;
  color: var(--tp-text);
  background-attachment: fixed;
}

.tp-page .site-nav {
  border-bottom-color: rgba(193, 209, 232, 0.72);
  background: rgba(255, 255, 255, 0.92);
  color: var(--tp-text);
  box-shadow: 0 1px 0 rgba(10, 22, 40, 0.04);
}

.tp-page .brand,
.tp-page .nav-links a,
.tp-page .nav-meta,
.tp-page .theme-toggle {
  color: var(--tp-text);
}

.tp-page .nav-links a {
  background: transparent;
  color: var(--tp-muted);
}

.tp-page .nav-links a:hover,
.tp-page .nav-links a.active {
  background: var(--tp-accent-soft);
  color: var(--tp-accent);
}

.tp-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 3vw, 2.4rem) 4rem;
  isolation: isolate;
}

.tp-masthead {
  position: relative;
  min-height: 0;
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  padding: 0.72rem 1rem 0.78rem;
  margin: 0.15rem 0 0.5rem;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 54%, rgba(241, 245, 249, 0.94) 100%);
  box-shadow: 0 7px 22px rgba(10, 22, 40, 0.07);
  overflow: hidden;
}

.tp-mast-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.24rem;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tp-mast-issue { color: var(--tp-accent); }
.tp-mast-date { color: var(--tp-muted); text-align: right; }

.tp-masthead h1 {
  margin: 0;
  max-width: 880px;
  font-family: var(--font-sans);
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--tp-text);
}

.tp-masthead h1 em { font-style: normal; color: var(--blue, #2563eb); font-weight: 800; }

.tp-mast-lede {
  max-width: 850px;
  margin: 0.32rem 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--tp-text-2);
}

.tp-team-panel {
  margin: 0 0 0.5rem;
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--tp-shadow);
  padding: 0.34rem 0.46rem;
  backdrop-filter: blur(14px);
}

.tp-team-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.tp-team-select label,
.tp-toolbar label span {
  display: block;
  margin-bottom: 0.16rem;
  color: var(--tp-muted);
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tp-toolbar label:not(.tp-toggle-row) span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.tp-team-select select,
.tp-toolbar input,
.tp-toolbar select {
  width: 100%;
  height: 32px;
  border: 1px solid var(--tp-border-2);
  border-radius: 8px;
  background: var(--tp-surface);
  color: var(--tp-text);
  font: inherit;
  font-weight: 700;
  padding: 0 0.72rem;
  outline: none;
}

.tp-team-select select:focus,
.tp-toolbar input:focus,
.tp-toolbar select:focus {
  border-color: var(--tp-accent);
  box-shadow: 0 0 0 3px var(--tp-accent-soft);
}

.tp-team-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem 0.85rem;
  padding: 0.18rem 0.3rem 0.05rem;
}

.tp-division {
  flex: 1 1 290px;
  min-width: 0;
}

.tp-division-label {
  display: block;
  margin: 0 0 0.08rem 0.18rem;
  color: var(--tp-muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tp-division-teams {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 1px;
  padding-bottom: 0.82rem;
}

.tp-team-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tp-text);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

.tp-team-button:hover,
.tp-team-button.is-active {
  filter: drop-shadow(0 8px 12px color-mix(in srgb, var(--team-color, var(--tp-accent)) 25%, transparent));
}

.tp-team-button.is-active {
  width: 46px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--team-color, var(--tp-accent)) 8%, transparent);
  transform: translateY(-1px);
}

.tp-team-button:hover { transform: translateY(-2px); }
.tp-team-button img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.18));
}

.tp-team-button.is-active img {
  width: 44px;
  height: 44px;
}

.tp-team-caption { display: none; }

.tp-team-button.is-active .tp-team-caption {
  display: block;
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: color-mix(in srgb, var(--team-color, var(--tp-accent)) 10%, #fff);
  color: color-mix(in srgb, var(--team-color, var(--tp-accent)) 70%, var(--tp-text));
  padding: 0.06rem 0.34rem;
  font-size: 0.52rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  pointer-events: none;
}

.tp-content { min-width: 0; }

/* Broadcast-scoreboard band: one dense always-dark team-color unit — crest +
   name, hairline-separated counts, depth matrix and age histogram. */
.tp-team-hero {
  position: relative;
  display: block;
  min-height: 0;
  padding: 1.05rem 1.3rem 0.95rem;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(120% 180% at 100% 0%, color-mix(in srgb, var(--team-color, #1d4ed8) 60%, #16243f) 0%, transparent 55%),
    linear-gradient(100deg, color-mix(in srgb, var(--team-color, #1d4ed8) 62%, #000) 0%, var(--team-color, #1d4ed8) 56%, color-mix(in srgb, var(--team-color, #1d4ed8) 58%, #000) 100%);
  box-shadow: 0 18px 44px -18px rgba(4, 12, 28, 0.45);
  overflow: hidden;
}

.tp-team-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 9px);
  pointer-events: none;
}

.tp-band-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.tp-hero-kicker {
  margin: 0 0 0.16rem;
  color: var(--team-color, var(--tp-accent));
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tp-team-hero .tp-hero-kicker {
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.tp-team-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 900;
}

.tp-hero-logo {
  width: 128px;
  height: 128px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

.tp-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0 0 0 auto;
}

.tp-metric {
  min-width: 0;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: transparent;
  padding: 0 1.1rem;
  text-align: center;
}

.tp-metric:first-child {
  border-left: 0;
}

.tp-metric strong {
  display: block;
  color: #fff;
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.tp-metric span {
  display: block;
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-draft-capital {
  margin-top: 0.75rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-surface);
  box-shadow: var(--tp-shadow);
  padding: 0.85rem;
}

.tp-capital-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.tp-capital-head h3 {
  margin: 0.08rem 0 0;
  color: var(--tp-text);
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.tp-capital-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.38rem;
}

.tp-capital-totals span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 28px;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  background: var(--tp-surface-2);
  color: var(--tp-muted);
  padding: 0.18rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 850;
}

.tp-capital-totals b {
  color: var(--tp-text);
  font-family: var(--mono);
}

.tp-capital-matrix {
  display: grid;
  min-width: 0;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.tp-capital-row {
  display: grid;
  grid-template-columns: 62px repeat(7, minmax(88px, 1fr));
  min-width: 740px;
  min-height: 42px;
}

.tp-capital-row + .tp-capital-row {
  border-top: 1px solid var(--tp-border);
}

.tp-capital-row-head {
  min-height: 38px;
  background: color-mix(in srgb, var(--team-color, var(--tp-accent)) 8%, var(--tp-surface-2));
}

.tp-year-side,
.tp-round-head,
.tp-pick-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  border-right: 1px solid var(--tp-border);
  padding: 0.3rem 0.38rem;
}

.tp-capital-row > *:last-child {
  border-right: 0;
}

.tp-year-side {
  position: sticky;
  left: 0;
  z-index: 2;
  flex-direction: column;
  gap: 0.12rem;
  justify-content: center;
  background: var(--tp-text);
  color: var(--tp-surface);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.tp-year-side em {
  color: color-mix(in srgb, var(--tp-surface) 70%, transparent);
  font-family: var(--font-sans);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 850;
}

.tp-round-head {
  justify-content: center;
  color: var(--tp-text);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  background: color-mix(in srgb, var(--team-color, var(--tp-accent)) 12%, var(--tp-surface-2));
}

.tp-capital-row-head .tp-year-side {
  background: var(--tp-text);
  color: var(--tp-surface);
}

.tp-pick-cell {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.24rem;
  background: var(--tp-surface);
  color: var(--tp-muted);
  font-family: var(--mono);
  font-weight: 900;
}

.tp-pick-cell.empty {
  justify-content: center;
  background: var(--tp-surface-2);
  color: color-mix(in srgb, var(--tp-muted) 60%, transparent);
}

.tp-pick-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--tp-accent) 38%, var(--tp-border));
  border-radius: 7px;
  background: var(--tp-accent-soft);
  color: var(--tp-accent);
  padding: 0.12rem 0.34rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 850;
  white-space: nowrap;
}

.tp-pick-mini.acquired {
  border-color: color-mix(in srgb, var(--tp-gold) 42%, var(--tp-border));
  background: var(--tp-gold-soft);
  color: var(--tp-gold);
}

.tp-pick-mini.conditional {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent);
}

.tp-capital-note {
  margin: 0.55rem 0 0;
  color: var(--tp-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.tp-tier-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0.42rem 0 0.34rem;
}

.tp-tier-chip,
.tp-card-open,
.tp-d-close {
  border: 1px solid var(--tp-border-2);
  border-radius: 999px;
  background: var(--tp-surface);
  color: var(--tp-text-2);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.tp-tier-chip {
  min-height: 27px;
  padding: 0 0.55rem;
  font-size: 0.68rem;
}

.tp-tier-chip.is-active {
  border-color: var(--tp-accent);
  background: var(--tp-accent);
  color: #fff;
}

.tp-tier-chip span {
  margin-left: 0.35rem;
  color: inherit;
  opacity: 0.72;
  font-family: var(--mono);
  font-size: 0.66rem;
}

.tp-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.28fr) repeat(4, minmax(116px, 0.78fr)) minmax(128px, auto) minmax(108px, auto);
  gap: 0.38rem;
  padding: 0.34rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--team-color, var(--tp-accent)) 4%, var(--tp-surface)) 0%, var(--tp-surface) 55%);
  box-shadow: 0 7px 18px rgba(10, 22, 40, 0.06);
}

.tp-toolbar label {
  position: relative;
  display: block;
  min-width: 0;
  height: 32px;
}

.tp-copy-link {
  align-self: end;
  height: 32px;
  min-height: 0;
  min-width: 108px;
  border: 1px solid var(--tp-border-2);
  border-radius: 999px;
  background: var(--tp-surface);
  color: var(--tp-accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  padding: 0 0.86rem;
  white-space: nowrap;
}

.tp-copy-link:hover,
.tp-copy-link:focus-visible {
  border-color: var(--tp-accent);
  background: var(--tp-accent-soft);
  outline: none;
}

.tp-toolbar label:not(.tp-toggle-row) input,
.tp-toolbar label:not(.tp-toggle-row) select {
  display: block;
}

.tp-toggle-row {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 32px;
  border: 1px solid var(--tp-border-2);
  border-radius: 8px;
  background: var(--tp-surface-2);
  padding: 0 0.72rem;
  cursor: pointer;
}

.tp-toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--tp-accent);
}

.tp-toggle-row span {
  margin: 0;
  color: var(--tp-text);
  font-size: 0.7rem;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: none;
}

.tp-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.42rem 0 0.32rem;
  color: var(--tp-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.tp-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

/* ===========================================================================
   Prospect card views — Marquee (default, stats ledger) + Rail (the path).
   Switched by the Stats | Path toggle; both render from live history rows.
   ======================================================================== */
.tp-viewbar{display:flex;align-items:center;gap:.55rem;justify-content:flex-end;margin:.1rem 0 .35rem;}
.tp-viewbar-lab{font-family:var(--mono);font-size:.56rem;letter-spacing:.12em;text-transform:uppercase;color:var(--tp-muted);}
.tp-viewseg{display:inline-flex;background:var(--tp-surface-2);border:1px solid var(--tp-border-2);border-radius:999px;padding:2px;}
.tp-viewseg button{font:inherit;font-size:.72rem;font-weight:800;border:0;background:transparent;color:var(--tp-muted);padding:.3rem .85rem;border-radius:999px;cursor:pointer;transition:background .15s ease,color .15s ease;}
.tp-viewseg button.is-on{background:var(--tp-accent);color:#fff;box-shadow:0 3px 8px rgba(37,99,235,.32);}

.tp-pcard{position:relative;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease;color:var(--tp-text);}
.tp-pcard:hover{transform:translateY(-2px);}
.tp-pcard:focus-visible{outline:2px solid var(--tp-accent);outline-offset:2px;}
.tp-tier{font-family:var(--font-sans);font-weight:800;font-size:.62rem;letter-spacing:.04em;padding:.16rem .44rem;border-radius:6px;line-height:1;flex:0 0 auto;align-self:flex-start;}
.tp-tier-S{background:linear-gradient(135deg,#ffe082,#f0b429);color:#3a2a02;}
.tp-tier-A{background:linear-gradient(135deg,#9fd0ff,#3b74d6);color:#04173f;}

/* ledger rows (Marquee body) */
.tpc-season+.tpc-season{margin-top:.5rem;}
.tpc-yr{display:flex;align-items:center;gap:.5rem;font-family:var(--mono);font-size:.52rem;letter-spacing:.12em;text-transform:uppercase;color:var(--tp-muted);margin-bottom:.22rem;}
.tpc-yr b{color:var(--tp-accent);}
.tpc-yr .ln{flex:1;height:1px;background:var(--tp-border);}
.tpc-row{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:.5rem;padding:.16rem 0;}
.tpc-row .lg{display:flex;align-items:center;gap:.34rem;font-size:.76rem;font-weight:700;color:var(--tp-text);}
.tpc-tag{font-family:var(--mono);font-size:.44rem;letter-spacing:.06em;text-transform:uppercase;border-radius:5px;padding:.08rem .3rem;border:1px solid var(--tp-border-2);color:var(--tp-muted);}
.tpc-tag.po{color:#1d4ed8;border-color:#c5d6f5;background:#eef4ff;}
.tpc-tag.int,.tpc-tag.cup{color:#8a5a00;border-color:#ecd9a8;background:#fdf3da;}
.tpc-stat{font-family:var(--mono);font-size:.74rem;font-weight:700;color:var(--tp-text);}
.tpc-row.hot{background:linear-gradient(90deg,#fff8e6,transparent);border-radius:7px;margin:0 -.3rem;padding:.16rem .3rem;}
.tpc-row.hot .tpc-stat{color:#8a5a00;}
.tpc-row.hot .star{color:#e0a400;}
[data-theme="dark"] .tpc-tag.po{background:rgba(96,165,250,.16);border-color:rgba(96,165,250,.4);color:#9fc6ff;}
[data-theme="dark"] .tpc-tag.int,[data-theme="dark"] .tpc-tag.cup{background:rgba(240,180,41,.14);border-color:rgba(240,180,41,.4);color:#ffe082;}
[data-theme="dark"] .tpc-row.hot{background:linear-gradient(90deg,rgba(240,180,41,.14),transparent);}
[data-theme="dark"] .tpc-row.hot .tpc-stat{color:#ffe082;}

/* MARQUEE */
.tp-marquee{background:var(--tp-surface);border:1px solid var(--tp-border);border-radius:16px;overflow:hidden;box-shadow:var(--tp-shadow);display:flex;flex-direction:column;min-height:300px;}
.tp-marquee:hover{box-shadow:0 26px 52px -24px rgba(0,32,91,.42);}
/* Header wears the selected team's color (Deep treatment): the team color blended
   toward ink so white text stays legible for all 32, incl. gold/orange. --team-color
   and --team-logo come from teamStyle() on the .tp-pcard. */
.tp-mq-head{background:linear-gradient(135deg,color-mix(in srgb,var(--team-color,#1d4ed8) 74%,#080f1c) 0%,color-mix(in srgb,var(--team-color,#1d4ed8) 46%,#060c17) 70%,color-mix(in srgb,var(--team-color,#1d4ed8) 34%,#04080f) 100%);color:#fff;padding:.8rem .95rem .78rem;position:relative;overflow:hidden;}
.tp-mq-head::before{content:"";position:absolute;right:-26px;bottom:-34px;width:128px;height:128px;background:var(--team-logo) center/contain no-repeat;opacity:.16;filter:grayscale(1) brightness(3);pointer-events:none;}
.tp-mq-head::after{content:"";position:absolute;right:-30px;top:-34px;width:120px;height:120px;border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.2),transparent);pointer-events:none;}
.tp-mq-id{position:relative;display:flex;align-items:center;gap:.7rem;}
.tp-mq-ph{width:52px;height:52px;flex:0 0 auto;border-radius:50%;overflow:hidden;border:2px solid rgba(255,255,255,.32);background:color-mix(in srgb,var(--team-color,#1d4ed8) 30%,#0a1424);position:relative;}
.tp-mq-ph img{width:100%;height:100%;object-fit:cover;object-position:center 12%;}
.tp-mq-ph img.tp-photo-team{padding:8px;background:#fff;object-fit:contain;}
.tp-mq-ph .tp-photo-empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.82);font-weight:800;}
.tp-mq-idtext{min-width:0;flex:1;}
.tp-mq-head h3{margin:0;font-size:1.14rem;font-weight:800;color:#fff;letter-spacing:-.015em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tp-mq-role{font-size:.57rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:rgba(255,255,255,.74);margin-top:.16rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tp-mq-draft{position:relative;display:flex;align-items:center;gap:.5rem;margin-top:.65rem;font-family:var(--mono);font-size:.54rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:rgba(255,255,255,.82);}
.tp-mq-draft .pk{background:rgba(255,255,255,.2);color:#fff;padding:.16rem .44rem;border-radius:6px;font-size:.64rem;}
.tp-mq-draft .acq{margin-left:auto;color:rgba(255,255,255,.7);}
.tp-mq-body{padding:.72rem .95rem .85rem;flex:1;display:flex;flex-direction:column;justify-content:center;}
.tp-mq-body .tpc-season{width:100%;}

/* RAIL — fixed height; stops distribute to fill so every card matches */
/* Path card wears the team's colors like the draft-order Duotone cards: a soft
   team-color wash + a faint team-crest watermark (var(--team-logo)). */
.tp-rail{position:relative;overflow:hidden;background:linear-gradient(155deg,color-mix(in srgb,var(--team-color,var(--tp-accent)) 13%,var(--tp-surface)) 0%,var(--tp-surface) 68%);border:1px solid var(--tp-border);border-top:3px solid var(--team-color,var(--tp-accent));border-radius:16px;padding:.95rem 1.05rem 1rem;box-shadow:var(--tp-shadow);display:flex;flex-direction:column;min-height:300px;}
.tp-rail::before{content:"";position:absolute;right:-24px;bottom:-30px;width:122px;height:122px;background:var(--team-logo-light,var(--team-logo)) center/contain no-repeat;opacity:.08;pointer-events:none;}
[data-theme="dark"] .tp-rail::before{background-image:var(--team-logo);opacity:.06;}
.tp-rail > *{position:relative;z-index:1;}
.tp-rail:hover{box-shadow:0 26px 52px -24px rgba(0,32,91,.42);}
.tp-rl-id{display:flex;align-items:center;gap:.65rem;}
.tp-rl-ph{width:46px;height:46px;flex:0 0 auto;border-radius:50%;overflow:hidden;border:1px solid var(--tp-border);background:var(--tp-surface-2);position:relative;}
.tp-rl-ph img{width:100%;height:100%;object-fit:cover;object-position:center 12%;}
.tp-rl-ph img.tp-photo-team{padding:7px;background:#fff;object-fit:contain;}
.tp-rl-ph .tp-photo-empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--tp-muted);font-weight:800;}
.tp-rl-idtext{min-width:0;flex:1;}
.tp-rail h3{margin:0;font-size:1.1rem;font-weight:800;letter-spacing:-.015em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tp-rl-role{font-size:.57rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--tp-muted);margin-top:.12rem;}
.tp-rl-rail{position:relative;flex:1;margin-top:.9rem;padding-left:1.35rem;display:flex;flex-direction:column;justify-content:space-between;}
.tp-rl-rail::before{content:"";position:absolute;left:5px;top:7px;bottom:7px;width:2px;background:linear-gradient(180deg,var(--team-color,var(--tp-accent)),color-mix(in srgb,var(--team-color,var(--tp-accent)) 45%,var(--tp-surface)) 70%,var(--tp-border-2));}
.tp-rl-stop{position:relative;}
.tp-rl-stop::before{content:"";position:absolute;left:-1.35rem;top:2px;width:12px;height:12px;border-radius:50%;background:var(--team-color,var(--tp-accent));border:2px solid var(--tp-surface);box-shadow:0 0 0 2px var(--team-color,var(--tp-accent));}
.tp-rl-stop.now::before{background:var(--tp-text);box-shadow:0 0 0 4px color-mix(in srgb,var(--tp-text) 16%,transparent);}
.tp-rl-stop.origin::before{background:var(--tp-surface);border-color:#9fb2cd;box-shadow:0 0 0 2px var(--tp-border-2);}
.tp-rl-stop .yr{font-family:var(--mono);font-size:.52rem;letter-spacing:.1em;text-transform:uppercase;color:var(--tp-muted);}
.tp-rl-stop .row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;}
.tp-rl-stop .lg{font-size:.8rem;font-weight:800;color:var(--tp-text);}
.tp-rl-stop .st{font-family:var(--mono);font-size:.68rem;font-weight:700;color:var(--tp-text-2);}
.tp-rl-stop.now .lg{color:color-mix(in srgb,var(--team-color,var(--tp-accent)) 72%,var(--tp-text));}
.tp-rl-stop.origin .lg{color:var(--tp-muted);font-size:.72rem;}

.tp-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  gap: 0.48rem 0.55rem;
  align-items: start;
  min-height: 214px;
  border: 1px solid var(--tp-border);
  border-top: 4px solid var(--team-color, var(--tp-accent));
  border-radius: 8px;
  background: var(--tp-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 0.62rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tp-card:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}

.tp-card.is-signed {
  border-top-color: var(--tp-green);
}

.tp-card.is-signed .tp-draft-slot {
  border-color: color-mix(in srgb, var(--tp-green) 34%, var(--tp-border));
  background: color-mix(in srgb, var(--tp-green) 8%, var(--tp-surface));
}

.tp-card:hover {
  border-color: color-mix(in srgb, var(--team-color, var(--tp-accent)) 50%, var(--tp-border));
  box-shadow: var(--tp-shadow);
  transform: translateY(-1px);
}

.tp-card-photo {
  position: relative;
  width: 46px;
  height: 46px;
}

.tp-card-photo > img:first-child,
.tp-photo-empty {
  width: 46px;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid var(--tp-border);
  border-radius: 50%;
  background: var(--tp-surface-2);
  object-fit: cover;
}

.tp-card-photo > img.tp-photo-team {
  padding: 7px;
  background: #fff;
  object-fit: contain;
}

.tp-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tp-muted);
  font-weight: 900;
}

.tp-card-main { min-width: 0; }

.tp-card-main h3 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--tp-text);
}

.tp-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem 0.38rem;
  margin: 0.28rem 0 0;
  color: var(--tp-text-2);
  font-size: 0.68rem;
  font-weight: 750;
}

.tp-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.tp-draft-slot {
  display: inline-grid;
  align-items: center;
  justify-self: start;
  max-width: 100%;
  margin-top: 0.42rem;
  border: 1px solid color-mix(in srgb, var(--team-color, var(--tp-accent)) 34%, var(--tp-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--team-color, var(--tp-accent)) 8%, var(--tp-surface));
  padding: 0.28rem 0.48rem;
  white-space: nowrap;
}

.tp-draft-slot.is-first-round {
  border-color: color-mix(in srgb, var(--team-color, var(--tp-accent)) 74%, var(--tp-border));
  background: var(--team-color, var(--tp-accent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 20%, transparent);
}

.tp-draft-slot.is-first-round strong {
  color: #fff;
}

.tp-draft-slot strong {
  color: var(--tp-text);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.1;
}

.tp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  grid-column: 1 / -1;
  margin-top: 0.1rem;
}

.tp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  background: var(--tp-surface-2);
  color: var(--tp-text-2);
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.tp-badge.tier { background: var(--tp-green-soft); border-color: color-mix(in srgb, var(--tp-green) 35%, var(--tp-border)); color: var(--tp-green); }
.tp-badge.gold { background: var(--tp-gold-soft); border-color: color-mix(in srgb, var(--tp-gold) 35%, var(--tp-border)); color: var(--tp-gold); }
.tp-badge.signed { background: var(--tp-green-soft); border-color: color-mix(in srgb, var(--tp-green) 35%, var(--tp-border)); color: var(--tp-green); }

.tp-card-read {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--tp-text-2);
  font-size: 0.74rem;
  line-height: 1.38;
}

.tp-season-block {
  min-width: 0;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-surface-2);
  padding: 0.42rem;
}

.tp-season-block.signed {
  border-color: color-mix(in srgb, var(--tp-green) 28%, var(--tp-border));
  background: color-mix(in srgb, var(--tp-green) 7%, var(--tp-surface-2));
}

.tp-season-block.is-current {
  border-color: color-mix(in srgb, var(--tp-green) 32%, var(--tp-border));
  background: color-mix(in srgb, var(--tp-green) 10%, var(--tp-surface-2));
}

.tp-season-block.is-current em,
.tp-season-block.is-current .tp-league-lines b {
  color: var(--tp-green);
}

.tp-season-block.is-event {
  border-color: color-mix(in srgb, var(--tp-gold) 32%, var(--tp-border));
  background: color-mix(in srgb, var(--tp-gold) 9%, var(--tp-surface-2));
}

.tp-season-block.is-event em,
.tp-season-block.is-event .tp-league-lines b {
  color: var(--tp-gold);
}

.tp-season-block + .tp-season-block {
  margin-top: 0.34rem;
}

.tp-season-block em {
  display: block;
  margin-bottom: 0.32rem;
  color: var(--tp-muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tp-season-block > strong {
  display: block;
  color: var(--tp-text);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.tp-league-lines {
  display: grid;
  gap: 0.28rem;
}

.tp-league-lines span {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
  gap: 0.32rem;
  color: var(--tp-text);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.tp-league-lines b {
  color: var(--team-color, var(--tp-accent));
  overflow-wrap: anywhere;
  white-space: normal;
}

.tp-season-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.38rem;
  margin-bottom: 0.42rem;
}

.tp-season-chip {
  min-width: 0;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-surface-2);
  padding: 0.42rem;
}

.tp-season-chip em {
  display: block;
  color: var(--tp-muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tp-season-chip strong {
  display: block;
  margin-top: 0.16rem;
  color: var(--tp-text);
  font-family: var(--mono);
  font-size: 0.69rem;
  line-height: 1.25;
}

.tp-card-open {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 78px;
  height: 32px;
  color: var(--tp-accent);
}

.tp-card-open:hover {
  border-color: var(--tp-accent);
  background: var(--tp-accent-soft);
}

.tp-empty {
  border: 1px dashed var(--tp-border-2);
  border-radius: 8px;
  background: var(--tp-surface);
  padding: 1.2rem;
  color: var(--tp-muted);
  font-weight: 750;
}

.tp-foot {
  margin-top: 2rem;
  border-top: 1px solid var(--tp-border);
  padding-top: 1rem;
  color: var(--tp-muted);
  font-size: 0.82rem;
}

.tp-foot a { color: var(--tp-accent); font-weight: 850; }

.tp-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(860px, 94vw);
  z-index: 90;
  background: var(--tp-surface);
  color: var(--tp-text);
  border-left: 1px solid var(--tp-border);
  box-shadow: -24px 0 50px rgba(15, 23, 42, 0.18);
  transform: translateX(105%);
  transition: transform 0.2s ease;
  overflow: auto;
}

.tp-drawer[aria-hidden="true"] { display: none; }
.tp-drawer[aria-hidden="false"] { transform: translateX(0); }

.tp-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(5, 10, 22, 0.46);
}

.tp-drawer-inner { padding: 1.1rem; }

.tp-d-head {
  position: relative;
  min-height: 168px;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--team-color, var(--tp-accent)) 20%, var(--tp-surface)) 0%, var(--tp-surface) 62%),
    var(--tp-surface);
  padding: 1rem 4rem 1rem 1rem;
  overflow: hidden;
}

.tp-d-head h2 {
  margin: 0.25rem 0 0;
  font-size: 2.1rem;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.tp-d-kicker {
  color: var(--team-color, var(--tp-accent));
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tp-d-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  color: var(--tp-text);
}

.tp-d-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.tp-d-id img,
.tp-d-empty {
  width: 74px;
  height: 74px;
  box-sizing: border-box;
  border: 1px solid var(--tp-border);
  border-radius: 50%;
  background: var(--tp-surface-2);
  object-fit: cover;
}

.tp-d-id img.tp-photo-team {
  padding: 11px;
  background: #fff;
  object-fit: contain;
}

.tp-d-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tp-muted);
  font-weight: 900;
}

.tp-d-meta {
  color: var(--tp-text-2);
  font-weight: 750;
}

.tp-d-meta-line {
  color: var(--tp-text);
  font-weight: 850;
  line-height: 1.35;
}

.tp-d-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.42rem;
}

.tp-d-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  background: var(--tp-surface-2);
  color: var(--tp-text-2);
  padding: 0.12rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.tp-d-section {
  margin-top: 0.8rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-surface);
  padding: 0.85rem;
}

.tp-d-section h3 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tp-d-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.tp-d-stat {
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-surface-2);
  padding: 0.55rem;
}

.tp-d-stat span {
  display: block;
  color: var(--tp-muted);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tp-d-stat strong {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tp-text);
}

.tp-history-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.tp-history-head h3 {
  margin-bottom: 0.18rem;
}

.tp-history-head p {
  max-width: 470px;
  margin: 0;
  color: var(--tp-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.tp-history-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.tp-history-counts span {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-height: 28px;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  background: var(--tp-surface-2);
  color: var(--tp-muted);
  padding: 0.14rem 0.52rem;
  font-size: 0.68rem;
  font-weight: 850;
}

.tp-history-counts b {
  color: var(--tp-text);
  font-family: var(--mono);
}

.tp-history-section {
  margin-top: 0.72rem;
}

.tp-history-section h4 {
  margin: 0 0 0.3rem;
  color: var(--tp-text-2);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tp-d-table-wrap { overflow-x: auto; }
.tp-d-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.tp-d-table th,
.tp-d-table td {
  border-bottom: 1px solid var(--tp-border);
  padding: 0.52rem 0.45rem;
  text-align: left;
  white-space: nowrap;
}

.tp-d-table td:nth-child(4) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-d-table th {
  color: var(--tp-muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tp-d-table .num { text-align: right; font-family: var(--mono); }

@media (max-width: 1120px) {
  .tp-team-panel { margin-top: -0.35rem; }
}

@media (max-width: 1320px) {
  .tp-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
  .tp-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .site-nav {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--nav-height);
    row-gap: 0.55rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .nav-meta {
    margin-left: auto;
  }
}

@media (max-width: 860px) {
  .tp-band-top { flex-wrap: wrap; gap: 0.8rem; }
  .tp-hero-logo { width: 64px; height: 64px; }
  .tp-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
    margin: 0;
    gap: 0.4rem 0;
  }
  .tp-metric { border-left: 0; padding: 0 0.3rem; }
  .tp-metric strong { font-size: 1.15rem; }
  .tp-capital-head { display: grid; }
  .tp-capital-totals { justify-content: flex-start; }
  .tp-capital-row {
    grid-template-columns: 52px repeat(7, minmax(92px, 1fr));
    min-width: 696px;
  }
  .tp-year-side,
  .tp-round-head { padding: 0.28rem 0.24rem; }
  .tp-pick-cell { align-content: flex-start; }
  .tp-pick-mini { font-size: 0.58rem; min-height: 22px; padding: 0.1rem 0.28rem; }
  .tp-toolbar { grid-template-columns: 1fr 1fr; }
  .tp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-card {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
  }
  .tp-card-photo,
  .tp-card-photo > img:first-child,
  .tp-photo-empty { width: 50px; height: 50px; }
  .tp-card-read,
  .tp-card-open { grid-column: 1 / -1; }
  .tp-card-open { width: 100%; }
  .tp-season-pair { grid-template-columns: 1fr; }
  .tp-d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-history-head { display: grid; }
  .tp-history-counts { justify-content: flex-start; }
}

@media (max-width: 500px) {
  /* Capital strip scrolls sideways on phones: snap round-by-round and fade the
     clipped edge so the cut-off is legible as "more to the right". */
  .tp-capital-matrix {
    scroll-snap-type: x proximity;
    scroll-padding-left: 56px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
  }
  .tp-pick-cell { scroll-snap-align: start; }
}

@media (max-width: 560px) {
  .tp-main { padding-left: 0.8rem; padding-right: 0.8rem; }
  .tp-mast-row { display: grid; }
  .tp-mast-date { text-align: left; }
  .tp-mast-lede { display: none; }
  .tp-toolbar {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }
  .tp-toolbar label {
    flex: 0 0 148px;
    scroll-snap-align: start;
  }
  .tp-toolbar label:first-child { flex-basis: 190px; }
  .tp-toolbar .tp-toggle-row { flex-basis: 160px; }
  .tp-list { grid-template-columns: 1fr; }
  .tp-d-head { padding-right: 3.2rem; }
  .tp-d-head h2 { font-size: 1.65rem; }
}

/* ===== Band lower deck: depth matrix + age histogram on the dark band ===== */
.tp-band-low { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; gap: 1.7rem; align-items: end; margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
@media (max-width: 860px) { .tp-band-low { grid-template-columns: 1fr; gap: 1rem; } }

/* ===== Depth mini-matrix (hero band) ===== */
.tp-depth { display: grid; gap: 3px; min-width: 218px; }
.tp-depth-row { display: grid; grid-template-columns: 26px repeat(3, 56px); gap: 3px; }
.tp-depth-row span { display: grid; place-items: center; min-height: 25px; border-radius: 5px; background: rgba(255, 255, 255, 0.09); font-family: var(--mono); font-size: 0.7rem; font-weight: 700; color: #fff; }
.tp-depth-row span.is-hot { background: rgba(255, 255, 255, 0.26); }
.tp-depth-head span { background: transparent; min-height: 0; font-size: 0.54rem; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.6); }
.tp-depth-g { background: transparent !important; color: rgba(255, 255, 255, 0.6) !important; font-size: 0.6rem !important; }
.tp-depth-row span.is-zero { color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.04); }

/* ===== The wave: stacked F/D/G age histogram, 16-24 ===== */
.tp-wave { min-width: 0; align-self: end; }
.tp-wave-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.35rem; }
.tp-wave-k { font-family: var(--mono); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.tp-wave-legend { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--mono); font-size: 0.58rem; font-weight: 700; color: rgba(255, 255, 255, 0.62); }
.tp-wave-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.tp-wave-cols { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.tp-wave-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.tp-wave-col i { display: block; border-radius: 2px 2px 0 0; }
.tp-wave i.is-f, .tp-wave-legend i.is-f { background: #6ea8ff; }
.tp-wave i.is-d, .tp-wave-legend i.is-d { background: #c4d2e8; }
.tp-wave i.is-g, .tp-wave-legend i.is-g { background: #ffc63f; }
.tp-wave-axis { display: flex; gap: 5px; margin-top: 0.25rem; }
.tp-wave-axis span { flex: 1; text-align: center; font-family: var(--mono); font-size: 0.56rem; font-weight: 700; color: rgba(255, 255, 255, 0.5); }

/* ===== Recent team chips ===== */
.tp-recent { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tp-recent:empty { display: none; }
.tp-recent-k { font-family: var(--mono); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tp-text-2, #64748b); }
.tp-recent button { border: 1px solid var(--tp-border, #dbe5f2); background: #fff; color: var(--tp-text, #0f172a); font-family: var(--mono); font-size: 0.66rem; font-weight: 800; border-radius: 999px; padding: 0.2rem 0.6rem; cursor: pointer; }
.tp-recent button:hover { border-color: var(--blue, #2563eb); color: var(--blue, #2563eb); }
.tp-recent-hint { margin-left: auto; font-family: var(--mono); font-size: 0.56rem; color: var(--tp-text-2, #94a3b8); }

/* ===== Draft-capital chips as ticket stubs ===== */
.tp-pick-mini { position: relative; border-left-width: 4px !important; padding-left: 0.5rem !important; }
.tp-pick-mini::before { content: ""; position: absolute; left: 0.28rem; top: 3px; bottom: 3px; border-left: 1px dashed currentColor; opacity: 0.45; }
