/*
Theme Name: ICRT
Theme URI: https://www.icrt.com.tw/
Description: ICRT — International Community Radio Taipei. Child theme of SmartMag, seeded from the DigiTech demo. All ICRT customisation lives here; the parent theme is never modified.
Author: Cubeworks
Author URI: https://www.icrt.com.tw/
Template: smart-mag
Version: 0.1.0
Text Domain: icrt
*/

/* ---------------------------------------------------------------------------
   ICRT palette
   DigiTech ships #d71d4f as its main colour. ICRT's on-air identity is red on
   near-black, so we keep a red accent but shift it to the station's warmer,
   more saturated red and darken the neutral end.
   --------------------------------------------------------------------------- */

:root {
  --icrt-accent: #1160d4;
  --icrt-accent-dark: #0c47a0;
  --icrt-ink: #14161a;
  --icrt-ink-soft: #2a2e35;
  --icrt-paper: #ffffff;
  --icrt-mist: #f4f5f7;
  --icrt-line: #e3e5ea;
  /* One shared page measure. The site was boxed at 1200px, which left a third
     of a normal desktop empty on every page. */
  --icrt-muted: #6b7280;
  --icrt-max: min(1720px, 94vw);

  /* Instruments — the live widgets: the on-air hero, the traffic map, the
     music-log figure. Near-black surfaces with one warm LED signal, the
     vernacular of radio hardware. Blue stays the site's accent; amber lights
     only what is live and true. See docs/design-language.md, "Instruments". */
  --icrt-instrument: #121316;
  --icrt-instrument-raised: #1b1d22;
  --icrt-instrument-line: rgba(255, 255, 255, .08);
  --icrt-dot-off: #2b2e35;
  --icrt-signal: #ff7a1a;
  --icrt-signal-deep: #d4560c;
  --icrt-signal-glow: rgba(255, 122, 26, .35);
}

/* The LED grid every instrument is built on: 3px rounded cells at a 7px
   pitch, unlit. A lit cell is the same square in --icrt-signal. The mask keeps
   the colour in a token, which a data-URI background could not. */
.icrt-dotgrid { position: relative; isolation: isolate; background: var(--icrt-instrument); }
.icrt-dotgrid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--icrt-dot-off);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Crect x='2' y='2' width='3' height='3' rx='.6'/%3E%3C/svg%3E") 0 0 / 7px 7px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Crect x='2' y='2' width='3' height='3' rx='.6'/%3E%3C/svg%3E") 0 0 / 7px 7px;
  pointer-events: none;
}

/* --- dark theme -----------------------------------------------------------
   SmartMag flips <html> between .s-light and .s-dark. Every surface in the
   Cubeworks components is drawn from these tokens, so redefining them here
   turns the whole site over — the roster, the schedule, the show index, the
   events diary, the podcast list and the music log included. Anything that
   hardcoded a colour instead would have stayed stubbornly white, which is
   exactly what dark mode looked like before. */
html.s-dark {
  --icrt-ink: #e9edf4;
  --icrt-ink-soft: #a9b3c1;
  --icrt-muted: #8b95a5;
  --icrt-paper: #151a22;
  --icrt-mist: #1c2330;
  --icrt-line: #2b3440;
  /* The accent is lifted: #1160d4 is legible on white but muddy on near-black. */
  --icrt-accent: #4d92f5;
  --icrt-accent-dark: #1f6fd8;
}

/* Room for the floating player, which is fixed over the foot of the page. */
body { padding-bottom: 5.5rem; }

@media (max-width: 40rem) {
  body { padding-bottom: 4.5rem; }
}

/* --- Language switcher ---------------------------------------------------- */

.icrt-lang-switch {
  display: flex;
  align-items: center;
}

.icrt-lang-list {
  display: flex;
  gap: .4rem;
  align-items: center;
}

.icrt-lang-item a {
  display: inline-block;
  padding: .15rem .5rem;
  border: 1px solid var(--icrt-line);
  border-radius: 3px;
  font-size: .72rem;
  line-height: 1.7;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
}

.icrt-lang-item.is-current a {
  background: var(--icrt-accent);
  border-color: var(--icrt-accent);
  color: var(--icrt-paper);
}

/* === Front page ============================================================
   Ordered by what a listener wants: what is on now and how to hear it, fast
   routes to the rest, the newsroom, then the studio.
   ========================================================================== */

.icrt-front { --icrt-gap: clamp(1.5rem, 3vw, 2.5rem); }

/* --- hero ---------------------------------------------------------------- */

.icrt-hero {
  /* The wash is the on-air show's own colour: front-page.php sets the deep
     stop of its Palette as --icrt-hero-tint inline. The default is the
     accent blue, for a gap in the schedule. */
  --icrt-hero-tint: #1160d4;
  background:
    radial-gradient(120% 150% at 8% 0%, color-mix(in srgb, var(--icrt-hero-tint) 75%, transparent) 0%, transparent 60%),
    linear-gradient(140deg, #0e1522 0%, #0a0d13 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.25rem) 1.25rem;
}

.icrt-hero__inner {
  /* Wide on purpose. At 1200px the band was a short headline, a gap the width
     of a whole column, and a video — on any real desktop the middle was dead. */
  max-width: min(1720px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr) minmax(24rem, 30rem);
  gap: 0;
  /* stretch, not center: the studio column runs the full height of the band. */
  align-items: stretch;
  min-height: 24rem;
}

/* The section no longer pads itself — each column does, so the video can sit
   flush against the top and bottom edges of the band. */
.icrt-hero { padding: 0; }

.icrt-hero__main,
.icrt-hero__next {
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 2.5vw, 2.25rem);
  align-self: center;
}

@media (max-width: 68rem) {
  .icrt-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem); }
  .icrt-hero__next { display: none; }
}

@media (max-width: 48rem) {
  .icrt-hero__inner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
}

/* --- later today ---------------------------------------------------------
   The question a listener asks straight after "what is on now". It used to be
   three sections down the page; here it fills the gap it was leaving. */

.icrt-hero__next {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.icrt-hero__next-title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #9dc2f5;
}

.icrt-hero__next-list { list-style: none; margin: 0; padding: 0; }

.icrt-hero__next-row {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.icrt-hero__next-time {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: #9dc2f5;
  font-variant-numeric: tabular-nums;
}

.icrt-hero__next-show {
  color: #e8ecf3;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.icrt-hero__next-show:hover { color: #fff; text-decoration: underline; }

.icrt-hero__next-all {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9dc2f5;
  text-decoration: none;
}

.icrt-hero__next-all:hover { color: #fff; text-decoration: underline; }

/* --- live studio panel ---------------------------------------------------
   Radio's problem is that there is nothing to look at. The station already
   streams studio video to Twitch, so the hero shows it rather than describing
   it, edge to edge down the right of the band. The player is muted, so it
   never fights the audio stream. */

.icrt-hero__side { display: flex; padding: 0; min-height: 15rem; }

.icrt-hero__studio {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Over the video rather than above it: a header bar would eat the height the
   player is here to use. */
.icrt-hero__studio-title {
  position: absolute;
  top: 0.7rem;
  left: 0.85rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(10, 13, 19, 0.72);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  pointer-events: none;
}

.icrt-hero__studio .cw-twitch { display: flex; flex: 1; margin: 0; }

.icrt-hero__studio iframe {
  display: block;
  width: 100%;
  /* Beats the embed's own height attribute so it fills the band. */
  height: 100%;
  border: 0;
}

/* The link is a fallback for a blocked iframe, not a caption — it must not
   take height from the player. */
.icrt-hero__studio .cw-twitch__fallback { display: none; }

/* --- the on-air instrument -----------------------------------------------
   One of the four instruments (docs/design-language.md, "Instruments"): a
   two-tone live badge, a slot reading, a round play control and an LED
   frequency readout. Amber lights only what is live and true — the dot, the
   bar, the digits, the lit transmitter. Blue stays for the links. */

.icrt-hero__live {
  display: inline-flex;
  align-items: stretch;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.icrt-hero__live-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  background: var(--icrt-signal);
}

/* The one thing on the site allowed to pulse: a dark dot in the lit square,
   once a second, because the station genuinely is live. */
.icrt-hero__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--icrt-instrument);
  animation: icrt-live-pulse 1s ease-in-out infinite;
}

@keyframes icrt-live-pulse {
  50% { transform: scale(.5); opacity: .55; }
}

.icrt-hero__live-label {
  padding: .45rem .65rem;
  background: #eef1f5;
  color: var(--icrt-ink);
}

/* The studio chip keeps its own small dot. */
.icrt-hero__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--icrt-accent);
  box-shadow: 0 0 0 0 rgba(17, 96, 212, .8);
  animation: icrt-pulse 2s infinite;
}

@keyframes icrt-pulse {
  70%  { box-shadow: 0 0 0 12px rgba(17, 96, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(17, 96, 212, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .icrt-hero__dot,
  .icrt-hero__live-dot { animation: none; }
}

.icrt-hero__show {
  margin: .9rem 0 .3rem;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  color: #fff;
}

/* --- slot reading: the minutes left, then the bar ------------------------ */

.icrt-hero__slot { max-width: 30rem; margin: .9rem 0 0; }

.icrt-hero__left {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  margin: 0 0 .6rem;
  font-size: .875rem;
  color: #aeb6c2;
  font-variant-numeric: tabular-nums;
}

.icrt-hero__left-part { display: inline-flex; align-items: baseline; gap: .3rem; }
.icrt-hero__left-part[hidden] { display: none !important; }

.icrt-hero__figure {
  font-size: clamp(2rem, 3.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: #fff;
}

.icrt-hero__bar {
  height: 4px;
  border-radius: 2px;
  background: var(--icrt-dot-off);
  overflow: hidden;
}

.icrt-hero__bar-fill {
  display: block;
  height: 100%;
  background: var(--icrt-signal);
  box-shadow: 0 0 8px var(--icrt-signal-glow);
  transition: width .6s ease;
}

.icrt-hero__ends {
  display: flex;
  justify-content: space-between;
  margin: .45rem 0 0;
  font-size: .78rem;
  color: #aeb6c2;
  font-variant-numeric: tabular-nums;
}

/* --- the screen: the display at the left, the disc at the right ---------- */

/* The one visually-hidden utility the theme needs; the parent ships
   .screen-reader-text for AMP pages only. */
.icrt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Element-qualified with explicit resets: SmartMag styles bare <button>s as
   dark uppercase pills with a fixed --btn-height, and a class alone loses to
   it. `height: auto` is the one that matters most. */
.icrt-hero button.icrt-hero__play {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--icrt-ink);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.icrt-hero button.icrt-hero__play:hover,
.icrt-hero button.icrt-hero__play:focus {
  background: #fff;
  color: var(--icrt-ink);
  text-decoration: none;
}

.icrt-hero button.icrt-hero__play:hover { transform: scale(1.04); }
.icrt-hero button.icrt-hero__play:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--icrt-instrument), 0 0 0 5px #fff;
}

.icrt-hero__play-disc { display: inline-flex; align-items: center; justify-content: center; }
.icrt-hero__play-disc svg { width: 1.3rem; height: 1.3rem; }
/* Nudged right: a centred triangle looks left of centre. */
.icrt-hero__play-icon { margin-left: .15rem; }
.icrt-hero__pause-icon { display: none; }
.icrt-hero button.icrt-hero__play[data-state="playing"] .icrt-hero__play-icon { display: none; }
.icrt-hero button.icrt-hero__play[data-state="playing"] .icrt-hero__pause-icon { display: block; }

/* Sounding, not just asked to: the disc lights in the signal colour, the one
   lit thing on the screen besides the digits. */
.icrt-hero button.icrt-hero__play[data-playing="true"],
.icrt-hero button.icrt-hero__play[data-playing="true"]:hover,
.icrt-hero button.icrt-hero__play[data-playing="true"]:focus {
  background: var(--icrt-signal);
  color: var(--icrt-ink);
}

/* The live badge's row: "on air now", and the other places it is on, as
   quiet chips of the same height. Twitch and TuneIn read as where the show
   also is, not as a second set of controls. */
.icrt-hero__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.icrt-hero__links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }

.icrt-hero__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  color: #e8ecf3;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background .15s ease;
}

.icrt-hero__link:hover { background: rgba(255, 255, 255, .2); color: #fff; text-decoration: none; }
.icrt-hero__link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.icrt-hero__link svg { width: 14px; height: 14px; }

/* --- LED frequency readout ---------------------------------------------- */

/* The same measure as the slot bar above it, so the two instruments share a
   right edge. The digits sit at the left of a wider grid, like the specimen
   the readout is taken from. */
.icrt-hero__readout { margin-top: 1.35rem; width: 100%; max-width: 30rem; }

/* Padding is a multiple of the 7px pitch and the border sits outside the
   padding box, so the SVG's lit cells land exactly on the panel's unlit ones. */
.icrt-hero__led {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--icrt-instrument-line);
  border-radius: 12px;
  overflow: hidden;
}

.icrt-hero__display { flex: 1 1 auto; min-width: 0; }

/* The spectrum: while sound is coming out the digits give way to one column
   per pitch across the display, seven cells tall, lit from the bottom by the
   bar's analyser. Same cells, same pitch, same signal: it is the readout
   listening. */
.icrt-hero__spectrum { display: none; height: 49px; }
.icrt-hero__display[data-mode="spectrum"] .icrt-hero__spectrum { display: flex; }
.icrt-hero__display[data-mode="spectrum"] .icrt-hero__led-text { display: none !important; }

.icrt-hero__spectrum i {
  display: block;
  width: 7px;
  height: 49px;
  background: linear-gradient(to top, var(--icrt-signal) calc(var(--lit, 0) * 7px), var(--icrt-dot-off) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Crect x='2' y='2' width='3' height='3' rx='.6'/%3E%3C/svg%3E") 0 0 / 7px 7px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Crect x='2' y='2' width='3' height='3' rx='.6'/%3E%3C/svg%3E") 0 0 / 7px 7px;
  filter: drop-shadow(0 0 3px var(--icrt-signal-glow));
}

.icrt-hero__spectrum i[data-lit="1"] { --lit: 1; }
.icrt-hero__spectrum i[data-lit="2"] { --lit: 2; }
.icrt-hero__spectrum i[data-lit="3"] { --lit: 3; }
.icrt-hero__spectrum i[data-lit="4"] { --lit: 4; }
.icrt-hero__spectrum i[data-lit="5"] { --lit: 5; }
.icrt-hero__spectrum i[data-lit="6"] { --lit: 6; }
.icrt-hero__spectrum i[data-lit="7"] { --lit: 7; }

/* One pitch of padding on a phone, so the digits keep their natural size
   beside the disc instead of shrinking off the grid. */
@media (max-width: 30rem) {
  .icrt-hero__led { padding: 7px; gap: 7px; }
}

.icrt-hero__led-text {
  display: block;
  color: var(--icrt-signal);
  filter: drop-shadow(0 0 3px var(--icrt-signal-glow));
}

/* Belt and braces: `hidden` loses to any class that sets display. */
.icrt-hero__led-text[hidden] { display: none !important; }
.icrt-hero__led-text svg { display: block; max-width: 100%; height: auto; }

/* Three columns, always: five cities as a flex row wrapped four and one at
   the common desktop width, which left Kaohsiung orphaned on its own line. */
.icrt-hero__cities {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: .15rem .3rem;
  margin: .55rem 0 0;
}

@media (max-width: 24rem) {
  .icrt-hero__cities { grid-template-columns: repeat(2, max-content); }
}

.icrt-hero button.icrt-hero__city {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: .3rem .5rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aeb6c2;
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}

/* Each city has its own LED: unlit until it is the one on the display. */
.icrt-hero button.icrt-hero__city::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--icrt-dot-off);
}

.icrt-hero button.icrt-hero__city span { color: #7d8794; font-variant-numeric: tabular-nums; }

.icrt-hero button.icrt-hero__city:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  text-decoration: none;
}

.icrt-hero button.icrt-hero__city[aria-pressed="true"] { color: #fff; }
.icrt-hero button.icrt-hero__city[aria-pressed="true"] span { color: #cfd5de; }
.icrt-hero button.icrt-hero__city[aria-pressed="true"]::before {
  background: var(--icrt-signal);
  box-shadow: 0 0 5px var(--icrt-signal-glow);
}

.icrt-hero button.icrt-hero__city:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .icrt-hero__bar-fill,
  .icrt-hero__play-disc { transition: none; }
  .icrt-hero button.icrt-hero__play:hover .icrt-hero__play-disc { transform: none; }
}

/* --- shortcuts ----------------------------------------------------------- */

.icrt-shortcuts { border-bottom: 1px solid var(--icrt-line); background: var(--icrt-paper); }

.icrt-shortcuts__inner {
  max-width: var(--icrt-max);
  margin: 0 auto;
  padding: .5rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .25rem;
}

.icrt-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .85rem .4rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--icrt-ink);
  transition: background .15s ease, color .15s ease;
}

.icrt-shortcut:hover { background: var(--icrt-mist); color: var(--icrt-accent); }
.icrt-shortcut__icon { width: 22px; height: 22px; }

.icrt-shortcut__label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
}

/* --- layout -------------------------------------------------------------- */

.icrt-front__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: var(--icrt-gap);
  max-width: var(--icrt-max);
  margin: 0 auto;
  padding: var(--icrt-gap) 1.25rem;
}

.icrt-section-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-transform: none;
  padding: 0;
  border: 0;
}

/* --- news cards ---------------------------------------------------------- */

.icrt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 2rem 1.5rem;
}

/* --- the lead story ------------------------------------------------------
   Six identical tiles told a reader nothing about which story the newsroom
   rated. The first runs at double width: the same card, larger — a bigger
   photograph with the headline beneath it, never painted over it. */

@media (min-width: 60rem) {
  /* Fixed four columns rather than auto-fill: with the lead taking a 2x2 block
     the remaining four tiles then fill the other two columns exactly, instead
     of leaving one stranded on a row of its own. */
  .icrt-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .icrt-card--lead { grid-column: span 2; grid-row: span 2; }

  /* The photograph takes whatever height the two rows beside it leave. */
  .icrt-card--lead .icrt-card__media {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 18rem;
    border-radius: 16px;
  }

  .icrt-card--lead .icrt-card__title {
    font-size: 1.55rem;
    letter-spacing: -0.018em;
    line-height: 1.2;
  }

  .icrt-card--lead .icrt-card__meta { font-size: .875rem; }
}

/* --- one card anatomy ------------------------------------------------------
   Photograph, headline, one quiet line of details. The whitespace does the
   framing: no border, no panel, no shadow, no label in capitals. */

.icrt-card { display: flex; flex-direction: column; min-width: 0; }

.icrt-card__media {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: .8rem;
  aspect-ratio: 3 / 2;
}

.icrt-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .25s ease;
}

.icrt-card:hover .icrt-card__media img { filter: brightness(.93); }

.icrt-card__title {
  margin: 0 0 .3rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.icrt-card__title a { text-decoration: none; color: var(--icrt-ink); }
.icrt-card:hover .icrt-card__title a { color: var(--icrt-ink); }

.icrt-card__meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: .7rem;
  row-gap: .1rem;
  margin: 0;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--icrt-muted);
}

.icrt-card__cat { color: var(--icrt-ink-soft); font-weight: 500; text-decoration: none; }
.icrt-card__cat:hover { color: var(--icrt-accent); }
.icrt-card__date { color: var(--icrt-muted); }

@media (prefers-reduced-motion: reduce) {
  .icrt-card__media img { transition: none; }
}

.icrt-empty { color: var(--icrt-muted); }

/* --- aside --------------------------------------------------------------- */

.icrt-front__aside { display: flex; flex-direction: column; gap: var(--icrt-gap); min-width: 0; }

.icrt-panel {
  border: 1px solid var(--icrt-line);
  border-radius: 6px;
  padding: 1.1rem 1.15rem;
  background: var(--icrt-paper);
}

.icrt-panel p { font-size: .87rem; line-height: 1.55; color: #4a5058; margin: 0 0 .9rem; }
.icrt-panel--join { background: var(--icrt-mist); }

/* The Facebook plugin brings its own chrome; let it sit flush inside. */
.icrt-panel--flush { padding-bottom: .4rem; overflow: hidden; }

.icrt-today { list-style: none; margin: 0 0 .9rem; padding: 0; }

.icrt-today__row {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: .6rem;
  align-items: baseline;
  padding: .42rem 0;
  border-bottom: 1px solid #f1f2f5;
  font-size: .86rem;
}

.icrt-today__row:last-child { border-bottom: 0; }
.icrt-today__time { color: var(--icrt-muted); font-variant-numeric: tabular-nums; }
.icrt-today__title { text-decoration: none; color: var(--icrt-ink); }
.icrt-today__title:hover { color: var(--icrt-accent); }
.icrt-today__row.is-now .icrt-today__title { font-weight: 700; color: var(--icrt-accent); }
.icrt-today__row.is-now .icrt-today__time { color: var(--icrt-accent); }

.icrt-panel__more { font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--icrt-accent); }

.icrt-button {
  display: inline-block;
  padding: .55rem 1.05rem;
  border-radius: 4px;
  background: var(--icrt-accent);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
}

.icrt-button:hover { background: var(--icrt-accent-dark); color: #fff; }

.icrt-button--ghost { background: transparent; color: var(--icrt-ink); border: 1px solid var(--icrt-line); }
.icrt-button--ghost:hover { background: var(--icrt-ink); color: #fff; }

/* --- studio band --------------------------------------------------------- */

.icrt-studio {
  background: linear-gradient(140deg, #0e1522 0%, #0a0d13 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.25rem) 1.25rem;
  margin-top: var(--icrt-gap);
}

.icrt-studio__inner {
  max-width: var(--icrt-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.icrt-studio__eyebrow {
  margin: 0 0 .4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #9146ff;
}

.icrt-studio__title { margin: 0 0 .6rem; font-size: 1.7rem; line-height: 1.12; color: #fff; }
.icrt-studio__body { margin: 0 0 1.1rem; font-size: .9rem; line-height: 1.6; color: #aeb6c2; }
.icrt-studio__player { min-width: 0; }
.icrt-studio__player iframe { border-radius: 8px; }

/* The fixed player bar must never cover the end of the page. */
body { padding-bottom: 62px; }

@media (max-width: 1080px) {
  .icrt-shortcuts__inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .icrt-hero__inner,
  .icrt-studio__inner,
  .icrt-front__grid { grid-template-columns: minmax(0, 1fr); }
}

/* --- card media placeholder ---------------------------------------------
   A card with no photograph still needs to hold its place in the grid, or the
   whole row goes ragged. A labelled tile reads as "photo pending"; an empty
   box reads as a broken image. */

.icrt-card__media {
  position: relative;
  background: linear-gradient(135deg, var(--icrt-ink) 0%, #101f38 55%, #16305c 100%);
}

/* A story with no photograph still has to look like a designed cover rather
   than a hole — but it must not restate the category, which the card body
   already prints directly underneath. So the tile is purely graphic: a raked
   texture over the section's gradient, with a ghosted dial mark. */
.icrt-card__media.is-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, .16) 0 1.5rem, transparent 1.6rem),
    radial-gradient(circle at 78% 22%, transparent 2.4rem, rgba(255, 255, 255, .10) 2.45rem 2.55rem, transparent 2.6rem),
    radial-gradient(circle at 78% 22%, transparent 3.6rem, rgba(255, 255, 255, .07) 3.65rem 3.75rem, transparent 3.8rem),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 10px);
}

.icrt-card__media.is-placeholder::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--icrt-accent);
}

/* --- full-width pages -----------------------------------------------------
   SmartMag lays content out as .col-8 beside a .col-4 sidebar. The weekly
   schedule needs the whole width, and with short content the sidebar otherwise
   runs far past it and leaves a large empty band. */

.icrt-wide .main-sidebar { display: none; }

.icrt-wide .main-content {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}

/* --- WooCommerce placeholder ----------------------------------------------
   WooCommerce's default "no image" graphic is a grey picture-frame icon, which
   reads as a broken image on a product listing.

   Done in CSS rather than PHP on purpose: WooCommerce stores its placeholder as
   an ATTACHMENT, so woocommerce_placeholder_img_src is never consulted, and
   SmartMag ships its own WooCommerce template overrides that bypass
   woocommerce_placeholder_img too. `content` replacement on the img is the one
   approach that wins regardless of which code path rendered it.

   The accent bar is the site blue, not the red from the logo. The logo keeps
   its own colours; borrowing red for unrelated furniture put a red underline
   under every product tile, which is the one thing the blue retone removed. */

img.woocommerce-placeholder {
  content: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3ClinearGradient id='p' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2314161a'/%3E%3Cstop offset='.55' stop-color='%23101f38'/%3E%3Cstop offset='1' stop-color='%2316305c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='600' height='600' fill='url(%23p)'/%3E%3Crect y='576' width='600' height='24' fill='%231160d4'/%3E%3Ctext x='300' y='312' fill='rgba(255,255,255,.85)' font-family='Helvetica,Arial,sans-serif' font-size='34' font-weight='700' letter-spacing='8' text-anchor='middle'%3EICRT%3C/text%3E%3C/svg%3E");
  object-fit: cover;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

/* --- Masthead wordmark ----------------------------------------------------
   With DigiTech's logo removed, SmartMag falls back to the site title in the
   theme's default heading style, which reads as an unstyled placeholder rather
   than a station identity.

   This is an original wordmark lockup — tight tracking, a red full stop as the
   only ornament, and the dial position set beneath it. It is intentionally a
   TYPOGRAPHIC treatment, not a reproduction of ICRT's own mark: their logo is
   their trademark and belongs in an uploaded file, which will simply replace
   this when supplied. */

.ts-logo.text-logo {
  display: inline-block;
  text-decoration: none;
  line-height: 1;
}

.ts-logo.text-logo .logo-text,
.ts-logo.text-logo {
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--icrt-ink);
}

/* Dial position, set as a strapline beneath the wordmark. */
.ts-logo.text-logo::before {
  content: "FM 100.7 · TAIWAN";
  display: block;
  margin-bottom: .28em;
  font-size: .3em;
  font-weight: 600;
  letter-spacing: .34em;
  color: #8b919b;
  white-space: nowrap;
}

/* On dark header rows the wordmark inverts with the theme. */
.s-dark .ts-logo.text-logo,
.s-dark .ts-logo.text-logo .logo-text { color: #fff; }
.s-dark .ts-logo.text-logo::before { color: rgba(255, 255, 255, .55); }

@media (max-width: 600px) {
  .ts-logo.text-logo::before { letter-spacing: .22em; }
}

/* --- Listen options -------------------------------------------------------
   Three routes to the same audio. Listeners genuinely split across them: the
   browser player, Twitch for studio video, TuneIn for cars and speakers. */

.icrt-front .cw-listen { margin: 2.25rem 0 0; }

.cw-listen__title {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--icrt-accent);
}

.cw-listen__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: .8rem;
}

.cw-listen__option {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .85rem 1rem;
  border: 1px solid var(--icrt-line);
  border-radius: 5px;
  text-decoration: none;
  background: var(--icrt-paper);
  transition: border-color .15s ease, transform .15s ease;
}

.cw-listen__option:hover {
  border-color: var(--icrt-accent);
  transform: translateY(-1px);
}

.cw-listen__label { font-weight: 700; font-size: .92rem; color: var(--icrt-ink); }
.cw-listen__note { font-size: .76rem; color: var(--icrt-muted); }

.cw-listen__option--live { border-left: 3px solid var(--icrt-accent); }
.cw-listen__option--twitch { border-left: 3px solid #9146ff; }
.cw-listen__option--tunein { border-left: 3px solid #1c203c; }

/* --- Embeds --------------------------------------------------------------- */

.icrt-panel--wide { margin-top: 2.25rem; }

.cw-twitch iframe,
.cw-fb iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 4px;
}

.cw-twitch__fallback { margin: .5rem 0 0; font-size: .78rem; }
.cw-twitch__fallback a { color: var(--icrt-accent); text-decoration: none; }

/* Facebook's plugin renders at a fixed width; keep it from overflowing. */
.cw-fb { max-width: 100%; overflow: hidden; }

/* --- Embed fallback -------------------------------------------------------
   Twitch and Facebook both refuse to serve their embeds to a non-public host.
   Rather than leave an empty box that reads as a bug, say what is happening and
   give the working link. */

.cw-embed-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding: 1.1rem 1.2rem;
  border: 1px dashed var(--icrt-line);
  border-radius: 5px;
  background: var(--icrt-mist);
}

.cw-embed-note__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--icrt-accent);
}

.cw-embed-note__body { margin: 0; font-size: .82rem; line-height: 1.55; color: var(--icrt-muted); }

.cw-embed-note__link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--icrt-accent);
  text-decoration: none;
}

.cw-embed-note__link:hover { text-decoration: underline; }

/* --- Countdowns ----------------------------------------------------------- */

.icrt-section-title--spaced { margin-top: 2.25rem; }

.icrt-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 1.25rem;
}

.cw-chart {
  border: 1px solid var(--icrt-line);
  border-radius: 6px;
  padding: 1rem 1.1rem 1.15rem;
  background: var(--icrt-paper);
}

.cw-chart__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .6rem;
}

.cw-chart__title { margin: 0; font-size: .95rem; letter-spacing: -.01em; }
.cw-chart__updated { margin: 0; font-size: .68rem; color: #8b919b; white-space: nowrap; }

.cw-chart__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }

.cw-chart__row {
  display: grid;
  grid-template-columns: 1.6rem 2.25rem minmax(0, 1fr) 1.5rem;
  gap: .65rem;
  align-items: center;
  padding: .45rem 0;
  border-bottom: 1px solid var(--icrt-line);
}

.cw-chart__row:last-child { border-bottom: 0; }

.cw-chart__pos {
  font-size: .95rem;
  font-weight: 800;
  color: var(--icrt-accent);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cw-chart__meta { display: flex; flex-direction: column; min-width: 0; }

.cw-chart__track {
  font-size: .86rem;
  font-weight: 600;
  color: var(--icrt-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-chart__artist { font-size: .74rem; color: var(--icrt-muted); }

.cw-chart__move { font-size: .74rem; text-align: center; }
.cw-chart__move--up   { color: #1a8f4c; }
.cw-chart__move--down { color: #c0392b; }
.cw-chart__move--same { color: #b3b8c0; }
.cw-chart__move--new  { color: var(--icrt-accent); }

/* === Page design components ================================================
   Used by the static pages so each one is composed from a shared visual
   language instead of being a wall of headings and paragraphs.
   ========================================================================== */

/* A designed page supplies its own hero, so the theme's page title would be a
   duplicate heading immediately above it. */
.icrt-wide .page-title,
.icrt-wide .main-title,
.icrt-wide .post-title-alt { display: none; }

/* Break the hero out of the theme's content column to sit full-bleed. */
.icrt-phero {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem;
  background:
    radial-gradient(120% 160% at 10% 0%, rgba(17, 96, 212, .45) 0%, transparent 62%),
    linear-gradient(140deg, #0e1522 0%, #0a0d13 100%);
  color: #fff;
}

/* The band is full-bleed, so its contents align to the page measure rather
   than sitting in a 46rem column with dead space on both sides. The lead keeps
   its own reading width below. */
.icrt-phero__inner { max-width: var(--icrt-max); margin: 0 auto; }

/* --- a hero that carries a figure or two ---------------------------------
   A statement alone leaves half a full-bleed band empty on a desktop. Pages
   that have a real number to show put it opposite the statement. */

@media (min-width: 62rem) {
  .icrt-phero--split .icrt-phero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
    align-items: center;
  }
}

.icrt-phero__figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 62rem) {
  .icrt-phero__figures { margin-top: 0; }
}

.icrt-figure {
  padding: 1rem 1.1rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.icrt-figure__n {
  display: block;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.icrt-figure__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #9dc2f5;
}

/* A figure that carries a name rather than a number. */
.icrt-figure--wide { grid-column: span 2; }

.icrt-figure--wide .icrt-figure__label { margin: 0 0 0.4rem; }

.icrt-figure__next {
  display: block;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.icrt-figure__next:hover { color: #9dc2f5; }

.icrt-figure__when {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #b9c1cc;
  font-variant-numeric: tabular-nums;
}

.icrt-phero__eyebrow {
  margin: 0 0 .5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #9dc2f5;
}

.icrt-phero__title {
  margin: 0 0 .7rem;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  color: #fff;
}

.icrt-phero__lead { margin: 0; font-size: 1.05rem; line-height: 1.6; color: #b9c1cc; max-width: 38rem; }
.icrt-phero__cta { margin-top: 1.35rem; }

/* Designed ARCHIVE templates (the roster, the show index, events, the charts)
   render outside .entry-content, which is where the theme's container lives, so
   without this their rows run edge to edge against the viewport. The hero and
   CTA bands break back out to full width on their own. */
.icrt-page {
  max-width: var(--icrt-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* The theme lays every page out in an 8-of-12 column with a sidebar beside it.
   A designed page has no sidebar, so it takes the whole container — otherwise
   the widened blocks below still stop at about 1170px. */
.icrt-wide .main.ts-contain {
  /* The theme sets an explicit width here, not just a max-width, so raising the
     max alone changed nothing. */
  width: 100%;
  max-width: var(--icrt-max);
}

.icrt-wide .col-8.main-content {
  width: 100%;
  max-width: none;
  flex-basis: 100%;
}

/* --- hero variants for composed pages ------------------------------------
   The shortcode hero leads with a photograph across the measure, or with
   title and lead alone on white. Templates that build their own hero keep the
   dark band. */

.icrt-phero--plain,
.icrt-phero--photo {
  background: var(--icrt-paper);
  color: var(--icrt-ink);
  padding-top: 1.5rem;
  padding-bottom: 0;
}

.icrt-phero--plain .icrt-phero__inner,
.icrt-phero--photo .icrt-phero__inner { max-width: 46rem; margin: 0; padding: 1.6rem 0 1.25rem; }

.icrt-phero--plain .icrt-phero__cta,
.icrt-phero--photo .icrt-phero__cta { margin-top: .75rem; }

@media (min-width: 62rem) {
  .icrt-phero--plain .icrt-phero__inner,
  .icrt-phero--photo .icrt-phero__inner {
    margin-left: calc((100% - var(--icrt-max)) / 2);
  }
}

.icrt-phero--plain .icrt-phero__title,
.icrt-phero--photo .icrt-phero__title { color: var(--icrt-ink); }

.icrt-phero--plain .icrt-phero__lead,
.icrt-phero--photo .icrt-phero__lead { color: var(--icrt-ink-soft); }

.icrt-phero__figure {
  max-width: var(--icrt-max);
  margin: 0 auto;
}

.icrt-phero__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 16px;
}

.icrt-phero__credit {
  margin: .5rem .25rem 0;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--icrt-muted);
  text-align: right;
}

/* --- one reading column ---------------------------------------------------
   A composed page is an article: everything sits in one centred 46rem column
   under a photograph that runs the page measure. Features and steps take two
   columns inside it when there is room. The theme prints the page's featured
   image above the content on its own; the hero already shows it. */
.icrt-wide .post-header .featured { display: none; }

.icrt-wide .entry-content > *:not(.icrt-phero):not(.icrt-cta):not(.icrt-closing):not(.cw-schedule):not(.icrt-sched) {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

.icrt-wide .entry-content > .icrt-phero .icrt-phero__inner { margin-left: auto; margin-right: auto; }
.icrt-wide .entry-content > .icrt-phero--plain:first-child { padding-top: .25rem; }

/* Prose on a composed page. */
.icrt-wide .entry-content > p,
.icrt-wide .entry-content > h2:not(.icrt-section-title),
.icrt-wide .entry-content > h3,
.icrt-wide .entry-content > ul:not([class]),
.icrt-wide .entry-content > ol:not([class]) { max-width: 46rem; }

.icrt-wide .entry-content > p { font-size: 1.05rem; line-height: 1.7; color: var(--icrt-ink-soft); margin: 0 auto 1.1rem; }
.icrt-wide .entry-content > p:first-of-type { color: var(--icrt-ink); font-size: 1.15rem; }

.icrt-wide .entry-content > h2:not(.icrt-section-title) {
  margin: 2.75rem auto .9rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.icrt-wide .entry-content { padding-bottom: 2rem; }

/* A section heading on a composed page: sentence case, no rule beneath. */
.icrt-wide .entry-content > .icrt-section-title {
  margin: 2.75rem auto 1rem;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* --- figures: plain type, hairline above, only for true numbers ----------- */

.icrt-stats {
  list-style: none;
  margin: 2rem auto 2rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--icrt-line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.25rem 2rem;
  text-align: left;
}

.icrt-stat { padding: 0; border-radius: 0; background: none; }

.icrt-stat__figure {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.05;
  color: var(--icrt-ink);
  font-variant-numeric: tabular-nums;
}

.icrt-stat__label { display: block; margin-top: .35rem; font-size: .875rem; line-height: 1.4; color: var(--icrt-muted); }

/* --- features: an editorial list, two columns when there is room --------- */

.icrt-fcards {
  list-style: none;
  margin: 0 auto 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 3rem;
}

@media (min-width: 60rem) {
  .icrt-fcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.icrt-fcard {
  padding: 1.1rem 0 1.2rem;
  border: 0;
  border-top: 1px solid var(--icrt-line);
  border-radius: 0;
  background: none;
}

.icrt-fcard__title { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.icrt-fcard__text { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--icrt-ink-soft); }

/* --- sequence: a large, light numeral; no circles, no boxes --------------- */

.icrt-steps {
  list-style: none;
  margin: 0 auto 1.5rem;
  padding: 0;
  display: grid;
  gap: 0;
}

@media (min-width: 62rem) {
  .icrt-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
}

.icrt-step {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0 1.2rem;
  border: 0;
  border-top: 1px solid var(--icrt-line);
  border-radius: 0;
  background: none;
}

.icrt-step__n {
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--icrt-muted);
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.icrt-step__body { display: flex; flex-direction: column; gap: .25rem; }
.icrt-step__title { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--icrt-ink); }
.icrt-step__text { font-size: .95rem; line-height: 1.6; color: var(--icrt-ink-soft); }

/* --- a history ------------------------------------------------------------ */

.icrt-timeline {
  list-style: none;
  margin: 0 auto 1.5rem;
  padding: 0;
  max-width: 46rem;
}

.icrt-timeline__row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.1rem 0 1.25rem;
  border-top: 1px solid var(--icrt-line);
}

.icrt-timeline__when {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--icrt-ink);
  font-variant-numeric: tabular-nums;
}

.icrt-timeline__title { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.icrt-timeline__body p { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--icrt-ink-soft); }

/* --- questions: one column, hairlines, native details --------------------- */

.icrt-faq { margin: 0 auto 1.5rem; max-width: 46rem; border: 0; border-radius: 0; overflow: visible; }
.icrt-faq__item { border-top: 1px solid var(--icrt-line); }
.icrt-faq__item:last-child { border-bottom: 1px solid var(--icrt-line); }

.icrt-faq__q {
  padding: 1rem 0;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  color: var(--icrt-ink);
}

.icrt-faq__q::-webkit-details-marker { display: none; }

.icrt-faq__q::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--icrt-muted);
  line-height: 1;
}

.icrt-faq__item[open] .icrt-faq__q { background: none; }
.icrt-faq__item[open] .icrt-faq__q::after { content: "\2212"; }
.icrt-faq__a { padding: 0 0 1.1rem; }
.icrt-faq__a p { margin: 0; font-size: .95rem; line-height: 1.65; color: var(--icrt-ink-soft); max-width: 40rem; }

/* --- closing: a light band, a heading, a sentence, one button ------------- */

.icrt-closing,
.icrt-cta {
  position: relative;
  left: 50%; right: 50%;
  width: 100vw;
  margin: 3rem -50vw 0;
  padding: clamp(1.75rem, 4vw, 2.5rem) 1.25rem;
  background: var(--icrt-mist);
  color: var(--icrt-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.icrt-closing__text, .icrt-cta__text { max-width: 34rem; }
.icrt-closing__title, .icrt-cta .icrt-cta__title { margin: 0 0 .3rem; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; color: var(--icrt-ink); }
.icrt-closing__body, .icrt-cta .icrt-cta__body { margin: 0; font-size: .95rem; color: var(--icrt-ink-soft); }
.icrt-closing__button, .icrt-cta__button { flex: 0 0 auto; }

/* Shown to editors only, where a design block rendered nothing. */
.icrt-block-warning {
  margin: 1rem auto;
  padding: .6rem .85rem;
  border-left: 3px solid #d97706;
  background: #fffbeb;
  color: #92400e;
  font-size: .82rem;
}

/* --- design-block overrides ----------------------------------------------
   SmartMag styles h1/h2 with its own colour and weight. Inside the dark
   template hero that renders near-black on near-black, so these need to win
   on specificity rather than hope. */

.icrt-phero .icrt-phero__title,
.icrt-phero .icrt-phero__eyebrow,
.icrt-phero .icrt-phero__lead { color: inherit; }

.icrt-phero:not(.icrt-phero--plain):not(.icrt-phero--photo) .icrt-phero__title { color: #fff; }
.icrt-phero:not(.icrt-phero--plain):not(.icrt-phero--photo) .icrt-phero__eyebrow { color: #9dc2f5; }
.icrt-phero:not(.icrt-phero--plain):not(.icrt-phero--photo) .icrt-phero__lead { color: #b9c1cc; }

/* A designed page supplies its own hero, so the theme's page heading directly
   above it is a duplicate title. */
.icrt-wide .the-page-heading,
.icrt-wide .main-heading.entry-title,
.icrt-wide .page-breadcrumbs + .main-heading { display: none; }

/* Pull the hero flush to the top of the content area now the heading is gone. */
.icrt-wide .entry-content > .icrt-phero:first-child { margin-top: 0; }

/* === Charts page ===========================================================
   The countdown itself, not a list of posts about it.
   ========================================================================== */

.icrt-chartpage .icrt-charttabs,
.icrt-chartpage .icrt-chartnews {
  max-width: min(1400px, 94vw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.icrt-chartpage .icrt-charttabs { padding-top: 2rem; }
.icrt-chartpage .icrt-chartnews { padding-top: 2.5rem; padding-bottom: 1rem; }

/* --- CSS-only tabs -------------------------------------------------------- */

.icrt-charttabs__radio { position: absolute; opacity: 0; pointer-events: none; }

.icrt-charttabs__bar {
  display: inline-flex;
  gap: .25rem;
  padding: .25rem;
  border-radius: 999px;
  background: var(--icrt-mist);
  margin-bottom: 1.5rem;
}

.icrt-charttabs__tab {
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--icrt-muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.icrt-charttabs__tab:hover { color: var(--icrt-ink); }

/* Hidden by default; the template emits an id-paired rule per chart to reveal
   the checked one. Positional selectors were tried and silently failed — see
   the note in category-top-charts.php. */
.icrt-charttabs__panel { display: none; }

/* Keyboard users must still see which tab has focus. */
.icrt-charttabs__radio:focus-visible ~ .icrt-charttabs__bar .icrt-charttabs__tab {
  outline: 2px solid var(--icrt-accent);
  outline-offset: 2px;
}

/* --- chart head ----------------------------------------------------------- */

.cw-full__head { margin-bottom: 1.25rem; }
.cw-full__title { margin: 0 0 .3rem; font-size: 1.5rem; letter-spacing: -.02em; }
.cw-full__blurb { margin: 0 0 .25rem; font-size: .92rem; color: var(--icrt-muted); max-width: 40rem; }
.cw-full__updated { margin: 0; font-size: 0.8125rem; letter-spacing: 0; text-transform: none; color: #8b919b; }

/* --- number one ----------------------------------------------------------- */

.cw-full__number-one {
  display: grid;
  grid-template-columns: auto 7rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  background:
    radial-gradient(120% 200% at 0% 0%, rgba(17, 96, 212, .5) 0%, transparent 62%),
    linear-gradient(135deg, #0e1522 0%, #0a0d13 100%);
  color: #fff;
}

.cw-full__no1-badge {
  align-self: start;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--icrt-accent);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.cw-full__no1-art,
.cw-full__art {
  display: block;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a2436 0%, #101a2b 100%);
  border: 1px solid rgba(255, 255, 255, .08);
}

.cw-full__no1-art { width: 7rem; height: 7rem; }
.cw-full__no1-meta { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cw-full__no1-track { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.cw-full__no1-artist { font-size: 1rem; color: #b9c1cc; }
.cw-full__no1-stats { margin-top: .35rem; font-size: .76rem; color: #8b93a1; }

/* --- the rest of the chart ------------------------------------------------ */

.cw-full__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--icrt-line); border-radius: 8px; overflow: hidden; }

.cw-full__row {
  display: grid;
  grid-template-columns: 2.6rem 1.5rem 3rem minmax(0, 1fr) 3rem 3rem;
  gap: .8rem;
  align-items: center;
  padding: .7rem 1rem;
  background: var(--icrt-paper);
}

.cw-full__row + .cw-full__row { border-top: 1px solid #f1f2f5; }
.cw-full__row:hover { background: var(--icrt-mist); }

.cw-full__pos {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--icrt-ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cw-full__move { text-align: center; font-size: .8rem; }
.cw-full__move--up   { color: #1a8f4c; }
.cw-full__move--down { color: #c0392b; }
.cw-full__move--same { color: #b3b8c0; }
.cw-full__move--new  { color: var(--icrt-accent); }

.cw-full__art { width: 3rem; height: 3rem; background: linear-gradient(135deg, #eef1f6 0%, #dfe5ee 100%); border-color: var(--icrt-line); }

.cw-full__meta { display: flex; flex-direction: column; min-width: 0; }
.cw-full__track { font-size: .95rem; font-weight: 600; color: var(--icrt-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-full__artist { font-size: .8rem; color: var(--icrt-muted); }

.cw-full__stat { text-align: center; }
.cw-full__stat-n { display: block; font-size: .95rem; font-weight: 700; color: var(--icrt-ink); font-variant-numeric: tabular-nums; }
.cw-full__stat-l { display: block; font-size: 0.8125rem; letter-spacing: 0; text-transform: none; color: #9aa1ab; }

@media (max-width: 720px) {
  .cw-full__number-one { grid-template-columns: minmax(0, 1fr); }
  .cw-full__no1-art { width: 100%; height: 9rem; }
  .cw-full__row { grid-template-columns: 2.2rem 1.2rem minmax(0, 1fr) 2.5rem; }
  .cw-full__art, .cw-full__stat:last-child { display: none; }
}

/* --- request panel --------------------------------------------------------
   The form sits in the front page sidebar, where it competes with simply not
   bothering — so it asks for two fields and marks the rest optional. */

.icrt-panel--request .icrt-panel__lead {
  margin: 0 0 .9rem;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--icrt-ink-soft);
}

/* === News sections ==========================================================
   Shared by every category that has not earned its own template, so these live
   in the design system rather than a per-slug stylesheet.
   ========================================================================== */

.icrt-newsec__head {
  margin: 0 0 1.1rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding: 0;
  border: 0;
}

.icrt-newsec__rest { margin: 2.5rem 0; }

.icrt-newsec__none {
  margin: 2.5rem 0;
  padding: 1.4rem 1.2rem;
  background: var(--icrt-mist);
  border-radius: .8rem;
  color: var(--icrt-ink-soft);
}

/* --- the lead ------------------------------------------------------------
   One story carries the section. Giving every headline equal weight is the
   one judgement a newsroom should never hand to a template. */

.icrt-lead {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin: 2.5rem 0 0;
  align-items: center;
}

@media (min-width: 60rem) {
  .icrt-lead { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}

.icrt-lead__art {
  display: block;
  /* An explicit height, not aspect-ratio plus max-height. The intent is the
     same — at the lead column's full width a 16:9 band ran to about 500px tall
     beside a two-line headline, putting the story's own text in a corner of
     empty space — but capping the height of a ratio box shrinks its WIDTH to
     match, so the art stopped filling its column and left a gap before the
     headline. That was invisible while this was an empty gradient. */
  width: 100%;
  height: clamp(12rem, 22vw, 20rem);
  overflow: hidden;
  border-radius: .9rem;
  background:
    radial-gradient(circle at 78% 26%, rgba(255, 255, 255, .15) 0 3rem, transparent 3.1rem),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 12px),
    linear-gradient(140deg, var(--cw-show-deep, #0b2f6b) 0%, var(--cw-show, #1160d4) 100%);
}

.icrt-lead__kind {
  margin: 0 0 .5rem;
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--icrt-muted);
}

.icrt-lead__title { margin: 0; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.02em; }
.icrt-lead__title a { color: var(--icrt-ink); text-decoration: none; }
.icrt-lead__title a:hover { color: var(--icrt-accent); }

.icrt-lead__standfirst {
  margin: .85rem 0 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--icrt-ink-soft);
  max-width: 36rem;
}

.icrt-lead__date { margin: .8rem 0 0; font-size: .82rem; color: var(--icrt-muted); }

/* --- the rest ------------------------------------------------------------- */

.icrt-nslist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

/* The same anatomy as the Latest cards on the front page: photograph,
   headline, one quiet line of details. */
.icrt-nsitem a { display: block; text-decoration: none; color: var(--icrt-ink); }

.icrt-nsitem__art {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  margin-bottom: .8rem;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 11px),
    linear-gradient(140deg, var(--cw-show-deep, #0b2f6b) 0%, var(--cw-show, #1160d4) 100%);
}

.icrt-nsitem__img { transition: filter .25s ease; }
.icrt-nsitem a:hover .icrt-nsitem__img { filter: brightness(.93); }

.icrt-nsitem__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-bottom: .3rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  color: var(--icrt-ink);
}

.icrt-nsitem__meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: .7rem;
  row-gap: .1rem;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--icrt-muted);
}

.icrt-nsitem__cat { color: var(--icrt-ink-soft); font-weight: 500; }
.icrt-nsitem__date { color: var(--icrt-muted); }

@media (prefers-reduced-motion: reduce) {
  .icrt-nsitem__img { transition: none; }
}

/* === Contact Form 7 =========================================================
   The plugin ships no styling of its own, so a form landed on the page as bare
   browser defaults — hairline inputs and a small grey SUBMIT. This is global
   rather than per-page: wherever a form is dropped in, it should look like the
   rest of the site.
   ========================================================================== */

.wpcf7 p { margin: 0 0 1.1rem; }

.wpcf7 label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; }

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  box-sizing: border-box;
  padding: .7rem .85rem;
  border: 1px solid var(--icrt-line);
  border-radius: .5rem;
  background: var(--icrt-bg);
  color: var(--icrt-ink);
  font: inherit;
  font-size: .95rem;
  line-height: 1.5;
}

.wpcf7 textarea { min-height: 9rem; resize: vertical; }

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: 2px solid var(--icrt-accent);
  outline-offset: 1px;
  border-color: transparent;
}

/* SmartMag styles bare buttons aggressively, so this is element-qualified and
   resets rather than nudges. */
.wpcf7 input[type="submit"] {
  display: inline-block;
  width: auto;
  padding: .75rem 1.6rem;
  border: 0;
  border-radius: .5rem;
  background: var(--icrt-accent);
  color: #fff;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.wpcf7 input[type="submit"]:hover { filter: brightness(1.08); }

.wpcf7-not-valid-tip { color: #b91c1c; font-size: .82rem; margin-top: .3rem; }

.wpcf7 .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: .8rem 1rem;
  border-radius: .5rem;
  border: 1px solid var(--icrt-line);
  font-size: .9rem;
}

/* === Art tiles, with a real image ===========================================
   ShowArt::tile() prefers a genuine featured image and falls back to the
   gradient. These rules are global because the tile is a shared component —
   presenter cards, the show index and the schedule all render one — even
   though its sizing is still set per page.
   ========================================================================== */

.cw-art--photo { overflow: hidden; padding: 0; background: var(--icrt-mist); }

.cw-art__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* === Track covers ===========================================================
   TrackArt::tile() renders either a real sleeve or a monogram, so both branches
   need the same box: a chart that changes row height depending on whether a
   cover resolved looks broken.
   ========================================================================== */

.cw-cover {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .4rem;
  background: var(--icrt-mist);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.cw-cover__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cw-cover--sm  { width: 2.25rem; height: 2.25rem; font-size: .65rem; border-radius: .35rem; }
.cw-cover--row { width: 3rem; height: 3rem; }
.cw-cover--no1 { width: clamp(5.5rem, 12vw, 8rem); height: clamp(5.5rem, 12vw, 8rem); border-radius: .6rem; font-size: 1.4rem; }

.icrt-justplayed__img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* The player's sleeve. `hidden` needs the explicit override: any rule that sets
   display beats the attribute, and this component toggles with it. */
.cw-player__img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.cw-player__art [hidden] { display: none !important; }

/* A news card's art slot: the image fills it, and the gradient the CSS
   variables paint stays visible for a story that has none. */
.icrt-nsitem__img,
.icrt-lead__img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Song links retain the title typography in every chart and playlist. */
a.cw-song-link { color: inherit; font: inherit; }
a.cw-song-link:hover { color: var(--icrt-accent); text-decoration: underline; text-underline-offset: .15em; }
a.cw-song-link:focus-visible { outline: 2px solid var(--icrt-accent); outline-offset: 3px; }
