/* Styles for the teams views: team.js (franchise + team-season), teams.js
   (franchise index, payroll, luxury tax) and rivalries.js (head-to-head). */

/* Playoff-result palette (both themes). */
:root {
	--fr-champ: #e0b31f;
	--fr-finals: #F25F5C;
	--fr-semis: #247BA0;
	--fr-round: #70C1B3;
	--fr-missed: #ddd6ca;
	--fr-heat-lo: #e04c49;
	--fr-heat-hi: #247BA0;
	--fr-acq-draft: #1d7466;
	--fr-acq-trade: #247BA0;
	--fr-acq-fa: #c8403d;
	--fr-acq-re: #8a5578;
	--fr-acq-undrafted: #6fae6a;
	--fr-acq-expansion: #c98a1b;
	--fr-acq-other: #5d5f8f;
	--fr-acq-initial: #9c8466;
	--fr-acq-unknown: #8A8B88;
	--fr-kept-yes: #7a4fa0;
	--fr-kept-first: #c9b8dc;
	--fr-kept-text: #5c3a7d;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--fr-champ: #FFE066; --fr-finals: #F25F5C; --fr-semis: #4FA3C7; --fr-round: #3d7f74; --fr-missed: #3b3c39;
		--fr-heat-lo: #F25F5C; --fr-heat-hi: #4FA3C7;
		--fr-kept-yes: #a37fd0; --fr-kept-first: #4a3d5c; --fr-kept-text: #c9aef0; --fr-acq-other: #7f82b8;
	}
}
:root[data-theme="dark"] {
	--fr-champ: #FFE066; --fr-finals: #F25F5C; --fr-semis: #4FA3C7; --fr-round: #3d7f74; --fr-missed: #3b3c39;
	--fr-heat-lo: #F25F5C; --fr-heat-hi: #4FA3C7;
	--fr-kept-yes: #a37fd0; --fr-kept-first: #4a3d5c; --fr-kept-text: #c9aef0; --fr-acq-other: #7f82b8;
}

.fr-res-champ { fill: var(--fr-champ); }
.fr-res-finals { fill: var(--fr-finals); }
.fr-res-semis { fill: var(--fr-semis); }
.fr-res-round { fill: var(--fr-round); }
.fr-res-missed, .fr-res-none { fill: var(--fr-missed); }
.fr-sw-champ { background: var(--fr-champ); }
.fr-sw-finals { background: var(--fr-finals); }
.fr-sw-semis { background: var(--fr-semis); }
.fr-sw-round { background: var(--fr-round); }
.fr-sw-missed, .fr-sw-none { background: var(--fr-missed); }
.fr-res-text { white-space: nowrap; }
.fr-rt-champ { color: var(--gold); font-weight: 700; }
.fr-rt-finals { color: var(--accent); font-weight: 600; }
.fr-rt-semis { color: var(--link); }
.fr-rt-round { color: var(--text); }
.fr-rt-missed, .fr-rt-none { color: var(--dim); }
.fr-win { color: var(--good); font-weight: 700; }
.fr-loss { color: var(--bad); font-weight: 700; }

/* ---- hero header ---------------------------------------------------------- */
.fr-hero {
	display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: var(--radius);
	margin-bottom: 14px; box-shadow: var(--shadow); min-width: 0; overflow: hidden;
}
.fr-hero h1 { margin: 2px 0 4px; font-size: 28px; overflow-wrap: anywhere; }
.fr-hero-text { min-width: 0; }
.fr-hero-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.fr-hero-kicker a { text-decoration: underline; text-underline-offset: 2px; }
.fr-hero-sub { opacity: .9; font-size: 13px; }
.fr-logo {
	position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; border: 3px solid; overflow: hidden; font-weight: 800; letter-spacing: .02em;
}
.fr-logo img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.fr-logo.has-img { background: rgba(255, 255, 255, .92) !important; }
.fr-logo.has-img .fr-logo-abbr { visibility: hidden; }

.fr-stats { margin-bottom: 16px; }
.fr-stats .stat { flex: 1 1 120px; min-width: min-content; }
/* A record like 4,042-4,008 must not wrap in the middle. */
.fr-stats .stat-value { white-space: nowrap; overflow-wrap: normal; font-size: clamp(17px, 4.6vw, 23px); }
.fr-season-nav { gap: 10px; }
.fr-hero .spacer { flex: 1; }
.fr-hero .fr-hero-fav { color: inherit; opacity: .85; align-self: flex-start; font-size: 26px; }
.fr-hero .fr-hero-fav.on { opacity: 1; }
.fr-hero-names { font-size: 12px; opacity: .85; margin-top: 2px; }
.fr-moved { margin-bottom: 12px; }
.fr-xlinks { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.fr-xlinks a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: var(--panel); color: var(--text); }
.fr-xlinks a:hover { border-color: var(--accent); text-decoration: none; }
.fr-era-line { stroke: var(--dim); stroke-dasharray: 2 3; }
.chart text.fr-era-label { fill: var(--dim); font-size: 10px; }
.fr-banner-team { font-size: 10px; opacity: .75; letter-spacing: .05em; }

/* ---- nemesis / storylines ----------------------------------------------------- */
.fr-nems { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.fr-nem { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fr-nem-bad { border-left-color: var(--bad); }
.fr-nem-good { border-left-color: var(--good); }
.fr-nem-title { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.fr-nem-team { font-weight: 600; overflow-wrap: anywhere; }
.fr-nem-line { font-size: 13px; }
.fr-stories { list-style: none; margin: 0; padding: 0; }
.fr-stories li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.fr-stories li:last-child { border-bottom: 0; }
.fr-story-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }

/* ---- acquisitions (title builds) ------------------------------------------------ */
.fr-acq-draft { fill: var(--fr-acq-draft); }
.fr-acq-trade { fill: var(--fr-acq-trade); }
.fr-acq-freeAgent { fill: var(--fr-acq-fa); }
.fr-acq-reSigned { fill: var(--fr-acq-re); }
.fr-acq-unknown { fill: var(--fr-acq-unknown); }
.fr-acq-undrafted { fill: var(--fr-acq-undrafted); }
.fr-acq-expansion { fill: var(--fr-acq-expansion); }
.fr-acq-other { fill: var(--fr-acq-other); }
.fr-acq-initial { fill: var(--fr-acq-initial); }
.fr-acq-sw-draft { background: var(--fr-acq-draft); }
.fr-acq-sw-trade { background: var(--fr-acq-trade); }
.fr-acq-sw-freeAgent { background: var(--fr-acq-fa); }
.fr-acq-sw-reSigned { background: var(--fr-acq-re); }
.fr-acq-sw-unknown { background: var(--fr-acq-unknown); }
.fr-acq-sw-undrafted { background: var(--fr-acq-undrafted); }
.fr-acq-sw-expansion { background: var(--fr-acq-expansion); }
.fr-acq-sw-other { background: var(--fr-acq-other); }
.fr-acq-sw-initial { background: var(--fr-acq-initial); }
/* the "kept" layer (re-signed / arrival deal / not on file) */
.fr-kept-kept { fill: var(--fr-kept-yes); }
.fr-kept-first { fill: var(--fr-kept-first); }
.fr-kept-unknown { fill: var(--fr-acq-unknown); fill-opacity: .55; }
.fr-kept-sw-kept { background: var(--fr-kept-yes); }
.fr-kept-sw-first { background: var(--fr-kept-first); }
.fr-kept-sw-unknown { background: var(--fr-acq-unknown); opacity: .55; }
.fr-kept-tag { color: var(--fr-kept-text); font-weight: 600; white-space: nowrap; font-size: 12px; }
.fr-path { display: inline-block; white-space: normal; line-height: 1.45; min-width: 16em; max-width: 30em; }
.fr-path-step { white-space: nowrap; }
.fr-path-kept { color: var(--fr-kept-text); }
.fr-path-arrow { color: var(--dim); }
.fr-acq-key { margin-top: 10px; }
.fr-acq-key > summary { cursor: pointer; color: var(--link); font-size: 13px; }
.fr-acq-key p { margin: 6px 0; }
.fr-key-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 20px; }
.fr-key-row { margin: 3px 0; padding-left: 18px; text-indent: -18px; }
.fr-key-row strong { white-space: nowrap; }
.fr-key-row .legend-swatch { display: inline-block; margin-right: 6px; vertical-align: -1px; text-indent: 0; }
.fr-acq-bar { display: block; border-radius: 5px; overflow: hidden; }
.fr-acq-bar rect { stroke: var(--panel); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fr-acq-legend { margin-top: 6px; }
.fr-acq-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; white-space: nowrap; }
.fr-acq-tag.fr-acq-sw-unknown, .fr-acq-tag.fr-acq-sw-undrafted, .fr-acq-tag.fr-acq-sw-expansion { color: #1b1b1b; }
.fr-build-sum { margin: 10px 0 4px; line-height: 1.5; }
.fr-rot-dot { color: var(--accent); font-size: 10px; }

/* ---- game log --------------------------------------------------------------------- */
.fr-gl-strip-box { overflow: hidden; }
.fr-gl-strip { display: block; }
.fr-gl-strip text { fill: var(--dim); font-size: 10px; }
.fr-gl-cell { cursor: pointer; }
.fr-gl-cell.w { fill: var(--good); }
.fr-gl-cell.l { fill: var(--bad); }
.fr-gl-cell:hover { stroke: var(--text); stroke-width: 1; }
.fr-gl-ha { display: inline-block; min-width: 18px; }
.fr-gl-mbar { display: inline-flex; align-items: center; width: 120px; gap: 0; vertical-align: middle; }
.fr-gl-half { flex: 0 0 44px; height: 10px; display: flex; }
.fr-gl-half.neg { justify-content: flex-end; border-right: 1px solid var(--dim); }
.fr-gl-half > span { display: block; height: 100%; border-radius: 2px; }
.fr-gl-half.neg > span { background: var(--bad); }
.fr-gl-half.pos > span { background: var(--good); }
.fr-gl-mnum { flex: 1; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--dim); }

/* ---- charts ---------------------------------------------------------------- */
.fr-chart { min-height: 120px; }
.fr-chart-controls { margin-bottom: 6px; }
.fr-ref { stroke: var(--dim); stroke-dasharray: 3 3; stroke-opacity: .7; }
.fr-hit { fill: transparent; cursor: pointer; }
.fr-hit:hover { fill: var(--hover); }
.chart text.fr-star { fill: var(--fr-champ); font-size: 11px; }
.fr-payline { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-opacity: .75; pointer-events: none; }
.fr-paydot { fill: var(--text); fill-opacity: .8; }
.fr-bg-dot { fill: var(--dim); fill-opacity: .18; }
.fr-dot { stroke: var(--panel); stroke-width: 1; cursor: pointer; }
.fr-dot:hover { stroke: var(--text); stroke-width: 2; }

/* ---- eras ------------------------------------------------------------------- */
.fr-eras-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; font-size: 10px; font-weight: 700; }
.fr-era-seg { display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; min-width: 4px; border-right: 1px solid var(--panel); }
.fr-eras { list-style: none; margin: 0; padding: 0; }
.fr-eras li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fr-eras li:last-child { border-bottom: 0; }
.fr-era-years { color: var(--dim); font-variant-numeric: tabular-nums; min-width: 82px; font-size: 13px; }

/* ---- trophies ---------------------------------------------------------------- */
.fr-trophies { display: flex; flex-wrap: wrap; gap: 6px; }
.fr-trophy { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(184, 134, 11, .14); color: var(--text); font-variant-numeric: tabular-nums; font-size: 13px; }
.fr-trophy.lost { background: var(--chip); color: var(--dim); }
.fr-trophy:hover { text-decoration: none; filter: brightness(1.08); }
.fr-trophy-icon { font-size: 12px; }

/* ---- retired jersey wall ----------------------------------------------------- */
.fr-wall {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; padding: 10px 4px 4px;
	background: linear-gradient(var(--panel-2), var(--panel)); border-radius: 8px;
}
.fr-banner {
	position: relative; text-align: center; padding: 14px 6px 26px; border: 2px solid; border-top-width: 6px;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); min-height: 132px;
	display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: inset 0 -30px 40px rgba(0, 0, 0, .12);
}
.fr-banner-stripe { position: absolute; left: 0; right: 0; top: 4px; height: 3px; opacity: .9; }
.fr-banner-num { font-size: 34px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fr-banner-name { font-size: 12px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.fr-banner-name a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.fr-banner-name a.hof::after { color: inherit; }
.fr-banner-year { font-size: 11px; opacity: .92; }

/* ---- leaders / five ---------------------------------------------------------------- */
.fr-leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; }
.fr-leader-col h4 { margin: 0 0 4px; font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.fr-leader-list { margin: 0; padding-left: 22px; }
.fr-leader-list li { padding: 2px 0; }
.fr-leader-list li > a { display: inline-block; max-width: calc(100% - 60px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.fr-leader-list .num { float: right; color: var(--dim); }
.fr-five { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.fr-bw { margin: 0; padding-left: 22px; }
.fr-bw li { padding: 3px 0; }
.fr-bw .num { margin: 0 6px; }

/* ---- playoff run ---------------------------------------------------------------------- */
.fr-run { list-style: none; margin: 0; padding: 0; }
.fr-run li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.fr-run li:last-child { border-bottom: 0; }
.fr-run-round { min-width: 130px; color: var(--dim); font-size: 13px; }

/* ---- roster DNA ---------------------------------------------------------------------------- */
.fr-dna-scroll { overflow-x: auto; padding-bottom: 4px; }
.fr-dna { display: block; }
.fr-dna text { fill: var(--dim); font-size: 10px; }
.fr-dna .fr-dna-label { fill: #fff; font-size: 9px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 2px; }
.fr-dna-cell { cursor: pointer; transition: opacity .12s; }
.fr-dna-link { fill: none; stroke-opacity: .45; stroke-linecap: round; pointer-events: none; transition: opacity .12s; }
.fr-dna.hl .fr-dna-cell, .fr-dna.hl .fr-dna-link, .fr-dna.hl .fr-dna-label { opacity: .14; }
.fr-dna.hl .on { opacity: 1 !important; }
.fr-dna.hl .fr-dna-cell.on { stroke: var(--text); stroke-width: 1.5; }
.fr-dna-legend { margin-top: 6px; }

/* ======================================================================
   teams.js
   ====================================================================== */
.frs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.frs-card {
	display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 10px; border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--panel); color: var(--text); box-shadow: var(--shadow); border-top: 4px solid var(--frs-color, var(--line)); min-width: 0;
}
.frs-card:hover { text-decoration: none; border-color: var(--accent); border-top-color: var(--frs-color, var(--accent)); }
.frs-card.defunct { opacity: .85; border-style: dashed; border-top-style: solid; }
.frs-head { display: flex; gap: 8px; align-items: center; min-width: 0; }
.frs-name { font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frs-sub { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frs-spark { display: block; width: 100%; height: 46px; }
.frs-spark .fr-ref { stroke-width: .7; }
.frs-facts { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--dim); }
.frs-facts strong { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.frs-facts > div { display: flex; flex-direction: column; }
.frs-tax-wrap { display: flex; align-items: flex-start; }
.frs-tax-labels { flex: none; width: 38px; text-align: right; padding-right: 5px; font-size: 10px; box-sizing: border-box; }
.frs-tax-labels a { display: block; color: var(--dim); text-decoration: none; }
.frs-tax-labels a:hover { color: var(--text); text-decoration: underline; }
.frs-tax-grid { overflow-x: auto; flex: 1; min-width: 0; }
#view .kb-cell:focus, #view .kb-cell:focus-visible { outline: none; stroke: var(--text); stroke-width: 2px; }
.frs-tax-grid svg { display: block; }
.frs-tax-grid text { fill: var(--dim); font-size: 10px; }
.frs-taxcell { fill: var(--panel-2); }
.frs-taxcell.paid { fill: var(--bad); }
.frs-taxcell.champ { stroke: var(--fr-champ); stroke-width: 2; }
.frs-hl { stroke: var(--text) !important; stroke-width: 2 !important; }
.frs-trend { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; fill: none; pointer-events: none; }

/* ======================================================================
   rivalries.js
   ====================================================================== */
.rvl-matrix-wrap { overflow: auto; max-height: 78vh; border-radius: 6px; }
.rvl-matrix { display: block; }
.rvl-matrix text { fill: var(--dim); font-size: 10px; }
.rvl-matrix .rvl-lab { cursor: pointer; font-weight: 600; }
.rvl-matrix .rvl-lab:hover { fill: var(--text); }
.rvl-cell { cursor: pointer; stroke: var(--panel); stroke-width: 1; }
.rvl-cell:hover, .rvl-cell.sel { stroke: var(--text); stroke-width: 2; }
.rvl-cell.none { fill: var(--panel-2); cursor: default; }
.rvl-diag { fill: var(--line); opacity: .5; }
.rvl-axis-hl { fill: var(--text) !important; }
.rvl-scale { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.rvl-scale-bar { width: 160px; height: 10px; border-radius: 5px; }
.rvl-pair-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rvl-pair-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rvl-pair-vs { font-weight: 800; color: var(--dim); }
.rvl-big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rvl-story { font-size: 15px; line-height: 1.55; margin: 10px 0; }
.rvl-name { font-family: var(--serif); font-style: italic; font-size: 20px; font-weight: 700; color: var(--accent); }
.rvl-meetings { list-style: none; margin: 0; padding: 0; }
.rvl-meetings li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rvl-meetings li:last-child { border-bottom: 0; }
.rvl-meet-score { font-variant-numeric: tabular-nums; font-weight: 700; }
.rvl-g7 { margin-left: 4px; }
.rvl-bars svg { display: block; }
.rvl-bars text { fill: var(--dim); font-size: 10px; }
.rvl-stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rvl-story-card { display: flex; flex-direction: column; gap: 6px; }
.rvl-story-card .rvl-story { font-size: 14px; margin: 0; }
.rvl-rank { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.rvl-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rvl-section-title { margin: 18px 0 10px; font-size: 16px; }
.rvl-pickers { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rvl-pickers select { max-width: min(100%, 270px); }

/* Phones: the logo, name and buttons do not fit on one line (the name was squeezed to a few pixels), so the buttons drop under them. */
@media (max-width: 600px) {
	.fr-hero { flex-wrap: wrap; position: relative; }
	.fr-hero-text { flex: 1 1 150px; padding-right: 28px; }
	.fr-hero .spacer { display: none; }
	.fr-hero > .btn, .fr-hero > .watch-btn, .fr-hero > button:not(.fr-hero-fav) { order: 5; }
	.fr-hero .fr-hero-fav { position: absolute; top: 8px; right: 10px; }
}
@media (max-width: 820px) {
	.fr-hero { padding: 14px; gap: 12px; }
	.fr-hero h1 { font-size: 22px; }
	.fr-hero .fr-logo { width: 56px !important; height: 56px !important; font-size: 16px !important; }
	.fr-run-round { min-width: 0; width: 100%; }
	.fr-stats .stat { flex: 1 1 40%; }
	.fr-wall { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
	.rvl-stories { grid-template-columns: minmax(0, 1fr); }
	.rvl-big { font-size: 22px; }
}
.fr-dna-cell.other { fill: var(--fr-missed); }

/* ---- teams.js: power ratings, greatest teams, dynasties, title builds ---------- */
.frs-fav { color: var(--gold); font-size: 16px; flex: 0 0 auto; }
.frs-elo svg { display: block; }
.frs-elo-bg { fill: none; stroke: var(--dim); stroke-opacity: .16; stroke-width: 1; pointer-events: none; }
.frs-elo-hl { fill: none; stroke-width: 2.6; stroke-linejoin: round; pointer-events: none; }
.frs-elo-title { fill: var(--fr-champ); stroke: var(--panel); stroke-width: 1.5; pointer-events: none; }
.frs-elo-dot { stroke: var(--panel); stroke-width: 2; pointer-events: none; }
.frs-elo-band { fill: var(--accent); fill-opacity: .06; }
.chart text.frs-elo-band-label { fill: var(--dim); font-size: 10px; }
.frs-method { margin-top: 8px; font-size: 13px; }
.frs-method summary { cursor: pointer; color: var(--link); }
.frs-method ul { margin: 6px 0 0; padding-left: 20px; color: var(--dim); line-height: 1.5; }
.frs-callout { display: flex; gap: 12px; align-items: center; }
.frs-callout-title { font-weight: 700; font-size: 16px; }
.frs-dyn-pick select { max-width: 100%; min-width: 0; }
.frs-dyn-table th[scope="row"] { color: var(--dim); font-weight: 600; white-space: nowrap; }
.frs-dyn-table td { vertical-align: top; }
.frs-better { background: rgba(26, 127, 75, .10); }
.frs-core { margin: 0; padding-left: 18px; }
.frs-core li { padding: 1px 0; }
.frs-build-bar { width: 200px; max-width: 34vw; }
.frs-nowrap { white-space: nowrap; }

/* franchise leaders (Rankings) */
.fr-lead-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fr-lead-name > :first-child { flex: none; border-radius: 4px; overflow: hidden; }
.fr-ago { list-style: none; margin: 0; padding: 0; }
.fr-ago li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.fr-ago li:last-child { border-bottom: 0; }
.fr-ago-n { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }

/* team-season: depth chart, minutes share, biggest moves */
.fr-sub { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.fr-depth { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fr-depth-col { min-width: 0; }
.fr-depth-pos { font-weight: 700; font-size: 12px; color: var(--dim); border-bottom: 2px solid var(--line); margin-bottom: 4px; padding-bottom: 2px; }
.fr-depth-p { display: flex; justify-content: space-between; gap: 4px; font-size: 13px; padding: 2px 0; min-width: 0; }
.fr-depth-p a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fr-depth-p.starter a { font-weight: 700; }
.fr-mins-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 3em; gap: 8px; align-items: center; font-size: 13px; padding: 2px 0; }
.fr-mins-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-mins-track { height: 10px; background: var(--chip); border-radius: 5px; overflow: hidden; }
.fr-mins-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.fr-mins-val { text-align: right; }
.fr-moves { margin: 0; padding-left: 20px; }
.fr-moves li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.fr-moves li:last-child { border-bottom: 0; }
.fr-moves-g { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 480px) { .fr-depth-p { flex-direction: column; gap: 0; } }

/* Rivalries: a display face for the section heads, scoreboard numbers. */
.rvl-section-title { font-family: var(--f-rival); font-weight: 400; font-size: 20px; letter-spacing: .02em; }
.rvl-big { font-family: var(--f-scoreboard); font-weight: 400; }

/* Very long team names: team links never wrap by default (.tlink), which pushed these cards wider than a phone. */
.fr-run .tlink, .fr-nem-team .tlink, .rvl-pair-side .tlink, .rvl-chips .tlink, .rvl-meetings .tlink, .frs-name, .frs-sub, .fr-hero .tlink { white-space: normal; overflow-wrap: anywhere; }
.rvl-pair-side > div, .rvl-chips > * { min-width: 0; }
.page-teams .controls label, .page-rivalries .controls label { max-width: 100%; }
.page-teams .controls select, .page-rivalries .controls select { max-width: min(420px, calc(100vw - 150px)); }
.page-rivalries .rvl-pickers select { max-width: 100%; }
/* Franchises page of a league with no games yet: a plain list of the teams */
.frs-plain { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; }
/* Title builds: the top player's origin badge drops to its own line instead of clipping. */
.frs-top-cell { white-space: normal; min-width: 130px; }
.frs-top-cell .fr-acq-tag { display: table; margin-top: 2px; }
