:root {
  color-scheme: dark;
  --bg: #08101a;
  --panel: #101b2b;
  --panel2: #162338;
  --text: #f4f8ff;
  --muted: #a9b8cc;
  --line: rgba(255, 255, 255, .14);
  --accent: #ff8a00;
  --accent2: #ffd000;
  --good: #38d996;
  --bad: #ff5c7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 138, 0, .08), transparent 360px),
    linear-gradient(135deg, rgba(0, 117, 190, .08), transparent 520px),
    var(--bg);
  color: var(--text);
}

body.home-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.wrap {
  width: min(1040px, calc(100% - 32px));
  display: grid;
  gap: 18px;
  margin: 0 auto;
  padding: 22px 0;
}

.home-page .wrap {
  padding: 0;
}

.coverage-page .wrap {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  display: block;
}

.coverage-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: grid;
  gap: 18px;
}

body.coverage-page {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(255, 138, 0, .08), transparent 360px), linear-gradient(135deg, rgba(0, 117, 190, .08), transparent 520px), var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.coverage-panel {
  padding: 0;
  overflow: visible;
}

.coverage-panel .coverage-map {
  height: 70vh;
  width: 100%;
  border-radius: 10px 10px 0 0;
}

.coverage-panel .coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  background: var(--panel2);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.coverage-map-shell {
  display: grid;
  gap: 0;
}

.coverage-map {
  height: 70vh;
  width: 100%;
  border-radius: 10px 10px 0 0;
}

.leaflet-container {
  width: 100%;
  height: 100%;
}

.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  background: var(--panel2);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot-covered {
  background: #ff8a00;
}

.dot-uncovered {
  background: #7d8b9e;
}

.dot-node {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, .5);
}

.panel,
.card,
.summary,
.install-box,
.notice {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)), var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 2px 0;
  padding-top: 15px;
}

body.frame-page .topbar {
  height: 48px;
  padding: 0 14px;
  padding-top: 15px;
}

.brand {
  font-size: 24px;
  font-weight: 900;
}

.brand-link {
  color: var(--text);
  text-decoration: none;
}

.brand-link:hover {
  color: var(--text);
}

.brand span,
.hub {
  color: var(--accent);
}

nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

nav form {
  padding: 0;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.nav-systems {
  padding-bottom: 2px;
}

.nav-systems a {
  color: var(--text);
  font-size: 15px;
}

.nav-management a,
.nav-management button {
  font-size: 13px;
}

nav a,
.button,
button {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.topbar nav a,
.topbar nav button {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 7px 8px;
  font-size: 14px;
}

.topbar nav a:hover,
.topbar nav button:hover {
  color: var(--text);
  border-color: transparent;
  box-shadow: none;
}

nav a:hover,
.button:hover,
button:hover {
  border-color: rgba(255, 138, 0, .75);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, .12);
}

.primary,
.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #101010;
  border: none;
}

.secondary {
  background: rgba(255, 255, 255, .08);
}

.button.small {
  padding: 5px 10px;
  font-size: 13px;
}

.button.warn {
  background: rgba(255, 193, 7, .15);
  border-color: rgba(255, 193, 7, .4);
  color: #ffc107;
}

.button.warn:hover {
  border-color: rgba(255, 193, 7, .7);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, .15);
}

.button.danger {
  background: rgba(255, 92, 122, .15);
  border-color: rgba(255, 92, 122, .4);
  color: #ff5c7a;
}

.button.danger:hover {
  border-color: rgba(255, 92, 122, .7);
  box-shadow: 0 0 0 3px rgba(255, 92, 122, .15);
}

.health-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.hero {
  padding: 26px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.compact-hero {
  padding: 22px 24px;
}

.brandmark {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .35));
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.sub,
.desc,
.muted,
.section-head p,
.summary dd,
.notice p,
label small {
  color: var(--muted);
  line-height: 1.5;
}

.auth {
  padding: 26px;
  display: grid;
  justify-items: center;
}

.home-toplinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  min-height: 32px;
}

.home-toplinks a,
.home-toplinks button {
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 4px 0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.home-toplinks a:hover,
.home-toplinks button:hover {
  color: var(--text);
  box-shadow: none;
}

.home-toplinks form {
  margin: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.account-card {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.account-card:hover {
  border-color: rgba(255, 138, 0, .7);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, .12);
}

.account-card strong {
  font-size: 17px;
}

.account-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.features,
.choice-grid,
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.features .card {
  min-height: 188px;
  display: grid;
  align-content: space-between;
}

.dashboard-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-button {
  min-height: 128px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #101010;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
  text-decoration: none;
  font-size: 26px;
  font-weight: 900;
}

.dashboard-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .5), 0 0 0 4px rgba(255, 138, 0, .16);
}

.card {
  padding: 24px;
}

.links,
.service-list,
.stack,
.readiness ul {
  display: grid;
  gap: 12px;
}

.system-strip {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.system-strip h2 {
  margin-bottom: 4px;
}

.system-strip p {
  margin-bottom: 0;
}

.system-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.system-links a,
footer a,
.host-tagline a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.host-tagline {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.danger-zone {
  border-color: rgba(255, 92, 122, .28);
}

.subtle-danger {
  border-color: rgba(255, 92, 122, .18);
  box-shadow: none;
}

.subtle-danger summary {
  cursor: pointer;
  padding: 16px;
  color: var(--muted);
  font-weight: 800;
}

.map-placeholder {
  min-height: 220px;
  border: 1px dashed rgba(255, 255, 255, .24);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(rgba(255, 255, 255, .04), rgba(255, 255, 255, .02)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(255,255,255,.03) 16px 17px);
}

footer {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 10px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #101010;
  border: none;
}

form {
  padding: 18px;
}

.account-panel {
  padding: 18px;
}

.account-panel h1 {
  margin-bottom: 4px;
}

.account-panel > .sub {
  margin-bottom: 12px;
}

.account-panel form {
  padding: 0;
}

.account-panel .stack {
  gap: 10px;
}

.account-panel h2 {
  margin: 8px 0 4px;
  font-size: 22px;
}

.account-panel h3 {
  margin: 4px 0 2px;
}

.account-panel .desc {
  margin-bottom: 6px;
}

.account-panel .grid {
  gap: 12px;
}

.account-panel input,
.account-panel select,
.account-panel textarea {
  padding: 10px 12px;
  margin-top: 6px;
}

.account-panel .button-row {
  margin-top: 2px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-head {
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: block;
  font-weight: 800;
}

label small {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  margin-top: 8px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 138, 0, .75);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, .14);
}

.switch-card,
.check-row,
.soft-panel,
.stats-grid div {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.switch-card,
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
}

.switch-card input,
.check-row input {
  width: auto;
  margin: 0;
}

.switch-card strong,
.switch-card small {
  display: block;
}

.summary {
  padding: 22px;
  position: sticky;
  top: 18px;
}

.summary dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.summary dl div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.summary dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 800;
}

.notice {
  padding: 16px;
  background: rgba(255, 138, 0, .12);
  border-color: rgba(255, 138, 0, .35);
  box-shadow: none;
  margin-bottom: 18px;
}

.install-box {
  margin-bottom: 18px;
}

.command-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

pre,
code {
  font-family: Consolas, Monaco, monospace;
}

pre {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  background: rgba(0, 0, 0, .2);
}

.actions,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.all-clear-banner {
  background: linear-gradient(90deg, rgba(56, 217, 150, .15), transparent);
  border: 1px solid rgba(56, 217, 150, .3);
  border-radius: 12px;
  padding: 14px 20px;
  color: #38d996;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}

.stats-grid div,
.soft-panel {
  padding: 16px;
}

.stats-grid strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.stats-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stats-grid .stat-warning {
  background: rgba(255, 138, 0, .1);
  border: 1px solid rgba(255, 138, 0, .3);
  border-radius: 12px;
}

.stats-grid .stat-warning strong {
  color: #ff8a00;
}

.badge-warning,
.badge-good {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-warning {
  background: rgba(255, 138, 0, .2);
  color: #ff8a00;
  border: 1px solid rgba(255, 138, 0, .4);
}

.badge-good {
  background: rgba(56, 217, 150, .15);
  color: #38d996;
  border: 1px solid rgba(56, 217, 150, .3);
}

.auth-panel {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 26px;
}

.auth-panel h1 {
  font-size: clamp(28px, 3vw, 34px);
}

.auth-helper {
  margin: 2px 18px 18px;
  color: var(--muted);
}

.auth-helper a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.api-status {
  margin: 14px 0 0;
  min-height: 22px;
  color: var(--muted);
}

.api-status.good,
.good {
  color: var(--good);
}

.api-status.bad,
.bad {
  color: var(--bad);
}

.selectedBox {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  border-radius: 8px;
  padding: 10px;
  min-height: 58px;
}

.selectedBox #selectAllStations {
  margin-top: 8px;
}

.selectedHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 13px;
}

.station-picker,
.dsc-map-shell,
.instruction-grid,
.bom-grid,
.channel-box,
.channel-list {
  display: grid;
  gap: 12px;
}

.station-picker,
.alert-map-shell,
.dsc-map-shell {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr);
  align-items: stretch;
}

.dsc-map,
.pager-map {
  min-height: 220px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 138, 0, .14), transparent 45%),
    linear-gradient(45deg, rgba(20, 104, 128, .26), rgba(15, 32, 54, .9)),
    repeating-linear-gradient(0deg, transparent 0 36px, rgba(255,255,255,.04) 36px 37px),
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(255,255,255,.04) 36px 37px);
}

.alert-map-shell {
  display: grid;
  gap: 12px;
}

.pager-map {
  min-height: 300px;
}

.pager-map.leaflet-container,
.dsc-map.leaflet-container {
  background: #102036;
  color: #102036;
}

.pager-map.leaflet-container::before,
.dsc-map.leaflet-container::before {
  content: none;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.leaflet-tooltip {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.pager-map::before,
.dsc-map::before {
  content: "";
  position: absolute;
  inset: 10% 18% 13% 19%;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 46% 38% 42% 36%;
  transform: rotate(-10deg);
  pointer-events: none;
}

.station-dot,
.dsc-area-marker {
  position: absolute;
  translate: -50% -50%;
  width: auto;
  max-width: 130px;
  padding: 5px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 0, .65);
  background: rgba(255, 138, 0, .88);
  color: #111;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .38);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-dot.is-uncovered {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(125, 139, 158, .54);
  color: rgba(255, 255, 255, .72);
}

.station-dot.is-selected {
  outline: 3px solid rgba(255, 208, 0, .34);
  z-index: 5;
}

.coveragePrompt {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.coveragePrompt a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.muted-chip {
  opacity: .62;
}

.map-ring {
  width: 160px;
  height: 160px;
  position: absolute;
  left: calc(50% - 80px);
  top: calc(50% - 80px);
  border: 2px solid rgba(255, 208, 0, .9);
  border-radius: 999px;
  background: rgba(255, 138, 0, .12);
}

.map-pin {
  width: 14px;
  height: 14px;
  position: absolute;
  left: calc(50% - 7px);
  top: calc(50% - 7px);
  border-radius: 999px;
  background: var(--accent2);
  box-shadow: 0 0 0 6px rgba(255, 208, 0, .18);
}

.dsc-area-list {
  display: grid;
  gap: 8px;
}

.emergencyBox {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
}

.emergency-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px 10px;
}

.emergency-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 0;
  font-weight: 800;
}

.emergency-option input {
  width: auto;
  margin: 0;
}

.emergency-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-code-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 208, 0, .06);
  margin-bottom: 16px;
}

.access-code-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.access-code-display code {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  background: rgba(255, 208, 0, .1);
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 208, 0, .2);
}

.access-code-card p.desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.access-code-card p.desc code {
  font-size: 13px;
  background: rgba(255, 255, 255, .06);
  padding: 2px 6px;
  border-radius: 3px;
}

.radio-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.radio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.radio-header div {
  display: grid;
  gap: 2px;
}

.radio-header strong {
  font-size: 16px;
}

.radio-select-all {
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.select-all-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.select-all-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent2);
  margin: 0;
}

.system-group {
  border-bottom: 1px solid var(--line);
}

.system-group:last-child {
  border-bottom: none;
}

.system-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  cursor: pointer;
}

.system-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.system-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}

.system-count {
  color: var(--muted);
  font-size: 11px;
}

.channel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 16px 12px;
}

.ch-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
  background: transparent;
  color: var(--text);
}

.ch-pill:hover {
  border-color: rgba(255, 138, 0, .5);
}

.ch-pill.is-checked {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

.ch-pill.is-private {
  border-color: rgba(255, 92, 122, .3);
}

.ch-pill.is-private.is-checked {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

.ch-pill .pill-station {
  font-size: 10px;
  opacity: .6;
  font-weight: 400;
}

.ch-pill.is-checked .pill-station {
  opacity: .8;
}

.private-tag {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}

.radio-row:hover {
  background: rgba(255, 255, 255, .05);
}

.radio-row input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.radio-row span {
  font-size: 14px;
}

.radio-row-all {
  font-weight: 700;
  border-radius: 6px 6px 0 0;
}

.radio-row-all input {
  accent-color: var(--accent2);
}

.radio-access-card div {
  display: grid;
  gap: 2px;
}

.radio-access-card strong {
  font-size: 18px;
}

.radio-access-card small {
  color: var(--muted);
  line-height: 1.35;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill {
  border: 1px solid rgba(255, 208, 0, .28);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--accent2);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.radio-picker {
  display: grid;
  gap: 8px;
}

.radio-picker details,
.radio-system {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.radio-picker summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 900;
}

.radio-system summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.radio-system summary small {
  color: var(--muted);
  font-size: 12px;
}

.radio-system-head {
  padding: 0 12px 8px;
}

.radio-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 4px 10px;
  padding: 0 12px 12px;
}

.radio-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--text);
}

.radio-choice input {
  width: auto;
  margin: 0;
}

.radio-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-choice small {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.radio-choice.is-locked {
  opacity: .52;
}

.dsc-area-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .6fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.dsc-area-row.is-active {
  border-color: rgba(255, 138, 0, .72);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, .1);
}

.dsc-area-row button {
  align-self: end;
}

.radiusValue {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dsc-area-marker {
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 208, 0, .8);
  background: rgba(255, 138, 0, .14);
  color: var(--text);
  border-radius: 999px;
  white-space: normal;
  text-align: center;
  min-width: 42px;
  min-height: 42px;
}

.dsc-area-marker.is-active {
  border-color: var(--accent2);
  background: rgba(255, 138, 0, .22);
}

.instruction-grid,
.bom-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bom-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bom-item:hover {
  border-color: rgba(255, 138, 0, .75);
}

.bom-item span {
  color: var(--muted);
  line-height: 1.45;
}

.host-map {
  min-height: 280px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: crosshair;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  background:
    radial-gradient(circle at 51% 48%, rgba(255, 208, 0, .18), transparent 0 6px, transparent 7px),
    linear-gradient(125deg, rgba(15, 79, 105, .82), rgba(8, 16, 26, .65)),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(255,255,255,.04) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.04) 34px 35px);
}

.host-map::before {
  content: "";
  position: absolute;
  inset: 10% 18% 14% 20%;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 46% 38% 42% 36%;
  transform: rotate(-10deg);
}

.host-map-pin {
  width: 16px;
  height: 16px;
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border-radius: 999px;
  background: var(--accent2);
  box-shadow: 0 0 0 7px rgba(255, 208, 0, .2);
  opacity: 0;
}

.host-map.has-pin .host-map-pin {
  opacity: 1;
}

.admin-modal {
  width: min(860px, calc(100vw - 32px));
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.admin-modal::backdrop {
  background: rgba(0, 0, 0, .62);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.is-archived {
  opacity: .52;
}

.dsc-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dsc-status {
  padding: 18px;
  box-shadow: none;
}

.dsc-status.distress {
  border-color: rgba(255, 92, 122, .62);
}

.dsc-status.safety {
  border-color: rgba(255, 208, 0, .55);
}

.dsc-status.routine {
  border-color: rgba(56, 217, 150, .45);
}

.dsc-watch-panel {
  padding: 0;
  overflow: hidden;
}

.embedded-tool {
  width: 100%;
  height: min(760px, calc(100vh - 180px));
  min-height: 520px;
  display: block;
  border: 0;
  background: #000;
}

.good {
  color: var(--good);
  font-weight: 900;
}

.bad {
  color: var(--bad);
  font-weight: 900;
}

.readiness {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.readiness ul {
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.readiness li {
  color: var(--muted);
}

.readiness li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
}

.readiness li.is-ready {
  color: var(--text);
  font-weight: 800;
}

.readiness li.is-ready::before {
  background: var(--good);
}

.hero-meter,
.kicker,
.hero-tags,
.step-number {
  display: none;
}

body.frame-page {
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 138, 0, .08), transparent 360px),
    linear-gradient(135deg, rgba(0, 117, 190, .08), transparent 520px),
    var(--bg);
}

.frame-topbar {
  height: 48px;
  padding: 0 14px;
  padding-top: 15px;
  background: var(--panel);
}

.frame-topbar .brand {
  font-size: 20px;
}

.frame-topbar nav a,
.frame-topbar nav button {
  padding: 6px 8px;
  font-size: 13px;
}

.full-iframe {
  width: 100%;
  height: calc(100vh - 58px);
  display: block;
  border: 0;
  background: #000;
}

/* ─── Dark Mode Scrollbar (Webkit) ───────────────────────────────────── */

/* Hide nav buttons on mobile, keep brand only */
@media (max-width: 760px) {
  .topbar nav {
    display: none;
  }
}

/* Home page mobile portrait fixes */
@media (max-width: 600px) {
  body.home-page {
    padding: 16px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
    gap: 14px;
  }

  .home-hero .brandmark {
    margin: 0 auto;
  }

  .home-toplinks {
    justify-content: center;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .features .card {
    min-height: auto;
  }

  .host-tagline {
    font-size: 14px;
    padding: 0 8px;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--panel);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.recent-alerts-details {
  padding: 0;
}

.recent-alerts-summary {
  cursor: pointer;
  padding: 16px;
  font-weight: 800;
  font-size: 18px;
  list-style: none;
}

.recent-alerts-summary::-webkit-details-marker { display: none; }

.recent-alerts-summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
  transition: transform .15s;
}

.recent-alerts-details[open] .recent-alerts-summary::after {
  transform: rotate(180deg);
}

.recent-alerts-details table {
  margin-top: 0;
}

.pushover-note {
  color: var(--bad);
  font-size: 13px;
  margin-top: 4px;
}

.emergency-desc {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(255, 92, 122, .08);
  border: 1px solid rgba(255, 92, 122, .2);
  border-radius: 6px;
}

/* ─── Host Page ──────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

.config-main {
  min-width: 0;
}

.host-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 26px;
}

.host-hero .brandmark {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .35));
}

.host-hero h1 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3.5vw, 36px);
}

.host-hero .sub {
  margin: 0;
}

.help-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #101010;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(255, 138, 0, .3);
  border: none;
  cursor: pointer;
}

.help-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(255, 138, 0, .4);
}

.step-section {
  padding: 20px;
}

.step-section + .step-section {
  border-top: 1px solid var(--line);
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.step-label h2 {
  margin: 0;
  font-size: 20px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #101010;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
}

.host-map {
  height: 260px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin: 10px 0;
  cursor: crosshair;
}

.host-map.has-pin {
  cursor: default;
}

/* Wizard progress indicator */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 500px;
  margin: 0 auto 24px;
  padding: 0 16px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1;
}

.wizard-step:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 8px;
}

.wizard-step.is-complete:not(:last-child)::after {
  background: var(--accent);
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel2);
  border: 2px solid var(--line);
  flex-shrink: 0;
  transition: all .2s;
}

.wizard-step.is-current .step-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.wizard-step.is-complete .step-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.wizard-step.is-complete .step-dot::after {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  font-size: 14px;
  font-weight: 900;
}

.step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}

.wizard-step.is-current .step-label {
  color: var(--text);
}

.wizard-step.is-complete .step-label {
  color: var(--accent);
}

/* Wizard phases */
.wizard-phase {
  display: none;
}

.wizard-phase.is-active {
  display: block;
}

/* Wizard navigation */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.wizard-nav button,
.wizard-nav a {
  min-height: 44px;
  padding: 0 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.channel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Collapsible setup sections */
.setup-detail {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
  transition: border-color .2s;
}

.setup-detail[open] {
  border-color: rgba(255, 138, 0, .35);
}

.setup-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  transition: background .15s;
}

.setup-summary::-webkit-details-marker { display: none; }

.setup-summary::before {
  content: "▶";
  display: inline-block;
  width: 20px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  transition: transform .2s, color .2s;
  flex-shrink: 0;
}

.setup-detail[open] .setup-summary::before {
  transform: rotate(90deg);
  color: var(--accent);
}

.setup-summary:hover {
  background: rgba(255, 255, 255, .03);
}

.setup-summary .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

.setup-detail-body {
  padding: 0 20px 20px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
}

.channel-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.channel-grid label:hover {
  border-color: rgba(255, 138, 0, .5);
}

.channel-grid input {
  width: auto;
  margin: 0;
}

.install-box pre {
  font-size: 13px;
  line-height: 1.6;
}

.hardware-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.hardware-list li {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.hardware-list li strong {
  flex-shrink: 0;
  min-width: 120px;
}

.hardware-list li span {
  color: var(--muted);
}

.setup-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  counter-reset: setup;
}

.setup-steps li {
  counter-increment: setup;
  padding: 10px 14px 10px 48px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  position: relative;
}

.setup-steps li::before {
  content: counter(setup);
  position: absolute;
  left: 14px;
  top: 10px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #101010;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Legal pages */
.legal-page .wrap { max-width: 800px; }
.legal-panel { padding: 28px 32px; }
.legal-panel h2 { margin-top: 28px; font-size: 18px; }
.legal-panel h2:first-child { margin-top: 0; }
.legal-panel p { line-height: 1.6; color: var(--muted); }
.legal-panel ul { color: var(--muted); line-height: 1.6; }
.legal-panel a { color: var(--accent); }
.legal-panel table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.legal-panel th, .legal-panel td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; font-size: 13px; }
.legal-panel th { background: var(--panel2); color: var(--muted); font-weight: 800; font-size: 11px; text-transform: uppercase; }

/* Frame page disclaimer */
.iframe-disclaimer { background: rgba(255,138,0,.08); border: 1px solid rgba(255,138,0,.25); border-radius: 8px; padding: 10px 16px; margin: 12px 16px; font-size: 12px; line-height: 1.5; }
.iframe-disclaimer strong { color: var(--accent); }
.iframe-disclaimer a { color: var(--accent); }
