/* The station's public website.
 *
 * The look is set by variables: the station's colours, font, corner radius and header picture
 * come from Website -> Design in StationMan, written into each page as a <style> block that
 * overrides the neutral defaults below. Type: Cabin by default -- a humanist sans in the
 * Johnston/Gill tradition. One family, one scale, one set of spacing steps, so every page
 * lines up the same way.
 */
@import url("fonts/fonts.css");

:root {
    /* Brand (Website -> Design) */
    --brand: #2563a8;
    --brand-light: #7fb0e6;
    --brand-dark: #1c4a80;          /* text on white, hover: AA contrast */
    --brand-rgb: 37 99 168;
    --brand-light-rgb: 127 176 230;
    --ink: #454545;
    --hero-image: none;             /* the picture behind the header and the listening app */

    /* Derived */
    --ink-strong: #2e2e2e;
    --muted: #6b6b6b;
    --line: #e4e4e4;
    --paper: #f5f6f3;
    --bg: #ffffff;
    --dark: #1f1f1f;                /* photo overlays, player */
    --dark-2: #2e2e2e;              /* dark panels */
    --on-dark: #f4f4f4;
    --on-dark-muted: #bdbdbd;

    /* Type */
    --font: "Cabin", "Gill Sans", "Gill Sans MT", "Segoe UI", Calibri, sans-serif;
    --font-heading: var(--font);
    --text: 1.0625rem;              /* 17px */
    --text-sm: 0.9rem;
    --text-xs: 0.78rem;
    --h1: clamp(2rem, 3.2vw + 1rem, 3.1rem);
    --h2: clamp(1.5rem, 1.4vw + 1rem, 2rem);
    --h3: 1.3rem;
    --h4: 1.1rem;
    --label: 0.8rem;                /* uppercase labels and buttons */

    /* Space */
    --s1: 0.25rem;
    --s2: 0.5rem;
    --s3: 0.75rem;
    --s4: 1rem;
    --s5: 1.5rem;
    --s6: 2.5rem;
    --s7: 4rem;

    --radius: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.06);
    --player-height: 64px;
    --max: 1200px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--text);
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    padding-bottom: var(--player-height);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink-strong);
    margin: 0 0 var(--s3);
}
h1 { font-size: var(--h1); letter-spacing: -0.02em; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4, h5, h6 { font-size: var(--h4); }
p { margin: 0 0 var(--s4); }

.label, .eyebrow {
    font-size: var(--label);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.skip-link { position: absolute; left: -999px; top: var(--s2); background: var(--bg); padding: var(--s2) var(--s4); z-index: 1000; }
.skip-link:focus { left: var(--s2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }

/* Small, shared helpers instead of one-off styles */
.flush { margin: 0; }
.flush-top { margin: var(--s4) 0 0; }
.block { margin-top: var(--s6); }
.block-sm { margin-top: var(--s5); }
.muted { color: var(--muted); }
.on-dark-muted { color: var(--on-dark-muted); }
.small { font-size: var(--text-sm); }
.plain-list { list-style: none; padding: 0; margin: 0; }
.link-list { margin: 0; padding-left: 1.1rem; }
.link-list li + li { margin-top: var(--s1); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.messages { padding-top: var(--s5); }

/* ---------------------------------------------------------------- header */

.site-header {
    position: relative;
    color: var(--on-dark);
    background: var(--dark) var(--hero-image) center 40% / cover no-repeat;
}
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.88) 0%, rgba(20, 20, 20, 0.74) 100%);
}
.site-header > * { position: relative; }

.topbar { display: flex; align-items: center; gap: var(--s4); min-height: 76px; }
.brand { display: block; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.wordmark { display: block; color: #fff; font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; line-height: 46px; white-space: nowrap; }
.footer-grid p.wordmark { line-height: 1.2; margin: 0 0 var(--s4); }
@media (min-width: 992px) { .brand img { height: 54px; } }

.nav-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--on-dark);
    border-radius: var(--radius);
    padding: var(--s2) var(--s3);
    font: 700 var(--label) var(--font);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}
.main-nav { display: none; width: 100%; }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a {
    display: block;
    color: var(--on-dark);
    text-decoration: none;
    font: 700 var(--text-sm) var(--font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--s3) 0;
    white-space: nowrap;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand-light); }
.main-nav .sub a { padding-left: var(--s4); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: var(--text); }

/* The menu is one line or none: below 992px, or whenever site.js finds it will
   not fit on one line (.nav-compact - Welsh labels are longer), it folds behind
   the Menu button. */
@media (max-width: 991px) {
    .topbar { flex-wrap: wrap; }
    .main-nav { order: 10; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-bottom: var(--s2); }
    .header-actions { order: 5; }
}
.nav-compact .topbar { flex-wrap: wrap; }
.nav-compact .main-nav { order: 10; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-bottom: var(--s2); }
.nav-compact .header-actions { order: 5; }

@media (max-width: 479px) {
    .header-actions { gap: var(--s2); }
    .btn-listen span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (min-width: 992px) {
    .site-header:not(.nav-compact) .nav-toggle { display: none; }
    .site-header:not(.nav-compact) .main-nav { display: block; width: auto; margin-left: auto; }
    .site-header:not(.nav-compact) .main-nav > ul { display: flex; }
    .site-header:not(.nav-compact) .main-nav > ul > li { position: relative; }
    .site-header:not(.nav-compact) .main-nav > ul > li > a { padding: 1.6rem 0.55rem; letter-spacing: 0.04em; }
    .site-header:not(.nav-compact) .main-nav .sub {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 230px;
        background: var(--dark-2);
        border-top: 3px solid var(--brand);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        padding: var(--s2) 0;
        z-index: 50;
    }
    .site-header:not(.nav-compact) .main-nav li:hover > .sub, .site-header:not(.nav-compact) .main-nav li:focus-within > .sub { display: block; }
    .site-header:not(.nav-compact) .main-nav .sub a { padding: var(--s2) var(--s4); }
}

/* Light and brand-colour headers (Website -> Design). The default is the dark one above. */
.site-header.header-light { color: var(--ink); background: #fff; border-bottom: 1px solid var(--line); }
.site-header.header-light::before, .site-header.header-brand::before { display: none; }
.site-header.header-brand { background: var(--brand); color: #fff; }
.header-light .wordmark { color: var(--ink-strong); }
.header-light .main-nav a, .header-light .lang-switch, .header-light .icon-link { color: var(--ink-strong); }
.header-light .main-nav a:hover, .header-light .main-nav a[aria-current="page"],
.header-light .lang-switch:hover, .header-light .icon-link:hover { color: var(--brand-dark); }
.header-light .lang-switch { border-bottom-color: rgba(0, 0, 0, 0.3); }
.header-light .nav-toggle { color: var(--ink-strong); border-color: rgba(0, 0, 0, 0.3); }
.header-light .main-nav, .header-light.nav-compact .main-nav { border-top-color: var(--line); }
.header-brand .main-nav a, .header-brand .lang-switch, .header-brand .icon-link { color: #fff; }
.header-brand .main-nav a:hover, .header-brand .main-nav a[aria-current="page"],
.header-brand .lang-switch:hover, .header-brand .icon-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.header-brand .btn-listen { background: #fff; color: var(--brand-dark); }
.header-brand .btn-listen:hover { background: var(--ink-strong); color: #fff; }
@media (min-width: 992px) {
    .header-light:not(.nav-compact) .main-nav .sub { background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
    .header-light:not(.nav-compact) .main-nav .sub a { color: var(--ink-strong); }
    .header-light:not(.nav-compact) .main-nav .sub a:hover { color: var(--brand-dark); }
    .header-brand:not(.nav-compact) .main-nav .sub { background: var(--brand-dark); border-top-color: #fff; }
}

.header-actions { display: flex; align-items: center; gap: var(--s3); }
.lang-switch {
    color: var(--on-dark);
    font: 700 var(--label) var(--font);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.lang-switch:hover { color: var(--brand-light); }
.icon-link { color: var(--on-dark); display: inline-flex; padding: var(--s1); }
.icon-link:hover { color: var(--brand-light); }
.icon-link i, .social i { font-size: 18px; width: 20px; text-align: center; }

/* Buttons: one shape, three looks. */
/* The hidden attribute wins over any display set below. */
[hidden] { display: none !important; }

.button, .btn-listen, button.button {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.25rem;
    font: 700 var(--label) var(--font);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.button:hover, .btn-listen:hover { background: var(--brand-dark); color: #fff; }
.button.secondary { background: transparent; color: var(--brand-dark); box-shadow: inset 0 0 0 2px var(--brand); }
.button.secondary:hover { background: var(--brand); color: #fff; }
.button.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px var(--brand-light); }
.button.ghost:hover { background: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.btn-listen i { font-size: 12px; }

/* Page title band, the same on every page. */
.hero { padding-block: var(--s6); }
.hero h1 { color: #fff; margin: 0; }
.hero .eyebrow { color: var(--brand-light); margin-bottom: var(--s2); }
.hero .lead { color: var(--on-dark-muted); font-size: 1.125rem; max-width: 46rem; margin: var(--s3) 0 0; }
.hero a:not(.button) { color: var(--brand-light); }   /* links in the hero text, not its buttons */
.hero-home { padding-block: var(--s7); text-align: center; }
.hero-home .lead { margin: var(--s4) auto var(--s5); }
.hero-home .button + .button { margin-left: var(--s2); }
.crumbs { font-size: var(--text-sm); color: var(--on-dark-muted); margin-bottom: var(--s2); }
.crumbs a { color: var(--on-dark-muted); }

/* ----------------------------------------------------------------- body */

main { display: block; }
.section { padding: var(--s6) 0; }
.section.paper { background: var(--paper); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.section-title h2 { margin: 0; text-transform: uppercase; font-weight: 400; letter-spacing: 0.01em; }
.section-title h2 strong { font-weight: 700; color: var(--brand); }
.section-title a { font-size: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.layout { display: grid; gap: var(--s6); }
@media (min-width: 992px) { .layout.with-sidebar { grid-template-columns: minmax(0, 1fr) 320px; } }

/* Text written in the editor, and imported from the old site. */
.prose { max-width: 46rem; }
.layout.wide .prose, .prose.wide { max-width: none; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: var(--s6); }
.prose h3 { margin-top: var(--s5); }
.prose h4, .prose h5, .prose h6 { margin-top: var(--s5); font-size: var(--h4); }
.prose p, .prose li { max-width: 46rem; }
.layout.wide .prose p, .layout.wide .prose li, .prose.wide p, .prose.wide li { max-width: none; }   /* full width means the text too */
.prose .text-center, .prose [style*="text-align: center"] { margin-left: auto; margin-right: auto; }   /* a centred line stays centred on a wide page */
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 var(--s4); }
.prose li + li { margin-top: var(--s1); }
.prose img { border-radius: var(--radius); margin: var(--s4) 0; }
.prose iframe { max-width: 100%; border: 0; border-radius: var(--radius); margin: var(--s4) 0; }
.prose iframe[src*="youtube"], .prose iframe[src*="vimeo"] { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.prose blockquote { border-left: 4px solid var(--brand); margin: var(--s5) 0; padding: var(--s1) 0 var(--s1) var(--s4); color: var(--muted); font-style: italic; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 var(--s4); }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: var(--s2); text-align: left; }
.prose .button { margin: var(--s2) 0; }
.prose .text-center img, .prose img.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: var(--s1) var(--s5) var(--s4) 0; }
.alignright { float: right; margin: var(--s1) 0 var(--s4) var(--s5); }
/* Pictures with captions; a floated one takes at most two fifths of the text (none on a phone), and a
   gallery lays its pictures side by side. */
.prose figure { margin: var(--s4) 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: var(--s2); font-size: .9rem; color: var(--muted); }
.prose figure.alignleft, .prose figure.alignright { max-width: 40%; margin-top: var(--s1); }
@media (max-width: 575.98px) { .prose figure.alignleft, .prose figure.alignright { float: none; max-width: none; margin: var(--s4) 0; } }
.prose h2, .prose h3 { clear: both; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--s4); margin: var(--s4) 0; }
.prose .gallery figure { margin: 0; }
.prose .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.sidebar > * + * { margin-top: var(--s5); }
.panel { background: var(--paper); border-radius: var(--radius); padding: var(--s5); }
.panel h3 { font-size: var(--label); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--s3); }
.panel.dark { background: var(--dark-2); color: var(--on-dark); }
.panel.dark h3, .panel.dark a { color: #fff; }

/* Cards */
.grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 0, 0, 0.1); }
.card a.cover { display: block; aspect-ratio: 16 / 10; background: var(--dark-2) url("img/logo-white.svg") center / 45% no-repeat; overflow: hidden; }
.card a.cover img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: var(--s4) var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.card h3 { font-size: 1.1rem; margin: 0; }
.card h3 a { color: var(--ink-strong); text-decoration: none; }
.card h3 a:hover { color: var(--brand-dark); }
.card p { margin: 0; }
.card .meta { font-size: var(--text-sm); color: var(--muted); }
.tag { display: inline-block; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-dark); text-decoration: none; }

/* On air */
.onair {
    display: grid;
    gap: var(--s5);
    align-items: center;
    background: var(--dark-2);
    color: var(--on-dark);
    border-radius: var(--radius);
    padding: var(--s5);
}
@media (min-width: 768px) { .onair { grid-template-columns: 1fr auto; } .onair:has(> img) { grid-template-columns: 160px 1fr auto; } }
.onair img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; width: 160px; }
.onair .label { display: inline-flex; align-items: center; gap: var(--s2); color: var(--brand-light); }
.onair h2, .onair h3 { color: #fff; margin: var(--s1) 0; }
.onair h2 a, .onair h3 a { color: #fff; text-decoration: none; }
.onair .song { color: var(--on-dark-muted); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #e53935; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); } }
.progress { height: 4px; background: rgba(255, 255, 255, 0.15); border-radius: 2px; overflow: hidden; margin-top: var(--s3); }
.progress span { display: block; height: 100%; background: var(--brand-light); width: 0; }

.upnext { list-style: none; margin: 0; padding: 0; }
.upnext li { display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
/* The time column is as wide as the longest day name (WEDNESDAY, DYDD MERCHER...), the same on every row. */
@supports (grid-template-columns: subgrid) {
    .upnext { display: grid; grid-template-columns: max-content 1fr; column-gap: var(--s4); }
    .upnext li { grid-column: 1 / -1; grid-template-columns: subgrid; }
}
.upnext li:last-child { border-bottom: 0; }
.upnext time { font-weight: 700; color: var(--brand-dark); }
.upnext .day { display: block; white-space: nowrap; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }
.upnext a { color: var(--ink-strong); text-decoration: none; font-weight: 700; }

/* How to listen */
.ways { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.way { text-align: center; padding: var(--s5) var(--s4); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
.way .big { font-size: 2.2rem; font-weight: 700; color: var(--brand); line-height: 1; margin-bottom: var(--s2); }
.way h3 { font-size: var(--label); text-transform: uppercase; letter-spacing: 0.06em; }
.way p { margin: 0; }
.way { display: flex; flex-direction: column; }
.way-action { margin-top: auto !important; padding-top: var(--s4); }   /* at the foot of the card, level across a row */
.prose .way-action .button { margin: 0; }

/* Schedule */
.tabs { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: var(--s1); margin-bottom: var(--s5); scrollbar-width: thin; }
.tabs button {
    flex: 0 0 auto;
    border: 0;
    background: var(--paper);
    color: var(--ink);
    border-radius: 999px;
    padding: var(--s2) var(--s4);
    font: 700 var(--label) var(--font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; }
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s4); align-items: center; padding: var(--s3); border-bottom: 1px solid var(--line); border-radius: var(--radius); }
.day-list li.past { opacity: 0.55; }
.day-list li.live { background: #eef8ea; box-shadow: inset 4px 0 0 var(--brand); }
.day-list time { white-space: nowrap; font-weight: 700; color: var(--brand-dark); }
.day-list .show { display: flex; align-items: center; gap: var(--s3); }
.day-list .show img { width: 52px; height: 52px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.day-list .show a { color: var(--ink-strong); font-weight: 700; text-decoration: none; }
.day-list .now-badge { display: none; white-space: nowrap; font-size: var(--text-xs); font-weight: 700; color: #fff; background: #e53935; border-radius: 3px; padding: 0.05rem 0.4rem; text-transform: uppercase; margin-left: var(--s2); }
.day-list li.live .now-badge { display: inline-block; }
/* {{today}}: who presents today, and today's programmes as a timeline */
.today-presenters { margin-bottom: var(--s5); }
.today-presenters h3 { margin: 0 0 var(--s3); font-size: var(--label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.today-presenters ul { display: flex; flex-wrap: wrap; gap: var(--s4); list-style: none; padding: 0; margin: 0; }
.today-person { display: flex; flex-direction: column; align-items: center; gap: var(--s2); width: 6.5rem; text-align: center; font-size: var(--text-sm); font-weight: 600; color: inherit; text-decoration: none; }
.today-person img, .today-initial { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; border: 3px solid var(--brand); }
.today-initial { display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.8rem; font-weight: 700; }
a.today-person:hover img, a.today-person:hover .today-initial { box-shadow: 0 0 0 4px rgb(var(--brand-rgb) / 0.25); }
.today-timeline, .prose .today-timeline { list-style: none; padding: 0; margin: var(--s4) 0; position: relative; }
.prose .today-slot + .today-slot { margin-top: 0; }
.today-ready .today-timeline:not(.show-earlier) .today-slot.past { display: none; }   /* (site.js: Earlier today) */
.today-earlier { margin: var(--s3) 0 0 6.5rem; }
.today-earlier[hidden] { display: none; }
.today-timeline::before { content: ""; position: absolute; left: calc(5.25rem - 1px); top: var(--s3); bottom: var(--s3); width: 2px; background: var(--line); }
.today-slot { display: grid; grid-template-columns: 4rem 1fr; column-gap: 2.5rem; padding: var(--s2) 0; position: relative; transition: opacity 0.2s; }
.today-slot::before { content: ""; position: absolute; left: calc(5.25rem - 7px); top: calc(var(--s2) + 1.6rem); width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); }
.today-slot time { text-align: right; font-weight: 700; font-size: 1.1rem; color: var(--brand-dark); padding-top: 1.25rem; }
.today-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); background: var(--paper); border-radius: var(--radius); border-left: 4px solid transparent; }
.today-card img { width: 88px; height: 88px; object-fit: cover; border-radius: calc(var(--radius) * 0.75); flex-shrink: 0; }
.today-card h4 { margin: 0 0 var(--s1); font-size: 1.15rem; }
.today-card h4 a { color: inherit; text-decoration: none; }
.today-card h4 a:hover { color: var(--brand-dark); text-decoration: underline; }
.today-card p { margin: 0; }
.today-card .now-badge { display: none; font-size: var(--text-xs); font-weight: 700; color: #fff; background: #e53935; border-radius: 3px; padding: 0.05rem 0.4rem; text-transform: uppercase; }
.today-slot.live .now-badge { display: inline-block; }
.today-slot.live::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 6px rgb(var(--brand-rgb) / 0.2); }
.today-slot.live .today-card { background: var(--bg); border-left-color: var(--brand); box-shadow: var(--shadow); }
.today-slot.live time { color: var(--brand); }
.today-slot.past { opacity: 0.5; }
@media (max-width: 575.98px) {
    .today-slot { grid-template-columns: 3rem 1fr; column-gap: 1.75rem; }
    .today-timeline::before { left: calc(3.875rem - 1px); }
    .today-slot::before { left: calc(3.875rem - 7px); }
    .today-slot time { font-size: 0.95rem; }
    .today-card { padding: var(--s3); gap: var(--s3); }
    .today-card img { width: 56px; height: 56px; }
    .today-earlier { margin-left: 4.75rem; }
}

/* Recently played */
.played-list, .prose .played-list { list-style: none; padding: 0; margin: 0; }
.played-list li { display: grid; grid-template-columns: 4rem 1fr; gap: var(--s4); align-items: baseline; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.prose .played-list li + li { margin-top: 0; }
.played-list time { font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.played-song strong { display: block; font-size: 1.05rem; }
.played-song span { display: block; color: var(--muted); font-size: var(--text-sm); }
.played-list .played-none { display: block; border: 0; }
.played-list .played-programme { display: block; border: 0; padding: var(--s5) 0 var(--s1); font-size: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.played-list .played-programme:first-child { padding-top: 0; }

/* Events */
.events-list { display: grid; gap: var(--s4); margin: var(--s4) 0; }
.event-card { display: grid; grid-template-columns: auto auto 1fr; gap: var(--s4); align-items: start; padding: var(--s4); background: var(--paper); border-radius: var(--radius); box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); }
.event-card[hidden] { display: none; }
.event-date { width: 4.25rem; text-align: center; border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: var(--shadow); }
.event-date span { display: block; background: var(--brand); color: #fff; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.2rem 0; }
.event-date strong { display: block; font-size: 1.8rem; line-height: 1.4; color: var(--ink-strong, inherit); }
.event-image img { width: 160px; height: 110px; object-fit: cover; border-radius: calc(var(--radius) * 0.75); display: block; }
.event-body h3 { margin: 0 0 var(--s1); }
.event-body p { margin: 0 0 var(--s2); }
.event-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.prose .event-actions .button, .event-actions .button { margin: 0; }
.event-live { display: inline-block; margin-bottom: var(--s1); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; color: #fff; background: #e53935; border-radius: 3px; padding: 0.1rem 0.45rem; }
.event-card.past { box-shadow: none; }
.event-card.past .event-date span { background: var(--muted); }
.events-none { text-align: center; padding: var(--s6, 3rem) var(--s4); background: var(--paper); border-radius: var(--radius); }
.events-none > i { font-size: 2.5rem; color: var(--brand); margin-bottom: var(--s3); }
.events-none p { margin: 0 0 var(--s2); }
.events-social { display: flex; justify-content: center; gap: var(--s3); font-size: 1.4rem; }
.events-social a { color: var(--brand-dark); }
.events-recent-heading { margin-top: var(--s6, 3rem); }
@media (max-width: 767.98px) {
    .event-card { grid-template-columns: auto 1fr; }
    .event-image { grid-column: 1 / -1; order: -1; }
    .event-image img { width: 100%; height: 160px; }
}

.special-note { background: #fff7e0; border-left: 4px solid #e0a800; padding: var(--s3) var(--s4); border-radius: var(--radius); margin-bottom: var(--s4); }

/* Show page */
.show-head { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 768px) { .show-head { grid-template-columns: 280px 1fr; } }
.show-head img { border-radius: var(--radius); }
.airtimes { list-style: none; padding: 0; margin: 0; }
.airtimes li { padding: var(--s2) 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.panel:not(.dark) .airtimes li { border-color: var(--line); }

/* Episode */
.player-embed { margin: 0 0 var(--s5); }
.player-embed iframe { width: 100%; height: 120px; border: 0; border-radius: var(--radius); }
.player-embed audio { width: 100%; }

/* Lists and filters */
.filters { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s5); align-items: center; }
.filters select, .filters input[type="search"], .form input, .form textarea, .form select {
    font: inherit;
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cccccc;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}
.filters input[type="search"] { min-width: 14rem; }
.filters .filters { margin: 0; }
.filters select, .filters input[type="search"] { height: 2.75rem; padding-block: 0; }
.pagination { display: flex; gap: var(--s2); justify-content: center; margin: var(--s6) 0 0; align-items: center; }
.pagination a, .pagination span { padding: var(--s2) var(--s3); border-radius: var(--radius); }
.pagination a { background: var(--paper); text-decoration: none; font-weight: 700; }
details.block > summary { cursor: pointer; }
.details-title h2 { display: inline; }

/* Forms */
.form { display: grid; gap: var(--s4); max-width: 36rem; }
.form label { display: grid; gap: var(--s1); font-weight: 700; font-size: var(--text-sm); }
.form textarea { min-height: 8rem; resize: vertical; width: 100%; }
.form input:not([type="checkbox"]):not([type="radio"]) { width: 100%; }
.form .hp { position: absolute; left: -5000px; }
.form fieldset.options { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.form fieldset.options legend { font-weight: 700; font-size: var(--text-sm); padding: 0; margin-bottom: var(--s2); width: 100%; }
.form label.option {
    display: inline-flex; align-items: center; gap: var(--s2); font-weight: 400; font-size: var(--text);
    border: 1px solid #cccccc; border-radius: var(--radius); padding: var(--s2) var(--s3); cursor: pointer;
}
.form label.option:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.form fieldset.options .hint { width: 100%; }
.form label.option input { padding: 0; margin: 0; }
.form .hint { font-weight: 400; font-size: var(--text-sm); color: var(--muted); }
.form label.check { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); }
.form label.check input { flex: 0 0 auto; width: auto; margin: 0; transform: translateY(0.1em); }
.form label.check span:not(.hint) { flex: 1 1 0; }
.form label.check .hint { flex-basis: 100%; }
.notice { padding: var(--s3) var(--s4); border-radius: var(--radius); margin-bottom: var(--s4); }
.notice.success { background: #e7f6e2; color: #1e5e18; }
.notice.error { background: #fdecea; color: #8a1c13; }

/* Search results */
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.search-results .kind { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-dark); }

/* ---------------------------------------------------------------- footer */

.site-footer {
    position: relative;
    color: var(--on-dark-muted);
    background: var(--dark) var(--hero-image) center / cover no-repeat;
    margin-top: var(--s6);
}
.site-footer::before { content: ""; position: absolute; inset: 0; background: rgba(20, 20, 20, 0.93); }
/* Light and brand-colour footers (Website -> Design). */
.site-footer.footer-light { color: var(--ink); background: #f3f4f1; border-top: 1px solid var(--line); }
.site-footer.footer-brand { color: #fff; background: var(--brand); }
.footer-light::before, .footer-brand::before { display: none; }
.footer-light h3, .footer-light .wordmark { color: var(--ink-strong); }
.footer-light a { color: var(--ink-strong); }
.footer-light a:hover { color: var(--brand-dark); }
.footer-light .social a { background: rgba(0, 0, 0, 0.07); color: var(--ink-strong); }
.footer-light .copyright { border-top-color: var(--line); }
.footer-brand h3, .footer-brand a, .footer-brand .wordmark { color: #fff; }
.footer-brand a:hover { color: #fff; text-decoration: underline; }
.site-footer > * { position: relative; }
.footer-grid { display: grid; gap: var(--s6); padding-block: var(--s6) var(--s5); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: var(--label); text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--brand-light); }
.site-footer address { font-style: normal; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 0.15rem 0; }
.footer-logo { height: 52px; width: auto; margin-bottom: var(--s4); }
.social { display: flex; gap: var(--s2); margin-top: var(--s4); }
.social a { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); align-items: center; justify-content: center; color: #fff; }
.social a:hover { background: var(--brand); color: #fff; }
.copyright { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-block: var(--s4); font-size: var(--text-sm); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); }

/* ---------------------------------------------------------------- player */

.player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--player-height);
    background: var(--dark);
    color: var(--on-dark);
    border-top: 3px solid var(--brand);
    z-index: 100;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
}
.player-bar .wrap { display: flex; align-items: center; gap: var(--s3); height: 100%; }
.play-toggle {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.play-toggle:hover { background: var(--brand-light); color: var(--dark); }
.play-toggle i { font-size: 16px; }
.play-toggle .fa-play, .big-play .fa-play { margin-left: 0.12em; }   /* optical centre */
.play-toggle .icon-pause, .player-bar.playing .play-toggle .icon-play { display: none; }
.player-bar.playing .play-toggle .icon-pause { display: block; }
.player-bar.loading .play-toggle { opacity: 0.7; }
.player-info { min-width: 0; flex: 1; line-height: 1.25; }
.player-info .live { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-light); }
.player-info .show-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info .show-name a { color: #fff; text-decoration: none; }
.player-info .song { font-size: var(--text-sm); color: var(--on-dark-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-next { display: none; font-size: var(--text-sm); color: var(--on-dark-muted); text-align: right; line-height: 1.3; }
.player-next strong { display: block; color: var(--on-dark); }
.player-volume { display: none; width: 90px; accent-color: var(--brand-light); }
@media (min-width: 768px) { .player-next { display: block; max-width: 16rem; } .player-volume { display: block; } }

/* Full-page player */

/* Dev copies and drafts */
.test-banner { background: #e0a800; color: var(--ink-strong); text-align: center; font-size: var(--text-sm); font-weight: 700; padding: var(--s2) var(--s4); }
.draft-flag { display: inline-block; background: #e0a800; color: var(--ink-strong); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; padding: 0.05rem 0.4rem; border-radius: 3px; vertical-align: middle; }

/* Loading between pages */
body.navigating main { opacity: 0.55; transition: opacity 0.15s; }

/* ---------------------------------------------------------------- a form in a card (the home page, and any page with {{form:...}}) */

.form-card { margin-top: var(--s5); padding: var(--s5); background: var(--paper); border-radius: var(--radius); border-top: 4px solid var(--brand); }
.form-card h2 { font-size: var(--h4); margin: 0 0 var(--s1); }
.form.compact { max-width: none; gap: var(--s3); margin-top: var(--s4); }
.form.compact textarea { min-height: 5rem; }
.form.compact > p { margin: 0; }

/* {{forms:...}}: a choice of forms, one button each */
.form-choice-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.form-choice-button {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s4);
    padding: var(--s5); background: var(--paper); border-radius: var(--radius); border: 2px solid transparent;
    color: inherit; text-decoration: none; box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, opacity 0.15s, background-color 0.15s;
}
.form-choice-icon {
    width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand); color: #fff; font-size: 1.4rem; box-shadow: 0 6px 18px rgb(var(--brand-rgb) / 0.3);
}
.form-choice-text strong { display: block; font-size: 1.3rem; line-height: 1.25; color: var(--brand-dark); }
.form-choice-text span { display: block; margin-top: var(--s1); font-size: var(--text-sm); color: var(--muted); }
.form-choice-arrow { color: var(--brand); transition: transform 0.2s; }
.form-choice-button:hover, .form-choice-button:focus-visible { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 12px 28px rgb(0 0 0 / 0.1); }
.form-choice-button[aria-expanded="true"] { border-color: var(--brand); background: rgb(var(--brand-rgb) / 0.07); }
.form-choice-button[aria-expanded="true"] .form-choice-arrow { transform: rotate(90deg); }
.form-choice:has([aria-expanded="true"]) .form-choice-button:not([aria-expanded="true"]) { opacity: 0.7; }
@media (prefers-reduced-motion: reduce) { .form-choice-button, .form-choice-arrow { transition: none; } .form-choice-button:hover { transform: none; } }
.form-choice-panel .form-card { margin-top: var(--s4); }
.form-choice-panel .form.compact { margin-top: 0; }

/* ---------------------------------------------------------------- big play button */

.big-play {
    width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer;
    display: inline-grid; place-items: center; flex-shrink: 0;
    background: var(--brand); color: #fff;
    box-shadow: 0 6px 20px rgb(var(--brand-rgb) / 0.35);
    transition: transform 0.15s ease, background 0.15s ease;
}
.big-play:hover { background: var(--brand-dark); }
.big-play:active { transform: scale(0.96); }
.big-play:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 4px; }
.big-play i { font-size: 26px; }
.big-play .icon-pause, .big-play[data-state="playing"] .icon-play, .big-play[data-state="loading"] .icon-play { display: none; }
.big-play[data-state="playing"] .icon-pause, .big-play[data-state="loading"] .icon-pause { display: block; }
.big-play[data-state="loading"] { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 14px rgb(var(--brand-light-rgb) / 0.15); } }
.big-play-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--label); }
.listen-block { display: flex; align-items: center; gap: var(--s4); margin: var(--s4) 0; color: var(--ink); text-decoration: none; }
.listen-block > span:last-child { display: flex; flex-direction: column; text-align: left; }
.listen-block .big-play-label { color: var(--brand-dark); }
.listen-block:hover .big-play { background: var(--brand-dark); }

/* ---------------------------------------------------------------- the listening app (/listen/) */

.app-page .site-header, .app-page .site-footer, .app-page:not(.with-player) .player-bar { display: none; }
.app-page:not(.with-player) { padding-bottom: 0; }   /* no player bar here, so no room kept for it */
.app-page { background: var(--dark); }
.app-page main { min-height: 100vh; min-height: 100dvh; background: var(--dark) var(--hero-image) center top / cover fixed; position: relative; }
.app-page main::before { content: ""; position: fixed; inset: 0; background: linear-gradient(180deg, rgba(20, 20, 20, 0.82), rgba(20, 20, 20, 0.95) 60%); }
.app {
    position: relative; max-width: 30rem; margin: 0 auto; color: #fff; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: var(--s4);
    padding: max(var(--s4), env(safe-area-inset-top)) 16px max(var(--s6), env(safe-area-inset-bottom));
}
.app-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.app-logo { height: 44px; width: auto; }
.app-top .lang-switch { color: #fff; }
.app-now { margin-top: var(--s4); }
.app-label { display: inline-flex; align-items: center; gap: var(--s2); color: var(--brand-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--label); }
.app-now h1 a { color: inherit; text-decoration: none; }
.app-now h1 { color: #fff; font-size: clamp(2rem, 8vw, 2.6rem); margin: var(--s2) 0 var(--s1); }
.app-song { color: #fff; font-size: 1.05rem; margin: var(--s2) 0 0; min-height: 1.6em; }
.app-play { width: 148px; height: 148px; margin-top: var(--s3); }
.app-play i { font-size: 52px; }
.app .big-play-label { color: #fff; }
.app-card { width: 100%; text-align: left; background: rgba(255, 255, 255, 0.96); color: var(--ink); border-radius: 14px; padding: var(--s4) var(--s5); }
.app-card h2 { font-size: var(--h4); margin: 0 0 var(--s2); }
.app-card .upnext li:first-child { padding-top: 0; }
details.app-card summary { cursor: pointer; list-style: none; }
details.app-card summary::-webkit-details-marker { display: none; }
details.app-card summary h2 { display: flex; justify-content: space-between; align-items: center; margin: 0; }
details.app-card summary h2::after { content: "+"; color: var(--brand); font-size: 1.6rem; line-height: 1; }
details.app-card[open] summary h2::after { content: "\2212"; }
details.app-card summary .small { color: var(--muted); }
details.app-card .form { margin-top: var(--s4); }
.app-actions { display: flex; flex-direction: column; align-items: center; gap: var(--s3); width: 100%; }
.app-actions .button { min-width: 14rem; }
.app-actions .button.ghost { color: #fff; }
.app-site-link { color: var(--on-dark-muted); font-size: var(--text-sm); }
.app-site-link:hover { color: var(--brand-light); }
.prose .listen-block { justify-content: center; }
/* The website installed as an app, from before the app had its own address (html.old-app): where it is now. */
.app-moved { display: none; }
.old-app .app-moved { display: block; position: relative; z-index: 130; background: var(--brand); text-align: center;
                      padding: calc(env(safe-area-inset-top) + var(--s3)) 16px var(--s3); }
.old-app .app-moved a { color: #fff; font-weight: 700; }

/* ---------------------------------------------------------------- the listening app (html.in-app)
   The app's own address (website.app): the listen, schedule, Listen Again and message pages, and the shows'
   and programmes' pages reached from them. No website header or footer, tabs along the bottom, and the player
   bar above them. Any other page opens in the browser over it. */

.app-tabs { display: none; }
.in-app { --app-chrome: #141414; --tabs-height: 58px; --tabs-space: calc(var(--tabs-height) + env(safe-area-inset-bottom)); }
.in-app .site-footer, .in-app .test-banner, .in-app .skip-link { display: none; }
.in-app body { padding-top: env(safe-area-inset-top); padding-bottom: calc(var(--player-height) + var(--tabs-space)); }
.in-app body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top);
                       background: var(--app-chrome); z-index: 120; }   /* under the phone's status bar */
/* The same bar at the top of every app page: the logo, and the switch to another language. */
.in-app .site-header .topbar { display: none; }   /* the page title (the header's hero) stays */
.app-bar { position: sticky; top: env(safe-area-inset-top); z-index: 100; background: var(--app-chrome);
           border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 10px 16px; }
.app-bar .app-top { max-width: 30rem; margin: 0 auto; }
.in-app .app { padding-top: var(--s4); }
.in-app .player-bar { bottom: var(--tabs-space); }
.in-app .app-page { padding-top: 0; padding-bottom: var(--tabs-space); }
.in-app .app-page.with-player { padding-bottom: calc(var(--player-height) + var(--tabs-space)); }
.in-app .app { padding-bottom: var(--s6); }
.in-app .app-tabs {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    height: var(--tabs-space); padding-bottom: env(safe-area-inset-bottom);
    background: var(--app-chrome); border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.app-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
              color: var(--on-dark-muted); text-decoration: none; font-size: 0.68rem; font-weight: 600; line-height: 1.1;
              text-align: center; padding: 0 2px; -webkit-tap-highlight-color: transparent; }
.app-tabs a i { font-size: 1.15rem; }
.app-tabs a[aria-current="page"] { color: var(--brand-light); }
.app-install p { margin: 0 0 var(--s3); }
.app-install .install-steps { margin: var(--s3) 0 0; max-width: none; background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.app-message-card, .app-donate-card { margin-top: var(--s4); }
.app-donate-card h1 { font-size: var(--h3); margin: 0 0 var(--s3); }
.app-donate { display: block; width: 100%; height: calc(100vh - 24rem); height: calc(100dvh - 24rem); min-height: 26rem; border: 0; border-radius: var(--radius); background: #fff; }
.app-donate-card p { margin-top: var(--s3); }
.app-message-card h1 { font-size: var(--h3); margin: 0 0 var(--s2); }
.app-message-card .form { margin-top: var(--s4); }

/* ---------------------------------------------------------------- the screen page (/screen/): a television */

/* Everything is sized in --u: a hundredth of the height of a 16:9 picture that fits the display, so the
   page keeps its proportions on any screen (on a 16:9 one, --u is 1vh). */
.screen-page { --u: min(1vh, 0.5625vw); background: #000; padding-bottom: 0; overflow: hidden; }
.screen-page .site-header, .screen-page .site-footer, .screen-page .player-bar, .screen-page .test-banner { display: none; }
.screen-page.no-pointer, .screen-page.no-pointer * { cursor: none; }
/* Two columns: the programme on the left; the clock, date, what is next and the play button down the right. */
.screen { position: fixed; inset: 0; margin: auto; width: calc(177.78 * var(--u)); height: calc(100 * var(--u));
          box-sizing: border-box; color: #fff; display: flex; padding: calc(5 * var(--u)) calc(6 * var(--u)); gap: calc(5 * var(--u)); }
.screen-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(3 * var(--u)); }
.screen-logo { height: calc(16 * var(--u)); max-width: 100%; width: auto; align-self: flex-start; }
.screen-main .wordmark { font-size: calc(5 * var(--u)); font-weight: 700; }
.screen-now { min-height: 0; display: flex; align-items: stretch; gap: calc(5 * var(--u)); }
.screen-picture { width: calc(56 * var(--u)); height: calc(56 * var(--u)); flex: none; object-fit: cover;
                  border-radius: calc(2 * var(--u)); background: #111; }
.screen-picture.is-logo { object-fit: contain; padding: calc(7 * var(--u)); box-sizing: border-box; }
/* As tall as the picture, its lines at the bottom: a longer description pushes the name up into the space above. */
.screen-text { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
/* Every language at once, the first first: labels side by side, titles and descriptions one under the other. */
.screen-label { display: flex; align-items: center; flex-wrap: wrap; gap: var(--u); color: var(--brand-light); font-weight: 700;
                text-transform: uppercase; letter-spacing: 0.08em; font-size: calc(2.2 * var(--u)); }
.screen-label [lang] + [lang]::before { content: "/"; margin: 0 0.5em; opacity: 0.6; }
.screen-label .live-dot { width: calc(1.4 * var(--u)); height: calc(1.4 * var(--u)); }
.screen-on-air { margin-top: auto; font-size: calc(3 * var(--u)); }
.screen-on-air .live-dot { width: calc(1.8 * var(--u)); height: calc(1.8 * var(--u)); }
.screen-titles { margin: 0 0 calc(1.2 * var(--u)); }
.screen h1 { color: #fff; font-size: calc(5.6 * var(--u)); line-height: 1.1; margin: 0; }
.screen-time { font-size: calc(2.8 * var(--u)); color: var(--on-dark-muted); margin: 0 0 calc(2 * var(--u)); }
.screen-description { margin: 0 0 calc(2 * var(--u)); max-width: 64ch; }
.screen-description p { font-size: calc(2.5 * var(--u)); line-height: 1.35; margin: 0 0 calc(0.8 * var(--u));
                        display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.screen-description p:empty { display: none; }
/* Only one language has a description: it may run longer. */
.screen-description:not(:has(p:not(:empty):not([hidden]) ~ p:not(:empty):not([hidden]))) p { -webkit-line-clamp: 7; }
.screen-song { font-size: calc(3.6 * var(--u)); font-weight: 700; margin: 0; min-height: 1.3em; }
.screen-song i { color: var(--brand-light); }
.screen-progress { height: calc(0.8 * var(--u)); background: rgba(255, 255, 255, 0.15); border-radius: var(--u); overflow: hidden; flex: none; }
.screen-progress span { display: block; height: 100%; width: 0; background: var(--brand); }
.screen-side { width: calc(36 * var(--u)); flex: none; display: flex; flex-direction: column; align-items: center; text-align: center;
               border-left: 1px solid rgba(255, 255, 255, 0.15); padding-left: calc(5 * var(--u)); }
.screen-clock { width: calc(30 * var(--u)); height: calc(30 * var(--u)); flex: none; }
.screen-clock .second { fill: var(--brand); opacity: 0.18; }
.screen-clock .second.on { opacity: 1; }
.screen-clock .marker { fill: var(--brand-light); }
.screen-clock text { fill: #fff; font-family: inherit; font-weight: 700; font-variant-numeric: tabular-nums; }
.screen-clock-time { font-size: 46px; letter-spacing: -1px; }
.screen-clock-seconds { font-size: 26px; }
.screen-date { margin-top: calc(1.5 * var(--u)); font-size: calc(2.3 * var(--u)); font-weight: 700; line-height: 1.35; }
.screen-next { margin-top: auto; width: 100%; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: calc(3 * var(--u)); }
.screen-next .screen-label { justify-content: center; }
.screen-next-start { font-size: calc(4 * var(--u)); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: var(--u); }
.screen-next-titles { font-size: calc(2.8 * var(--u)); font-weight: 700; line-height: 1.25; }
.screen-next-titles [hidden] { display: none; }
.screen-listen { margin-top: calc(4 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(1.5 * var(--u));
                 color: var(--on-dark-muted); font-size: calc(2.2 * var(--u)); }
.screen-play { width: calc(10 * var(--u)); height: calc(10 * var(--u)); }
.screen-play i { font-size: calc(3.8 * var(--u)); }
/* Playing: the button steps back; stopped (the display did not allow sound to start by itself), it asks to be pressed. */
.screen-play[data-state="playing"] { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.screen-play[data-state="stopped"], .screen-play:not([data-state]) { animation: pulse 1.8s infinite; }

/* ---------------------------------------------------------------- the home page's own text */

.home-text { padding-top: 0; }
.home-text h2 { margin: var(--s7) 0 var(--s5); text-transform: uppercase; font-weight: 400; letter-spacing: 0.01em; }
.home-text h2:first-child { margin-top: 0; }
.home-text h2 strong { font-weight: 700; color: var(--brand); }
.home-text > .wrap > p:not(.more-link), .home-text > .wrap > ul, .home-text > .wrap > ol { max-width: 46rem; }
.more-link { margin: var(--s4) 0 0; text-align: right; font-size: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.section-text { margin-bottom: var(--s5); }

.way .big i { font-size: 2rem; }
.song .fa-music, .app-song .fa-music, [data-onair-song] .fa-music, [data-now-song] .fa-music { font-size: 0.85em; margin-right: 0.3em; opacity: 0.8; }
.more-link i, .flush-top i { margin-left: 0.15em; }

/* ---------------------------------------------------------------- services and equipment */

.services { --cols: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s4); margin: var(--s4) 0; }
/* As many columns as the number of services shares out evenly (website/blocks.py); a shorter last row is centred. */
.services.cols-2 { --cols: 2; } .services.cols-3 { --cols: 3; } .services.cols-4 { --cols: 4; }
@media (max-width: 991px) { .services.cols-3, .services.cols-4 { --cols: 2; } }
@media (max-width: 575px) { .services { --cols: 1 !important; } }
.services > .service { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--s4)) / var(--cols)); }
.service { padding: var(--s5); background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); }
.service-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #eef8ea; color: var(--brand); font-size: 22px; margin-bottom: var(--s3); }
.service h3 { margin: 0 0 var(--s2); font-size: var(--h4); }
.service p { margin: 0; }
.equipment { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: var(--s4) 0; }
.equipment h3 { margin: 0 0 var(--s2); }   /* a studio, or Other equipment */
.equipment h4 { font-size: var(--label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-dark); margin: var(--s3) 0 var(--s1); }
.equipment h3 + h4 { margin-top: 0; }
.equipment li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.equipment .tag { margin-left: var(--s1); }
.form .optional { font-weight: 400; color: var(--muted); }
.repeat-badge { font-size: var(--text-xs); font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0.05rem 0.4rem; text-transform: uppercase; margin-left: var(--s2); }
.airtimes .airtime-note { display: block; font-size: var(--text-xs); color: var(--on-dark-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.tracklist { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.tracklist li { display: flex; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.tracklist .time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.5rem; }

/* How to add the app on an iPhone, under its Install button. */
.install-steps { width: 100%; max-width: 22rem; margin: 0; padding: var(--s3) var(--s4) var(--s3) calc(var(--s4) + 1.2em);
                 background: rgba(255,255,255,.08); border-radius: var(--radius); color: #fff; text-align: left; }
.install-steps li + li { margin-top: var(--s2); }
