:root {
  color-scheme: dark;
  --ether-blue: #006699;
  --ether-orange: #ff6633;
  --ink: #edf8fc;
  --muted: #8ba7b4;
  --paper: #06131b;
  --card: #0a202b;
  --card-raised: #0d2a38;
  --line: #173b4c;
  --blue-bright: #33a3cc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); padding-bottom: 112px; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.masthead { height: 76px; padding: 0 clamp(24px, 5vw, 76px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.masthead p { color: var(--muted); font-family: Georgia, serif; font-style: italic; }
.wordmark { color: var(--ink); text-decoration: none; font-weight: 900; letter-spacing: .12em; display: flex; align-items: center; gap: 12px; }
.signal { display: flex; align-items: end; height: 24px; gap: 3px; }
.signal i { width: 4px; background: var(--ether-blue); border-radius: 4px; display: block; }
.signal i:nth-child(1) { height: 9px; }.signal i:nth-child(2) { height: 17px; }.signal i:nth-child(3) { height: 24px; }
.signal i:nth-child(3) { background: var(--ether-orange); }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero { width: 100vw; margin-left: calc(50% - 50vw); padding: clamp(68px, 10vw, 124px) max(24px, calc((100vw - 1180px) / 2)) 86px; border-bottom: 1px solid var(--line); position: relative; isolation: isolate; overflow: hidden; background-image: linear-gradient(90deg, rgba(4, 16, 23, .98) 0%, rgba(4, 16, 23, .92) 35%, rgba(4, 16, 23, .35) 75%, rgba(4, 16, 23, .12) 100%), url("../images/hero-radio-world.png"); background-position: center; background-size: cover; box-shadow: 0 24px 60px rgba(0, 0, 0, .24); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 102, 153, .14), transparent 55%); pointer-events: none; }
.eyebrow { margin: 0 0 15px; color: var(--blue-bright); font-size: 12px; letter-spacing: .2em; font-weight: 800; }
h1 { margin: 0 0 48px; max-width: 820px; font: 400 clamp(52px, 8vw, 94px)/.98 Georgia, serif; letter-spacing: -.045em; }
.search { max-width: 760px; height: 64px; display: flex; align-items: center; padding: 0 18px 0 23px; background: var(--card-raised); border: 1px solid var(--ether-blue); box-shadow: 0 12px 34px rgba(0, 0, 0, .24); }
.search:focus-within { border-color: var(--ether-orange); box-shadow: 0 0 0 3px rgba(255, 102, 51, .18); }
.search-icon { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 50%; margin-right: 16px; position: relative; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--ink); transform: rotate(45deg); right: -5px; bottom: -2px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; }
.search input::placeholder { color: #7594a1; }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; color: var(--muted); background: #071820; }

.directory { padding: 58px 0 90px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 25px; }
h2 { font: 400 35px/1.1 Georgia, serif; margin: 0; }
.count { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.stations { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.station { min-height: 122px; background: var(--card); display: grid; grid-template-columns: 62px 1fr auto; gap: 17px; align-items: center; padding: 22px; }
.station-logo { width: 62px; height: 62px; display: grid; place-items: center; background: var(--ether-blue); color: white; font: 700 22px Georgia, serif; overflow: hidden; }
.station-logo img { width: 100%; height: 100%; object-fit: contain; background: white; }
.station-info { min-width: 0; }
.station-name { margin: 0 0 7px; font: 600 18px/1.2 Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-link { color: inherit; text-decoration: none; }
.station-link:hover, .station-link:focus-visible { color: #4dffb8; text-decoration: underline; }
.station-place { margin: 0 0 8px; color: var(--blue-bright); font-size: 11px; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.station-tags { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play { width: 45px; height: 45px; border: 1px solid var(--ether-blue); border-radius: 50%; color: var(--blue-bright); background: transparent; cursor: pointer; display: grid; place-items: center; transition: .18s ease; }
.play::before { content: ""; margin-left: 3px; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.play:hover, .play:focus-visible, .play[aria-pressed="true"] { background: var(--ether-orange); color: white; border-color: var(--ether-orange); outline: none; }
.play[aria-pressed="true"]::before { width: 10px; height: 12px; margin: 0; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.message { padding: 18px; margin-bottom: 18px; border: 1px solid var(--ether-orange); background: #32180f; color: #ffb49b; }

.ad-placement { position: relative; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 1px solid #28414a; background: #091a22; color: var(--muted); contain: layout paint; }
.ad-placement--box { width: 300px; min-width: 300px; height: 250px; min-height: 250px; }
.ad-placement--banner, .ad-placement--mobile-inflow, .ad-placement--player { width: 320px; min-width: 320px; height: 50px; min-height: 50px; }
.ad-label { position: absolute; top: 5px; left: 7px; z-index: 1; color: #70858d; font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.ad-creative { width: 100%; height: 100%; display: grid; place-items: center; }
.ad-fallback, .ad-debug-creative { width: 100%; height: 100%; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 5px; color: var(--ink); text-decoration: none; background: radial-gradient(circle at 90% 15%, rgba(51,163,204,.2), transparent 42%), #0b2029; }
.ad-fallback[hidden] { display: none; }
.ad-fallback strong, .ad-debug-creative strong { font: 600 15px/1.15 Georgia, serif; }
.ad-fallback span, .ad-debug-creative span { color: var(--ether-orange); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ad-placement[data-ad-state="loading"] .ad-creative::after { content: ""; width: 28px; height: 2px; background: var(--ether-blue); animation: ad-pulse 1s ease-in-out infinite alternate; }
.directory-ad { margin: 30px auto 0; }
.directory-midpage-ad, .directory-bottom-ad { grid-column: 1 / -1; justify-self: center; margin: 27px 0; }
.ad-placement--mobile-inflow, .ad-placement--player { display: none; }
@keyframes ad-pulse { to { transform: scaleX(2); background: var(--ether-orange); } }

.player { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; min-height: 94px; padding: 14px clamp(24px, 5vw, 76px); display: grid; grid-template-columns: minmax(220px, .9fr) auto minmax(280px, 1.1fr); align-items: center; gap: clamp(24px, 5vw, 72px); background: #041017; color: white; border-top: 2px solid var(--ether-blue); box-shadow: 0 -12px 35px rgba(0, 0, 0, .3); }
.now-playing { display: flex; align-items: center; gap: 14px; min-width: 0; }
.player-art { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; color: var(--ether-orange); border: 1px solid var(--ether-blue); overflow: hidden; }
.player-art img { width: 100%; height: 100%; object-fit: contain; background: white; }
.player-label { color: var(--blue-bright); font-size: 9px; letter-spacing: .18em; margin: 0 0 4px; }
#now-playing { margin: 0; font: 600 16px Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#now-playing-location { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.transport-controls { display: flex; align-items: center; justify-content: center; gap: 10px; }
.player-toggle { width: 56px; height: 56px; border: 1px solid var(--ether-orange); border-radius: 50%; color: white; background: var(--ether-orange); cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 24px rgba(255, 102, 51, .22); transition: transform .18s ease, background .18s ease, opacity .18s ease; }
.player-toggle::before { content: ""; margin-left: 4px; border-left: 12px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.player-toggle[aria-pressed="true"]::before { width: 13px; height: 16px; margin: 0; border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.player-toggle:hover:not(:disabled), .player-toggle:focus-visible { transform: scale(1.06); background: #ff7547; outline: 2px solid white; outline-offset: 3px; }
.player-toggle:disabled { cursor: not-allowed; opacity: .35; box-shadow: none; }
.seek-control { width: 42px; height: 42px; padding: 0; border: 1px solid var(--ether-blue); border-radius: 50%; color: var(--blue-bright); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: -.04em; transition: transform .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease; }
.seek-control:hover:not(:disabled), .seek-control:focus-visible { transform: scale(1.06); color: white; border-color: var(--ether-orange); outline: 2px solid white; outline-offset: 2px; }
.seek-control:disabled { cursor: not-allowed; opacity: .35; }
.seek-control[hidden] { display: none; }
audio { display: none; }
.broadcast-state { display: grid; grid-template-columns: minmax(140px, 1fr) auto; align-items: center; gap: 7px 15px; }
.live-line { position: relative; height: 5px; overflow: hidden; border-radius: 999px; background: #173743; }
.live-line::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(6, 19, 27, .65) 9px 12px); }
.live-line span { position: absolute; inset: 0; transform-origin: left; transform: scaleX(.24); background: var(--ether-blue); transition: transform .35s ease, background .25s ease, opacity .25s ease; }
.live-line span::after { content: ""; position: absolute; right: -3px; top: 50%; width: 9px; height: 9px; transform: translateY(-50%); border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(0, 102, 153, .18); }
.live-badge { min-width: 90px; padding: 7px 11px; border: 1px solid #31505d; border-radius: 999px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .15em; text-align: center; transition: .25s ease; }
.player-status { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; letter-spacing: .04em; }

.player[data-state="connecting"] .live-line span,
.player[data-state="buffering"] .live-line span { transform: scaleX(.72); background: linear-gradient(90deg, var(--ether-blue), var(--ether-orange), var(--ether-blue)); background-size: 200% 100%; animation: signal-travel 1.2s linear infinite; }
.player[data-state="connecting"] .live-badge,
.player[data-state="buffering"] .live-badge { color: var(--ether-orange); border-color: rgba(255, 102, 51, .65); }
.player[data-state="live"] .live-line span { transform: scaleX(1); color: var(--ether-orange); background: var(--ether-orange); }
.player[data-state="live"] .live-line span::after { box-shadow: 0 0 0 4px rgba(255, 102, 51, .2), 0 0 18px rgba(255, 102, 51, .9); }
.player[data-state="live"] .live-badge { color: white; background: var(--ether-orange); border-color: var(--ether-orange); box-shadow: 0 0 20px rgba(255, 102, 51, .35); }
.player[data-state="paused"] .live-line span { transform: scaleX(.55); background: #5e7078; opacity: .6; }
.player[data-state="offline"] .live-line span { transform: scaleX(.08); background: #5e7078; opacity: .45; }
.player[data-state="offline"] .live-badge { color: #a8b3b7; border-color: #53666e; }

@keyframes signal-travel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .live-line span { animation: none !important; transition: none; } }

@media (max-width: 850px) {
  .hero { background-position: 58% center; }
  .stations { grid-template-columns: 1fr; }
  .player { grid-template-columns: minmax(200px, .9fr) auto minmax(230px, 1.1fr); gap: 18px; }
}
@media (max-width: 580px) {
  body { padding-bottom: 154px; }
  .masthead p, kbd { display: none; }
  main { width: min(100% - 28px, 1180px); }
  .hero { padding: 54px 14px 62px; background-position: 64% center; }
  h1 { font-size: 48px; }
  .station { padding: 17px; grid-template-columns: 52px 1fr auto; gap: 12px; }
  .station-logo { width: 52px; height: 52px; }
  .player { min-height: 140px; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 15px; padding: 12px 18px; }
  .player-art { width: 42px; height: 42px; }
  .transport-controls { grid-column: 2; grid-row: 1; gap: 7px; }
  .player-toggle { width: 50px; height: 50px; }
  .seek-control { width: 38px; height: 38px; font-size: 10px; }
  .broadcast-state { grid-column: 1 / -1; gap: 5px 12px; }
  .player-status { display: none; }
  .directory-ad { margin-top: 20px; }
}
