/* ── Status (templates/status.html, incidents.js) ────────────────────────────
 * Incidents and maintenance as they touch this workspace. Built from app.css's
 * tokens and pieces only: the view head, the state marks (○ fine, ▨ open,
 * ■ bad), white cards on one hairline, the callfix bar's shape for the bar
 * over every page. No new hues: alarm red for a major outage, the amber
 * "open" for everything still unresolved, ink for what has ended. Nothing
 * moves on arrival; a refresh repaints in place. */
.st [hidden] { display: none !important; }
.st-head { margin-bottom: 16px; }
.st-public { font-size: 12.5px; color: var(--c-ink-2); text-underline-offset: 2px; white-space: nowrap; }
.st-public:hover { color: var(--c-ink); }

.st-now { margin: 0 0 18px; }
.st-now[aria-busy="true"] .st-line { color: var(--c-ink-3); }
.st-line { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.016em; color: var(--c-ink);
           display: flex; align-items: center; }
.st-line.mark-ok::before, .st-line.mark-open::before, .st-line.mark-bad::before { margin-right: 8px; }
.st-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--c-ink-2); max-width: 70ch; }
.st-sub button { margin-left: 6px; }

.st-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.st-list:empty { display: none; }
.st-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md);
           padding: 14px 16px 12px; min-width: 0; }
.st-card[data-impact="major_outage"] { border-color: var(--c-alarm-line); }
.st-card[data-impact="partial_outage"], .st-card[data-impact="degraded"] { border-color: var(--c-open-line); }
.st-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 12px; }
.st-card-head h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.35;
                   color: var(--c-ink); min-width: 0; flex: 1 1 260px; }
.st-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.st-impact, .st-state, .st-free, .st-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.st-impact { color: var(--c-open-ink); background: var(--c-open-bg); box-shadow: inset 0 0 0 1px var(--c-open-line); }
.st-impact[data-impact="major_outage"] { color: var(--c-alarm-ink); background: var(--c-alarm-bg);
                                         box-shadow: inset 0 0 0 1px var(--c-alarm-line); }
.st-state { color: var(--c-ink-2); background: var(--ui-fill); font-weight: 500; }
.st-state[data-tone="done"] { color: var(--c-ink-3); }
.st-free { color: var(--c-ink); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line-strong);
           margin-left: 4px; vertical-align: 1px; }
.st-when { margin: 6px 0 0; font-size: 12px; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.st-chip { color: var(--c-ink-2); background: var(--c-sunk, var(--ui-fill)); font-weight: 500; }
.st-update, .st-yours { margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--c-line); }
.st-update-k { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
               line-height: 1.2; color: var(--c-ink-3); }
.st-update p, .st-yours p { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: var(--c-ink); white-space: pre-line;
                            overflow-wrap: anywhere; }

.st-timeline { margin: 10px 0 0; }
.st-timeline summary { cursor: pointer; font-size: 12px; color: var(--c-ink-2); width: fit-content; }
.st-timeline summary:hover { color: var(--c-ink); }
.st-updates { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--c-line); display: grid; gap: 10px; }
.st-updates p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--c-ink-2); white-space: pre-line;
                overflow-wrap: anywhere; }
.st-muted { font-size: 12px; color: var(--c-ink-3); }

.st-section { margin: 22px 0 0; }
.st-section-title { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--c-ink); }
.st-section .st-list { margin-top: 0; }
.st-past { list-style: none; margin: 0; padding: 4px 16px; background: var(--c-surface); border: 1px solid var(--c-line);
           border-radius: var(--r-md); }
.st-row { padding: 10px 0; border-top: 1px solid var(--c-line); }
.st-row:first-child { border-top: 0; }
.st-row .st-timeline { margin: 0; }
.st-row summary { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 2px 14px; width: auto; color: var(--c-ink); }
.st-row-when { grid-row: 1 / span 3; font-size: 12px; color: var(--c-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-row-title { font-size: 13px; font-weight: 600; letter-spacing: -0.006em; }
.st-row-meta { font-size: 12px; color: var(--c-ink-3); }
.st-row-yours { grid-column: 2; margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--c-ink-2); }
.st-row .st-updates { margin-left: 126px; }

.st-tell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
           margin: 24px 0 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--ui-fill); }
.st-tell p { margin: 0; flex: 1 1 360px; font-size: 12.5px; line-height: 1.6; color: var(--c-ink-2); max-width: 80ch; }
.st-tell strong { color: var(--c-ink); font-weight: 600; }
.st-tell button { flex: none; }

@media (max-width: 760px) {
  .st-row summary { grid-template-columns: minmax(0, 1fr); }
  .st-row-when { grid-row: auto; }
  .st-row-yours { grid-column: 1; }
  .st-row .st-updates { margin-left: 0; }
}

/* ── the bar over every page while an incident is open ───────────────────
 * callfix's shape (app.css): a mark, the incident in one bold line, what it
 * touches and what it did here under it, the way to the Status page and a
 * way to hide it in this browser. Red for a major outage, amber otherwise.
 *
 * ONE BANNER AREA. It sits where the platform banner does (#gpu-status-banner,
 * first in the document, sticky) and takes its place while it shows: the two
 * never stack. Hidden, the platform banner comes back if calls are still
 * affected (incidents.js sets body.incident-bar-on). */
.incbar { position: sticky; top: 0; z-index: 60;
          background: var(--c-open-bg); border-bottom: 1px solid var(--c-open-line); }
body.incident-bar-on #gpu-status-banner { display: none; }
.incbar[hidden] { display: none; }
.incbar[data-impact="major_outage"] { background: var(--c-alarm-bg); border-bottom-color: var(--c-alarm-line); }
.incbar-in { max-width: 1760px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
             padding: calc(10px + env(safe-area-inset-top)) clamp(12px, 2vw, 24px) 10px; }
.incbar-mark { width: 8px; height: 8px; flex: none; align-self: flex-start; margin-top: 6px; border-radius: 1px;
               border: 1px solid var(--c-open-line); background-color: var(--c-open-bg);
               background-image: repeating-linear-gradient(45deg, var(--c-open-hatch) 0 3px, transparent 3px 7px); }
.incbar[data-impact="major_outage"] .incbar-mark { border-color: var(--c-alarm); background: var(--c-alarm); }
.incbar-copy { flex: 1; min-width: 0; }
.incbar-copy strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--c-open-ink);
                      overflow-wrap: anywhere; }
.incbar[data-impact="major_outage"] .incbar-copy strong { color: var(--c-alarm-ink); }
.incbar-copy p { margin: 2px 0 0; font-size: 12px; line-height: 1.55; color: var(--c-ink-2); }
.incbar-in > button:not(.incbar-x) { flex: none; }
.incbar-x { border: 0; border-radius: 8px; background: transparent; color: var(--c-ink-3);
            width: 36px; height: 36px; padding: 0; flex: none; font: 20px/1 var(--sans); }
.incbar-x:hover { background: var(--ui-fill); color: var(--c-ink); transform: none; }
@media (max-width: 760px) {
  /* a row of the phone's flex column, like the platform banner */
  .incbar { position: static; flex: 0 0 auto; }
  .incbar-in { display: grid; grid-template-columns: 8px minmax(0, 1fr) 36px;
               column-gap: 10px; row-gap: 8px; align-items: start; padding: 10px 14px; }
  .incbar-x { grid-column: 3; grid-row: 1; margin-top: -6px; }
  .incbar-in > button:not(.incbar-x) { grid-column: 2; grid-row: 2; justify-self: start; }
}

/* The rail's mark beside Status while an incident is open. */
.nav-alert { margin-left: auto; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 650;
             line-height: 1.5; color: var(--c-dark, #151513); background: var(--c-open-on-dark); }
.nav-alert[hidden], :is(.agent-workspace, .admin-workspace) > .nav .nav-alert { display: none; }
