/* coverage.css — View: #coverage, the full-space Coverage / Priority projection. A calm,
   glanceable small-multiples read over the FULL network × transport × encoder space, distinct
   from grid.css's spine-organized matrix (which shows only what has been seeded). Reuses the
   app's existing token system only — no new color system. The verdict washes mirror grid.css's
   `.verdict--*` color-mix(45%) border formula, scoped to coverage's own slot classes so they
   never collide with the pill-shaped .verdict component used elsewhere. */

.coverage-summary {
  margin: 0 0 26px;
  max-width: 760px;
}
.coverage-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.cov-pip {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.cov-pip--clean {
  background: var(--clean);
}
.cov-pip--warn {
  background: var(--warn);
}
.cov-pip--gap {
  background: transparent;
  border: 1px solid var(--divider);
}
.coverage-summary-line {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--text-primary);
}
.coverage-summary-line strong {
  color: var(--accent-strong);
  font-family: var(--mono);
}
.coverage-summary-meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-meta);
  line-height: 1.5;
}

/* Panels — one per transport, small-multiples in a responsive grid mirroring .cell-grid. */
.coverage-panels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
  align-items: start;
}
.coverage-panel {
  background: var(--panel-bg);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
}
.coverage-panel-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--edge);
}
.coverage-panel-title {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  text-transform: uppercase;
}
.coverage-panel-sub {
  font-size: 11.5px;
  color: var(--text-meta);
}

/* Small-multiples table — rows = network, columns = encoder, via CSS grid (not <table>, so
   header cells and data slots share one grid and the same sizing rules). */
.coverage-table {
  display: grid;
  gap: 4px;
  align-items: stretch;
}
.coverage-corner {
  min-height: 0;
}
.coverage-col-head,
.coverage-row-head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coverage-row-head {
  justify-content: flex-end;
  text-align: right;
}
.coverage-col-head {
  justify-content: center;
  text-transform: lowercase;
}

/* Coordinate slots — the small-multiples tile. Base is neutral; state classes layer on top. */
.cov-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--divider);
  background: var(--card-bg);
  transition: border-color var(--t-quick), transform var(--t-quick), background var(--t-quick);
}
.cov-slot--interactive:hover {
  text-decoration: none;
  border-color: var(--hover-border);
  transform: scale(1.05);
  z-index: 2;
}
.cov-slot--prioritized.cov-slot--interactive:hover {
  border-color: var(--accent-strong);
}

/* Verdict washes — same color-mix(45%) border formula as grid.css .verdict--*, scoped to
   coverage's own class names. */
.cov-slot--verdict-clean {
  background: var(--clean-bg);
  border-color: color-mix(in srgb, var(--clean) 45%, transparent);
  color: var(--clean-bright);
}
.cov-slot--verdict-warn {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  color: var(--warn-bright);
}

/* Stale — recessed well, dashed edge. Still a live link (the run happened); just receded. */
.cov-slot--stale {
  background: var(--inset-bg);
  border-style: dashed;
  opacity: 0.82;
}

/* Pure gap — no cell at this coordinate at all. Calm negative space, muted on hover (no
   popover, no border brighten) since there is nothing behind it to preview. */
.cov-slot--gap {
  background: var(--bg);
  border-style: dotted;
  border-color: var(--divider);
  cursor: default;
}
.cov-slot--gap:hover {
  border-color: var(--divider);
  transform: none;
}

/* Seeded gap — a cell exists but has zero runs yet. Distinct from a pure gap: it IS a link,
   but stays visually quiet since there is nothing to report. */
.cov-slot--seeded {
  background: var(--card-bg);
  border-style: dashed;
  border-color: var(--edge);
  color: var(--text-faint);
}

/* Prioritized — a crisp accent border so the prioritized subset reads distinctly from the full
   field, layered on top of whichever covered/stale/gap treatment applies underneath. */
.cov-slot--prioritized {
  border-color: var(--accent-strong);
}

.cov-glyph {
  font-size: 12px;
  line-height: 1;
}
.cov-count {
  font-size: 9.5px;
  color: var(--text-meta);
}
.cov-priority {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--accent-strong);
}
.cov-context-dot {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--measured);
}

/* Hover popover — a small detail card for interactive slots only; gap slots never get one. */
.cov-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  white-space: nowrap;
  background: var(--panel-bg);
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  padding: 6px 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  text-align: left;
}
.cov-popover-coord {
  display: block;
  color: var(--text-primary);
}
.cov-popover-detail {
  display: block;
  color: var(--text-meta);
}
.cov-slot--interactive:hover .cov-popover {
  display: block;
}

@media (max-width: 560px) {
  .coverage-panels {
    grid-template-columns: 1fr;
  }
}
