/* ── 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 platform, as the public status page measures it (status-board.js) ──
 * status.miraiminds.co's own pieces in the console's: the Overview's tiles
 * (overview.css .ov-tile, same sizes), white cards on one hairline, 90 bars a
 * part, the state marks. Tokens only, so the dark theme needs nothing. */
.stb[hidden], .stb [hidden] { display: none !important; }
.stb-sub { margin: -4px 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--c-ink-2); max-width: 70ch; }
.stb-stale { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--c-open-line); border-radius: var(--r-sm);
             background: var(--c-open-bg); color: var(--c-open-ink); font-size: 12.5px; }
.stb-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stb-tiles + .stb-tiles { margin-top: 10px; }
.stb-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stb-tile { min-width: 0; padding: 12px 14px 11px; background: var(--c-surface); border: 1px solid var(--c-line);
            border-radius: var(--r-md); display: flex; flex-direction: column; gap: 6px; }
.stb-k { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; line-height: 1.2; color: var(--c-ink-3); }
.stb-tile strong { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1; color: var(--c-ink); white-space: nowrap; }
.stb-s { font-size: 11.5px; line-height: 1.35; color: var(--c-ink-3); }
.stb-note { margin: 8px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--c-ink-3); max-width: 80ch; }

.stb-parts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stb-part { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md);
            padding: 14px 16px 12px; min-width: 0; }
.stb-part-head { display: flex; align-items: flex-start; gap: 12px; }
.stb-part-name { flex: 1; min-width: 0; }
.stb-part-name h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; }
.stb-part-name h3::before { margin-right: 8px; }
.stb-part-name p { margin: 2px 0 0 16px; font-size: 12px; line-height: 1.45; color: var(--c-ink-3); }
.stb-part-up { text-align: right; flex: none; }
.stb-part-up strong { display: block; font-size: 13px; font-weight: 600; color: var(--c-ink); }
.stb-part-up span { display: block; font-size: 11.5px; color: var(--c-ink-3); }
.stb-bars { position: relative; display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 28px; margin: 12px 0 0; }
.stb-day { border-radius: 1px; background: var(--c-ink-4); outline: none; }
.stb-day.none { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); }
.stb-day.some { background-color: var(--c-open-bg); box-shadow: inset 0 0 0 1px var(--c-open-line);
                background-image: repeating-linear-gradient(45deg, var(--c-open-hatch) 0 2px, transparent 2px 4px); }
.stb-day.bad { background: var(--c-alarm); }
.stb-day.degraded { background: var(--c-open-bg); box-shadow: inset 0 0 0 1px var(--c-open-line); }
.stb-day:focus-visible { box-shadow: 0 0 0 2px var(--c-ink); }
.stb-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--c-ink-3); }
.stb-axis .near { display: none; }
.stb-tip { position: absolute; z-index: 2; bottom: 36px; padding: 6px 9px; background: var(--c-surface); border-radius: var(--r-sm);
           box-shadow: var(--ui-raise); font-size: 12px; white-space: nowrap; pointer-events: none; color: var(--c-ink-2); }
.stb-tip b { color: var(--c-ink); font-weight: 600; }
.stb-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--c-ink-2); }
.stb-legend li { display: inline-flex; align-items: center; gap: 6px; }
.stb-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c-ink-4); }
.stb-key.some { background-color: var(--c-open-bg); box-shadow: inset 0 0 0 1px var(--c-open-line);
                background-image: repeating-linear-gradient(45deg, var(--c-open-hatch) 0 2px, transparent 2px 4px); }
.stb-key.bad { background: var(--c-alarm); }
.stb-key.degraded { background: var(--c-open-bg); box-shadow: inset 0 0 0 1px var(--c-open-line); }
.stb-key.none { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line-strong); }

@media (max-width: 860px) {
  .stb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stb-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  /* a phone: one row per stage, its name and 24 hours left, the hour right;
     the last 30 days of bars */
  .stb-tiles-3 { grid-template-columns: 1fr; gap: 6px; }
  .stb-tiles-3 .stb-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; }
  .stb-tiles-3 .stb-k, .stb-tiles-3 .stb-s { grid-column: 1; }
  .stb-tiles-3 .stb-tile strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 20px; }
  .stb-bars { grid-template-columns: repeat(30, minmax(0, 1fr)); }
  .stb-day.old { display: none; }
  .stb-axis .far { display: none; }
  .stb-axis .near { display: inline; }
  .stb-part-head { gap: 10px; }
}

/* ── 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; }
