/* ============ World Cup Archive — historic/gold theme (shared by all editions) ============ */
:root {
  --bg: #0a0d0f;
  --panel: #12171b;
  --panel-solid: #12171b;
  --line: #212a30;
  --line-bright: #33424b;
  --text: #eef1f3;
  --dim: #8a9aa4;
  --faint: #566169;
  --gold: #e8c33d;
  --gold-dark: #b8952a;
  --silver: #c8d2d8;
  --bronze: #cd8b52;
  --mono: 'IBM Plex Mono', monospace;
  --disp: 'Saira Condensed', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--disp); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(1100px 460px at 50% -180px, rgba(232,195,61,.08), transparent 70%); }
.app { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 22px 16px 60px; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* edition switcher */
.ed-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--mono); font-size: 12px; margin-bottom: 14px; }
.ed-nav { padding: 5px 12px; border: 1px solid var(--line-bright); border-radius: 3px; color: var(--text); white-space: nowrap; }
.ed-nav:hover { border-color: var(--gold); text-decoration: none; }
.ed-nav.disabled { color: var(--faint); border-color: var(--line); }
.ed-all { color: var(--dim); font-size: 11px; letter-spacing: 1px; }

/* masthead */
.masthead { text-align: center; margin-bottom: 20px; }
.pretitle { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin-bottom: 6px; }
.masthead h1 { font-weight: 800; font-style: italic; font-size: clamp(38px, 9vw, 76px); line-height: .9; letter-spacing: -1px; }
.masthead h1 .yr { color: var(--gold); }
.masthead h1 .wtag { font-size: .42em; color: var(--gold); vertical-align: middle; letter-spacing: 2px; }
.champ-line { font-family: var(--mono); font-size: 13px; color: var(--dim); margin-top: 10px; }
.champ-line b { color: var(--text); }

/* tabs */
.tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.tab { font-family: var(--disp); font-weight: 700; font-style: italic; font-size: 17px; letter-spacing: .5px;
  background: transparent; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 7px 16px; cursor: pointer; }
.tab:hover { color: var(--text); border-color: var(--line-bright); }
.tab.on { color: #1a1400; background: var(--gold); border-color: var(--gold); }

/* overview */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.pod { background: var(--panel-solid); border: 1px solid var(--line); border-top: 3px solid var(--line-bright); padding: 14px 16px; }
.pod.gold { border-top-color: var(--gold); }
.pod.silver { border-top-color: var(--silver); }
.pod.bronze { border-top-color: var(--bronze); }
.pod-place { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--dim); margin-bottom: 6px; }
.pod-team { font-weight: 700; font-size: 20px; }
.pod-team .flag { margin-right: 8px; }
.ov-stats { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ov-stat { flex: 1; min-width: 90px; text-align: center; background: var(--panel-solid); border: 1px solid var(--line); padding: 12px; }
.ov-n { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--gold); }
.ov-l { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--dim); text-transform: uppercase; }
.ov-gb { background: var(--panel-solid); border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 12px 16px; font-family: var(--mono); font-size: 14px; margin-bottom: 12px; }
.ov-gb-label { color: var(--gold); letter-spacing: 1px; text-transform: uppercase; font-size: 11px; margin-right: 6px; }
.ov-host, .ov-src { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 8px; }

/* group tables */
.stage-h { font-family: var(--disp); font-weight: 800; font-style: italic; font-size: 22px; margin: 18px 0 10px; color: var(--gold); }
.grp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grp { background: var(--panel-solid); border: 1px solid var(--line); padding: 12px 14px; }
.grp-h { font-family: var(--disp); font-weight: 800; font-style: italic; font-size: 18px; letter-spacing: 1px; margin-bottom: 8px; }
.grp-h span { color: var(--gold); }
table.gtable { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
table.gtable th { font-size: 9px; color: var(--faint); font-weight: 600; padding: 4px 4px 6px; text-align: center; border-bottom: 1px solid var(--line); }
table.gtable th.t { text-align: left; }
table.gtable td { padding: 5px 4px; text-align: center; color: var(--dim); border-bottom: 1px solid #161c20; }
table.gtable td.t { text-align: left; color: var(--text); font-weight: 500; white-space: nowrap; }
table.gtable td.t .flag { margin-right: 6px; }
table.gtable td.rk { color: var(--faint); }
table.gtable td.pts { color: var(--gold); font-weight: 700; }
.gm-list { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.gm { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; padding: 3px 0; color: var(--dim); }
.gm-t { white-space: nowrap; } .gm-t.home { text-align: right; }
.gm-t .flag { margin: 0 4px; }
.gm-s { color: var(--text); font-weight: 700; background: #0d1215; border: 1px solid var(--line); border-radius: 3px; padding: 1px 7px; }

/* bracket — fluid flexbox tree with proportional elbow connectors (mirrors the 2026 tracker) */
.bracket-scroll { overflow-x: auto; padding-bottom: 14px; }
.bracket { display: flex; align-items: stretch; justify-content: center; min-width: 540px; }
.bround { display: flex; flex-direction: column; justify-content: space-around; flex: 0 0 236px; }
.bcol-h { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); text-align: center; margin-bottom: 8px; }
.bhead-row { display: flex; justify-content: center; min-width: 540px; }
.bhead-row .bcol-h { flex: 0 0 236px; }
.bhead-row .bspacer { flex: 0 0 34px; }
.bm { width: 100%; box-sizing: border-box; overflow: hidden; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 4px; }
.bm .bm-top { display: flex; justify-content: space-between; min-height: 6px; font-family: var(--mono); font-size: 9px; color: var(--faint); padding: 3px 8px 0; letter-spacing: .5px; }
.bm .trow { display: flex; align-items: center; gap: 7px; padding: 4px 9px; font-size: 15px; line-height: 1.3; font-weight: 700; color: var(--dim); }
.bm .trow .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm .trow .sc { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.bm .trow.w { color: var(--text); }
.bm .trow.w .nm { font-weight: 800; }
.bm .trow.w .sc { color: var(--gold); }
.bm .trow.l { opacity: .55; }
.bm .bm-top .pens { color: var(--faint); }
/* connectors: 1:2:1 flex spacers center a 50%-height elbow per feeder-pair */
.bconn { display: flex; flex-direction: column; flex: 0 0 34px; }
.bconn .band { flex: 1 1 0; display: flex; flex-direction: column; }
.bconn .band::before, .bconn .band::after { content: ''; flex: 1 1 0; }
.bconn .band .elbow { flex: 2 1 0; box-sizing: border-box; border: 1px solid var(--line-bright); border-left: none; }
/* SF + Final mini-bracket + champion + 3rd place */
.finals-champ { text-align: center; font-size: 24px; font-weight: 900; font-style: italic; color: var(--gold); margin: 6px 0 16px; letter-spacing: .5px; }
.fb-bracket { display: flex; align-items: stretch; justify-content: center; min-width: 506px; min-height: 180px; }
.fb-sf { flex: 0 0 236px; display: flex; flex-direction: column; justify-content: space-around; }
.fb-final { flex: 0 0 236px; display: flex; flex-direction: column; justify-content: center; }
.fb-final.solo { max-width: 236px; margin: 0 auto; }
.fb-head { justify-content: center; }
.fb-head .bcol-h { flex: 0 0 236px; }
.fb-head .bspacer { flex: 0 0 34px; }
.bm.final-card { border-color: var(--gold); }
.bm.bronze-card { opacity: .9; }
.finals-3rd { max-width: 236px; margin: 24px auto 0; text-align: center; }
.finals-3rd .fl { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 2px; color: var(--faint); text-transform: uppercase; padding-bottom: 6px; }

/* scorers */
.section-h { font-family: var(--disp); font-weight: 800; font-style: italic; font-size: 24px; margin-bottom: 14px; }
.section-h .sub { font-size: 13px; color: var(--dim); font-style: normal; font-weight: 400; margin-left: 8px; }
table.scorers { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; }
table.scorers th { font-size: 9px; color: var(--faint); font-weight: 600; letter-spacing: 1px; padding: 8px 6px 5px; text-align: center; border-bottom: 1px solid var(--line); }
table.scorers th.t { text-align: left; padding-left: 12px; }
table.scorers td { padding: 7px 6px; text-align: center; color: var(--dim); border-bottom: 1px solid #161c20; }
table.scorers td.t { text-align: left; padding-left: 12px; color: var(--text); font-weight: 500; white-space: nowrap; }
table.scorers td.t .flag { margin-right: 8px; }
table.scorers td.rk { color: var(--faint); }
table.scorers td.tcode { font-size: 11px; }
table.scorers td.g { color: var(--text); font-weight: 700; font-size: 14px; }
table.scorers tr.boot { box-shadow: inset 3px 0 0 var(--gold); }
table.scorers tr.boot td.t, table.scorers tr.boot td.g { color: var(--gold); }
.boot-ico { margin-left: 4px; }
.scorers-note { font-family: var(--mono); font-size: 10px; color: var(--faint); line-height: 1.7; margin-top: 12px; }

.wc-foot { text-align: center; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.wc-foot a { color: var(--dim); }

/* ---- hub ---- */
.hub-mast { text-align: center; margin-bottom: 26px; }
.hub-mast .pretitle a { color: var(--dim); }
.hub-mast h1 { font-weight: 800; font-style: italic; font-size: clamp(40px, 9vw, 80px); line-height: .9; margin-top: 4px; }
.hub-mast h1 .yr { color: var(--gold); }
.hub-sub { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 10px; letter-spacing: .5px; }
.hub-sec { margin-bottom: 28px; }
.hub-sec-h { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 14px; }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.hcard { display: flex; flex-direction: column; gap: 5px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 5px; padding: 14px 16px; color: var(--text); transition: border-color .15s, transform .15s; }
.hcard:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.hcard.live { border-color: var(--gold-dark); }
.hc-year { font-family: var(--disp); font-weight: 800; font-style: italic; font-size: 30px; line-height: 1; }
.hc-host { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-win { font-family: var(--mono); font-size: 12px; color: var(--gold); margin-top: 2px; }
.hc-live { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--gold); margin-top: 2px; }

/* hub: link to the all-time records page */
.hub-records { display: block; background: var(--panel-solid); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 5px; padding: 14px 18px; margin-bottom: 26px; color: var(--text); transition: border-color .15s, transform .15s; }
.hub-records:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.hub-records .hr-t { font-family: var(--disp); font-weight: 800; font-style: italic; font-size: 22px; }
.hub-records .hr-t .arw { color: var(--gold); }
.hub-records .hr-s { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 3px; }

/* ---- all-time records page ---- */
.rec-intro { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 10px; line-height: 1.6; max-width: 640px; margin-left: auto; margin-right: auto; }
.rec-intro .rec-tip { display: block; color: var(--gold-dark); font-size: 11px; margin-top: 6px; }
.rec-intro .rec-asof { display: block; color: var(--faint); font-size: 10.5px; margin-top: 5px; }
.rec-panel-h { font-family: var(--disp); font-weight: 800; font-style: italic; font-size: 22px; color: var(--gold); margin-bottom: 14px; }
html.js .rec-panel-h { display: none; }
html.js .rec-panel { display: none; }
html.js .rec-panel.on { display: block; }
.rec-sec { margin-bottom: 22px; }
.rec-sec-h { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--line); padding-bottom: 7px; margin-bottom: 12px; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
.rec-card { background: var(--panel-solid); border: 1px solid var(--line); border-left: 3px solid var(--line-bright); border-radius: 4px; padding: 12px 14px; }
.rec-card:hover { border-left-color: var(--gold); }
.rec-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); line-height: 1.4; }
.rec-val { font-family: var(--disp); font-weight: 800; font-style: italic; font-size: 32px; line-height: 1; color: var(--gold); margin: 4px 0 6px; }
.rec-holder { font-family: var(--disp); font-weight: 700; font-size: 16px; color: var(--text); line-height: 1.35; }
.rec-holder + .rec-holder { margin-top: 3px; }
.rec-sub { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--dim); }
.rec-note { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 6px; line-height: 1.5; }
/* expandable record cards */
.rec-card.exp { cursor: pointer; }
.rec-card.exp:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rec-label { position: relative; }
.rec-ico { position: absolute; right: 0; top: -1px; color: var(--gold-dark); font-size: 12px; transition: transform .15s; }
.rec-card.exp:hover .rec-ico { color: var(--gold); }
.rec-card.exp.open .rec-ico { transform: rotate(180deg); color: var(--gold); }
.rec-top { list-style: none; margin: 10px 0 2px; border-top: 1px dashed var(--line); padding-top: 8px; }
html.js .rec-card.exp .rec-top { display: none; }
html.js .rec-card.exp.open .rec-top { display: block; }
.rec-top li { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: 12px; padding: 3px 0; color: var(--dim); border-bottom: 1px solid #161c20; }
.rec-top li:last-child { border-bottom: none; }
.rec-top li.lead { color: var(--text); }
.rec-top .rk { flex: 0 0 20px; text-align: right; color: var(--faint); font-size: 11px; }
.rec-top .who { flex: 1; font-family: var(--disp); font-weight: 700; font-size: 14px; color: var(--text); line-height: 1.3; }
.rec-top li.lead .who { color: var(--gold); }
.rec-top .rt-sub { font-family: var(--mono); font-weight: 400; font-size: 10.5px; color: var(--faint); }
.rec-top .tv { flex: 0 0 auto; font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--gold); }
.rec-more { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .5px; color: var(--gold); }
.rec-more:hover { text-decoration: underline; }

/* ---- dedicated record page (/worldcups/records/<slug>/) ---- */
.rp-crumb { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-bottom: 16px; }
.rp-crumb a { color: var(--dim); }
.rp-crumb span { color: var(--dim); }
.rp-mast { margin-bottom: 18px; }
.rp-mast .pretitle { color: var(--dim); letter-spacing: 2px; }
.rp-mast h1 { font-weight: 800; font-style: italic; font-size: clamp(30px, 6.5vw, 54px); line-height: .95; letter-spacing: -.5px; }
.rp-blurb { font-family: var(--mono); font-size: 12.5px; color: var(--dim); line-height: 1.65; max-width: 680px; margin: 14px auto 0; }
.rp-card { background: var(--panel-solid); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 5px; padding: 10px 18px; max-width: 640px; margin: 0 auto; }
.rp-list { list-style: none; }
.rp-list li { display: flex; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 14px; padding: 9px 0; color: var(--dim); border-bottom: 1px solid #161c20; }
.rp-list li:last-child { border-bottom: none; }
.rp-list .rk { flex: 0 0 26px; text-align: right; color: var(--faint); font-size: 12px; }
.rp-list .who { flex: 1; font-family: var(--disp); font-weight: 700; font-size: 17px; color: var(--text); line-height: 1.3; }
.rp-list li.lead .who { color: var(--gold); }
.rp-list li.lead { box-shadow: inset 3px 0 0 var(--gold); padding-left: 8px; margin-left: -8px; }
.rp-list .rt-sub { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--faint); }
.rp-list .tv { flex: 0 0 auto; font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--gold); }
.rp-asof { font-family: var(--mono); font-size: 10.5px; color: var(--faint); text-align: center; margin: 14px 0 0; }
.rp-related { max-width: 640px; margin: 30px auto 0; }
.rp-related-h { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.rp-related-links { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-related-links a { font-family: var(--mono); font-size: 11.5px; color: var(--dim); border: 1px solid var(--line-bright); border-radius: 3px; padding: 5px 10px; }
.rp-related-links a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
