:root {
  --azure: #2b4f8e;
  --bg: light-dark(#ffffff, #09090b);
  --surface: light-dark(#ffffff, #111114);
  --surface-2: light-dark(#f4f4f5, #18181b);
  --border: light-dark(#e4e4e7, #27272a);
  --text: light-dark(#09090b, #fafafa);
  --text-2: light-dark(#3f3f46, #d4d4d8);
  --muted: light-dark(#6b6b74, #a1a1aa);
  --accent: light-dark(#2b4f8e, #8ea6d6);
  --accent-hover: light-dark(#0f1e3d, #b6c6e6);
  --accent-soft: light-dark(#eef2f9, #141c2e);
  --up: light-dark(#15803d, #4ade80);
  --up-bar: light-dark(#22c55e, #22c55e);
  --minor-bar: light-dark(#eab308, #ca8a04);
  --mid-bar: light-dark(#f97316, #ea580c);
  --down: light-dark(#b91c1c, #f87171);
  --down-bar: light-dark(#dc2626, #dc2626);
  --down-soft: light-dark(#fef2f2, #1f1012);
  --up-soft: light-dark(#f0fdf4, #0c1a11);
  --none-bar: light-dark(#e4e4e7, #27272a);
  --radius: 10px;
  --radius-lg: 12px;
  color-scheme: light dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 { font-weight: 600; text-wrap: balance; margin: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 24px; }

.site-header { border-bottom: 1px solid var(--border); }

.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand:hover { color: var(--text); }
.brand picture { display: contents; }
.brand img { display: block; width: 34px; height: auto; }

.product {
  color: var(--muted);
  font-weight: 500;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.site-nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.site-nav a { color: var(--text-2); text-decoration: none; }
.site-nav a:hover { color: var(--text); }

main { flex: 1; padding: 40px 0 56px; }

.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.banner h1 { font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; }
.banner p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.banner-operational { background: var(--up-soft); }
.banner-partial_outage, .banner-major_outage { background: var(--down-soft); }

.dot {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
}

.dot-operational { background: var(--up-bar); box-shadow: 0 0 0 4px light-dark(#dcfce7, #14532d); }
.dot-partial_outage, .dot-major_outage, .dot-down {
  background: var(--down-bar);
  box-shadow: 0 0 0 4px light-dark(#fee2e2, #450a0a);
}

section { margin-top: 40px; }
section > h2 { font-size: 18px; margin-bottom: 14px; }

.components, .incidents { list-style: none; margin: 0; padding: 0; }

.components {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.component { padding: 20px 24px; }
.component + .component { border-top: 1px solid var(--border); }

.component-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.component-head h3 { font-size: 16px; }
.desc { margin: 0; color: var(--muted); font-size: 14px; }

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-operational, .pill-resolved { color: var(--up); }
.pill-down, .pill-ongoing { color: var(--down); }

.bars {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 16px 0 6px;
  padding: 0;
  height: 32px;
}

.bars li { flex: 1; min-width: 0; border-radius: 2px; background: var(--none-bar); }
.bars li:hover { opacity: 0.7; }
.bars .lvl-full { background: var(--up-bar); }
.bars .lvl-high { background: var(--minor-bar); }
.bars .lvl-mid { background: var(--mid-bar); }
.bars .lvl-low { background: var(--down-bar); }

.bars-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.bars-legend .uptime { color: var(--text-2); font-weight: 500; }
.span-30 { display: none; }

.meta { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.incident {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.incident + .incident { margin-top: 12px; }
.incident .component-head h3 { font-size: 15px; }

.incident dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 12px 0 0;
  font-size: 14px;
}

.incident dt { color: var(--muted); font-size: 12px; }
.incident dd { margin: 0; color: var(--text-2); }
.incident p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.empty {
  margin: 0;
  padding: 20px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.note { margin-top: 40px; color: var(--muted); font-size: 13px; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; padding-bottom: 20px; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--muted); }

/* Phones: the last 30 days, so each bar stays wide enough to see. */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-nav { display: none; }
  .bars li:nth-child(-n + 60) { display: none; }
  .span-90 { display: none; }
  .span-30 { display: inline; }
  .incident dl { grid-template-columns: minmax(0, 1fr); }
  .component, .banner { padding: 16px; }
}
