/* The reader is fully on the design system: every color/font in the selectors below resolves to a
   platform token from the bound parcel's tokens.css (mode-aware via [data-theme]/@media). The four
   font roles (--font-sans/-serif/-mono/-display) are real design tokens, so each parcel wears its
   own typefaces via its theme's tokens.css -- no font names are baked in here.
   Only page geometry (--w/--band) stays local. "chrome" = the inverse-of-page bar -> --bg-reverse
   background + --text-reverse text (a real per-mode reverse surface: ink slab in light, elevated-dark
   in dark -- never the white that --text-primary-as-background flipped to). Text on an --accent fill
   uses --text-on-accent; brutalist edges use --edge-line/--edge-shadow. */
:root {
  --w: 560px;
  --band: clamp(360px, 60vh, 520px);
}

@media(min-width:780px) {
  :root {
    --w: 660px
  }
}

@media(min-width:1240px) {
  :root {
    --w: 740px
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent
}

/* iOS Safari renders native button chrome (breaks width/height, tints glyphs blue) unless
   appearance is reset; it also drops GRID layout on a <button>, so the icon buttons below
   center with flex (which WebKit honors), never grid. Both are why they looked fine on
   desktop but off-center / non-square on iOS. */
button {
  -webkit-appearance: none;
  appearance: none
}

/* Safari collapses a flex-item SVG that has only a viewBox (intrinsic size 0) to 0x0 -- the
   markup now carries width/height attributes, and no-shrink keeps the icon at its set size. */
button svg {
  flex-shrink: 0
}

html,
body {
  margin: 0;
  height: 100%
}

body {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased
}

.app {
  position: relative;
  width: 100%;
  max-width: var(--w);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg-base)
}

/* sticky header: masthead + filter trigger */
.head {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--bg-base)
}

.bar {
  background: var(--bg-reverse);
  color: var(--text-reverse);
  display: flex;
  align-items: center;
  gap: var(--space-sm-md);
  padding: var(--space-sm-md) var(--space-md)
}

.bar .wm {
  font-family: var(--font-display);
  font-size: clamp(var(--text-base), 6vw, var(--text-xl));
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: .9;
  cursor: pointer
}

.bar .wm .o {
  color: inherit
}

.bar .bmode {
  margin-left: auto;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-reverse);
  border: 1.5px solid var(--text-reverse);
  font-size: var(--text-xs);
  line-height: 1;
  cursor: pointer
}

.bar .bmode:active {
  transform: translateY(1px)
}

/* Control-icon SVGs (mode toggle, player, listen, cover badge) -- monochrome via currentColor,
   identical desktop/mobile (raw glyphs rendered as emoji on mobile). Fixed px like .slink svg. */
.bar .bmode svg {
  width: 18px;
  height: 18px
}

.station .stbtn svg {
  width: 16px;
  height: 16px
}

.station .stbtn.pp svg {
  width: 20px;
  height: 20px
}

.listen .lico svg {
  width: 11px;
  height: 11px;
  display: block
}

.ic-badge .ic-svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.12em
}

.bar .bwrite {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-1);
  color: var(--text-on-accent);
  border: 0;
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer
}

.bar .bwrite:active {
  transform: translateY(1px)
}

.filterbar {
  display: flex;
  border-top: 1px solid var(--bg-reverse);
  border-bottom: 1px solid var(--bg-reverse);
  background: var(--bg-reverse)
}

.ftrigger {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: var(--space-sm-md) var(--space-md);
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-reverse);
  text-align: left
}

.ftrigger .fico {
  font-size: var(--text-xs)
}

.ftrigger .flabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.ftrigger .fcaret {
  margin-left: auto;
  font-size: var(--text-3xs)
}

.ftrigger.on .flabel {
  color: var(--accent-1);
  font-weight: 700
}

/* feed: each article = an inline carousel */
.feed {
  padding: 0 0 44vh
}

/* curated spotlight: a side-scroll of tall portrait posters above the chrono feed (unfiltered
   home only). No zone label -- the portrait format + horizontal scroll imply "featured". */
.spotlight[hidden] {
  display: none
}

.sp-posterrow {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  scrollbar-width: none
}

.sp-posterrow::-webkit-scrollbar {
  display: none
}

/* portrait poster -- intentionally a different format from the landscape feed hero; a pin supplies
   a portrait `poster` image, else the landscape hero is center-cropped to fill the 3:4 frame. */
.sp-poster {
  position: relative;
  flex: 0 0 76%;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  text-decoration: none;
  background: var(--bg-elevated);
  border: var(--border-width) solid var(--border-subtle);
  cursor: pointer
}

.sp-posterimg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

/* legibility scrim over arbitrary photos -- fixed dark gradient + light text is a deliberate
   exception to theme tokens (text must read on any image, regardless of light/dark mode). */
.sp-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0) 58%)
}

.sp-postermeta {
  position: relative;
  z-index: 1;
  padding: var(--space-sm)
}

.sp-posterkick {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  opacity: .85
}

.sp-postertitle {
  display: block;
  margin-top: var(--space-3xs);
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  color: #fff
}

/* year divider: editorial section break between year groups (was the vestigial zero-height yanchor) */
.yband {
  scroll-margin-top: 108px;
  display: flex;
  align-items: center;
  gap: var(--space-sm-md);
  padding: var(--space-lg) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted)
}

.yband::before,
.yband::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-default)
}

.cut {
  position: relative;
  height: var(--band);
  border-bottom: 1px solid var(--border-subtle)
}

.cut.featured {
  height: clamp(440px, 74vh, 620px);
  border-bottom: 5px solid var(--edge-line)
}

.acar {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none
}

.acar::-webkit-scrollbar {
  display: none
}

.apanel {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 100%;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.ic-hero {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated)
}

.ic-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xs)
}

.ic-kick {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-top: var(--space-xs)
}

.ic-topline .ic-kick,
.ic-topline .ic-meta {
  margin-top: 0
}

.ic-topline .ic-meta {
  text-align: right
}

.cut.featured .ic-kick::before {
  content: "latest · ";
  color: var(--accent-1)
}

.ic-h2 {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: clamp(var(--h3-size), 6.4vw, var(--h1-size));
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: var(--space-sm) 0 0;
  cursor: pointer;
  flex: 0 0 auto;
  padding-bottom: var(--space-3xs)
}

.cut.featured .ic-h2 {
  font-size: clamp(var(--h2-size), 9vw, var(--h1-size))
}

.ic-meta {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-sm-md)
}

.ic-stand {
  font-family: var(--font-serif);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* overflow:hidden zeroes the flex auto-min-height -> without this the panel shrinks the
     clamp box below 2 lines (mid-line clip); only .ic-hero (min-height:0) may give space */
  flex: 0 0 auto
}

.ic-byline {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  margin-top: var(--space-xs)
}

.ic-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--bg-reverse);
  color: var(--text-reverse);
  padding: var(--space-xs) var(--space-sm);
  margin-top: var(--space-sm);
  cursor: pointer
}

/* toc panel: the chapter list, tap a row to dive straight to its #c{n} */
.ic-toc {
  list-style: none;
  margin: var(--space-sm) 0 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none
}

.ic-toc::-webkit-scrollbar {
  display: none
}

.ic-tocrow {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer
}

.ic-tocrow:active {
  background: var(--accent-1-dim)
}

.ic-tocn {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--accent-1)
}

.ic-toct {
  flex: 1;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.ic-tocmore {
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-sm) 0;
  cursor: pointer
}

/* composer-only: the toc section door (block-types toc panel renders it when ctx.compose) */
.ic-tocadd {
  list-style: none;
  display: flex;
  padding: var(--space-sm) 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-muted);
  cursor: pointer
}

.ic-tocadd:active {
  color: var(--text-accent)
}

.ic-tocaddin {
  flex: 1;
  border: 0;
  border-bottom: 1px solid var(--accent-1);
  outline: none;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  padding: var(--space-2xs) 0
}

.adots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  pointer-events: none
}

.adots i {
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--text-primary);
  background: transparent
}

.adots i.on {
  background: var(--text-primary)
}

#sentinel {
  height: 1px
}

/* scroll-to-top: fades in after you scroll down; thumb-zone bottom-right (no permanent chrome) */
.totop {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 18;
  width: 48px;
  height: 48px;
  border: 1px solid var(--edge-line);
  background: var(--accent-1);
  color: var(--text-on-accent);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 var(--edge-shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s
}

.totop.on {
  opacity: 1;
  visibility: visible
}

.totop svg {
  width: 20px;
  height: 20px
}

/* a diving article (z 20) sits over the toTop (z 18); also hard-hide it while diving */
#reader.open~.totop {
  opacity: 0;
  visibility: hidden
}

.totop:active {
  transform: var(--press-offset);
  box-shadow: 1px 1px 0 var(--edge-shadow)
}

body.broadcasting .totop {
  bottom: calc(84px + env(safe-area-inset-bottom))
}

/* lift above the station bar */

/* ============ listen / station (read the writer's words aloud; category = a channel) ============ */
/* trigger lives at the trailing edge of the filterbar: broadcast whatever's in view */
.listen {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: var(--space-sm-md) var(--space-md);
  background: transparent;
  border: 0;
  border-left: 1px solid color-mix(in srgb, var(--text-reverse) 35%, transparent);
  cursor: pointer;
  color: var(--text-reverse)
}

.listen .lico {
  font-size: var(--text-3xs);
  color: var(--accent-1)
}

.listen:active {
  background: color-mix(in srgb, var(--text-reverse) 6%, transparent)
}

.listen.live {
  background: var(--accent-1);
  color: var(--text-on-accent)
}

.listen.live .lico {
  color: var(--text-on-accent)
}

/* the card currently being read */
.cut.playing {
  position: relative
}

.cut.playing::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-1);
  z-index: 3
}

/* now-playing bar: only chrome while a broadcast is live, gone otherwise */
.station {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(105%);
  width: 100%;
  max-width: var(--w);
  z-index: 27;
  background: var(--bg-reverse);
  color: var(--text-reverse);
  border-top: 2px solid var(--accent-1);
  display: flex;
  align-items: center;
  gap: var(--space-sm-md);
  padding: var(--space-sm-md) var(--space-md) calc(var(--space-sm-md) + env(safe-area-inset-bottom));
  transition: transform .3s cubic-bezier(.4, 0, .1, 1)
}

.station.on {
  transform: translateX(-50%) translateY(0)
}

.station .stprog {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: var(--accent-1);
  transition: width .3s linear
}

/* scrubber: invisible track riding the bar's top edge -- .stprog IS the fill; only the handle shows.
   Disabled (audio lane: the embed owns transport) = no handle, no pointer. */
.station .stseek {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0;
  top: -11px;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer
}

.station .stseek::-webkit-slider-runnable-track {
  height: 22px;
  background: transparent
}

.station .stseek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: 4.5px;
  border-radius: 50%;
  background: var(--accent-1)
}

.station .stseek::-moz-range-track {
  height: 22px;
  background: transparent
}

.station .stseek::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-1)
}

.station .stseek:disabled {
  pointer-events: none
}

.station .stseek:disabled::-webkit-slider-thumb {
  opacity: 0
}

.station .stseek:disabled::-moz-range-thumb {
  opacity: 0
}

/* current post's hero as cover art; the hatch pattern is the no-hero fallback (JS overrides
   background-image with the thumb derivative when the post carries one) */
.station .stthumb {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  background-color: color-mix(in srgb, var(--text-reverse) 10%, transparent);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text-reverse) 18%, transparent) 0 2px, transparent 2px 7px);
  background-size: cover;
  background-position: center;
  border: 1px solid color-mix(in srgb, var(--text-reverse) 35%, transparent)
}

.station .stbtn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-reverse);
  border: 1.5px solid var(--text-reverse);
  font-size: var(--text-2xs);
  line-height: 1;
  cursor: pointer
}

.station .stbtn.pp {
  width: 40px;
  height: 40px;
  background: var(--accent-1);
  color: var(--text-on-accent);
  border-color: var(--accent-1);
  font-size: var(--text-sm)
}

.station .stbtn:active {
  transform: translateY(1px)
}

.station .stmid {
  flex: 1;
  min-width: 0;
  cursor: pointer
}

.station .stnow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: var(--space-2xs)
}

.station .sttime {
  color: color-mix(in srgb, var(--text-reverse) 60%, transparent);
  letter-spacing: .04em;
  white-space: nowrap
}

.station .sttitle {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.station .stx {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: color-mix(in srgb, var(--text-reverse) 55%, transparent);
  border: 0;
  font-size: var(--text-base);
  cursor: pointer
}

/* ---- dock sheet: the bar's z-expansion (artwork, big transport, TTS speed, running order).
   Rises from the bottom (dragSheet dir +1); same reverse chrome as the station bar. ---- */
.stsheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(102%);
  width: 100%;
  max-width: var(--w);
  max-height: 92dvh;
  background: var(--bg-reverse);
  color: var(--text-reverse);
  border-top: 2px solid var(--accent-1);
  z-index: 29;
  transition: transform .34s cubic-bezier(.4, 0, .1, 1);
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-lg) calc(var(--space-md) + env(safe-area-inset-bottom))
}

.stsheet.open {
  transform: translateX(-50%) translateY(0)
}

.stsheet .dgrip::before {
  background: color-mix(in srgb, var(--text-reverse) 35%, transparent)
}

.stsheet .shbody {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0
}

.stsheet .sh-art {
  flex: 0 0 auto;
  aspect-ratio: 21 / 10;
  max-height: 30dvh;
  background-color: color-mix(in srgb, var(--text-reverse) 10%, transparent);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text-reverse) 18%, transparent) 0 2px, transparent 2px 8px);
  background-size: cover;
  background-position: center;
  border: 1px solid color-mix(in srgb, var(--text-reverse) 30%, transparent);
  margin-bottom: var(--space-md)
}

.stsheet .sh-now {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: var(--space-2xs)
}

.stsheet .sh-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.1;
  margin-bottom: var(--space-md)
}

.stsheet .sh-title[data-dive] {
  cursor: pointer
}

.stsheet .sh-tr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-sm)
}

.stsheet .sh-b {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-reverse);
  border: 1.5px solid var(--text-reverse);
  cursor: pointer
}

.stsheet .sh-b svg {
  width: 20px;
  height: 20px
}

.stsheet .sh-b.sh-pp {
  width: 56px;
  height: 56px;
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: var(--text-on-accent)
}

.stsheet .sh-b.sh-pp svg {
  width: 24px;
  height: 24px
}

.stsheet .sh-b:disabled {
  opacity: .3
}

.stsheet .sh-time {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .04em;
  text-align: center;
  color: color-mix(in srgb, var(--text-reverse) 60%, transparent);
  margin-bottom: var(--space-sm)
}

.stsheet .sh-spd {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm)
}

.stsheet .sh-spd button {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--text-reverse);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--text-reverse) 40%, transparent);
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer
}

.stsheet .sh-spd button.on {
  background: var(--text-reverse);
  color: var(--bg-reverse)
}

.stsheet .sh-qk {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-reverse) 55%, transparent);
  margin: var(--space-md) 0 var(--space-xs)
}

.stsheet .sh-q {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0
}

.stsheet .sh-q li {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--text-reverse) 18%, transparent);
  cursor: pointer
}

.stsheet .sh-q .n {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: color-mix(in srgb, var(--text-reverse) 50%, transparent)
}

.stsheet .sh-q .qt {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.stsheet .sh-q .qm {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: color-mix(in srgb, var(--text-reverse) 50%, transparent);
  white-space: nowrap
}

.stsheet .sh-q li.onq .n,
.stsheet .sh-q li.onq .qt {
  color: var(--accent-1)
}

/* played history: rows above the playhead stay listed (replayable) but recede */
.stsheet .sh-q li.past {
  opacity: .38;
  transition: opacity var(--transition-base)
}

/* dock canvas: a queued embed whose origin slide re-rendered away plays here, riding the bar.
   bottom is set by JS to the live bar height; z sits between the bar (27) and the sheet (29). */
.stcanvas {
  position: fixed;
  right: var(--space-sm);
  bottom: 0;
  width: min(300px, 56vw);
  aspect-ratio: 16 / 9;
  z-index: 28;
  background: var(--bg-reverse);
  border: 1px solid var(--accent-1);
  overflow: hidden
}

.stcanvas iframe,
.stcanvas .hc-vid {
  display: block;
  width: 100%;
  height: 100%;
  border: 0
}

/* ============ category drawer (bottom sheet) ============ */
.scrim {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s;
  z-index: 28
}

.scrim.on {
  opacity: 1;
  visibility: visible
}

.drawer {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(-105%);
  width: 100%;
  max-width: var(--w);
  background: var(--bg-base);
  border: 1px solid var(--edge-line);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  z-index: 30;
  transition: transform .34s cubic-bezier(.4, 0, .1, 1);
  max-height: 84dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top)
}

.drawer.open {
  transform: translateX(-50%) translateY(0)
}

.dhead {
  display: flex;
  align-items: center;
  gap: var(--space-sm-md);
  padding: var(--space-md) var(--space-md) var(--space-sm-md);
  border-bottom: 1px solid var(--edge-line)
}

.dhead .dtitle {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  text-transform: uppercase;
  letter-spacing: .04em
}

.dclear {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--edge-line);
  color: var(--text-primary);
  background: var(--bg-base);
  padding: var(--space-sm) var(--space-sm-md);
  cursor: pointer
}

.dclear:active {
  background: var(--bg-reverse);
  color: var(--text-reverse)
}

.dlist {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: var(--space-xs) 0 var(--space-sm)
}

.dgrip {
  flex: 0 0 auto;
  padding: var(--space-sm) 0 var(--space-sm-md);
  cursor: grab;
  display: flex;
  justify-content: center;
  touch-action: none;
}

.dgrip::before {
  content: "";
  width: 44px;
  height: 5px;
  border-radius: var(--radius-sm);
  background: var(--border-subtle)
}

.drow {
  display: flex;
  align-items: center;
  gap: var(--space-sm-md);
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: var(--space-sm-md) var(--space-md);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--text-primary);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle)
}

.drow .dx {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1px solid var(--edge-line);
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center
}

.drow.on .dx {
  background: var(--accent-1)
}

.drow.on .dx::after {
  content: "✓";
  color: var(--text-on-accent);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  font-weight: 700
}

.drow .dn {
  flex: 1
}

.drow.on .dn {
  font-weight: 600
}

.drow .dc {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--text-muted)
}

/* ============ about (colophon sheet, drops from the top to meet the wordmark trigger) ============ */
/* about chrome reuses the pitch sheet chrome + shared .dgrip; only z-index differs */
.about {
  z-index: 31
}

.awm {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 13vw, 68px);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .86;
  border-bottom: 4px solid var(--edge-line);
  padding-bottom: var(--space-sm-md)
}

.awm span {
  color: inherit
}

.akick {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-top: var(--space-md)
}

.alead {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-lg), 5vw, var(--text-xl));
  line-height: 1.4;
  margin: var(--space-sm) 0 0
}

.alead b {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--accent-1-dim) 62%)
}

.astat {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md)
}

.astat .n {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 7vw, var(--text-xl));
  color: var(--accent-1);
  line-height: .85
}

.astat .l {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-xs)
}

.alinks {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md)
}

.alinks .slink {
  display: inline-flex;
  color: var(--text-primary);
  transition: opacity var(--transition-fast)
}

.alinks .slink:hover {
  opacity: .55
}

.alinks .slink svg {
  width: 22px;
  height: 22px;
  display: block
}

.acolo {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  line-height: 1.8;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md)
}

/* ============ pitch sheet (write for us, drops from the top to meet the + trigger) ============ */
.pitch,
.about {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(-105%);
  width: 100%;
  max-width: var(--w);
  background: var(--bg-base);
  border: 1px solid var(--edge-line);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  z-index: 30;
  transition: transform .34s cubic-bezier(.4, 0, .1, 1);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top)
}

.pitch.open,
.about.open {
  transform: translateX(-50%) translateY(0)
}

.pbody,
.abody {
  overflow-y: auto;
  padding: var(--space-lg) var(--space-lg) var(--space-sm)
}

.ptitle {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: clamp(var(--text-lg), 7.4vw, var(--text-xl));
  line-height: 1.0;
  letter-spacing: var(--tracking-tight)
}

.psub {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--text-secondary);
  margin: var(--space-sm-md) 0 var(--space-xs)
}

.plabel {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: var(--space-md) 0 var(--space-sm)
}

.pin {
  width: 100%;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-base);
  border: 1px solid var(--edge-line);
  padding: var(--space-sm-md) var(--space-sm-md);
  outline: none
}

.pin:focus {
  border-color: var(--accent-1)
}

.pta {
  resize: none;
  min-height: 96px;
  line-height: 1.4
}

.psend {
  width: 100%;
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--edge-line);
  background: var(--accent-1);
  color: var(--text-on-accent);
  padding: var(--space-sm-md) var(--space-md);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--edge-shadow)
}

.psend:active {
  transform: var(--press-offset);
  box-shadow: 1px 1px 0 var(--edge-shadow)
}

.plogin {
  display: block;
  width: 100%;
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: none;
  border: 0;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast)
}

.plogin:hover {
  color: var(--text-primary)
}

.pthanks {
  padding: var(--space-2xl) var(--space-lg);
  text-align: center
}

.pthanks .m {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  text-transform: uppercase;
  color: var(--accent-1);
  line-height: .85
}

.pthanks .s {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-sm-md)
}

/* ============ reader = full read (z dive, opened by tap) ============ */
#reader {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateX(160%);
  width: 100%;
  max-width: var(--w);
  height: 100dvh;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  transition: transform .42s cubic-bezier(.4, 0, .1, 1);
  will-change: transform;
  z-index: 20;
  overflow: hidden
}

#reader.open {
  transform: translateX(-50%)
}

.r-strip {
  flex: 0 0 auto;
  background: var(--bg-reverse);
  color: var(--text-reverse);
  display: flex;
  align-items: center;
  gap: var(--space-sm-md);
  padding: var(--space-sm-md) var(--space-md)
}

/* preview banner: a draft-only strip above the reader masthead (operator session / share link).
   In-flow flex child of #reader so it pushes the masthead down (no overlap); inverse chrome +
   accent rule mirror .station/.r-strip. */
.mz-pvbanner {
  flex: 0 0 auto;
  background: var(--bg-reverse);
  color: var(--text-reverse);
  border-bottom: 2px solid var(--accent-1);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-align: center;
  padding: calc(var(--space-2xs) + env(safe-area-inset-top)) var(--space-md) var(--space-2xs)
}

.r-strip .type {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .18em;
  text-transform: uppercase;
  background: var(--accent-1);
  color: var(--text-on-accent);
  padding: var(--space-xs) var(--space-sm)
}

.r-strip .wm {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--text-base);
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer
}

.r-strip .wm .r-back {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  opacity: .55;
  transition: transform var(--transition-fast), opacity var(--transition-fast)
}

.r-strip .wm:hover .r-back {
  opacity: 1;
  transform: translateX(calc(-1 * var(--space-2xs)))
}

.r-strip .wm .o {
  color: inherit
}

.r-close {
  position: absolute;
  right: 14px;
  bottom: 22px;
  z-index: 6;
  width: 54px;
  height: 54px;
  border: 1px solid var(--edge-line);
  background: var(--accent-1);
  color: var(--text-on-accent);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 var(--edge-shadow)
}

.r-close:active {
  transform: var(--press-offset);
  box-shadow: 1px 1px 0 var(--edge-shadow)
}

/* ============ dive host: the server-rendered article scrolls in #rhost ============ */
#rhost {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch
}

/* inline player iframe the central Player mounts into a band panel */
.apanel .hc-vid {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  background: var(--bg-elevated)
}

/* --- article (SSR twin: content.py render_article -> composer preview now, public dive later).
       One stylesheet for both consumers; consumes the reader's local vars. --- */
article.art {
  display: block;
  max-width: var(--w);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-3xl);
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-serif)
}

article.art header {
  margin-bottom: var(--space-lg)
}

.art-cat {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm-md)
}

article.art h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--h2-size), 8vw, var(--h1-size));
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 0 0 var(--space-sm-md)
}

.art-byline {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-secondary);
  margin: 0 0 var(--space-sm-md)
}

.art-meta {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--text-muted);
  margin: 0;
  display: flex;
  gap: var(--space-sm-md)
}

.art-hero {
  margin: var(--space-md) 0
}

article.art figure {
  margin: var(--space-lg) 0;
  padding: 0
}

article.art figure img {
  display: block;
  width: 100%;
}

/* image format: full-bleed (edge-to-edge) + grayscale -- mirrors the composer's data-attrs */
article.art figure.art-photo--bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%)
}

article.art figure.art-photo--gray img {
  filter: grayscale(1)
}

/* crop: aspect-framed wrapper, cover-fit (object-position set inline) */
article.art .art-pcrop {
  overflow: hidden
}

article.art .art-pcrop img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

article.art figcaption {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--text-muted);
  padding-top: var(--space-sm)
}

article.art section {
  margin: 0 0 var(--space-sm)
}

article.art h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1;
  margin: var(--space-3xl) 0 var(--space-xl);
  scroll-margin-top: 70px
}

article.art h2 .art-n {
  color: var(--accent-1);
  -webkit-text-stroke: 0.5px var(--text-primary);
  margin-right: var(--space-sm)
}

article.art p {
  font-size: var(--text-base);
  line-height: 1.65;
  margin: 0 0 var(--space-md)
}

article.art a {
  color: var(--accent-2)
}

article.art blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
  border-left: 3px solid var(--accent-1)
}

article.art blockquote p {
  font-size: var(--text-lg);
  line-height: 1.45;
  font-style: italic;
  margin: 0
}

/* article-top lead + table of contents (GEO jump-list) */
article.art .art-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(var(--text-base), 4.6vw, var(--text-lg));
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg)
}

.art-toc {
  margin: 0 0 var(--space-xl);
  border-top: 2px solid var(--edge-line);
  border-bottom: 2px solid var(--edge-line)
}

article.art .art-toc a {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm-md);
  padding: var(--space-sm) var(--space-2xs);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle)
}

article.art .art-toc a:last-child {
  border-bottom: 0
}

.art-toc .art-tocn {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--accent-1)
}

/* embed cards: audio/video = a play card routed to the central Player; link = a labelled card */
/* --- media embed cards. audio = a waveform strip; video/link = a compact card. The <figure> is the
   tap target (data-embed -> Player); only the inner layout differs. Soft + rounded, not a terminal box. --- */
.art-embed {
  margin: var(--space-lg) 0;
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base)
}

.art-embed.art-audio,
.art-embed.art-video {
  cursor: pointer
}

.art-embed.art-audio:hover,
.art-embed.art-video:hover {
  border-color: var(--border-default);
  box-shadow: 0 1px 2px var(--edge-shadow)
}

/* top row: cover (optional) | title + provider | play chip */
.art-etop {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm-md) var(--space-md)
}

.art-ethumb {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated)
}

.art-ethumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.art-einfo {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  min-width: 0;
  flex: 1
}

.art-etitle {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.art-emeta {
  font-family: var(--font-sans);
  font-size: var(--text-2xs);
  color: var(--text-muted)
}

/* play chip: outlined circle that fills to accent on hover -- implies play, never labels it */
.art-eplay {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--border-default);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: var(--space-3xs);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast)
}

.art-embed:hover .art-eplay {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: var(--text-on-accent)
}

.art-eplay svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  display: block
}

/* waveform strip -- decorative bars that read instantly as audio; front edge tints accent on hover
   as a resting 'playable' hint. Server-rendered + deterministic per track, no JS to paint. */
.art-wave {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3xs);
  height: 34px;
  padding: 0 var(--space-md) var(--space-sm-md)
}

.art-wave i {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-sm);
  background: var(--border-default);
  transition: background var(--transition-fast)
}

.art-embed.art-audio:hover .art-wave i {
  background: color-mix(in srgb, var(--accent-1) 55%, var(--border-default))
}

article.art .art-ecard {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm-md) var(--space-md);
  text-decoration: none;
  color: var(--text-primary)
}

/* Player-injected iframe (YouTube/Vimeo) -- needs an explicit ratio or it collapses to 0 height */
article.art .hc-vid {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  background: var(--bg-elevated)
}

/* end-of-article: "more {category}" related strip (+ sponsor seam) -- sibling of article.art */
.art-end {
  margin: var(--space-2xl) var(--space-md) 0;
  padding-top: var(--space-lg);
  border-top: 4px solid var(--edge-line)
}

.art-endkick {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: var(--space-md)
}

/* numbered editor's-picks list: ranked vertical rows (rank numeral | thumb | text). Replaces the
   old horizontal thumb-card scroll. The poster spotlight is the home front; this is the dive tail. */
.art-relstrip {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--space-xl)
}

.art-relcard {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: var(--border-width) solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer
}

.art-relcard:last-child {
  border-bottom: 0
}

.art-relnum {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--accent-1)
}

.art-relimg {
  display: block;
  width: var(--space-3xl);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-elevated);
  border: var(--border-width) solid var(--edge-line)
}

.art-reltext {
  min-width: 0
}

.art-relkick {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted)
}

.art-reltitle {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  margin-top: var(--space-3xs)
}

.art-reldek {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  margin-top: var(--space-2xs)
}

.art-relmin {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-2xs)
}

.art-fail {
  padding: var(--space-2xl) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--text-muted)
}