/*
 * components.css — reusable page pieces shared across templates.
 */

/* ── Show tag (colored per-show label, used in episode rows & nav) ─── */
.show-tag {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent, var(--accent-amber));
  text-decoration: none;
  white-space: nowrap;
}

.show-tag:visited {
  color: var(--accent, var(--accent-amber));
}

/* ── Top story ────────────────────────────────────────────────────── */
.top-story {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* The art and the play button share one column, stacked, so the button no longer sits alone in the text column
   (which left a void under the art and a boxy gap above the summary). The column is as wide as the art and never
   shrinks: without a width the flex layout squeezed the art to a sliver and let the button overlap the text. */
.top-story__lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 96px;
  flex-shrink: 0;
}

/* Under the art the button is a square that mirrors the picture, a few pixels smaller so it reads as a matched pair and
   not a second thumbnail. The colors are the generic `.play-btn-circle` ones on purpose (transparent, the shared border,
   a symbol in the show's color via `--accent`, set per show on `.top-story`); a filled version was tried and rejected.
   The 8px comes off the width, centered, and `aspect-ratio` makes the height follow it, so it stays a true square. At
   64px or more it is a comfortable touch target, so it needs no coarse-pointer rule. The extra `.top-story__lead` makes
   this win over `.play-btn-circle--big`, which sits last in the file on purpose and would otherwise decide the size by
   source order. */
.top-story__lead .play-btn-circle--big {
  width: calc(100% - 8px);
  height: auto;
  aspect-ratio: 1 / 1;
  align-self: center;
  font-size: 2.2rem;
  margin: 0;
}

/* Keyboard focus: a ring outside the box in the page's text color, visible on the dark page. Hover needs no rule here: the
   generic `.play-btn-circle:hover` already switches the outline to the show's color. */
.top-story__lead .play-btn-circle--big:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.top-story__body {
  flex: 1;
}

.top-story__art {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  object-fit: cover;
}

.top-story__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.2rem 0;
}

.top-story__title a {
  color: var(--text-primary);
  text-decoration: none;
}

.top-story__title a:hover,
.top-story__title a:focus-visible {
  text-decoration: underline;
}

.top-story__meta {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.top-story__dek {
  margin: 0.4rem 0 0;
}

/* Preview + "Show more" built on a native <details>, so it works without
   JavaScript and is keyboard accessible. The full text is already in the
   page; opening it only reveals the rest. The <summary> is the single
   control: the whole block is clickable, and its label flips in CSS. */
.expandable {
  margin: 0.4rem 0 0;
}

.expandable__summary {
  display: block;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
}

.expandable__summary::-webkit-details-marker {
  display: none;
}

.expandable__rest {
  display: none;
}

.expandable[open] .expandable__rest {
  display: inline;
}

.expandable[open] .expandable__rest::before {
  content: ' ';
}

.expandable[open] .expandable__ellipsis {
  display: none;
}

.expandable__toggle {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--accent, var(--accent-amber));
  text-decoration: underline;
  white-space: nowrap;
}

.expandable__toggle::after {
  content: attr(data-more);
}

.expandable[open] .expandable__toggle {
  display: block;
  margin: 0.4rem 0 0;
}

.expandable[open] .expandable__toggle::after {
  content: attr(data-less);
}

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

@media (pointer: coarse) {
  .expandable__toggle {
    padding-block: 0.6rem;
  }
}

/* Flex children default to min-width:auto, which lets long titles or
   unbroken feed text push the row wider than the screen. */
.top-story > div,
.top-story__title,
.top-story__dek {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 420px) {
  .top-story__art {
    width: 72px;
    height: 72px;
  }

  .top-story__lead {
    width: 72px;
  }
}

/* ── Dense episode/item row (dot-leader list) ────────────────────── */
.episode-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--border);
  flex-wrap: wrap;
}

.episode-row:last-of-type {
  border-bottom: none;
}

.episode-row__main {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
  flex: 1 1 auto;
}

.episode-row__title {
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-row__title:hover,
.episode-row__title:focus-visible {
  text-decoration: underline;
}

/* The row title is now a <button> (see episode-expand.js) -- reset
   default button chrome so it still reads as a plain link-like label. */
.episode-row__toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.episode-row__toggle::after {
  content: ' \25BE';
  display: inline-block;
  font-size: 0.75em;
  color: var(--text-dim);
  transition: transform 0.15s ease;
}

.episode-row__toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.episode-row__meta {
  color: var(--text-dim);
  font-size: 0.82rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Phones: the tag + play + menu buttons used to leave ~100px for the
   title, which then truncated to "011. Leading wi…". Let the title
   drop to its own full-width line and wrap instead of ellipsizing. */
@media (max-width: 560px) {
  .episode-row__main {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .episode-row__title {
    flex: 1 1 100%;
    order: 3;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    padding-block: 0.25rem;
  }
}

/* Touch devices: WCAG 2.5.5 / Apple HIG ask for ~44px targets. Scoped to
   `pointer: coarse` so desktop keeps the compact retro density. */
@media (pointer: coarse) {
  .play-btn-circle,
  .track-menu-btn {
    width: 2.75rem;
    height: 2.75rem;
  }

  .nav-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }

  .site-nav a,
  .site-nav .link-button {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }
}

/* Generic small circular "play" button -- same visual as
   player.css's `.track-row__play` (music tracklists), duplicated
   here rather than shared across files because player.css is scoped
   to the Jukebox/music pages per its own header comment, while this
   is used on any playable row anywhere on the site (episodes, live
   events). Both feed the same `player.js` data-action="play-track"
   contract, which was built generic from day one (not Track-specific). */
.play-btn-circle {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent, var(--accent-amber));
  border-radius: var(--radius);
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.play-btn-circle:hover {
  border-color: var(--accent, var(--accent-amber));
}

/* ── Episode detail (the expanded "Top Story"-style panel under a
   dense row once its title toggle is clicked) ───────────────────── */
.episode-detail {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0 1rem;
  border-bottom: 1px dotted var(--border);
}

.episode-detail[hidden] {
  display: none;
}

/* ── Show header (per-show page) ─────────────────────────────────── */
.show-header {
  border-left: 4px solid var(--accent, var(--accent-amber));
  padding-left: 1rem;
}

.show-header__name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 0 0.3rem;
}

.show-header__desc {
  color: var(--text-dim);
  margin: 0;
}

.show-header__feed-link {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

/* ── Show header hero (show_detail.html -- cover art + accent wash so
   each show's own page "pops" instead of reading like a bare list) ── */
.show-header--hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--accent-amber)) 16%, var(--bg-panel)), var(--bg-panel));
  border-left-width: 6px;
}

.show-header__art {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.35);
}

.show-header__text {
  min-width: 0;
}

@media (max-width: 560px) {
  .show-header--hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .show-header__art {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ── Show grid (show index page) ─────────────────────────────────── */
.show-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.show-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--accent-amber));
  background: var(--bg-panel);
  padding: 1rem;
}

.show-card__name {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.show-card__name a {
  color: var(--text-primary);
  text-decoration: none;
}

.show-card__name a:hover,
.show-card__name a:focus-visible {
  text-decoration: underline;
}

.show-card__desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

/* ── Newsletter signup (deliberately tiny, no gradient SaaS card) ─── */
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  border: 1px solid var(--border);
  padding: 1rem;
  background: var(--bg-panel);
}

.newsletter-form p {
  flex-basis: 100%;
  margin: 0 0 0.4rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.newsletter-form input[type="email"] {
  flex: 1 1 240px;
  background: var(--bg-void);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  padding: 0.5rem;
}

.newsletter-form button {
  background: var(--accent-amber);
  color: var(--bg-void);
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

/* Honeypot field — off-screen, not display:none, so it still reads as
   present to a screen reader's accessibility tree checks but is never
   visible or reachable by a real user (per brand-design.md §4e). */
.newsletter-form .signup-extra {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Generic search form (artist_list and anywhere else a plain
   GET-param search box is needed) ───────────────────────────────── */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.search-form input[type="search"] {
  flex: 1 1 240px;
  background: var(--bg-void);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  padding: 0.5rem;
}

.search-form button {
  background: var(--accent-amber);
  color: var(--bg-void);
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

/* ── Site messages (Django messages framework — signup confirmations/
   errors) ───────────────────────────────────────────────────────── */
.site-messages {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-messages__item {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

.site-messages__item--success {
  border-color: var(--accent-amber);
}

.site-messages__item--error {
  border-color: #c0392b;
}

/* ── Pagination ───────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.pagination a {
  color: var(--text-dim);
}

.pagination .current {
  color: var(--accent-amber);
  font-weight: 700;
}

.empty-state {
  color: var(--text-dim);
  font-style: italic;
}

/* ── The Board (scoop-board, Phase 6) ────────────────────────────── */
.board-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.board-intro h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
}

.board-tz-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0;
}

.board-day-heading {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin: 1rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.board-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--border);
  border-left: 3px solid var(--accent, transparent);
  padding-left: 0.6rem;
  flex-wrap: wrap;
}

.board-row:last-child {
  border-bottom: none;
}

.board-row--past {
  opacity: 0.7;
}

.board-row__main {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
  flex: 1 1 auto;
}

.board-row__title {
  color: var(--text-primary);
  text-decoration: none;
}

.board-row__title:hover,
.board-row__title:focus-visible {
  text-decoration: underline;
}

.board-row__meta {
  color: var(--text-dim);
  font-size: 0.82rem;
  white-space: nowrap;
}

.board-row__recurring {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-style: italic;
}

.board-row__live-badge {
  background: var(--accent-red);
  color: var(--bg-void);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  flex-shrink: 0;
}

/* "Next live show in 2d 08:15:30" under "Live now" (board-countdown.js).
   Tabular digits so the line doesn't jitter as the seconds tick. */
.board-countdown {
  margin: 0.75rem 0 0;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* The ticking time itself, in the LIVE badge's red so it stands out
   from the amber chrome and leads straight into "Live now" (operator,
   2026-10-24). ~6.4:1 against --bg-void. */
.board-countdown__clock {
  color: var(--accent-red);
  font-weight: 700;
}

/* ── Homepage layout + gadget rail (scoop-gadgets, Phase 8) ──────── */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}

/* minmax(0, 1fr), not bare 1fr: a bare 1fr has an `auto` minimum, so one
   long unbroken word in a feed summary stretched the whole column past
   the viewport and caused sideways scrolling on phones. */
@media (max-width: 760px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gadget-rail {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .gadget-rail {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

.gadget {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--accent-amber));
  background: var(--bg-panel);
  padding: 0.9rem;
}

.gadget--placeholder {
  border-left-color: var(--border);
}

.gadget__label {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.gadget__body {
  display: grid;
  gap: 0.2rem;
}

.gadget__title {
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
}

.gadget__title a {
  color: var(--text-primary);
  text-decoration: none;
}

.gadget__title a:hover,
.gadget__title a:focus-visible {
  text-decoration: underline;
}

.gadget__meta {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.gadget__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.gadget__list-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gadget__list-item a {
  color: var(--text-primary);
}

.gadget .shuffle-btn {
  margin-top: 0.5rem;
}

/* ── Buttons (`.button`) ──────────────────────────────────────────── */
/* Previously referenced in templates (profile_edit.html, login.html,
   admin's valuetimesplit_change_form.html) but never actually styled
   anywhere — they fell back to bare browser-default <button> chrome.
   Added here alongside the Top 8 widget (which needed real "Save"/
   "+ Add" buttons) per AGENTS.md's "chunky beveled buttons" design
   direction, square corners (`--radius`), not rounded. */
.button {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--accent, var(--accent-amber));
  background: var(--accent, var(--accent-amber));
  color: var(--bg-void);
}

.button:hover {
  opacity: 0.9;
}

.button--ghost {
  background: none;
  color: var(--accent, var(--accent-amber));
}

.button--ghost:hover {
  background: var(--bg-panel-raised);
}

/* ── Top 8 picker widget (scoop-profiles redesign, 2026-10-23) ───────
   Square-tile grid (2 rows x 4 cols), "+ Add" live-search picker, X to
   remove, drag-and-drop *and* keyboard left/right-button reordering
   (`static/js/top-eight.js`). Square art tiles reuse the same
   aspect-ratio/object-fit pattern as `.artist-card__art`/
   `.release-card__art` in player.css for visual consistency. ─────── */
.top-eight-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--accent-amber));
  background: var(--bg-panel);
  padding: 1rem;
}

.top-eight-card__title {
  font-family: var(--font-display, var(--font-mono));
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
  color: var(--accent, var(--accent-amber));
  text-shadow: 2px 2px 0 var(--bg-void);
}

.top-eight-grid {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  /* minmax(0, 1fr): bare 1fr keeps an `auto` minimum, so one long nowrap
     name stretched its column (and the page) instead of ellipsizing. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .top-eight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.top-eight-tile {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--bg-panel-raised);
  padding: 0.5rem;
  cursor: grab;
}

.top-eight-tile--empty {
  border-style: dashed;
  aspect-ratio: 3 / 4;
}

.top-eight-tile__art {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-void);
  border: 1px solid var(--border);
  margin-bottom: 0.4rem;
}

.top-eight-tile__art--empty {
  visibility: hidden;
}

.top-eight-tile__name {
  display: block;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-eight-tile__remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-void);
  color: var(--accent-red);
  cursor: pointer;
  font-weight: 700;
}

.top-eight-tile__remove:hover {
  border-color: var(--accent-red);
}

.top-eight-tile__moves {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
}

.top-eight-tile__move {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--text-dim);
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.top-eight-tile__move:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.top-eight-tile__move:disabled {
  opacity: 0.3;
  cursor: default;
}

.top-eight-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.top-eight-add {
  position: relative;
}

.top-eight-search {
  position: absolute;
  z-index: 5;
  top: 100%;
  left: 0;
  margin-top: 0.3rem;
  min-width: 260px;
  max-width: calc(100vw - 2rem);
  border: 1px solid var(--border);
  background: var(--bg-panel-raised);
  padding: 0.6rem;
}

.top-eight-search input[type="search"] {
  width: 100%;
  font-family: var(--font-mono);
  background: var(--bg-void);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.4rem;
}

.top-eight-search-results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.top-eight-search-results__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0.35rem 0.2rem;
  cursor: pointer;
  font-family: var(--font-mono);
}

.top-eight-search-results__item:hover:not(:disabled),
.top-eight-search-results__item:focus-visible:not(:disabled) {
  background: var(--bg-void);
  color: var(--accent, var(--accent-amber));
}

.top-eight-search-results__item:disabled {
  color: var(--text-dim);
  cursor: default;
}

.top-eight-search-results__empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 0.35rem 0.2rem;
}

.top-eight-status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--accent-green);
  min-height: 1.2em;
}

/* ── Top 8, read-only view (profile_detail.html) ─────────────────── */
.top-eight-grid--view {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 480px) {
  .top-eight-grid--view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.top-eight-tile--view {
  cursor: default;
}

.top-eight-tile--view a {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}

.top-eight-tile--view a:hover .top-eight-tile__name,
.top-eight-tile--view a:focus-visible .top-eight-tile__name {
  text-decoration: underline;
}

/* ── Ditto-interop theming (`scoop-ditto-themes`, Phase 9b) ──────────
   `.show-page-theme` is the scoping wrapper (network/show_detail.html,
   accounts/profile_detail.html) that carries inline --bg-panel/
   --bg-panel-raised/--border/--text-primary/--text-dim/--accent
   overrides (see `accounts/themes.py:site_css_vars_from_core`) — no
   new rules needed here for that part, every component below it
   already reads those same tokens. `.theme-builder` is the color-
   picker/publish UI on profile_edit.html. ───────────────────────── */
.theme-builder {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--accent-amber));
  background: var(--bg-panel);
  padding: 1rem;
}

.theme-builder__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0;
}

.theme-builder__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.theme-builder__field input[type="color"] {
  width: 3rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
}

.theme-builder__field input[type="text"] {
  border: 1px solid var(--border);
  background: var(--bg-void);
  color: var(--text-primary);
  padding: 0.35rem 0.5rem;
  font-family: var(--font-mono);
}

.theme-builder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.theme-builder__status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--accent-green);
  min-height: 1.2em;
}

.theme-builder__relay-results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Profile header (accounts/profile_detail.html) — previously
   completely unstyled (plain block layout); given a real flex layout
   here, plus a mobile stacking variant below. ───────────────────── */
.profile-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: var(--accent, var(--accent-amber));
  padding-left: 1rem;
}

.profile-header__avatar {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-panel-raised);
}

.profile-header h1 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
}

/* The text column is a bare flex child, whose default min-width:auto let
   one unbroken string stretch it past the screen. An npub is always 63
   characters with no break points, so this hits every Nostr-linked
   profile, not just contrived ones. */
.profile-header > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-header .button {
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 560px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ── Login options (accounts/login.html) — previously completely
   unstyled; auto-fit grid collapses to a single column on narrow
   viewports with no separate media query needed. ───────────────── */
.login-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.login-card {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 1.25rem;
}

.login-card h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.login-card form,
.login-card p:last-child {
  margin-bottom: 0;
}

.login-card input[type="email"] {
  width: 100%;
  font-family: var(--font-mono);
  background: var(--bg-void);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}


/* ── Clips (scoop-clips-pages, Phase 10d) ────────────────────────────
 * A clip's text IS the content, so unlike .episode-row__title these wrap
 * rather than ellipsize. Real transcripts hold long URLs and unbroken
 * strings, hence min-width:0 + overflow-wrap:anywhere on every flex child.
 */
.clip-filters select {
  background: var(--bg-void);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  padding: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.clip-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px dotted var(--border);
}

.clip-row:last-child {
  border-bottom: none;
}

.clip-row__body {
  flex: 1 1 auto;
  min-width: 0;
}

.clip-row__text {
  margin: 0 0 0.25rem;
  overflow-wrap: anywhere;
}

.clip-row__text a {
  color: var(--text-primary);
  text-decoration: none;
}

.clip-row__text a:visited {
  color: var(--text-primary);
}

.clip-row__text a:hover,
.clip-row__text a:focus-visible {
  text-decoration: underline;
}

.clip-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.clip-row__meta > * {
  min-width: 0;
}

.clip-detail__quote {
  margin: 1rem 0;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 4px solid var(--accent-amber);
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.clip-detail__audio {
  display: block;
  width: 100%;
  max-width: 32rem;
  margin: 0.75rem 0;
}

.clip-detail__playing {
  color: var(--text-dim);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

@media (pointer: coarse) {
  .clip-filters select,
  .clip-filters button {
    min-height: 2.75rem;
  }
}

/* ── Playing state for play buttons (scoop-clips) ────────────────────
 * play-buttons.js adds .is-playing to the button whose track is playing.
 * Filled rather than only recoloured, so the state is not carried by colour alone.
 */
.play-btn-circle.is-playing,
.shuffle-btn.is-playing {
  background: var(--accent, var(--accent-amber));
  color: var(--bg-void);
  border-color: var(--accent, var(--accent-amber));
}

/* ── Clip timeline (scoop-clips) ─────────────────────────────────────
 * A seekable progress bar with a playhead, painted by clip-timeline.js from the
 * persistent player. Only the loaded clip moves. The hit area is taller than the
 * drawn bar so it is easy to grab, and the playhead is a bar, not only a colour,
 * so position does not depend on colour alone.
 */
.clip-timeline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.35rem 0 0.15rem;
  padding: 0.35rem 0;
  min-width: 0;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.clip-timeline:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
}

.clip-timeline__track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 0.55rem;
  background: var(--bg-void);
  border: 1px solid var(--border);
}

.clip-timeline__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--accent, var(--accent-amber));
  opacity: 0.55;
  pointer-events: none;
}

.clip-timeline__playhead {
  position: absolute;
  top: -0.3rem;
  bottom: -0.3rem;
  left: 0;
  width: 3px;
  margin-left: -1px;
  background: var(--text-primary);
  pointer-events: none;
  visibility: hidden;
}

.clip-timeline.is-active .clip-timeline__playhead {
  visibility: visible;
}

.clip-timeline__clock {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.clip-timeline__sep {
  margin: 0 0.2em;
}

.clip-detail .clip-timeline {
  max-width: 32rem;
}

@media (pointer: coarse) {
  .clip-timeline {
    min-height: 2.75rem;
  }
}

/* Touch size for the generic play button. This MUST come after the base
   `.play-btn-circle` rule: the earlier `pointer: coarse` block (above) has the same
   specificity and loses to it, so play buttons stayed 29px on touch devices. */
@media (pointer: coarse) {
  .play-btn-circle {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* ── Clip widget on a show page (scoop-clips) ────────────────────────
 * Secondary to the episode list, so it stays quiet: a thin accent edge instead of a
 * filled panel, tight rows, quotes clamped to two lines, and no show tag (every clip
 * here is this show's). The head carries the rule so the border spans label + link.
 */
.show-clips {
  border-left: 3px solid var(--accent, var(--accent-amber));
  padding-left: 0.9rem;
  padding-block: 1rem;
}

.show-clips__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.show-clips__head .rule-label {
  margin: 0;
  border: 0;
  padding-bottom: 0.4rem;
  display: inline;
}

.show-clips__all {
  font-size: 0.8rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.show-clips__all:hover,
.show-clips__all:focus-visible {
  color: var(--text-primary);
}

.clip-row--compact {
  padding: 0.45rem 0;
}

.clip-row--compact .clip-row__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  margin-bottom: 0.1rem;
}

.clip-row--compact .clip-timeline {
  margin-block: 0.1rem;
  padding-block: 0.2rem;
}

.clip-row--compact .clip-row__meta {
  font-size: 0.76rem;
}

.show-clips__pager {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}

/* The pager swaps in place (show-clips.js); dim it while the next page loads. */
.show-clips.is-loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  .show-clips.is-loading {
    transition: none;
  }
}

/* In the compact widget, hide the clock until the clip is the loaded one: five
   rows of "0:00 / 0:00" is noise on a page whose main content is the episodes. */
.clip-row--compact .clip-timeline:not(.is-active) .clip-timeline__clock {
  visibility: hidden;
}

/* Touch sizes for the clip widget's own links. Last in the file on purpose: a coarse
   rule placed before its base rule loses to it (the .play-btn-circle bug). Scoped to the
   widget; the shared .pagination used by other lists has the same short links, a gap
   noted in progress.md rather than widened here. */
@media (pointer: coarse) {
  .show-clips__pager a,
  .show-clips__all {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding-inline: 0.25rem;
  }

  .show-clips__pager {
    align-items: center;
    gap: 0.5rem 1rem;
  }
}

/* ── Show page tabs: Episodes / Clips / Isos (scoop-clips) ───────────
 * Selected state is a filled underline bar AND bolder text, so it does not rest on colour
 * alone. The bar scrolls sideways instead of wrapping if it ever outgrows a phone, and
 * every tab is a 44px touch target on touch devices. The panels below are plain
 * `.section`s; only the selected one has content (the others are `hidden`).
 */
.show-tabs {
  margin-top: 1rem;
  border-bottom: 1px solid var(--border);
}

.show-tabs__bar {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.show-tabs__bar::-webkit-scrollbar {
  display: none;
}

.show-tabs__tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  min-height: 2.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 4px solid transparent;
  margin-bottom: -1px;
}

.show-tabs__tab:visited {
  color: var(--text-dim);
}

.show-tabs__tab:hover {
  color: var(--text-primary);
}

.show-tabs__tab:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: -2px;
}

.show-tabs__tab.is-selected,
.show-tabs__tab[aria-selected="true"] {
  color: var(--text-primary);
  border-bottom-color: var(--accent, var(--accent-amber));
  background: var(--bg-panel-raised);
}

.show-tabs__tab.is-selected:visited {
  color: var(--text-primary);
}

.show-tabs__panel[hidden] {
  display: none;
}

/* A panel holds one list, so drop the top padding a standalone section would have. */
.show-tabs__panel {
  padding-top: 1rem;
}

.show-tabs-block.is-loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}

.show-isos__head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}

.show-isos__all {
  font-size: 0.8rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.show-isos__all:hover,
.show-isos__all:focus-visible {
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .show-tabs-block.is-loading {
    transition: none;
  }
}

/* Last in the file on purpose: a coarse-pointer rule placed before its base rule loses to
   it (the .play-btn-circle bug). */
@media (pointer: coarse) {
  .show-tabs__tab {
    min-height: 2.75rem;
  }

  .show-isos__pager a,
  .show-isos__all {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding-inline: 0.25rem;
  }

  .show-isos__pager {
    align-items: center;
    gap: 0.5rem 1rem;
  }
}

/* ── Iso editor (scoop-clips) ────────────────────────────────────────
 * Mobile first: the three fields stack on a phone and sit in a row from 640px up. Every
 * control is a 44px touch target on touch devices. Nothing here relies on colour alone:
 * the region is a shaded band with handles, the active toggles carry aria-pressed and a
 * filled style, and errors are text.
 */
.iso-editor {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-panel-raised);
  min-width: 0;
}

.iso-editor__wave {
  position: relative;
  min-height: 120px;
  background: var(--bg-void);
  border: 1px solid var(--border);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

/* The region and its drag handles live in wavesurfer's shadow DOM, and the wave box scrolls
   sideways (to pan a zoomed waveform). A touch that starts on a handle would otherwise begin a
   PAN, and the browser would cancel the drag, so on a phone the handles did nothing. `none` on
   just the handles keeps the rest of the box pannable. Reached with ::part() because the
   plugin exposes `region` and `region-handle` parts and sets no touch-action. */
.iso-editor__wave > div::part(region-handle) {
  touch-action: none;
}

/* The region BODY keeps horizontal panning: zoomed in, the region can fill the whole view, and
   if it also blocked panning there would be nowhere left to touch to scroll the waveform. On a
   phone the handles resize and a swipe pans; moving a whole region is a nudge of both edges. */
.iso-editor__wave > div::part(region) {
  touch-action: pan-x;
}

.iso-editor__status {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  overflow-wrap: anywhere;
}

/* With no waveform (still loading, or the audio could not be read) the box would be an empty
   dark rectangle under the message, so it stays collapsed until wavesurfer has drawn into it. */
.iso-editor__wave:empty {
  display: none;
}

.iso-editor__status:empty {
  display: none;
}

.iso-editor__audio {
  display: block;
  width: 100%;
  margin: 0.75rem 0;
}

.iso-editor__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.iso-editor__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.iso-editor__field label,
.iso-editor__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.iso-editor__nudge {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.iso-editor__nudge input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  background: var(--bg-void);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-inline: 0;
  padding: 0.5rem 0.25rem;
}

.iso-editor__step,
.iso-editor__mark,
.iso-editor__btn {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-void);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  touch-action: manipulation;
}

.iso-editor__step {
  flex: 0 0 auto;
  min-width: 2.5rem;
  font-size: 1.2rem;
  /* A held button must not start a text selection or a long-press menu on touch. */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.iso-editor__mark {
  padding: 0.4rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.iso-editor__playhead {
  display: block;
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-amber);
  border: 1px dashed var(--border);
  overflow-wrap: anywhere;
}

.iso-editor__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.iso-editor__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
}

.iso-editor__zoom {
  display: inline-flex;
  gap: 0.25rem;
}

.iso-editor__step:hover,
.iso-editor__mark:hover,
.iso-editor__btn:hover {
  border-color: var(--accent-amber);
}

.iso-editor__step:focus-visible,
.iso-editor__mark:focus-visible,
.iso-editor__btn:focus-visible,
.iso-editor__nudge input:focus-visible,
.iso-editor__save input:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 1px;
}

.iso-editor__btn[aria-pressed="true"],
.iso-editor__btn--primary {
  background: var(--accent-amber);
  color: var(--bg-void);
  border-color: var(--accent-amber);
}

.iso-editor__save {
  margin-top: 1rem;
}

.iso-editor__save label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.iso-editor__hint {
  color: var(--text-dim);
}

.iso-editor__save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.iso-editor__save-row input:not([type="checkbox"]),
.iso-editor__save-row select {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.5rem;
  font-family: inherit;
  background: var(--bg-void);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.iso-editor__message {
  min-height: 1.2em;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.iso-editor__heading {
  margin: 1rem 0 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.iso-editor__trim-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.iso-editor__trim-load {
  display: block;
  width: 100%;
  padding: 0.5rem 0.25rem;
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  color: var(--text-primary);
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--border);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.iso-editor__trim-load:hover,
.iso-editor__trim-load:focus-visible {
  color: var(--accent-amber);
}

@media (min-width: 640px) {
  .iso-editor__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Last in the file on purpose: a coarse-pointer rule placed before its base rule loses to it
   (the .play-btn-circle bug). */
@media (pointer: coarse) {
  .iso-editor__step,
  .iso-editor__mark,
  .iso-editor__btn,
  .iso-editor__nudge input,
  .iso-editor__save-row input:not([type="checkbox"]),
  .iso-editor__save-row select {
    min-height: 2.75rem;
  }

  .iso-editor__step {
    min-width: 2.75rem;
  }
}

/* Saved trims: the load button grows, the delete button sits beside it (a separate target so
   loading a trim can never delete it). Armed state is text ("Really delete?") plus a filled
   style, not colour alone. */
.iso-editor__trim {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

.iso-editor__trim-load {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.iso-editor__trim-delete {
  flex: 0 0 auto;
  padding: 0.25rem 0.6rem;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  touch-action: manipulation;
}

.iso-editor__trim-delete:hover,
.iso-editor__trim-delete:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent-amber);
}

.iso-editor__trim-delete.is-armed {
  background: var(--accent-amber);
  color: var(--bg-void);
  border-color: var(--accent-amber);
  font-weight: 700;
}

@media (pointer: coarse) {
  .iso-editor__trim-delete {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}

/* ── Iso detail page (scoop-clips) ───────────────────────────────────
 * Mobile first: one column, facts first (they are short context) then the editor. From 960px
 * the facts sit in a narrow column beside the editor, which gets the width a waveform needs.
 * `minmax(0, ...)` everywhere: a 63-character npub or a URL in "playing at the time" must not
 * stretch the page.
 */
.iso-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.iso-detail__shared {
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.iso-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.iso-detail__editor {
  min-width: 0;
}

/* The editor comes first in the DOM, so on a phone it is first on screen AND first for a
   keyboard or screen reader: it is the tool, and the facts are context (with the facts first the
   editor started 1,000+ px down the page, about 1.5 screens of scrolling). From 960px the facts
   are placed in the left column with `order`; that is the one visual-only reorder, and it only
   moves a secondary panel. */

.iso-detail__facts {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
}

.iso-detail__heading {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.iso-detail__list {
  margin: 0;
}

.iso-detail__list > div {
  padding: 0.45rem 0;
  border-bottom: 1px dotted var(--border);
  min-width: 0;
}

.iso-detail__list > div:last-child {
  border-bottom: 0;
}

.iso-detail__list dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.iso-detail__list dd {
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
}

@media (min-width: 960px) {
  .iso-detail {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    align-items: start;
  }

  .iso-detail__facts {
    order: -1;
  }
}

/* Last in the file on purpose: a coarse-pointer rule placed before its base rule loses to it. */
@media (pointer: coarse) {
  .iso-detail__actions .iso-editor__btn,
  .iso-detail__actions .shuffle-btn {
    min-height: 2.75rem;
  }
}

/* A disabled "Download trim" (no samples to cut) must read as unavailable, not just quiet. The
   dashed border and struck-through feel are not colour alone, and the title says why. */
.iso-editor__btn:disabled {
  color: var(--text-dim);
  border-style: dashed;
  cursor: not-allowed;
  opacity: 0.7;
}

.iso-editor__btn:disabled:hover {
  border-color: var(--border);
}

/* ── Soundboards ─────────────────────────────────────────────────────
   Named soundboard-*, not board-*: board-* is the news Board (bulletin page). Grids use
   minmax(0, 1fr) and text wraps anywhere, because member-chosen titles can be one long word. */
.soundboard__title {
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}

.soundboard__meta,
.soundboard-list__meta {
  color: var(--text-dim);
}

.soundboard__note {
  border: 1px dashed var(--border);
  padding: 0.5rem 0.75rem;
  color: var(--text-dim);
}

.soundboard__pads {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.6rem;
}

.pad {
  width: 100%;
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.6rem;
  text-align: left;
  font: inherit;
  color: var(--text-primary);
  background: var(--bg-panel-raised);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.45), inset 2px 2px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.pad:hover { border-color: var(--accent); }
.pad:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.pad--playing {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

/* A glyph as well as the fill, so the playing state never depends on colour alone. */
.pad--playing .pad__len::before {
  content: "\25B6  ";
}

.pad--unavailable,
.pad--error {
  cursor: not-allowed;
  border-style: dashed;
  color: var(--text-dim);
}

.pad__title {
  font-weight: bold;
  overflow-wrap: anywhere;
}

.pad__len {
  font-size: 0.85em;
  opacity: 0.85;
}

.soundboard-list {
  list-style: none;
  padding: 0;
}

.soundboard-list__item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--border);
}

.soundboard-list__item a {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (pointer: coarse) {
  .pad { min-height: 6.5rem; }
  .soundboard-list__item a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Add to soundboard: the checkbox keeps its natural size and sits on one line with its label. */
.iso-editor__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.iso-editor__check input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
}

.iso-editor__board {
  margin-top: 1.25rem;
}

/* Home-page rail signup: the same form as the footer one, a notch bolder so it is the first thing in
   the rail. No pop-up, no sticky bar, no animation: prominence comes from position and a stronger
   frame, which keeps the lo-fi look and never gets in the way of reading. */
.gadget--signup {
  border: 2px solid var(--accent-amber);
  border-left-width: 6px;
  background: var(--bg-panel-raised);
}

.newsletter-form--rail {
  border: 0;
  padding: 0;
  background: transparent;
}

.newsletter-form--rail p {
  color: var(--text-primary);
}

.newsletter-form--rail input[type="email"] {
  flex: 1 1 100%;
  min-width: 0;
  padding: 0.65rem 0.6rem;
}

.newsletter-form--rail button {
  flex: 1 1 100%;
  padding: 0.7rem 1rem;
}

.newsletter-form--rail button:focus-visible,
.newsletter-form--rail input[type="email"]:focus-visible {
  outline: 3px solid var(--accent-amber);
  outline-offset: 2px;
}

/* Exactly one of the two prominent signups shows at a time. Wide screens: the rail one (beside the top
   story). Phones: the rail falls below the whole episode list, so a copy sits after the top story and
   the rail one is hidden. display:none also removes the hidden form from keyboard and screen-reader
   order, so nobody tabs into a form they cannot see. */
.home-signup--phone {
  display: none;
}

@media (max-width: 760px) {
  .home-signup--phone {
    display: block;
    margin-bottom: 1.5rem;
  }

  .gadget-rail #newsletter-rail {
    display: none;
  }
}

/* Touch targets are about 44px, scoped to coarse pointers so desktop keeps its compact density. */
@media (pointer: coarse) {
  .newsletter-form--rail input[type="email"],
  .newsletter-form--rail button {
    min-height: 2.75rem;
  }
}

/* Top story's big play button. Last in the file on purpose: the coarse-pointer
   `.play-btn-circle` rules above have the same specificity and would shrink it to 2.75rem. */
.play-btn-circle--big {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 2rem;
  margin: 0.5rem 0;
  border-width: 2px;
}
