/* ── Public status page (revamp E6) ─────────────────────────────────────────
   itam/templates/status.html, server-rendered, no script. A sans headline,
   one overall status card, a 30-day strip per source (one bar per day, a
   state per bar, never colour alone: the legend names them and every bar
   has a tooltip; the row's availability is the text equivalent), and the
   incidents. Moved out of the template's <style> block. */

body.st-body { display: block; margin: 0; padding: 40px 16px 56px; background: var(--bg); }
.st-wrap { max-width: 960px; margin: 0 auto; display: grid; gap: var(--sp-4); }
.st-head { display: flex; align-items: center; gap: var(--sp-4); }
.st-head img { width: 28px; height: 28px; flex: none; }
.st-title { margin: 0; font-family: var(--sans); font-size: var(--fs-page); line-height: 30px; font-weight: 650; letter-spacing: -0.02em; color: var(--text); }
.st-sub { margin: 2px 0 0; font-size: var(--fs-13); color: var(--text-3); }

.st-overall {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border), var(--shadow-1);
}
.st-overall .mk { width: 12px; height: 12px; margin-top: 8px; }
.st-overall .mk-error { width: 14px; height: 3px; margin-top: 12px; }
.st-overall.tone-degraded { background: var(--warn-dim); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.st-overall.tone-critical { background: var(--error-dim); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--error) 35%, transparent); }
.st-headline { margin: 0; font-size: var(--fs-20); line-height: 28px; font-weight: 650; color: var(--text); }
.st-overall-meta { margin: 2px 0 0; font-size: var(--fs-13); color: var(--text-2); font-variant-numeric: tabular-nums; }

.st-card { border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--shadow-1); overflow: hidden; }
.st-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); padding: 14px 16px 6px; }
.st-card-title { margin: 0; font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: var(--fs-12); color: var(--text-3); }
.st-legend li { display: inline-flex; align-items: center; gap: 6px; }
.st-legend .st-day { width: 8px; height: 14px; }

.st-rows, .st-events { list-style: none; margin: 0; padding: 0; }
.st-row { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-sub); }
.st-row:first-child { border-top: 0; }
.st-row-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.st-name { font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.st-meta { flex: 1 1 240px; min-width: 0; font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
.st-avail { margin-left: auto; font-size: var(--fs-13); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.st-row-runs { background: var(--surface-2); }

/* One bar per day. Never colour alone (DESIGN.md §2): the height says the
   state too, so a red/green colour-blind reader tells a failed day from a
   good one. Full bar: every fetch worked; half: some failed; a short stub:
   all failed; a full outline: no sync. Bars stand on a common baseline and
   the legend draws the same shapes. */
.st-days { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 28px; align-items: end; }
.st-day { display: inline-block; min-width: 3px; height: 100%; border-radius: 2px; background: var(--sunken); }
.st-day.is-ok { background: var(--success); }
.st-day.is-partial { background: var(--warn); height: 50%; }
.st-day.is-down { background: var(--error); height: 22%; }
.st-day.is-none { background: var(--sunken); box-shadow: inset 0 0 0 1px var(--border); }
.st-legend .st-day.is-partial { height: 7px; }
.st-legend .st-day.is-down { height: 4px; }
.st-legend li { align-items: flex-end; }

.st-event { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 10px 16px; border-top: 1px solid var(--border-sub); font-size: var(--fs-13); color: var(--text); }
.st-event:first-child { border-top: 0; }
.st-event-when { font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-empty { padding: 14px 16px 18px; font-size: var(--fs-13); color: var(--text-3); }

.st-note { margin: 0; font-size: var(--fs-13); color: var(--text-2); }
.st-foot { text-align: center; font-size: var(--fs-12); color: var(--text-3); }
.st-foot a { color: var(--text-2); }

/* Pills on this page follow the five tones (X4: a shape per state). */
.pill.tone-healthy { background: var(--success-dim); color: var(--success); }
.pill.tone-degraded { background: var(--warn-dim); color: var(--warn); }
.pill.tone-critical { background: var(--error-dim); color: var(--error); }
.pill.tone-unknown { background: var(--ghost-dim); color: var(--ghost); }
.pill.tone-healthy::before { background: currentColor; box-shadow: none; }
.pill.tone-degraded::before { border-radius: 1px; background: currentColor; box-shadow: none; transform: rotate(45deg); }
.pill.tone-critical::before { width: 8px; height: 2px; border-radius: 1px; background: currentColor; box-shadow: none; }

@media (max-width: 640px) {
    body.st-body { padding: 24px 16px 40px; }
    .st-days { gap: 2px; height: 22px; }
    .st-legend { margin-left: 0; }
}

/* Pause control for the auto-refresh (WCAG 2.2.1); shown only with script. */
.st-pause { margin-top: var(--sp-2); }
