:root {
  --bg:      #000000;
  --surface: #0d0d0d;
  --border:  #2a2a2a;
  --rule:    #555555;
  --text:    #e2e2dc;
  --dashes:  #77717a;
  --muted:   #8b858e;
  --show:    #a59fa9;
  --link:    #a8a2ab;
  --quiet:   #b9b3bc;
  --accent:  #d6a11e;
  --dash-run: "------------------------------------------------------------------------------------------------------------------------";
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: verdana, "DejaVu Sans", helvetica, arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  padding: 40px 16px 64px;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; }

/* ── Page header ── */
.site-header, main, .site-footer {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.birthday {
  flex: 1 1 240px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
}
.birthday-listen {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--quiet);
  padding-bottom: 10px;
  border-bottom: 1px solid #333333;
}
.birthday-years {
  font-size: 40px;
  font-weight: bold;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.birthday-note {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--link);
}
.logo {
  display: block;
  max-width: 100%;
  height: auto;
}
.crosshair {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.crosshair-ring { fill: none; stroke: var(--text); stroke-width: 1.5; }
.crosshair-part { fill: var(--accent); }
.crosshair-lines { fill: none; stroke: var(--text); stroke-width: 1; }
.crosshair-years {
  font-size: 10px;
  letter-spacing: 0.55em;
  color: var(--link);
  white-space: nowrap;
}
.crosshair-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── Week title ── */
.week-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  margin-left: 10px;
  padding: 18px 0 32px 32px;
  border-left: 1px solid var(--rule);
}
.week-title {
  outline: none;
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
}
.week-number {
  font-size: 18px;
  letter-spacing: 0.04em;
}
.week-nav {
  display: flex;
  gap: 22px;
  font-size: 11px;
  letter-spacing: 0.3em;
}
.week-nav span { color: var(--dashes); }
.week-note {
  margin: -16px 0 24px 44px;
  font-size: 11px;
  color: var(--link);
}

/* ── Day ── */
.day { margin: 0 0 28px 44px; }
.day-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding-left: 122px;
  background: url(img/musorfk.gif) no-repeat left bottom;
}
.day-silent .reel { opacity: 0.45; }
.reel { display: block; flex: none; }
.day-title {
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
}
.day-body {
  padding: 6px 0 4px 63px;
  background: url(img/musorok.gif) repeat-y left top;
}
.day-foot {
  height: 26px;
  background: url(img/musorkl.gif) no-repeat left top;
}
.recording + .recording { margin-top: 16px; }

/* ── Audio ── */
.recording-links { margin: 2px 0 12px; font-size: 11px; }
.recording-links a { color: var(--accent); }
.recording-links a + a { margin-left: 18px; }
.prog-download { color: var(--accent); flex: none; margin-left: 8px; }
.no-audio {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── Program list ── */
.programs {
  list-style: none;
  max-width: 560px;
}
.programs li { margin-bottom: 8px; }
.prog-line {
  display: flex;
  align-items: baseline;
  color: var(--dashes);
  overflow: hidden;
  white-space: nowrap;
}
.prog-line::before { content: "-"; }
.prog-rule {
  flex: 1 1 0;
  min-width: 12px;
  overflow: hidden;
}
.prog-rule::before { content: var(--dash-run); }
.prog-time {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.prog-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 8px;
}
.prog-play {
  flex: none;
  width: 18px;
  text-align: center;
  font-size: 10px;
  color: var(--accent);
}
.prog-play:hover {
  color: var(--text);
  text-decoration: none;
}
.prog-silent { color: var(--dashes); font-size: 12px; }
.prog-title {
  font-size: 11px;
  font-weight: bold;
  color: var(--show);
  min-width: 0;
  overflow-wrap: anywhere;
}
.prog-episode { color: var(--show); }

.prog-text { margin: 2px 0 0 34px; }
.recording > .prog-text { margin: 0 0 14px; }
.prog-text summary {
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
}
.prog-text summary::-webkit-details-marker { display: none; }
.prog-text summary::before { content: "-[+]- "; white-space: pre; }
.prog-text[open] summary::before { content: "-[–]- "; }
.prog-text summary:hover { color: var(--text); }
.prog-text p {
  margin: 6px 0;
  padding-left: 12px;
  border-left: 1px solid #3a3a3a;
  font-size: 11px;
  line-height: 1.6;
  color: var(--quiet);
  overflow-wrap: anywhere;
}

/* The row that the bar is playing. */
.is-current .prog-title, .is-current .prog-episode { color: var(--accent); }
.is-current .prog-title::after {
  content: "most szól";
  margin-left: 8px;
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 0.2em;
}

/* ── Archive index ── */
.index-page .site-header, .index-page main, .index-page .site-footer { max-width: 900px; }
.index-page .birthday { max-width: 360px; flex-basis: 260px; padding: 20px 22px 18px; }
.totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
}
.totals div { display: flex; align-items: baseline; gap: 6px; }
.totals dt { order: 2; font-size: 11px; color: var(--link); }
.totals dd { font-weight: bold; font-variant-numeric: tabular-nums; }
.index-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 11px;
  letter-spacing: 0.3em;
}
.year { scroll-margin-top: 16px; }
.year-number { font-size: 15px; }
.year .day-body { padding: 10px 0 8px 40px; }
.weeks li { min-width: 0; }
.weeks {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 6px;
}
.wk {
  display: flex;
  flex-direction: column;
  gap: 1px;
  height: 100%;
  min-height: 58px;
  padding: 8px 10px 9px 12px;
  background: #0a0a0a;
  border-left: 3px solid #2e2e2e;
  border-radius: 10px 0 0 10px;
  color: var(--text);
}
.wk:hover {
  background: #151515;
  border-left-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}
.wk:hover .wk-num { color: var(--accent); }
.wk-silent {
  background: transparent;
  border-left-style: dashed;
  color: var(--link);
}
/* A long date range drops to a line of its own. */
.wk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 6px;
}
.wk-num { font-size: 13px; font-variant-numeric: tabular-nums; }
.wk-dates { font-size: 11px; color: var(--quiet); }
.wk-meta { font-size: 10px; color: var(--muted); }
.wk-missing { font-size: 10px; color: var(--accent); }
.foot-nav {
  display: flex;
  gap: 1.5em;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ── Text pages: about, credits ── */
.text { max-width: 660px; margin: 22px 0 0 44px; font-size: 12px; line-height: 1.6; }
.text h2 {
  font-size: 13px;
  font-weight: bold;
  color: var(--show);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  margin: 32px 0 12px;
}
.text > h2:first-child, .text > section:first-of-type > h2:first-child { margin-top: 0; }
.text p { margin-bottom: 12px; }
.text section + section { margin-top: 40px; }
.lead { font-size: 11px; color: var(--muted); }
.lang-switch { font-size: 11px; letter-spacing: 0.1em; }
.lang-switch a { color: var(--accent); }
.memorial {
  margin: 36px 0 0;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}
.people { list-style: none; }
.people li {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.people li:last-child { border-bottom: none; }
.nick { color: var(--show); font-weight: bold; overflow-wrap: anywhere; }
.role { display: block; font-size: 11px; color: var(--muted); }
.source { font-size: 11px; color: var(--muted); margin-top: 16px; }

/* ── Page footer ── */
.site-footer {
  margin-top: 24px;
  padding-left: 54px;
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--muted);
}
.site-footer-years { letter-spacing: 0.1em; }

/* ── Player bar ── */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  background: #070707;
  border-top: 1px solid #3a3a3a;
  padding-bottom: env(safe-area-inset-bottom);
}
.player[hidden] { display: none; }
body.player-on { padding-bottom: 110px; }
.player-inner {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 16px 12px;
}
.player-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.player-toggle::before { content: "▶"; }
.is-playing .player-toggle::before { content: "❚❚"; letter-spacing: 1px; font-size: 12px; }
.player-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.player-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#player-show { color: var(--accent); }
#player-episode { font-size: 11px; font-weight: bold; color: var(--show); }
.player-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: var(--link);
}
#player-seek {
  flex: 1;
  min-width: 0;
  height: 16px;
  accent-color: var(--accent);
}
.player-back {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.15em;
  white-space: nowrap;
}
.narrow { display: none; }

/* ── Tablet ── */
@media (max-width: 1023px) {
  body { font-size: 13px; padding-top: 32px; }
  .site-header, main, .site-footer { max-width: 736px; }
  .birthday { max-width: 240px; padding: 18px 20px 16px; }
  .birthday-years { font-size: 36px; }
  .crosshair-years { letter-spacing: 0.45em; }
  .week-nav a, .week-nav span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px;
  }
  .week-nav { gap: 6px; letter-spacing: 0.2em; }
  .day { margin-left: 20px; }
  .text { margin-left: 20px; }
  .day-body { padding-left: 48px; }
  .prog-row { align-items: center; gap: 10px; min-height: 44px; }
  .prog-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent);
    border-radius: 50%;
  }
  .prog-silent { border: none; }
  .prog-title { font-size: 12px; }
  .prog-text summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
  }
  .prog-text { margin-left: 40px; }
  .recording-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
  .prog-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin-left: 0;
  }
  .site-footer { padding-left: 30px; letter-spacing: 0.45em; }
  .index-page .site-header, .index-page main, .index-page .site-footer { max-width: 736px; }
  .index-page .birthday { max-width: 260px; padding: 16px 18px; }
  .totals { gap: 4px 12px; }
  .totals dt { font-size: 10px; }
  .year-nav { gap: 2px 4px; font-size: 12px; letter-spacing: 0.15em; }
  .year-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
  }
  .year .day-body { padding-left: 34px; }
  .weeks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .wk { min-height: 64px; padding: 8px 8px 9px 11px; }
  .wk-num { font-size: 12px; }
  .wk-dates { font-size: 10.5px; }
  .foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ── Phone ── */
@media (max-width: 599px) {
  body { padding: 20px 16px 40px; }
  body.player-on { padding-bottom: 130px; }
  .player-inner { padding: 8px 12px 14px; gap: 6px 10px; }
  .player .reel { display: none; }
  .player-back { align-self: flex-start; letter-spacing: 0.1em; }
  .narrow { display: inline; }
  .wide, .week-ascii { display: none; }
  .masthead { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .logo { width: 100%; }
  .birthday {
    flex: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    max-width: none;
    padding: 8px 16px;
    border-radius: 18px;
  }
  .birthday-listen { flex: 1; padding: 0; border: none; letter-spacing: 0.15em; }
  .birthday-note { display: none; }
  .birthday-years { font-size: 22px; }
  .crosshair-years { letter-spacing: 0.3em; }
  .week-head {
    display: block;
    padding: 14px 0 24px 20px;
  }
  .week-title { white-space: normal; }
  .week-number { display: block; font-size: 22px; letter-spacing: 0.02em; }
  .week-dates { color: var(--dashes); font-size: 11px; }
  .week-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: 0.1em;
  }
  .week-nav a, .week-nav span {
    justify-content: center;
    background: #0b0b0b;
    border: 1px solid #2e2e2e;
    border-left: none;
    padding: 0;
  }
  .week-nav > :first-child {
    border-left: 1px solid #2e2e2e;
    border-radius: 18px 0 0 18px;
  }
  .week-nav > :last-child { border-radius: 0 18px 18px 0; }
  /* A text page has only the link to the matrix, so its box stands alone. */
  .text-head .week-nav { display: flex; }
  .text-head .week-nav > a { border-radius: 18px; padding: 0 28px; }
  .week-note { margin: -8px 0 20px; }
  .day { margin: 0 0 20px; }
  .text { margin-left: 0; font-size: 13px; }
  .people li { grid-template-columns: 6.5em 1fr; }
  .day-header { padding-left: 120px; }
  .day-body { padding: 8px 0 4px 30px; }
  .prog-line { font-size: 12px; }
  .prog-row { padding-left: 0; }
  .site-footer {
    padding-left: 0;
    letter-spacing: 0.3em;
    text-align: center;
    font-size: 11px;
  }
  .site-footer-years { font-size: 11px; }
  .index-page .birthday {
    flex: none;
    flex-direction: column;
    align-items: stretch;
    max-width: none;
    padding: 12px 16px;
  }
  .index-page .birthday-listen { flex: none; }
  .totals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
  }
  .totals div { flex-direction: column; gap: 0; }
  .totals dd { font-size: 15px; }
  .index-head { display: block; }
  .year-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
  }
  .year-nav a {
    background: #0b0b0b;
    border: 1px solid #2e2e2e;
    border-radius: 18px;
  }
  .year .day-body { padding: 10px 0 8px 26px; }
  .weeks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .wk { padding: 8px 6px 8px 9px; }
  .wk-head { display: block; }
  .wk-dates { display: block; font-size: 11px; }
  .wk-meta, .wk-missing { font-size: 11px; }
  .foot-nav { justify-content: center; }
}
