/* Shared by the Community Wall, Broadcast archive, and detail modal. */
.cw-broadcast-card {
  --broadcast-accent: #fb2f7b;
  position: relative;
  --broadcast-strip-width: 5px;
  border: 0;
  background:
    linear-gradient(var(--color-card-border), var(--color-card-border)) top right / 100% 1px no-repeat,
    linear-gradient(var(--color-card-border), var(--color-card-border)) bottom right / 100% 1px no-repeat,
    linear-gradient(var(--color-card-border), var(--color-card-border)) top right / 1px 100% no-repeat;
  /* Equal visible space on both sides: 19px from the color strip to the text on the
     left, and 19px from the text to the card edge on the right. */
  padding: 19px 19px 19px calc(var(--broadcast-strip-width) + 19px);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.cw-broadcast-card[hidden] { display: none !important; }
.cw-broadcast-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--broadcast-strip-width);
  background: var(--broadcast-accent);
}
/* Paint the horizontal lines above the color strip, including its full width. */
.cw-broadcast-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--color-card-border), var(--color-card-border)) top / 100% 1px no-repeat,
    linear-gradient(var(--color-card-border), var(--color-card-border)) bottom / 100% 1px no-repeat;
  pointer-events: none;
}
.cw-broadcast-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.cw-broadcast-card__category {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-vandalism);
}
.cw-broadcast-card__time {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.cw-broadcast-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}
.cw-broadcast-card__body {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.cw-broadcast-card__sample {
  display: inline-block;
  color: var(--color-text-muted);
  font-size: 0.6rem;
  margin-left: 8px;
}
.cw-broadcast-card__read-more,
.broadcast-modal__close {
  border: 1px solid var(--color-card-border);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 10px 14px;
  cursor: pointer;
}
.cw-broadcast-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 0 0;
  border: 0;
}
.cw-broadcast-card__read-more span { font-size: 1.2rem; line-height: 1; }
.cw-broadcast-card__read-more:hover,
.broadcast-modal__close:hover { border-color: #fb2f7b; }
.cw-broadcast-card:focus { outline: none; }

.cw-broadcast-card__read-more:focus,
.cw-broadcast-card__read-more:focus-visible,
.broadcast-modal button:focus,
.broadcast-modal button:focus-visible,
.broadcast-modal a:focus,
.broadcast-modal a:focus-visible { outline: none; box-shadow: none; }
.broadcast-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-bg);
  color: var(--color-text);
  overflow: hidden;
}
.broadcast-modal[open] { display: flex; flex-direction: column; }
.broadcast-modal::backdrop { background: var(--color-bg); }
/* Reversed breadcrumb row: white band, dark text, and no divider line beneath. */
.broadcast-modal__toolbar {
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 0 6px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.85rem;
}
/* Keep navigation and close control within the detail content margins. */
.broadcast-modal__toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  width: 100%;
  margin-inline: auto;
  padding-left: calc(var(--section-padding-x) + 24px);
  padding-right: var(--section-padding-x);
  box-sizing: border-box;
}
.broadcast-modal__crumb {
  flex: 1;
  flex-wrap: wrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(20, 20, 20, 0.62);
  min-width: 0;
}
.broadcast-modal__crumb a { color: var(--color-bg); text-decoration: none; }
.broadcast-modal__crumb a:hover { color: var(--color-bg); text-decoration: underline; text-underline-offset: 3px; }
.broadcast-modal__crumb-current { color: var(--color-bg); border: 0; padding: 0; background: transparent; font: inherit; letter-spacing: inherit; cursor: pointer; }
/* Same thermal gradient/animation as the broadcast card edge strips
   (.cw-broadcast-card::before / .broadcast-arc below), just thin and
   rotated into a forward-slash instead of a wide vertical bar. Shared
   by every breadcrumb that reuses this look (modal, Broadcasts' own
   full and condensed headers). */
.broadcast-slash {
  display: inline-block;
  flex: none;
  width: 2px;
  height: 22px;
  transform: rotate(20deg);
  background: linear-gradient(165deg, #EB1528 0%, #FF3220 18%, #FFDC00 42%, #B8EF00 58%, #A8E000 73%, #00CDE8 88%, #45CDF6 100%);
  background-size: 100% 220%;
  animation: broadcast-thermal-drift 16s ease-in-out infinite alternate;
}
.broadcast-modal__close {
  flex: none;
  margin-right: -10px;
  border: 0;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.broadcast-modal__toolbar .broadcast-modal__close { color: var(--color-bg); position: relative; padding: 4px 6px; margin-right: -6px; }
/* Keeps a comfortable tap target around the slimmer close button. */
.broadcast-modal__toolbar .broadcast-modal__close::before { content: ""; position: absolute; inset: -9px -6px; }
.broadcast-modal__close span { font-size: 1.3rem; line-height: 1; }
.broadcast-modal__scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; }
.broadcast-modal__content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px var(--section-padding-x) 0;
}
.broadcast-modal__back {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 28px var(--section-padding-x) calc(40px + env(safe-area-inset-bottom, 0px)) calc(var(--section-padding-x) + 24px);
  border: 0;
  background: none;
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.broadcast-modal__back span { font-size: 1.1rem; line-height: 1; }
.broadcast-modal__back:hover { color: var(--color-vandalism); }
.broadcast-modal__body,
.broadcast-modal__attachments {
  /* Lines up with the card text above: strip + 19px on the left, 19px on the right. */
  padding-left: 24px;
  padding-right: 19px;
  margin-top: 20px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.broadcast-modal__body > * + * { margin-top: 16px; }
.broadcast-modal__body p,
.broadcast-modal__body li { color: var(--color-text-muted); }
.broadcast-modal__body ul,
.broadcast-modal__body ol,
.broadcast-modal__attachments ul { padding-left: 22px; }
.broadcast-modal__body img,
.broadcast-modal__body video { max-width: 100%; height: auto; }
.broadcast-modal__body pre { overflow-x: auto; }
.broadcast-modal__body a,
.broadcast-modal__attachments a { color: var(--color-text); text-decoration: underline; text-underline-offset: 4px; }
.broadcast-modal__attachments h3 { font-size: 0.85rem; margin-bottom: 12px; }
.broadcast-modal__attachments li + li { margin-top: 12px; }
.broadcast-modal__file-note { color: var(--color-text-muted); font-size: 0.8rem; }

/* Original thermal gradients, shared by the megaphone arcs and edge strips. */
.broadcast-arc,
.cw-broadcast-card::before {
  background: linear-gradient(165deg, #EB1528 0%, #FF3220 18%, #FFDC00 42%, #B8EF00 58%, #A8E000 73%, #00CDE8 88%, #45CDF6 100%);
  background-size: 100% 220%;
  animation: broadcast-thermal-drift 16s ease-in-out infinite alternate;
}
.broadcast-arc {
  display: inline-block;
  flex: none;
  width: 19.05px;
  height: 38.11px;
  -webkit-mask: url('../assets/images/broadcast-arcs.svg?v=6') center / contain no-repeat;
  mask: url('../assets/images/broadcast-arcs.svg?v=6') center / contain no-repeat;
}
.cw-section-header__title--arc { display: flex; align-items: center; gap: 12px; }
@keyframes broadcast-thermal-drift {
  from { background-position: 50% 0%; }
  to { background-position: 50% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .broadcast-arc, .cw-broadcast-card::before, .broadcast-slash { animation: none; }
}

/* Subtitle starts below the title lettering, after the 24px arc + 12px gap. */
.cw-section-header__title--arc + .cw-section-header__subtitle {
  margin-left: 36px;
}

/* Treat the heading and subtitle as one compact lockup beside the arc. */
.cw-section-header__text,
.cw-campaigns__intro { position: relative; }
.cw-section-header__title--arc {
  display: block;
  padding-left: 36px;
  line-height: 1;
}
.cw-section-header__title--arc .broadcast-arc {
  position: absolute;
  left: 0;
  top: 0;
}
.cw-section-header__title--arc + .cw-section-header__subtitle {
  margin-top: 1px;
  font-size: .9rem;
  line-height: 1.1;
}

/* Anchor the subtitle to the bottom of the trimmed arc lockup. */
.cw-section-header__text,
.cw-campaigns__intro {
  display: flex;
  flex-direction: column;
  min-height: 38.11px;
}
.cw-section-header__title--arc + .cw-section-header__subtitle {
  margin-top: 1px;
}

.cw-section-header__title--arc .broadcast-arc {
  top: 0;
  bottom: auto;
}

/* Offset the font's space above capitals without moving the arc/subtitle. */
.cw-section-header__label {
  position: relative;
  top: -.14em;
}
