/* ==========================================================================
   BOOK PUB — a Victorian pub reading room, built by a master joiner.
   One stylesheet. Ornament lives in the joinery: rules, brackets, plaques.
   ========================================================================== */

:root {
  --ink:        #1b1611;   /* warm near-black: page */
  --ink-2:      #241d16;   /* raised panels on dark */
  --ink-3:      #2e261c;
  --parchment:  #efe4cd;   /* paper panels */
  --parchment-hi: #f6efdd; /* highlights, text on dark */
  --brass:      #b28a3d;   /* rules, labels (on dark) */
  --brass-hi:   #d0a95a;   /* hover / focus on dark */
  --brass-ink:  #7a5a1c;   /* brass on parchment: AA */
  --oxblood:    #6e2226;
  --oxblood-hi: #8a2c31;
  --green:      #2e4638;
  --text:       #efe4cd;   /* body text on dark */
  --muted:      #b9ab8f;   /* secondary text on dark */
  --ink-text:   #1f1912;   /* text on parchment */
  --ink-muted:  #5a4c38;

  --f-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-body:    "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-label:   "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;

  --wrap: 62rem;
  --gutter: 1rem;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .4  0 0 0 0 .25  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; }
main { flex: 1 0 auto; width: 100%; }
body {
  margin: 0;
  background-color: var(--ink);
  background-image: var(--grain);
  background-blend-mode: soft-light;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.2rem;
  line-height: 1.65;
  overflow-x: hidden;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe, audio { max-width: 100%; }
a { color: var(--brass-hi); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--parchment-hi); }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
.paper :focus-visible { outline-color: var(--oxblood); }
::selection { background: var(--brass); color: var(--ink); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--parchment-hi); color: var(--ink-text); padding: .6rem 1rem; z-index: 50; font-family: var(--f-label); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right)); }
.muted { color: var(--muted); }
.center-note { text-align: center; max-width: 36rem; margin-inline: auto; color: var(--muted); }

/* ---- Type ---- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.12; margin: 0; overflow-wrap: anywhere; color: var(--parchment-hi); }
h2 { font-size: clamp(1.9rem, 6vw, 2.75rem); }
h3 { font-size: 1.5rem; font-weight: 600; }
p { margin: 0 0 1em; }
.eyebrow, .smallcaps, .nav, .btn, .topbar, .vintage-date, .vintage-no, .tap-facts dt, .batch-kind, .hd-mon, .hd-year, .roster-sub, .onair, .footer-nav {
  font-family: var(--f-label);
}
.eyebrow { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin: 0 0 .6rem; font-weight: 500; }
.eyebrow-ink { color: var(--brass-ink); }
.smallcaps { font-variant: small-caps; text-transform: lowercase; letter-spacing: .08em; font-size: 1.02em; }
.h-ink { color: var(--ink-text); }
.lede { font-size: clamp(1.7rem, 5.6vw, 2.6rem); font-weight: 600; font-style: italic; max-width: 22em; }
.lede-sub { max-width: 38rem; color: var(--muted); margin-top: 1rem; }
.lede-block { padding-top: 2.25rem; padding-bottom: 1.5rem; }

/* ---- Triple rule (thick-thin-thick) ---- */
.rule-triple { box-sizing: content-box; height: 5px; border-block: 2px solid var(--brass); background: linear-gradient(var(--brass), var(--brass)) center / 100% 1px no-repeat; width: 100%; max-width: var(--wrap); margin-inline: auto; }

/* ---- Masthead ---- */
.topbar { display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem .7rem; padding: .5rem var(--gutter); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid rgba(178,138,61,.35); }
.masthead-inner { text-align: center; padding-block: 1.5rem 1rem; }
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: .5rem; text-decoration: none; color: var(--parchment-hi); }
.brand:hover { color: var(--parchment-hi); }
.emblem { display: block; width: 5.25rem; height: 5.25rem; color: var(--brass); }
.emblem svg { width: 100%; height: 100%; display: block; }
.wordmark { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.6rem, 11vw, 4.4rem); letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.motto { font-family: var(--f-display); font-style: italic; font-weight: 600; color: var(--muted); font-size: 1.15rem; margin: .5rem 0 0; }

.nav ul { list-style: none; margin: 0 auto; padding-block: .25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.nav li { border-bottom: 1px solid rgba(178,138,61,.25); }
.nav a { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .4rem .25rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--parchment); border-bottom: 2px solid transparent; text-align: center; }
.nav a:hover { color: var(--brass-hi); }
.nav a[aria-current="page"] { color: var(--brass-hi); border-bottom-color: var(--brass); }
.nav-full { overflow-wrap: normal; white-space: nowrap; }
.nav .onair-nav { display: none; }

/* ---- Buttons: sharp rectangles, brass hairline ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: .7rem 1.2rem; border: 1px solid var(--brass); border-radius: 0; background: transparent; color: var(--parchment-hi); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; line-height: 1.3; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover, .btn:focus-visible { background: var(--brass); color: var(--ink); }
.btn-small { padding: .5rem .9rem; font-size: .68rem; }

/* ---- Sections ---- */
.section { padding-block: 2.25rem 0.5rem; }
.section-head { margin-bottom: 1.25rem; }
.section-head h2::after { content: ""; display: block; width: 3.5rem; height: 2px; background: var(--brass); margin-top: .7rem; }
.fleuron { display: flex; align-items: center; gap: 1rem; color: var(--brass); font-size: 1.5rem; line-height: 1; margin: 0 0 1.25rem; font-variant-emoji: text; }
.fleuron::before, .fleuron::after { content: ""; flex: 1; height: 1px; background: rgba(178,138,61,.5); }

/* ---- Frames: double hairline + corner brackets ---- */
.frame { position: relative; background: var(--ink-2); border: 1px solid var(--brass); box-shadow: inset 0 0 0 4px var(--ink-2), inset 0 0 0 5px rgba(178,138,61,.55); padding: 1.5rem 1.25rem; }
.bracketed::before { content: ""; position: absolute; inset: 10px; pointer-events: none;
  --b: var(--brass-hi);
  background:
    linear-gradient(var(--b), var(--b)) top left / 16px 2px no-repeat,
    linear-gradient(var(--b), var(--b)) top left / 2px 16px no-repeat,
    linear-gradient(var(--b), var(--b)) top right / 16px 2px no-repeat,
    linear-gradient(var(--b), var(--b)) top right / 2px 16px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom right / 2px 16px no-repeat; }

/* ---- Parchment paper panels ---- */
.paper { position: relative; background-color: var(--parchment); background-image: var(--grain); background-blend-mode: multiply; color: var(--ink-text); padding: 1.75rem 1.25rem; border: 1px solid #c9b78f; box-shadow: inset 0 0 0 4px var(--parchment), inset 0 0 0 5px rgba(122,90,28,.5); }
.paper a { color: var(--oxblood); }
.paper a:hover { color: #3d1013; }
.prose { max-width: 44rem; margin-inline: auto; }
.prose p { overflow-wrap: break-word; }
.dropcap > h2 + p::first-letter { font-family: var(--f-display); font-weight: 700; font-size: 4.4em; line-height: .78; float: left; padding: .08em .1em 0 0; color: var(--oxblood); }
.paper .h-ink::after { content: ""; display: block; width: 3.5rem; height: 2px; background: var(--brass-ink); margin: .6rem 0 1.1rem; }
.pull { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.1rem; border-left: 3px solid var(--oxblood); font-family: "IM Fell English", var(--f-display); font-style: italic; font-size: 1.3rem; line-height: 1.45; }
.pull p { margin: 0; }
.signoff { text-align: right; color: var(--ink-muted); margin: 0; }

/* ---- What's on Tap ---- */
.tap { text-align: left; }
.tap-date { font-size: clamp(1.8rem, 7vw, 2.7rem); display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .9rem; }
.tap-time { font-family: var(--f-label); font-size: .95rem; font-weight: 500; letter-spacing: .16em; color: var(--brass); }
.tap-book { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: clamp(1.4rem, 5vw, 1.9rem); line-height: 1.2; margin: .9rem 0 .2rem; overflow-wrap: anywhere; color: var(--parchment-hi); }
.tap-author { color: var(--muted); }
.tap-facts { margin: 1rem 0 1.4rem; display: grid; gap: .6rem; }
.tap-facts div { display: grid; grid-template-columns: 5.2rem 1fr; gap: .75rem; align-items: baseline; border-top: 1px solid rgba(178,138,61,.3); padding-top: .6rem; }
.tap-facts dt { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.tap-facts dd { margin: 0; overflow-wrap: anywhere; }

/* ---- House rules plaque ---- */
.plaque { padding: 1.75rem 1.25rem 1.5rem; }
.rules { list-style: none; counter-reset: rule; margin: 0 auto; padding: 0; max-width: 46rem; }
.rules li { counter-increment: rule; position: relative; padding: .8rem 0 .8rem 2.9rem; border-top: 1px solid rgba(178,138,61,.3); overflow-wrap: break-word; }
.rules li:first-child { border-top: 0; }
.rules li::before { content: counter(rule, upper-roman); position: absolute; left: 0; top: .95rem; width: 2.2rem; font-family: var(--f-label); font-size: .85rem; letter-spacing: .08em; color: var(--brass); }

/* ---- On the Horizon ---- */
.horizon { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.horizon-item { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 1rem; background: var(--ink-2); border: 1px solid rgba(178,138,61,.5); padding: 1rem; }
.horizon-date { text-align: center; border: 1px solid var(--brass); padding: .5rem .2rem; align-self: start; display: flex; flex-direction: column; line-height: 1.1; }
.hd-mon { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.hd-day { font-family: var(--f-display); font-weight: 700; font-size: 2.2rem; color: var(--parchment-hi); line-height: 1.05; }
.hd-year { font-size: .62rem; letter-spacing: .16em; color: var(--muted); }
.horizon-body h3 { font-size: 1.35rem; font-style: italic; }
.byline { margin: .3rem 0 .2rem; color: var(--muted); }
.meta { color: var(--brass-hi); font-size: .98rem; margin-bottom: .3rem; }
.note { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---- The Cellar ---- */
.cellar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.vintage { padding: 1.4rem 1.15rem 1.2rem; display: flex; flex-direction: column; }
.vintage-top { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.vintage-date { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.vintage-no { font-size: .66rem; letter-spacing: .16em; color: var(--muted); }
.vintage h3 { font-size: 1.4rem; font-style: italic; }
.vintage .byline { margin-top: .4rem; }
.vintage .note { margin-top: .5rem; }

/* ---- Bonus batch ---- */
.batch { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(178,138,61,.45); }
.batch li { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); column-gap: 1rem; padding: .85rem 0; border-bottom: 1px solid rgba(178,138,61,.3); }
.batch-kind { grid-row: span 2; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); padding-top: .35rem; }
.batch-title { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; color: var(--parchment-hi); }
.batch-by { color: var(--muted); font-size: 1.02rem; }

/* ---- Debate page ---- */
.onair-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.4rem 0 0; }
.resolution { padding: 2.2rem 1.4rem; text-align: center; }
.resolution-text { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: clamp(1.5rem, 5.4vw, 2.5rem); line-height: 1.25; color: var(--parchment-hi); margin: 0 auto 1.2rem; max-width: 30em; overflow-wrap: break-word; }
.resolution-meta { color: var(--muted); margin: 0 0 .4rem; font-size: 1.05rem; }
.order { margin: 1rem 0 0; padding-left: 1.4rem; }
.order li { margin-bottom: .6rem; padding-left: .25rem; }
.order li::marker { font-family: var(--f-label); font-size: .85em; color: var(--brass-ink); }
.roster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.roster-col { text-align: center; padding: 1.7rem 1.2rem; }
.roster-col h3 { font-size: 1.9rem; letter-spacing: .04em; }
.roster-sub { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin: .35rem 0 1rem; }
.roster-col ul { list-style: none; margin: 0; padding: 0; }
.roster-col li { padding: .55rem 0; border-top: 1px solid rgba(178,138,61,.3); font-size: 1.25rem; }
.past-res { list-style: none; margin: 0; padding: 0; }
.past-res li { padding: 1rem 0; border-top: 1px solid rgba(178,138,61,.35); }
.past-res .eyebrow { display: block; }
.past-res-text { display: block; font-family: var(--f-display); font-style: italic; font-size: 1.3rem; margin-bottom: .3rem; }

/* ---- ON AIR sign ---- */
.onair { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .7rem; border: 1px solid rgba(178,138,61,.5); color: var(--muted); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; }
.onair-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #6b6150; flex: none; }
.onair[data-state="on"] { background: var(--oxblood); border-color: var(--oxblood-hi); color: var(--parchment-hi); }
.onair[data-state="on"] .onair-dot { background: var(--parchment-hi); animation: pulse 1.6s ease-in-out infinite; }
.onair-big { font-size: .8rem; padding: .55rem 1rem; }
.onair-nav { padding: .15rem .45rem; font-size: .56rem; letter-spacing: .16em; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---- The Gramophone ---- */
.records { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.record { padding: 1.6rem 1.15rem; scroll-margin-top: 1rem; }
.record h3 { font-size: 1.7rem; margin-bottom: .6rem; }
.record-res { color: var(--muted); margin-bottom: 1rem; overflow-wrap: break-word; }
.record audio { display: block; width: 100%; margin: .4rem 0 .9rem; }
.record-links { margin: 0; font-size: 1.02rem; }
.lost { text-align: center; }
.lost .lede, .lost .lede-sub { margin-inline: auto; }
.lost .onair-row { justify-content: center; }

/* ---- Footer ---- */
.footer { margin-top: 3.5rem; padding-bottom: 2.5rem; text-align: center; }
.footer-inner { padding-top: 1.75rem; }
.footer-motto { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 1.7rem; color: var(--parchment-hi); margin-bottom: .6rem; }
.footer-line { margin-bottom: .4rem; }
.footer-small { color: var(--muted); font-size: 1rem; }
.footer-nav { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin: 1.25rem 0; padding: 0; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; }
.footer-nav a { text-decoration: none; }

/* ---- Wider screens ---- */
@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
  .cellar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav ul { display: flex; justify-content: center; gap: .25rem 2rem; }
  .nav li { border-bottom: 0; }
  .nav .onair-nav { display: inline-flex; }
  .nav a { padding-inline: .2rem; font-size: .78rem; }
  .frame { padding: 1.9rem 1.8rem; }
  .paper { padding: 2.4rem 2.4rem; }
  .horizon-item { grid-template-columns: 5.6rem minmax(0, 1fr); padding: 1.2rem 1.4rem; }
  .set-frame { height: 36rem; }
  .tap-facts div { grid-template-columns: 6rem 1fr; }
}
@media (min-width: 62rem) {
  .cellar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lede-block { padding-top: 3.25rem; }
}

/* ---- Respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: #fff; color: #000; }
  .nav, .skip-link, .btn, .onair-bar { display: none !important; }
}

.topbar-sep { display: none; }
@media (min-width: 40rem) { .topbar-sep { display: inline; } }

/* ==========================================================================
   v2 — The Wireless (native), The Booth, responsive layouts
   ========================================================================== */

/* ---- Controls: forms ---- */
.field { margin: 0 0 1.1rem; }
.field label { display: block; font-family: var(--f-label); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: .45rem; }
.field output { color: var(--parchment-hi); letter-spacing: .06em; margin-left: .4rem; }
input[type="text"], input[type="password"], input[type="datetime-local"], textarea {
  width: 100%; padding: .8rem .85rem; border: 1px solid var(--brass); border-radius: 0; background: #130f0a; color: var(--parchment-hi);
  font: inherit; font-size: max(16px, 1rem); line-height: 1.3;
}
input[type="text"]:disabled { opacity: .6; }
input[type="datetime-local"] { min-height: 3rem; }
input[type="range"] { width: 100%; accent-color: var(--brass); height: 2rem; }
textarea { min-height: 9rem; resize: vertical; margin-top: .8rem; font-size: max(16px, .95rem); }
button, .btn, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(178,138,61,.25); }
button { font: inherit; }
.btn { min-height: 2.75rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-live { background: var(--oxblood); border-color: var(--oxblood-hi); color: var(--parchment-hi); }
.btn-live:hover, .btn-live:focus-visible { background: var(--oxblood-hi); color: #fff; border-color: var(--parchment-hi); }
.btn-end { border-color: var(--oxblood-hi); color: #efc3c5; }
.btn-end:hover, .btn-end:focus-visible { background: var(--oxblood-hi); color: #fff; }
.stack > * { margin-block: 0 1rem; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; background: rgba(178,138,61,.16); padding: .05em .35em; }
.paper code { background: rgba(122,90,28,.14); }
audio { color-scheme: dark; }

.note-warn, .note-err { margin: 0 0 1rem; padding: .6rem .85rem; font-size: 1.02rem; border-left: 3px solid var(--brass); background: rgba(178,138,61,.13); }
.note-err { border-left-color: #c0494f; background: rgba(138,44,49,.3); color: #f6d5d6; }
[hidden] { display: none !important; }

/* ---- Equalizer ---- */
.eq { display: inline-flex; align-items: flex-end; gap: 4px; height: 2rem; }
.eq i { display: block; width: 5px; height: 14%; background: var(--brass); }
.eq.on i { animation: eq 1s ease-in-out infinite alternate; }
.eq i:nth-child(1) { animation-delay: -.1s; } .eq i:nth-child(2) { animation-delay: -.55s; } .eq i:nth-child(3) { animation-delay: -.25s; }
.eq i:nth-child(4) { animation-delay: -.7s; } .eq i:nth-child(5) { animation-delay: 0s; } .eq i:nth-child(6) { animation-delay: -.4s; }
.eq i:nth-child(7) { animation-delay: -.2s; } .eq i:nth-child(8) { animation-delay: -.62s; } .eq i:nth-child(9) { animation-delay: -.35s; }
@keyframes eq { from { height: 14%; } to { height: 100%; } }
.eq-wide { display: flex; justify-content: center; margin: 1.25rem 0 .5rem; }

/* ---- The Wireless: listener ---- */
.wireless-grid { display: grid; gap: 1.5rem; padding-block: 1.25rem 0; align-items: start; }
.tuner { padding: 1.4rem 1.1rem 1.5rem; text-align: center; }
.tuner-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .9rem; text-align: left; }
.tuner-head .eyebrow { margin: 0; }
.tuner-title { font-size: clamp(1.9rem, 7vw, 3.1rem); font-style: italic; font-weight: 600; margin: .25rem 0 1.4rem; }
.tune { --size: min(19rem, 100%, 38dvh); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem;
  width: var(--size); aspect-ratio: 1; min-height: 9rem; margin-inline: auto; padding: 1rem; cursor: pointer;
  background: var(--ink); color: var(--brass-hi); border: 1px solid var(--brass); border-radius: 0;
  box-shadow: inset 0 0 0 5px var(--ink), inset 0 0 0 6px rgba(178,138,61,.6); transition: background-color .15s, color .15s; }
.tune:hover { background: var(--brass); color: var(--ink); box-shadow: inset 0 0 0 5px var(--brass), inset 0 0 0 6px rgba(27,22,17,.5); }
.tune:hover::before { --b: var(--ink); }
.tune-icon { width: 36%; height: 36%; }
.tune-label { font-family: var(--f-label); font-size: .82rem; letter-spacing: .24em; text-transform: uppercase; }
.tune.is-on { background: var(--oxblood); color: var(--parchment-hi); border-color: var(--oxblood-hi); box-shadow: inset 0 0 0 5px var(--oxblood), inset 0 0 0 6px rgba(246,239,221,.45); }
.tune.is-on::before { --b: var(--parchment-hi); }
.tune.is-wait .tune-icon { animation: pulse 1.4s ease-in-out infinite; }
.tuner-msg { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 1.55rem; line-height: 1.2; color: var(--parchment-hi); margin: .9rem 0 .3rem; }
.tuner-hint { color: var(--muted); min-height: 3.4em; max-width: 28rem; margin: 0 auto 1rem; font-size: 1.02rem; }
.tuner-facts { display: grid; grid-template-columns: 1fr 1fr; margin: .5rem 0 0; border-top: 1px solid rgba(178,138,61,.4); }
.tuner-facts div { padding: .8rem .5rem 0; }
.tuner-facts div + div { border-left: 1px solid rgba(178,138,61,.3); }
.tuner-facts dt { font-family: var(--f-label); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.tuner-facts dd { margin: .15rem 0 0; font-family: var(--f-display); font-weight: 700; font-size: 1.8rem; font-variant-numeric: tabular-nums; color: var(--parchment-hi); }
.set-info .paper { max-width: none; }
.set-links { margin-top: 1.25rem; }
.tuner[data-state="live"] .tuner-title { color: var(--parchment-hi); }

/* ---- Live bar: shown on every page except the Wireless and Booth while a broadcast is on ---- */
.onair-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; gap: .7rem;
  padding: .8rem max(var(--gutter), env(safe-area-inset-left)) calc(.8rem + env(safe-area-inset-bottom)); background: var(--oxblood); color: var(--parchment-hi);
  border-top: 1px solid var(--oxblood-hi); text-decoration: none; font-family: var(--f-label); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; }
.onair-bar:hover { background: var(--oxblood-hi); color: #fff; }
.onair-bar .onair-dot { background: var(--parchment-hi); animation: pulse 1.6s ease-in-out infinite; }
.onair-bar-go { margin-left: auto; }
.is-on-air body:not(.page-wireless):not(.page-booth) .onair-bar { display: flex; }
.is-on-air body:not(.page-wireless):not(.page-booth) { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom)); }

/* ---- The Booth ---- */
.booth-head { padding-bottom: 1rem; }
.booth-grid { display: grid; gap: 1.25rem; padding-bottom: 1rem; align-items: start; }
.login { max-width: 28rem; margin: 0 auto; }
.login h2 { margin-bottom: 1.1rem; }
.console { padding: 1.4rem 1.1rem 1.3rem; }
.console-head, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.console-head .eyebrow, .panel-head .eyebrow { margin: 0; }
.console-status { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.console-clock { font-family: var(--f-display); font-weight: 700; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--parchment-hi); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 1.1rem; border-block: 1px solid rgba(178,138,61,.4); }
.stats > div { display: flex; flex-direction: column-reverse; align-items: center; padding: .7rem .25rem; text-align: center; }
.stats > div + div { border-left: 1px solid rgba(178,138,61,.3); }
.stats dd { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--parchment-hi); }
.stats dt { font-family: var(--f-label); font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .35rem; }
.meter-wrap { margin: 0 0 1.2rem; }
.meter-label { display: block; font-family: var(--f-label); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: .45rem; }
.meter { height: 1rem; border: 1px solid var(--brass); background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(178,138,61,.35) calc(10% - 1px) 10%); }
.meter i { display: block; height: 100%; width: 0; background: var(--brass-hi); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.seg button { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-height: 3.4rem; padding: .55rem .4rem; background: transparent; color: var(--parchment); border: 1px solid rgba(178,138,61,.6); border-radius: 0; cursor: pointer; font-family: var(--f-label); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.seg button small { font-family: var(--f-body); font-size: .85rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.seg button.sel { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.seg button.sel small { color: #3a2c10; }
.seg button:disabled { opacity: .6; cursor: not-allowed; }
.seg button.sel:disabled { opacity: .9; }
.console-actions { display: grid; gap: .7rem; margin-top: .4rem; }
.console-actions .btn { width: 100%; min-height: 3.4rem; font-size: .8rem; }
.console-foot { margin: 1rem 0 0; color: var(--muted); font-size: .98rem; }
.booth-side { display: grid; gap: 1.25rem; }
.panel { background: var(--ink-2); border: 1px solid rgba(178,138,61,.55); padding: 1.1rem 1rem; min-width: 0; }
.panel > .eyebrow { margin-bottom: .8rem; }
.copyrow { display: flex; gap: .6rem; }
.copyrow input { flex: 1; min-width: 0; }
.bar { height: 6px; border: 1px solid var(--brass); }
.bar i { display: block; height: 100%; width: 0; background: var(--brass); transition: width .3s; }
.recs { list-style: none; margin: 0; padding: 0; }
.rec { padding: .9rem 0; border-top: 1px solid rgba(178,138,61,.3); }
.rec:first-child { border-top: 0; padding-top: 0; }
.rec.is-hidden { opacity: .65; }
.rec-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.rec-top input { flex: 1; min-width: 10rem; }
.rec-title { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.15; flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--parchment-hi); }
.rec-meta { margin: .35rem 0 .55rem; color: var(--muted); font-size: .98rem; }
.rec-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: 0 0 .5rem; font-size: 1.02rem; }
.rec-id { margin: 0; color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

/* ---- Two-column layouts (desktop and landscape) ---- */
.duo { display: block; }
.duo-hero > .duo-cell + .duo-cell { margin-top: 2rem; }
.roster-stack { grid-template-columns: minmax(0, 1fr) !important; }

@media (min-width: 40rem) {
  .console { padding: 1.8rem 1.8rem 1.6rem; }
  .console-actions { grid-template-columns: 1fr 1fr; }
  .console-actions .btn-live, .console-actions .btn-end { grid-column: 1 / -1; }
  .tuner { padding: 1.8rem 1.8rem 1.8rem; }
}
/* ---- Landscape phones: very little height ---- */
@media (max-height: 520px) {
  .topbar, .motto { display: none; }
  .masthead-inner { display: flex; align-items: center; justify-content: center; padding-block: .6rem; }
  .brand { flex-direction: row; gap: .7rem; }
  .emblem { width: 2.6rem; height: 2.6rem; }
  .wordmark { font-size: 2rem; }
  .nav a { min-height: 2.3rem; }
  .lede-block { padding-top: 1rem; padding-bottom: .5rem; }
  .tune { --size: min(11rem, 100%, 40dvh); min-height: 7rem; }
  .tuner-title { margin-bottom: .8rem; }
}

/* ---- Phones in portrait: compact masthead, roomy touch targets ---- */
@media (max-width: 39.99rem) {
  .topbar { font-size: .6rem; padding-block: .4rem; }
  .masthead-inner { padding-block: .9rem .6rem; }
  .brand { flex-direction: row; gap: .8rem; }
  .emblem { width: 3.4rem; height: 3.4rem; }
  .wordmark { font-size: clamp(2.1rem, 10vw, 2.7rem); }
  .motto { font-size: 1rem; margin-top: .35rem; }
  .lede-block { padding-top: 1.5rem; padding-bottom: 1rem; }
  .section { padding-top: 1.75rem; }
  .btn { padding-inline: 1.1rem; }
  .vintage { padding: 1.15rem 1rem 1rem; }
  .tap-facts div { grid-template-columns: 4.6rem 1fr; }
  .footer-nav { gap: .2rem 1.1rem; }
  .footer-nav a { display: inline-block; padding-block: .55rem; }
}
@media (max-width: 22.5rem) {            /* 360px and narrower */
  :root { --gutter: .85rem; }
  .frame, .paper { padding-inline: 1rem; }
  .console-clock { font-size: 2rem; }
  .stats dd { font-size: 1.6rem; }
  .copyrow { flex-direction: column; }
}

/* ==========================================================================
   v3 — book covers, livestream banner, scheduler
   ========================================================================== */

/* ---- Covers: past reads in black and white, the current and upcoming books in color ---- */
.cover { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; background: var(--ink-3); border: 1px solid rgba(178,138,61,.65); }
.cover-past { filter: grayscale(1) contrast(1.06) brightness(.9); transition: filter .35s; }
.vintage:hover .cover-past, .vintage:focus-within .cover-past { filter: none; }   /* a touch of color on hover or tap */
.cover-now { outline: 1px solid rgba(178,138,61,.55); outline-offset: 3px; }
.cover-blank { background: var(--ink) url("../img/favicon.svg") center / 72% no-repeat; opacity: .5; }
.vintage.has-cover { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); column-gap: 1rem; align-items: start; }
.vintage.has-cover .vintage-body { min-width: 0; }
.ledger { font-family: var(--f-label); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.25rem; text-align: center; }

.tap-top.has-cover { display: grid; grid-template-columns: minmax(0, 1fr) 5.4rem; gap: 1rem; align-items: start; }
.tap-top-text { min-width: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; }

.horizon-item.has-cover { grid-template-columns: 4.4rem minmax(0, 1fr); }
.horizon-item.has-cover .horizon-date { display: none; }
.horizon-item.has-cover .cover { order: -1; }

/* ---- Livestream banner (only when one is scheduled) ---- */
.livebanner { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem 1rem; padding: .85rem 1rem; margin-bottom: .5rem;
  border: 1px solid var(--oxblood-hi); border-left-width: 4px; background: rgba(110,34,38,.35); color: var(--parchment-hi); text-decoration: none; }
.livebanner:hover { background: rgba(138,44,49,.5); color: #fff; }
.livebanner .eyebrow { margin: 0; color: #e0b9bb; width: 100%; }
.livebanner-title { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; }
.livebanner-when { color: var(--muted); font-size: 1.02rem; }
.livebanner-go { margin-left: auto; font-family: var(--f-label); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-hi); }

/* ---- The Wireless: next broadcast line ---- */
.tuner-next { margin: -.6rem auto 1.2rem; max-width: 30rem; color: var(--muted); font-size: 1.05rem; }
.tuner-next strong { color: var(--parchment-hi); font-weight: 500; }
.tuner-next a { white-space: nowrap; }
.nextbox { text-align: center; padding: 1.4rem 1.2rem; }
.nextbox h3 { font-size: 1.7rem; font-style: italic; margin: .2rem 0 .5rem; }
.nextbox p { margin: 0 0 .9rem; color: var(--muted); }
.nextbox .btn-row { justify-content: center; }

/* ---- Booth: scheduler and lectern tips ---- */
.sched-line { margin: 0 0 1rem; color: var(--parchment); }
.sched-line.is-none { color: var(--muted); }
.sched-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.tips { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 1.02rem; }
.tips li { margin-bottom: .45rem; }
.tips strong { color: var(--parchment); font-weight: 500; }

@media (min-width: 40rem) {
  .horizon-item.has-cover { grid-template-columns: 5.6rem minmax(0, 1fr) 5rem; }
  .horizon-item.has-cover .horizon-date { display: flex; }
  .horizon-item.has-cover .cover { order: 0; }
  .vintage.has-cover { grid-template-columns: 5.2rem minmax(0, 1fr); }
  .tap-top.has-cover { grid-template-columns: minmax(0, 1fr) 6.4rem; }
}
@media (min-width: 64rem) {
  .vintage.has-cover { grid-template-columns: 4.8rem minmax(0, 1fr); }
  .tap-top.has-cover { grid-template-columns: minmax(0, 1fr) 6.6rem; }
}
@media (max-width: 22.5rem) {
  .tap-top.has-cover { grid-template-columns: minmax(0, 1fr) 4.6rem; gap: .8rem; }
  .vintage.has-cover { grid-template-columns: 4rem minmax(0, 1fr); }
}

/* ---- On the Table (current read details) ---- */
.onthetable .h-small { font-size: 1.25rem; margin: 1.4rem 0 .5rem; }
.onthetable .themes { margin: 0 0 1rem; padding-left: 1.2rem; }
.onthetable .themes li { margin-bottom: .3rem; }
.book-facts { margin: 1.2rem 0; display: grid; gap: .5rem; }
.book-facts div { display: grid; grid-template-columns: 6rem 1fr; gap: .75rem; align-items: baseline; border-top: 1px solid rgba(90,76,56,.35); padding-top: .5rem; }
.book-facts dt { font-family: var(--f-label); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--oxblood); }
.book-facts dd { margin: 0; }
.author-bio { font-size: 1.02rem; color: var(--ink-muted); }
.onthetable .signoff { text-align: left; font-style: italic; }
@media (min-width: 40rem) { .tap-top.has-cover { grid-template-columns: minmax(0, 1fr) 9rem; gap: 1.4rem; } }
.eq.juke i { animation-duration: 1.7s; background: var(--brass-hi); }

/* ---- Little touches ---- */
.hence { color: var(--parchment); letter-spacing: .16em; }
.overheard { margin: 1.4rem auto 1.6rem; max-width: 34rem; padding: 1rem 0; border-block: 1px solid rgba(178,138,61,.3); }
.overheard blockquote { margin: .5rem 0 .3rem; }
.overheard blockquote p { font-family: var(--f-display); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--parchment); margin: 0; }
.overheard-who { margin: 0; color: var(--muted); font-size: .95rem; }
.maker { margin: 1.6rem 0 0; font-family: var(--f-label); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; }
.maker a { color: var(--muted); opacity: .55; text-decoration: none; transition: opacity .2s, color .2s; }
.maker a:hover, .maker a:focus-visible { opacity: 1; color: var(--brass-hi); }
