@font-face {
  font-family: "Caveat";
  src: url("caveat-cyrillic.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Caveat";
  src: url("caveat-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

@font-face {
  font-family: "Russo One";
  src: url("russoone-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Russo One";
  src: url("russoone-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 4px 12px;
}

.skip-to-content {
  position: absolute;
  inset: 8px auto auto 8px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--sheet);
}
.skip-to-content:not(:focus) { clip-path: inset(50%); }

.theme-picker:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sheet);
  font-size: .8rem;
}

.theme-picker select {
  width: auto;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #a8b0ac;
  background: var(--navy);
  color: var(--sheet);
}
.theme-picker select:hover { border-color: #f5d3a2; }
.theme-picker select, .site-menu > summary { touch-action: manipulation; }

@media (max-width: 600px) {
  .theme-picker:not([hidden]) { font-size: 0; }
  .theme-picker select { font-size: .8rem; }
}

:root[data-theme="football"] {
  --paper: #eaf1e6;
  --sheet: #fcfff8;
  --navy: #153d2d;
  --ink: #182f23;
  --muted: #435c4c;
  --line: #b9ceba;
  --rule: #64826a;
  --accent: #22633e;
  --accent-deep: #15462b;
  --accent-wash: #dcead3;
  --success: #225939;
  --success-wash: #d6e9d7;
  --theme-radius: 16px;
  --theme-table: #dcead3;
}

:root[data-theme="kurilka"] {
  --paper: #f9e7d7;
  background: #241b20;
  --sheet: #fff3e1;
  --navy: #3c1723;
  --ink: #2e2027;
  --muted: #684451;
  --line: #d5b4aa;
  --rule: #916475;
  --accent: #96374c;
  --accent-deep: #74263c;
  --accent-wash: #f5daca;
  --theme-radius: 5px;
  --theme-table: #f6dfca;
}

:root:is([data-theme="football"], [data-theme="kurilka"]) {
  /* Keep light work surfaces for existing status colors and league row highlights. */
  --theme-panel: var(--sheet);
}

:is([data-theme="football"], [data-theme="kurilka"]) .shell {
  min-height: calc(100vh - 76px);
  background: var(--theme-panel);
}

:is([data-theme="football"], [data-theme="kurilka"]) :is(.card, .home-module, .tournament-tile, .fixture-round-heading, .table-scroll, .fixture strong) {
  border-radius: var(--theme-radius);
}

:is([data-theme="football"], [data-theme="kurilka"]) main :is(button, input, select, textarea, a.inline) {
  border-radius: var(--theme-radius);
}

:is([data-theme="football"], [data-theme="kurilka"]) :is(th, input[readonly]:not([type="hidden"])) {
  background: var(--theme-table);
}

[data-theme="football"] :is(.masthead, .home-intro) {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 26%);
  align-items: stretch;
  border: 0;
  border-radius: 20px;
  background: var(--navy);
  color: var(--sheet);
}

[data-theme="football"] .masthead-content { padding: clamp(18px, 4vw, 42px); }
[data-theme="football"] :is(.masthead, .home-intro) :is(h1, .eyebrow, p, small, a, .masthead-meta span) { color: inherit; }
[data-theme="football"] .home-intro-copy > p:last-child { color: var(--sheet); }
[data-theme="football"] .masthead-art { display: none; }

[data-theme="football"] .sport-marks {
  display: block;
  grid-area: 1 / 2;
  place-self: center;
  width: calc(100% - 12px);
  max-width: 240px;
  margin-inline-end: 12px;
  pointer-events: none;
}

[data-theme="kurilka"] .top { border-color: #d8a46a; }
[data-theme="kurilka"] :is(.masthead, .home-intro) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 24%);
  border-block: 1px solid #d8a46a;
  background: var(--navy);
  color: var(--sheet);
}
[data-theme="kurilka"] .masthead-content { padding: clamp(16px, 4vw, 40px); }
[data-theme="kurilka"] :is(.masthead, .home-intro) :is(h1, p, small, a, .masthead-meta span) { color: inherit; }
[data-theme="kurilka"] .home-intro-copy > p:last-child { color: var(--sheet); }
[data-theme="kurilka"] :is(.masthead, .home-intro) .eyebrow { color: #ffd298; }
[data-theme="kurilka"] .masthead-art {
  display: grid;
  grid-area: 1 / 2;
  place-items: center;
  padding: 10px;
  border: 0;
  background: transparent;
}
[data-theme="kurilka"] .masthead-crest { max-width: 116px; border: 2px solid #d8a46a; }
[data-theme="kurilka"] .brand-mark { border: 1px solid #d8a46a; }
[data-theme="kurilka"] .home-module { border-inline-start: 5px solid var(--accent); }
.sport-marks, .theme-crest { display: none; }
[data-theme="kurilka"] :is(.masthead, .home-intro) .theme-crest { display: grid; }
:is([data-theme="football"], [data-theme="kurilka"]) .masthead :focus-visible { outline-color: #ffd298; }

.home-intro-copy { display: contents; }
:is([data-theme="football"], [data-theme="kurilka"]) .home-intro-copy {
  display: block;
  padding: clamp(16px, 3vw, 32px);
}
:is([data-theme="football"], [data-theme="kurilka"]) .home-intro { margin: 0; align-self: start; }
[data-theme="football"] .home-intro { grid-template-columns: minmax(0, 1fr) minmax(72px, 26%); }
[data-theme="kurilka"] .home-intro { grid-template-columns: minmax(0, 1fr) minmax(72px, 24%); }
[data-theme="kurilka"] .home-intro .masthead-crest { width: 100%; height: auto; }

/* Shared reading rhythm on the home screen, league pages and admin forms. */
:is([data-theme="football"], [data-theme="kurilka"]) .masthead .masthead-meta {
  color: var(--sheet);
}
.theme-picker select { max-inline-size: 100%; }
.fixture-actions :is(.match-disclosure, .inline) { min-height: 44px; }
.viewer-scroll { overscroll-behavior: contain; }

/* Stadium programme: one scoreboard above the content, individual fixture strips. */
[data-theme="football"] .home-dashboard { grid-template-columns: minmax(0, 1fr); gap: 16px; }
[data-theme="football"] .home-intro { grid-template-columns: minmax(0, 1fr) minmax(86px, 34%); }
[data-theme="football"] .home-module {
  min-height: 92px;
  background: var(--accent-wash);
  border: 1px solid var(--rule);
}
[data-theme="football"] .home-module:is(:hover, :focus-visible) { background: var(--theme-table); border-color: var(--accent); }
[data-theme="football"] .sections {
  gap: 4px;
  margin-block-start: 12px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
[data-theme="football"] .sections a { padding-inline: 10px; border: 0; border-radius: 8px; }
[data-theme="football"] .sections a[aria-current] { background: var(--navy); color: var(--sheet); }
[data-theme="football"] .fixture-round-heading { border-inline-start: 5px solid #d4ec8b; }
[data-theme="football"] .fixture-round .fixture-match {
  margin-block-start: 6px;
  background: var(--paper);
  border-radius: 10px;
}
[data-theme="football"] .fixture strong { border-radius: 5px; }
[data-theme="football"] .tournament-tile { background: var(--paper); border-top-width: 1px; }
[data-theme="football"] .tournament-tile:is(:hover, :focus-visible) { background: var(--accent-wash); }

/* Club edition: crest in a ruled column, ticket edges, flat match ledger. */
[data-theme="kurilka"] { --club-gold: #d8a46a; }
[data-theme="kurilka"] :is(.masthead, .home-intro) {
  border-block: 3px double var(--club-gold);
  grid-template-columns: minmax(0, 1fr) minmax(85px, 25%);
}
[data-theme="kurilka"] .masthead-art { border-inline-start: 1px solid var(--club-gold); }
[data-theme="kurilka"] .home-module,
[data-theme="kurilka"] .tournament-tile { border-inline-start: 4px double var(--accent); }
[data-theme="kurilka"] .sections { column-gap: 0; border-block: 1px solid var(--line); }
[data-theme="kurilka"] .sections a { padding-inline: 10px; }
[data-theme="kurilka"] .sections a[aria-current] { background: var(--accent-wash); }
[data-theme="kurilka"] .fixture-round-heading {
  background: var(--paper);
  color: var(--ink);
  border-block: 1px solid var(--rule);
}
[data-theme="kurilka"] .fixture-round-heading h2 { color: var(--navy); }
[data-theme="kurilka"] .fixture-round-timing { color: var(--muted); }
[data-theme="kurilka"] .fixture strong { border-block: 3px double var(--club-gold); }
[data-theme="kurilka"] .card { border-top: 3px double var(--rule); }

@media (max-width: 520px) {
  .header-tools { gap: 4px; margin-inline-start: auto; }
  .theme-picker:not([hidden]) { gap: 0; }
  .theme-picker select { padding-inline: 4px; }
  [data-theme="football"] .masthead-feature .masthead-content,
  [data-theme="kurilka"] .masthead-feature .masthead-content { padding-inline-start: 16px; }
  .tournament-heading .sport-marks,
  [data-theme="kurilka"] .tournament-heading .masthead .theme-crest { display: none; }
  :is([data-theme="football"], [data-theme="kurilka"]) .tournament-heading .masthead { grid-template-columns: minmax(0, 1fr); }
}
:root[data-theme="football"] {
  --body: "Country Flag Emoji", "Trebuchet MS", "Golos Text", Arial, sans-serif;
  --theme-heading: "Caveat", "Golos Text", cursive;
}

:root[data-theme="kurilka"] {
  --theme-heading: "Russo One", "Golos Text", sans-serif;
}

[data-theme="football"] :is(.masthead, .home-intro) h1 {
  font: 700 clamp(2.5rem, 5vw, 4.25rem)/1.05 var(--theme-heading);
}

[data-theme="football"] main h2 {
  font-family: var(--theme-heading);
  font-size: clamp(1.625rem, 2.4vw, 2.125rem);
  font-weight: 700;
}

[data-theme="football"] .home-module-copy h2 { text-transform: none; }

[data-theme="kurilka"] :is(.masthead, .home-intro) h1 {
  font: 400 clamp(1.625rem, 3.7vw, 3.125rem)/1.08 var(--theme-heading);
  letter-spacing: -.015em;
}

[data-theme="kurilka"] :is(main h2, .brand > span) {
  font-family: var(--theme-heading);
  font-weight: 400;
}
