.stv-app {
  --stv-ink: #18241f;
  --stv-muted: #66716c;
  --stv-line: #d2d9d5;
  --stv-white: #ffffff;
  --stv-green: #174d3a;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 44px 0 28px;
  background: var(--stv-white);
  color: var(--stv-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.35;
}

.stv-app,
.stv-app * { box-sizing: border-box; }
.stv-app button,
.stv-app input { font: inherit; }
.stv-app button { color: inherit; }

.stv-page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 0 0 30px; }
.stv-page-header h1 { margin: 0; color: var(--stv-ink); font-size: clamp(34px, 4vw, 56px); font-weight: 750; line-height: .95; letter-spacing: -.045em; text-transform: none; }
.stv-subtitle { margin: 14px 0 0; color: var(--stv-muted); font-size: 15px; }
.stv-record-count { display: flex; align-items: baseline; gap: 8px; padding-bottom: 3px; }
.stv-record-count strong { font-size: 30px; font-weight: 750; letter-spacing: -.04em; }
.stv-record-count span { color: var(--stv-muted); font-size: 13px; }

.stv-data-notes { margin: 0 2px; color: var(--stv-muted); font-size: 10px; }
.stv-data-notes p { margin: 0 0 5px; color: var(--stv-muted); font-size: 10px; line-height: 1.35; }
.stv-data-notes strong { color: var(--stv-ink); font-weight: 750; }
.stv-data-notes a { color: var(--stv-green); font-weight: 650; text-decoration: none; }
.stv-data-notes a:hover { text-decoration: underline; }
.stv-source-details { width: fit-content; margin-top: 8px; }
.stv-source-details summary { width: fit-content; border: 1px solid var(--stv-line); border-radius: 6px; background: var(--stv-white); padding: 5px 9px; color: var(--stv-ink); font-size: 10px; font-weight: 750; cursor: pointer; user-select: none; }
.stv-source-details[open] summary { border-color: #bdc8c2; }
.stv-source-list { display: grid; gap: 5px; margin-top: 7px; padding: 9px 11px; border: 1px solid var(--stv-line); border-radius: 7px; background: var(--stv-white); }
.stv-source-list span { display: block; }

.stv-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 0; }
.stv-search-field { min-width: 300px; display: flex; gap: 10px; align-items: center; background: var(--stv-white); border: 1px solid var(--stv-line); border-radius: 9px; padding: 0 13px; }
.stv-search-field > span:not(.stv-sr-only) { color: var(--stv-muted); font-size: 20px; transform: rotate(-15deg); }
.stv-search-field input { width: 100%; min-height: 0; margin: 0; border: 0; border-radius: 0; outline: 0; background: transparent; padding: 11px 0; color: var(--stv-ink); font-size: 13px; line-height: 1.35; box-shadow: none; appearance: none; }
.stv-search-field input:focus { outline: 0; box-shadow: none; }
.stv-search-field:focus-within { border-color: #8b9992; box-shadow: 0 0 0 2px rgba(23, 77, 58, .1); }
.stv-search-field input::placeholder { color: #7f8984; opacity: 1; }

.stv-league-filters { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.stv-league-filters button { min-height: 0; margin: 0; border: 1px solid var(--stv-line); background: transparent; padding: 7px 11px; border-radius: 99px; font-size: 11px; font-weight: 750; line-height: 1.2; cursor: pointer; text-transform: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.stv-league-filters .stv-filter-all:hover, .stv-league-filters .stv-filter-all.is-active { background: var(--stv-green); border-color: var(--stv-green); color: #ffffff; }
.stv-league-filters .stv-filter-nfl:hover, .stv-league-filters .stv-filter-nfl.is-active { background: #e8eef8; border-color: #cad8eb; color: #2f568a; }
.stv-league-filters .stv-filter-nba:hover, .stv-league-filters .stv-filter-nba.is-active { background: #fff0dc; border-color: #efd7b7; color: #9a5b19; }
.stv-league-filters .stv-filter-mlb:hover, .stv-league-filters .stv-filter-mlb.is-active { background: #f5e7e5; border-color: #e2c9c5; color: #8f443c; }
.stv-league-filters .stv-filter-nhl:hover, .stv-league-filters .stv-filter-nhl.is-active { background: #e9eaec; border-color: #d3d6d9; color: #4f5961; }
.stv-league-filters .stv-filter-epl:hover, .stv-league-filters .stv-filter-epl.is-active { background: #eee7f5; border-color: #d9cbe8; color: #654782; }
.stv-league-filters .stv-filter-laliga:hover, .stv-league-filters .stv-filter-laliga.is-active { background: #f8e7ef; border-color: #e8cbd8; color: #8a4264; }

.stv-view-switcher { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 10px; }
.stv-view-switcher > span { color: var(--stv-muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.stv-view-toggle,
.stv-metric-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--stv-line); border-radius: 9px; background: #e9edeb; }
.stv-view-toggle button,
.stv-metric-toggle button { min-height: 0; margin: 0; border: 0; border-radius: 6px; background: transparent; padding: 7px 13px; color: var(--stv-muted); font-size: 11px; font-weight: 750; line-height: 1.2; cursor: pointer; text-transform: none; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.stv-view-toggle button[aria-pressed="true"],
.stv-metric-toggle button[aria-pressed="true"] { background: var(--stv-white); color: var(--stv-ink); box-shadow: 0 1px 4px rgba(26, 51, 40, .12); }

.stv-table-shell { max-width: 100%; max-height: 2545px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--stv-white); border: 1px solid var(--stv-line); border-radius: 12px; }
.stv-table-shell table { width: 100%; min-width: 1120px; margin: 0; border: 0; border-collapse: separate; border-spacing: 0; background: var(--stv-white); color: var(--stv-ink); font-size: 12px; line-height: 1.35; }
.stv-table-shell thead { position: sticky; top: 0; z-index: 2; }
.stv-table-shell th { width: auto; height: 44px; padding: 0 14px; border: 0; border-bottom: 1px solid #c4cbc7; background: #d8ddda; color: #111714; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.stv-sort-button { min-height: 0; margin: 0; border: 0; background: transparent; padding: 0; color: #111714; cursor: pointer; font-size: 10px; font-weight: 750; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.stv-sort-indicator { display: inline-block; min-width: 13px; margin-left: 5px; color: #68716c; font-size: 12px; line-height: 1; }
.stv-sort-indicator.is-active { color: #111714; }
.stv-table-shell td { width: auto; height: 50px; padding: 8px 14px; border: 0; border-bottom: 1px solid #edf0ee; color: var(--stv-ink); font-size: 12px; line-height: 1.35; text-align: left; vertical-align: middle; white-space: nowrap; }
.stv-table-shell tbody tr:last-child td { border-bottom: 0; }
.stv-table-shell tbody tr:nth-child(odd) td { background: #ffffff; }
.stv-table-shell tbody tr:nth-child(even) td { background: #f2f4f3; }
.stv-table-shell tbody tr:hover td { background: #e9eeeb; }
.stv-team-name { font-size: 13px !important; font-weight: 750; }
.stv-ticker-inline { color: var(--stv-green); font-size: 10px; font-weight: 750; }
.stv-country { display: block; margin-top: 2px; color: #8a938f; font-size: 9px; letter-spacing: .08em; }
.stv-league { display: inline-flex; min-width: 52px; justify-content: center; border-radius: 5px; padding: 5px 7px; background: #e5ece8; color: #315747; font-size: 9px; font-weight: 850; letter-spacing: .07em; }
.stv-league-nfl { background: #e8eef8; color: #2f568a; }
.stv-league-nba { background: #fff0dc; color: #9a5b19; }
.stv-league-mlb { background: #f5e7e5; color: #8f443c; }
.stv-league-nhl { background: #e9eaec; color: #4f5961; }
.stv-league-epl { background: #eee7f5; color: #654782; }
.stv-league-laliga { background: #f8e7ef; color: #8a4264; }
.stv-empty { color: #aab1ad; }
.stv-table-shell td a { color: var(--stv-green); font-weight: 650; text-decoration: none; }
.stv-table-shell td a:hover { text-decoration: underline; }
.stv-money-link { font-size: 12px; font-variant-numeric: tabular-nums; }
.stv-gain { font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stv-gain .stv-cell-note { color: currentColor; opacity: .72; }
.stv-gain-loss { color: #ae4038; }
.stv-gain-decline { color: #bd6b24; }
.stv-gain-zero { color: #111714; }
.stv-gain-positive { color: #3c7a58; }
.stv-gain-high { color: #176b43; }
.stv-gain-very-high { color: #074c2f; }
.stv-cell-note { display: block; max-width: 170px; margin-top: 2px; overflow: hidden; color: #8a938f; font-size: 9px; text-overflow: ellipsis; }

.stv-chart-view { min-height: 360px; overflow: hidden; background: var(--stv-white); border: 1px solid var(--stv-line); border-radius: 12px; }
.stv-chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px 5px; }
.stv-chart-toolbar p { margin: 0; color: var(--stv-muted); font-size: 11px; line-height: 1.35; }
.stv-chart-canvas { position: relative; width: 100%; padding: 4px 8px 0; }
.stv-team-chart { display: block; width: 100%; height: auto; min-height: 270px; overflow: visible; }
.stv-team-chart .stv-chart-grid { stroke: #e3e8e5; stroke-width: 1; }
.stv-team-chart .stv-chart-zero { stroke: #79837e; stroke-width: 1.5; }
.stv-team-chart .stv-chart-loss-zone { fill: #f5f7f6; }
.stv-team-chart .stv-chart-lane { stroke: #edf0ee; stroke-width: 1; }
.stv-team-chart .stv-chart-axis-label { fill: #7b8580; font-family: inherit; font-size: 11px; font-variant-numeric: tabular-nums; }
.stv-team-chart .stv-chart-axis-title { fill: var(--stv-ink); font-family: inherit; font-size: 11px; font-weight: 750; }
.stv-team-chart .stv-chart-league-label { fill: var(--stv-ink); font-family: inherit; font-size: 11px; font-weight: 750; }
.stv-team-chart .stv-chart-point-group { transition: transform .65s cubic-bezier(.22, .75, .28, 1), opacity .65s ease; }
.stv-team-chart .stv-chart-point-group.is-hidden { pointer-events: none; }
.stv-team-chart .stv-chart-point { stroke: var(--stv-white); stroke-width: 2; cursor: pointer; transition: r .15s ease, stroke-width .15s ease; }
.stv-team-chart .stv-chart-point-group:hover .stv-chart-point,
.stv-team-chart .stv-chart-point-group.is-active .stv-chart-point { r: 10px; stroke: var(--stv-ink); stroke-width: 2.5; }
.stv-team-chart .stv-chart-point-nfl { fill: #5680b7; }
.stv-team-chart .stv-chart-point-nba { fill: #c78232; }
.stv-team-chart .stv-chart-point-mlb { fill: #b15b52; }
.stv-team-chart .stv-chart-point-nhl { fill: #6d777f; }
.stv-team-chart .stv-chart-point-epl { fill: #8063a0; }
.stv-team-chart .stv-chart-point-laliga { fill: #a65d7e; }
.stv-team-chart .stv-point-tooltip { visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .1s ease; }
.stv-team-chart .stv-point-tooltip.is-visible { visibility: visible; opacity: 1; }
.stv-team-chart .stv-point-tooltip rect { fill: var(--stv-ink); stroke: #cfd7d2; stroke-width: 1; filter: drop-shadow(0 6px 10px rgba(26, 36, 31, .18)); }
.stv-team-chart .stv-point-tooltip text { fill: #d8e0dc; font-family: inherit; font-size: 10px; }
.stv-team-chart .stv-point-tooltip-team { fill: var(--stv-white); font-size: 12px; font-weight: 750; }
.stv-timeline-toolbar strong { color: var(--stv-ink); }
.stv-timeline-chart .stv-timeline-future { fill: #f5f7f6; }
.stv-timeline-chart .stv-chart-axis-label { fill: #5f6964; }
.stv-timeline-chart .stv-timeline-present-line { stroke: #7b8580; stroke-width: 1.5; stroke-dasharray: 5 5; }
.stv-timeline-chart .stv-timeline-present-label { fill: #68716c; font-family: inherit; font-size: 10px; font-weight: 750; }
.stv-chart-caption { margin: 0; padding: 0 16px 14px; color: var(--stv-muted); font-size: 10px; line-height: 1.35; }

.stv-no-results { margin: 0; padding: 50px; color: var(--stv-muted); text-align: center; }
.stv-error { padding: 16px; border: 1px solid #d7b7b4; border-radius: 8px; background: #fff7f6; color: #8d332d; }
.stv-footer { display: flex; justify-content: space-between; gap: 20px; padding: 15px 3px 0; color: var(--stv-muted); font-size: 11px; }
.stv-sr-only { 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: 760px) {
  .stv-app { padding: 24px 0 20px; }
  .stv-page-header { align-items: flex-start; }
  .stv-record-count { flex-direction: column; gap: 0; }
  .stv-controls { align-items: stretch; flex-direction: column; }
  .stv-search-field { min-width: 0; }
  .stv-league-filters { justify-content: flex-start; }
  .stv-chart-toolbar { align-items: flex-start; flex-direction: column; }
  .stv-metric-toggle { width: 100%; }
  .stv-metric-toggle button { flex: 1; padding-inline: 7px; }
  .stv-chart-canvas { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stv-team-chart { width: 880px; }
  .stv-footer { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .stv-view-toggle button,
  .stv-metric-toggle button,
  .stv-team-chart .stv-chart-point-group,
  .stv-team-chart .stv-chart-point { transition: none; }
}
