:root {
  color-scheme: light dark;
  --bg: #f8f8f8;
  --fg: #1f1f1f;
  --accent: #0066cc;
  --muted: #5a5a5a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Site Header */
.site-header {
  background: white;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
}

.site-header h1 a:hover {
  color: var(--accent);
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.header-nav a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.header-nav a:hover {
  color: var(--accent);
}

.header-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--fg);
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Mobile header styles */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
    display: none;
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
  }

  .header-nav a:last-child {
    border-bottom: none;
  }

  .header-nav a.active {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
  }
}

/* Legacy header support (for pages not yet converted) */
header:not(.site-header) {
  background: white;
  border-bottom: 1px solid #ddd;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

header:not(.site-header) h1 {
  margin: 0;
  font-size: 1.5rem;
}

header:not(.site-header) h1 a {
  color: inherit;
  text-decoration: none;
}

header:not(.site-header) h1 a:hover {
  color: var(--accent);
}

header nav {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1.5rem;
}

header nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

header nav a:hover {
  text-decoration: underline;
}

#search-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#search-form input,
#search-form select {
  flex: 1 1 240px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

#search-form button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 600;
}

main {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(240px, 280px) minmax(240px, 280px) 1fr;
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Status page uses single column layout */
body:has(.status-detail) main {
  grid-template-columns: 1fr;
}

.recordings header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.date-navigation {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.date-nav-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.date-nav-controls select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
}

.date-nav-controls select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.date-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.date-nav-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.date-nav-btn:hover {
  background: #f5f5f5;
}

.date-nav-btn.today-btn {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.date-nav-btn.today-btn:hover {
  background: #1565c0;
}

.date-nav-input {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  width: auto;
}

section h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.status-detail {
  grid-column: 1 / -1;
}

.status-detail ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Apply status styles to status-detail as well */
.status-detail li {
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e2e2;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.status-detail li.ok {
  border-color: #2e8b57;
  box-shadow: 0 0 0 2px rgb(46 139 87 / 15%);
}

.status-detail li.warn {
  border-color: #e6a700;
  box-shadow: 0 0 0 2px rgb(230 167 0 / 15%);
}

.status-detail li.error {
  border-color: #d13b3b;
  box-shadow: 0 0 0 2px rgb(209 59 59 / 15%);
}

.status-detail li header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.status-detail li header h3 {
  margin: 0;
  font-size: 1rem;
}

.status-detail li header span {
  font-size: 0.8rem;
  color: var(--muted);
}

.status-detail li dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.status-detail li dt {
  color: var(--muted);
}

.status-detail li dd {
  margin: 0;
}

.status-detail li .status-message {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.status-detail li.warn .status-message {
  color: #8a6d3b;
}

.status-detail li.error .status-message {
  color: #b22222;
}

.status-detail li .health-indicator {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.status-detail li.ok .health-indicator {
  color: #2e8b57;
}

.status-detail li.warn .health-indicator {
  color: #e6a700;
}

.status-detail li.error .health-indicator {
  color: #d13b3b;
}

.status-detail li .dashboard-stats {
  margin: 0.75rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.status-detail li .stat-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.status-detail li .stat-group:last-child {
  margin-bottom: 0;
}

.status-detail li .stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-detail li .stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-detail li .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
}

.status-detail li .stat-value.backlog-low {
  color: #2e8b57;
}

.status-detail li .stat-value.backlog-medium {
  color: #e6a700;
}

.status-detail li .stat-value.backlog-high {
  color: #d13b3b;
}

.status-detail li .backlog-bar {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.status-detail li .backlog-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.status-detail li.ok .backlog-fill {
  background: #2e8b57;
}

.status-detail li.warn .backlog-fill {
  background: #e6a700;
}

.status-detail li.error .backlog-fill {
  background: #d13b3b;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stations ul {
  gap: 0.5rem;
}

.stations li {
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e2e2;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}

.stations li.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgb(0 102 204 / 0.15);
}

/* Health status styling for stations */
.stations li.ok {
  border-color: #2e8b57;
}

.stations li.warn {
  border-color: #e6a700;
}

.stations li.error {
  border-color: #d13b3b;
}

.stations li .health-indicator {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 1rem;
  vertical-align: middle;
}

.stations li.status-link {
  cursor: default;
  border: none;
  background: transparent;
  padding: 0.5rem;
}

.stations li.status-link:hover {
  background: transparent;
}

.stations li span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.station-logo,
.station-flag {
  display: inline-block;
  margin-right: 0.25rem;
  font-size: 1em;
  vertical-align: middle;
}

.station-logo {
  margin-right: 0.5rem;
}

article {
  background: white;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e2e2;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

article header h3 {
  margin: 0;
  font-size: 1rem;
}

article header time {
  font-size: 0.85rem;
  color: var(--muted);
}

article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-wrap;
}

article footer {
  display: flex;
  gap: 1rem;
}

article footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.status ul {
  gap: 0.75rem;
}

.status li {
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e2e2;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.status li.ok {
  border-color: #2e8b57;
  box-shadow: 0 0 0 2px rgb(46 139 87 / 15%);
}

.status li.warn {
  border-color: #e6a700;
  box-shadow: 0 0 0 2px rgb(230 167 0 / 15%);
}

.status li.error {
  border-color: #d13b3b;
  box-shadow: 0 0 0 2px rgb(209 59 59 / 15%);
}

.status li header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.status li header h3 {
  margin: 0;
  font-size: 1rem;
}

.status li header span {
  font-size: 0.8rem;
  color: var(--muted);
}

.status li dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.status li dt {
  color: var(--muted);
}

.status li dd {
  margin: 0;
}

.status li .status-message {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.status li.warn .status-message {
  color: #8a6d3b;
}

.status li.error .status-message {
  color: #b22222;
}

/* Enhanced Dashboard Styles */
.status li header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.status li .health-indicator {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.status li.ok .health-indicator {
  color: #2e8b57;
}

.status li.warn .health-indicator {
  color: #e6a700;
}

.status li.error .health-indicator {
  color: #d13b3b;
}

.status li .dashboard-stats {
  margin: 0.75rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.status li .stat-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.status li .stat-group:last-child {
  margin-bottom: 0;
}

.status li .stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status li .stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status li .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
}

.status li .stat-value.backlog-low {
  color: #2e8b57;
}

.status li .stat-value.backlog-medium {
  color: #e6a700;
}

.status li .stat-value.backlog-high {
  color: #d13b3b;
}

.status li .backlog-bar {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.status li .backlog-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.status li.ok .backlog-fill {
  background: #2e8b57;
}

.status li.warn .backlog-fill {
  background: #e6a700;
}

.status li.error .backlog-fill {
  background: #d13b3b;
}

.transcript-page {
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

.transcript-header {
  background: white;
  border-bottom: 1px solid #ddd;
  padding: 1.25rem clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.transcript-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.transcript-header .back-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.transcript-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem clamp(1.5rem, 4vw, 3rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.transcript-meta article {
  display: grid;
  gap: 1.25rem;
}

.transcript-meta dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}

.transcript-meta dl div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.transcript-meta dt {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.transcript-meta dd {
  margin: 0;
  font-weight: 600;
}

.transcript-meta .meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.transcript-meta .meta-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.transcript-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.transcript-block {
  background: white;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 1.25rem;
  line-height: 1.6;
  color: var(--fg);
}

.transcript-block p {
  margin: 0;
  white-space: pre-wrap;
}

.transcript-text-clickable {
  position: relative;
}

.transcript-segment-text {
  transition: background-color 0.2s ease, color 0.2s ease;
  border-radius: 3px;
  padding: 1px 2px;
  margin: 0 1px;
}

.transcript-segment-text:hover {
  background-color: #f0f7ff;
  color: var(--accent);
}

.transcript-segment-text.playing-text {
  background-color: #e8f4fd;
  color: var(--accent);
  font-weight: 500;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.transcript-tooltip {
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rollon-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
}

.rollon-notification.error {
  background: #dc3545;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.rollon-toggle {
  margin: 1rem 0;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e2e2e2;
}

.rollon-toggle label {
  font-size: 0.9rem;
  color: var(--fg);
}

.rollon-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.music-events {
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.music-events h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.music-events ul {
  gap: 0.5rem;
}

.music-events li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.music-events li strong {
  color: var(--fg);
}

/* Collapsible segments section */
.segments-collapsible {
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  margin-top: 2rem;
}

.segments-collapsible summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border-radius: 8px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.segments-collapsible summary::-webkit-details-marker {
  display: none;
}

.segments-collapsible summary::before {
  content: "▶";
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.segments-collapsible[open] summary::before {
  transform: rotate(90deg);
}

.segments-collapsible summary h2 {
  margin: 0;
  font-size: 1.1rem;
}

.segments-collapsible[open] summary {
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #e2e2e2;
}

.segments-collapsible .segments-container {
  padding: 1rem 1.25rem;
}

.segments-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.segment {
  background: white;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.segment header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Music segments - warm amber/gold */
.segment.music,
.segment.possibly-music {
  border-color: #cfa972;
  background: #fff7ec;
}

.segment.music .segment-badge,
.segment.possibly-music .segment-badge.music-badge {
  background: #c37a1b;
  color: white;
}

/* Ad break segments - muted gray */
.segment.ad-break {
  border-color: #aaa;
  background: #f5f5f5;
  opacity: 0.8;
}

.segment.ad-break .segment-badge.ad-badge {
  background: #666;
  color: white;
}

.segment.ad-break p {
  color: var(--muted);
  font-style: italic;
}

/* Combined ad + music */
.segment.ad-break.possibly-music {
  border-color: #999;
  background: linear-gradient(135deg, #f5f5f5 50%, #fff7ec 50%);
}

.segment-badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #4c6ef5;
  color: white;
  text-transform: uppercase;
}

.segment-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Song info display */
.segment-song-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #c37a1b;
  margin-top: 0.25rem;
}

.segment-song-info .song-icon {
  font-size: 1rem;
}

.segment-song-info .song-title {
  font-weight: 600;
}

.segment-song-info .song-artist {
  color: var(--muted);
}

/* Text block styling for ads and music */
.transcript-segment-text.ad-text {
  color: var(--muted);
  font-style: italic;
  background-color: #f0f0f0;
}

.transcript-segment-text.music-text {
  background-color: #fff7ec;
  color: #8b6914;
}

.transcript-segment-text.ad-text:hover {
  background-color: #e8e8e8;
  color: #666;
}

.transcript-segment-text.music-text:hover {
  background-color: #ffe8cc;
  color: #6b4c00;
}

/* Transcript Legend */
.transcript-legend {
  background: white;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Transcript summary stats */
.transcript-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.transcript-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.transcript-stat .stat-icon {
  font-size: 1rem;
}

.transcript-stat .stat-label {
  color: var(--muted);
}

.transcript-stat .stat-value {
  font-weight: 600;
}

.segment p {
  margin: 0;
  font-size: 1rem;
  color: var(--fg);
  line-height: 1.5;
  white-space: pre-wrap;
}

.segment:hover {
  background-color: #f8f9fa;
  border-color: var(--accent);
  transform: translateX(2px);
}

.segment:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.segment.playing {
  background-color: #e8f4fd;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.segment.playing.music {
  background-color: #fff3e0;
  border-color: #c37a1b;
}

.segment-range {
  user-select: none;
}

.segment-range:hover {
  color: var(--accent);
  text-decoration: underline;
}

.audio-player-section {
  background: white;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 1.25rem;
}

.audio-player-section h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.audio-player-container {
  width: 100%;
}

.audio-player-container audio {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .segment:hover {
    transform: none;
  }

  .audio-player-container audio {
    width: 100%;
  }
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.error {
  color: #d13b3b;
}

@media (max-width: 1100px) {
  main {
    grid-template-columns: 1fr;
  }
}

/* Compact view reordering - search results first */
@media (max-width: 768px) {
  header nav {
    flex-wrap: wrap;
  }
  
  main {
    display: flex;
    flex-direction: column;
  }
  
  .results {
    order: 1; /* First after search box */
  }
  
  .stations {
    order: 2;
  }
  
  .recordings {
    order: 3;
  }
}

/* Search highlighting */
mark,
.search-highlight {
  background: #fff59d;
  color: #000;
  padding: 0.1em 0.2em;
  border-radius: 3px;
  font-weight: 500;
}

.search-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-bottom: 1px solid #90caf9;
  color: #1565c0;
  font-size: 0.95rem;
}

.search-banner-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-banner-text strong {
  color: #0d47a1;
}

.search-banner-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #1565c0;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s;
}

.search-banner-clear:hover {
  background: #0d47a1;
}


/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5rem;
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-text.medium {
  width: 70%;
}

.skeleton-text.long {
  width: 90%;
}

.skeleton-card {
  padding: 1rem;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: white;
}

.skeleton-card .skeleton-title {
  height: 1.2em;
  width: 60%;
  margin-bottom: 0.75rem;
}

.skeleton-card .skeleton-line {
  height: 0.9em;
  margin-bottom: 0.5rem;
}

.skeleton-card .skeleton-meta {
  height: 0.8em;
  width: 30%;
  margin-top: 0.75rem;
}

/* Skeleton for status list */
.skeleton-status-item {
  list-style: none;
  margin-bottom: 0.75rem;
}

/* Skeleton for transcript meta */
.skeleton-meta-loading {
  padding: 0.5rem 0;
}

.skeleton-line {
  display: block;
}

.skeleton-segment {
  border-radius: 8px;
}

/* Skeleton grid for cards */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* Shared Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid #e2e2e2;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-text {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}
