:root {
  --bg: #fff;
  --fg: #222;
  --muted: #555;
  --border: #ddd;
  --link: #0645ad;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181818;
    --fg: #e8e8e8;
    --muted: #aaa;
    --border: #444;
    --link: #6bb3ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-bar img.app-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

header h1 {
  margin: 0;
  font-size: 2rem;
}

header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

section {
  margin: 2rem 0;
}

h2 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

ul {
  padding-left: 1.25rem;
}

.status-ok {
  color: green;
  font-weight: 600;
}

.incident {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left-width: 6px;
}

.incident h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.incident .meta {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.incident .links {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.incident .resolved {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.severity {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.severity-broken {
  border-left-color: #c33;
}

.severity-degraded {
  border-left-color: #c90;
}

.severity-flaky {
  border-left-color: #999;
}

/* Resolved-but-unreleased: the whole card turns orange (one box),
   not a red card with an orange box inside. The callout text flows
   inside the card as plain paragraphs. */
.incident.state-unreleased {
  border-left-color: #c90;
  background: rgba(204, 153, 0, 0.08);
}

/* "Fixed in <commit> — not yet released." reads as machine-generated
   metadata: muted + small, like the .meta line, to distinguish it from the
   free-form description above. The follow-up call-to-action paragraph keeps
   normal styling (it's helpful guidance, not metadata). */
.resolved-unreleased {
  margin-top: 0.75rem;
}

.resolved-unreleased p {
  margin: 0.25rem 0;
}

.resolved-unreleased p.resolved {
  margin-top: 0;
}

.incident .references {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

footer p {
  margin: 0;
}

details {
  margin-top: 1.5rem;
}

summary {
  cursor: pointer;
  color: var(--muted);
}
