:root { --fg:#111; --muted:#666; --line:#ddd; }
* { box-sizing: border-box; }
body { margin: 0 auto; max-width: 1200px; padding: 1rem 1rem 3rem;
  font: 16px/1.45 system-ui, -apple-system, sans-serif; color: var(--fg); }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; margin: 0; font-weight: normal; }
.deck { color: var(--muted); margin: 0 0 1rem; }

.scrubber { position: sticky; top: 0; background: #fff; padding: .5rem 0 .15rem;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }  /* no long-press select/callout on the chart */
/* no hairline: teams fade out as they scroll up behind the header */
.scrubber::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1.5rem;
  background: linear-gradient(#fff, transparent); pointer-events: none; }
.readout { display: flex; align-items: baseline; font-size: 1.05rem; margin-bottom: .2rem; }
.readout #year { font-weight: 700; flex: none; }
.readout .count { color: var(--muted); white-space: nowrap; flex: none; }
.readout .count::before { content: "·"; margin: 0 .4em; }
/* highlighted team: fills remaining space, truncates with … instead of overflowing on mobile */
.readout #hlteam { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1e40af; }
.readout #hlteam:not(:empty)::before { content: "·"; color: var(--muted); font-weight: 400; margin: 0 .4em; }

svg { display: block; width: 100%; height: 68px; overflow: visible; touch-action: none; cursor: pointer; }
svg:focus:not(:focus-visible) { outline: none; }   /* mouse/touch: no ring */
svg:focus-visible { outline-offset: 0px; }          /* keyboard: default ring */
.area { fill: url(#areaGrad); } .line { fill: none; stroke: var(--fg); stroke-width: 1.5; }
.mark { stroke: var(--fg); stroke-width: 2; vector-effect: non-scaling-stroke; }
.dot { fill: var(--fg); }
.grid { stroke: rgba(0,0,0,.12); vector-effect: non-scaling-stroke; }
.hl { fill: rgba(59,130,246,.20); animation: hlIn .12s ease-out; }   /* active-year span; quick fade-in softens flicker */
@keyframes hlIn { from { opacity: 0; } to { opacity: 1; } }
.wc { fill: var(--fg); }
.wc.won { fill: #cbae4e; stroke: var(--fg); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.gwrap { position: relative; }
.hllabels { position: absolute; inset: 0; pointer-events: none; font-size: .68rem; color: #1e40af; }
.hllab { position: absolute; top: 1px; white-space: nowrap; animation: hlIn .12s ease-out;
         paint-order: stroke; -webkit-text-stroke: 3px #d8e6fd; }   /* halo = active-window blue, masks the marker line */
.hllab.bot { top: auto; bottom: 1px; }   /* recent years: below the line, out of its way */
.hllab.s { padding-left: 2px; }
.hllab.e { transform: translateX(-100%); padding-right: 2px; }

.xaxis { position: relative; height: 1.1em; font-size: .7rem; color: var(--muted); }
.xaxis span { position: absolute; padding-left: 3px; }   /* all left-justified at their tick */
.legend { font-size: .8rem; color: var(--muted); margin: .7rem 0 0; }
.legend .t { cursor: default; }

.teams { margin: 1.5rem 0 1rem; }
.t { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 0 .35rem;
     margin: 0 .25rem .3rem 0; color: inherit; text-decoration: none; white-space: nowrap; cursor: pointer;
     -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.t:hover { border-color: var(--fg); }
.t.sus { background: #ececec; border-color: #d0d0d0; } /* suspended member */
.t.new { background: #d7f0d0; border-color: #9ccc9c; } /* joined this year */
.t.win { background: #f4e4a6; border-color: #cbae4e; } /* World Cup winner */
.t.active { background: #d8e6fd; border-color: #1e40af; } /* highlighted: matches the active-year span */

.gone-h { font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 1.1rem; margin: 1.3rem 0 .5rem; }

.src { font-size: .75rem; color: var(--muted); margin-top: 1.2rem; }
