/* Fan Fixtures: match cards in a row (scrolls sideways on phones). Uses the theme's --fh-* colours when present. */
.ff { --ff-primary: var(--fh-primary, #0047ab); --ff-accent: var(--fh-accent, #ffd100); --ff-dark: var(--fh-dark, #0b1f3a); --ff-line: var(--fh-line, #e3e7ee); --ff-muted: var(--fh-muted, #5b6575); }
.ff-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ff-match { display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--ff-line); border-radius: 12px; padding: 16px 18px; }
.ff-match--next { border-top: 4px solid var(--ff-accent); padding-top: 13px; }
.ff-match__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ff-muted); text-transform: uppercase; letter-spacing: .04em; }
.ff-ha { flex: none; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--ff-dark); text-transform: none; letter-spacing: 0; }
.ff-ha--home { background: var(--ff-accent); color: var(--fh-on-accent, var(--ff-dark)); }
.ff-match__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; text-align: center; }
.ff-team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.ff-team img, .ff-team__initial { width: 48px; height: 48px; object-fit: contain; }
.ff-team__initial { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #eef1f6; color: var(--ff-dark); font-weight: 800; font-size: 18px; }
.ff-team__name { font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--ff-dark); overflow-wrap: anywhere; }
.ff-team--us .ff-team__name { color: var(--ff-primary); }
.ff-vs { align-self: center; margin-top: -22px; font-size: 22px; font-weight: 300; color: var(--ff-muted); }
.ff-match__when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-top: 12px; border-top: 1px solid var(--ff-line); font-size: 14px; color: var(--ff-dark); }
.ff-match__when time { flex: 1 1 auto; }
.ff-rel { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--ff-dark); color: #fff; font-size: 12px; font-weight: 700; }
.ff-rel--live { background: #d92d20; }
.ff-venue { flex: 1 0 100%; font-size: 13px; color: var(--ff-muted); }
.ff-postponed { font-weight: 700; color: #d92d20; }
.ff-empty { margin: 0; padding: 18px; border: 1px dashed var(--ff-line); border-radius: 12px; color: var(--ff-muted); background: #fff; }
.ff-last { margin: 14px 0 0; font-size: 14px; color: var(--ff-dark); }
.ff-last__label { margin-right: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ff-muted); }
.ff-last__date { color: var(--ff-muted); }
@media (max-width: 600px) {
	.ff-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none; }
	.ff-list::-webkit-scrollbar { display: none; }
	.ff-match { flex: 0 0 82%; scroll-snap-align: start; }
	.ff-list > .ff-match:only-child { flex-basis: 100%; }
}

/* Shared bits: colour tokens for the lists below, small empty text, source line. */
.ff-table-wrap, .ff-results, .ff-injuries, .ff-events, .ff-transfers, .ff-bet, .ff-squad { --ff-primary: var(--fh-primary, #0047ab); --ff-accent: var(--fh-accent, #ffd100); --ff-dark: var(--fh-dark, #0b1f3a); --ff-line: var(--fh-line, #e3e7ee); --ff-muted: var(--fh-muted, #5b6575); }
.ff-empty--small { padding: 10px 0; border: 0; background: none; font-size: 14px; }
.ff-source { margin: 10px 0 0; font-size: 12px; color: var(--fh-muted, #5b6575); }

/* Referees and odds on the match card. */
.ff-officials { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -4px 0 0; font-size: 13px; }
.ff-officials div { display: flex; gap: 6px; }
.ff-officials dt { color: var(--ff-muted); font-weight: 600; }
.ff-officials dd { margin: 0; color: var(--ff-dark); }
.ff-odds { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ff-muted); text-decoration: none; }
.ff-odds span { padding: 0 5px; border: 1px solid currentColor; border-radius: 4px; font-size: 11px; }
.ff-odds:hover, .ff-odds:focus { color: var(--ff-primary); }

/* Results. */
.ff-results { list-style: none; margin: 0; padding: 0; }
.ff-result { display: grid; grid-template-columns: 26px 44px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--ff-line); font-size: 14px; color: var(--ff-dark); }
.ff-result__badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #fff; background: #8a94a6; }
.ff-result--w .ff-result__badge { background: #12a150; }
.ff-result--l .ff-result__badge { background: #d92d20; }
.ff-result__date, .ff-result__comp { color: var(--ff-muted); font-size: 12px; }

/* Tables: standings and squad. */
.ff-table-wrap { overflow-x: auto; border: 1px solid var(--ff-line); border-radius: 12px; background: #fff; }
.ff-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ff-dark); }
.ff-table th { padding: 10px 8px; background: #f4f6fa; font-size: 12px; font-weight: 700; color: var(--ff-muted); text-align: center; white-space: nowrap; }
.ff-table td { padding: 9px 8px; border-top: 1px solid var(--ff-line); text-align: center; white-space: nowrap; }
.ff-table .ff-left { text-align: left; white-space: normal; }
.ff-table .ff-num { width: 34px; color: var(--ff-muted); }
.ff-table .ff-pts { font-weight: 800; }
.ff-table tr.is-us td { background: color-mix(in srgb, var(--ff-accent) 22%, #fff); font-weight: 700; }
.ff-table tr.ff-gap td { padding: 2px; color: var(--ff-muted); }
.ff-tteam { display: inline-flex; align-items: center; gap: 8px; }
.ff-tteam img { width: 20px; height: 20px; object-fit: contain; }
.ff-table--mini { font-size: 13px; }
.ff-table--mini td, .ff-table--mini th { padding: 7px 6px; }
.ff-squad__group { margin: 28px 0 10px; font-size: 18px; }
.ff-squad__group:first-child { margin-top: 0; }
.ff-player { display: block; font-weight: 700; }
.ff-country { display: block; font-size: 12px; color: var(--ff-muted); }
.ff-inj { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px; background: #fde8e7; color: #b42318; font-size: 11px; font-weight: 700; }
.ff-table tr.is-injured .ff-player { color: #b42318; }
.ff-card { display: inline-block; width: 9px; height: 12px; border-radius: 2px; vertical-align: -2px; background: #f5c400; }
.ff-card--r { background: #d92d20; }

/* Injuries, events, transfers. */
.ff-injuries, .ff-events, .ff-transfers { list-style: none; margin: 0; padding: 0; }
.ff-injuries li { padding: 8px 0; border-bottom: 1px solid var(--ff-line); font-size: 14px; color: var(--ff-dark); }
.ff-injuries span { color: var(--ff-muted); }
.ff-injuries em { display: block; font-size: 12px; font-style: normal; color: var(--ff-muted); }
.ff-events li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--ff-line); }
.ff-events time { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 56px; border-radius: 10px; background: var(--ff-dark); color: #fff; font-size: 12px; text-transform: uppercase; }
.ff-events time span { font-size: 22px; font-weight: 800; line-height: 1; color: var(--ff-accent); }
.ff-events strong { display: block; color: var(--ff-dark); }
.ff-events__meta, .ff-events__text { display: block; font-size: 13px; color: var(--ff-muted); }
.ff-transfer { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ff-line); }
.ff-transfer > div { flex: 1; min-width: 0; }
.ff-transfer strong { display: block; color: var(--ff-dark); }
.ff-transfer__dir { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; color: #fff; background: #12a150; }
.ff-transfer--out .ff-transfer__dir { background: #8a94a6; }
.ff-transfer__meta { display: block; font-size: 13px; color: var(--ff-muted); }
.ff-transfer__src { flex: none; font-size: 13px; }

/* Betting page. */
.ff-bet__notice { padding: 12px 16px; border-radius: 10px; background: #fff7d6; font-size: 14px; color: var(--ff-dark); }
.ff-bet__match { font-size: 18px; font-weight: 800; color: var(--ff-dark); }
.ff-bet__list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.ff-bet__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 16px; border: 1px solid var(--ff-line); border-radius: 12px; background: #fff; }
.ff-bet__name { font-weight: 800; color: var(--ff-dark); }
.ff-bet__lic { flex: 1; font-size: 12px; color: var(--ff-muted); }
.ff-bet__btn { padding: 8px 14px; border-radius: 8px; background: var(--ff-dark); color: #fff !important; font-weight: 700; text-decoration: none; }
.ff-bet__legal { margin-top: 20px; font-size: 13px; color: var(--ff-muted); }
/* Progress charts ([fan_progress], [fan_scorers]). Series colours from the theme (--fh-chart,
   --fh-chart-alt; validated pairs), context lines grey, text in text colours only. */
.ffc, .ffc-bars { --ffc-us: var(--fh-chart, #2a78d6); --ffc-alt: var(--fh-chart-alt, #eb6834); --ffc-context: #e1e5ec; --ffc-leader: #8f98a8; --ffc-surface: #fff; --ffc-ink: var(--fh-dark, #0b1f3a); --ffc-muted: #6b7280; --ffc-grid: #eceef2; --ffc-axis: #c3c8d2; }
.ffc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.ffc-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--fh-line, #e3e7ee); border-radius: 12px; background: var(--ffc-surface); }
.ffc-tile__label { font-size: 12px; font-weight: 600; color: var(--ffc-muted); }
.ffc-tile__value { font-size: 30px; font-weight: 800; line-height: 1.15; color: var(--ffc-ink); }
.ffc-tile__sub { font-size: 12px; color: var(--ffc-muted); }
.ffc-form { display: flex; gap: 4px; margin: 6px 0 4px; }
.ffc-res { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #fff; }
.ffc-res--w { background: #0ca30c; }
.ffc-res--d { background: #8a94a6; color: var(--ffc-ink); }
.ffc-res--l { background: #d03b3b; }
.ffc-chart { margin: 0 0 18px; padding: 16px 18px 10px; border: 1px solid var(--fh-line, #e3e7ee); border-radius: 12px; background: var(--ffc-surface); }
.ffc-chart figcaption { margin: 0; font-style: normal; text-align: left; }
.ffc .ffc-title { margin: 0; font-size: 17px; font-style: normal; color: var(--ffc-ink); }
.ffc-sub { margin: 2px 0 8px; font-size: 13px; font-style: normal; color: var(--ffc-muted); }
.ffc-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ffc-ink); }
.ffc-legend:empty { display: none; }
.ffc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ffc-key { display: inline-block; flex: none; }
.ffc-key--line { width: 14px; height: 2px; border-radius: 1px; }
.ffc-key--rect { width: 10px; height: 10px; border-radius: 3px; }
.ffc-plot { position: relative; outline: none; }
.ffc-plot:focus-visible { box-shadow: 0 0 0 2px var(--ffc-us); border-radius: 6px; }
.ffc-svg { display: block; overflow: visible; font-family: inherit; }
.ffc-grid { stroke: var(--ffc-grid); stroke-width: 1; shape-rendering: crispEdges; }
.ffc-base { stroke: var(--ffc-axis); stroke-width: 1; shape-rendering: crispEdges; }
.ffc-ax { font-size: 11px; fill: var(--ffc-muted); font-variant-numeric: tabular-nums; }
.ffc-end { font-size: 12px; font-weight: 700; fill: var(--ffc-ink); }
.ffc-cross { stroke: var(--ffc-axis); stroke-width: 1; }
.ffc-col { transition: opacity .15s ease; }
.ffc-svg:hover .ffc-col:not(.is-on), .ffc-plot:focus .ffc-col:not(.is-on) { opacity: .55; }
.ffc-chip--w { fill: #0ca30c; }
.ffc-chip--d { fill: #8a94a6; }
.ffc-chip--l { fill: #d03b3b; }
.ffc-chip-t { font-size: 10px; font-weight: 800; fill: #fff; }
.ffc-chip-t--d { fill: var(--ffc-ink); }
.ffc-tip { position: absolute; z-index: 5; min-width: 150px; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: #fff; box-shadow: 0 6px 20px rgba(11, 31, 58, .16); font-size: 12px; color: var(--ffc-muted); pointer-events: none; }
.ffc-tip__title { margin-bottom: 4px; font-weight: 600; }
.ffc-tip__row { display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.ffc-tip__row strong { color: var(--ffc-ink); }
.ffc-table { margin: 4px 0 8px; }
.ffc-table summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--fh-primary, #0047ab); }
.ffc-table .ff-table-wrap { margin-top: 10px; }
.ffc-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ffc-bars li { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; align-items: center; gap: 12px; font-size: 13px; color: var(--ffc-ink); }
.ffc-bars__name { font-weight: 600; overflow-wrap: anywhere; }
.ffc-bars__track { display: flex; align-items: center; gap: 8px; }
.ffc-bars__bar { display: block; height: 14px; min-width: 4px; border-radius: 0 4px 4px 0; background: var(--ffc-us); }
.ffc-bars__value { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
	.ffc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ffc-tile__value { font-size: 26px; }
	.ffc-chart { padding: 14px 12px 8px; }
}