.tvpss {
  --tv-blue: #124d92;
  --tv-fill: #2766a8;
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(16px, 3vw, 38px);
  color: var(--navy);
}

.tv-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(115deg, #10274c, #164b80);
}

.tv-hero p { margin: 0; line-height: 1.5; color: #e1edfd; }
.tv-hero .tv-context { color: #ffdc87; font-size: .875rem; font-weight: 650; }
.tv-hero h1 {
  margin: 7px 0 8px;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.tv-hero-link {
  flex: none;
  padding: 10px 13px;
  border: 1px solid #9dc6f081;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}
.tv-hero-link:hover { background: #ffffff1a; }
.tv-hero-link:focus-visible { outline-color: #ffd877; }

.tv-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.tv-stats > div {
  display: flex;
  min-width: 0;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 5px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-top: 3px solid #b6cee9;
  border-radius: 10px;
  background: #fff;
}

.tv-stats > div:nth-child(2) { border-top-color: #3572b5; }
.tv-stats > div:nth-child(4) { border-top-color: #479582; }
.tv-stats dd {
  margin: 0;
  font-size: clamp(1.65rem, 2.9vw, 2.2rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
}
.tv-stats dt { font-size: .875rem; color: var(--muted); line-height: 1.35; }

.tv-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tv-panel {
  min-width: 0;
  padding: clamp(16px, 2.1vw, 23px);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.tv-panel h2 { margin: 0 0 6px; font-size: 1.14rem; letter-spacing: -.02em; }
.tv-panel p { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--muted); }
.tv-panel .tv-chart-help { margin-top: 12px; }
.tv-bars { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }

.tv-bar {
  display: grid;
  grid-template-columns: minmax(135px, 1.03fr) minmax(45px, 1fr) 27px;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #284564;
  font-size: .84rem;
  line-height: 1.25;
  text-decoration: none;
}

a.tv-bar:hover { color: var(--tv-blue); }
a.tv-bar:hover .tv-bar-name { text-decoration: underline; }
.tv-track { height: 8px; border-radius: 10px; background: #eaf0f8; }
.tv-fill { display: block; height: 100%; border-radius: inherit; background: var(--tv-fill); }
.tv-tone-0 { --tv-fill: #697c97; }
.tv-tone-1 { --tv-fill: #5280af; }
.tv-tone-2 { --tv-fill: #255e98; }
.tv-tone-3 { --tv-fill: #268078; }
.tv-tone-4 { --tv-fill: #a36b17; }
.tv-bar-count { text-align: right; font-variant-numeric: tabular-nums; }

.tv-pkg { margin-top: 14px; }
.tv-table-scroll { overflow-x: auto; margin-top: 14px; }
.tv-pkg table { width: 100%; min-width: 590px; border-collapse: collapse; font-size: .875rem; }
.tv-pkg th, .tv-pkg td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.tv-pkg thead { color: #365270; background: #f2f6fb; }
.tv-pkg th:first-child { text-align: left; }
.tv-pkg td { font-variant-numeric: tabular-nums; }
.tv-pkg a { color: var(--tv-blue); text-underline-offset: 2px; }
.tv-total { font-weight: 700; }

.tv-method {
  margin-top: 14px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: .94rem;
  line-height: 1.47;
}
.tv-method summary { cursor: pointer; font-weight: 650; }
.tv-method ul { margin: 11px 0; padding-left: 20px; }
.tv-method li + li { margin-top: 4px; }
.tv-method p { margin: 8px 0 2px; color: var(--muted); }
.tv-source { margin: 16px 0 1px; font-size: .84rem; color: var(--muted); }
.tv-source a { color: var(--tv-blue); text-underline-offset: 2px; }

.tv-filters {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: end;
  margin: 16px 0 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.tv-filters label { display: grid; gap: 5px; font-size: .875rem; font-weight: 650; }
.tv-filters input, .tv-filters select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #d7e0ed;
  border-radius: 7px;
  background: #f9fbfd;
  color: var(--navy);
  font: inherit;
  font-size: .94rem;
  font-weight: 400;
}

.tv-results { margin: 11px 0; color: var(--muted); font-size: .875rem; }
.tv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tv-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tv-logo {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  height: 118px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #f5f8fc;
}
.tv-logo-link { display: grid; width: 100%; height: 100%; place-items: center; }
.tv-logo img { position: absolute; inset: 8px; opacity: 0; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.tv-logo img.tv-image-loaded { opacity: 1; }
.tv-logo-fallback { color: #51637b; font-size: .84rem; text-align: center; }
.tv-logo-link .tv-logo-fallback { color: var(--tv-blue); text-underline-offset: 2px; }

.tv-school-meta {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.35;
}

.tv-card h2 { margin: 6px 0 9px; font-size: 1rem; line-height: 1.27; }
.tv-version {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: #ebeff5;
  color: #405672;
  font-size: .77rem;
  font-weight: 700;
  line-height: 1.3;
}
.tv-badge-1, .tv-badge-2 { color: #164a87; background: #e7f0ff; }
.tv-badge-3 { color: #14604e; background: #e0f3ec; }
.tv-badge-4 { color: #765014; background: #fff1ce; }

.tv-school-info { display: grid; gap: 7px; margin: 12px 0; }
.tv-school-info dt { margin: 0 0 2px; color: var(--muted); font-size: .78rem; }
.tv-school-info dd { margin: 0; color: #263b56; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.tv-youtube {
  margin-top: auto;
  color: var(--tv-blue);
  font-size: .875rem;
  font-weight: 650;
  text-underline-offset: 3px;
}

.tv-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 17px;
  font-size: .875rem;
}
.tv-pagination[hidden] { display: none; }
.tv-pagination button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--tv-blue); }
.tv-pagination button:disabled { color: #66748a; cursor: default; opacity: .65; }

@media (max-width: 1180px) and (min-width: 821px) {
  .tv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1010px) and (min-width: 821px), (max-width: 610px) {
  .tv-panels { grid-template-columns: 1fr; }
  .tv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-hero { display: grid; justify-items: start; }
}
@media (max-width: 650px) {
  .tv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-filters { grid-template-columns: 1fr 1fr; }
  .tv-filters label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 435px) {
  .tv-cards { grid-template-columns: 1fr; }
}
