/* Agency overview (src/routes/agency.ts) and the Uptime card on a site's
   Alerts tab (src/uptime/view.ts). Colors are the shared tokens in site.css,
   so light and dark both follow them (contrast ratios are noted there). */

.ov {
  max-width: 980px;
  gap: 22px;
}

/* ---------------- the counts ---------------- */

.ov-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ov-count {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.ov-num {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ov-count-need .ov-num {
  color: var(--danger-fg);
}
.ov-count-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ov-chips .chip[aria-current='page'] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
}

.ov-h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}
.ov-allgood {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 14px 18px;
  color: var(--text-dim);
  background: var(--bg-tint);
  border-radius: var(--radius-lg);
}
.ov-allgood svg {
  flex: none;
  margin-top: 3px;
  color: var(--found);
}
.ov-note {
  margin: 0;
}

/* ---------------- rows ---------------- */

.ov-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ov-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.ov-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.ov-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.ov-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--chip-ok-fg);
}
.ov-warn .ov-dot {
  background: var(--chip-warn-fg);
}
.ov-danger .ov-dot {
  background: var(--danger);
}
.ov-name {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.ov-name:hover {
  color: var(--accent);
}
.ov-domain {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  overflow-wrap: anywhere;
}
.ov-issue {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}
.ov-danger .ov-issue {
  color: var(--danger-fg);
}
.ov-fine {
  color: var(--text-dim);
}
.ov-more summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dim);
}
.ov-more ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-dim);
}
.ov-more li + li {
  margin-top: 4px;
}
.ov-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 4px 0 0;
}
.ov-facts div {
  display: grid;
}
.ov-facts dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.ov-facts dd {
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ov-delta {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}
.ov-delta.up {
  color: var(--chip-ok-fg);
}
.ov-delta.down {
  color: var(--danger-fg);
}
.ov-up-ok {
  color: var(--chip-ok-fg);
  font-weight: 600;
}
.ov-up-danger {
  color: var(--danger-fg);
  font-weight: 600;
}
.ov-faint {
  font-size: 12px;
  color: var(--text-faint);
}
.ov-action {
  flex: none;
  white-space: nowrap;
}
.ov-action svg {
  width: 14px;
  height: 14px;
}

/* ---------------- digest ---------------- */

.ov-when {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 12px;
}
.ov-saved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-dim);
}
.ov-saved svg {
  width: 15px;
  height: 15px;
}

/* ---------------- uptime card ---------------- */

.up-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}
.up-facts div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}
.up-facts dt {
  font-size: 14px;
  color: var(--text-dim);
}
.up-facts dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* ---------------- report summary card ---------------- */

.rp-modes {
  display: grid;
  gap: 8px;
}
.rp-mode-name {
  display: block;
  font-weight: 600;
}
.rp-sum-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 720px) {
  .ov-row {
    flex-direction: column;
    gap: 12px;
  }
  .ov-action {
    align-self: stretch;
    justify-content: center;
  }
  .ov-when {
    grid-template-columns: 1fr 1fr;
  }
  .ov-when .field:last-child {
    grid-column: 1 / -1;
  }
  .up-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
