:root {
  --page-bg: #f8f5ef;
  --surface: #fffdf8;
  --text: #2b2926;
  --muted: #7b7167;
  --line: #e1d9cc;
  --line-strong: #cfc5b6;
  --link: #6f6258;
  --primary: #6f6258;
  --accent: #8a7b6d;
  --success: #76ad2a;
  --degraded: #faa72a;
  --partial: #e86235;
  --outage: #c32929;
  --maintenance: #9f988d;
  --no-data: rgba(222, 220, 209, 0.55);
  --content-width: 900px;
  --font-family: Inter, "Segoe UI", Arial, sans-serif;
}

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

body {
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.status-container,
.status-page-shell {
  width: min(100% - 40px, var(--content-width));
  margin: 0 auto;
}

.status-header {
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 239, 0.96);
}

.status-header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: auto;
  height: 34px;
  flex: 0 0 auto;
  display: block;
}

.support-link,
.section-heading a,
.status-footer a {
  color: var(--link);
  font-size: 14px;
}

.status-page-shell {
  padding: 54px 0 72px;
}

.overall-section {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.overall-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.overall-heading h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.overall-section p {
  margin: 12px 0 0 31px;
  color: var(--muted);
}

.status-dot,
.legend-swatch {
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 999px;
}

.status-dot {
  width: 17px;
  height: 17px;
}

.status-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.status-section:last-of-type {
  border-bottom: 0;
}

.section-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.3;
}

.component-list {
  display: grid;
  gap: 28px;
}

.component-row {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.component-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.component-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.component-main p {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.component-state {
  min-width: 160px;
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-label {
  color: var(--success);
  font-size: 14px;
  font-weight: 700;
}

.status-label.status-no-data-text {
  color: var(--muted);
}

.history-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(90, minmax(2px, 1fr));
  gap: 2px;
}

.history-cell {
  position: relative;
  min-width: 0;
  height: 34px;
  border-radius: 1px;
  outline: none;
}

.history-cell::before,
.history-tooltip {
  position: absolute;
  left: 50%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.history-tooltip {
  bottom: calc(100% + 10px);
  width: 278px;
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 14px 34px rgba(43, 41, 38, 0.14);
}

.tooltip-date {
  color: var(--muted);
  font-size: 12px;
}

.tooltip-message {
  color: var(--text);
}

.tooltip-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 62px;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.tooltip-status {
  min-width: 0;
  font-weight: 700;
}

.tooltip-metrics span:not(.tooltip-status) {
  display: grid;
  justify-items: start;
  gap: 1px;
}

.tooltip-metrics strong {
  font-size: 16px;
  line-height: 1;
}

.tooltip-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.tooltip-related {
  padding-top: 10px;
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.tooltip-related strong {
  color: var(--text);
  font-size: 12px;
}

.tooltip-response {
  color: var(--muted);
  font-size: 11px;
}

.history-cell::before {
  bottom: calc(100% + 5px);
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  content: "";
  rotate: 45deg;
}

.history-cell:hover::before,
.history-cell:hover .history-tooltip,
.history-cell:focus-visible .history-tooltip,
.history-cell:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.history-cell:hover {
  filter: brightness(1.04);
}

.history-cell:focus-visible {
  outline: 2px solid rgba(111, 98, 88, 0.38);
  outline-offset: 2px;
}

.history-scale {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.history-scale span:nth-child(2) {
  color: var(--text);
}

.legend-list {
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.legend-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
}

.status-operational {
  background: var(--success);
}

.status-degraded {
  background: var(--degraded);
}

.status-partial-outage {
  background: var(--partial);
}

.status-major-outage {
  background: var(--outage);
}

.status-maintenance {
  background: var(--maintenance);
}

.status-no-data {
  background: var(--no-data);
}

.incident-list {
  margin-top: 22px;
  display: grid;
  gap: 20px;
}

.incident-card {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.incident-card:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.incident-card p {
  color: var(--muted);
}

.incident-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.incident-heading p {
  margin: 5px 0 0;
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 4px;
  color: #fffefa;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.status-pill.status-no-data {
  color: var(--text);
}

.incident-updates {
  margin: 16px 0 0;
  padding-left: 22px;
}

.incident-updates li + li {
  margin-top: 14px;
}

.incident-updates strong {
  display: inline-block;
  margin-right: 8px;
}

.incident-updates span {
  color: var(--muted);
  font-size: 13px;
}

.incident-updates p {
  margin: 4px 0 0;
}

.status-footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.status-footer .status-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 760px) {
  .status-container,
  .status-page-shell {
    width: min(100% - 28px, var(--content-width));
  }

  .status-header-inner,
  .section-heading,
  .status-footer .status-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-header-inner {
    min-height: 74px;
    justify-content: center;
  }

  .status-page-shell {
    padding: 38px 0 54px;
  }

  .overall-heading {
    align-items: flex-start;
  }

  .overall-section p {
    margin-left: 0;
  }

  .component-main,
  .incident-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .component-state {
    justify-items: start;
  }

  .history-grid {
    grid-template-columns: repeat(45, minmax(3px, 1fr));
  }

  .history-cell {
    height: 22px;
  }
}

.status-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: min(100% - 40px, var(--content-width));
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-breadcrumb a {
  color: var(--link);
  text-decoration: none;
}

.status-breadcrumb strong {
  color: var(--text);
  font-weight: 800;
}
