/* Local Football Matches: prototype styles.
   Tokens match the "Local Football Matches" design system. Square corners everywhere. */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=Hanken+Grotesk:wght@400;500;600;700&display=swap");

:root {
  /* Colour */
  --green-900: #0D3823;   /* brand: headings, primary button, icons, links, focus */
  --green-700: #2F7A52;   /* open pyramid band only */
  --green-100: #DDE8E1;   /* selected chip / level fill */
  --green-050: #EEF3F0;   /* quiet icon buttons, hover rows */
  --surface-000: #FFFFFF;
  --surface-050: #F5F5F2; /* hero band, footer, tab track */
  --surface-100: #EFF0EB; /* initials crest tile */
  --ink-900: #18201B;     /* strong text, values */
  --ink-700: #414943;     /* labels, controls */
  --ink-500: #6A716C;     /* body copy, captions (lightest allowed text) */
  --ink-300: #B3B8B2;     /* disabled text only */
  --line-300: #CDD8D0;    /* control borders */
  --line-200: #E2E4DC;    /* hairlines */
  --warn-100: #FBF3E2;    /* "check first" / partial coverage note fill */
  --warn-700: #7A5410;    /* text on warn-100 (7.0:1) */
  --overlay: rgba(16, 28, 21, 0.45);

  /* Type */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-sans: "Hanken Grotesk", system-ui, sans-serif;

  /* Spacing */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 44px; --space-8: 64px; --space-9: 72px;

  /* Sizes */
  --control-lg: 72px; --control-md: 44px; --control-sm: 40px;
  --content-max: 1120px; --reading-max: 640px;

  /* Radius: square system */
  --radius-0: 0;

  /* Shadow */
  --shadow-search: 0 1px 2px rgba(13,56,35,.06), 0 8px 24px rgba(13,56,35,.06);
  --shadow-pop: 0 1px 2px rgba(13,56,35,.06), 0 12px 32px rgba(13,56,35,.12);
  --shadow-tab: 0 1px 2px rgba(0,0,0,.1);
  --shadow-modal: 0 20px 50px rgba(0,0,0,.2);
}

/* Breakpoint: 600px (phone). Content is fluid up to 1120px. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font-sans); color: var(--ink-900); background: var(--surface-000); }
a { color: var(--green-900); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green-900); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-5); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > footer { margin-top: auto; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line-200); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.site-header img { display: block; width: 110px; height: 44px; }
.site-header nav { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.site-header nav a { color: var(--ink-700); text-decoration: none; }
.site-header nav a:hover { color: var(--green-900); text-decoration: underline; }
.find-nav { display: flex; align-items: center; gap: 0 !important; white-space: nowrap; }
.find-nav .find-label { color: var(--ink-500); font-size: 15px; font-weight: 500; margin-right: 2px; }
.find-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--green-900) !important; font-weight: 600; text-decoration: none; text-underline-offset: 4px; }
.find-nav a:hover, .find-nav a:focus-visible { text-decoration: underline; }
.find-nav .find-sep { width: 1px; height: 16px; background: var(--line-300); flex: none; }
.find-nav a:last-child { padding-right: 0; }

/* Hero */
.hero { background: var(--surface-050); border-bottom: 1px solid var(--line-200); padding: 64px 0 40px; }
.hero .wrap { display: flex; flex-direction: column; gap: 44px; }
.hero-text { max-width: 780px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.eyebrow { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink-500); }
h1, h2, h3 { font-family: var(--font-display); color: var(--green-900); margin: 0; }
h1 { font-size: clamp(42px, 6vw, 72px); line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.05; font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 26px; line-height: 1.15; font-weight: 700; }
.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-500); max-width: 640px; }

/* Search bar */
.search { display: flex; flex-direction: column; gap: 16px; }
.search-bar { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line-300); border: 1px solid var(--line-300); box-shadow: var(--shadow-search); position: relative; }
.search-bar.compact { box-shadow: none; }
.field { position: relative; background: #fff; display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: var(--control-lg); }
.compact .field { min-height: 60px; }
.field--where { flex: 3 1 280px; }
.field--distance { flex: 1 1 170px; }
.field--when { flex: 1 1 190px; }
.field > .icon { width: 22px; height: 22px; stroke: var(--green-900); stroke-width: 1.8; }
.field-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.field input, .field select { border: 0; padding: 0; background: transparent; font-size: 17px; color: var(--ink-900); min-width: 0; width: 100%; border-radius: 0; }
.field input:focus, .field select:focus { outline: none; }
.field:focus-within { outline: 2px solid var(--green-900); outline-offset: -2px; z-index: 1; }
.field select { appearance: none; padding-right: 20px; cursor: pointer; }
.field .chev { position: absolute; right: 16px; top: 50%; margin-top: 2px; width: 12px; height: 12px; stroke: var(--ink-700); pointer-events: none; }
.btn-locate { width: 40px; height: 40px; flex: none; border: 0; background: var(--green-050); color: var(--green-900); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-primary { border: 0; border-radius: 0; background: var(--green-900); color: #fff; font-weight: 700; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 24px; cursor: pointer; min-height: var(--control-md); }
.search-bar .btn-primary { flex: 1 1 170px; min-height: var(--control-lg); }
.compact .btn-primary { min-height: 60px; font-size: 17px; }
.btn-secondary { height: var(--control-md); padding: 0 18px; border: 1px solid var(--green-900); border-radius: 0; background: #fff; color: var(--green-900); font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-text { border: 0; background: none; padding: 10px 0; font-size: 14px; font-weight: 500; color: var(--ink-700); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-text:disabled { color: var(--ink-300); text-decoration: none; cursor: default; }
.btn-icon { width: 40px; height: 40px; border: 0; background: var(--green-050); color: var(--green-900); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }

/* Filters row */
.filters-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; }
.results-search .filters-row { justify-content: flex-start; }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.filters-summary { font-size: 14px; color: var(--ink-700); }
.chip { height: var(--control-md); padding: 0 14px; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer; border: 1px solid var(--line-300); background: #fff; color: var(--ink-700); }
.chip .icon { width: 15px; height: 15px; stroke-width: 2.6; display: none; }
.chip[aria-pressed="true"] { border-color: var(--green-900); background: var(--green-100); color: var(--green-900); font-weight: 600; }
.chip[aria-pressed="true"] .icon { display: block; }
.select-chip { position: relative; display: inline-flex; align-items: center; }
.select-chip select { appearance: none; height: var(--control-md); border: 1px solid var(--line-300); border-radius: 0; background: #fff; font-size: 15px; padding: 0 34px 0 36px; cursor: pointer; }
.select-chip > .icon:first-child { position: absolute; left: 12px; width: 16px; height: 16px; stroke: var(--green-900); stroke-width: 1.8; pointer-events: none; }
.select-chip .chev { position: absolute; right: 12px; width: 12px; height: 12px; stroke: var(--ink-700); pointer-events: none; }

/* Popovers: level filter, date picker, place list */
.popover-anchor { position: relative; }
.popover { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line-300); box-shadow: var(--shadow-pop); text-align: left; }
.levels-trigger { display: flex; align-items: center; gap: 8px; min-width: 168px; height: var(--control-md); padding: 0 12px; border: 1px solid var(--line-300); background: #fff; border-radius: 0; font-size: 15px; cursor: pointer; text-align: left; }
.levels-trigger .icon { width: 16px; height: 16px; }
.levels-trigger .icon:first-child { stroke: var(--green-900); stroke-width: 1.8; }
.levels-trigger .chev { width: 12px; height: 12px; stroke: var(--ink-700); transition: transform .15s; }
.levels-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.levels-trigger.is-filtered { border-color: var(--green-900); background: var(--green-100); color: var(--green-900); font-weight: 600; }
.levels-pop { top: 50px; left: 0; width: 300px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; }
.levels-list { max-height: 360px; overflow-y: auto; padding: 8px 0; }
.levels-list p { margin: 8px 16px 4px; font-size: 12px; font-weight: 600; color: var(--ink-500); }
.levels-list label { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 16px; font-size: 15px; cursor: pointer; }
.levels-list label:has(input:checked) { background: var(--green-050); color: var(--green-900); font-weight: 600; }
.levels-list input { width: 18px; height: 18px; margin: 0; accent-color: var(--green-900); }
.pop-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-200); padding: 10px 12px 10px 16px; }
.pop-footer .links { display: flex; gap: 16px; }
.pop-footer .btn-primary { min-height: 40px; height: 40px; font-size: 14px; padding: 0 20px; }

.datepicker { right: 0; top: calc(100% + 8px); width: 680px; max-width: calc(100vw - 32px); padding: 20px 24px 16px; display: flex; flex-direction: column; gap: 14px; }
.dp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.dp-title { display: block; text-align: center; font-size: 16px; font-weight: 700; line-height: 40px; margin-bottom: 4px; }
.dp-nav { position: absolute; top: 20px; width: 40px; height: 40px; border: 0; background: none; color: var(--green-900); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dp-nav:hover:not(:disabled) { background: var(--green-050); }
.dp-prev { left: 16px; } .dp-next { right: 16px; }
.dp-nav:disabled { color: var(--ink-300); cursor: default; }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px 0; }
.dp-grid .dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-500); padding: 4px 0 6px; }
.dp-day { height: 44px; border: 0; background: transparent; font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink-900); cursor: pointer; }
.dp-day:hover:not(:disabled):not(.edge):not(.in-range) { background: var(--green-050); box-shadow: inset 0 0 0 1px var(--green-900); }
.dp-day:disabled { color: var(--ink-300); cursor: default; }
.dp-day.today { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
/* Selected range: always solid green so it never reads as disabled. Ends are the darkest. */
.dp-day.in-range { background: var(--green-700); color: #fff; }
.dp-day.edge { background: var(--green-900); color: #fff; font-weight: 700; }
.dp-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line-200); padding-top: 14px; }
.dp-foot .btn-primary { flex: none; width: auto; min-height: 44px; height: 44px; font-size: 15px; padding: 0 32px; }
.dp-foot .btn-text:disabled { color: var(--ink-300); text-decoration: none; cursor: default; }
/* Phone: full-screen sheet */
.datepicker.is-sheet { position: fixed; inset: 0; top: 0; width: auto; max-width: none; z-index: 60; padding: 0; gap: 0; border: 0; box-shadow: none; }
.is-sheet .dp-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line-200); }
.is-sheet .dp-top h3 { font-size: 22px; }
.is-sheet .dp-dow { padding: 8px 16px 0; border-bottom: 1px solid var(--line-200); }
.is-sheet .dp-scroll { flex: 1; overflow-y: auto; padding: 0 16px 16px; overscroll-behavior: contain; }
.is-sheet .dp-month { padding-top: 16px; }
.is-sheet .dp-title { text-align: left; margin-bottom: 4px; }
.is-sheet .dp-day { height: 48px; font-size: 16px; }
.is-sheet .dp-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.btn-primary:disabled { background: var(--line-200); color: var(--ink-500); cursor: default; }

.places { top: calc(100% + 1px); left: -1px; right: -1px; padding: 6px 0; }
.places button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 16px; border: 0; border-top: 1px solid #EEF0EA; background: #fff; text-align: left; cursor: pointer; }
.places button:first-child { border-top: 0; min-height: 48px; color: var(--green-900); font-weight: 600; font-size: 15px; }
.places button:hover, .places button[aria-selected="true"] { background: var(--green-050); }
.places .icon { stroke: var(--ink-500); }
.places button:first-child .icon { stroke: var(--green-900); }
.places .name { font-size: 16px; color: var(--ink-900); }
.places .detail { display: block; font-size: 13px; color: var(--ink-500); }
.places .none { margin: 0; padding: 12px 16px; font-size: 14px; color: var(--ink-500); border-top: 1px solid #EEF0EA; }

/* Random fact link */
.fact-line { display: flex; justify-content: center; border-top: 1px solid #DCDFD5; padding-top: 20px; }
.fact-line button { border: 0; background: none; padding: 8px 12px; font-size: 15px; font-weight: 600; color: var(--green-900); cursor: pointer; display: flex; gap: 8px; align-items: center; }

/* Photo */
.photo img { display: block; width: 100%; height: clamp(240px, 42vw, 580px); object-fit: cover; object-position: 50% 60%; }
.photo figcaption { max-width: var(--content-max); margin: 0 auto; padding: 12px 24px 0; display: flex; justify-content: space-between; gap: 4px 24px; font-size: 13px; color: var(--ink-500); }
.photo figcaption a { color: var(--ink-500); }
.photo .sep { display: none; }

/* Pyramid */
.pyramid { padding: 72px 0; }
.pyramid .wrap { display: flex; flex-direction: column; gap: 28px; }
.pyramid-head { max-width: 680px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.pyramid-head p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-500); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-050); width: 100%; max-width: 360px; margin: 0 auto; }
.tabs button { flex: 1; min-height: var(--control-md); border: 0; background: transparent; color: var(--ink-700); font-weight: 600; font-size: 15px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--green-900); box-shadow: var(--shadow-tab); }
.pyramid-body { width: 100%; max-width: var(--reading-max); margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.bands { container-type: inline-size; }
.band { display: flex; align-items: center; justify-content: center; width: 100%; height: 30px; margin: 0 0 3px; border: 0; background: var(--green-900); color: #fff; font: 600 clamp(10px, 3.1cqw, 14px) var(--font-sans); cursor: pointer; white-space: nowrap; }
.band.is-open { background: var(--green-700); }
.pyr-search { position: relative; }
.pyr-search input { width: 100%; height: 48px; padding: 0 44px; border: 1px solid #CFD3CB; border-radius: 0; font-size: 16px; }
.pyr-search > .icon { position: absolute; left: 14px; top: 15px; stroke: var(--ink-500); }
.pyr-search button { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: none; font-size: 20px; color: var(--ink-700); cursor: pointer; }
.pyr-status { margin: 8px 0 0; min-height: 20px; font-size: 13px; color: var(--ink-700); }
.acc { border-top: 1px solid #E3E6DF; }
.acc-item { border-bottom: 1px solid #E3E6DF; }
.acc-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 2px; border: 0; background: none; text-align: left; font-weight: 600; font-size: 16px; cursor: pointer; }
.acc-row span { flex: 1; }
.acc-row .icon { width: 12px; height: 12px; stroke: var(--ink-500); transition: transform .2s; }
.acc-row[aria-expanded="true"] .icon { transform: rotate(180deg); }
.acc-body { padding: 0 2px 16px; }
.acc-body .explainer { margin: 0 0 10px; font-size: 15px; color: var(--ink-500); }
.acc-body h4 { margin: 14px 0 2px; font-size: 13px; color: var(--ink-700); }
.acc-div { border-top: 1px solid #E3E6DF; }
.acc-div .acc-row { min-height: 46px; padding-left: 12px; font-size: 15px; font-weight: 500; }
.clubs { list-style: none; margin: 4px 0 0; padding: 0 0 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 16px; }
.clubs li { font-size: 14px; }
.clubs button { display: block; width: 100%; border: 0; background: none; padding: 6px 0; text-align: left; font-size: 14px; color: var(--ink-900); cursor: pointer; }
.clubs button:hover { color: var(--green-900); text-decoration: underline; text-underline-offset: 3px; }
.clubs .tag-mini { font-size: 11px; color: var(--ink-500); margin-left: 4px; }

/* Results */
.results-search { background: var(--surface-050); border-bottom: 1px solid var(--line-200); padding: 24px 0 20px; }
.results-main { padding: 40px 0 72px; }
.results-main .wrap { display: flex; flex-direction: column; gap: 28px; }
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.results-head p { margin: 6px 0 0; color: var(--ink-500); }
.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-700); }
.sort .select-chip select { padding-left: 12px; font-weight: 500; }
.day-group { display: flex; flex-direction: column; gap: 10px; }
.day-group h2 { font-size: 22px; font-weight: 700; line-height: 1.15; }
.more { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.more p { margin: 0; font-size: 14px; color: var(--ink-500); max-width: 560px; }

/* Fixture card */
.fixture { position: relative; background: #fff; border: 1px solid var(--line-200); display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 18px 20px; }
.fx-time { flex: 0 0 88px; display: flex; flex-direction: column; gap: 2px; }
.fx-time strong { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fx-time span { font-size: 14px; color: var(--ink-500); }
.fx-teams { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; padding-right: 28px; }
.fx-team { display: flex; align-items: center; gap: 10px; font-weight: 600; line-height: 1.3; }
.fx-meta { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--ink-500); padding-right: 28px; }
.fx-comp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink-700); }
.fx-meta a.ground { display: flex; align-items: center; gap: 6px; color: var(--green-900); text-underline-offset: 2px; }
.fx-meta .icon { width: 15px; height: 15px; }
.fx-dist { display: flex; align-items: center; gap: 6px; }
.fx-source { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--ink-500); }
.fx-source .icon { width: 16px; height: 16px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-700); border: 1px solid var(--line-300); padding: 1px 6px; white-space: nowrap; }
.tag .icon { width: 12px; height: 12px; }
.tag--cup { border-color: var(--green-900); color: var(--green-900); background: var(--green-050); }
.fx-note { flex: 1 1 100%; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.45; padding: 8px 12px; margin-top: 2px; }
.fx-note .icon { width: 16px; height: 16px; margin-top: 2px; }
.fx-note--check { background: var(--warn-100); color: var(--warn-700); }
.fx-note--changed { background: var(--green-050); color: var(--green-900); }
.fixture.is-postponed .fx-time strong, .fixture.is-postponed .fx-team { color: var(--ink-500); }
.fixture.is-postponed .fx-time strong { text-decoration: line-through; }
.fx-status { font-size: 12px; font-weight: 700; color: #fff; background: var(--ink-700); padding: 2px 6px; align-self: flex-start; }
.old-time { text-decoration: line-through; color: var(--ink-500); font-weight: 500; font-size: 14px; }

/* Crest */
.crest { width: 32px; height: 32px; flex: none; object-fit: contain; }
.crest-fallback { width: 32px; height: 32px; flex: none; display: block; }
.crest-initials { width: 32px; height: 32px; flex: none; background: var(--surface-100); border: 1px solid var(--line-200); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink-500); }

/* Notices, empty, error, loading */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; font-size: 15px; line-height: 1.5; }
.notice .icon { margin-top: 2px; }
.notice--partial { background: var(--warn-100); color: var(--warn-700); }
.notice--error { background: #fff; border: 1px solid var(--line-300); color: var(--ink-900); }
.empty { border: 1px solid var(--line-200); padding: 48px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.empty .badge { width: 52px; height: 52px; background: var(--green-050); color: var(--green-900); display: flex; align-items: center; justify-content: center; }
.empty .badge .icon { width: 24px; height: 24px; }
.empty p { margin: 0; max-width: 520px; color: var(--ink-500); }
.fact-card { display: flex; gap: 16px; align-items: flex-start; text-align: left; max-width: 520px; margin-top: 20px; padding: 20px; background: var(--surface-050); }
.fact-card .die { width: 40px; height: 40px; padding: 6px; }
.fact-card .die i { width: 6px; height: 6px; }
.empty .fact-card p { color: var(--ink-900); }
.empty .fact-card .fact-card-label { font-size: 13px; font-weight: 600; color: var(--ink-500); margin-bottom: 4px; }
.fact-card-text { transition: opacity .15s, filter .15s; }
.fact-card-text.out { opacity: 0; filter: blur(4px); }
.fact-card .btn-text { padding: 8px 0 0; }
/* Club modal */
.club-head { display: flex; gap: 16px; align-items: flex-start; }
.club-head > .crest, .club-head > .crest-fallback, .club-head > .crest-initials { width: 56px; height: 56px; flex: none; }
.club-head > .crest-initials { font-size: 16px; }
.club-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--ink-700); }
.club-meta li { display: flex; gap: 10px; align-items: flex-start; }
.club-meta .icon { width: 18px; height: 18px; margin-top: 2px; stroke: var(--green-900); }
.club-fixtures h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.club-fixtures ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-200); }
.club-fixtures li { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-200); }
.club-fixtures li.is-postponed .cf-when { text-decoration: line-through; color: var(--ink-500); }
.cf-when { flex: 0 0 88px; display: flex; flex-direction: column; font-size: 14px; color: var(--ink-500); }
.cf-when b { color: var(--ink-900); font-weight: 600; }
.cf-opp { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.cf-opp small { display: block; font-size: 13px; color: var(--ink-500); }
.cf-opp > .crest, .cf-opp > .crest-fallback, .cf-opp > .crest-initials { width: 24px; height: 24px; flex: none; }
.club-fact { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--green-050); }
.club-fact .icon { flex: none; width: 20px; height: 20px; stroke: var(--green-900); margin-top: 2px; }
.club-fact p { font-size: 15px; line-height: 1.5; color: var(--ink-900); }
.skeleton { background: #fff; border: 1px solid var(--line-200); padding: 18px 20px; display: flex; gap: 24px; }
.skeleton i { display: block; background: linear-gradient(90deg, #F1F2EE 0, #E8EAE4 50%, #F1F2EE 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* Random fact: a bit of fun */
.fact-line button span { display: inline-block; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.fact-line button:hover span { transform: rotate(-20deg) scale(1.2); }
.is-fact .modal { animation: fact-in .55s cubic-bezier(.2,1.5,.4,1) both; }
.is-fact { animation: fade-in .2s ease-out both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fact-in { 0% { transform: translateY(120px) scale(.85) rotate(-3deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.fact-body { display: flex; gap: 20px; align-items: flex-start; }
.fact-body p { font-size: 18px; line-height: 1.5; color: var(--ink-900); }
.die-wrap { flex: none; display: block; padding-top: 2px; }
.die { width: 52px; height: 52px; padding: 8px; background: var(--green-900); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center; box-shadow: 3px 3px 0 var(--green-100); }
.die i { width: 8px; height: 8px; }
.die i.on { background: #fff; border-radius: 50%; }
.die-wrap.rolling { animation: tumble .56s cubic-bezier(.3,.7,.4,1) both; }
@keyframes tumble { 0% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-34px) rotate(200deg) scale(1.1); } 60% { transform: translateY(0) rotate(400deg); } 78% { transform: translateY(-10px) rotate(440deg); } 100% { transform: translateY(0) rotate(360deg); } }
.modal.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-2px) rotate(-.4deg); } 20%, 80% { transform: translateX(4px) rotate(.6deg); } 30%, 50%, 70% { transform: translateX(-7px) rotate(-.8deg); } 40%, 60% { transform: translateX(7px) rotate(.8deg); } }
#fact-text { transition: opacity .15s, filter .15s; }
#fact-text.out { opacity: 0; filter: blur(4px); }
#fact-text.drop { animation: drop .4s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
.modal.six { animation: six .7s ease-out both; }
@keyframes six { 0% { box-shadow: var(--shadow-modal), 0 0 0 0 rgba(47,122,82,.6); } 100% { box-shadow: var(--shadow-modal), 0 0 0 24px rgba(47,122,82,0); } }
.is-fact .modal-actions { justify-content: space-between; }
.fact-count { font-size: 14px; color: var(--ink-500); }
.is-fact .btn-secondary .icon { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) { .is-fact .modal, .is-fact, .die-wrap.rolling, .modal.shake, #fact-text.drop, .modal.six { animation: none; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } * { transition: none !important; } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-modal); }
.modal.narrow { max-width: 460px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal p { margin: 0; }
.modal .muted { color: var(--ink-500); }
.modal form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px; }
.form-row > * { flex: 1 1 200px; min-width: 0; }
.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-700); }
.form-field .opt { font-weight: 400; color: var(--ink-500); }
.form-field input, .form-field select, .form-field textarea { height: 44px; border: 1px solid var(--line-300); border-radius: 0; padding: 0 12px; font-size: 16px; font-weight: 400; color: var(--ink-900); background: #fff; width: 100%; }
.form-field textarea { height: auto; min-height: 112px; padding: 10px 12px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; border-top: 1px solid var(--line-200); padding-top: 18px; }
.modal-actions .btn-primary { font-size: 16px; min-height: 48px; padding: 0 28px; }

/* Footer */
.site-footer { background: var(--surface-050); border-top: 1px solid var(--line-200); padding: 48px 0 28px; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 32px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.footer-cols > :nth-child(1) { flex: 1 1 240px; display: flex; flex-direction: column; gap: 14px; }
.footer-cols > :nth-child(2) { flex: 1 1 180px; }
.footer-cols > :nth-child(3) { flex: 2 1 320px; display: flex; flex-direction: column; gap: 10px; }
.site-footer p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-500); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a, .site-footer ul button { color: var(--ink-900); text-decoration: none; font-size: 15px; font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; }
.site-footer ul a:hover, .site-footer ul button:hover { text-decoration: underline; }
.footer-legal { border-top: 1px solid #DCDFD5; padding-top: 18px; display: flex; gap: 8px; font-size: 13px; color: var(--ink-500); }
.footer-legal a { color: var(--ink-500); }

/* State gallery */
.gallery-section { padding: 40px 0; border-bottom: 1px solid var(--line-200); }
.gallery-section .wrap { display: flex; flex-direction: column; gap: 16px; }
.gallery-label { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-700); }

/* Phone */
@media (max-width: 600px) {
  .hero { padding-top: 48px; }
  .filters, .filters-row > .filters { flex: 1 1 100%; }
  .filters > * { flex: 1 1 auto; }
  .filters .levels-trigger { min-width: 0; }
  .filters > .popover-anchor { flex: 1 1 0; }
  .filters > .select-chip { flex: 0 0 auto; }
  .filters .select-chip select, .filters .levels-trigger { width: 100%; }
  .photo figcaption { display: block; }
  .photo figcaption > span { display: inline; }
  .photo .sep { display: inline; }
  .fixture { padding: 16px; }
}

/* ---------- Live-site additions (not in the prototype) ---------- */
.levels-list label.is-unavailable { color: var(--ink-500); cursor: default; }
.levels-list label.is-unavailable input { accent-color: var(--ink-300); }
.levels-list .soon { margin-left: auto; font-size: 12px; color: var(--ink-500); }
/* The prototype's .fx-time span rule turned the status tag's text grey on grey (2:1). */
.fx-time .fx-status { color: #fff; font-size: 12px; }
/* Team names on fixture cards open the club modal: a quiet link, a faint underline that darkens on hover and focus. */
.fx-club { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--line-300); }
.fx-club:hover, .fx-club:focus-visible { text-decoration: underline; text-decoration-color: currentColor; }
/* Forms: the bot trap stays off screen; a send failure shows above the buttons. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 4px 0 0; padding: 10px 12px; background: var(--warn-100); color: var(--warn-700); font-size: 14px; }
.form-error a { color: inherit; }
