/* slotwatch dashboard — Lumi dark theme */

:root {
  --bg: #0A0B0D;
  --card: #111214;
  --card-2: #16181C;
  --card-3: #1A1C20;
  --border: #1F2128;
  --border-soft: #16181C;
  --text: #E5E7EB;
  --text-dim: #9CA3AF;
  --text-muted: #858B98;
  --primary: #8B5CF6;
  --primary-dim: #6D28D9;
  --primary-glow: rgba(139, 92, 246, 0.25);
  --primary-glow-strong: rgba(139, 92, 246, 0.45);
  --success: #10B981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --warn: #F59E0B;
  --warn-glow: rgba(245, 158, 11, 0.45);
  --warn-bg-soft: rgba(245, 158, 11, 0.08);
  --warn-bg-strong: rgba(245, 158, 11, 0.18);
  --danger: #EF4444;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 600px at 80% -200px, rgba(139, 92, 246, 0.08), transparent 60%),
    radial-gradient(900px 500px at 20% 800px, rgba(16, 185, 129, 0.04), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Themed scrollbars (Lumi dark) ---------------------------------- */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}
/* WebKit / Blink (Chromium, Safari) */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--bg);
}
*::-webkit-scrollbar-thumb {
  background: var(--card-3);
  border: 2px solid var(--bg);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dim);
}
*::-webkit-scrollbar-corner {
  background: var(--bg);
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 28px 64px;
}

/* ---- header ---- */
header.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
header.top h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
header.top h1 .accent { color: var(--primary); }
header.top .subtitle { font-size: 13px; color: var(--text-dim); font-weight: 400; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-dim);
}
.status-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted);
}
.status-pill.ok .dot { background: var(--success); box-shadow: 0 0 8px var(--success-glow); }
.status-pill.warn .dot { background: var(--warn); }
.status-pill.err .dot { background: var(--danger); }

/* ---- HERO ---- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.hero-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary-glow), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.hero-card .label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.leader-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 18px;
  align-items: center;
}
.leader-ring { width: 108px; height: 108px; }
.leader-info { min-width: 0; }

.leader-info .pubkey {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  word-break: break-all;
  line-height: 1.2;
}
.leader-info .operator-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
}
.leader-info .operator {
  color: var(--primary);
  font-weight: 600;
}
.leader-info .flag-wrap { display: inline-flex; }
.leader-info .country-text {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
}

.window-ticks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 12px;
}
.wtick {
  height: 8px;
  background: var(--border);
  border-radius: 3px;
  transition: background 120ms ease, box-shadow 200ms ease;
}
.wtick.past { background: var(--primary-dim); opacity: 0.55; }
.wtick.active {
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-glow), 0 0 12px var(--primary-glow);
}
@media (prefers-reduced-motion: no-preference) {
  .wtick.active {
    animation: pulse 1.2s ease-in-out infinite;
  }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--primary-glow), 0 0 8px var(--primary-glow); }
  50% { box-shadow: 0 0 0 2px var(--primary), 0 0 18px var(--primary); }
}

.leader-info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--mono);
}
.leader-info .meta strong { color: var(--text); font-weight: 600; }

.epoch-card { display: flex; flex-direction: column; }
.epoch-ring-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 108px;
}
.epoch-ring-wrap .ring-svg { width: 118px; height: 118px; }
.epoch-meta {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 11px;
}
.epoch-meta .dim { color: var(--text-muted); }
.epoch-meta strong { color: var(--text); font-weight: 600; }

/* ---- SVG rings ---- */
.ring-svg { display: block; }
.ring-track { fill: none; stroke: var(--border); stroke-width: 6; }
.ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 80ms linear;
  filter: drop-shadow(0 0 4px var(--primary-glow));
}
.ring-fill.epoch-fill {
  stroke: var(--success);
  transition: stroke-dashoffset 400ms ease-out;
  filter: drop-shadow(0 0 4px var(--success-glow));
}
.ring-text { fill: var(--text); font-family: var(--mono); font-size: 18px; font-weight: 600; }
.ring-text-big { fill: var(--text); font-family: var(--mono); font-size: 14px; font-weight: 700; }
.ring-sub {
  fill: var(--text-muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---- network stats strip ---- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(139, 92, 246, 0.06) 100%);
  pointer-events: none;
}
.stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-num.danger { color: var(--danger); }
.stat-num .stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--mono);
}
.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---- epoch viewer (3rd tab) -----------------------------------------
   Linear-style list of every 4-slot leader window in an epoch. Chips on
   top to switch epochs (current + observed-historical), pager at right,
   table below. Compact + monospace-heavy. */
.epoch-viewer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.ev-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ev-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}
.ev-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-top: 4px;
}
.ev-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ev-page-btn {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.ev-page-btn:hover:not(:disabled) { border-color: var(--primary); }
.ev-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ev-jump-now {
  border-color: var(--warn);
  color: var(--warn);
}
.ev-page-info {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 4px;
}
.ev-epoch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ev-epoch-chips .empty { color: var(--text-muted); font-size: 12px; }
.ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.ev-chip:hover { color: var(--text); border-color: var(--primary); }
.ev-chip.active {
  color: var(--text);
  background: var(--card-3);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-dim) inset;
}
.ev-chip-tag {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.ev-chip-now {
  color: var(--warn);
  border-color: var(--warn);
}
.ev-table-wrap {
  max-height: 700px;
  overflow-y: auto;
}
.ev-table-wrap table { font-size: 12px; }
.ev-table-wrap td.mono,
.ev-table-wrap th { font-family: var(--mono); }
tr.ev-row-now td {
  background: var(--warn-glow) !important;
  color: var(--text);
}
tr.ev-row-past td { opacity: 0.6; }
.ev-when-past   { color: var(--text-muted); font-family: var(--mono); }
.ev-when-now    { color: var(--warn);       font-family: var(--mono); font-weight: 600; }
.ev-when-future { color: var(--primary);    font-family: var(--mono); }

/* ---- Snipe planner / epoch analytics --------------------------------- */
.ev-analytics {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
/* Home configuration bar */
.ev-home-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
}
.ev-home-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warn);
}
.ev-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--warn);
  border-radius: 4px;
  font-size: 14px;
}
.ev-home-inputs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ev-home-inputs input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--mono);
}
.ev-home-inputs input[type="text"] { width: 130px; }
.ev-home-inputs input[type="number"] { width: 90px; }
.ev-home-stat {
  margin-left: auto;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text);
}
.ev-home-stat strong { color: var(--warn); }

/* Analytics sections */
.ev-section {
  margin-bottom: 14px;
}
.ev-section:last-child { margin-bottom: 0; }
.ev-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 8px;
}
.ev-section-title .ev-hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
  margin-left: 8px;
}

/* Cluster rows ("snipe windows") */
.ev-clusters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ev-cluster-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: 6px;
  padding: 8px 12px;
}
.ev-cluster-row:hover { border-color: var(--primary); border-left-color: var(--warn); }
.ev-cluster-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.ev-cluster-len {
  display: inline-block;
  background: var(--warn-glow);
  color: var(--warn);
  font-weight: 700;
  font-family: var(--mono);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}
.ev-cluster-slot { font-size: 11px; color: var(--text-dim); }
.ev-cluster-jump { margin-left: auto; }
.ev-cluster-leaders {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
}
.ev-cluster-leader {
  background: var(--card-3);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
}

/* Top-N grids */
.ev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.ev-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.ev-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ev-top-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
}
.ev-top-row[data-slot]:hover { border-color: var(--primary); }
.ev-top-row .empty { color: var(--text-muted); }
.ev-top-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ev-top-pct {
  font-weight: 700;
  color: var(--text);
  min-width: 50px;
  text-align: right;
}
.ev-top-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.ev-top-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dim), var(--primary));
}
.ev-streak-len {
  background: var(--warn-glow);
  color: var(--warn);
  font-weight: 700;
  font-family: var(--mono);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
}
.ev-streak-slot { font-size: 11px; }

/* Near-home row highlight inside the windows table */
tr.ev-row-near td {
  background: var(--warn-bg-soft);
  border-top: 1px solid var(--warn-bg-strong);
  border-bottom: 1px solid var(--warn-bg-strong);
}
tr.ev-row-near.ev-row-past td { background: rgba(245, 158, 11, 0.04); }
.ev-near-badge {
  display: inline-block;
  background: var(--warn-glow);
  color: var(--warn);
  font-family: var(--mono);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* ---- Preset location buttons + search bar ---------------------------- */
.ev-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ev-presets-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-right: 4px;
}
.ev-preset-btn {
  background: var(--card);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.ev-preset-btn:hover {
  color: var(--text);
  border-color: var(--primary);
}

.ev-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 14px;
}
.ev-search-icon {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
}
#ev-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  padding: 4px 0;
  font-family: var(--sans);
}
#ev-search:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
#ev-search::placeholder { color: var(--text-muted); }
.ev-search-stat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--primary);
  padding: 0 4px;
}

/* Match row tint — overlays near-home tint with a teal accent so both
   states remain visible (e.g. a row that's near home AND matches the
   filter shows both colors). */
tr.ev-row-match td {
  background: rgba(99, 102, 241, 0.18) !important;
  border-top: 1px solid rgba(99, 102, 241, 0.45);
  border-bottom: 1px solid rgba(99, 102, 241, 0.45);
}
tr.ev-row-match.ev-row-near td {
  background: linear-gradient(90deg,
    rgba(245, 158, 11, 0.10) 0%,
    rgba(99, 102, 241, 0.25) 50%,
    rgba(245, 158, 11, 0.10) 100%) !important;
}

/* ---- tab nav (Live / Analytics) ---------------------------------------
   Top-level switch between the realtime "Live" view (hero + tape + upcoming)
   and the cohort-style "Analytics" view (leader-share fieldset + map + tables).
   Sticky so it stays visible during deep scrolls inside Analytics. */
.tab-nav {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  gap: 4px;
  margin: 0 0 20px 0;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.tab-nav .tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.tab-nav .tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.tab-nav .tab.active {
  color: var(--text);
  background: var(--bg);
  border-color: var(--border);
  box-shadow: inset 0 0 0 1px var(--accent-dim, rgba(120, 200, 255, 0.18));
}
.tab-panel[hidden] { display: none; }
/* Hide the body-level fixed focused-validator panel when the active
   tab isn't Live — otherwise it overlays + intercepts clicks on the
   right edge of the Analytics/Epochs tabs. */
.focused-panel.tab-hidden { display: none !important; }

/* ---- section title ---- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 28px 0 12px;
}
.section-title:first-child { margin-top: 0; }
.section-title h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0;
}
.section-title .hint {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ---- world map + focused panel side-by-side ---- */

/* Map row is now full-width — the side panel was promoted to a body-level
 * fixed aside (see .focused-panel) so the map can take the whole row. */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.map-wrap {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
#map { width: 100%; height: 560px; background: var(--bg); }
.map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 800;
  background: rgba(10, 11, 13, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-item .dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-current { background: var(--warn); box-shadow: 0 0 6px var(--warn-glow); }
.legend-major { background: var(--primary); }
.legend-minor { background: var(--success); }

/* Leaflet overrides */
.leaflet-control-attribution {
  background: rgba(10, 11, 13, 0.7) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--text-dim) !important; }
.leaflet-control-zoom a {
  background: var(--card-2) !important;
  color: var(--text-dim) !important;
  border-bottom: 1px solid var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--card) !important; color: var(--text) !important; }

/* ---- FOCUSED VALIDATOR PANEL (replaces popover) ----
 *
 * Promoted from sticky-inside-main-grid to body-level position: fixed
 * (F3, 2026-06-18). The sticky version disappeared off-screen the moment
 * the user scrolled past the world map, which made Leader Stats and
 * Leader Tape hover targets effectively useless — you'd hover, the panel
 * would update somewhere up the page where you couldn't see it.
 *
 * Fixed positioning + max-height + overflow-y on the desktop variant.
 * Mobile (<900px) falls back to static so the panel collapses below the
 * scroll content instead of obscuring it.
 */
.focused-panel {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: fixed;
  top: 80px;
  right: 16px;
  width: 320px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  z-index: 100;
  min-width: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: transform 180ms ease, opacity 180ms ease;
}
.focused-panel.is-collapsed {
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
}

.focused-collapse {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  appearance: none;
  background: var(--card-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  transition: color 120ms ease, border-color 120ms ease;
}
.focused-collapse:hover {
  color: var(--text);
  border-color: var(--primary-dim);
}

.focused-reveal {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 100;
  appearance: none;
  background: var(--card-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: color 120ms ease, border-color 120ms ease;
}
.focused-reveal:hover {
  color: var(--text);
  border-color: var(--primary-dim);
}
.focused-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(180deg, var(--primary-glow), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

.focused-empty {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  padding: 24px 8px;
  text-align: center;
}

.focused-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.focused-op {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.focused-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.1em;
}
.focused-badge.jito {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--warn);
  color: var(--warn);
}

.focused-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 16px;
}
.focused-flag {
  display: inline-block;
  width: 1.4em;
  height: 1em;
  border-radius: 2px;
  background-size: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.focused-stake {
  background: var(--card-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.focused-stake-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  font-family: var(--mono);
}
.focused-stake-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focused-row {
  margin-bottom: 12px;
}
.focused-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.focused-row-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.focused-mono {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  word-break: break-all;
  user-select: all;
  line-height: 1.4;
}
.focused-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}
.focused-value .asn {
  color: var(--text-muted);
  font-size: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}

.focused-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.focused-links a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--primary);
  background: var(--card-3);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 120ms;
}
.focused-links a:hover {
  border-color: var(--primary-dim);
  background: var(--bg);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---- flag icons + cursor affordance ---- */
.flag, .fi.flag {
  display: inline-block;
  vertical-align: -2px;
  width: 1.25em;
  height: 0.95em;
  margin-right: 4px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  background-size: cover;
}
.hover-target { cursor: help; }
.hover-target:hover .pubkey, .hover-target.tl-card:hover .who { color: var(--primary); }
tr.hover-target { cursor: help; transition: background 120ms ease; }

/* ---- timeline / upcoming windows ---- */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.tl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 14px 12px;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms;
}
.tl-card:hover { border-color: var(--primary-dim); transform: translateY(-1px); background: var(--card-2); }
.tl-card.now { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-glow); }
.tl-card .when { font-family: var(--mono); font-size: 11px; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.tl-card.now .when { color: var(--success); }
.tl-card .slot {
  font-family: var(--mono);
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}
.tl-card .slot-num {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tl-card .slot-range {
  font-size: 10px;
  color: var(--text-muted);
  padding: 1px 5px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.tl-card .who { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top: 8px; word-break: break-all; line-height: 1.35; transition: color 120ms; }
.tl-card .op { font-size: 11px; color: var(--text-dim); margin-top: 6px; display: flex; align-items: center; gap: 6px; }

/* ---- split row (stake + country) ---- */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ---- stake distribution bars ---- */
.stake-bars {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
.bar-row {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1.4fr) minmax(0, 3fr) 70px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: background 120ms;
}
.bar-row:last-child { border-bottom: none; }
.bar-row:hover { background: var(--card-2); }
.bar-rank { font-family: var(--mono); font-size: 11px; color: var(--text-muted); text-align: right; }
.bar-label { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { position: relative; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-dim));
  border-radius: 5px;
  transition: width 600ms ease-out;
}
.bar-value { font-family: var(--mono); font-size: 12px; color: var(--text); font-weight: 500; text-align: right; }

/* ---- country bars ---- */
.country-bars {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
.cb-row {
  display: grid;
  grid-template-columns: 24px minmax(80px, 1fr) minmax(0, 2fr) 50px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cb-row:last-child { border-bottom: none; }
.cb-flag { display: flex; }
.cb-label { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-track { position: relative; height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; }
.cb-fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--success), #047857);
  border-radius: 5px;
  transition: width 600ms ease-out;
}
.cb-share { font-family: var(--mono); font-size: 11px; color: var(--text-dim); text-align: right; }

/* ---- validator table ---- */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono);
  color: var(--text-dim);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--card-2); color: var(--text); }
tbody tr.row-leader td {
  background: var(--warn-bg-soft);
  border-left: 2px solid var(--warn);
}
td.pubkey { color: var(--text); }
td.stake { text-align: right; color: var(--text); font-weight: 500; }
td.location, td.isp { color: var(--text-dim); font-size: 12px; }
td.isp .asn {
  color: var(--text-muted);
  font-size: 10px;
  background: var(--card-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}

.empty {
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
  font-style: italic;
}

footer.foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- comparison page ---- */
.page-tag { font-size: 16px; color: var(--text-dim); font-weight: 500; letter-spacing: 0; }
.nav-links { display: flex; gap: 16px; font-size: 12px; font-family: var(--mono); }
.nav-links a {
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--card);
}
.nav-links a:hover {
  color: var(--primary);
  border-color: var(--primary-dim);
  text-decoration: none;
}

.cmp-explainer {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}
.cmp-explainer code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}

.kind-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--card-2);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.kind-local { color: var(--primary); border-color: var(--primary-dim); }
.kind-rpc { color: var(--success); border-color: rgba(16, 185, 129, 0.4); }
.kind-public { color: var(--text-dim); }
.kind-indexer { color: var(--warn); border-color: rgba(245, 158, 11, 0.35); }
.kind-other { color: var(--text-muted); }

td.num { font-family: var(--mono); text-align: right; color: var(--text); }
.lag-zero { color: var(--success); font-weight: 600; }
.lag-one  { color: var(--warn); }
.lag-many { color: var(--danger); font-weight: 600; }
.status-ok  { color: var(--success); }
.status-fail { color: var(--danger); font-family: var(--mono); font-size: 11px; }
td.src-name { color: var(--text); font-weight: 500; }
td.src-region { color: var(--text-dim); font-family: var(--mono); font-size: 11px; }

.cmp-bars {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
.cmp-bar-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr) 70px;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cmp-bar-row:last-child { border-bottom: none; }
.cmp-bar-label { font-size: 13px; color: var(--text); }
.cmp-bar-track { position: relative; height: 12px; background: var(--border); border-radius: 6px; overflow: hidden; }
.cmp-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-dim));
  border-radius: 6px;
  transition: width 400ms ease-out;
}
.cmp-bar-fill.kind-local { background: linear-gradient(90deg, var(--primary), var(--primary-dim)); }
.cmp-bar-fill.kind-rpc { background: linear-gradient(90deg, var(--success), #047857); }
.cmp-bar-fill.kind-public { background: linear-gradient(90deg, #6B7280, #374151); }
.cmp-bar-fill.kind-indexer { background: linear-gradient(90deg, var(--warn), #B45309); }
.cmp-bar-fill.failed { background: linear-gradient(90deg, var(--danger), #7F1D1D); }
.cmp-bar-value { font-family: var(--mono); font-size: 12px; color: var(--text); text-align: right; font-weight: 500; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  #map { height: 460px; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .split-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .epoch-ring-wrap { min-height: 100px; }
  .epoch-ring-wrap .ring-svg { width: 130px; height: 130px; }
  /* Mobile: revert focused panel to static — collapses below content
   * rather than hovering and obscuring the dashboard. */
  .focused-panel {
    position: static;
    width: auto;
    max-height: none;
    margin: 16px 0;
    transform: none !important;
    opacity: 1 !important;
    box-shadow: none;
  }
  .focused-panel.is-collapsed { display: none; }
  .focused-reveal {
    position: static;
    margin: 12px 0;
  }
}
@media (max-width: 640px) {
  .container { padding: 20px 16px 48px; }
  header.top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .leader-row { grid-template-columns: 100px 1fr; gap: 14px; }
  .leader-ring { width: 100px; height: 100px; }
  .leader-info .pubkey { font-size: 18px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  #map { height: 320px; }
  .bar-row { grid-template-columns: 24px minmax(100px, 1.4fr) minmax(0, 3fr) 70px; gap: 8px; }
  table { font-size: 12px; }
  tbody td, thead th { padding: 8px 10px; }
  /* Collapse the Windows column on the leader-share tables — slot count
   * is the more informative number, the windows count is a derived 4×
   * factor of the same. */
  .ls-table .col-windows { display: none; }
  /* Right-edge fade hint on horizontally-scrolling table wrappers. */
  .leader-share-window .table-wrap {
    position: relative;
    overflow-x: auto;
  }
  .leader-share-window .table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--card));
  }
}

/* ---- leader stats (v0.6) -------------------------------------------- */
.ls-window-chips {
  display: flex;
  gap: 8px;
  margin: 10px 0 18px;
  flex-wrap: wrap;
}
.ls-chip {
  appearance: none;
  background: var(--card-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 80ms ease, color 80ms ease, border-color 80ms ease;
}
.ls-chip:hover { color: var(--text); border-color: var(--primary-dim); }
.ls-chip.active {
  background: var(--primary-dim);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.ls-tape-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
}
.ls-tape-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
/* Three-column grid: past (overflow-clipped right side) | NOW divider
   (fixed center column, intrinsic width) | future (overflow-clipped left
   side). Each tick the cell rows are re-rendered; cells visually shift
   past the static NOW marker. minmax(0, 1fr) lets the flex children
   shrink instead of forcing column growth. */
.ls-tape {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  padding-bottom: 4px;
}
.ls-tape-past,
.ls-tape-future {
  display: flex;
  gap: 6px;
  overflow: hidden;
  align-items: stretch;
  min-width: 0;
}
.ls-tape-past   { justify-content: flex-end;   padding-right: 6px; }
.ls-tape-future { justify-content: flex-start; padding-left:  6px; }
/* Inside the grid, the NOW marker is the middle column. Override the
   legacy flex-child rules so it doesn't try to size itself off siblings. */
.ls-tape > .ls-tape-divider { flex: none; }
.ls-tape-cell {
  flex: 0 0 auto;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  min-width: 110px;
  cursor: default;
}
.ls-tape-cell.now {
  background: var(--warn-glow);
  border-color: var(--warn);
}
.ls-tape-cell.past {
  opacity: 0.7;
  border-style: dashed;
}
.ls-tape-cell:hover {
  border-color: var(--primary);
  background: var(--card-3);
  opacity: 1;
}
.ls-tape-slot {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.ls-tape-who {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.ls-h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dim { color: var(--text-muted); }
@media (max-width: 900px) {
  .ls-grid { grid-template-columns: 1fr; }
}

/* ---- leader-share-window fieldset (F3, 2026-06-18) -----------------
 * Wraps the chip strip + 4 leader-stats tables into one titled section
 * so it's visually clear that the chip selection drives all 4 tables.
 */
.leader-share-window {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px 20px;
  margin: 28px 0 24px;
  position: relative;
  overflow: hidden;
}
.leader-share-window::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary-glow), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.lsw-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.lsw-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0;
}
.lsw-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-top: 4px;
}

/* Sticky chip strip — pinned to the top of the fieldset while the
 * operator scrolls through the 4 tables, so the active window is always
 * visible. Sticky inside .leader-share-window. */
.ls-chips-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--card);
  padding: 10px 0;
  margin: 8px 0 14px;
  border-bottom: 1px solid var(--border-soft);
}

/* Warming-up banner (amber, dismissable) */
.ls-warmup-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--warn-bg-soft);
  border: 1px solid var(--warn);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 16px;
}
.ls-warmup-text {
  color: var(--warn);
  font-size: 12px;
  flex: 1;
}
.ls-warmup-dismiss {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--warn);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.ls-warmup-dismiss:hover {
  border-color: var(--warn);
}

/* Tooltip info-icon on column headers */
.info-icon {
  display: inline-block;
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
  cursor: help;
  vertical-align: 1px;
}
thead th[title] { cursor: help; }
thead th[title]:hover .info-icon { color: var(--primary); }

/* Null-operator row deemphasis */
tr.ls-null-row td {
  color: var(--text-muted);
  font-style: italic;
}
tr.ls-null-row td .dim { color: var(--text-muted); }
tr.ls-null-row:hover td {
  background: var(--card-2);
}

/* ---- leader tape header + sublabel ---------------------------------- */
.ls-tape-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ls-tape-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* NOW divider inside the tape */
.ls-tape-divider {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0 8px;
  min-width: 28px;
}
.ls-tape-divider-line {
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--warn), transparent);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--warn-glow);
}
.ls-tape-divider-label {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--warn);
  background: var(--card);
  padding: 1px 6px;
  border: 1px solid var(--warn);
  border-radius: 999px;
}

/* Time marker label inside a tape cell */
.ls-tape-time {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.ls-tape-cell.now .ls-tape-time {
  color: var(--warn);
}
.ls-tape-cell.future .ls-tape-time {
  color: var(--primary);
}

/* Brighten future cells so the temporal axis reads at a glance */
.ls-tape-cell.future {
  background: linear-gradient(180deg, var(--card-3), var(--card-2));
  border-color: var(--primary-dim);
  box-shadow: inset 0 0 0 1px var(--primary-glow);
}
.ls-tape-cell.future .ls-tape-slot { color: var(--text); }
.ls-tape-cell.future .ls-tape-who { color: var(--text); }

/* ---- Focus-visible indicators for keyboard-reachable interactive elements ---- */
/* Tape cells (role="button" tabindex="0") */
.ls-tape-cell:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* Epoch table rows (role="button" tabindex="0") */
tr.hover-target:focus-visible td:first-child {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
tr.hover-target:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* ---- prefers-reduced-motion: kill all animations/transitions for users
        who have opted into reduced motion (WCAG 2.3.3) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
