/* Pixelfish hosting status. Coastal palette, one typeface, one column. */
:root {
  --ink: #12303A;
  --ink-soft: #4E6670;
  --bg: #EEF4F2;
  --surface: #FFFFFF;
  --line: #D3E0DC;
  --operational: #2F7D6B;
  --maintenance: #3C6FB0;
  --degraded: #D9952B;
  --partial: #C2412D;
  --major: #9E2A1C;
  --unknown: #5B7078;
  --empty: #C9D8D3;
  --focus: #3C6FB0;
  --radius-lg: 14px;
  --radius-sm: 3px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E3EEEB;
    --ink-soft: #9DB4B0;
    --bg: #0E1F25;
    --surface: #142B33;
    --line: #23414A;
    --operational: #4FAE95;
    --maintenance: #6F9BE0;
    --degraded: #E9AE4C;
    --partial: #E2694F;
    --major: #F0846E;
    --unknown: #8EA3A9;
    --empty: #2A4851;
    --focus: #8FB6F0;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem 4rem; }

/* Masthead */
.masthead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 0 0;
}
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }
.masthead-note { color: var(--ink-soft); font-size: 0.9375rem; }

/* The answer: the one loud element on the page */
.answer {
  --c: var(--operational);
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem;
  padding: 3.5rem 0 2.75rem;
  border-bottom: 1px solid var(--line);
}
.answer-marker {
  width: 1.15rem; height: 1.15rem; margin-top: 0.85rem;
  border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 0.45rem color-mix(in srgb, var(--c) 18%, transparent);
}
.answer h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6.2vw, 3.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 16ch;
  text-wrap: balance;
}
.answer-sub { margin: 1rem 0 0; max-width: 34rem; font-size: 1.125rem; }
.meta { margin: 0.75rem 0 0; color: var(--ink-soft); font-size: 0.875rem; }
.answer.level-maintenance { --c: var(--maintenance); }
.answer.level-degraded    { --c: var(--degraded); }
.answer.level-partial     { --c: var(--partial); }
.answer.level-major       { --c: var(--major); }
.answer.level-unknown     { --c: var(--unknown); }
@media (prefers-reduced-motion: no-preference) {
  .answer:not(.level-operational):not(.level-unknown) .answer-marker { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse {
    50% { box-shadow: 0 0 0 0.8rem color-mix(in srgb, var(--c) 6%, transparent); }
  }
}

/* Sections */
.block { padding-top: 2.5rem; }
.block > h2 { margin: 0 0 1rem; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.0625rem; margin: 0; font-weight: 700; }

/* Live incidents */
.incident {
  background: var(--surface);
  border-left: 4px solid var(--c, var(--degraded));
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.25rem 1.25rem 1.1rem;
  margin-bottom: 1rem;
}
.incident h3 { font-size: 1.2rem; }
.incident-tags { margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: center; color: var(--ink-soft); font-size: 0.9375rem; }
.pill {
  display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--degraded)) 16%, transparent);
  color: var(--ink); font-size: 0.875rem; font-weight: 500;
}
.level-maintenance { --c: var(--maintenance); }
.level-degraded    { --c: var(--degraded); }
.level-partial     { --c: var(--partial); }
.level-major       { --c: var(--major); }
.level-operational { --c: var(--operational); }

.updates { list-style: none; margin: 1rem 0 0; padding: 0; }
.updates li { position: relative; padding: 0 0 0.9rem 1.1rem; border-left: 1px solid var(--line); margin-left: 0.25rem; }
.updates li:last-child { padding-bottom: 0; }
.updates li::before {
  content: ""; position: absolute; left: -0.28rem; top: 0.55rem;
  width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--line);
}
.updates li:first-child::before { background: var(--c, var(--ink-soft)); }
.update-head { margin: 0; display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.update-head time { color: var(--ink-soft); font-size: 0.875rem; }
.update-body { margin: 0.15rem 0 0; max-width: 38rem; }

/* Services */
.services { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-lg); }
.service { padding: 1.25rem; }
.service + .service { border-top: 1px solid var(--line); }
.service-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.service-desc { margin: 0.15rem 0 0; color: var(--ink-soft); font-size: 0.9375rem; }
.state { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; font-weight: 500; font-size: 0.9375rem; color: var(--c); }
.state .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c); }
@media (prefers-color-scheme: light) { .state { color: color-mix(in srgb, var(--c) 80%, var(--ink)); } }

.history { display: flex; gap: 2px; margin-top: 1rem; height: 2.1rem; }
.day { flex: 1 1 0; min-width: 0; border-radius: var(--radius-sm); background: var(--c); opacity: 0.9; }
.day.level-operational { opacity: 0.55; }
.day.level-future { background: var(--empty); }
.day:hover { opacity: 1; }
.history-scale { display: flex; justify-content: space-between; margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.8125rem; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0.9rem 0 0; padding: 0; color: var(--ink-soft); font-size: 0.875rem; }
.legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.key { width: 0.7rem; height: 0.7rem; border-radius: 2px; background: var(--c); }
.key.level-operational { opacity: 0.55; }

/* Past incidents */
.days { list-style: none; margin: 0; padding: 0; }
.day-row { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.day-row:first-child { border-top: 0; padding-top: 0; }
.day-date { font-size: 0.9375rem; color: var(--ink-soft); font-weight: 500; margin-bottom: 0.3rem; }
.quiet { margin: 0; color: var(--ink-soft); }
.days-note { font-size: 0.9375rem; margin-bottom: 0.5rem; }
.past { border-left: 3px solid var(--c, var(--degraded)); padding-left: 0.85rem; margin-top: 0.35rem; }
.past summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 0.1rem 0.75rem; align-items: baseline; list-style: none; }
.past summary::-webkit-details-marker { display: none; }
.past summary::after { content: "Show updates"; color: var(--ink-soft); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 0.18em; }
.past[open] summary::after { content: "Hide updates"; }
.past-title { font-weight: 700; }
.past-meta { color: var(--ink-soft); font-size: 0.9375rem; }
.past .updates { margin-top: 0.75rem; }

/* Footer */
.foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.foot p { margin: 0; max-width: 38rem; }
.foot .meta { margin-top: 0.6rem; }

@media (max-width: 34rem) {
  body { font-size: 1rem; }
  .answer { padding-top: 2.5rem; gap: 0.9rem; }
  .answer-marker { width: 0.9rem; height: 0.9rem; margin-top: 0.6rem; }
  .service-head { flex-direction: column; gap: 0.5rem; }
  .history { gap: 1px; height: 1.8rem; }
  .day { border-radius: 1px; }
}
