@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/dm-serif-display-400-normal-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/dm-serif-display-400-normal-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/libre-franklin-400-800-normal-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/libre-franklin-400-800-normal-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Nappali kiadás (alapértelmezett) */
:root {
  --paper: #f3eee3;
  --ink: #171512;
  --soft: #5e574d;
  --red: #c4161c;
  --rule: #cfc6b6;
  --on-red: #f3eee3;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

/* Esti kiadás */
:root[data-theme="dark"] {
  --paper: #17150f;
  --ink: #ece5d6;
  --soft: #a39a8a;
  --red: #ff5b4f;
  --rule: #3b362d;
  --on-red: #17150f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.45 var(--sans);
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

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

.paper { max-width: 980px; margin: 0 auto; padding: 0 20px 40px; }

/* Fejléc (címlap) */
.meta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--soft);
}
.meta-date::first-letter { text-transform: uppercase; }

.theme-toggle {
  padding: 0; background: none; border: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--soft);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.theme-toggle:hover { color: var(--red); }
.theme-toggle .to-light, [data-theme="dark"] .theme-toggle .to-dark { display: none; }
[data-theme="dark"] .theme-toggle .to-light { display: inline; }

.title {
  margin: 0; padding: 6px 0 12px; text-align: center;
  font: 400 clamp(44px, 9vw, 96px)/1 var(--serif); letter-spacing: -.01em;
  border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.title a { text-decoration: none; }

.nav {
  display: flex; justify-content: center; gap: 26px;
  padding: 10px 0; border-bottom: 4px solid var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.nav a { text-decoration: none; color: var(--soft); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red); }

/* Kiemelt meccs */
.lead {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 28px; align-items: end;
  padding: 28px 0 26px; border-bottom: 1px solid var(--rule);
}
.lead[hidden] { display: none; }
.kicker { grid-column: 1 / -1; margin: 0; color: var(--red); font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lead h2 { margin: 0; font: 400 clamp(32px, 6vw, 58px)/1.04 var(--serif); }
.dek { grid-column: 1; margin: 4px 0 0; font-size: 18px; color: var(--soft); }
.dek b { color: var(--ink); font-weight: 700; }
.lead-time { grid-column: 2; grid-row: 2 / 4; font: 400 clamp(44px, 8vw, 84px)/1 var(--serif); color: var(--red); font-variant-numeric: lining-nums; }

/* Műsor */
.guide-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 34px 0 6px; }
.sec { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.show-ended {
  padding: 0; background: none; border: 0; cursor: pointer; white-space: nowrap;
  font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.show-ended:hover { color: var(--red); }
.show-ended[hidden], .empty[hidden] { display: none; }

.slot { display: grid; grid-template-columns: 112px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--rule); }
.slot-time { font: 400 40px/1 var(--serif); }
.slot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.match { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: baseline; }
.teams { font-weight: 700; font-size: 19px; line-height: 1.3; }
.comp { grid-column: 1; font: italic 400 16px/1.3 var(--serif); color: var(--soft); }
.comp .air { font: 600 13px/1 var(--sans); font-style: normal; color: var(--red); white-space: nowrap; }
.ch { grid-column: 2; grid-row: 1; text-align: right; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.on-air {
  grid-column: 2; grid-row: 2; justify-self: end;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--red);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.on-air::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  animation: pulse 1.4s ease-in-out infinite;
}
.on-air[hidden] { display: none; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .on-air::before { animation: none; } }

.match.is-ended { opacity: .42; }
body:not(.ended-open) .match.is-ended,
body:not(.ended-open) .slot.is-ended { display: none; }

/* Eredmények rovat */
.results { margin-top: 40px; }
.results[hidden] { display: none; }
.results .sec { padding-bottom: 8px; border-bottom: 4px solid var(--ink); }
.results ul { list-style: none; margin: 0; padding: 0; }
.result {
  display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.result .teams { font-size: 18px; }
.result .comp { grid-column: 1; }
.result .comp em { font-style: italic; }
.score { grid-column: 2; grid-row: 1 / 3; align-self: center; font: 400 34px/1 var(--serif); font-variant-numeric: lining-nums; white-space: nowrap; }

.empty { margin: 28px 0 0; padding: 28px 0; border-top: 1px solid var(--rule); font: 400 22px/1.35 var(--serif); }
.empty a { color: var(--red); white-space: nowrap; }

.foot { margin-top: 36px; padding-top: 12px; border-top: 4px solid var(--ink); font-size: 13px; color: var(--soft); }
.foot p { margin: 0 0 6px; }

@media (max-width: 640px) {
  .paper { padding: 0 16px 32px; }
  .meta-mid { display: none; }
  .title { font-size: 42px; padding: 8px 0 10px; }
  .lead { grid-template-columns: 1fr; padding: 22px 0 20px; }
  .lead-time { grid-column: 1; grid-row: auto; font-size: 44px; margin-top: 4px; }
  .dek { font-size: 16px; }
  .slot { grid-template-columns: 1fr; gap: 6px; }
  .slot-time { font-size: 30px; }
  .teams { font-size: 18px; }
  .guide-head { flex-wrap: wrap; }
}
