@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url('/visualizer/visualizer_poppins_regular.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url('/visualizer/visualizer_poppins_semibold.woff2') format('woff2'); }
:root {
  color-scheme: dark;
  --bg: #000; --panel: #0b090f; --ink: #f5f3f8; --muted: #a19ba9;
  --line: #ffffff14; --accent: #a855f7; --accent-soft: #c4a0fa;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 85% 0, #24103566, transparent 42%), var(--bg); color: var(--ink); font: 13px/1.6 Poppins, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
main { max-width: 1600px; margin: auto; padding: 0 48px 40px; }
button { font: inherit; }
button { cursor: pointer; background: #ffffff04; color: var(--ink); border: 1px solid #ffffff20; border-radius: 8px; padding: 8px 14px; font-size: 11px; transition: background-color .15s, border-color .15s; }
button:hover { background: #ffffff0d; border-color: #ffffff40; }
button.active { background: #a855f714; border-color: #a855f770; color: #e1caff; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
header { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; font-size: 21px; letter-spacing: -.7px; }
.header-label { color: var(--muted); font-size: 12px; border-left: 1px solid #ffffff26; padding-left: 28px; }
.account-nav { color: var(--accent-soft); font-size: 11px; text-decoration: none; }
.brand img { display: block; object-fit: contain; }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; color: var(--muted); font-size: 10px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.live { color: #68deb1; }
.timeline { margin-top: 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(120deg, #160d2066, #09080b); }
.timeline-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
h1, h3 { font-size: 12px; font-weight: 600; margin: 0; }
.coverage, .note { color: var(--muted); font-size: 10px; }
.slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #4d3a63 transparent; min-height: 76px; }
.slot-card { min-width: 0; height: 76px; text-align: left; padding: 10px 12px; background: #ffffff03; overflow: hidden; }
.slot-card.active { background: linear-gradient(130deg, #9c4af726, #a855f709); border-color: #a855f7a0; box-shadow: inset 0 2px #a855f7; }
.slot-card.missing { border-style: dashed; color: var(--muted); }
.slot-card strong { display: block; font: 10px ui-monospace, monospace; color: #bbb2c8; }
.slot-card b { display: block; font: 600 17px/1.3 Poppins, sans-serif; font-variant-numeric: tabular-nums; margin-top: 7px; color: var(--ink); }
.mini-mix { display: flex; height: 4px; margin-top: 8px; gap: 1px; overflow: hidden; border-radius: 2px; background: var(--line); }
.mini-mix i { display: block; min-width: 1px; }
.slot-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 104px; }
.slot-identity { flex-shrink: 0; }
.slot-controls { display:flex; align-items:center; gap:20px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-soft); font-size: 9px; letter-spacing: 1.4px; }
h2 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -1.1px; line-height: 1.3; }
.slot-metrics { display: flex; gap: 28px; }
.slot-metrics > div { padding-left: 28px; border-left: 1px solid var(--line); min-width: 130px; }
.slot-metrics span, .slot-metrics small { display: block; color: var(--muted); font-size: 9px; }
.slot-metrics small { font-size: 8px; min-height: 13px; }
.slot-size strong { display: block; color: #f1e5ff; font-size: 34px; font-weight: 600; line-height: 1.55; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.metric strong { display: block; font-size: 24px; font-weight: 600; line-height: 2.2; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.coverage { margin: 12px 0 20px; min-height: 16px; }
.composition-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch; }
.stage { position: relative; min-height: 430px; border: 1px solid #a855f72b; border-radius: 16px; overflow: hidden; background: var(--panel); box-shadow: 0 0 70px #7c3aed06; }
.map-heading { min-height: 51px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; }
.map-heading > span { display: flex; align-items: center; gap: 8px; }
.section-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px #a855f755; }
.map-heading small { color: var(--muted); font-size: 9px; font-weight: 400; }
.slot-map { padding: 12px; min-width: 0; }
.account-map { display: block; width: 100%; height: clamp(360px, calc(100vh - 480px), 520px); cursor: crosshair; border-radius: 4px; }
.zero-label { display: block; color: var(--muted); font-size: 8px; margin: 10px 0 4px; }
.zero-markers { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #4d3a63 transparent; }
.zero-markers canvas { display: block; height: 24px; max-width: none; cursor: crosshair; }
.empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #0b090ff5; padding: 24px; text-align: center; }
.empty h3 { font-size: 20px; font-weight: 600; }
.empty p { color: var(--muted); font-size: 12px; max-width: 330px; }
[hidden] { display: none !important; }
.composition { position: relative; min-width: 0; background: #0b090fcc; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.composition section { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 20px 14px; }
.composition h3 { margin: 0 0 16px; font-size: 11px; }
.note { margin: 16px 0 0; line-height: 1.8; font-size: 9px; }
.mix { display: flex; height: 5px; flex-shrink: 0; gap: 2px; border-radius: 3px; overflow: hidden; background: var(--line); }
.mix span { min-width: 1px; }
.program-table-scroll { min-height: 0; overflow: auto; margin-top: 14px; scrollbar-width: thin; scrollbar-color: #4d3a63 transparent; }
.program-table { width: 100%; border-spacing: 0; font-size: 10px; }
.program-table th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-size: 8px; font-weight: 400; }
.program-table th, .program-table td { padding: 9px 0 9px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.program-table th:first-child, .program-table td:first-child { padding-left: 0; text-align: left; white-space: normal; }
.program-row td:not(:first-child) { font: 10px/1.6 ui-monospace, monospace; }
.program-name { display: flex; align-items: center; gap: 6px; }
.program-row i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.program-row span { overflow-wrap: anywhere; }
.program-row b { font-weight: 400; }
.program-percent { color: var(--muted); }
.account-tooltip { position: fixed; z-index: 8; pointer-events: none; max-width: min(360px, 95%); border: 1px solid #a855f755; border-radius: 10px; background: #0b090ff5; padding: 14px; color: var(--ink); font: 11px/1.7 ui-monospace, monospace; white-space: pre-line; overflow-wrap: anywhere; box-shadow: 0 12px 40px #0009; }
@media (max-width: 1100px) {
  main { padding-inline: 28px; }
  .header-label { display: none; }
  .slot-metrics { gap: 16px; }
  .slot-metrics > div { min-width: 100px; padding-left: 16px; }
  h2 { font-size: 26px; }
  .slot-size strong { font-size: 30px; }
  .metric strong { font-size: 21px; line-height: 2.2; }
  .composition-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
}
.throughput { display:flex; gap:28px; flex-wrap:wrap; padding:0 0 14px; color:var(--muted); font-size:11px; }
.throughput span { display:flex; align-items:baseline; gap:8px; }
.throughput strong { color:var(--ink); font-size:16px; font-variant-numeric:tabular-nums; }
.throughput small { font-size:9px; }
@media (max-width: 760px) {
  .visualizer-app .throughput { gap:10px 20px; padding-bottom:10px; font-size:9px; }
  .visualizer-app .throughput span { gap:5px; }
  .visualizer-app .throughput strong { font-size:13px; }
  main { padding: 0 16px 24px; }
  header { padding: 12px 0; gap: 12px; }
  .brand { font-size: 20px; }
  .status { margin-left: auto; margin-right: 0; font-size: 9px; }
  .timeline { padding: 16px 12px 12px; border-radius: 12px; }
  .timeline-heading { gap: 8px; }
  .timeline-heading button { font-size: 9px; padding: 7px 9px; white-space: nowrap; }
  .slots { display: flex; }
  .slot-card { flex: 0 0 112px; }
  .slot-heading { display: block; }
  .slot-metrics { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-top: 22px; }
  .slot-metrics > div { min-width: 0; padding-left: 12px; }
  .slot-metrics > div:first-child { border-left: 0; padding-left: 0; }
  .slot-size strong { font-size: 26px; line-height: 1.9; white-space: nowrap; }
  .metric strong { font-size: 20px; line-height: 2.5; white-space: nowrap; }
  .slot-metrics span { font-size: 8px; }
  .slot-metrics small { font-size: 7px; }
  .coverage { font-size: 9px; }
  .composition-layout { grid-template-columns: minmax(0, 1fr); }
  .map-heading { padding: 14px 12px; }
  .map-heading small { font-size: 8px; }
  .slot-map { padding: 10px; }
  .account-map { height: 440px; }
  .composition section { position: static; max-height: 440px; }
}
@media (max-width: 600px) { header { flex-wrap: wrap; } .header-label { display: none; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
.stream-access { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 0; color:#b7b0c6; font-size:12px; }
.stream-access[hidden] { display:none; }
.stream-access input { min-width:220px; padding:10px 12px; border:1px solid #473653; border-radius:8px; background:#110c18; color:#fff; font:inherit; }
.stream-access span { font-size:11px; }
.mobile-follow { display: block; }
.view-switch { display:flex; align-items:center; gap:8px; margin:0 0 12px; }
.view-switch button { padding:7px 13px; font-size:11px; }
.view-switch small { margin-left:auto; color:var(--muted); font-size:10px; }
.overview-panel { border:1px solid var(--line); border-radius:14px; background:var(--panel); padding:12px; }
#overviewCanvas { display:block; width:100%; height:clamp(360px,60vh,650px); touch-action:pan-y; }
.overview-notice { font-size:10px; color:var(--muted); min-height:16px; margin:10px 0; }
.overview-legend { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:10px; color:var(--muted); }
.overview-legend span { display:flex; gap:6px; align-items:center; }
.overview-legend i { width:8px; height:8px; border-radius:2px; }
.overview-active .composition-layout, .overview-active .timeline { display:none; }
.overview-active .mobile-follow { display:block; }
.overview-active .metric { display:none; }
@media (max-width:760px) {
  .view-switch { margin-bottom:10px; }
  .view-switch button { font-size:10px; }
  .overview-panel { padding:6px; }
  #overviewCanvas { height:max(230px,calc(100dvh - 285px)); }
  .overview-legend { font-size:9px; gap:6px 12px; }
}
/* The phone view concentrates on the current slot and its heatmap. Navigation
   and connection access stay available; detail panels remain desktop-only. */
@media (max-width: 760px) {
  .visualizer-app { padding: 0 12px 12px; }
  .visualizer-app header { min-height: 58px; gap: 10px; flex-wrap: nowrap; }
  .visualizer-app .brand { font-size: 16px; gap: 6px; }
  .visualizer-app .brand img { width: 26px; height: 26px; }
  .visualizer-app .account-nav { font-size: 9px; }
  .visualizer-app .status { font-size: 8px; gap: 4px; }
  .visualizer-app .slot-heading { display: flex; min-height: 82px; gap: 8px; }
  .visualizer-app .slot-controls { width:100%; justify-content:space-between; gap:8px; }
  .visualizer-app h2 { font-size: clamp(20px, 6vw, 28px); font-variant-numeric: tabular-nums; }
  .visualizer-app .eyebrow { margin-bottom: 4px; }
  .visualizer-app .mobile-follow { display: block; }
  .visualizer-app .slot-metrics, .visualizer-app .composition,
  .visualizer-app .timeline, .visualizer-app .map-heading { display: none; }
  .visualizer-app .stage { min-height: 0; border-radius: 10px; }
  .visualizer-app .slot-map { padding: 6px; }
  .visualizer-app .account-map { height: max(220px, calc(100vh - 250px)); height: max(220px, calc(100dvh - 250px)); }
  .visualizer-app .zero-label { font-size: 7px; margin-top: 6px; }
  .visualizer-app .stream-access { gap: 8px; padding: 8px 0; }
  .visualizer-app .stream-access input { min-width: 0; flex: 1; width: 150px; }
  .visualizer-app .stream-access span { width: 100%; font-size: 10px; }
}
