/* Quick preferences: an anchored panel, never a detour from the current match. */
.quick-settings {
  position: fixed;
  z-index: 10000;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--programme-rule);
  border-radius: 18px;
  box-shadow: 0 18px 60px #0006;
  padding: 8px 18px 0;
  overflow: hidden;
}
.quick-settings[hidden] {
  display: none;
}
.quick-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border);
}
.quick-settings-heading strong {
  font:
    600 23px Matchday,
    sans-serif;
  letter-spacing: 0.015em;
}
.quick-settings-heading button {
  background: transparent;
  border: 0;
  color: var(--secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.quick-settings-heading button:hover {
  background: var(--surface-hover);
}
.quick-settings-heading .ui-icon {
  width: 17px;
  height: 17px;
}
.quick-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.quick-setting select {
  max-width: 145px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}
.quick-choices {
  display: flex;
  gap: 2px;
  border: 1px solid var(--programme-rule);
  border-radius: 999px;
  padding: 3px;
}
.quick-choices button {
  background: transparent;
  color: var(--secondary);
  border: 0;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.quick-choices button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}
.spoiler-setting strong {
  font-weight: 500;
}
.spoiler-setting small {
  display: block;
  font-size: 11px;
  color: var(--secondary);
  margin-top: 5px;
}
#quickSpoilers {
  width: 42px;
  height: 25px;
  flex: none;
  border: 1px solid var(--programme-rule);
  background: var(--surface-hover);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
}
#quickSpoilers i {
  display: block;
  height: 17px;
  width: 17px;
  border-radius: 50%;
  background: var(--secondary);
  transition: transform 0.15s;
}
#quickSpoilers[aria-checked="true"] {
  background: var(--text);
}
#quickSpoilers[aria-checked="true"] i {
  transform: translateX(17px);
  background: var(--bg);
}
.quick-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  margin: 0 -18px;
  padding: 16px 18px;
  background: var(--surface-hover);
}
.quick-more:hover {
  filter: brightness(1.12);
}
.quick-more .ui-icon {
  width: 16px;
  height: 16px;
}
.quick-settings :focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.match-utilities {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 0;
}
.match-actions > .match-utilities {
  flex-basis: 100%;
}
.match-utilities button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--secondary);
  font: 500 11px inherit;
  cursor: pointer;
}
.match-utilities button:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--programme-rule);
}
.match-utilities .ui-icon {
  width: 14px;
  height: 14px;
}
.match-utility-status:empty {
  display: none;
}
.match-utility-status {
  font-size: 11px;
  flex-basis: 100%;
  color: var(--secondary);
}
.share-address {
  display: block;
  margin: 6px auto;
  width: 90%;
  font-size: 12px;
}
.match-utilities button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  #quickSpoilers i {
    transition: none;
  }
}
.recent-destinations {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--border);
}
.recent-destinations[hidden] {
  display: none;
}
.recent-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px 10px;
}
.recent-heading strong {
  font-size: 11px;
  color: var(--secondary);
  font-weight: 500;
}
.recent-heading button {
  background: none;
  border: 0;
  color: var(--secondary);
  font-size: 11px;
  cursor: pointer;
  padding: 6px;
}
.recent-heading button:hover {
  color: var(--text);
  text-decoration: underline;
}
.recent-destinations > a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
}
.recent-destinations > a:hover,
.recent-destinations > a:focus-visible {
  background: var(--surface-hover);
}
.recent-destinations > a > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.recent-destinations strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}
.recent-destinations small {
  display: block;
  font-size: 10px;
  color: var(--secondary);
  margin-top: 3px;
}
.recent-destination-picture {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
}
.recent-destination-picture img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.recent-destinations > a > .ui-icon {
  width: 13px;
  height: 13px;
  color: var(--secondary);
}
.quick-settings{max-height:calc(100dvh - 24px);overflow-y:auto}.match-utilities button{font-family:inherit;font-size:11px;font-weight:500}
/* Equal-height capitals give the wordmark a clear, compact silhouette. */
.header .brand { gap:0; min-height:44px; }
.header .brand-wordmark { display:block; width:190px; height:38px; margin:0; padding:0; font-size:0; line-height:0; text-transform:none; background:linear-gradient(90deg,var(--text) 0 44%,#ef0713 44% 100%); mask:url('chilliscore-wordmark.svg') center / contain no-repeat; -webkit-mask:url('chilliscore-wordmark.svg') center / contain no-repeat; }
#askIntro:before { content:""; width:88px; height:64px; border:0; border-radius:0; background:url('chilli-boot.png') center / contain no-repeat; }
.stakes-mark { font-size:0; width:36px; height:28px; background:url('chilli-boot.png') center / contain no-repeat; border:0; border-radius:0; }
.footer-brand { display:inline-flex; align-items:center; gap:7px; }
.footer-brand:before { content:""; width:30px; height:24px; background:url('chilli-boot.png') center / contain no-repeat; }
@media(max-width:759px){.header .brand-wordmark{width:154px;height:32px;font-size:0;margin:0;}}

/* Site-wide refinement: readable working text, quiet editorial headings. */
.national-ranking-link { display:flex; align-items:center; flex-wrap:wrap; gap:6px 14px; padding:0; border:0; background:none; color:var(--secondary); font-size:12px; text-align:left; }
.national-rank-value { display:inline-flex; align-items:center; gap:6px; min-height:36px; color:var(--text); }
.national-rank-value strong { font-variant-numeric:tabular-nums; font-size:16px; }
.national-rank-value small { border:1px solid var(--border); border-radius:4px; padding:2px 4px; font-size:10px; }
.national-rank-value svg { width:14px; height:14px; }
.ranking-fact-link { padding:0; min-height:36px; border:0; background:transparent; color:inherit; font-weight:600; text-align:left; }
.ranking-dialog { width:min(680px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--border); border-radius:18px; background:var(--surface); color:var(--text); box-shadow:0 24px 80px #0008; }
.ranking-dialog[open] { display:flex; flex-direction:column; }
.ranking-dialog::backdrop { background:#000a; backdrop-filter:blur(3px); }
.ranking-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:24px 24px 16px; }
.ranking-kicker { color:var(--secondary); font-size:10px; letter-spacing:.12em; }
.ranking-heading h2 { font:600 30px/1.2 Matchday,sans-serif; margin:4px 0 0; }
.ranking-close { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--border); border-radius:50%; background:transparent; color:var(--text); }
.ranking-close svg { width:20px; height:20px; }
.ranking-controls { display:flex; gap:12px; padding:0 24px; }
.ranking-genders { display:flex; padding:3px; background:var(--bg); border-radius:99px; }
.ranking-genders button { min-height:38px; padding:0 16px; border:0; border-radius:99px; background:transparent; color:var(--secondary); font-size:13px; }
.ranking-genders button[aria-pressed=true] { background:var(--text); color:var(--bg); }
.ranking-search { display:flex; align-items:center; gap:8px; flex:1; min-width:0; padding:0 12px; border:1px solid var(--border); border-radius:99px; }
.ranking-search svg { width:18px; height:18px; flex:none; color:var(--secondary); }
.ranking-search input { width:100%; min-width:0; min-height:44px; border:0; background:transparent; color:var(--text); font-size:14px; outline-offset:2px; }
.ranking-status { margin:14px 24px; font-size:12px; color:var(--secondary); min-height:18px; }
.ranking-scroll { overflow:auto; overscroll-behavior:contain; min-height:120px; }
.ranking-dialog table { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; font-size:14px; font-variant-numeric:tabular-nums; }
.ranking-dialog thead { position:sticky; top:0; z-index:2; background:var(--surface); }
.ranking-dialog th { position:static; background:var(--surface); font-size:11px; color:var(--secondary); font-weight:500; text-align:left; }
.ranking-dialog th:first-child { width:56px; }
.ranking-dialog th:nth-child(3) { width:90px; }
.ranking-dialog th:nth-child(4) { width:78px; }
.ranking-dialog th,.ranking-dialog td { padding:12px 18px; border-bottom:1px solid var(--border); }
.ranking-dialog th:nth-child(n+3),.ranking-dialog td:nth-child(n+3) { text-align:right; }
.ranking-dialog td:nth-child(2) { white-space:normal; }
.ranking-dialog td button { display:flex; align-items:center; gap:10px; padding:0; min-height:32px; border:0; background:none; color:inherit; font-weight:600; text-align:left; white-space:normal; }
.ranking-dialog .crest { width:24px; height:24px; object-fit:contain; flex:none; }
.ranking-dialog .ranking-selected { background:color-mix(in srgb,var(--text) 8%,var(--surface)); }
.ranking-dialog .ranking-selected td { background:transparent; }
.ranking-dialog .ranking-team-name { display:flex; align-items:center; gap:10px; }
.ranking-country-code { display:grid; place-items:center; width:24px; height:24px; flex:none; border-radius:4px; background:var(--surface-raised); color:var(--secondary); font-size:8px; letter-spacing:.02em; }
.ranking-position { font-weight:700; }
.ranking-movement { white-space:nowrap; font-size:12px; }
.ranking-movement.up { color:#00a86b; }
.ranking-movement.down { color:#ef6262; }
.ranking-dialog footer { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0; padding:12px 24px; font-size:11px; color:var(--secondary); border-top:1px solid var(--border); }
.ranking-dialog footer a { white-space:nowrap; color:var(--text); }
.ranking-empty { padding:20px 24px; font-size:14px; color:var(--secondary); }
@media(max-width:600px) {
  .ranking-heading { padding:18px 16px 14px; }
  .ranking-controls { padding:0 16px; flex-wrap:wrap; }
  .ranking-search { flex-basis:100%; }
  .ranking-search input { font-size:16px; }
  .ranking-status { margin:12px 16px; }
  .ranking-dialog th,.ranking-dialog td { padding:10px 10px; }
  .ranking-dialog th:first-child { width:44px; }
  .ranking-dialog th:nth-child(3) { width:72px; }
  .ranking-dialog th:nth-child(4) { width:62px; }
  .ranking-dialog table { font-size:13px; }
  .ranking-dialog th:last-child,.ranking-dialog td:last-child { padding-right:14px; }
  .ranking-dialog td button { gap:7px; }
  .ranking-dialog footer { padding:10px 16px; align-items:flex-start; }
}
body { font-family: "Report Sans", Inter, system-ui, sans-serif; }
button, input, select, textarea { font-family: inherit; }
.sidebar .league-button { font-size: 14px; }
.sidebar-note, .panel-foot, .story .meta, .recent-destinations small { font-size: 12px; }
.recent-destinations strong { font-size: 14px; }
.header .global-search input { font-size: 14px; }
.search-result-copy strong { font-size: 15px; line-height: 1.4; }
.search-result-copy small, .search-status { font-size: 12px; line-height: 1.5; }
.search-items button { min-height: 60px; }
.search-close { display: none; }
.search-items h3 { font-size: 12px; letter-spacing: .06em; }
.global-search-results { overscroll-behavior: contain; }
.league-picker-search {
  display: block; position: sticky; top: 0; z-index: 1;
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px;
  margin-bottom: 8px;
}
.league-picker-empty { margin: 12px; color: var(--secondary); font-size: 13px; }
.league-picker-list button { min-height: 44px; font-size: 14px; }
#matchGrid .match-row > .match-team { font-size: 14px; line-height: 1.4; }
#matchGrid .match-time { font-size: 12px; min-width: 36px; min-height: 36px; }
#matchGrid .league-heading .competition-link { line-height: 1.25; }
#matches .segmented button { min-height: 40px; }
.ribbon-nav button { min-width: 36px; min-height: 36px; }
.mini-table-row { font-size: 14px; font-variant-numeric: tabular-nums; }
.mini-table-row .team-link { font-size: 14px; min-width: 0; }
.mini-table-row > :nth-last-child(-n + 2) { text-align: right; }
.mini-table-head { padding: 8px 0; font-size: 12px; color: var(--secondary); }
.mini-table-head abbr { text-decoration: none; cursor: help; }
.mini-table-row > small { font-size: 12px; }
#clubOverview .mini-table-row { grid-template-columns: 24px minmax(0,1fr) 42px 52px; }
#clubOverview .mini-table-row > strong { white-space: nowrap; }
.workspace-card-head > button { min-height: 40px; font-size: 13px; }
.table-scroll th { font-size: 12px; letter-spacing: .025em; }
.overview-metrics span, .season-tracker { font-size: 12px; }
.competition-tabs button, .profile-tabs button { min-height: 48px; }
.competition-tabs, .profile-tabs, .fixture-tabs { scroll-padding-inline: 16px; }
#transfers .story { grid-template-columns: 180px minmax(0,1fr); gap: 0; align-items: stretch; overflow: hidden; }
#transfers .story-media { width: 100%; min-width: 0; height: 100%; max-height: none; margin: 0; aspect-ratio: auto; border-radius: 0; }
#transfers .story-media img { width: 100%; height: 100%; object-fit: cover; }
#transfers .story-body { min-width: 0; padding: 18px 22px; align-self: center; }
#transfers .story h3 { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; margin: 5px 0 8px; }
#transfers .story .eyebrow { font-size: 12px; }
#transfers .story .meta { font-size: 12px; line-height: 1.4; }
.news-topics button { min-height: 40px; border-radius: 999px; font-size: 14px; }
.news-grid .story .meta { font-size: 12px; }
.news-grid .story .tag { font-size: 12px; }
.settings-page > h1 { font: 600 36px/1.2 Matchday, sans-serif; margin-block: 14px 8px; }
.settings-page > h1:focus { outline: none; }
.settings-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.quick-setting { font-size: 14px; }
.quick-setting select, .quick-choices button { font-size: 13px; min-height: 36px; }
.quick-settings-heading button { min-width: 40px; min-height: 40px; }
.quick-more { min-height: 48px; }
.settings-page .setting-row p { font-size: 14px; line-height: 1.6; }
.settings-page .setting-row select { min-height: 44px; font-size: 14px; }
footer { font-size: 12px; }
footer a { display: inline-flex; align-items: center; min-height: 36px; }
#playerProfile .profile-facts dt, #playerProfile .profile-facts small { font-size: 12px; }
#playerProfile .profile-facts dd { font-size: 14px; }
#playerProfile .profile-filter label { font-size: 12px; }
#playerProfile select { min-height: 44px; font-size: 14px; border-radius: 12px; }
#ask .ask-answer { font-size: 15px; line-height: 1.75; }
#ask .ask-sources { font-size: 12px; }
#ask .ask-copy { min-height: 40px; font-size: 13px; }
#ask .ask-followups button { min-height: 40px; font-size: 13px; }
#ask .ask-author { font-size: 12px; }

@media(max-width:759px) {
  body.club-page #teamDialog > .dialog-head { position:relative; display:block; padding:20px 60px 12px 16px; }
  body.club-page #teamDialog > .dialog-head > div { width:100%; min-width:0; }
  body.club-page #teamDialog #closeTeam { position:absolute; top:16px; right:12px; margin:0; width:40px; min-width:40px; height:40px; padding:10px; font-size:0; border:1px solid var(--border); border-radius:50%; }
  body.club-page #teamDialog #closeTeam svg { width:18px; height:18px; flex:none; }
  #matches .segmented button { padding: 9px 10px; font-size: 12px; }
  #matchGrid .match-team .crest { width: 22px; height: 22px; }
  #matchGrid .match-row { min-height: 80px; }
  .datebar #dateLabel { min-height: 44px; }
  .sidebar-note { font-size: 12px; }
  .mobile-nav a, .mobile-nav summary { font-size: 12px; }
  #transfers .story { grid-template-columns: 104px minmax(0,1fr); min-height: 132px; }
  #transfers .story-body { padding: 14px; }
  #transfers .story h3 { font-size: 15px; line-height: 1.4; }
  #transfers .story-media { min-height: 132px; }
  .news-grid .story:first-child h3 { font-size: 29px; line-height: 1.15; }
  .news-grid .story:nth-child(n+2) h3 { font-size: 18px; line-height: 1.25; }
  .header .global-search.is-open { display: flex; align-items: center; gap: 4px; }
  .header .global-search.is-open .global-search-field { flex: 1; min-width: 0; }
  .header .global-search.is-open .search-close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text); }
  .header .global-search:not(.is-open) { position: relative; inset: auto; width: 42px; flex: none; }
  .header .global-search:not(.is-open) .global-search-field { width: 42px; height: 42px; }
  .header .global-search:not(.is-open) input { display: none; }
  .header .global-search.is-open input { font-size: 16px; }
  .global-search-results { max-height: min(65dvh, 520px); }
  #playerProfile .profile-hero h3 { font-size: 27px; }
  .quick-settings { max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); }
}
@media(max-width:359px) {
  #news > .section-title { flex-wrap: wrap; gap: 10px; }
  #news > .section-title .search { flex: 1 0 100%; max-width: none; }
  #transfers .story { grid-template-columns: 88px minmax(0,1fr); }
  #transfers .story-body { padding: 12px; }
  #matches .segmented button { padding-inline: 7px; font-size: 11px; }
}

/* Postponed fixtures retain navigation but never imply a played score. */
.match-row.is-postponed,.compact-fixture.is-postponed,.score-ticket.is-postponed { background:color-mix(in srgb,var(--bg,#000) 85%,#777 15%); }
.is-postponed .match-team,.is-postponed .fixture-side,.is-postponed .ticket-team,.is-postponed .fixture-team { opacity:.48; text-decoration:line-through; text-decoration-thickness:1px; }
.is-postponed .match-time,.is-postponed .ticket-status { color:var(--muted); font-size:11px; }
.is-postponed .match-scores { opacity:.5; }
.is-postponed .postponed-score { font-size:18px; font-weight:500; }
