/* alerts.html: the Pipeline Alerts board. Self-contained on purpose: the
   page is free and served live, so it must not depend on a stylesheet the free
   view may serve from the delayed snapshot. */
:root {
  --bg: #0d1117; --panel: #161b22; --panel-2: #1e2530; --border: #21262d; --border-2: #30363d;
  --text: #e6edf3; --text-2: #c9d1d9; --muted: #8b949e; --accent: #e94560;
  --green: #3fb950; --amber: #d29922; --red: #f85149;
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text-2);
  font-family: var(--font); -webkit-font-smoothing: antialiased; }
/* full-height column: site nav (.ga-pad) first, #app takes the rest and scrolls */
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body > .ga-pad { flex: none; }
#app { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; position: relative;
  overflow-y: auto; overscroll-behavior: contain; }
#app > * { flex-shrink: 0; }
#app > .board { flex-shrink: 1; }
.stale-banner { flex: 0 0 auto; background: var(--red); color: #fff; font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-align: center; padding: 9px 16px; border-bottom: 1px solid #ff8a80; }
.stale-banner[hidden] { display: none; }
header { flex: 0 0 auto; background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: baseline; }
.h-title { font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.stat { display: flex; align-items: baseline; gap: 7px; }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .sub { font-size: 11px; color: var(--muted); }
footer { flex: 0 0 auto; background: var(--panel); border-top: 1px solid var(--border);
  padding: 7px 16px; font-size: 11px; color: var(--muted); line-height: 1.5; }
@media (max-width: 720px) {
  header { padding: 8px 11px; gap: 6px 16px; }
  .h-title { width: 100%; }
  footer { padding: 6px 11px; }
}
.board { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 16px 24px; }
.board .summary { font-size: 14px; font-weight: 600; color: var(--text); margin: 2px 0 8px; line-height: 1.45; max-width: 980px; }
.board .intro { font-size: 12.5px; line-height: 1.55; color: var(--text-2); margin: 2px 0 10px; max-width: 980px; }
.legend { border: 1px solid var(--border-2); border-radius: 4px; background: var(--panel); padding: 0 12px;
  max-width: 980px; margin-bottom: 14px; font-size: 12px; }
.legend > summary { cursor: pointer; padding: 9px 0; color: var(--text); font-weight: 500; min-height: 36px; }
.legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 2px 0 10px; line-height: 1.5; }
.legend dt { white-space: nowrap; color: var(--text); font-weight: 500; }
.legend dd { margin: 0; color: var(--text-2); }
.legend .who { border-top: 1px solid var(--border); padding: 9px 0 10px; margin: 0; line-height: 1.55; color: var(--text-2); }

.region { margin-top: 18px; }
.region > h2 { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 8px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.region > h2 .cnt { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.region h3 { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; margin: 16px 0 6px; }
.none { font-size: 12.5px; color: var(--muted); padding: 10px 12px; border: 1px dashed var(--border-2); border-radius: 4px; }

.at { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.4; }
.at th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border-2); white-space: nowrap; }
.at td { padding: 8px 8px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.at tr.r0 td:first-child { box-shadow: inset 3px 0 0 #ff7b72; }
.at tr.r1 td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.at tr.r2 td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.at tr.r3 td:first-child { box-shadow: inset 3px 0 0 var(--border-2); }
.at .sys { color: var(--text); font-weight: 500; white-space: nowrap; }
.at .sm { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.at .ns { color: var(--muted); font-style: italic; }
.at a { color: #79c0ff; text-decoration: none; }
.at a:hover { text-decoration: underline; }
.at .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.tier, .chg, .day { display: inline-block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 5px; border-radius: 3px; border: 1px solid var(--border-2); margin: 0 4px 2px 0; vertical-align: 1px; }
.tier.critical { color: #ffb3ad; border-color: rgba(248,81,73,.55); background: rgba(248,81,73,.15); }
.tier.emergency { color: #fff; border-color: #ff7b72; background: rgba(248,81,73,.6); }
.tier.warning { color: #e3b341; border-color: rgba(210,153,34,.55); background: rgba(210,153,34,.13); }
.chg { color: var(--text-2); }
.day { color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 10.5px; }
.day.on { color: var(--text); border-color: #58a6ff; }
.dir { font-weight: 500; }
.dir.short { color: #ffa657; }
.dir.long { color: #79c0ff; }
.pts { margin: 0; padding: 0; list-style: none; }
.pts li { margin: 0 0 3px; }
.code { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.pts .grp { color: var(--muted); font-size: 11px; }

/* point restrictions: deliberately quieter than system alerts */
.at.pt td { font-size: 11.5px; color: var(--muted); }
.at.pt .sys { color: var(--text-2); }
.at.pt tr td:first-child { box-shadow: none; }

.scg { border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; margin-top: 12px; max-width: 980px; }
.scg h4 { margin: 0 0 6px; font-size: 12px; color: var(--text); font-weight: 500; }
.scg table { border-collapse: collapse; font-size: 11.5px; }
.scg th, .scg td { padding: 4px 8px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.scg th { font-size: 10px; color: var(--muted); font-weight: 500; }
.scg td.on { color: #ffb3ad; font-weight: 600; }
.scg td.off { color: var(--muted); }
.scg .wrap { overflow-x: auto; }
.checked { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.checked .bad { color: var(--red); }
.scg a, .scg a:visited { color: #79c0ff; text-decoration: none; }

@media (max-width: 760px) {
  .board { padding: 10px 12px 24px; }
  .at thead { display: none; }
  .at, .at tbody, .at tr, .at td { display: block; width: 100%; }
  .at tr { border: 1px solid var(--border-2); border-radius: 4px; margin: 0 0 10px; padding: 4px 0; background: var(--panel); }
  .at tr.r0 { border-left: 3px solid #ff7b72; } .at tr.r1 { border-left: 3px solid var(--red); }
  .at tr.r2 { border-left: 3px solid var(--amber); }
  .at tr td:first-child { box-shadow: none !important; }
  .at td { border: 0; padding: 4px 10px 4px 116px; position: relative; min-height: 24px; }
  .at td::before { content: attr(data-l); position: absolute; left: 10px; top: 6px; width: 98px; font-size: 10px;
    text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .at td.sys { white-space: normal; }
  .at a { display: inline-flex; min-height: 44px; align-items: center; }
  .legend dl { grid-template-columns: 1fr; gap: 2px; }
  .legend dd { margin-bottom: 8px; }
  .legend > summary { min-height: 44px; display: flex; align-items: center; }
}

.gdnote { margin: 6px 16px 0; font-size: 12px; color: var(--muted); }
#gd i { color: #f0883e; font-style: normal; }
.ending { max-width: 980px; margin: -2px 0 10px; font-size: 12px; color: var(--muted); }
.ending > summary { cursor: pointer; min-height: 28px; }
.ending ul { margin: 4px 0 6px; padding-left: 18px; line-height: 1.6; }
.ending a, .ending a:visited { color: #79c0ff; text-decoration: none; }
#gd b { color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .ending > summary { min-height: 44px; display: flex; align-items: center; } }
/* lifted / cancelled: kept for the rest of the day, greyed */
.at tr.lifted td { opacity: .55; }
.at tr.lifted td:first-child { box-shadow: inset 3px 0 0 var(--border-2) !important; }
.at tr.lifted .liftnote, .at tr.lifted .tier.lifted { opacity: 1; }
.tier.lifted { color: var(--text-2); border-color: var(--border-2); background: rgba(139,148,158,.18); }
.liftnote { color: var(--text-2) !important; }
.liftnote a, .liftnote a:visited { color: #79c0ff; text-decoration: none; }
@media (max-width: 760px) { .at tr.lifted { border-left-color: var(--border-2) !important; } }
.at .sm a, .at .sm a:visited { color: #79c0ff; text-decoration: none; }
.legend a, .legend a:visited { color: #79c0ff; text-decoration: none; }
.at td.posted { font-size: 11.5px; min-width: 92px; }
.at td.posted .age { display: block; }
.at td.posted .pwhen { color: var(--text-2); }
.at .age { color: var(--muted); font-size: 11px; }
.at td.posted .liftnote { white-space: normal; }
@media (max-width: 760px) { .at td.posted { white-space: normal; } }
