:root {
  --bg: #f7f8f4;
  --ink: #17201c;
  --ink-secondary: rgba(23, 32, 28, 0.68);
  --ink-muted: #657069;
  --accent: #137a55;
  --ok: #4fbd8e;
  --degraded: #c39842;
  --down: #c65a49;
  --unknown: rgba(23, 32, 28, 0.1);
  --line: rgba(23, 32, 28, 0.12);
  --control-bg: rgba(255, 255, 255, 0.46);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.wrap {
  margin: 0 auto;
  max-width: 720px;
  padding: 56px 24px 72px;
}

header {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 44px;
}

header svg {
  color: var(--accent);
  flex: none;
  height: 43px;
  width: 26px;
}

header .name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

header .name span {
  color: var(--ink-muted);
  font-weight: 450;
}

.overall {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 42px;
}

.overall[hidden] {
  display: none;
}

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

.overall .dot.degraded,
.overall .dot.delayed {
  background: var(--degraded);
}

.overall .dot.down {
  background: var(--down);
}

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

.overall p {
  color: var(--ink-secondary);
  font-size: 14px;
}

.history-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.history-toolbar .label {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.range-picker {
  background: var(--control-bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  padding: 2px;
}

.range-picker button {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--ink-muted);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1;
  min-width: 36px;
  padding: 7px 8px;
}

.range-picker button:hover {
  color: var(--ink);
}

.range-picker button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.range-picker button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.notice {
  color: var(--ink-secondary);
  font-size: 12.5px;
  margin: -18px 0 26px;
}

.notice:empty {
  display: none;
}

main[aria-busy="true"] {
  opacity: 0.72;
}

.group {
  margin-bottom: 40px;
}

.group h2 {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.service {
  margin-bottom: 28px;
}

.service .row {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.service .row .n {
  font-size: 15px;
  font-weight: 550;
}

.service .row .s {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.service .row .s.degraded,
.service .row .s.delayed {
  color: #8b691f;
}

.service .row .s.down {
  color: var(--down);
}

.bars {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(60, minmax(0, 1fr));
  height: 22px;
}

.bars span {
  background: var(--unknown);
  border-radius: 2px;
  min-width: 0;
}

.bars span.ok {
  background: var(--ok);
}

.bars span.degraded {
  background: var(--degraded);
}

.bars span.down {
  background: var(--down);
}

.service .meta {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 7px;
}

.service .meta span {
  color: var(--ink-muted);
  font-size: 12px;
}

.service .meta span:last-child {
  text-align: right;
}

.incident-history {
  border-top: 1px solid var(--line);
  margin-top: 52px;
  padding-top: 28px;
}

.incident-history > h2 {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.incident {
  margin-top: 18px;
}

.incident-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.incident h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.incident-time {
  color: var(--ink-muted);
  font-size: 12.5px;
  margin-top: 3px;
}

.incident-status {
  background: rgba(79, 189, 142, 0.12);
  border: 1px solid rgba(19, 122, 85, 0.2);
  border-radius: 999px;
  color: var(--accent);
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 9px;
}

.incident > p {
  color: var(--ink-secondary);
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 68ch;
}

.incident > p + p {
  margin-top: 15px;
}

.incident > p strong {
  color: var(--ink);
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

footer {
  color: var(--ink-muted);
  font-size: 12.5px;
  margin-top: 56px;
}

.unavailable {
  color: var(--ink-secondary);
  font-size: 14px;
}

@media (max-width: 480px) {
  .wrap {
    padding: 36px 18px 56px;
  }

  .history-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .range-picker {
    width: 100%;
  }

  .range-picker button {
    flex: 1;
  }

  .bars {
    gap: 2px;
  }

  .bars span {
    border-radius: 1px;
  }

  .incident-heading {
    display: block;
  }

  .incident-status {
    display: inline-block;
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
