/* status.css — page-specific styles for /status.
   Tokens come from shared.css; only layout and status-signal rules live here. */

.status-page .page-hero {
  margin-bottom: 3rem;
}

.status-page section {
  margin-bottom: 3.5rem;
}

.status-page .section-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.status-page .section-intro > p {
  max-width: 46rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Honesty cells: timestamp + deadline + badge. Color is never the only
   signal — STALE is also a literal word. */
.fresh {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.fresh-src {
  color: var(--muted);
}

.fresh-ok {
  color: var(--green);
  border-color: var(--border-strong);
  background: var(--accent-green-bg-light);
}

.fresh-stale {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-bg);
}

.fresh-unknown {
  color: var(--muted);
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
}

.badge-ok {
  color: var(--green);
  background: var(--accent-green-bg-light);
  border-color: var(--green);
}

.badge-bad {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger);
}

.badge-muted {
  color: var(--muted);
  background: var(--mint-soft);
}

.badge-tier-a {
  color: var(--green);
  border-color: var(--green);
}

.badge-tier-b {
  color: var(--accent-warm);
  border-color: var(--accent-warm);
}

.badge-tier-c {
  color: var(--muted);
}

/* Summary strip: the ten-second read. Each card links to its section and
   carries its source timestamp; state is a word + accent, never color alone. */
.sum-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.85rem;
}

.sum-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
}

.sum-card:hover {
  border-color: var(--border-strong);
}

.sum-ok {
  border-left-color: var(--green);
}

.sum-bad {
  border-left-color: var(--danger);
}

.sum-muted {
  border-left-color: var(--border-strong);
}

.sum-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.sum-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.sum-value small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.sum-note {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}

/* Timestamps align in a mono column; numbers use tabular figures. */
.ts {
  font-family: var(--font-mono, monospace);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag-stale {
  color: var(--danger);
}

.status-page table {
  font-variant-numeric: tabular-nums;
}

/* Section folds: collapsed state still tells the truth via the meta line. */
details.fold {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

details.fold > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

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

/* The expand/collapse word lives on the aria-hidden .fold-hint span so screen
   readers announce the heading and counts, not decorative control text. */
details.fold > summary .fold-hint {
  margin-left: auto;
}

details.fold > summary .fold-hint::after {
  content: "expand ▸";
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

details.fold[open] > summary .fold-hint::after {
  content: "collapse ▾";
}

.fold-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.fold-meta {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.fold-body {
  padding: 0 1.25rem 1.25rem;
}

.fold-body .section-intro {
  margin-top: 0.5rem;
}

/* Per-host security rows: one line per host, details hold the six headers. */
.host-list,
.claim-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.host-detail,
.claim-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.host-detail > summary,
.claim-group > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
}

.host-detail > summary::-webkit-details-marker,
.claim-group > summary::-webkit-details-marker {
  display: none;
}

.host-detail > summary::before,
.claim-group > summary::before {
  content: "▸";
  color: var(--muted);
}

.host-detail[open] > summary::before,
.claim-group[open] > summary::before {
  content: "▾";
}

.host-name {
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
}

.host-tls {
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.host-miss {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}

.host-body {
  padding: 0.25rem 0.9rem 0.9rem;
}

.host-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.host-headers {
  width: 100%;
  max-width: 34rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.host-headers th,
.host-headers td {
  text-align: left;
  padding: 0.2rem 0.6rem 0.2rem 0;
  border-bottom: 1px solid var(--border);
}

.claim-group .table-wrap {
  margin: 0.35rem 0.9rem 0.9rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.status-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 42rem;
}

.status-page th,
.status-page td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.status-page thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--mint-soft);
}

.status-page tbody tr:last-child th,
.status-page tbody tr:last-child td {
  border-bottom: none;
}

.status-page td.missing {
  font-size: 0.82rem;
  color: var(--muted);
}

.status-page td code {
  font-size: 0.8rem;
}

/* Evidence cycle summary */
.cycle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 0;
}

.cycle-grid > div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1rem 1.25rem;
}

.cycle-grid dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.cycle-grid dd {
  margin: 0.35rem 0 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

/* Limits panel reuses backpage patterns */
.limits-inner {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--mint-soft);
  padding: 1.75rem;
}

.limits-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 0;
}

.limits-list dt {
  font-weight: 700;
  color: var(--ink);
}

.limits-list dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  .sum-strip {
    grid-template-columns: 1fr 1fr;
  }

  details.fold > summary {
    padding: 0.85rem 0.9rem;
  }

  .fold-body {
    padding: 0 0.9rem 0.9rem;
  }

  /* Tables keep their columns but scroll inside the card; the border and
     cut-off content are the visible affordance. */
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .status-page table {
    font-size: 0.82rem;
    min-width: 36rem;
  }

  .status-page th,
  .status-page td {
    padding: 0.5rem 0.6rem;
  }

  .host-miss {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (max-width: 480px) {
  .sum-strip {
    grid-template-columns: 1fr;
  }
}

.claim-scope {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
