/* radio-panel v3 additions. Layered on style.css; no JS dependencies. */
:root {
  --ink: #101828; --muted: #475467; --line: #d0d5dd; --bg: #f7f8fa; --card: #fff;
  --blue: #0b3d91; --blue-ink: #fff; --ok: #05603a; --ok-bg: #ecfdf3;
  --warn: #b54708; --warn-bg: #fffaeb; --bad: #b42318; --bad-bg: #fef3f2;
  --focus: #1d4ed8; --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { color: var(--ink); }
a { color: var(--blue); }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: 10px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* -------- header / nav -------- */
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
.topbar .brand { color: var(--ink); margin-right: 0; }
.mainnav a, .stationnav .st { margin-right: 0; }
.brand small { font-weight: 500; color: var(--muted); }
.mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--blue); color: #fff; font-size: 12px; }
.navtoggle summary { list-style: none; cursor: pointer; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.navtoggle summary::-webkit-details-marker { display: none; }
.mainnav { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 8px; }
.mainnav a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
.mainnav a:hover { background: #eef2ff; }
.mainnav a[aria-current="page"] { background: var(--blue); color: #fff; }
.mainnav .inline { display: inline; }
.mainnav .link { background: none; border: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font: inherit; padding: 8px 10px; }
.stationnav { display: flex; gap: 6px; flex-wrap: wrap; flex-basis: 100%; margin-left: 0; }
.stationnav .st { font-size: 13px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.stationnav .st[aria-current="true"] { border-color: var(--blue); background: #eef2ff; }
/* Nav: one inline row on desktop, a native disclosure on mobile. */
.mainnav.wide { display: flex; }
.navtoggle { display: none; }
@media (max-width: 899px) {
  .mainnav.wide { display: none; }
  .navtoggle { display: block; }
  .navtoggle > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
  .navtoggle > summary::-webkit-details-marker { display: none; }
  .mainnav.narrow { flex-direction: column; width: 100%; margin-top: 8px; }
  .stationnav { margin-left: 0; order: 3; width: 100%; }
  .topbar { gap: 8px; }
}

/* -------- layout -------- */
main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-size: clamp(22px, 3vw, 30px); margin: 0; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* -------- controls -------- */
.btn, button.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.secondary { background: #fff; color: var(--blue); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
input:not([type]), input[type=text], input[type=search], input[type=password], input[type=url], input[type=date], input[type=time], input[type=number], input[type=file], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; }
label { font-weight: 600; display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0 0 12px; }
legend { font-weight: 700; padding: 0 6px; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 6px 0; font-weight: 500; }
.inline-check input { width: auto; min-height: 0; }

/* -------- feedback -------- */
.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #abefc6; color: var(--ok); }
.flash.err { background: var(--bad-bg); border-color: #fecdca; color: var(--bad); }
.flash.info { background: #f5f8ff; border-color: #c7d7fe; color: #1e3a8a; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef2ff; color: var(--blue); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.empty { text-align: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.empty h2 { margin: 0 0 6px; font-size: 18px; }
.empty p { margin: 0 auto 14px; max-width: 46ch; color: var(--muted); }

/* -------- tables -------- */
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.list tr:hover td { background: #fafbff; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 720px) {
  table.list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; }
  table.list tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  table.list td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 10px; }
  table.list td::before { content: attr(data-label); font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
}

/* -------- progress + checklist -------- */
.progress { height: 10px; background: #eaecf0; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.checklist .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.done .t { text-decoration: line-through; color: var(--muted); }
.checklist .t { font-weight: 600; }

/* -------- schedule -------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 120px; padding: 8px; }
.day h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.slot { border-left: 3px solid var(--blue); background: #f5f8ff; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font-size: 13px; }
.slot.live { border-color: var(--bad); background: #fef3f2; }
.slot .when { display: block; color: var(--muted); font-size: 12px; }
.onair { border: 2px solid var(--ok); background: var(--ok-bg); border-radius: var(--radius); padding: 12px 14px; }
@media (max-width: 720px) { .week { grid-template-columns: 1fr; } .day { min-height: 0; } }

/* -------- misc -------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .k { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kpi strong { font-size: 24px; color: var(--blue); display: block; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: #f2f4f7; padding: 2px 5px; border-radius: 4px; }
pre { background: #101828; color: #f9fafb; padding: 12px; border-radius: 8px; overflow-x: auto; }
pre code { background: none; color: inherit; padding: 0; }
details.help { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; margin-top: 10px; }
details.help summary { cursor: pointer; font-weight: 600; }
.track { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); }
.track:last-child { border-bottom: 0; }
.track .meta { min-width: 0; }
.track .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
