/* ============================================================================
   FOOTBALL · TWO-LEGGED TIES AND THE KNOCKOUT BRACKET (21 Nov 2026) — the look for ties.js
   Builds on games.css (the World Cup's game card, .fg-card). Uses the page's own colours (--navy, --line, --gold,
   --mut, --soft) so it sits in any football section.
   ========================================================================== */
:root{--ft-line:rgba(231,198,107,.55);--ft-gap:56px}

/* ── one game of a tie: the World Cup's card with "1st leg" / "2nd leg" on top ── */
.ft-leg{margin:0}
.ft-leg .ft-tag{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px 0}
.ft-leg .ft-tag span{font-size:10.5px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.ft-leg .ft-tag em{font-style:normal;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--mut)}
.ft-leg .fg-fx{padding-top:10px}
.ft-leg .ft-tba{color:var(--mut)!important}
.ft-nofl{display:inline-block;background:rgba(255,255,255,.08)!important;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.14)!important}

/* ── a tie: its name, the aggregate, the two legs, who the winner plays next ── */
.ft-tie{position:relative;background:rgba(255,255,255,.03);border:1.5px solid var(--line);border-radius:16px;padding:12px 12px 10px;text-align:left}
.ft-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:2px 4px 10px}
.ft-h b{font-size:12px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#fff}
.ft-h span{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--mut);white-space:nowrap}
.ft-agg{margin:-2px 4px 10px;padding:7px 10px;border-radius:9px;background:rgba(231,198,107,.12);border:1px solid rgba(231,198,107,.4);color:var(--gold);font-size:12.5px;font-weight:800;text-align:center}
.ft-legs{display:flex;flex-direction:column;gap:8px}
.ft-side .ft-legs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:700px){.ft-side .ft-legs{grid-template-columns:1fr}}
.ft-next{display:flex;align-items:center;gap:8px;margin:10px 4px 2px;font-size:12.5px;font-weight:700;color:#cdd9ec;line-height:1.35}
.ft-next svg{flex:none;width:15px;height:15px;fill:none;stroke:var(--gold);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.ft-next b{color:#fff;font-weight:800}
.ft-next a{color:var(--gold);font-weight:800;text-decoration:none}
/* the final: a gold frame */
.ft-tie.ft-final{border-color:rgba(231,198,107,.85);box-shadow:0 0 0 1px rgba(231,198,107,.25),0 10px 30px rgba(0,0,0,.35)}
.ft-tie.ft-final .ft-h b{color:var(--gold)}
.ft-tie.ft-one .ft-tag{display:none}

/* ── the bracket: rounds as columns, each pair of ties joined by a gold line to the game it feeds ── */
.ft-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -22px;padding:6px 22px 18px}
.ft-bracket{display:flex;align-items:stretch;gap:var(--ft-gap);min-width:max-content}
.ft-col{display:flex;flex-direction:column;flex:0 0 300px}
.ft-col.ft-r0{flex-basis:420px}
.ft-ch{text-align:center;margin-bottom:14px}
.ft-ch b{display:block;font-size:12px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.ft-ch span{display:block;margin-top:3px;font-size:11px;font-weight:700;color:var(--mut)}
.ft-cb{flex:1;display:flex;flex-direction:column;position:relative}
.ft-pair{flex:1;display:flex;flex-direction:column;position:relative}
.ft-slot{flex:1;display:flex;flex-direction:column;justify-content:center;padding:9px 0}
.ft-pair::after{content:'';position:absolute;right:calc(var(--ft-gap) / -2);top:25%;bottom:25%;width:calc(var(--ft-gap) / 2);border:2px solid var(--ft-line);border-left:0;border-radius:0 12px 12px 0;pointer-events:none}
.ft-pair::before{content:'';position:absolute;right:calc(var(--ft-gap) * -1);top:50%;width:calc(var(--ft-gap) / 2);border-top:2px solid var(--ft-line);pointer-events:none}
.ft-last .ft-cb{justify-content:center}
.ft-last .ft-slot{flex:0 0 auto}
.ft-extra{margin-top:26px}
.ft-extra .ft-tie{opacity:.92}
/* a round's tie when not yet known: the two "winner of" lines in the card */
.ft-col .ft-tie{width:100%;box-sizing:border-box}
.ft-hint{display:none;align-items:center;justify-content:center;gap:14px;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--soft);margin:6px 0 10px;line-height:1.5}
.ft-hint .ar{font-size:20px;color:var(--gold);line-height:1;display:inline-block;animation:ftHintL 1.3s ease-in-out infinite}
.ft-hint .ar.r{animation-name:ftHintR}
@keyframes ftHintL{0%,100%{transform:translateX(0)}50%{transform:translateX(-7px)}}
@keyframes ftHintR{0%,100%{transform:translateX(0)}50%{transform:translateX(7px)}}
@media (prefers-reduced-motion:reduce){.ft-hint .ar{animation:none}}
@media (max-width:1180px){.ft-hint{display:flex}}

/* ── the small map of the bracket: flags and three letters, opens each tie below ── */
.ft-mini{display:flex;gap:28px;justify-content:center;align-items:stretch;margin:6px auto 4px;max-width:640px}
.ft-mcol{display:flex;flex-direction:column;flex:1 1 0;min-width:0}
.ft-mh{text-align:center;font-size:10.5px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);margin-bottom:8px}
.ft-mb{flex:1;display:flex;flex-direction:column}
.ft-mpair{flex:1;display:flex;flex-direction:column;justify-content:space-around;position:relative;padding:2px 0}
.ft-mpair::after{content:'';position:absolute;right:-14px;top:25%;bottom:25%;width:14px;border:2px solid var(--ft-line);border-left:0;border-radius:0 8px 8px 0}
.ft-mpair::before{content:'';position:absolute;right:-28px;top:50%;width:14px;border-top:2px solid var(--ft-line)}
.ft-mpair .ft-mx{margin:5px 0}
.ft-last .ft-mb{justify-content:center}
.ft-mx{display:flex;flex-direction:column;gap:4px;padding:7px 8px;border-radius:10px;background:var(--navy);border:1.5px solid var(--line);text-decoration:none;color:#fff}
@media (hover:hover){.ft-mx:hover{border-color:var(--gold)}}
.ft-mx small{font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:var(--mut)}
.ft-mt{display:flex;align-items:center;gap:7px;min-width:0}
.ft-mt img,.ft-mt i{flex:none;width:22px;height:16px;border-radius:3px;object-fit:cover;box-shadow:0 0 0 1px rgba(255,255,255,.2);background:rgba(255,255,255,.08)}
.ft-mt b{font-size:12.5px;font-weight:900;letter-spacing:.04em}
@media (max-width:420px){.ft-mini{gap:20px}.ft-mpair::after{right:-10px;width:10px}.ft-mpair::before{right:-20px;width:10px}.ft-mx{padding:6px}.ft-mt{gap:5px}.ft-mt b{font-size:11.5px}}

/* a game with its teams one above the other (a narrow column, or the teams not known yet) */
.ft-rows{display:flex;flex-direction:column;gap:6px;padding:12px 14px 10px}
.ft-row{display:flex;align-items:center;gap:10px;min-width:0;color:#fff;text-decoration:none}
.ft-row .tx{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.ft-row .tx b{font-size:14.5px;font-weight:800;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ft-row .tx small{font-size:10.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ft-row em{font-style:normal;font-size:18px;font-weight:900}
.ft-v{display:block;font-style:normal;font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--soft);padding-left:44px}
@media (hover:hover){a.ft-row:hover b{color:var(--gold)}}
/* a phone: the tie's frame goes, so each game card is as wide as the games tab's */
@media (max-width:600px){
 .ft-tie{padding:8px 0 4px;border:0;background:none;border-radius:0}
 .ft-h{padding:2px 2px 8px}.ft-agg{margin:0 0 8px}.ft-next{margin:8px 2px 2px}
 .nl-dsf .ft-tie,.nl-dfin .ft-tie{padding:10px 8px 6px;border:1.5px solid var(--line);background:rgba(255,255,255,.03);border-radius:16px}
}
@media (max-width:600px){.ft-leg .fg-fl{width:28px;height:21px}.ft-leg .fg-fx .t{gap:7px}.ft-leg .fg-fx{gap:6px;grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr)}.ft-leg .fg-fx .nm.long{font-size:12.5px}}

/* ── the bracket's slim games (21 Nov 2026): the Games tab has the full cards; here just who, when, where ── */
.ft-slimtie{padding:11px 12px 10px}
.ft-slimtie .ft-h{padding:0 2px 8px}
.ft-slimtie .ft-legs{gap:6px}
.ft-slim{display:block;padding:9px 11px 8px;border-radius:11px;background:var(--navy);border:1.5px solid var(--line);color:#fff;text-decoration:none}
@media (hover:hover){a.ft-slim:hover{border-color:var(--gold)}}
.ft-stag{display:block;font-size:9.5px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);margin-bottom:5px}
.ft-sl{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px}
.ft-sl em{font-style:normal;font-size:14px;font-weight:900;white-space:nowrap;text-align:center}
.ft-sl em.sc{font-size:17px}.ft-sl em.live{color:#ff5a6a}
.ft-st{display:flex;align-items:center;gap:8px;min-width:0}
.ft-st.away{flex-direction:row-reverse;text-align:right}
.ft-st img,.ft-st i{flex:none;width:24px;height:17px;border-radius:3px;object-fit:cover;box-shadow:0 0 0 1px rgba(255,255,255,.2);background:rgba(255,255,255,.08)}
.ft-st b{font-size:14px;font-weight:800;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ft-st.lose b{color:#9fb3d4;font-weight:700}
.ft-ssub{display:block;margin-top:5px;font-size:11px;font-weight:700;color:var(--mut);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ft-sr{display:flex;flex-direction:column;gap:3px}
.ft-sr > span{display:flex;flex-direction:column;gap:1px}
.ft-sr small{padding-left:32px;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--mut)}
.ft-sv{font-size:9.5px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--soft);padding-left:32px}
.ft-slim.tbc .ft-ssub{text-align:left;padding-left:32px}
.ft-slimtie .ft-next{margin:9px 2px 0;font-size:12px}
.ft-slimtie .ft-agg{margin:0 0 8px;padding:5px 8px;font-size:12px}
@media (max-width:600px){.ft-slimtie{padding:10px 10px 8px;border:1.5px solid var(--line);background:rgba(255,255,255,.03);border-radius:16px}.ft-st b{font-size:13.5px}}
/* nothing in the bracket may widen its column (long lines shorten with "…" instead) */
.ft-col,.ft-cb,.ft-pair,.ft-slot,.ft-tie,.ft-legs,.ft-slim,.ft-sl{min-width:0}
.ft-tie{max-width:100%}
.ft-bracket{width:max-content;margin:0 auto}
/* the flag above the name, as on the World Cup's bracket (James, 21 Nov: "we stack the flag and team name. Works
   better in the space"): long names get the whole width and can take two lines */
.ft-sl{align-items:start}
.ft-sl .ft-st,.ft-sl .ft-st.away{flex-direction:column;align-items:center;text-align:center;gap:5px}
.ft-sl .ft-st img,.ft-sl .ft-st i{width:34px;height:24px;border-radius:4px}
.ft-sl .ft-st b{white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:13.5px;line-height:1.15;text-overflow:clip}
.ft-sl em{align-self:center;margin-top:-14px}
.ft-sl em.sc{font-size:20px}
@media (max-width:600px){.nl-ko .ft-sl .ft-st b{font-size:13px}}
/* the day and the stadium one above the other; bigger flags (James, 21 Nov 2026) */
.ft-ssub span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ft-ssub span + span{margin-top:1px;color:#8ea3c4;font-weight:600}
.ft-sl .ft-st img,.ft-sl .ft-st i{width:46px;height:32px;border-radius:5px}
.ft-sl em{margin-top:-16px}
@media (max-width:600px){.ft-sl .ft-st img,.ft-sl .ft-st i{width:48px;height:34px}}
