/* The brand's design v2 tokens (web.home, web.console), light and dark from the system. */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --bg-1: #ffffff;
  --bg-2: #f4f4f5;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --fg: #18181b;
  --fg-2: #52525b;
  --fg-3: #71717a;
  --acc: #ffc94d;
  --acc-ink: #1a1400;
  --ok: #047857;
  --degraded: #b45309;
  --partial: #c2410c;
  --outage: #dc2626;
  --maint: #2563eb;
  --none: #e4e4e7;
  --bar-ok: #10b981;
  --bar-degraded: #f59e0b;
  --bar-partial: #f97316;
  --bar-outage: #ef4444;
  --bar-maint: #3b82f6;
  --shadow: 0 12px 40px rgb(0 0 0 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --bg-1: #0f0f12;
    --bg-2: #16161a;
    --line: #232329;
    --line-2: #2e2e35;
    --fg: #f4f4f5;
    --fg-2: #a1a1aa;
    --fg-3: #83838c;
    --ok: #34d399;
    --degraded: #fbbf24;
    --partial: #fb923c;
    --outage: #f87171;
    --maint: #60a5fa;
    --none: #2e2e35;
    --bar-ok: #34d399;
    --bar-degraded: #fbbf24;
    --bar-partial: #fb923c;
    --bar-outage: #f87171;
    --bar-maint: #60a5fa;
    --shadow: 0 12px 40px rgb(0 0 0 / 0.5);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size-adjust: from-font;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

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

.muted {
  color: var(--fg-3);
}

.small {
  font-size: 13px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header and footer. */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.mark {
  width: 24px;
  height: 24px;
  flex: none;
}

.mark .cloud {
  fill: var(--acc);
}

.word {
  display: inline-flex;
  align-items: baseline;
}

.word svg {
  height: 0.74em;
  width: auto;
  margin-right: 0.03em;
  overflow: visible;
}

.sep {
  color: var(--line-2);
  font-weight: 400;
}

.what {
  color: var(--fg-2);
  font-weight: 500;
}

.top nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.top nav a {
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--fg-2);
  font-size: 14px;
  text-decoration: none;
}

.top nav a:hover {
  color: var(--fg);
  background: var(--bg-2);
}

.top nav a.btn {
  margin-left: 4px;
  background: var(--acc);
  color: var(--acc-ink);
  font-weight: 500;
}

.top nav a.btn:hover {
  background: color-mix(in srgb, var(--acc) 88%, #000);
}

@media (max-width: 520px) {
  .top nav a.btn {
    display: none;
  }
  .top nav a {
    padding-inline: 8px;
  }
}

footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--fg-3);
  font-size: 13px;
}

footer .wrap {
  display: grid;
  gap: 8px;
  padding-block: 28px 36px;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--fg);
  text-decoration: underline;
}

main.wrap {
  padding-block: 40px 64px;
  display: grid;
  gap: 40px;
}

main > section {
  display: grid;
  gap: 14px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.sec-head h2,
h2.sec {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sec-head a {
  color: var(--fg-2);
  font-size: 14px;
  text-decoration: none;
}

.sec-head a:hover {
  color: var(--fg);
}

.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Levels: the color of a state. */

.lvl-ok {
  --c: var(--ok);
  --b: var(--bar-ok);
}
.lvl-degraded {
  --c: var(--degraded);
  --b: var(--bar-degraded);
}
.lvl-partial {
  --c: var(--partial);
  --b: var(--bar-partial);
}
.lvl-outage {
  --c: var(--outage);
  --b: var(--bar-outage);
}
.lvl-maint {
  --c: var(--maint);
  --b: var(--bar-maint);
}
.lvl-none {
  --c: var(--fg-3);
  --b: var(--none);
}

/* The banner. */

.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
  background: color-mix(in srgb, var(--c) 7%, var(--bg-1));
}

.hero h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--fg-2);
}

.hero-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent);
  display: grid;
  place-items: center;
}

.hero-icon::after {
  content: "";
  width: 14px;
  height: 8px;
  border: solid var(--bg-1);
  border-width: 0 0 3px 3px;
  transform: translateY(-2px) rotate(-45deg);
}

.hero:not(.lvl-ok) .hero-icon::after {
  width: 3px;
  height: 14px;
  border: 0;
  border-radius: 2px;
  background: var(--bg-1);
  transform: none;
  box-shadow: 0 9px 0 -0.5px var(--bg-1);
  margin-top: -6px;
}

/* Groups and components. */

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 4px;
}

.group-head h3 {
  font-size: 15px;
  font-weight: 600;
}

.group-head .muted {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.comps {
  list-style: none;
  margin: 0;
  padding: 0 20px 6px;
}

.comp {
  padding: 14px 0 12px;
}

.comp + .comp {
  border-top: 1px solid var(--line);
}

.comp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.name {
  font-weight: 500;
}

.st {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--c);
  font-size: 13px;
  font-weight: 500;
}

.st::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
}

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

.bars li {
  flex: 1;
  min-width: 0;
  border-radius: 2px;
  background: var(--b);
  transition: opacity 0.15s;
}

.bars:hover li {
  opacity: 0.55;
}

.bars li:hover {
  opacity: 1;
}

.bars-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--fg-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bars-foot .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.bars-foot .d30 {
  display: none;
}

@media (max-width: 640px) {
  .bars li:nth-child(-n + 60) {
    display: none;
  }
  .bars-foot .d90 {
    display: none;
  }
  .bars-foot .d30 {
    display: inline;
  }
}

/* Incidents. */

.incident {
  padding: 18px 20px;
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--c);
}

.incident-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.incident-head a {
  text-decoration: none;
}

.incident-head a:hover h3 {
  text-decoration: underline;
}

.incident h3 {
  font-size: 16px;
  font-weight: 600;
}

.body {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.pill {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
}

section > .incident + .incident {
  margin-top: 10px;
}

.days {
  padding: 4px 20px;
}

.day {
  padding: 14px 0;
  display: grid;
  gap: 8px;
}

.day + .day,
.days > .line + .line {
  border-top: 1px solid var(--line);
}

.day h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
}

.line {
  display: grid;
  gap: 3px;
}

.days > .line {
  padding: 14px 0;
}

.line .title {
  font-weight: 600;
  color: var(--c);
  text-decoration: none;
  justify-self: start;
}

.line .title:hover {
  text-decoration: underline;
}

.line p:not(.muted) {
  color: var(--fg-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}

.crumb a,
.more a {
  color: var(--fg-2);
  font-size: 14px;
  text-decoration: none;
}

.crumb a:hover,
.more a:hover {
  color: var(--fg);
}

.page-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.incident-full {
  padding: 24px;
  display: grid;
  gap: 8px;
}

.incident-full h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.timeline {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.u-status {
  font-weight: 600;
}

@media (max-width: 640px) {
  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Response time. */

.tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
}

.sec-head .tabs a {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.sec-head .tabs a[aria-current] {
  background: var(--bg-2);
  color: var(--fg);
  font-weight: 500;
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.chart-card {
  padding: 14px 16px 12px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.chart {
  position: relative;
  height: 72px;
}

.chart.empty {
  border-bottom: 1px dashed var(--line-2);
}

.chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart path {
  vector-effect: non-scaling-stroke;
  fill: none;
}

.chart .grid {
  stroke: var(--line);
  stroke-dasharray: 3 3;
}

.chart .area {
  fill: color-mix(in srgb, var(--acc) 22%, transparent);
}

.chart .avg {
  stroke: color-mix(in srgb, var(--acc) 70%, var(--fg));
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.chart .max {
  stroke: var(--fg-3);
  stroke-width: 1;
  opacity: 0.45;
}

.chart .scale {
  position: absolute;
  top: -2px;
  right: 0;
  color: var(--fg-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: var(--bg-1);
  padding-left: 4px;
  line-height: 1;
}

.chart .scale.mid {
  top: calc(50% - 6px);
}

.chart .cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--fg-3);
  pointer-events: none;
}

/* The tooltip (public/app.js). */

#tip {
  position: fixed;
  z-index: 20;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
  pointer-events: none;
}

#tip::first-line {
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .bars li {
    transition: none;
  }
}
