/* Ecosystem Observatory — institutional status surface.
   System fonts only; no external assets of any kind. */

:root {
  --paper: #f7f6f2;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #5c6066;
  --line: #d8d5cc;
  --green: #1a7f37;
  --green-bg: #e6f2ea;
  --amber: #9a6700;
  --amber-bg: #fff3d6;
  --red: #cf222e;
  --red-bg: #fbe9eb;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: 1.1rem 1.25rem;
  border-bottom: 4px solid var(--line);
}
.site-header .brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  max-width: 1200px;
  margin: 0 auto;
}
.site-header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-header .tagline {
  color: #b8bcc4;
  font-size: 0.85rem;
}

.status-banner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}
.status-banner .overall-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-red   { background: var(--red-bg); color: var(--red); }
.status-banner .checked-at { color: #b8bcc4; font-family: var(--mono); font-size: 0.8rem; }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
}

.vantage-note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  background: var(--card);
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.card.status-green { border-top-color: var(--green); }
.card.status-amber { border-top-color: var(--amber); }
.card.status-red   { border-top-color: var(--red); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.card-head h2 { margin: 0; font-size: 1.05rem; }
.card-head h2 a { text-decoration: none; border-bottom: 2px solid var(--line); }
.card-head h2 a:hover { border-bottom-color: var(--ink); }
.card-url {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red   { background: var(--red-bg); color: var(--red); }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.9rem;
  margin: 0;
}
.metrics > div { border-bottom: 1px dotted var(--line); padding-bottom: 0.25rem; }
.metrics dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0;
}
.metrics dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.trend {
  display: grid;
  grid-template-columns: minmax(9rem, auto) minmax(12rem, 1fr);
  align-items: center;
  gap: 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.trend svg { width: 100%; height: 48px; min-width: 0; overflow: visible; }
.trend .avail { font-family: var(--mono); font-size: 0.78rem; color: var(--ink); }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.latency-point { fill: var(--ink); }
.chart-label { fill: var(--muted); font: 8px var(--mono); }

details.evidence {
  border: 1px solid var(--line);
  border-radius: 3px;
}
details.evidence > summary {
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  user-select: none;
}
details.evidence[open] > summary { border-bottom: 1px solid var(--line); }
.check-list { margin: 0; padding: 0.5rem 0.75rem; list-style: none; }
.check-list li {
  display: grid;
  grid-template-columns: 1.1rem 9.5rem 1fr;
  gap: 0.4rem;
  padding: 0.22rem 0;
  font-size: 0.78rem;
  border-bottom: 1px dotted var(--line);
}
.check-list li:last-child { border-bottom: none; }
.check-list .family { font-family: var(--mono); }
.check-list .observed { color: var(--muted); overflow-wrap: anywhere; }
.check-fail .observed, .check-fail .family { color: var(--red); font-weight: 600; }
.check-warn .observed, .check-warn .family { color: var(--amber); }

.shots { display: flex; gap: 0.6rem; padding: 0.6rem 0.75rem; flex-wrap: wrap; }
.shots figure { margin: 0; }
.shots img {
  width: 140px;
  height: auto;
  border: 1px solid var(--line);
  display: block;
}
.shots figcaption { font-size: 0.68rem; color: var(--muted); margin-top: 0.2rem; }

.empty-state {
  border: 1px dashed var(--line);
  background: var(--card);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1rem 1.25rem 2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.site-footer .inner { max-width: 1200px; margin: 0 auto; }
.site-footer a { color: var(--muted); }

@media (max-width: 720px) {
  main { padding: 0.8rem; }
  .cards { grid-template-columns: 1fr; }
  .trend { grid-template-columns: 1fr; gap: 0.25rem; }
  .check-list li { grid-template-columns: 1.1rem 1fr; }
  .check-list .observed { grid-column: 2; }
}
