/* =====================================================================
   Clubs page · "By country" bands (between the map and the league list).
   Static fragment: countries/bands.html (built from countries/facts.json by build.mjs).
   Everything is scoped to .cbands (not .cb: v6.css's .cb is the small club badge). Language: .cbands[data-lang="en|es"] shows one of each .l-en/.l-es pair (the block is .no-tx,
   so the i18n sweep leaves it alone). Theme: the section head and ladder follow the page tokens (palette.css); the bands
   are TV graphics (design/blog/TV_GRAPHICS.md): one look in both themes, a dark panel over a stadium photo.
   Contrast (WCAG AA): the panel is #05080C at .72 over a photo dimmed to <= .55, so the worst pixel under text is
   rgb(68 70 73) or darker; ink #F6EEDD 8.2:1, mute #C8CFD9 6.0:1, every accent (--acc) 4.7:1 or more.
   ===================================================================== */
.cbands {
  --tv-ink: #F6EEDD; --tv-ink2: #DCD3C1; --tv-mute: #C8CFD9; --tv-night: #0B1622; --tv-panel: rgb(5 8 12 / .72);
  --cb-fd: var(--fd, "Saira", "Arial Narrow", system-ui, sans-serif);
  --cb-fb: var(--fb, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  --cb-r: 18px; --cb-rim: 28px; --cb-win: 38%;
  margin: clamp(40px, 5vw, 72px) 0 clamp(40px, 5vw, 72px);
}
.cbands:not([data-lang="es"]) .l-es, .cbands[data-lang="es"] .l-en { display: none; }
.cbands *, .cbands *::before, .cbands *::after { box-sizing: border-box; }
.cb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- section head: kicker, h2, deck, the Caribbean Series ladder (follows the page theme) ---------- */
.cb-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 12px clamp(24px, 4vw, 64px); align-items: end; margin: 0 0 clamp(20px, 2.6vw, 36px); }
.cb-kick { grid-column: 1; margin: 0; font: 700 13px/1.2 var(--cb-fd); font-stretch: 118%; letter-spacing: .22em; text-transform: uppercase; color: var(--hi, #B4590B); }
.cb-h2 { grid-column: 1; margin: 0; font: 800 clamp(52px, 7.4vw, 124px)/.84 var(--cb-fd); font-stretch: 68%; letter-spacing: .004em; text-transform: uppercase; color: var(--ink, #F0E2C6); text-wrap: balance; }
.cb-deck { grid-column: 1; margin: 6px 0 0; max-width: 46ch; font: 500 17px/1.45 var(--cb-fb); color: var(--ink-2, #DCCBAA); }
.cb-deck b { font: 800 1.3em/1 var(--cb-fd); font-stretch: 90%; color: var(--ink, #F0E2C6); font-variant-numeric: tabular-nums; }
.cb-ladder { grid-column: 2; grid-row: 1 / span 3; list-style: none; margin: 0; padding: 18px 20px 14px; display: grid; gap: 4px;
  background: var(--card, #13202E); border: 1px solid var(--rule, rgb(240 226 198 / .14)); border-radius: 14px; box-shadow: var(--sh-1, none); }
.cb-ladder::before { content: ""; }
.cb-ladder a { display: grid; grid-template-columns: minmax(0, 11.5em) minmax(0, 1fr) 2.6em 3.6em; align-items: center; gap: 14px; min-height: 44px; padding: 2px 6px; border-radius: 8px;
  color: var(--ink, #F0E2C6); text-decoration: none; }
.cb-ladder a:hover { background: var(--card-2, rgb(255 255 255 / .05)); }
.cb-ladder a:focus-visible { outline: 3px solid var(--mango, #D9893C); outline-offset: 1px; }
.cb-lad-c { font: 600 15px/1.15 var(--cb-fb); }
.cb-lad-bar { position: relative; height: 18px; border-radius: 3px; background: var(--rule-2, rgb(15 35 64 / .11)); overflow: hidden; }
.cb-lad-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 3px;
  background: linear-gradient(180deg, var(--f1) 0 33.4%, var(--f2) 33.4% 66.7%, var(--f3) 66.7%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18); }
.cb-lad-v { font: 800 30px/1 var(--cb-fd); font-stretch: 80%; text-align: right; font-variant-numeric: tabular-nums; }
.cb-lad-lg { font: 700 12px/1 var(--cb-fd); font-stretch: 112%; letter-spacing: .12em; color: var(--ink-3, #BDAD8C); }

/* ---------- a band: blurred photo field · crisp photo window · tri-colour seam · TV panel ---------- */
.cb-band { position: relative; isolation: isolate; display: grid; grid-template-columns: var(--cb-win) minmax(0, 1fr); grid-template-areas: "win panel";
  min-height: clamp(680px, 82svh, 840px); margin: 0 0 clamp(20px, 2.4vw, 32px); border-radius: var(--cb-r); overflow: hidden;
  background: var(--tv-night); color: var(--tv-ink); box-shadow: var(--sh-lift, 0 14px 30px -12px rgb(0 0 0 / .6)); scroll-margin-top: 80px; }
.cb-band.cb-p-left { grid-template-columns: minmax(0, 1fr) var(--cb-win); grid-template-areas: "panel win"; }
.cb-photo { position: absolute; inset: -48px; z-index: -2; }
.cb-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--fxy, 50% 50%); filter: blur(16px) brightness(.55) saturate(1.15); }
.cb-band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; /* flag glow from the panel side */
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--f3) 30%, transparent), transparent 55%),
              radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--f1) 34%, transparent), transparent 60%); }
.cb-p-left::before { background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--f3) 30%, transparent), transparent 55%),
              radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--f1) 34%, transparent), transparent 60%); }

.cb-window { grid-area: win; position: relative; margin: 0; min-height: 100%; overflow: hidden; }
.cb-window img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fxy, 50% 50%); }
.cb-window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(4 8 12 / .72) 0%, rgb(4 8 12 / 0) 34%); pointer-events: none; }
.cb-window figcaption { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; display: grid; justify-items: start; gap: 8px; }
.cb-cap { display: inline-block; max-width: 100%; padding: 6px 10px; border-radius: 4px; background: rgb(5 8 12 / .78); color: var(--tv-ink);
  font: 600 13px/1.3 var(--cb-fb); }
.cbands .cb-credit { display: inline-block; max-width: 100%; padding: 3px 7px; border-radius: 3px; background: rgb(15 35 64 / .8); color: #fff; font: 500 9.5px/1.35 var(--cb-fb); letter-spacing: .01em; }
.cbands .cb-credit a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.cbands .cb-credit a:focus-visible { outline: 2px solid #FFB547; outline-offset: 1px; }

/* the seam: the flag's three colours, full height, between the window and the panel */
.cb-seam { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--cb-win); width: 12px; transform: translateX(-50%); display: flex; pointer-events: none; }
.cb-p-left .cb-seam { left: calc(100% - var(--cb-win)); }
.cb-seam i { flex: 1; }
.cb-seam i:nth-child(1) { background: var(--f1); } .cb-seam i:nth-child(2) { background: var(--f2); } .cb-seam i:nth-child(3) { background: var(--f3); }

.cb-panel { grid-area: panel; position: relative; margin: var(--cb-rim); padding: clamp(24px, 2.6vw, 40px); align-self: stretch;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "id id" "hero sig" "tiles tiles" "clubs clubs"; gap: 20px clamp(20px, 2.4vw, 36px); align-content: start;
  background: var(--tv-panel); border: 1px solid rgb(255 255 255 / .09); border-radius: 14px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* identity */
.cb-id { grid-area: id; min-width: 0; }
.cb-n { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font: 700 14px/1.2 var(--cb-fd); font-stretch: 118%; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); }
.cb-n-i { display: inline-grid; place-items: center; min-width: 2.3em; height: 1.9em; border-radius: 4px; background: var(--tv-ink); color: #05080C; letter-spacing: .04em; }
.cb-lg { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 20px); margin: 0; }
.cb-logo { flex: 0 0 auto; display: grid; place-items: center; }
.cb-logo img { display: block; height: clamp(58px, 5.4vw, 92px); width: auto; max-width: 180px; object-fit: contain; filter: drop-shadow(0 2px 8px rgb(0 0 0 / .5)); }
.cb-logo.cb-plate { padding: 10px 14px; border-radius: 10px; background: var(--tv-ink); }
.cb-logo.cb-plate img { height: clamp(40px, 3.6vw, 60px); filter: none; }
.cb-code { font: 800 clamp(76px, 8.2vw, 140px)/.8 var(--cb-fd); font-stretch: 66%; letter-spacing: .005em; color: var(--tv-ink); text-shadow: 0 4px 30px rgb(0 0 0 / .45); }
.cb-full { margin: 12px 0 0; max-width: 34ch; font: 500 14.5px/1.35 var(--cb-fb); color: var(--tv-mute); }

/* the hero number: Caribbean Series titles */
.cb-hero { grid-area: hero; display: flex; align-items: flex-end; gap: 16px; justify-self: start; align-self: end; padding-bottom: 12px; position: relative; min-width: 0; }
.cb-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 2px;
  background: linear-gradient(90deg, var(--f1) 0 33.4%, var(--f2) 33.4% 66.7%, var(--f3) 66.7%); box-shadow: 0 0 0 1px rgb(0 0 0 / .25); }
.cb-big { font: 800 clamp(132px, 13.4vw, 232px)/.74 var(--cb-fd); font-stretch: 70%; letter-spacing: -.01em; color: var(--tv-ink); font-variant-numeric: tabular-nums; text-shadow: 0 6px 40px rgb(0 0 0 / .5); }
.cb-big-l { display: grid; gap: 7px; padding-bottom: 4px; min-width: 0; }
.cb-big-l b { font: 700 clamp(17px, 1.5vw, 22px)/1 var(--cb-fd); font-stretch: 100%; letter-spacing: .06em; text-transform: uppercase; color: var(--tv-ink); }
.cb-big-s { font: 600 13px/1.3 var(--cb-fb); color: var(--acc); }
.cb-csmost { margin: 2px 0 0; font: 500 13.5px/1.4 var(--cb-fb); color: var(--tv-ink2); }
.cb-k { display: inline-block; margin-right: 6px; padding: 3px 7px 2px; border-radius: 3px; background: rgb(255 255 255 / .1); color: var(--acc);
  font: 700 11.5px/1.2 var(--cb-fd); font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase; vertical-align: 1px; }

/* the six stat tiles: lower-third style */
.cb-tiles { grid-area: tiles; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cb-t { min-width: 0; margin: 0; padding: 12px 14px 13px; border-radius: 8px; background: rgb(255 255 255 / .055); border-top: 3px solid var(--c1, var(--acc)); }
.cb-t dt { margin: 0 0 7px; font: 700 11.5px/1.15 var(--cb-fd); font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase; color: var(--tv-mute); }
.cb-t dd { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.cb-t dd b { grid-column: 1 / -1; font: 800 clamp(27px, 2.5vw, 40px)/.95 var(--cb-fd); font-stretch: 78%; letter-spacing: .005em; color: var(--tv-ink); font-variant-numeric: tabular-nums; overflow-wrap: normal; min-width: 0; }
.cb-t.cb-long dd b { font-size: clamp(22px, 1.9vw, 30px); font-stretch: 70%; }
.cb-t dd small { grid-column: 1 / -1; margin-top: 5px; font: 500 12.5px/1.3 var(--cb-fb); color: var(--tv-mute); }
.cb-t-club dd { grid-template-columns: 40px minmax(0, 1fr); }
.cb-t-club dd b, .cb-t-club dd small { grid-column: 2; }
.cb-t-club .cb-crest { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--tv-ink); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--c1, transparent); }
.cb-crest img { width: 32px; height: 32px; object-fit: contain; }
.cb-t-season dd b { font-size: clamp(24px, 2.1vw, 34px); }

/* the signature fact */
.cb-sig { grid-area: sig; align-self: end; position: relative; margin: 0 0 12px; padding: 2px 0 2px 22px; font: 600 clamp(16px, 1.3vw, 19px)/1.42 var(--cb-fb); color: var(--tv-ink); text-wrap: pretty; }
.cb-sig-k { position: absolute; left: 0; top: 4px; bottom: 4px; width: 6px; border-radius: 2px; background: linear-gradient(180deg, var(--f1) 0 33.4%, var(--f2) 33.4% 66.7%, var(--f3) 66.7%); }

/* the clubs: logo chips → #team/<id> */
.cb-clubs { grid-area: clubs; list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid rgb(255 255 255 / .12);
  display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 8px; }
.cb-clubs li { min-width: 0; display: grid; }
.cb-chip { display: grid; justify-items: center; gap: 7px; min-height: 44px; padding: 10px 4px 9px; border-radius: 10px; color: var(--tv-ink); text-decoration: none;
  background: rgb(255 255 255 / .06); border-bottom: 3px solid var(--c1, rgb(255 255 255 / .28)); transition: background .15s, transform .15s; }
.cb-chip:hover { background: rgb(255 255 255 / .14); transform: translateY(-2px); }
.cb-chip:focus-visible { outline: 3px solid #FFB547; outline-offset: 2px; }
.cb-chip-logo { width: 54px; height: 54px; border-radius: 50%; background: var(--tv-ink); display: grid; place-items: center; box-shadow: 0 2px 10px rgb(0 0 0 / .35); }
.cb-chip-logo img { width: 42px; height: 42px; object-fit: contain; }
.cb-chip-n { max-width: 100%; text-align: center; text-wrap: balance; overflow-wrap: normal; font: 700 13px/1.05 var(--cb-fd); font-stretch: 84%; letter-spacing: .03em; text-transform: uppercase; }
.cb-chip { align-content: start; }
/* Cuba: 16 clubs, smaller chips so they sit in two rows */
.cb-band[data-lg="SNB"] .cb-clubs { gap: 6px; }
.cb-band[data-lg="SNB"] .cb-chip-logo { width: 46px; height: 46px; } .cb-band[data-lg="SNB"] .cb-chip-logo img { width: 36px; height: 36px; }
.cb-band[data-lg="SNB"] .cb-chip-n { font-size: 11.5px; }

@media (prefers-reduced-motion: reduce) { .cb-chip { transition: none; } .cb-chip:hover { transform: none; } }

/* ---------- 1280-ish: a narrower window, the hero number under the identity when the panel gets tight ---------- */
@media (max-width: 1360px) {
  .cbands { --cb-win: 33%; }
  .cb-panel { gap: 18px 22px; }
  .cb-code { font-size: clamp(72px, 7.4vw, 104px); }
  .cb-big { font-size: clamp(120px, 12vw, 168px); }
}

@media (max-width: 1200px) and (min-width: 1024px) {
  .cb-panel { grid-template-areas: "id id" "hero hero" "sig sig" "tiles tiles" "clubs clubs"; }
  .cb-sig { margin: 0; }
}
/* ---------- tablet: the window becomes a strip on top; the panel rides up over it ---------- */
@media (max-width: 1023px) {
  .cb-head { grid-template-columns: 1fr; }
  .cb-ladder { grid-column: 1; grid-row: auto; margin-top: 10px; }
  .cb-band, .cb-band.cb-p-left { grid-template-columns: minmax(0, 1fr); grid-template-areas: "win" "panel"; grid-template-rows: clamp(220px, 34vw, 320px) auto; min-height: 0; }
  .cb-window { min-height: 0; }
  .cb-window figcaption { bottom: 64px; }
  .cb-seam { display: none; }
  .cb-panel { margin: -48px 20px 20px; overflow: hidden; padding-top: calc(clamp(24px, 2.6vw, 40px) + 8px); }
  .cb-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: linear-gradient(90deg, var(--f1) 0 33.4%, var(--f2) 33.4% 66.7%, var(--f3) 66.7%); }
}

/* ---------- phone (390 first-class) ---------- */
@media (max-width: 719px) {
  .cbands { --cb-r: 14px; }
  .cb-h2 { font-size: clamp(46px, 14vw, 64px); }
  .cb-deck { font-size: 15.5px; }
  .cb-ladder { padding: 12px 12px 10px; }
  .cb-ladder a { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "c v lg" "bar bar bar"; gap: 6px 10px; padding: 6px 4px; }
  .cb-lad-c { grid-area: c; font-size: 14.5px; } .cb-lad-v { grid-area: v; font-size: 26px; } .cb-lad-lg { grid-area: lg; min-width: 3.6em; } .cb-lad-bar { grid-area: bar; height: 12px; }
  .cb-band, .cb-band.cb-p-left { grid-template-rows: 212px auto; }
  .cb-window figcaption { left: 12px; right: 12px; bottom: 52px; gap: 6px; }
  .cb-cap { font-size: 12px; padding: 5px 8px; }
  .cb-panel { margin: -40px 10px 10px; padding: 26px 16px 18px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "hero" "sig" "tiles" "clubs"; gap: 16px; }
  .cb-n { font-size: 12.5px; letter-spacing: .16em; }
  .cb-lg { gap: 12px; }
  .cb-logo img { height: 54px; max-width: 120px; } .cb-logo.cb-plate img { height: 34px; } .cb-logo.cb-plate { padding: 8px 10px; }
  .cb-code { font-size: clamp(64px, 19vw, 84px); }
  .cb-full { font-size: 13.5px; margin-top: 10px; }
  .cb-hero { justify-self: stretch; gap: 12px; padding-bottom: 10px; }
  .cb-big { font-size: clamp(104px, 31vw, 128px); }
  .cb-big-l { max-width: none; }
  .cb-big-l b { font-size: 17px; }
  .cb-csmost { font-size: 13px; }
  .cb-sig { margin: 0; }
  .cb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cb-t { padding: 10px 11px 11px; }
  .cb-t dt { font-size: 10.5px; letter-spacing: .13em; }
  .cb-t dd b { font-size: 26px; }
  .cb-t-season dd b { font-size: 21px; }
  .cb-t-club dd b { font-size: 22px; }
  .cb-t.cb-long dd b { font-size: 18px; }
  .cb-t dd small { font-size: 12px; }
  .cb-t-club dd { grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; }
  .cb-t-club .cb-crest { width: 34px; height: 34px; } .cb-crest img { width: 27px; height: 27px; }
  .cb-sig { font-size: 15.5px; padding-left: 18px; }
  .cb-clubs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .cb-band[data-lg="LMP"] .cb-clubs, .cb-band[data-lg="LVBP"] .cb-clubs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .cb-band[data-lg="SNB"] .cb-clubs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .cb-band[data-lg="LMP"] .cb-chip-n, .cb-band[data-lg="LVBP"] .cb-chip-n { font-size: 11px; }
  .cb-band[data-lg="LMP"] .cb-chip-logo, .cb-band[data-lg="LVBP"] .cb-chip-logo { width: 46px; height: 46px; }
  .cb-band[data-lg="SNB"] .cb-chip-n { font-size: 10.5px; letter-spacing: .02em; }
  .cb-chip { padding: 9px 3px 8px; }
}
