/* Prospect Tracker Overview (E+A) + shared pills / AHL boards */

/* ── Shared pills ── */
.pto-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.22rem;
  margin: 0 0 1.15rem;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.pto-pills__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.pto-pills__tab:hover { color: var(--ink); }

.pto-pills__tab.is-active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 2px color-mix(in srgb, #000 12%, transparent);
}

/* ── Team board slider (Prospects board | AHL club), under page head ── */
.pto-board-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.22rem;
  margin: 0 0 1.1rem;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  max-width: 100%;
}

.pto-board-pills__tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: var(--pto-chip-bg, transparent);
  color: var(--pto-chip-fg, var(--ink-2));
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  opacity: 0.78;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pto-chip-accent, var(--pto-chip-bg, transparent)) 40%, transparent);
}

.pto-board-pills__tab:hover {
  opacity: 0.92;
  filter: brightness(1.04);
  color: var(--pto-chip-fg, var(--ink));
}

.pto-board-pills__tab.is-active {
  opacity: 1;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--pto-chip-accent, var(--pto-chip-fg, #fff)) 55%, transparent),
    0 1px 3px color-mix(in srgb, #000 16%, transparent);
}

.pto-board-pills__logo {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 0.15rem;
  background: color-mix(in srgb, #fff 22%, transparent);
}

/* NHL SVGs are wide (960×640) with padding, so bump size to match AHL PNG marks */
.pto-board-pills__logo--nhl {
  width: 1.9rem;
  height: 1.9rem;
  margin: -0.28rem -0.1rem -0.28rem -0.05rem;
  background: transparent;
  transform: scale(1.08);
  transform-origin: center;
}

/* ── AHL team desk: Compared to + Roster map (Report Card style) ── */
.pto-ahl-desk {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
  align-items: start;
}

.pto-ahl-desk > .panel {
  min-width: 0;
  overflow: hidden !important;
}

.pto-ahl-desk .rc-radar-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden !important;
  isolation: isolate;
}

/* Stats table on top, radar chart below (do not sit side by side) */
.pto-ahl-desk .rc-radar-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
}

.pto-ahl-desk .rc-radar-table {
  min-width: 0;
  overflow-x: auto;
}

.pto-ahl-desk .rc-radar-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  overflow: hidden !important;
  padding: 0.25rem 0.4rem 0.45rem;
  box-sizing: border-box;
}

.pto-ahl-radar-frame {
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden !important;
  border-radius: 0.35rem;
  contain: paint;
}

.pto-ahl-desk .rc-radar {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden !important;
}

.pto-ahl-desk .rc-radar-note {
  margin: 0;
  text-align: center;
  max-width: 28rem;
}

.pto-ahl-desk__note {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
}

@media (max-width: 980px) {
  .pto-ahl-desk {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  /* Keep spoke labels readable on a narrow card. */
  .pto-ahl-radar-frame {
    width: min(100%, 20rem);
    overflow: visible !important;
    contain: none;
  }
  .pto-ahl-desk .rc-radar-chart,
  .pto-ahl-desk .rc-radar-panel,
  .pto-ahl-desk > .panel {
    overflow: visible !important;
  }
  .pto-ahl-desk .rc-radar {
    overflow: visible !important;
  }
  .pto-ahl-desk .rc-radar-table {
    -webkit-overflow-scrolling: touch;
  }

  /* Board / affiliate pills: swipe instead of wrapping off-screen. */
  .pto-board-pills,
  .pto-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    max-width: 100%;
    padding-bottom: 0.15rem;
  }
  .pto-board-pills::-webkit-scrollbar,
  .pto-pills::-webkit-scrollbar {
    display: none;
  }
  .pto-board-pills__tab,
  .pto-pills__tab {
    flex: 0 0 auto;
  }
}

/* ── Overview root ── */
.pto-ov {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
  max-width: 100%;
}

/* ── Path filter chips ── */
.pto-ov__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.pto-ov__filters-label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-right: 0.2rem;
}

.pto-ov__chip {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--bg-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pto-ov__chip:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.pto-ov__chip.is-active {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-2));
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--ink);
}

/* ── Leader columns ── */
.pto-lead {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .pto-lead { grid-template-columns: 1fr; }
}

.pto-lead__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 1px 0 color-mix(in srgb, #000 4%, transparent);
}

.pto-lead__head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.95rem 1rem 0.65rem;
  min-width: 0;
}

.pto-lead__head-text {
  min-width: 0;
}

.pto-lead__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pto-lead__sub {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pto-lead__list {
  list-style: none;
  margin: 0;
  padding: 0 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-height: 0;
  /* ~10 rows in view; Top 20 scrolls for the rest */
  max-height: 36.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.pto-lead__row {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 0.45rem;
  row-gap: 0.2rem;
  align-items: center;
  padding: 0.48rem 0.45rem 0.42rem;
  border-radius: 0.55rem;
  min-width: 0;
  transition: background 0.12s ease;
}

.pto-lead__row:hover {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}

.pto-lead__row.is-hidden {
  display: none;
}

.pto-lead__rank {
  grid-row: 1 / span 2;
  align-self: center;
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--line) 35%, transparent);
}

.pto-lead__row.is-gold .pto-lead__rank {
  color: #7a5200;
  background: linear-gradient(145deg, #fde68a, #f59e0b);
}

.pto-lead__row.is-silver .pto-lead__rank {
  color: #374151;
  background: linear-gradient(145deg, #e5e7eb, #9ca3af);
}

.pto-lead__row.is-bronze .pto-lead__rank {
  color: #7c3a1d;
  background: linear-gradient(145deg, #fdba74, #d97706);
}

.pto-lead__who {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.pto-lead__name {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  text-decoration: none;
  max-width: 100%;
  display: block;
}

a.pto-lead__name:hover {
  color: color-mix(in srgb, var(--accent) 85%, var(--ink));
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.pto-lead__meta {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  font-size: 0.7rem;
  color: var(--ink-2);
}

.pto-lead__org {
  font-weight: 700;
  color: var(--ink);
  flex: 0 0 auto;
}

.pto-lead__sep {
  opacity: 0.55;
  flex: 0 0 auto;
}

.pto-lead__lg {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pto-lead__stats {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.02rem;
  min-width: 3.2rem;
}

.pto-lead__stat {
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
}

.pto-lead__stat-sub {
  font-size: 0.64rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pto-lead__bar {
  grid-column: 2 / span 2;
  grid-row: 2;
  display: block;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 45%, transparent);
  overflow: hidden;
}

.pto-lead__bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--accent) 70%, #94a3b8);
  max-width: 100%;
}

.pto-lead__col--ahl .pto-lead__bar-fill {
  background: color-mix(in srgb, #3b82f6 75%, #94a3b8);
}

.pto-lead__col--pace .pto-lead__bar-fill {
  background: color-mix(in srgb, #f59e0b 80%, #94a3b8);
}

.pto-lead__empty {
  padding: 1rem 0.5rem;
  font-size: 0.84rem;
}

/* ── AHL conference / team boards (shared) ── */
.pto-ov__live {
  color: #159a4a;
  font-weight: 650;
}

.prospects-row__affiliate {
  font-size: 0.78rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prospects-board--ahl .prospects-row {
  grid-template-columns: 2.6rem minmax(0, 1fr) minmax(7.5rem, 12rem) 2.2rem;
}

.prospects-row.is-playing-today {
  background: color-mix(in srgb, #22c55e 9%, transparent);
}

.pto-team-logo {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
}

.pto-board--ahl-full .pto-board__table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

.pto-board--ahl-full .pto-board__row--ahl {
  grid-template-columns:
    1.5rem
    minmax(11rem, 1.55fr)
    2.4rem
    repeat(6, minmax(2.35rem, 2.7rem))
    repeat(10, minmax(2.2rem, 2.55rem));
  gap: 0.28rem 0.45rem;
  min-width: 68rem;
  padding: 0.38rem 0.7rem;
  font-size: 0.8rem;
}

.pto-board--ahl-full .pto-board__row--ahl.pto-board__row--head {
  font-size: 0.58rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.pto-board--ahl-full .pto-board__player { min-width: 0; }

.pto-board--ahl-full .pto-board__player-main {
  flex-wrap: nowrap;
  max-width: 100%;
}

.pto-board--ahl-full .pto-board__player strong {
  flex: 1 1 auto;
  min-width: 0;
}

.pto-board--ahl-full .pto-game-pill--compact {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
}

.pto-board--ahl-full .pto-board__pos {
  font-size: 0.74rem;
  text-align: center;
  white-space: nowrap;
}

.pto-board--ahl-full .pto-board__stat--ppg {
  font-size: 0.74rem;
}

@media (max-width: 767px) {
  /* After the base sticky rule so phones can swipe the wide AHL board cleanly. */
  .pto-board--ahl-full .pto-board__row--ahl.pto-board__row--head {
    position: static;
  }
  .pto-board--ahl-full .pto-board__row--ahl {
    min-width: 56rem;
    font-size: 0.78rem;
    padding: 0.42rem 0.65rem;
  }
  .pto-board--ahl-full .pto-board__player {
    min-width: 9.5rem;
  }
}

@media (max-width: 720px) {
  .prospects-board--ahl .prospects-row {
    grid-template-columns: 2.35rem minmax(0, 1fr) minmax(5.5rem, 8rem) 2rem;
  }
}

/* ── Overview column "Full list" link ── */
.pto-lead__head {
  justify-content: space-between;
}

.pto-lead__more {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent) 80%, var(--ink-2));
  text-decoration: none;
  white-space: nowrap;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.pto-lead__more:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
}

/* ── Overview full-list board ── */
.pto-full {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.pto-full__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.pto-full__back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--bg-2);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.pto-full__back:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-2));
}


.pto-full__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: var(--bg-2);
}

.pto-full__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.pto-full__count {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  text-align: right;
}

.pto-full__count-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pto-full__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.pto-full__filters {
  margin: 0;
}

.pto-full__search {
  flex: 1 1 14rem;
  max-width: 22rem;
  margin-left: auto;
}

.pto-full__search input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.48rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--bg-2);
  color: var(--ink);
}

.pto-full__search input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.pto-full__table-wrap {
  overflow: auto;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: var(--bg-2);
  max-height: min(70vh, 52rem);
  overscroll-behavior: contain;
}

.pto-full__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
  min-width: 52rem;
}

.pto-full__table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--bg-2) 92%, var(--bg));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, #000 4%, transparent);
}

.pto-full__th {
  padding: 0;
  text-align: left;
  white-space: nowrap;
  font-weight: 700;
  color: var(--ink-2);
}

.pto-full__th--num,
.pto-full__td--num {
  text-align: right;
}

.pto-full__th--rank,
.pto-full__td--rank {
  width: 2.4rem;
  text-align: center;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.pto-full__th--name {
  min-width: 9.5rem;
}

.pto-full__sort {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0.55rem 0.55rem;
  cursor: pointer;
  width: 100%;
  text-align: inherit;
  white-space: nowrap;
}

.pto-full__sort:hover {
  color: var(--ink);
}

.pto-full__th.is-sorted .pto-full__sort {
  color: var(--ink);
}

.pto-full__th.is-sorted .pto-full__sort::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.75;
}

.pto-full__th.is-sorted.is-asc .pto-full__sort::after {
  content: " ▴";
}

.pto-full__th--primary .pto-full__sort {
  color: var(--ink);
}

.pto-full__row {
  transition: background 0.1s ease;
}

.pto-full__row:nth-child(even) {
  background: color-mix(in srgb, var(--bg) 35%, transparent);
}

.pto-full__row:hover {
  background: color-mix(in srgb, var(--accent) 7%, var(--bg));
}

.pto-full__row.is-hidden {
  display: none;
}

.pto-full__td {
  padding: 0.42rem 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 35%, transparent);
  white-space: nowrap;
  vertical-align: middle;
}

.pto-full__td--muted {
  color: var(--ink-2);
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pto-full__td--draft {
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-2);
  font-size: 0.76rem;
}

.pto-full__td--num {
  font-variant-numeric: tabular-nums;
}

.pto-full__td--primary {
  font-weight: 800;
  color: var(--ink);
}

.pto-full__name {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

a.pto-full__name:hover {
  color: color-mix(in srgb, var(--accent) 85%, var(--ink));
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.pto-full__org {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

a.pto-full__org:hover {
  color: color-mix(in srgb, var(--accent) 85%, var(--ink));
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.pto-full__empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
}

.pto-full__hint {
  margin: 0;
  font-size: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .pto-full__search {
    max-width: none;
    margin-left: 0;
    flex-basis: 100%;
  }

  .pto-full__count {
    text-align: left;
  }
}
