/*
  The public status page (doc 230, plan OP5a). Tokens only, from
  /aide/brand-tokens.css; no hex literal here (standard 149). The page stands on
  its own: it links nothing from the application but the token file and the
  lockup, both of which the Worker serves beside it.
*/

* { box-sizing: border-box; }

body.status-body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--soft);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-dark); }

/* ---- header ---- */

.status-top {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  background: var(--white); border-bottom: 1px solid var(--line);
}
.status-brand { display: inline-flex; align-items: center; }
.status-brand img { display: block; }
.status-kicker { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---- frame ---- */

.status-main { max-width: 860px; margin: 0 auto; padding: 22px 22px 40px; display: grid; gap: 14px; }

/* ---- overall state: the first thing on the page, readable from across a room ---- */

.status-overall {
  padding: 18px 20px;
  border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 10px;
  background: var(--white);
}
.status-overall h1 { margin: 0; color: var(--navy); font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.status-overall[data-state="operational"] { border-left-color: var(--green); }
.status-overall[data-state="degraded"] { border-left-color: var(--amber); }
.status-overall[data-state="interruption"] { border-left-color: var(--red); }
.status-overall[data-state="error"] { border-left-color: var(--muted); }
.status-updated { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---- panels, badges, notices (standard 149 section 4) ---- */

.panel { padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.panel-head h2 { margin: 0; color: var(--navy); font-size: 16px; font-weight: 600; }

.badge {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--soft);
  color: var(--ink); font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.6; white-space: nowrap;
}
.badge.pass { color: var(--green); background: var(--green-tint); border-color: var(--green-line); }
.badge.warn { color: var(--amber); background: var(--amber-tint); border-color: var(--amber-line); }
.badge.fail { color: var(--red); background: var(--red-tint); border-color: var(--red-line); }
.badge.info { color: var(--muted); background: var(--soft-2); border-color: var(--line); }

.notice { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--blue-dark); border-radius: 8px; background: var(--white); font-size: 14px; }
.notice.error { border-left-color: var(--red); }

/* ---- the open incident ---- */

.status-incident .panel-head h2 { font-size: 17px; }
.status-incident-title { margin: 0 0 4px; color: var(--navy); font-size: 15px; font-weight: 600; }
.status-incident-message { margin: 0 0 8px; font-size: 15px; }
.status-incident-meta { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.status-incident-note { margin: 0; color: var(--muted); font-size: 13px; }

/* ---- components ---- */

.status-components { list-style: none; margin: 0; padding: 0; display: grid; }
.status-components li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.status-components li:first-child { border-top: 0; padding-top: 2px; }
.status-components strong { display: block; color: var(--navy); font-size: 14.5px; font-weight: 600; }
.status-components small { display: block; color: var(--muted); font-size: 12.5px; }

/* ---- history ---- */

.status-history { list-style: none; margin: 0; padding: 0; display: grid; }
.status-history li { padding: 10px 0; border-top: 1px solid var(--line); }
.status-history li:first-child { border-top: 0; padding-top: 2px; }
.status-history-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-history-head strong { color: var(--navy); font-size: 14.5px; font-weight: 600; }
.status-history-when { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.status-history-message { margin: 4px 0 0; font-size: 14px; }
.status-history-empty { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- footer ---- */

.status-foot { max-width: 860px; margin: 0 auto; padding: 0 22px 40px; color: var(--muted); font-size: 12.5px; }
.status-foot p { margin: 0; }

@media (max-width: 480px) {
  .status-top { padding: 12px 16px; }
  .status-main { padding: 14px 14px 30px; }
  .status-overall h1 { font-size: 20px; }
  .status-components li { grid-template-columns: 1fr; row-gap: 4px; }
}
