/* Orderly360 Status. Brand from the frontend theme: orange #eb5d2d, Geist, slate ink.
   Status colours are the dataviz status steps (good, warning, critical), never themed;
   each always ships with an icon and a word. */

@font-face {
  font-family: "Geist";
  src: url("/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Arial sized to Geist's metrics, so the swap moves nothing. */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial");
  ascent-override: 95.94%;
  descent-override: 28.16%;
  line-gap-override: 0%;
  size-adjust: 104.76%;
}

:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --paper: #ffffff;
  --raised: #f8f9fc;
  --ink: #0f1729;
  --ink-2: #5b6779;
  --ink-3: #6b7689;
  --line: rgba(15, 23, 41, 0.09);
  --line-strong: rgba(15, 23, 41, 0.16);
  --brand: #eb5d2d;
  --brand-ink: #b24521;
  --focus: #eb5d2d;

  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --info: #2a78d6;
  --none: #dfe3ea;

  --good-ink: #006300;
  --warning-ink: #8a5300;
  --critical-ink: #a82828;
  --info-ink: #1d4ed8;

  --good-tint: #e9f7e9;
  --warning-tint: #fff5df;
  --critical-tint: #fcebeb;
  --info-tint: #eaf2fc;
  --neutral-tint: #eef1f5;

  --series: #2a78d6;
  --grid: #e8eaee;
  --threshold: #d03b3b;
  --shadow: 0 1px 2px rgba(15, 23, 41, 0.04), 0 4px 16px rgba(15, 23, 41, 0.05);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0a0f1c;
    --paper: #141c2e;
    --raised: #182236;
    --ink: #e8eefc;
    --ink-2: #94a3b8;
    --ink-3: #8a97ab;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.28);
    --brand: #ef815b;
    --brand-ink: #ef815b;
    --focus: #ef815b;

    --none: #2a3550;
    --good-ink: #4ade80;
    --warning-ink: #fab219;
    --critical-ink: #f48a8a;
    --info-ink: #7cb5f5;

    --good-tint: rgba(12, 163, 12, 0.16);
    --warning-tint: rgba(250, 178, 25, 0.14);
    --critical-tint: rgba(208, 59, 59, 0.18);
    --info-tint: rgba(57, 135, 229, 0.16);
    --neutral-tint: rgba(148, 163, 184, 0.12);

    --series: #3987e5;
    --grid: #232c42;
    --threshold: #e05b5b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 "Geist", "Geist Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -48px; padding: 8px 12px;
  background: var(--paper); border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); font-size: 13.5px; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header and footer ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { display: block; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-tag {
  font-size: 12.5px; font-weight: 600; color: var(--brand-ink);
  padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 10px; border-radius: 8px;
}
.header-nav a:hover { color: var(--ink); background: var(--neutral-tint); }
.header-nav a.button { color: #fff; background: #c74a20; }
.header-nav a.button:hover { background: #a93d19; color: #fff; }
@media (max-width: 480px) {
  .header-nav a:not(.button) { display: none; }
  .brand-name { font-size: 16px; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 48px; background: var(--paper); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; color: var(--ink-2); font-size: 13.5px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-row a { color: var(--ink-2); }
.footer-row a:hover { color: var(--ink); }

main.wrap { padding-top: 28px; outline: none; }

/* ---------- banner ---------- */
.banner {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 22px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-left: 6px solid var(--tone, var(--good));
}
.banner-icon {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--tone, var(--good));
}
.banner-icon .icon { width: 28px; height: 28px; stroke-width: 2.8; }
.banner h1 { font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
.banner-meta { margin-top: 4px; color: var(--ink-2); font-size: 14px; }
.banner-meta .sep { margin: 0 8px; }
.banner-operational { --tone: var(--good); }
.banner-degraded { --tone: #c98500; }
.banner-maintenance { --tone: var(--info); }
.banner-partial_outage { --tone: #e2701f; }
.banner-major_outage { --tone: var(--critical); }
.banner-unknown { --tone: #7c8798; }
@media (max-width: 480px) {
  .banner { padding: 18px 16px; gap: 12px; }
  .banner-icon { width: 40px; height: 40px; }
  .banner h1 { font-size: 20px; }
  .banner-meta .sep { display: block; height: 0; overflow: hidden; margin: 0; }
}

/* ---------- sections and cards ---------- */
.section { margin-top: 32px; }
.section-title { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 12px; }
.section-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.more { font-size: 14px; font-weight: 500; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.empty { padding: 20px; color: var(--ink-2); }

/* ---------- pills and badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 10px 6px 8px; border-radius: 999px;
  color: var(--ink-2); background: var(--neutral-tint);
}
.pill-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pill-operational { color: var(--good-ink); background: var(--good-tint); }
.pill-degraded, .pill-affected { color: var(--warning-ink); background: var(--warning-tint); }
.pill-down { color: var(--critical-ink); background: var(--critical-tint); }

.badge {
  display: inline-block; flex: none; font-size: 12px; font-weight: 650; letter-spacing: 0.01em;
  padding: 3px 9px; border-radius: 6px; color: var(--ink-2); background: var(--neutral-tint);
}
.badge-investigating { color: var(--critical-ink); background: var(--critical-tint); }
.badge-identified { color: var(--warning-ink); background: var(--warning-tint); }
.badge-monitoring { color: var(--info-ink); background: var(--info-tint); }
.badge-resolved { color: var(--good-ink); background: var(--good-tint); }
.chip {
  display: inline-block; font-size: 12.5px; font-weight: 500; padding: 2px 8px; margin: 2px 4px 2px 0;
  border-radius: 6px; border: 1px solid var(--line-strong); color: var(--ink);
}

/* ---------- open incidents ---------- */
.incident { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.incident + .incident { margin-top: 12px; }
.incident-open { border-top: 4px solid var(--critical); }
.incident-open.incident-identified { border-top-color: #c98500; }
.incident-open.incident-monitoring { border-top-color: var(--info); }
.incident-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.incident-head h3 { font-size: 18px; font-weight: 650; line-height: 1.35; }
.affects { margin-top: 8px; color: var(--ink-2); font-size: 13.5px; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--line-strong); }
.update { position: relative; padding: 0 0 16px; }
.update::before {
  content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink-3);
}
.update:first-child::before { border-color: var(--brand); background: var(--brand); }
.update-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.update-head time { color: var(--ink-2); font-size: 13px; }
.update p { white-space: pre-line; overflow-wrap: anywhere; }
.incident-foot { color: var(--ink-2); font-size: 13px; }

/* ---------- components ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0 0 12px; padding: 0; font-size: 12.5px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.group + .group { margin-top: 12px; }
.group summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; cursor: pointer; list-style: none; border-radius: var(--radius);
}
.group summary::-webkit-details-marker { display: none; }
.group summary:hover { background: var(--raised); }
.group-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15.5px; }
.chevron { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transform: rotate(-90deg); transition: transform 0.15s ease; }
.group[open] .chevron { transform: none; }
.group[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.components { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.component { padding: 16px 18px 14px; }
.component + .component { border-top: 1px solid var(--line); }
.component-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.component-head h3 { font-size: 15px; font-weight: 550; }
.component-quiet .component-head { margin-bottom: 2px; }
.component-quiet h3 { color: var(--ink-2); }
.unmonitored-note { color: var(--ink-3); font-size: 13px; }

.bars {
  display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 34px;
  border-radius: 6px; outline-offset: 4px;
}
.bar { display: block; border-radius: 2px; min-width: 0; background: var(--none); transition: opacity 0.1s; }
.bar-good { background: var(--good); }
.bar-warning { background: var(--warning); }
.bar-critical { background: var(--critical); }
.bar-none { background: var(--none); }
.bar.active { outline: 2px solid var(--ink); outline-offset: 1px; }
.bars:hover .bar:not(.active) { opacity: 0.75; }
.bars-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.bars-total { color: var(--ink-2); font-weight: 600; }
.bars-axis .narrow { display: none; }
@media (max-width: 640px) {
  .bars { grid-template-columns: repeat(30, 1fr); gap: 3px; }
  .bar:not(.recent) { display: none; }
  .bars-axis .wide { display: none; }
  .bars-axis .narrow { display: inline; }
}

/* ---------- response chart ---------- */
.chart-card { padding: 20px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.chart-head .section-title { margin-bottom: 2px; }
.chart-stats { display: flex; gap: 22px; margin: 0; }
.chart-stats div { min-width: 64px; }
.chart-stats dt { font-size: 12px; color: var(--ink-2); }
.chart-stats dd { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; }
.tab {
  font: inherit; font-size: 13px; font-weight: 550; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--ink-2); background: transparent;
}
.tab:hover { color: var(--ink); background: var(--neutral-tint); }
.tab[aria-pressed="true"] { color: var(--ink); background: var(--neutral-tint); border-color: var(--ink-3); }
.plot { position: relative; height: 180px; margin: 8px 0 0 48px; }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.grid { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.threshold { stroke: var(--threshold); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.y-axis { position: absolute; left: -48px; top: 0; bottom: 0; width: 42px; }
.y-label { position: absolute; right: 0; transform: translateY(-50%); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.y-top { top: 0; }
.y-mid { top: 50%; }
.x-axis { position: absolute; left: 0; right: 0; top: 100%; height: 22px; }
.x-label { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.plot { margin-bottom: 26px; border-bottom: 1px solid var(--line-strong); }
.crosshair { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink-3); pointer-events: none; }
.dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--series); box-shadow: 0 0 0 2px var(--paper); pointer-events: none; }
.chart-empty { padding: 32px 0; text-align: center; color: var(--ink-2); }
.chart-table { margin-top: 8px; font-size: 13.5px; }
.chart-table summary { cursor: pointer; color: var(--brand-ink); width: max-content; }
.chart-table table { border-collapse: collapse; margin-top: 8px; min-width: 220px; }
.chart-table th, .chart-table td { text-align: left; padding: 4px 16px 4px 0; border-bottom: 1px solid var(--line); }
.chart-table th { font-weight: 600; color: var(--ink-2); }

/* ---------- past incidents and history ---------- */
.days { list-style: none; margin: 0; padding: 0; }
.day { padding: 16px 20px; }
.day + .day { border-top: 1px solid var(--line); }
.day h3 { font-size: 14.5px; font-weight: 650; margin-bottom: 6px; }
.quiet { font-size: 14px; }
.day-quiet { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding-top: 12px; padding-bottom: 12px; }
.day-quiet h3 { margin: 0; }
.events { list-style: none; margin: 0; padding: 0; }
.event { padding: 6px 0; }
.event + .event { border-top: 1px dashed var(--line); padding-top: 10px; }
.event-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.event-head h4 { font-size: 15px; font-weight: 600; }
.event p { margin-top: 3px; overflow-wrap: anywhere; }
.event p.muted { font-size: 13px; }
/* The 90-day history is its own view at #history, with or without JavaScript. */
.history { display: none; }
.history:target { display: block; }
main:has(#history:target) > :not(#history) { display: none; }

/* ---------- tooltip ---------- */
.tooltip {
  position: fixed; z-index: 20; max-width: 280px; pointer-events: none;
  padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 28px rgba(15, 23, 41, 0.18);
}
.tooltip strong { display: block; font-weight: 650; }
.tooltip .tip-row { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tooltip .swatch { flex: none; }
.line-swatch { background: var(--series); height: 3px; border-radius: 2px; }
.stale { margin-top: 16px; text-align: center; }
.tooltip ul { margin: 6px 0 0; padding-left: 16px; color: var(--ink); }

/* positions for the chart's hour labels (no inline styles under the CSP) */
.at-0{left:0%}.at-1{left:1%}.at-2{left:2%}.at-3{left:3%}.at-4{left:4%}.at-5{left:5%}.at-6{left:6%}.at-7{left:7%}.at-8{left:8%}.at-9{left:9%}
.at-10{left:10%}.at-11{left:11%}.at-12{left:12%}.at-13{left:13%}.at-14{left:14%}.at-15{left:15%}.at-16{left:16%}.at-17{left:17%}.at-18{left:18%}.at-19{left:19%}
.at-20{left:20%}.at-21{left:21%}.at-22{left:22%}.at-23{left:23%}.at-24{left:24%}.at-25{left:25%}.at-26{left:26%}.at-27{left:27%}.at-28{left:28%}.at-29{left:29%}
.at-30{left:30%}.at-31{left:31%}.at-32{left:32%}.at-33{left:33%}.at-34{left:34%}.at-35{left:35%}.at-36{left:36%}.at-37{left:37%}.at-38{left:38%}.at-39{left:39%}
.at-40{left:40%}.at-41{left:41%}.at-42{left:42%}.at-43{left:43%}.at-44{left:44%}.at-45{left:45%}.at-46{left:46%}.at-47{left:47%}.at-48{left:48%}.at-49{left:49%}
.at-50{left:50%}.at-51{left:51%}.at-52{left:52%}.at-53{left:53%}.at-54{left:54%}.at-55{left:55%}.at-56{left:56%}.at-57{left:57%}.at-58{left:58%}.at-59{left:59%}
.at-60{left:60%}.at-61{left:61%}.at-62{left:62%}.at-63{left:63%}.at-64{left:64%}.at-65{left:65%}.at-66{left:66%}.at-67{left:67%}.at-68{left:68%}.at-69{left:69%}
.at-70{left:70%}.at-71{left:71%}.at-72{left:72%}.at-73{left:73%}.at-74{left:74%}.at-75{left:75%}.at-76{left:76%}.at-77{left:77%}.at-78{left:78%}.at-79{left:79%}
.at-80{left:80%}.at-81{left:81%}.at-82{left:82%}.at-83{left:83%}.at-84{left:84%}.at-85{left:85%}.at-86{left:86%}.at-87{left:87%}.at-88{left:88%}.at-89{left:89%}
.at-90{left:90%}.at-91{left:91%}.at-92{left:92%}.at-93{left:93%}.at-94{left:94%}.at-95{left:95%}.at-96{left:96%}.at-97{left:97%}.at-98{left:98%}.at-99{left:99%}.at-100{left:100%}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (forced-colors: active) {
  .bar { forced-color-adjust: none; }
  .bar-none { background: GrayText; }
}
