:root {
  color-scheme: dark;
  --bg: #101413;
  --panel: #19201e;
  --line: #34413b;
  --ink: #f3f0e6;
  --muted: #a3b5ab;
  --accent: #cef77c;
  --warn: #efbd7b;
  --danger: #ff9e91;
  font:
    16px/1.55 system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
a {
  color: var(--accent);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #27332d;
  color: var(--ink);
  padding: 0.65rem 1rem;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
}
button:hover {
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  color: #152010;
  border: 0;
  font-weight: 650;
}
button.danger {
  color: var(--danger);
}
input,
select,
textarea {
  display: block;
  width: 100%;
  background: #101713;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.6rem;
}
input[type="checkbox"] {
  display: inline;
  width: auto;
}
label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.7rem 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
  font-weight: 550;
}
h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1rem;
}
small,
.muted {
  color: var(--muted);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
  margin-bottom: 2.5rem;
}
.brand {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.25em;
  font-weight: 650;
}
main {
  max-width: 1160px;
  margin: auto;
  padding: 0 2rem 3rem;
}
.eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}
.card {
  padding: 1.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 1rem;
}
section {
  margin-bottom: 2rem;
}
.wide {
  grid-column: 1/-1;
}
.status {
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.notice {
  padding: 1rem;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  margin-bottom: 1rem;
}
.notice.error {
  border-color: var(--danger);
  color: var(--danger);
}
.hidden,
[hidden] {
  display: none !important;
}
.desk {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.5rem;
}
.station-title {
  font-size: 2rem;
}
.stat {
  font:
    1.2rem ui-monospace,
    monospace;
}
.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
pre {
  font:
    12px/1.6 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 28rem;
  overflow: auto;
}
nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
nav a {
  font-size: 0.9rem;
  text-decoration: none;
}
details > summary {
  cursor: pointer;
  padding: 0.75rem 0;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
}
td,
th {
  text-align: left;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.listener {
  max-width: 840px;
}
.listen-hero {
  padding: 2rem 0 1rem;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1rem;
  align-items: center;
}
.orb {
  width: 180px;
  height: 180px;
  border: 1px solid #657952;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #cef77c17 0, transparent 65%);
}
.orb:before,
.orb:after {
  content: "";
  position: absolute;
  inset: 25px;
  border: 1px solid #536345;
  border-radius: 50%;
}
.orb:after {
  inset: 50px;
}
.orb span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}
.player {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
  margin: 2rem 0;
}
.play {
  font-size: 1.2rem;
  min-width: 165px;
}
.volume {
  max-width: 180px;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3rem;
}
.studio.active {
  border-color: var(--accent);
}
.mini {
  font-size: 0.85rem;
}
form.inline {
  display: flex;
  gap: 0.5rem;
  align-items: end;
  flex-wrap: wrap;
}
form.inline label {
  flex: 1;
  min-width: 180px;
}
.pending {
  color: var(--warn);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 700px) {
  main {
    padding: 0 1rem 2rem;
  }
  .desk,
  .listen-hero {
    grid-template-columns: 1fr;
  }
  .orb {
    width: 100px;
    height: 100px;
    margin: 1rem 0;
  }
  .orb:before {
    inset: 15px;
  }
  .orb:after {
    inset: 30px;
  }
  header {
    margin-bottom: 1.5rem;
  }
  .footer {
    flex-direction: column;
  }
  .card {
    padding: 1rem;
  }
}

/* Documentation: static HTML rendered from the shipped Markdown sources. */
.documentation {
  max-width: 1400px;
}
.doc-pages {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.doc-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 3rem;
  margin-top: 2rem;
}
.doc-layout aside nav {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 1rem;
}
.doc-layout article {
  max-width: 850px;
  min-width: 0;
}
.doc-layout h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}
.doc-layout h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
}
.doc-layout h3 {
  margin-top: 2rem;
  font-size: 1.15rem;
}
.doc-layout pre {
  background: var(--panel);
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  max-height: none;
  white-space: pre;
  overflow: auto;
}
.doc-layout li {
  margin-bottom: 0.55rem;
}
.doc-layout footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 1rem;
  color: var(--muted);
}
.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
[id] {
  scroll-margin-top: 1.5rem;
}
@media (max-width: 850px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .doc-layout aside nav {
    position: static;
  }
}

/* Control room: editable, dependency-free presentation. */
.control-room {
  --bg: #0b111b;
  --panel: #131e2c;
  --line: #29384d;
  --muted: #9fadc1;
  --accent: #7fe2cd;
  --ink: #eef3fa;
  background: radial-gradient(ellipse at 80% 0%, #193040 0%, transparent 45%), var(--bg);
}
.control-room main {
  max-width: 1440px;
  padding: 24px clamp(18px, 4vw, 64px) 80px;
}
.control-room .card {
  border-radius: 18px;
  background: linear-gradient(145deg, #172435, #111b29);
  box-shadow: 0 12px 32px #0002;
}
.control-room nav {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin-bottom: 28px;
  gap: 24px;
}
.control-room nav a {
  color: var(--muted);
  text-decoration: none;
}
.control-room nav a:hover {
  color: var(--accent);
}
.control-room button,
.control-room .button {
  border-radius: 9px;
  background: #223449;
}
.control-room button.primary,
.control-room .studio .row button:first-child {
  background: var(--accent);
  color: #092823;
  font-weight: 700;
}
.control-room .overview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  gap: 20px;
}
.control-room .overview h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin: 10px 0;
}
.accent {
  color: var(--accent);
}
.signal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 24px 0 12px;
}
.signal-summary > div {
  padding: 20px 24px;
  background: #142131aa;
}
.signal-summary > div + div {
  border-left: 1px solid var(--line);
}
.signal-summary strong {
  display: block;
  font-size: clamp(1rem, 2vw, 1.5rem);
  margin-top: 6px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.section-heading h2 {
  margin-bottom: 8px;
}
.control-room .studio {
  padding: 26px;
}
.control-room #studio-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.studio h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.diagnosis {
  font-size: 1.1rem;
  margin: 20px 0 8px;
}
[data-tone="good"] {
  color: var(--accent);
}
[data-tone="warn"] {
  color: var(--warn);
}
[data-tone="bad"] {
  color: var(--danger);
}
.next-step {
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 3em;
}
.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0;
}
.pipeline span {
  border-radius: 6px;
  padding: 5px 8px;
  background: #0c1623;
  color: var(--muted);
  font-size: 0.74rem;
}
.pipeline .done {
  color: var(--accent);
  background: #14362f;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-bottom: 20px;
}
.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}
.metrics strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  overflow-wrap: anywhere;
  margin-top: 4px;
}
.studio meter {
  display: block;
  width: 100%;
  height: 14px;
  accent-color: var(--accent);
}
.studio details {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 0.83rem;
}
.activity-list {
  list-style: none;
  padding: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.activity-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.connect-card {
  margin-top: 24px;
  border: 1px dashed #47756e;
}
.control-room pre {
  background: #091320;
  border-radius: 10px;
  overflow-x: auto;
}
.control-room .brand {
  font-size: 1rem;
  letter-spacing: 0.04em;
}
@media (max-width: 600px) {
  .signal-summary > div {
    padding: 14px 10px;
  }
  .signal-summary .eyebrow {
    font-size: 0.6rem;
  }
  .control-room .overview {
    align-items: start;
    flex-direction: column;
  }
  .control-room nav {
    gap: 16px;
    flex-wrap: wrap;
  }
  .control-room .studio {
    padding: 20px;
  }
}

/* Broadcast controls and recording timeline. */
.broadcast-desk {
  grid-template-columns: 1.5fr 1fr;
}
.air-sign {
  display: inline-block;
  border-radius: 7px;
  background: #344154;
  color: white;
  font-size: 1rem;
  letter-spacing: 0.12em;
  font-weight: 850;
  padding: 9px 15px;
}
.air-sign[data-state="on-air"] {
  background: #dc354c;
  box-shadow: 0 0 28px #dc354c40;
}
.air-sign[data-state="replay"] {
  background: #26798b;
}
.air-sign[data-state="silent"] {
  background: #715329;
  color: #fff0d8;
}
.broadcast-now h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-top: 22px;
  overflow-wrap: anywhere;
}
.broadcast-now meter {
  width: 160px;
  height: 16px;
}
.broadcast-actions {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
#quick-cue input {
  flex: 1;
  width: auto;
  min-width: 180px;
}
.fallback-notice {
  border-left: 3px solid var(--warn);
  padding-left: 14px;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.rules-at-glance h3 {
  font-size: 1rem;
  color: var(--accent);
}
.rules-at-glance p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.rules-grid article {
  padding: 14px 0;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
legend {
  padding: 0 8px;
  font-weight: 650;
}
#broadcast-rules > button {
  margin: 18px 8px 12px 0;
}
#broadcast-rules input:not([type="checkbox"]) {
  max-width: 240px;
}
.signal-summary small {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
  margin-top: 6px;
}
.cue-timeline {
  height: 185px;
  position: relative;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), #29384d 10%),
    #0b1522;
  overflow: hidden;
}
.timeline-mark {
  position: absolute;
  min-height: 26px;
  padding: 2px 7px;
  height: 28px;
  border-radius: 5px;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-mark.cue {
  color: var(--accent);
  padding: 0 3px;
  border: 0;
  background: none;
}
.timeline-mark.segment {
  background: #23554e;
  color: #eff;
  text-align: left;
}
.cue-entry {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 2fr 1fr;
  gap: 12px;
  border-left: 2px solid var(--accent);
  padding: 12px 18px;
  margin: 10px 0;
  background: #0d1826;
  border-radius: 0 8px 8px 0;
  overflow-wrap: anywhere;
}
.cue-entry time {
  font-size: 0.78rem;
  color: var(--muted);
}
.cue-entry:focus {
  outline: 2px solid var(--accent);
}
.cue-entry p {
  grid-column: 1/-1;
  margin: 0;
}
.control-room input,
.control-room select,
.control-room textarea {
  background: #0b1522;
}
@media (max-width: 760px) {
  .broadcast-desk,
  .rules-grid {
    grid-template-columns: 1fr;
  }
  .cue-entry {
    grid-template-columns: 1fr;
  }
}

.timeline-tick {
  position: absolute;
  bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
}

.current-message{white-space:pre-wrap;overflow-wrap:anywhere}
