/* UptimeCast panel — a broadcast master-control look: equipment-grey
   console, condensed signage type, and a tally lamp per channel that is the
   only saturated colour on screen. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/barlow-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --console: #DDE1DB;   /* equipment grey */
  --panel:   #F3F4F0;   /* channel strip */
  --ink:     #1C2430;
  --steel:   #5A6672;   /* secondary text */
  --rule:    #C2C8C0;
  --tally:   #D3263A;   /* on air: the only loud colour */
  --amber:   #B97A06;   /* on a backup */
  --signal:  #2F7D4F;
  --dim:     #9AA39C;
  --focus:   #1F5FBF;
  --glow: 0 0 0 1px color-mix(in srgb, var(--tally) 60%, transparent), 0 0 14px color-mix(in srgb, var(--tally) 45%, transparent);
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --console: #1D2227; --panel: #262C32; --ink: #E7EBE5; --steel: #9DA8B2;
    --rule: #3A434B; --tally: #FF4558; --amber: #E3A21B; --signal: #4CB57A; --dim: #5D666E; --focus: #7FB0FF;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--console); color: var(--ink);
  font: 400 1rem/1.5 var(--sans); font-feature-settings: "tnum" 1;
}
a { color: inherit; }
h1, h2 { font-family: var(--cond); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: .005em; }
h1 { font-size: 2.25rem; }
code { font-family: var(--cond); font-size: 1.05em; font-weight: 500; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- top bar ---- */
.bar {
  display: flex; align-items: center; gap: 1.5rem; padding: .75rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule); background: var(--panel);
}
.mark { display: inline-flex; align-items: center; gap: .5rem; font: 600 1.35rem/1 var(--cond); text-decoration: none; }
.mark-lamp { width: .45rem; height: 1.1rem; border-radius: 2px; background: var(--tally); box-shadow: var(--glow); }
.mark-large { font-size: 2rem; margin: 0 0 2rem; }
.bar-nav a { text-decoration: none; color: var(--steel); font-weight: 500; }
.bar-nav a[aria-current] { color: var(--ink); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 1rem; color: var(--steel); }
.bar-end form { margin: 0; }
.who { font-weight: 500; }

/* ---- layout ---- */
.main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; max-width: 84rem; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* ---- controls ---- */
button, .button, input, select { font: inherit; color: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.5rem; padding: 0 1.1rem; border-radius: 4px; border: 1px solid var(--rule);
  background: var(--panel); font-weight: 600; text-decoration: none; cursor: pointer;
}
.primary { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.secondary { background: transparent; }
.danger { background: transparent; color: var(--tally); border-color: currentColor; }
.link { background: none; border: 0; padding: 0; min-height: 0; font-weight: 500; color: var(--steel); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--ink); }
input:not([type=checkbox]):not([type=radio]), select {
  width: 100%; min-height: 2.5rem; padding: .45rem .7rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--console);
}
select { width: auto; }
.lang select { min-height: 2rem; padding: .2rem .5rem; background: transparent; }
label { display: grid; gap: .3rem; font-weight: 500; }
label.check { display: inline-flex; align-items: center; gap: .45rem; font-weight: 400; }
input[type=checkbox], input[type=radio] { width: 1.05rem; height: 1.05rem; accent-color: var(--ink); margin: 0; }
small, .help { color: var(--steel); font-weight: 400; }

.flash, .notice, .error { padding: .7rem 1rem; border-radius: 4px; border-left: 4px solid; margin: 0 0 1.25rem; max-width: 60ch; }
.flash, .notice { border-color: var(--signal); background: var(--panel); }
.error { border-color: var(--tally); background: var(--panel); }
.error ul { margin: 0; padding-left: 1.1rem; }

/* ---- summary ---- */
.summary { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; color: var(--steel); font-weight: 500; }
.summary li { display: inline-flex; align-items: center; gap: .45rem; }
.summary li::before { content: ""; width: .35rem; height: .8rem; border-radius: 1px; background: var(--dim); }
.summary .s-live::before { background: var(--tally); }
.summary .s-backup::before { background: var(--amber); }

/* ---- channel strips: the tally lamp is the signature ---- */
.strips { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-radius: 6px; overflow: hidden; border: 1px solid var(--rule); background: var(--rule); }
.strip {
  display: grid; grid-template-columns: .55rem minmax(11rem, 16rem) 1fr auto; align-items: center; gap: 1.25rem;
  padding: 1rem 1.25rem 1rem 0; background: var(--panel);
}
.tally { align-self: stretch; background: var(--dim); opacity: .45; }
.state-live .tally { background: var(--tally); opacity: 1; box-shadow: var(--glow); }
.state-backup .tally { background: var(--amber); opacity: 1; }
.state-slate .tally { background: var(--amber); opacity: .55; background-image: repeating-linear-gradient(0deg, transparent 0 6px, var(--panel) 6px 9px); }
.strip-id h2 { font-size: 1.6rem; }
.strip-id h2 a { text-decoration: none; }
.strip-id h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.state { margin: .2rem 0 0; color: var(--steel); font-weight: 500; }
.state-live .state { color: var(--tally); }
.state-backup .state { color: var(--amber); }
.since { color: var(--steel); font-weight: 400; margin-left: .5rem; }

.ports { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.port {
  display: grid; grid-template-columns: auto auto; column-gap: .6rem; align-items: baseline;
  padding: .35rem .7rem .4rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--console); min-width: 7.5rem;
}
.port .q { font: 600 1.25rem/1.1 var(--cond); }
.port .host { grid-column: 1 / -1; color: var(--steel); font-size: .8rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.port.on-air { border-color: var(--tally); box-shadow: inset 0 0 0 1px var(--tally); background: var(--panel); }
.port.down { opacity: .55; }
.port.down .q { text-decoration: line-through; text-decoration-thickness: 2px; }
.tag { font-size: .75rem; font-weight: 600; color: var(--steel); }
.tag-air { color: var(--tally); }
.tag-pin { color: var(--ink); }

.strip-end { display: grid; justify-items: end; gap: .35rem; text-align: right; }
.switches { margin: 0; color: var(--steel); font-size: .9rem; }
.actions { display: flex; gap: 1rem; }

.empty { padding: 3rem 2rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; max-width: 46rem; }
.empty h2 { font-size: 1.8rem; }
.empty p { color: var(--steel); max-width: 52ch; margin: .6rem 0 1.5rem; }

/* ---- login ---- */
.page-login .main { display: grid; min-height: 100vh; place-items: center; padding-top: 0; max-width: none; }
.login { width: min(26rem, 100%); }
.login .mark-large { margin-bottom: 1.5rem; }
.login-card { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 2rem 2rem 2.25rem; border-top: 3px solid var(--ink); }
.login h1 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.login-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; color: var(--steel); font-size: .85rem; }
.stack { display: grid; gap: 1rem; }
.stack .primary { margin-top: .5rem; }
.lang-login { margin: 0; }
.license-change { margin: 1.75rem 0 0; max-width: 48rem; }
.license-change summary { cursor: pointer; font-weight: 600; color: var(--steel); }
.license-change[open] summary { margin-bottom: 1rem; color: var(--ink); }

/* ---- channel form ---- */
.channel-form { display: grid; gap: 2rem; max-width: 60rem; }
.fields { display: grid; gap: 1.1rem; max-width: 34rem; }
.readonly { margin: 0; color: var(--steel); }
.sources { border: 1px solid var(--rule); border-radius: 6px; padding: 1.25rem; margin: 0; background: var(--panel); }
.sources legend { font: 600 1.4rem/1 var(--cond); padding: 0 .4rem; }
.sources .help { max-width: 70ch; margin: .25rem 0 1rem; }
.primary-choice { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1rem; }
.primary-choice > span { font-weight: 600; }
.source-rows { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; counter-reset: src; }
.source-row {
  display: grid; grid-template-columns: 2rem minmax(0, 3fr) minmax(0, 1.2fr) minmax(0, 2fr) auto auto; align-items: end; gap: .75rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--rule);
}
.source-row::before { counter-increment: src; content: counter(src); font: 600 1.25rem/2.5rem var(--cond); color: var(--steel); }
.source-row .pin, .source-row .remove { min-height: 2.5rem; }
.form-end { display: flex; align-items: center; gap: 1.5rem; }
.danger-zone { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); max-width: 60rem; }

/* ---- small screens ---- */
@media (max-width: 60rem) {
  .strip { grid-template-columns: .45rem 1fr; padding-right: 1rem; }
  .ports, .strip-end { grid-column: 2; }
  .strip-end { justify-items: start; text-align: left; }
  .source-row { grid-template-columns: 1.5rem 1fr; }
  .source-row > :not(.url) { grid-column: 2; }
  .bar { flex-wrap: wrap; gap: .75rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- plan and license ---- */
.plan-badge { margin-left: .4rem; padding: 0 .35rem; border-radius: 3px; font: 600 .75rem/1.4 var(--cond); border: 1px solid var(--rule); color: var(--steel); }
.plan-badge.plan-pro { border-color: var(--ink); color: var(--ink); }
.plan-line { margin: -.5rem 0 .75rem; color: var(--steel); }
.plan-line a { color: inherit; }
.state-limited .tally { background: var(--dim); }
.state-limited .state { color: var(--tally); }
.license-card { display: grid; grid-template-columns: .55rem 1fr; gap: 1.25rem; padding: 1.25rem 1.25rem 1.25rem 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; max-width: 46rem; overflow: hidden; }
.license-card h2 { font-size: 1.8rem; }
.license-card.plan-pro .tally { background: var(--tally); opacity: 1; box-shadow: var(--glow); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem 1.5rem; margin: .75rem 0 0; }
.facts dt { color: var(--steel); font-size: .85rem; }
.facts dd { margin: 0; font-weight: 500; }
.muted { color: var(--steel); }
h2.section { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.limits { border-collapse: collapse; max-width: 46rem; width: 100%; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; }
.limits th, .limits td { text-align: left; padding: .6rem 1rem; border-top: 1px solid var(--rule); }
.limits tr:first-child th, .limits tr:first-child td { border-top: 0; }
.limits th { font-weight: 500; width: 50%; }
.limits td:nth-child(2) { font: 600 1.15rem/1.2 var(--cond); }
.license-form { max-width: 46rem; margin-top: 2rem; }
textarea { width: 100%; padding: .6rem .7rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--console); font: 500 .9rem/1.4 var(--cond); color: inherit; word-break: break-all; }
.machine { margin-top: 1.5rem; color: var(--steel); }
.bar-nav { display: flex; gap: 1.25rem; }
.plan-badge { text-transform: capitalize; }
[hidden] { display: none !important; }

/* ---- management pages (categories, bouquets, lines, connections) ---- */
.bar-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.lead { color: var(--steel); max-width: 70ch; margin: -.25rem 0 1.25rem; }
.h1-sub { font-weight: 500; color: var(--steel); }
.sub { color: var(--steel); font-size: .875rem; }
.sub.warn, .warn { color: var(--amber); }
table.data { width: 100%; max-width: 72rem; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
table.data th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--steel); padding: .6rem .9rem; border-bottom: 1px solid var(--rule); background: var(--console); }
table.data td { padding: .65rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.actions { display: table-cell; text-align: right; white-space: nowrap; }
table.data .actions form { display: inline; margin-left: .9rem; }
table.data .order { white-space: nowrap; width: 1%; }
table.data .order form { display: inline; }
.row-title { font-weight: 600; text-decoration: none; }
.row-title:hover { text-decoration: underline; text-underline-offset: 3px; }
button.icon { min-height: 2rem; min-width: 2rem; padding: 0; font-weight: 600; }
button.icon:disabled { opacity: .35; cursor: default; }
button.small { min-height: 2rem; padding: 0 .7rem; font-size: .875rem; }
.danger-link { color: var(--tally); }
.inline-add { display: flex; align-items: end; gap: .75rem; max-width: 40rem; margin-bottom: 1.5rem; }
.inline-add .grow { flex: 1; }
.inline-edit { display: flex; align-items: center; gap: .6rem; }
.inline-edit input { max-width: 20rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.field-row .narrow { max-width: 12rem; }
.with-action { display: flex; gap: .5rem; }
.with-action input { flex: 1; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: -.25rem 0 0; color: var(--steel); }
textarea { font: inherit; color: inherit; width: 100%; padding: .5rem .7rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--console); resize: vertical; }
.check-group { border-top: 1px solid var(--rule); padding: .9rem 0 .4rem; }
.check-group:first-of-type { border-top: 0; padding-top: .25rem; }
.check-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.check-group h3 { font: 600 1.15rem/1.2 var(--cond); margin: 0 0 .5rem; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .45rem 1.25rem; }
.chnum { display: inline-block; min-width: 1.6rem; font: 600 .95rem/1 var(--cond); color: var(--steel); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin: 0 0 1rem; max-width: 72rem; }
.filters > a { text-decoration: none; color: var(--steel); font-weight: 500; padding: .2rem 0; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: .4rem; }
.filters > a[aria-current] { color: var(--ink); border-color: var(--ink); }
.filters .count { font-variant-numeric: tabular-nums; color: var(--steel); font-weight: 400; }
.filters .search { margin-left: auto; min-width: 16rem; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--dim); }
.dot-active { background: var(--signal); }
.dot-expired { background: var(--amber); }
.status { font-weight: 600; font-size: .875rem; }
.status-active { color: var(--signal); }
.status-expired { color: var(--amber); }
.status-disabled { color: var(--steel); }
.line-disabled td, .line-expired td { background: color-mix(in srgb, var(--console) 45%, var(--panel)); }
.pager { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; color: var(--steel); }
.access-card { background: var(--panel); border: 1px solid var(--rule); border-left: 4px solid var(--signal); border-radius: 6px; padding: 1.25rem 1.5rem; margin: 0 0 2rem; max-width: 60rem; }
.access-card h2 { font-size: 1.4rem; }
.access-card .help { margin: .3rem 0 1rem; }
.copy-list { display: grid; gap: .55rem; margin: 0 0 .75rem; }
.copy-list > div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; align-items: baseline; }
.copy-list dt { color: var(--steel); font-weight: 500; }
.copy-list dd { margin: 0; display: flex; gap: .9rem; align-items: baseline; min-width: 0; }
.copy-list code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; background: var(--console); padding: .15rem .4rem; border-radius: 3px; }
.copy-list code.long { overflow-wrap: anywhere; }
@media (max-width: 60rem) {
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border-bottom: 1px solid var(--rule); padding: .4rem 0; }
  table.data td { border: 0; padding: .25rem .9rem; text-align: left !important; }
  .copy-list > div { grid-template-columns: 1fr; gap: .15rem; }
  .filters .search { margin-left: 0; width: 100%; }
}

/* ---- administrator account ---- */
a.who { text-decoration: none; font-weight: 600; color: var(--ink); border-bottom: 1px dashed var(--steel); }
a.who[aria-current] { border-bottom-style: solid; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.5rem; max-width: 60rem; }
.panel-card { align-content: start; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem; }
.panel-card h2 { font-size: 1.4rem; }
.panel-card .help { margin: -.5rem 0 0; }

/* ---- server settings ---- */
.settings-form { display: grid; gap: 1.5rem; max-width: 52rem; }
.settings-form .panel-card { display: grid; gap: 1rem; }
.example { margin: 0; color: var(--steel); }
.example code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; background: var(--console); padding: .15rem .4rem; border-radius: 3px; overflow-wrap: anywhere; }

/* ---- live map ---- */
.live-map { position: relative; max-width: 72rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: .75rem .75rem .4rem; margin-bottom: 1.25rem; }
.live-map svg.world { display: block; width: 100%; height: auto; }
.live-map svg.world > g:first-child path { fill: var(--console); stroke: var(--rule); stroke-width: .5; }
.live-map .dot .halo { fill: var(--tally); fill-opacity: .28; stroke: var(--tally); stroke-opacity: .7; stroke-width: 1; }
.live-map .dot .core { fill: var(--tally); }
.live-map .dot:hover .halo { fill-opacity: .4; }
@media (prefers-reduced-motion: no-preference) { .live-map .dot .halo { animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.map-credit { margin: .25rem .25rem 0; font-size: .75rem; color: var(--steel); text-align: right; }
.map-credit a { color: inherit; }
.live-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 2rem; margin: 0 0 1rem; max-width: 72rem; }
.big-count { margin: 0; color: var(--steel); font-weight: 500; }
.big-count strong { font: 600 2rem/1 var(--cond); color: var(--ink); margin-right: .25rem; }
.countries { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.countries .count { color: var(--steel); font-variant-numeric: tabular-nums; margin-left: .15rem; }
.flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

/* ---- IPTV-org plugin ---- */
.org-box { border: 1px solid var(--rule); border-radius: 6px; padding: 1.25rem; margin: 0; background: var(--panel); display: grid; gap: .9rem; max-width: 60rem; }
.org-box legend { font: 600 1.4rem/1 var(--cond); padding: 0 .4rem; }
.org-box .help { max-width: 70ch; margin: 0; }
.org-box .field-row > label { max-width: 26rem; }
.tag-ok { color: var(--ok, #1f8a4c); }
h2.section { font: 600 1.5rem/1.1 var(--cond); margin: 2.25rem 0 .75rem; }
.org-when { margin: -.5rem 0 1rem; }
td.url-cell { max-width: 28rem; overflow-wrap: anywhere; }
td.url-cell code { font-size: .8rem; }
form.inline { display: inline; }
form.org-add { flex-wrap: wrap; max-width: 52rem; }
form.org-add label.full { flex-basis: 100%; }
.org-box textarea, form.org-add textarea { width: 100%; font: .85rem/1.4 ui-monospace, monospace; }
button.reject { border: 1px solid var(--rule); background: transparent; color: var(--tally); border-radius: 4px; width: 2rem; height: 2rem; font-size: 1rem; line-height: 1; cursor: pointer; }
button.reject:hover, button.reject:focus-visible { background: var(--tally); color: #fff; border-color: var(--tally); }

/* ---- restart / shut down ---- */
.power-card { margin-top: 2rem; max-width: 48rem; }
.power-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.power-page { max-width: 40rem; margin: 3rem 0; }
.power-page pre.cmd { background: var(--console); border: 1px solid var(--rule); border-radius: 6px; padding: .75rem 1rem; overflow-x: auto; }
@media (max-width: 1100px) {
  .source-row { grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr); }
  .source-row .url, .source-row .hdr { grid-column: 2 / -1; }
}
