:root {
  --bg: #f5f0e7;
  --bg-soft: #fffaf0;
  --bg-tint: rgba(10, 79, 159, 0.08);
  --bg-gradient:
    radial-gradient(circle at top left, rgba(255, 200, 69, 0.22), transparent 32rem),
    linear-gradient(180deg, #f8f3ea 0%, #edf4fb 54%, #f5f0e7 100%);
  --header-bg: rgba(245, 240, 231, 0.86);
  --card-bg: rgba(255, 250, 240, 0.84);
  --ink: #102033;
  --ink-soft: #394b61;
  --muted: #65758a;
  --blue: #0a4f9f;
  --blue-dark: #092d63;
  --accent-ink: #fff;
  --amber: #ffc845;
  --line: rgba(16, 32, 51, 0.14);
  --shadow: 0 24px 70px rgba(9, 45, 99, 0.16);
  --shadow-soft: 0 18px 48px rgba(9, 45, 99, 0.12);
  --surface: var(--card-bg);
  --accent: var(--blue);
  --radius: 20px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c1320;
  --bg-soft: #141d2e;
  --bg-tint: rgba(255, 200, 69, 0.06);
  --bg-gradient:
    radial-gradient(circle at top left, rgba(255, 200, 69, 0.12), transparent 30rem),
    linear-gradient(180deg, #0c1320 0%, #0f1a2c 60%, #0c1320 100%);
  --header-bg: rgba(12, 19, 32, 0.86);
  --card-bg: rgba(20, 29, 46, 0.9);
  --ink: #f2f4f8;
  --ink-soft: #c9d2e0;
  --muted: #94a3b8;
  --blue: #8fb8ff;
  --blue-dark: #1d4f9c;
  --accent-ink: #fff;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1320;
    --bg-soft: #141d2e;
    --bg-tint: rgba(255, 200, 69, 0.06);
    --bg-gradient:
      radial-gradient(circle at top left, rgba(255, 200, 69, 0.12), transparent 30rem),
      linear-gradient(180deg, #0c1320 0%, #0f1a2c 60%, #0c1320 100%);
    --header-bg: rgba(12, 19, 32, 0.86);
    --card-bg: rgba(20, 29, 46, 0.9);
    --ink: #f2f4f8;
    --ink-soft: #c9d2e0;
    --muted: #94a3b8;
    --blue: #8fb8ff;
    --blue-dark: #1d4f9c;
    --accent-ink: #fff;
    --line: rgba(255, 255, 255, 0.14);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-gradient) var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.container-narrow {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 950;
  line-height: 0.92;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--blue-dark);
  color: var(--amber);
  box-shadow: inset 0 -4px 0 rgba(255, 200, 69, 0.22);
}

.brand-text {
  letter-spacing: -0.04em;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-weight: 800;
}

.site-nav a,
.text-link,
.site-footer a {
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.site-nav a[aria-current="page"] {
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.lang-switch a {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  background: var(--blue-dark);
  color: var(--accent-ink);
}

.lang-switch a:not([aria-current="true"]):hover,
.lang-switch a:not([aria-current="true"]):focus-visible {
  color: var(--ink);
}

.menu-toggle,
.theme-toggle,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--bg-soft);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: block;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--blue-dark);
  border-radius: 999px;
  background: var(--blue-dark);
  color: var(--accent-ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(9, 45, 99, 0.18);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-small {
  min-height: 40px;
  padding: 0 16px;
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.hero {
  padding: 72px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 42px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 5.2vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  overflow-wrap: break-word;
  hyphens: manual;
}

.hero-copy {
  min-width: 0;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.62rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.lead-card,
.article-card,
.match-card,
.cta-box,
.rubric-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.lead-card {
  position: relative;
  overflow: hidden;
}

.lead-media,
.card-media {
  display: block;
  overflow: hidden;
  background: var(--blue-dark);
}

.lead-media img,
.card-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 35%;
  transition: transform 0.35s ease;
}

.lead-card:hover .lead-media img,
.article-card:hover .card-media img {
  transform: scale(1.03);
}

.lead-media {
  border-bottom: 6px solid var(--amber);
}

.lead-card-body {
  padding: 28px;
}

.lead-card-body h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.08;
}

.lead-card-body h2 .card-link {
  text-decoration: none;
}

.lead-card-body h2 .card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.lead-card-body h2 .card-link:hover {
  text-decoration: underline;
}

.lead-excerpt {
  color: var(--ink-soft);
  font-size: 1rem;
}

.card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  align-items: baseline;
  margin-top: auto;
}

.card-source {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.card-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #102033;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section {
  padding: 74px 0;
}

.section-tint {
  background: var(--bg-tint);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.match-card,
.rubric-card {
  padding: 24px;
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.card-body h2,
.card-body h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.card-body p:not(.eyebrow) {
  margin-bottom: 16px;
}

.cards-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cards-grid-4 .card-body h3 {
  font-size: 1.12rem;
}

.section-head .lead {
  margin: 12px 0 0;
  font-size: 1.05rem;
}

.section-head > .text-link {
  flex-shrink: 0;
  white-space: nowrap;
}

.section-flush {
  padding-top: 24px;
}

.article-card:hover,
.rubric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.article-card .card-link {
  text-decoration: none;
}

.article-card .card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.article-card .card-link:focus-visible::after {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.article-card time,
.card-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.article-card p:not(.eyebrow),
.match-card p,
.about-copy,
.cta-box p,
.site-footer p,
.rubric-card p {
  color: var(--muted);
}

.rubric-card {
  box-shadow: none;
  text-decoration: none;
}

.rubric-card h3,
.rubric-card h2 {
  margin-bottom: 8px;
}

/* Topic cards use h2 for a correct outline but keep the card-heading size. */
.rubric-card h2 {
  font-size: clamp(1.25rem, 2vw, 1.62rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.rubric-card p {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.chip[aria-pressed="true"] {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--accent-ink);
}

.article-card[hidden] {
  display: none;
}

.empty-note {
  color: var(--muted);
}

.archive-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-bottom: 8px;
}

.archive-tools .chips {
  margin: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
  max-width: 420px;
  padding: 0 14px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

.search-box:focus-within {
  border-color: var(--blue);
  color: var(--blue);
}

.search-box svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
}

.search-input:focus {
  outline: none;
}

.search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-count {
  min-height: 1.4em;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.search-count:empty {
  margin-bottom: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.results-table th,
.results-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.results-table th {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-tint);
}

.results-table tr:last-child td {
  border-bottom: 0;
}

.results-table td a:not(.text-link) {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.results-table td a:not(.text-link):hover {
  color: var(--blue);
}

.results-table .is-upcoming td {
  color: var(--ink-soft);
}

.results-table sup {
  margin-left: 2px;
  color: var(--muted);
}

.table-note {
  margin: 12px 4px 0;
}

.rubric-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-card .card-meta {
  display: block;
  margin-top: 12px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 24px;
  margin: 0 0 28px;
  padding: 18px 22px;
  background: var(--bg-tint);
  border-radius: 16px;
}

.facts dt {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 4px 0 0;
  font-weight: 600;
}

.player-head .facts-wide {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 26px 0 0;
  border: 1px solid var(--line);
}

@media (max-width: 600px) {
  .player-head .facts-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 14px 16px;
  }
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.scoreline {
  display: grid;
  /* minmax(0, …): a long club name must shrink and wrap, not run under the score */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 26px 0;
  font-weight: 950;
  text-align: center;
}

.scoreline strong {
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--blue-dark);
  color: var(--amber);
  font-size: 2rem;
}

.match-grid-wide {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}

.match-list {
  display: grid;
  gap: 18px;
}

picture {
  display: contents;
}

/* With `display: contents` the <source> elements would become grid/flex
   items of their own (an empty first cell that pushes the text to the next
   row — seen in the author block). They render nothing anyway. */
picture > source {
  display: none;
}

.topics-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  background: var(--card-bg);
}

.tag:hover {
  border-color: var(--blue);
}

.tag-count {
  font-weight: 500;
  color: var(--muted);
}

.standings-summary {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
}

.form-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.form-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.form-w {
  background: #1f9d55;
}

.form-d {
  background: #8a8f98;
}

.form-l {
  background: #d64545;
}

.standings-table td:not(:nth-child(2)),
.standings-table th:not(:nth-child(2)) {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}

.standings-table tr.is-baltika td {
  background: var(--bg-tint);
  font-weight: 600;
}

.countdown {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.match-card-wide .scoreline {
  max-width: 520px;
  margin: 22px 0;
  text-align: left;
}

.match-card-wide .scoreline strong {
  font-size: 1.6rem;
}

.match-card .eyebrow + .scoreline {
  margin-top: 16px;
}

.takeaways {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
  counter-reset: takeaway;
  color: var(--ink-soft);
  display: grid;
  gap: 10px;
}

.takeaways li {
  position: relative;
  padding-left: 40px;
  counter-increment: takeaway;
}

.takeaways li::before {
  content: counter(takeaway);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue-dark);
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 28px;
  text-align: center;
}

.article-match .takeaways {
  margin: 18px 0 8px;
  text-align: left;
}

.article-match .eyebrow {
  margin: 18px 0 10px;
}

.author {
  padding-top: 0;
}

.author-box {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--card-bg);
}

.author-photo,
.author-mark {
  width: 160px;
  height: 160px;
  border-radius: 40px;
  object-fit: cover;
}

.author-mark {
  display: grid;
  place-items: center;
  background: var(--blue-dark);
  color: var(--amber);
  font-size: 2.2rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.author-box h2 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.author-box p:not(.eyebrow) {
  max-width: 62ch;
  color: var(--ink-soft);
}

.author-box .hero-actions {
  margin-top: 18px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: 48px;
}

.about-copy {
  font-size: 1.12rem;
}

.cta {
  padding: 20px 0 82px;
}

.cta-box {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 200, 69, 0.42), transparent),
    var(--card-bg);
}

.page-head {
  padding: 64px 0 24px;
}

.page-head h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.page-head .lead {
  margin-bottom: 0;
}

.article {
  padding: 56px 0 72px;
}

.article-head {
  margin-bottom: 36px;
}

.article-head h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: -0.06em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-weight: 700;
}

.article-body {
  font-size: 1.14rem;
  color: var(--ink-soft);
}

.article-body p {
  margin-bottom: 1.35em;
}

.article-body h2 {
  margin: 2em 0 0.7em;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.article-body blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  border-left: 6px solid var(--amber);
  border-radius: 0 20px 20px 0;
  background: var(--card-bg);
  color: var(--ink);
  font-weight: 700;
}

.article-body strong {
  color: var(--ink);
}

.article-body a {
  color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.article-body figure {
  margin: 2em 0;
}

.article-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.article-body figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-note {
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-body .eyebrow {
  margin-bottom: 14px;
}

.article-figure {
  margin: 0 0 32px;
}

.article-cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.article-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.article-match {
  margin: 0 0 32px;
  padding: 8px 24px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card-bg);
  text-align: center;
}

.article-match .scoreline {
  margin: 18px 0 10px;
}

.article-match .card-meta {
  margin: 0;
}

.source-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 200, 69, 0.3), transparent),
    var(--card-bg);
}

.source-box p {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-weight: 700;
}

.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.article-footer a {
  flex: 1 1 240px;
  max-width: 48%;
}

.article-footer .align-end {
  text-align: right;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.related {
  padding-top: 0;
}

.footer-note {
  max-width: 52ch;
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  background: var(--header-bg);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 860px) {
  .topbar {
    display: none;
  }

  .nav-wrap {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .header-actions {
    justify-self: end;
  }

  .header-actions .button-small {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    order: 3;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0 6px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-grid,
  .about-grid,
  .match-grid,
  .match-grid-wide {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .cards-grid-4,
  .rubric-grid,
  .rubric-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-box {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
  }

  .author-photo,
  .author-mark {
    width: 120px;
    height: 120px;
    border-radius: 30px;
  }
}

@media (max-width: 620px) {
  .container,
  .container-narrow {
    width: min(100% - 22px, 1120px);
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: clamp(2.2rem, 11.5vw, 3.2rem);
  }

  .page-head h1,
  .article-head h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .cards-grid,
  .cards-grid-2,
  .cards-grid-4,
  .rubric-grid,
  .rubric-grid-3,
  .scoreline,
  .author-box {
    grid-template-columns: 1fr;
  }

  .results-table th,
  .results-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .match-card-wide .scoreline {
    text-align: center;
  }

  .header-actions {
    gap: 6px;
  }

  .lang-switch a {
    padding: 7px 9px;
  }

  .article-footer a {
    max-width: none;
  }

  .article-footer .align-end {
    text-align: left;
  }

  .source-box {
    padding: 20px;
  }

  .source-box .button {
    width: 100%;
  }

  .section-head,
  .cta-box,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .lead-card-body,
  .cta-box {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .article-card,
  .rubric-card,
  .button {
    transition: none;
  }
}

/* Telegram mirror */
.tg-channel { display: grid; gap: 14px; margin-bottom: 28px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tg-channel p { margin: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tg-about { color: var(--muted); line-height: 1.55; }
.tg-feed { display: grid; gap: 18px; max-width: 760px; }
.tg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tg-post { display: grid; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.tg-post:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.tg-head, .tg-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.tg-date { color: var(--muted); text-decoration: none; font-weight: 600; }
.tg-date:hover { color: var(--accent); }
.tg-text { line-height: 1.6; white-space: normal; }
.tg-text a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.tg-text blockquote { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.tg-text code, .tg-text pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.tg-text pre { padding: 10px 12px; overflow-x: auto; }
.spoiler { background: var(--muted); color: transparent; border-radius: 3px; transition: color .15s, background .15s; }
.spoiler:hover, .spoiler:focus { background: transparent; color: inherit; }
.tg-photos { display: grid; gap: 4px; border-radius: 10px; overflow: hidden; position: relative; }
.tg-photos a { display: block; margin: 0; }
.tg-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tg-photos-1 img { height: auto; max-height: 640px; object-fit: contain; background: var(--bg); }
.tg-photos-2, .tg-photos-4 { grid-template-columns: 1fr 1fr; }
.tg-photos-3 { grid-template-columns: 1fr 1fr; }
.tg-photos-3 a:first-child { grid-column: 1 / -1; }
.tg-photos-2 img, .tg-photos-3 a:not(:first-child) img, .tg-photos-4 img { aspect-ratio: 4 / 3; }
.tg-post-compact .tg-photos img { aspect-ratio: 16 / 10; }
.tg-more { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; }
.tg-video { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--bg); text-decoration: none; min-height: 72px; }
.tg-video img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.tg-play { position: absolute; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; font-size: .85rem; font-weight: 600; }
.tg-video:not(:has(img)) .tg-play { position: static; display: inline-block; margin: 14px; }
.tg-preview { display: grid; gap: 4px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 8px; text-decoration: none; color: inherit; }
.tg-preview:hover strong { color: var(--accent); }
.tg-preview-desc { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.tg-unsupported { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: .92rem; }
.tg-reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-reaction { padding: 2px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .85rem; }
.tg-post-compact { align-content: start; }
@media (max-width: 900px) { .tg-grid { grid-template-columns: 1fr; } }

/* Club crests */
.crest { display: inline-block; width: 24px; height: 24px; object-fit: contain; vertical-align: middle; flex: none; }
.team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.scoreline .team { justify-content: center; max-width: 100%; }
.scoreline .team > span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.scoreline .team .crest { width: 32px; height: 32px; }
.match-card-wide .scoreline .team:first-child { justify-content: flex-start; }
.match-card-wide .scoreline .team:last-child { justify-content: flex-end; flex-direction: row-reverse; }
.standings-table .crest { width: 22px; height: 22px; }
.match-link .crest { width: 20px; height: 20px; margin-right: 6px; }
@media (max-width: 700px) { .match-card-wide .scoreline .team:last-child { flex-direction: row; justify-content: center; } .match-card-wide .scoreline .team:first-child { justify-content: center; } }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 14px; font-size: .88rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs li[aria-current] { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* Opponents */
.opp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.opp-card { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: inherit; }
.opp-card:hover { border-color: var(--accent); }
.opp-card .crest { grid-row: 1 / 3; width: 40px; height: 40px; }
.opp-name { font-weight: 800; }
.opp-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.opp-meta .form-chip { width: 20px; height: 20px; font-size: .7rem; }
.opp-h1 { display: flex; align-items: center; gap: 16px; }
.opp-h1 .crest { width: 56px; height: 56px; }
.opp-matches { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* Points chart */
.chart { margin: 0; padding: 16px 12px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.chart svg { display: block; width: 100%; height: auto; font-family: inherit; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 11px; }
.chart-pace { stroke-width: 1.5; stroke-dasharray: 5 5; fill: none; }
.chart-pace-0 { stroke: #b58a00; }
.chart-pace-1 { stroke: #c0392b; }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { stroke: var(--surface); stroke-width: 2; }
.chart-dot.form-w { fill: #1f9d55; }
.chart-dot.form-d { fill: #b58a00; }
.chart-dot.form-l { fill: #c0392b; }
.chart a:focus .chart-dot, .chart a:hover .chart-dot { r: 7; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: .85rem; color: var(--muted); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-swatch { display: inline-block; width: 18px; height: 0; border-top: 2px dashed currentColor; }
.chart-swatch.chart-pace-0 { color: #b58a00; border-color: #b58a00; }
.chart-swatch.chart-pace-1 { color: #c0392b; border-color: #c0392b; }
.chart-swatch-line { border-top: 3px solid var(--blue); }
@media (max-width: 700px) { .opp-matches { grid-template-columns: 1fr; } .chart-tick { font-size: 13px; } }

/* Season timeline: one dot per round, horizontal scroll. Colours follow the
   form chips; baltic.css re-tints them. */
.timeline {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  outline-offset: 4px;
}

.tl-track {
  position: relative;
  display: flex;
  margin: 0;
  padding: 34px 12px 8px;
  list-style: none;
  min-width: max-content;
}

.tl-track::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 58px;
  height: 2px;
  background: var(--line);
}

.tl-item {
  position: relative;
  flex: 0 0 96px;
  scroll-snap-align: center;
}

.tl-item a {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0 4px 6px;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
}

.tl-item a:hover .tl-opp,
.tl-item a:focus-visible .tl-opp {
  text-decoration: underline;
}

.tl-pts {
  position: absolute;
  top: -26px;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--blue);
}

.tl-dot {
  width: 14px;
  height: 14px;
  margin-top: 17px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: transparent;
  box-sizing: border-box;
}

.tl-w .tl-dot { background: #1f9d55; border-color: #1f9d55; }
.tl-d .tl-dot { background: #8a8f98; border-color: #8a8f98; }
.tl-l .tl-dot { background: #d64545; border-color: #d64545; }
.tl-future .tl-dot { border-color: var(--muted); }
.is-current .tl-dot { border-color: var(--amber); box-shadow: 0 0 0 5px rgba(255, 200, 69, 0.28); }

.tl-round {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tl-opp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 92px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.tl-opp .crest { width: 18px; height: 18px; flex: none; }
.tl-opp small { font-size: 0.68rem; font-weight: 800; color: var(--muted); }

.tl-score {
  font-size: 0.95rem;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.tl-date {
  font-size: 0.72rem;
  color: var(--muted);
}

.tl-tbc {
  color: var(--amber);
  text-decoration: none;
  font-weight: 900;
}

@media (max-width: 600px) {
  .tl-item { flex-basis: 84px; }
}

/* Reading progress (app.js adds the element on long articles) */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 3px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Lazy images: fade in after decode (class set by app.js) */
img.fade-in {
  opacity: 0;
  transition: opacity 0.35s ease;
}

img.fade-in.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  img.fade-in { opacity: 1; transition: none; }
}

/* Squad (official roster) */
.squad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.squad-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.squad-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent);
}

.squad-photo {
  position: relative;
  display: block;
  aspect-ratio: 7 / 8;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(10, 79, 159, 0.22), transparent 70%),
    var(--bg-tint);
  overflow: hidden;
}

.squad-photo img,
.squad-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

.squad-photo img {
  object-fit: contain;
  object-position: 50% 100%;
}

.squad-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 4rem;
  font-weight: 800;
  color: var(--muted);
  opacity: 0.5;
}

.squad-num {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: var(--blue);
  font-variant-numeric: tabular-nums lining-nums;
  text-shadow: 0 1px 0 var(--bg-soft);
}

.squad-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
}

.squad-body .eyebrow {
  margin: 0;
}

.squad-body h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.squad-body h3 a {
  color: inherit;
  text-decoration: none;
}

.squad-body h3 a:hover {
  color: var(--blue);
}

.squad-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.squad-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 8px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums lining-nums;
}

.squad-stats div {
  text-align: center;
}

.squad-stats dt {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.squad-stats dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.squad-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: auto 0 0;
  padding-top: 10px;
  font-size: 0.88rem;
}

.squad-official {
  color: var(--muted);
}

@media (max-width: 980px) {
  .squad-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .squad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .squad-body {
    padding: 12px 14px 14px;
  }

  .squad-body h3 {
    font-size: 1.02rem;
  }

  .squad-num {
    font-size: 1.5rem;
    top: 8px;
    left: 10px;
  }

  .squad-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
  }

  .squad-stats dt {
    font-size: 0.6rem;
    letter-spacing: 0.03em;
  }

  .squad-body .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }
}

/* Official photo on the player page */
.player-head-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 0 40px;
  align-items: end;
}

.player-head-photo .breadcrumbs {
  grid-column: 1 / -1;
}

.player-photo {
  margin: 0;
  text-align: center;
}

.player-photo img,
.player-photo picture {
  display: block;
  width: 100%;
  height: auto;
}

.player-photo img {
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(10, 79, 159, 0.22), transparent 70%),
    var(--bg-tint);
}

.player-photo figcaption {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .player-head-photo {
    grid-template-columns: 1fr;
  }

  .player-head-photo {
    gap: 18px 0;
  }

  .player-head-photo .player-head-text {
    order: 1;
  }

  .player-photo {
    max-width: 200px;
  }
}
