/* Styles for the history views: league river (river.js), career timeline
   (timeline.js) and development curves (development.js). Every class is
   prefixed hist-, tl- or dev-; colors come from theme variables. */
:root {
	--tier-dynasty: #e0b31f;
	--tier-contender: #247BA0;
	--tier-playoff: #70C1B3;
	--tier-mediocre: #ddd6ca;
	--tier-rebuilding: #f5a3a1;
	--tier-tanking: #c8403d;
	--hist-gold: #e0b31f;
	--hist-gold-stroke: #6b4c00;
	--tl-inj: #e04c49;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--tier-dynasty: #FFE066;
		--tier-contender: #4FA3C7;
		--tier-playoff: #3d7f74;
		--tier-mediocre: #41423f;
		--tier-rebuilding: #8f4342;
		--tier-tanking: #F25F5C;
		--hist-gold: #FFE066;
		--hist-gold-stroke: #1b1405;
		--tl-inj: #F25F5C;
	}
}
:root[data-theme="dark"] {
	--tier-dynasty: #FFE066;
	--tier-contender: #4FA3C7;
	--tier-playoff: #3d7f74;
	--tier-mediocre: #41423f;
	--tier-rebuilding: #8f4342;
	--tier-tanking: #F25F5C;
	--hist-gold: #FFE066;
	--hist-gold-stroke: #1b1405;
	--tl-inj: #F25F5C;
}

/* ---- shared ------------------------------------------------------------------- */
.hist-chart svg { width: 100%; height: auto; }
.hist-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; max-width: 100%; }
.hist-scroll svg { display: block; }
.hist-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hist-ctl { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.hist-axis-line { stroke: var(--line); }
.hist-axis-text, .hist-ribbons text.hist-axis-text { fill: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.hist-grid line { stroke: var(--line); stroke-opacity: .55; }
.hist-grid line.hist-mid { stroke: var(--dim); stroke-opacity: .55; stroke-dasharray: 3 3; }
.hist-tip-gold { color: var(--gold); font-weight: 600; }
.hist-sum-title { font-weight: 600; margin-bottom: 8px; }

/* ---- named eras ---------------------------------------------------------------- */
.hist-era { cursor: pointer; }
.hist-era rect { stroke-width: 1; }
.hist-era:hover rect { stroke: var(--text); stroke-width: 1.5; }
.hist-era-label { font-size: 11px; font-weight: 600; pointer-events: none; }
.hist-era-row-label { fill: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ---- river --------------------------------------------------------------------- */
.hist-band { stroke: var(--panel); stroke-width: .8; cursor: pointer; transition: opacity .12s; }
.hist-river.hovering .hist-band { opacity: .28; }
.hist-river.hovering .hist-band.hover { opacity: 1; stroke: var(--text); stroke-width: 1.2; }
.hist-band-label { pointer-events: none; font-weight: 700; letter-spacing: .01em; paint-order: stroke; stroke-width: 2.5px; stroke-linejoin: round; }
.hist-river.hovering .hist-band-labels { opacity: .35; }
.hist-title-dot { fill: var(--hist-gold); stroke: var(--hist-gold-stroke); stroke-width: 1; pointer-events: none; }
.hist-finals-dot { fill: var(--panel); stroke: var(--hist-gold); stroke-width: 1.6; pointer-events: none; }
.hist-dot-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--hist-gold); border: 1px solid var(--hist-gold-stroke); }
.hist-dot-swatch.finals { background: var(--panel); border: 2px solid var(--hist-gold); }

/* ---- era ribbons ------------------------------------------------------------------ */
.tier-dynasty, .tier-bg-dynasty { fill: var(--tier-dynasty); background: var(--tier-dynasty); }
.tier-contender, .tier-bg-contender { fill: var(--tier-contender); background: var(--tier-contender); }
.tier-playoff, .tier-bg-playoff { fill: var(--tier-playoff); background: var(--tier-playoff); }
.tier-mediocre, .tier-bg-mediocre { fill: var(--tier-mediocre); background: var(--tier-mediocre); }
.tier-rebuilding, .tier-bg-rebuilding { fill: var(--tier-rebuilding); background: var(--tier-rebuilding); }
.tier-tanking, .tier-bg-tanking { fill: var(--tier-tanking); background: var(--tier-tanking); }
.hist-ribbons .hist-row-label { fill: var(--text); font-size: 11px; }
.hist-ribbons .hist-row-label.defunct { fill: var(--dim); font-style: italic; }
.hist-ribbons a:hover .hist-row-label { fill: var(--link); text-decoration: underline; }
.hist-row-sum { fill: var(--dim); font-size: 10px; font-variant-numeric: tabular-nums; }
.hist-ribbon-ring { fill: none; stroke: var(--hist-gold-stroke); stroke-width: 1.2; pointer-events: none; }
.hist-cell-hl { fill: none; stroke: var(--text); stroke-width: 1.5; pointer-events: none; }
.hist-tier-legend { margin-bottom: 10px; }
.hist-ring-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--hist-gold-stroke); background: var(--tier-dynasty); }
table.data.hist-tier-table td { white-space: normal; }
.hist-tier-table .legend-swatch { vertical-align: -1px; }

/* ---- team records ------------------------------------------------------------------- */
.hist-line { fill: none; stroke: var(--dim); stroke-opacity: .22; stroke-width: 1; }
.hist-records.has-focus .hist-line { stroke-opacity: .14; }
.hist-line-focus { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.hist-focus .hov .hist-line-focus { stroke-width: 2; stroke-opacity: .85; }
.hist-hover-dot { stroke: var(--panel); stroke-width: 1.5; pointer-events: none; }

/* ---- career timeline ------------------------------------------------------------------ */
.tl-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.tl-toolbar .picker { min-width: 200px; flex: 1 1 220px; max-width: 340px; }
.tl-ctl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-ctl-end { margin-left: auto; }
.tl-presets { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 12px; }
.tl-preset-sel { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); }
.tl-preset-sel select { max-width: 170px; }
.tl-real { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tl-card { padding-bottom: 10px; }
.tl-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.tl-inner { position: relative; }
.tl-axis-svg, .tl-lane-svg { display: block; }
.tl-lane-svg { cursor: crosshair; }
.tl-lane { border-top: 1px solid var(--line); padding: 10px 0 2px; }
.tl-lane-head { position: sticky; left: 0; display: flex; align-items: center; gap: 10px; min-width: 0; box-sizing: border-box; }
.tl-lane-head .face { border-radius: 8px; flex: 0 0 auto; overflow: hidden; }
.tl-lane-head .face img { object-fit: cover; object-position: top; }
.tl-swatch { width: 4px; align-self: stretch; border-radius: 2px; flex: 0 0 4px; }
.tl-info { min-width: 0; flex: 1; }
.tl-name-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tl-lane-name { font-weight: 700; font-size: 16px; }
.tl-hof { font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #241a00; background: var(--hist-gold); border-radius: 4px; padding: 1px 5px; }
.tl-lane-meta { color: var(--dim); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; }
.tl-chips-teams { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.tl-pill { background: var(--chip); color: var(--text); border-radius: 10px; padding: 0 7px; font-size: 11px; white-space: nowrap; }
.tl-lane-btns { display: flex; gap: 2px; flex: 0 0 auto; }
.tl-bar { stroke: none; }
.tl-bar-nogp { opacity: .35; }
.tl-peak { stroke: var(--text); stroke-width: 1.6; }
.tl-peak-label { fill: var(--text); font-size: 11px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.tl-pot { fill: none; stroke: var(--dim); stroke-width: 1.4; stroke-dasharray: 4 3; }
.tl-ytick { font-size: 10px; }
.tl-axis-title { font-weight: 700; }
.tl-guide { stroke: var(--line); stroke-dasharray: 2 3; }
.tl-base { stroke: var(--line); }
.tl-cross { stroke: var(--text); stroke-width: 1; opacity: .45; pointer-events: none; }
.tl-part { pointer-events: none; }
.tl-part-line { stroke: var(--line); stroke-width: 2; }
.tl-part-sw { fill: var(--chip); stroke: var(--line); stroke-dasharray: 2 2; }
.tl-band-label { font-size: 10px; font-weight: 700; pointer-events: none; }
.tl-band-gap { fill: var(--line); }
.tl-hatch-line { stroke: var(--tl-inj); stroke-width: 1.6; }
.tl-inj-edge { fill: none; stroke: var(--tl-inj); stroke-width: 1; }
.tl-inj-sw { fill: color-mix(in srgb, var(--tl-inj) 25%, transparent); }
.tl-trade circle { fill: var(--accent); stroke: var(--panel); stroke-width: 1.5; }
.tl-trade-arrow { fill: #fff; }
.tl-trade-line { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 3 2; opacity: .8; }
.tl-end { fill: var(--dim); font-size: 10px; font-weight: 700; }
.tl-end-hof { fill: var(--hist-gold); }
.tl-end-active { fill: var(--good); }
.tl-end-line { stroke: var(--dim); stroke-width: 1.5; }
.tl-end-line.open { stroke-dasharray: 2 2; }
.tl-aw { pointer-events: none; }
.tl-aw-tier { fill: var(--dim); font-size: 8px; font-weight: 700; pointer-events: none; }
.tl-aw-ring { fill: none; stroke: var(--hist-gold); stroke-width: 2; }
.tl-aw-mvp { fill: var(--hist-gold); stroke: var(--hist-gold-stroke); stroke-width: .6; }
.tl-aw-fmvp { fill: #E8873A; stroke: var(--panel); stroke-width: .6; }
.tl-aw-as { fill: var(--link); }
.tl-aw-league { fill: var(--accent, #9A5BC4); stroke: var(--panel); stroke-width: .6; }
.tl-aw-all { fill: var(--good); }
.tl-aw-dpoy { fill: #5B7FD0; }
.tl-aw-roy { fill: #3A9C8C; }
.tl-legend { margin-top: 10px; }
.tl-legend svg { vertical-align: -2px; margin-right: 2px; }
.tl-scroll-hint { margin-top: 4px; }
.tl-tip { min-width: 200px; max-width: 320px; }
.tl-tip-lane { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.tl-tip-lane.focus { font-weight: 700; }
.tl-tip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-tip-val { font-variant-numeric: tabular-nums; }
.tl-tip-detail { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; font-size: 12px; }
.tl-tip-awards { color: var(--gold); }
.tl-tip-inj { color: var(--tl-inj); }
.tl-tip-trade { color: var(--accent); }
.tl-empty-lane { fill: var(--dim); font-size: 12px; font-style: italic; }
.tl-exporting .tl-scroll { overflow: visible; }
.tl-exporting { width: max-content; }
@media (max-width: 820px) {
	.tl-lane-name { font-size: 15px; }
	.tl-ctl-end { margin-left: 0; }
	.tl-toolbar .picker { max-width: none; flex-basis: 100%; }
}

/* ---- development curves ---------------------------------------------------------- */
.dev-canvas-wrap { position: relative; width: 100%; }
.dev-canvas-wrap canvas { display: block; width: 100%; }
.dev-canvas-wrap svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dev-canvas-wrap .dev-hit { pointer-events: all; }
.dev-axis-text { fill: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.dev-axis-title { fill: var(--dim); font-size: 11px; font-weight: 600; }
.dev-mean { fill: none; stroke: var(--accent); stroke-width: 2.6; }
.dev-band { fill: var(--accent); fill-opacity: .16; }
.dev-hl { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.dev-hl-label { font-size: 11px; font-weight: 700; paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.dev-hover-line { fill: none; stroke: var(--text); stroke-width: 2; }
.dev-diag { stroke: var(--dim); stroke-dasharray: 4 4; }
.dev-fit { stroke: var(--accent); stroke-width: 2; }
.dev-zero { stroke: var(--dim); stroke-dasharray: 3 3; }
.dev-bar { fill: var(--accent); fill-opacity: .75; }
.dev-bar.neg { fill: var(--bad); }
.dev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dev-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; }
.dev-chip .dev-chip-dot { width: 9px; height: 9px; border-radius: 50%; }
.dev-chip button { border: none; background: none; cursor: pointer; color: var(--dim); font-size: 14px; line-height: 1; padding: 0 4px; }
.dev-chip button:hover { color: var(--bad); }
.dev-filters input[type="range"] { width: 120px; }
.dev-filters output { min-width: 22px; font-variant-numeric: tabular-nums; color: var(--text); }
.dev-stats { margin: 6px 0 10px; }
.dev-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dev-shape { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel); cursor: pointer; text-align: left; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.dev-shape:hover { border-color: var(--accent); }
.dev-shape.on { border-color: var(--accent); background: var(--accent-soft); }
.dev-shape-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dev-shape-name { font-weight: 700; }
.dev-shape-n { font-variant-numeric: tabular-nums; color: var(--dim); font-size: 12px; }
.dev-shape-desc { font-size: 12px; color: var(--dim); }
.dev-shape svg { width: 100%; height: 46px; display: block; }
.dev-shape-ex { font-size: 12px; line-height: 1.5; }
.dev-shape.empty { opacity: 0.6; }
.dev-shape:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dev-shape-head .dev-shape-name { flex: 1; min-width: 0; }
.dev-shape-icon { flex: none; display: inline-flex; }
.dev-shape-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); }
.dev-shape-legend { display: grid; gap: 4px; font-size: 13px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.dev-shape-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--dim); align-items: center; }
.dev-shape-key > span { display: inline-flex; align-items: center; gap: 4px; }
.dev-key-faint, .dev-key-bold { display: inline-block; width: 22px; height: 0; border-top: 1px solid var(--dim); opacity: .6; }
.dev-key-bold { border-top: 2.5px solid var(--accent); opacity: 1; }
.dev-shape-controls { flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.dev-shape-controls .picker { min-width: 220px; }
.dev-why-panel { border: 1px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; background: var(--accent-soft); }
.dev-why-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.dev-why-top button { margin-left: auto; }
.dev-why-base { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dev-why-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); }
.dev-why-name { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; flex-wrap: wrap; }
.dev-why-cat { font-weight: 400; font-size: 11px; color: var(--dim); margin-left: 6px; }
.dev-why-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.dev-why-list li { min-width: 0; }
.dev-why details ol { margin: 4px 0 0; padding-left: 18px; }
.dev-why-cell { display: inline-block; min-width: 180px; max-width: 360px; white-space: normal; font-size: 12px; }
@media (max-width: 500px) { .dev-shape-controls .picker { min-width: 0; width: 100%; } .dev-why-cell { min-width: 140px; } }
.dev-mini-line { fill: none; stroke: var(--dim); stroke-opacity: .25; stroke-width: 1; }
.dev-mini-mean { fill: none; stroke: var(--accent); stroke-width: 2; }

/* the current season while it is still being played */
.tier.hist-live, .legend-swatch.hist-live { opacity: .5; }

/* ---- storylines (stories.js) ------------------------------------------------------- */
.story-controls label { display: inline-flex; align-items: center; gap: 6px; }
.story-controls select { max-width: 220px; }
.story-links { margin: -4px 0 12px; }
.story-body { flex: 1; display: flex; flex-direction: column; }
.story-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.story-foot .btn, .story-plaque-save .btn { opacity: .75; }
.story-foot .btn:hover, .story-plaque-save .btn:hover { opacity: 1; }
.obit-body { flex: 1; min-width: 0; }
.plaque-head { flex: 1; min-width: 0; }
.story-plaque-save { align-self: flex-start; }
.story-brand { display: none; margin-top: 8px; font-size: 11px; color: var(--dim); letter-spacing: .02em; }
.story-exporting .story-brand { display: block; }
.story-exporting { box-shadow: none !important; }
.story-exporting .story-foot, .story-exporting .story-plaque-save { display: none; }
.story-export-face { position: absolute; inset: 0; background: var(--panel-2); }
.story-compact { padding: 10px 12px; }
.story-compact .story-title { font-size: 16px; }

/* filters: year range, per-kind counts */
.story-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.story-range label { display: inline-flex; align-items: center; gap: 6px; }
.story-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.story-kind { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.story-kind:hover { border-color: var(--accent); }
.story-kind.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.story-kind-n { font-variant-numeric: tabular-nums; opacity: .7; font-weight: 600; }
.story-kind.active .story-kind-n { opacity: 1; }

/* Hall of Fame plaques. Each material is a physical object with its own fixed
   ink, so the plaques read the same in light and dark themes. */
.pl-class { font-family: var(--serif); font-size: 20px; margin: 18px 0 10px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pl-class .muted { font-family: var(--font, inherit); }
.pl-grid { margin-bottom: 6px; }
.plaque.pl { --pl-ink: #2a2a2a; --pl-dim: #555; --pl-accent: #6b5b3e; --pl-edge: #c9c3b8; position: relative; overflow: hidden; color: var(--pl-ink); border: 2px solid var(--pl-edge); border-radius: 14px; padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.plaque.pl p { margin: 0; font-size: 13.5px; line-height: 1.45; }
.pl a:not(.chip) { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; }
.pl-band { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--pl-team) 0 70%, var(--pl-team2) 70% 100%); }
.pl-top { display: flex; gap: 12px; align-items: center; }
.pl-frame { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.45), rgba(0,0,0,.18)); box-shadow: inset 0 2px 4px rgba(0,0,0,.45), inset 0 -2px 3px rgba(255,255,255,.35), 0 1px 0 rgba(255,255,255,.3); border: 3px double var(--pl-accent); }
.pl-frame { overflow: hidden; }
.pl-frame .face { border-radius: 50%; overflow: hidden; filter: saturate(.85) contrast(1.05); }
.pl-head { flex: 1; min-width: 0; }
.pl-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--pl-accent); }
.pl-name { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.pl-nick { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--pl-dim); }
.pl-meta { font-size: 12px; color: var(--pl-dim); }
.pl-prob { flex: 0 0 auto; text-align: center; line-height: 1; }
.pl-prob b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--accent); }
.pl-prob span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.pl-arch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; padding: 4px 0; border-top: 1px solid color-mix(in srgb, var(--pl-ink) 18%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--pl-ink) 18%, transparent); }
.pl-arch-main { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pl-accent); }
.pl-arch-sec { color: var(--pl-dim); font-style: italic; }
.pl-teams { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 4px; }
.plaque.pl .pl-open { font-family: var(--serif); font-size: 15px; }
.plaque.pl .pl-sig { font-weight: 600; color: var(--pl-accent); }
.pl-list { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.45; }
.pl-stats:not(table) { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; text-align: center; padding: 6px 0; border-radius: 8px; background: color-mix(in srgb, var(--pl-ink) 8%, transparent); }
.pl-stat b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.pl-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--pl-dim); }
.plaque.pl .pl-speech { font-family: var(--serif); font-style: italic; color: var(--pl-dim); }
.plaque.pl .pl-factors { font-size: 12.5px; color: var(--pl-dim); }
.pl .story-brand { color: var(--pl-dim); }
.pl .story-foot { margin-top: 0; }
.pl-class a { font-family: var(--font, inherit); font-size: 13px; font-weight: 400; }
.pl .story-foot .btn { color: var(--pl-ink); border-color: color-mix(in srgb, var(--pl-ink) 30%, transparent); background: transparent; }
.plaque.pl-bronze { --pl-ink: #f7ead3; --pl-dim: #e3cfae; --pl-accent: #f3c77c; --pl-edge: #b07a3f; background: linear-gradient(160deg, #7a4d27 0%, #94612f 40%, #6a3f1e 100%); }
.plaque.pl-marble { --pl-ink: #262626; --pl-dim: #575049; --pl-accent: #7a5c2e; --pl-edge: #c9c3b8; background: repeating-linear-gradient(118deg, transparent 0 46px, rgba(120,110,100,.07) 46px 48px, transparent 48px 90px), linear-gradient(135deg, #f6f4f0, #e4e0d9 55%, #f8f7f4); }
.plaque.pl-gold { --pl-ink: #2b2004; --pl-dim: #4e3c0f; --pl-accent: #6b4300; --pl-edge: #a8790a; background: linear-gradient(160deg, #f8e7a0 0%, #dcb64a 45%, #f2d77e 100%); }
.plaque.pl-granite { --pl-ink: #efe8d8; --pl-dim: #bdb4a2; --pl-accent: #e2bd4f; --pl-edge: #c9a43a; background: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.5px) 0 0 / 7px 7px, radial-gradient(circle at 30% 20%, #34343a, #121215 75%); }
.plaque.pl-enamel { --pl-ink: #ffffff; --pl-dim: #e6e6e6; --pl-accent: #ffe7a3; --pl-edge: var(--pl-team); background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.66)), var(--pl-team); }
.plaque.pl-proj { --pl-ink: var(--text); --pl-dim: var(--dim); --pl-accent: var(--accent); --pl-edge: var(--line); background: var(--panel); border-style: dashed; box-shadow: none; }
.pl-proj .pl-frame { border-style: dashed; box-shadow: none; background: var(--panel-2); }
.pl-proj .face { opacity: .8; filter: grayscale(.5); }
.pl-proj .pl-band { opacity: .45; }
.pd-section + .pd-section { margin-top: 8px; }
.pd-long { columns: 2 260px; margin: 0; padding-left: 18px; font-size: 13px; }
.pd-caveats { margin: 10px 0 0; padding-left: 18px; color: var(--dim); }
@media (max-width: 480px) {
	.plaque.pl { padding: 16px 12px 12px; }
	.pl-frame { width: 62px; height: 62px; }
	.pl-name { font-size: 19px; }
	.pl-teams { margin-left: 0; }
}

/* ---- bar-chart race (race.js) -------------------------------------------------------- */
.race-controls { flex-direction: column; align-items: flex-start; gap: 10px; }
.race-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.race-ctl { display: inline-flex; align-items: center; gap: 8px; }
.race-links { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.race-card { overflow: hidden; }
.race-top { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; min-height: 40px; }
.race-leader { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; min-width: 0; }
.race-leader-mark .face { border-radius: 6px; }
.race-leader-val { font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.race-stage { position: relative; width: 100%; overflow: hidden; }
.race-season { position: absolute; right: 8px; bottom: 4px; font-size: clamp(40px, 9vw, 92px); font-weight: 800; line-height: 1; color: var(--dim); opacity: .2; font-variant-numeric: tabular-nums; pointer-events: none; z-index: 0; }
.race-bar-row { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; will-change: transform; z-index: 1; }
.race-row-link { flex: 0 0 auto; width: 40px; display: flex; justify-content: center; align-items: center; height: 100%; text-decoration: none; }
.race-mark { display: flex; align-items: center; justify-content: center; }
.race-mark .face { border-radius: 5px; }
.race-chip { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 4px; border-radius: 4px; border: 1px solid transparent; line-height: 14px; }
.race-track { position: relative; flex: 1; height: 78%; min-width: 0; }
.race-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.race-name { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.race-name.inside { text-shadow: none; }
.race-val { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.race-sub { margin: 6px 0 8px; min-height: 16px; }
.race-transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.race-play { min-width: 96px; justify-content: center; }
.race-scrub { flex: 1 1 200px; min-width: 140px; accent-color: var(--accent); }
@media (max-width: 520px) {
	.race-row-link { width: 30px; }
	.race-name { font-size: 12px; }
	.race-val { font-size: 11px; }
	.race-chip { font-size: 9px; padding: 1px 3px; }
}

/* era lane toggles (river.js) */
.hist-lanes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.hist-lanes .chipbtn { font-size: 12px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 5px; }
.hist-lane-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hist-rules { margin: 0 0 10px; padding-left: 18px; }
.hist-rules li { margin: 2px 0; }
.now-climb ul { margin: 2px 0 0; padding-left: 18px; }
.cov-filled { color: #8f6c00; font-weight: 600; margin-left: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cov-filled { color: #FFE066; } }
:root[data-theme="dark"] .cov-filled { color: #FFE066; }
.filler-badge { font-size: 10px; padding: 0 5px; border-radius: 8px; border: 1px solid var(--line); color: var(--dim); margin-left: 4px; white-space: nowrap; }
/* Courtside: race stage in the UI face, season counter as a scoreboard numeral */
.race-stage { font-family: var(--ui); font-weight: 700; }
.race-season { font-family: var(--score); font-weight: 400; }
.race-val { font-family: var(--data); font-variant-numeric: tabular-nums; }

/* Hall of Fame plaques: classical capitals for the class headers and names. */
.pl-class { font-family: var(--f-classical); font-weight: 600; letter-spacing: .03em; }
.pl-name { font-family: var(--f-classical); font-weight: 600; letter-spacing: .01em; }
