:root {
  --color-background: #f7f8f5;
  --color-surface: #ffffff;
  --color-text: #18211d;
  --color-muted: #5c6862;
  --color-border: #dfe4df;
  --color-action: #26342d;
  --color-action-hover: #15201a;
  --color-focus: #8fbda4;
  --color-success: #276244;
  --color-error: #8b2f25;
  --color-suspected-surface: #fff3df;
  --color-suspected-border: #e6ad55;
  --color-suspected-text: #7a3c05;
  --color-critical-surface: #ffebe8;
  --color-critical-border: #dc7469;
  --color-critical-text: #8c201b;
  color: var(--color-text);
  background: var(--color-background);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  background: var(--color-background);
  transition: background-color 180ms ease;
}

body.suspected {
  background: #fffaf2;
}

body.critical {
  background: #fff7f5;
}

.shell {
  width: min(100% - 2rem, 76rem);
  margin: 0 auto;
  padding: 3rem 0;
}

.masthead {
  margin-bottom: 2rem;
}

.target {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1.25rem;
  line-height: 1.5;
}

.target a {
  color: var(--color-muted);
  overflow-wrap: anywhere;
  text-underline-offset: 0.2em;
}

.eyebrow,
.status-label {
  margin: 0 0 0.5rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  letter-spacing: -0.055em;
}

.status-card {
  position: relative;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  background: var(--color-surface);
  box-shadow: 0 1rem 3rem rgb(30 44 36 / 6%);
}

.status-card.healthy {
  box-shadow: inset 0 0.25rem 0 #7fb393, 0 1rem 3rem rgb(30 44 36 / 6%);
}

.status-card.suspected {
  border-color: var(--color-suspected-border);
  color: var(--color-suspected-text);
  background: var(--color-suspected-surface);
  box-shadow: 0 1rem 3rem rgb(122 60 5 / 9%);
}

.status-card.critical {
  border-color: var(--color-critical-border);
  color: var(--color-critical-text);
  background: var(--color-critical-surface);
  box-shadow: 0 1rem 3rem rgb(140 32 27 / 10%);
}

.check-action {
  margin: 1.5rem 0 0;
}

.check-action button {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-action);
  border-radius: 999px;
  color: #fff;
  background: var(--color-action);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.check-action button:hover {
  background: var(--color-action-hover);
}

.check-action button:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.check-action button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.status-card h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  letter-spacing: -0.035em;
}

.status-copy {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--color-muted);
  line-height: 1.6;
}

.suspected .status-copy,
.critical .status-copy {
  color: currentColor;
}

.countdown-block,
.escalation-message {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid currentColor;
}

.countdown-block {
  display: grid;
  gap: 0.35rem;
}

.countdown-block span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown-block strong {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.5rem, 10vw, 5rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.escalation-message strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.escalation-message p {
  margin-bottom: 0;
  line-height: 1.6;
}

.summary-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
}

.summary-list div {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.summary-list dt {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.summary-list dd {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.checks,
.history {
  margin-top: 3rem;
}

.section-heading h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.check-list {
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
}

.check-item {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.check-name {
  font-weight: 700;
}

.check-result {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--color-error);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.check-result.is-ok {
  color: var(--color-success);
}

.history-list {
  display: grid;
  gap: 0.75rem;
}

.history-item {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: var(--color-surface);
}

.history-item > div,
.history-item dl,
.history-item dl div {
  display: grid;
  gap: 0.35rem;
}

.history-item > div {
  margin-bottom: 1rem;
}

.history-item time,
.history-item dt {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.history-item dl {
  margin: 0;
  gap: 0.75rem;
}

.history-item dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 48rem) {
  .shell {
    padding: 5rem 0;
  }

  .summary-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .check-item {
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: start;
  }

  .status-card .check-action {
    position: absolute;
    top: 2rem;
    right: 2rem;
  }

  .history-item {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 2rem;
  }

  .history-item > div {
    margin-bottom: 0;
  }

  .history-item dl {
    grid-template-columns: 8rem 8rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
