@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/inter.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #e9f0f7;
  --panel: #ffffff;
  --panel2: #f5f8fc;
  --ink: #080c0d;
  --ink2: #33404a;
  --ink3: #52616a;
  --ink4: #62717a;
  --line: rgba(11, 45, 70, 0.07);
  --hair: rgba(11, 45, 70, 0.1);
  --hairhover: rgba(11, 45, 70, 0.18);
  --accent: #087be8;
  --accent-solid: #0873d9;
  --accent-on: #ffffff;
  --accent-tint: #e3f3fd;
  --up: #387f22;
  --up-bar: #4f9a37;
  --up-bg: #eaf5e4;
  --up-border: #a1be94;
  --degraded: #946713;
  --degraded-bar: #d8a03a;
  --degraded-bg: #fdf3e0;
  --degraded-border: #cbb590;
  --down: #c0341f;
  --down-bar: #d64a33;
  --down-bg: #fce9e6;
  --down-border: #e0a0a0;
  --unknown: #52616a;
  --unknown-bar: rgba(11, 45, 70, 0.12);
  --unknown-bg: #f5f8fc;
  --unknown-border: rgba(11, 45, 70, 0.18);
  --shadow-card: 0 1px 2px rgba(8, 45, 82, 0.04), 0 2px 6px -1px rgba(8, 45, 82, 0.05);
  --shadow-button: 0 3px 8px -2px rgba(8, 115, 217, 0.4);
  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-micro: 6px;
  --r-control: 12px;
  --r-card: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121212;
    --panel: #1e1e1e;
    --panel2: #272727;
    --ink: #f5f5f0;
    --ink2: #c9c9c0;
    --ink3: #a2a29a;
    --ink4: #8d8d86;
    --line: rgba(255, 255, 255, 0.1);
    --hair: rgba(255, 255, 255, 0.18);
    --hairhover: rgba(255, 255, 255, 0.3);
    --accent: #00befa;
    --accent-solid: #00befa;
    --accent-on: #002339;
    --accent-tint: #002339;
    --up: #66c247;
    --up-bar: #4fa83a;
    --up-bg: #17280f;
    --up-border: #304e22;
    --degraded: #e0a94a;
    --degraded-bar: #c99232;
    --degraded-bg: #2a2113;
    --degraded-border: #564428;
    --down: #f0685c;
    --down-bar: #e0574a;
    --down-bg: #2c1714;
    --down-border: #5a2f2a;
    --unknown: #a2a29a;
    --unknown-bar: rgba(255, 255, 255, 0.12);
    --unknown-bg: #272727;
    --unknown-border: rgba(255, 255, 255, 0.18);
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-button: 0 3px 10px -2px rgba(0, 190, 250, 0.35);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
}

::selection {
  background: var(--accent-tint);
  color: var(--ink);
}

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

h1,
h2,
h3,
p,
dl,
dd,
ol {
  margin: 0;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.num {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.icon {
  flex: none;
  display: block;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--panel);
  border-radius: var(--r-control);
  box-shadow: var(--shadow-card);
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* Top bar */

.top {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 26px;
  width: auto;
}

.brand-sep {
  width: 1px;
  height: 20px;
  background: var(--hair);
}

.brand-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink3);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), filter 160ms var(--ease), transform 160ms var(--ease);
}

.button:active {
  transform: scale(0.98);
}

.button.primary {
  background: var(--accent-solid);
  color: var(--accent-on);
  box-shadow: var(--shadow-button);
}

.button.primary:hover {
  filter: brightness(1.05);
}

.button.outline {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--hair);
  box-shadow: 0 1px 2px rgba(8, 45, 82, 0.05);
}

.button.outline:hover {
  border-color: var(--hairhover);
}

.button[disabled] {
  cursor: progress;
  opacity: 0.7;
}

/* Summary */

main.wrap {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 48px;
}

#status {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 16px;
  row-gap: 12px;
  padding: 24px;
  border-radius: var(--r-card);
  border: 1px solid var(--look-border);
  background: var(--look-bg);
}

.summary-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--look);
  box-shadow: 0 1px 2px rgba(8, 45, 82, 0.06);
}

.summary h1 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.summary p {
  margin-top: 4px;
  color: var(--ink2);
}

.summary .updated {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--ink3);
  margin: 0;
}

@media (min-width: 640px) {
  .summary {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .summary .updated {
    grid-column: auto;
    align-self: start;
    margin-top: 6px;
  }
}

[data-look="up"] {
  --look: var(--up);
  --look-bar: var(--up-bar);
  --look-bg: var(--up-bg);
  --look-border: var(--up-border);
}

[data-look="degraded"] {
  --look: var(--degraded);
  --look-bar: var(--degraded-bar);
  --look-bg: var(--degraded-bg);
  --look-border: var(--degraded-border);
}

[data-look="down"] {
  --look: var(--down);
  --look-bar: var(--down-bar);
  --look-bg: var(--down-bg);
  --look-border: var(--down-border);
}

[data-look="unknown"] {
  --look: var(--unknown);
  --look-bar: var(--unknown-bar);
  --look-bg: var(--unknown-bg);
  --look-border: var(--unknown-border);
}

/* Sections */

section > h2 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
}

.section-help {
  margin-top: 4px;
  color: var(--ink3);
  font-size: 0.8125rem;
  max-width: 62ch;
}

.empty {
  margin-top: 12px;
  padding: 16px 20px;
  border-radius: var(--r-card);
  border: 1px dashed var(--hair);
  color: var(--ink3);
}

/* Services */

.services {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

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

.service summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  transition: background-color 160ms var(--ease);
}

.service summary::-webkit-details-marker {
  display: none;
}

.service summary:hover {
  background: var(--panel2);
}

.service summary:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}

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

.service-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: var(--look);
  white-space: nowrap;
}

.bars {
  display: grid;
  grid-template-columns: repeat(90, 1fr);
  gap: 2px;
  height: 28px;
}

.bar {
  border-radius: 2px;
  background: var(--look-bar);
  transition: transform 160ms var(--ease), filter 160ms var(--ease);
  transform-origin: bottom;
}

.bar:hover {
  transform: scaleY(1.12);
  filter: brightness(1.08);
}

.bars-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}

.bars-legend .narrow {
  display: none;
}

@media (max-width: 599px) {
  .bars {
    grid-template-columns: repeat(30, 1fr);
    gap: 3px;
  }

  .bars .bar:nth-child(-n + 60) {
    display: none;
  }

  .bars-legend .wide {
    display: none;
  }

  .bars-legend .narrow {
    display: inline;
  }
}

.facts {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service[open] .facts {
  animation: reveal 220ms var(--ease);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.impact {
  color: var(--ink2);
}

.detail {
  padding: 10px 12px;
  border-radius: var(--r-control);
  background: var(--look-bg);
  border: 1px solid var(--look-border);
  color: var(--ink);
}

.facts dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  overflow: hidden;
}

.facts dl > div {
  background: var(--panel2);
  padding: 10px 12px;
}

.facts dl > div:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 600px) {
  .facts dl {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.facts dt {
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--ink3);
}

.facts dd {
  margin-top: 2px;
  color: var(--ink);
}

/* Incidents */

.incidents,
.history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history {
  margin-top: 16px;
}

.incident {
  padding: 18px 20px;
  border-radius: var(--r-card);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.incident[data-active="true"] {
  background: var(--look-bg);
  border-color: var(--look-border);
  box-shadow: none;
}

.incident header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.incident-icon {
  color: var(--look);
  margin-top: 1px;
}

.incident h3 {
  font-size: 0.875rem;
  font-weight: 600;
}

.incident .meta {
  margin-top: 2px;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--ink3);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 8px;
  border-left: 1px solid var(--hair);
}

.timeline li {
  position: relative;
  padding: 0 0 14px 22px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--panel);
  border: 1.5px solid var(--ink4);
}

.timeline li:first-child::before {
  background: var(--look);
  border-color: var(--look);
}

.phase {
  font-weight: 500;
  margin-right: 8px;
}

.timeline time {
  font-size: 0.75rem;
  color: var(--ink3);
}

.timeline p {
  margin-top: 2px;
  color: var(--ink2);
  max-width: 65ch;
}

/* Self test */

.selftest {
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.selftest-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.copy-feedback {
  font-size: 0.75rem;
  color: var(--up);
}

.selftest-result:not(:empty) {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verdict {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-control);
  background: var(--look-bg);
  border: 1px solid var(--look-border);
}

.verdict .icon {
  color: var(--look);
  margin-top: 1px;
}

.verdict strong {
  display: block;
  font-weight: 600;
}

.verdict p {
  color: var(--ink2);
  margin-top: 2px;
}

.probe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.probe-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--ink3);
  padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--line);
}

.probe-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.probe-table tr:last-child td {
  border-bottom: 0;
}

.probe-table .cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--look);
  font-weight: 500;
}

.probe-table .sub {
  display: block;
  color: var(--ink3);
  font-size: 0.75rem;
  font-weight: 400;
}

.probe-table td:first-child {
  color: var(--ink);
  font-weight: 500;
}

.pending {
  color: var(--ink3);
}

.network {
  font-size: 0.75rem;
  color: var(--ink3);
}

@media (max-width: 599px) {
  .probe-table thead {
    display: none;
  }

  .probe-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .probe-table td {
    padding: 0;
    border: 0;
  }

  .probe-table td:first-child {
    grid-column: 1 / -1;
  }

  .probe-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    color: var(--ink3);
    font-weight: 400;
  }
}

/* Footer */

.wrap.foot {
  padding-bottom: 40px;
}

.foot p {
  font-size: 0.75rem;
  color: var(--ink3);
  max-width: 70ch;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
