/*
Theme Name: ct-theme
Author: CT das radio
Description: CT das radio — an editorial block theme for campus radio.
Version: 0.2.0
Requires at least: 7.1
Text Domain: ct-theme
*/

:root {
  --radio-blue: #00b1d2;
  --radio-ink: #24343a;
  --radio-paper: #f5f3ed;
  --radio-white: #fffdf9;
  --radio-footer: var(--radio-white);
  --radio-rule: #b9dde1;
  --radio-rule-accent-size: calc(100% / 6);
  --radio-muted: #566368;
  --radio-line: #d0d9d7;
  --radio-link: #006c80;
  --radio-border: #24343a;
  --radio-heading-font: "Eurostile", Arial, sans-serif;
  --radio-copy-font: Arial, sans-serif;
  --radio-control-font: var(--radio-heading-font);
  --radio-control-radius: 0;
  --radio-card-radius: 10px;
  --radio-focus: var(--radio-link);
  --radio-player-font-family: var(--radio-copy-font);
  --radio-player-control-font-family: var(--radio-control-font);
  --radio-player-control-radius: var(--radio-control-radius);
  --radio-gutter: clamp(1.25rem, 4vw, 4rem);
  --radio-player-bg: var(--radio-white);
  --radio-player-fg: #24343a;
  --radio-player-border: #d0d9d7;
  --radio-player-muted: #566368;
  --radio-player-accent: #00b1d2;
  --radio-player-focus: var(--radio-focus);
  --radio-player-button-bg: #00b1d2;
  --radio-player-button-bg-hover: #24343a;
  --radio-player-button-fg-hover: #fffdf9;
  --radio-player-neutral-bg-hover: var(--radio-paper);
  --radio-player-button-fg: #24343a;
  --radio-player-track: #d0d9d7;
  --radio-player-clearance: 8rem;
  --radio-player-inset: 1rem;
  --radio-player-width: 40rem;
  --ct-ui-control-size: 2.875rem;
}

html {
  scroll-behavior: smooth;
  scroll-padding-block: 1.5rem;
}
body {
  background: var(--radio-paper);
  color: var(--radio-ink);
  font-family: var(--radio-copy-font);
  line-height: 1.6;
  margin: 0;
  padding-block-end: var(--radio-player-clearance);
}
*, *::before, *::after {
  box-sizing: border-box;
}
.wp-site-blocks {
  min-block-size: calc(100vh - var(--radio-player-clearance));
  padding: 0;
}
.radio-site-shell {
  display: flex;
  flex-direction: column;
  min-block-size: calc(100vh - var(--radio-player-clearance));
}
.radio-site-shell > * {
  margin-block-start: 0;
}
a {
  color: var(--radio-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:where(a, button, input, summary, select, textarea):focus-visible {
  outline: 3px solid var(--radio-focus);
  outline-offset: 3px;
}
/* Low-specificity defaults cover plain HTML form buttons without overriding
   plugin geometry or explicit editor choices. Native blocks also use theme.json. */
:where(.radio-site-shell button, .radio-site-shell input[type="button"], .radio-site-shell input[type="submit"], .radio-site-shell input[type="reset"]) {
  appearance: none;
  background: var(--radio-blue);
  border: 1px solid var(--radio-blue);
  border-radius: var(--radio-control-radius);
  box-shadow: none;
  color: var(--radio-ink);
  cursor: pointer;
  font-family: var(--radio-control-font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  min-block-size: var(--ct-ui-control-size);
  padding: 0.75rem 1rem;
}
:where(.radio-site-shell :is(button, input[type="button"], input[type="submit"], input[type="reset"]):hover:not(:disabled):not([aria-disabled="true"])) {
  background: var(--radio-ink);
  border-color: var(--radio-ink);
  color: var(--radio-white);
}
:is(.ct-header-cta, .ct-feed-next, .radio-playlist__days a, .radio-playlist__filters button, .wp-element-button, .wp-block-button__link) {
  border-radius: var(--radio-control-radius);
  font-family: var(--radio-control-font);
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.4;
}
:is(.ct-header-cta, .ct-feed-next, .radio-playlist__days a, .radio-playlist__filters button, .wp-element-button, .wp-block-button__link):focus-visible {
  outline: 3px solid var(--radio-focus);
  outline-offset: 3px;
}
:where(h1, h2, h3, h4) {
  color: var(--radio-ink);
  font-family: var(--radio-heading-font);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}
:where(h1) {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}
:where(h2) {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}
img {
  max-inline-size: 100%;
}
/* One frame anchors the masthead, feed, content pages, articles, and footer. */
.ct-layout-container {
  inline-size: calc(100% - 2 * var(--radio-gutter));
  max-inline-size: var(--wp--style--global--wide-size);
  margin-inline: auto;
}
.ct-visually-hidden {
  block-size: 1px;
  clip-path: inset(50%);
  inline-size: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}
.skip-link {
  background: var(--radio-ink);
  color: #fff;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  padding: 0.7rem 1rem;
  position: absolute;
  transform: translateY(-200%);
  z-index: 200;
}
.skip-link:focus {
  transform: translateY(0);
}

/* A quiet white masthead gives the original blue logo its own clear surface. */
.ct-site-header {
  background: var(--radio-white);
  border-block-start: 5px solid var(--radio-blue);
  border-block-end: 1px solid var(--radio-line);
}
.ct-header-inner {
  margin-block-start: 0;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
}
.ct-logo {
  flex: 0 0 auto;
  margin: 0;
}
.ct-logo img {
  display: block;
  block-size: auto;
  inline-size: 11.5rem;
  max-inline-size: 11.5rem;
}
.ct-header-actions {
  align-items: center;
  display: flex;
  margin-inline-start: auto;
}
.ct-header-actions > *, .ct-header-utility-buttons > * {
  margin-block: 0;
}
.ct-header-utility-buttons {
  align-items: center;
  display: flex;
  gap: 0.625rem;
}
.ct-site-nav {
  position: relative;
}
.ct-site-nav__drawer, .ct-site-nav__toggle {
  display: none;
}
.ct-site-nav__list, .ct-footer-nav__list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ct-site-nav__list a {
  align-items: center;
  color: var(--radio-ink);
  display: inline-flex;
  font-family: var(--radio-heading-font);
  font-size: 0.875rem;
  font-weight: 700;
  min-block-size: 2.875rem;
  text-decoration: none;
}
.ct-site-nav__list a:hover, .ct-site-nav .current-menu-item > a, .ct-site-nav .current_page_item > a {
  text-decoration: underline;
  text-decoration-color: var(--radio-blue);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.5rem;
}
.ct-header-cta {
  align-items: center;
  block-size: var(--ct-ui-control-size);
  display: inline-flex;
  font-family: var(--radio-heading-font);
  font-size: 0.875rem;
  font-weight: 700;
  gap: 0.65rem;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0 1.1rem;
  text-decoration: none;
  white-space: nowrap;
}
.ct-header-cta {
  background: var(--radio-white);
  border: 1px solid var(--radio-line);
  color: var(--radio-ink);
}
.ct-header-cta:hover {
  background: var(--radio-paper);
  border-color: var(--radio-ink);
}

/* Returning visitors reach the editorial feed immediately below the masthead. */
.site-main {
  flex: 1 0 auto;
  padding-block: clamp(2rem, 5vw, 4rem);
}
.site-main.ct-front-page {
  padding: 0;
}
.ct-text-link {
  align-items: baseline;
  color: var(--radio-ink);
  display: inline-flex;
  font-family: var(--radio-heading-font);
  font-size: 0.8125rem;
  font-weight: 700;
  gap: 0.7rem;
  text-decoration: none;
}
.ct-text-link:hover {
  text-decoration: underline;
}
.ct-text-link span {
  font-family: Arial, sans-serif;
  font-size: 1.25em;
}
.ct-home-feed {
  scroll-margin-block-start: 2rem;
}
/* A fine rule and one grid fraction of stronger blue form the shared signature. */
.ct-section-heading {
  align-items: baseline;
  border-block-start: 1px solid var(--radio-rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  margin-block-end: 1.75rem;
}
.ct-section-heading::before {
  background: var(--radio-blue);
  block-size: 3px;
  content: "";
  grid-column: 1 / -1;
  inline-size: var(--radio-rule-accent-size);
}
.ct-section-heading :is(h1, h2) {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: -0.025em;
  margin: 0;
}
.ct-story-leads {
  align-items: stretch;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
}
.ct-story {
  display: flex;
  min-inline-size: 0;
  perspective: 1100px;
  position: relative;
}
.ct-story__surface,
.wp-block-group.is-style-ct-card,
.editor-styles-wrapper .wp-block-group.is-style-ct-card-animated,
.ct-card__surface {
  background: var(--radio-white);
  border: 1px solid #e4e5df;
  border-radius: var(--radio-card-radius);
  box-shadow: 0 6px 18px rgb(36 52 58 / 0.05);
  min-inline-size: 0;
  overflow: hidden;
}
.ct-story__surface {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.wp-block-group.is-style-ct-card-animated:has(> .ct-card__surface) {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-inline-size: 0;
  position: relative;
  perspective: 1100px;
}
.ct-card__surface {
  flex: 1;
  inline-size: 100%;
  box-sizing: border-box;
}
/* Native Group style: the optional first image and padded text Group form a card.
   Core's Grid owns tracks and reflow; this style only owns the card surface. */
.wp-block-group.is-style-ct-card,
.editor-styles-wrapper .wp-block-group.is-style-ct-card-animated,
.ct-card__surface {
  padding: var(--wp--preset--spacing--small);
  overflow-wrap: anywhere;
}
:is(.wp-block-group.is-style-ct-card, .editor-styles-wrapper .is-style-ct-card-animated, .ct-card__surface):has(> .wp-block-image) {
  padding: 0;
}
:is(.is-style-ct-card, .editor-styles-wrapper .is-style-ct-card-animated, .ct-card__surface) > .wp-block-image {
  margin: 0;
}
:is(.is-style-ct-card, .editor-styles-wrapper .is-style-ct-card-animated, .ct-card__surface) > .wp-block-image img {
  display: block;
  inline-size: 100%;
}
:is(.is-style-ct-card, .editor-styles-wrapper .is-style-ct-card-animated, .ct-card__surface) > .wp-block-image + .wp-block-group {
  border-block-start: 5px solid var(--radio-blue);
  margin-block-start: 0;
}
.ct-story:is(:hover, :focus-within) > .ct-story__surface {
  border-color: #9abcc2;
}
.ct-story__body {
  flex: 1;
  min-inline-size: 0;
  overflow-wrap: anywhere;
  padding: 1.1rem 1.25rem;
}
.ct-story--lead .ct-story__body {
  padding: 1.35rem 1.5rem;
}
.ct-story__image:not([hidden]) + .ct-story__body {
  border-block-start: 5px solid var(--radio-blue);
}
.ct-story__image {
  aspect-ratio: 16 / 9;
  flex: none;
  display: block;
  inline-size: 100%;
  margin: 0;
  overflow: hidden;
}
.ct-story__image img {
  block-size: 100%;
  display: block;
  inline-size: 100%;
  object-fit: cover;
  object-position: center;
}
.ct-story :is(h2, h3) {
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
  text-wrap: pretty;
}
.ct-story :is(h2, h3) a {
  color: var(--radio-ink);
  text-decoration: none;
}
.ct-story :is(h2, h3) a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.ct-story__excerpt {
  color: var(--radio-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.5rem 0 0;
  max-inline-size: 55ch;
}
.ct-content-author {
  color: var(--radio-muted);
  font-family: var(--radio-copy-font);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0.9rem 0 0;
}
.ct-more-stories {
  margin-block-start: 3.5rem;
}

/* Native content and archives use the same clear editorial surfaces. */
.ct-entry {
  inline-size: 100%;
  min-inline-size: 0;
}
.ct-layout-wide > .ct-entry {
  --wp--style--global--content-size: var(--wp--style--global--wide-size);
}
.ct-layout-reading > .ct-entry {
  max-inline-size: var(--wp--style--global--content-size);
  margin-inline: auto;
}
.ct-entry :where(.wp-block-columns, .wp-block-column, .wp-block-group) {
  min-inline-size: 0;
}
.ct-post-card {
  background: transparent;
  padding: 0;
}
.site-main > .wp-block-post-title,
.site-main > .wp-block-query-title,
.ct-entry-content > .wp-block-post-title,
.ct-post-card > h1 {
  max-inline-size: var(--wp--style--global--content-size);
}
.ct-post-card__meta {
  align-items: center;
  color: var(--radio-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  margin-block: 1.5rem;
}
.ct-post-card__meta > *, .ct-post-card__meta .ct-content-author {
  margin: 0;
}
.ct-post-card__image {
  margin-block: 0 1.5rem;
}
.ct-post-card__image img {
  display: block;
  inline-size: 100%;
  object-fit: cover;
}
.ct-entry > .wp-block-post-content {
  display: flow-root;
  overflow-wrap: anywhere;
}
.ct-entry :where(img, video, iframe, embed, object, svg, canvas, table) {
  max-inline-size: 100%;
}
.ct-entry .wp-block-post-content > :where(.alignwide, .alignfull) {
  inline-size: 100%;
  max-inline-size: 100%;
}
.ct-entry :where(pre, .wp-block-table, .wp-block-embed__wrapper) {
  max-inline-size: 100%;
  overflow-x: auto;
}
.ct-layout-reading .ct-entry > .ct-post-card__image--detail,
.ct-layout-wide .ct-entry > .ct-post-card__image--detail {
  margin-block-start: 2rem;
}
.ct-section {
  border-block-start: 1px solid var(--radio-line);
  padding-block: 2rem;
}
table {
  background: var(--radio-white);
  border: 1px solid var(--radio-line);
  border-collapse: collapse;
  font-size: 0.9375rem;
  inline-size: 100%;
}
caption {
  color: var(--radio-muted);
  font-size: 0.8125rem;
  margin-block-end: 1rem;
  text-align: start;
}
th, td, .wp-block-table :is(th, td) {
  border: 1px solid var(--radio-line);
  border-block-end: 1px solid var(--radio-line);
  padding: 1rem;
  text-align: start;
}
th {
  background: var(--radio-paper);
  font-weight: 700;
}
thead, .wp-block-table thead {
  border-block-end: 1px solid var(--radio-line);
}
thead th, .wp-block-table thead th {
  background: var(--radio-blue);
  color: var(--radio-ink);
  font-family: var(--radio-control-font);
}
.radio-playlist__days a, .radio-playlist__filters button, .wp-block-button__link {
  align-items: center;
  border: 1px solid var(--radio-line);
  box-shadow: none;
  color: var(--radio-ink);
  display: inline-flex;
  font-size: 1rem;
  min-block-size: var(--ct-ui-control-size);
  padding: 0.75rem 1rem;
}
.radio-playlist__days a, .radio-playlist__filters button {
  background: var(--radio-white);
}
.wp-block-button__link {
  background: var(--radio-blue);
  border-color: var(--radio-blue);
}
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--radio-line);
  color: var(--radio-ink);
}
.radio-playlist__days a:hover, .radio-playlist__filters button:hover:not(:disabled), .wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: var(--radio-paper);
  border-color: var(--radio-ink);
  color: var(--radio-ink);
}
.wp-block-button__link:hover, .ct-feed-next:hover:not([aria-disabled="true"]) {
  background: var(--radio-ink);
  border-color: var(--radio-ink);
  color: var(--radio-white);
}
.radio-playlist__filters input {
  background: var(--radio-white);
  border: 1px solid var(--radio-line);
  border-radius: var(--radio-control-radius);
  font: 1rem / 1.4 var(--radio-copy-font);
}
:where(.radio-site-shell button:disabled, .radio-site-shell input:disabled) {
  background: var(--radio-paper);
  border-color: var(--radio-line);
  color: var(--radio-muted);
  cursor: default;
}

.radio-playlist__empty, .radio-playlist--unavailable {
  background: var(--radio-white);
  border: 1px solid var(--radio-line);
  box-shadow: none;
}

/* The footer continues underneath the space claimed by a revealed player. */
.site-footer {
  --ct-footer-player-space: var(--radio-player-clearance);
  background: var(--radio-footer);
  color: var(--radio-ink);
  margin-block-start: clamp(3rem, 7vw, 6rem);
  padding-block: 1.25rem;
  position: relative;
}
.site-footer::after {
  background: var(--radio-footer);
  block-size: var(--ct-footer-player-space);
  content: "";
  inset-block-start: 100%;
  inset-inline: 0;
  position: absolute;
}
.site-footer .ct-footer-inner {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.ct-footer-home {
  font-family: var(--radio-heading-font);
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.ct-footer-home a {
  color: var(--radio-ink);
  text-decoration: none;
}
.ct-footer-nav__list {
  gap: 1.25rem;
}
.ct-footer-nav__list a {
  color: var(--radio-ink);
  font-size: 0.75rem;
  text-decoration: none;
}
.ct-footer-nav__list a:hover, .ct-footer-home a:hover {
  text-decoration: underline;
}

/* One compact dock; the plugin owns responsive geometry and media controls. */
.ct-player-default-source {
  display: none;
}
.editor-styles-wrapper .ct-player-default-source {
  display: block;
}

@media (max-width: 1120px) {
  .ct-site-nav__list {
    gap: 1rem;
  }
  .ct-logo img {
    inline-size: 9rem;
  }
  .ct-header-cta {
    padding-inline: 0.8rem;
  }
}

@media (max-width: 820px) {
  .ct-entry {
    --wp--style--global--content-size: var(--wp--style--global--wide-size);
  }
  /* Follow the theme's phone layout while retaining the editor's stacking opt-out. */
  .ct-entry .wp-block-columns:not(.is-not-stacked-on-mobile) {
    flex-wrap: wrap !important;
  }
  .ct-entry .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100% !important;
  }
  .site-footer .ct-footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .ct-site-header .ct-header-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "logo participate menu";
  }
  .ct-logo {
    grid-area: logo;
    min-inline-size: 0;
  }
  .ct-site-header .ct-header-actions {
    display: contents;
  }
  .ct-logo img {
    inline-size: 100%;
    max-inline-size: min(100%, 9rem);
  }
  .ct-site-nav {
    grid-area: menu;
  }
  .ct-site-header .ct-header-utility-buttons {
    grid-area: participate;
    display: flex;
  }
  .ct-site-nav__drawer {
    display: block;
  }
  .ct-site-nav__toggle {
    align-items: center;
    background: var(--radio-white);
    block-size: 2.875rem;
    border: 1px solid var(--radio-line);
    cursor: pointer;
    display: inline-flex;
    inline-size: 2.875rem;
    justify-content: center;
    list-style: none;
  }
  .ct-site-nav__toggle::-webkit-details-marker {
    display: none;
  }
  .ct-site-nav__toggle-icon, .ct-site-nav__toggle-icon::before, .ct-site-nav__toggle-icon::after {
    background: var(--radio-ink);
    block-size: 2px;
    content: "";
    display: block;
    inline-size: 1.15rem;
    position: relative;
  }
  .ct-site-nav__toggle-icon::before {
    inset-block-start: -0.35rem;
    position: absolute;
  }
  .ct-site-nav__toggle-icon::after {
    inset-block-start: 0.35rem;
    position: absolute;
  }
  .ct-site-nav__drawer[open] .ct-site-nav__toggle {
    background: var(--radio-blue);
    border-color: var(--radio-blue);
  }
  .ct-site-nav__list {
    align-items: stretch;
    background: var(--radio-white);
    border: 1px solid var(--radio-line);
    box-shadow: 0 12px 24px rgb(17 20 22 / 0.08);
    display: none;
    flex-direction: column;
    gap: 0;
    inline-size: min(18rem, calc(100vw - 2 * var(--radio-gutter)));
    inset-block-start: calc(100% + 0.5rem);
    inset-inline-end: 0;
    padding: 0.5rem;
    position: absolute;
    z-index: 80;
  }
  .ct-site-nav__drawer[open] + .ct-site-nav__list {
    display: flex;
  }
  .ct-site-nav__list a {
    padding: 0.75rem;
  }
  .ct-section-heading {
    margin-block-end: 1.25rem;
  }
}

@media (max-width: 480px) {
  .ct-section-heading .ct-text-link {
    font-size: 0.75rem;
  }
  .ct-section-heading :is(h1, h2) {
    font-size: 1.1rem;
  }
  th, td {
    padding: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ct-story__image img, .radio-player {
    transition: none;
  }
  .ct-story:hover .ct-story__image img {
    transform: none;
  }
}

/* One content container controls both grids; shared landscape frames crop photos. */
.ct-home-feed { container-type: inline-size; }
.ct-home-feed [hidden] { display: none !important; }
/* The hero shares the landscape frame, bounded by the viewport on wide screens. */
.ct-home-hero .ct-story__image {
  max-block-size: 30vh;
  max-block-size: 30svh;
}
.ct-article-list { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 2rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.ct-article-list > li { display: flex; min-inline-size: 0; }
.ct-article-list > li > .ct-story { inline-size: 100%; }
.ct-home-feed .ct-story :is(h2, h3) { overflow-wrap: anywhere; text-wrap: pretty; }
.ct-home-feed .ct-story--lead h3 { font-size: clamp(1.65rem, 3.2cqi, 2.5rem); }
.ct-article-card :is(h2, h3) { font-size: clamp(1.2rem, 2cqi, 1.5rem); }
.ct-tile-meta { color: var(--radio-muted); font-size: 0.75rem; line-height: 1.4; margin: 0 0 0.4rem; }
.ct-tile-topic { font-weight: 700; }
.ct-tile-meta .ct-content-author { display: inline; font: inherit; color: inherit; margin: 0; }
.ct-home-feed .ct-story__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 0.9rem; line-height: 1.5; margin-block-start: 0.5rem; }
.ct-more-stories--first { margin-block-start: 0; }
.ct-feed-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-block-start: 2rem; }
.ct-feed-next { display: inline-flex; align-items: center; justify-content: center; min-block-size: 2.875rem; padding: 0.75rem 1.25rem; background: var(--radio-blue); border: 1px solid var(--radio-blue); color: var(--radio-ink); font-family: var(--radio-heading-font); font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.ct-feed-next[aria-disabled="true"] { background: var(--radio-paper); border-color: var(--radio-line); cursor: default; }
.ct-feed-status { color: var(--radio-muted); font-size: 0.875rem; min-block-size: 1.6em; }
.ct-article-list h3 a, .ct-feed-status { scroll-margin-block: 2rem; }
@container (min-width: 36rem) {
  .ct-home-feed .ct-story-leads:not(.ct-story-leads--1), .ct-article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 56rem) {
  .ct-article-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 72rem) {
  .ct-article-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.ct-listing { container-type: inline-size; }
.ct-article-list > li { margin: 0; }
.ct-tile-meta a { color: inherit; text-decoration: none; }
.ct-tile-meta a:hover, .ct-tile-meta a:focus-visible { text-decoration: underline; }

/* Native-block schedule pattern: one time track throughout, nested evening grid. */
.ct-schedule {
  --ct-schedule-time-size: 7rem;
  display: grid;
  gap: 2rem;
  container: schedule / inline-size;
}
.ct-schedule :where(h2, h3, p, figure),
.ct-schedule :where(.wp-block-group) > * {
  margin-block: 0;
}
.ct-schedule-section {
  min-inline-size: 0;
  background: var(--radio-white);
  border: 1px solid var(--radio-line);
}
.ct-schedule-section > h2 {
  background: var(--radio-blue);
  color: var(--radio-ink);
  font-size: 1.25rem;
  letter-spacing: normal;
  padding: 1rem 1.25rem;
}
.ct-schedule-slot {
  display: grid;
  grid-template-columns: var(--ct-schedule-time-size) minmax(0, 1fr);
  border-block-start: 1px solid var(--radio-line);
}
.ct-schedule-time {
  border-inline-end: 3px solid var(--radio-blue);
  font-size: 0.9375rem;
  letter-spacing: normal;
  line-height: 1.5;
  padding: 1.25rem 1rem;
  white-space: nowrap;
}
.ct-schedule-programmes {
  min-inline-size: 0;
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.ct-schedule-note, .ct-schedule-table small {
  color: var(--radio-muted);
  font-size: 0.8125rem;
}
.ct-schedule-evening {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.ct-schedule-day {
  background: var(--radio-paper);
  border-inline-start: 3px solid var(--radio-blue);
  padding: 0.75rem 1rem;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.ct-schedule-day-label {
  color: var(--radio-muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin-block-end: 0.25rem;
}
.ct-schedule-weekend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 2rem;
}
.ct-schedule-table table {
  border: 0;
  margin: 0;
  font-size: 0.9375rem;
}
.ct-schedule-table :is(th, td) {
  border: 0;
  border-block-end: 1px solid var(--radio-line);
  padding: 1rem;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.ct-schedule-table thead {
  border-block-end: 1px solid var(--radio-line);
}
.ct-schedule-table thead th {
  background: var(--radio-paper);
  color: var(--radio-ink);
  font-size: 0.75rem;
}
.ct-schedule-table :is(th, td):first-child {
  width: var(--ct-schedule-time-size);
  border-inline-end: 3px solid var(--radio-blue);
  font-weight: 700;
  white-space: nowrap;
}
.ct-schedule-table figcaption {
  color: var(--radio-muted);
  font-size: 0.75rem;
  padding: 0.75rem 1rem;
  text-align: start;
}
@container schedule (max-width: 48rem) {
  .ct-schedule-evening, .ct-schedule-weekend { grid-template-columns: minmax(0, 1fr); }
}
@container schedule (max-width: 30rem) {
  .ct-schedule-section { --ct-schedule-time-size: 5rem; }
  .ct-schedule-slot { grid-template-columns: minmax(0, 1fr); }
  .ct-schedule-time { border-inline-end: 0; border-block-end: 1px solid var(--radio-line); background: var(--radio-paper); padding: 0.75rem 1rem; }
  .ct-schedule-programmes { padding: 1rem; }
}

/* Playlist controls share one bottom anchor and one control-height token. */
.radio-playlist__days a, .radio-playlist__filters button {
  block-size: var(--ct-ui-control-size);
  padding: 0.625rem 1rem;
}
.radio-playlist__filters label { font-size: 0.8125rem; line-height: 1.4; }
.radio-playlist__filters input { padding: 0.625rem 0.75rem; }
.radio-playlist__filters button { background: var(--radio-blue); border-color: var(--radio-blue); }
.radio-playlist__filters button:hover:not(:disabled) { background: var(--radio-ink); border-color: var(--radio-ink); color: var(--radio-white); }
.radio-playlist__table { line-height: 1.5; }
.radio-playlist__table tbody tr:nth-child(even) { background: var(--radio-paper); }
.radio-playlist__table :is(th, td):first-child { inline-size: 6rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.radio-playlist__results:focus-visible { outline: 3px solid var(--radio-focus); outline-offset: 3px; }
/* Owncast owns its iframe UI; this wrapper owns only the shared column geometry. */
.ct-owncast iframe { display: block; inline-size: 100%; aspect-ratio: 4 / 3; block-size: auto; border: 1px solid var(--radio-line); }

/* Decorative motion uses inner surfaces; outer grid slots and dock anchors stay fixed. */
.ct-story__surface, .ct-card__surface {
  position: relative;
  isolation: isolate;
  transform-origin: 50% 58%;
  transition: box-shadow 240ms ease, border-color 180ms ease;
}
.radio-player {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.radio-player__surface {
  position: relative;
  isolation: isolate;
  background: var(--radio-player-bg);
  border: 1px solid var(--radio-player-border);
  box-shadow: 0 3px 20px rgb(17 20 22 / 0.16);
  border-radius: 0;
  overflow: hidden;
}
.radio-player__surface > :is(video, .radio-player__inner) { position: relative; z-index: 1; }
:is(.ct-story, .is-style-ct-card-animated).ct-motion-active { z-index: 1; }
.ct-motion-active > :is(.ct-story__surface, .ct-card__surface) {
  border-color: #9abcc2;
  box-shadow: 0 3px 7px rgb(36 52 58 / 0.05), 0 13px 25px rgb(36 52 58 / 0.11);
}
:is(.ct-story__surface, .ct-card__surface)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at var(--ct-light-x, 50%) var(--ct-light-y, 30%), rgb(255 255 255 / 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 220ms ease;
}
.ct-motion-active > :is(.ct-story__surface, .ct-card__surface)::after { opacity: 1; }
.radio-player__surface::before {
  content: "";
  position: absolute;
  left: var(--ct-pulse-x, 0px);
  top: var(--ct-pulse-y, 0px);
  inline-size: var(--ct-pulse-size, 0px);
  block-size: var(--ct-pulse-size, 0px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle closest-side,
    transparent 85%,
    rgb(0 177 210 / 0.03) 88%,
    rgb(0 177 210 / 0.16) 91%,
    rgb(0 177 210 / 0.10) 93%,
    transparent 96%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}
.radio-player__surface.ct-pulse-start::before { animation: ct-player-start 1000ms linear; }
@keyframes ct-player-start {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.02); }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ct-story__surface, .ct-card__surface {
    transform: translateY(var(--ct-lift, 0px)) rotateX(var(--ct-rx, 0deg)) rotateY(var(--ct-ry, 0deg)) rotateZ(var(--ct-rz, 0deg));
  }
}
@media (prefers-reduced-motion: reduce) {
  .ct-story__surface, .ct-card__surface { transform: none; transition: none; }
  :is(.ct-story__surface, .ct-card__surface)::after { display: none; }
  .radio-player__surface::before { animation: none !important; }
}
