/* status.gethumandesign.com — self-contained, no imports, no webfonts.
 *
 * The palette is copied from the app's tokens.css rather than shared, which is
 * the one duplication this page accepts on purpose: importing it would couple
 * the status page's rendering to the app's build output, and the whole point is
 * that this page has nothing to do with that build. It is ~20 values and they
 * move about once a year.
 *
 * System fonts, deliberately. The brand's Fraunces/Inter files are five requests
 * and ~120 KB served from an origin that would have to be kept in step with this
 * one; on a page whose entire virtue is loading when other things are broken,
 * that is a bad trade for a nicer heading.
 */

:root {
  color-scheme: light;
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1a1613;
  --text-mid: #5c5550;
  --text-soft: #8a837c;
  --accent: #c4622d;
  --border: #e2ddd6;
  --danger: #c0392b;
  --success: #27ae60;
  --warn: #d97706;
  --none: #d8d2ca;
  --card-shadow: 0 1px 3px rgba(26, 22, 19, 0.04), 0 4px 16px rgba(26, 22, 19, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141210;
    --surface: #201e1b;
    --text: #ede9e3;
    --text-mid: #a9a29a;
    --text-soft: #716b64;
    --accent: #e07a3e;
    --border: #2e2b27;
    --danger: #e74c3c;
    --success: #2ecc71;
    --warn: #e67e22;
    --none: #38342f;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

/* ── Masthead ───────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 0;
}

.wordmark {
  text-decoration: none;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.wordmark-get {
  color: var(--accent);
  font-weight: 500;
}

.wordmark-rest {
  color: var(--text);
  font-weight: 700;
}

.masthead-label {
  color: var(--text-soft);
  font-size: 13px;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ── Banner ─────────────────────────────────────────────────────────────── */

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.banner h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.banner-ok .banner-dot {
  background: var(--success);
}
.banner-warn .banner-dot {
  background: var(--warn);
}
.banner-down .banner-dot {
  background: var(--danger);
}
.banner-ok {
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
}
.banner-warn {
  border-color: color-mix(in srgb, var(--warn) 40%, var(--border));
}
.banner-down {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

.staleness {
  margin: 0 0 8px;
  padding: 10px 14px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--text);
  font-size: 13px;
}

/* ── Service rows ───────────────────────────────────────────────────────── */

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

.service {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.service:last-child {
  border-bottom: 0;
}

.service-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 3px;
}

.service-name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-now {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.now-ok {
  color: var(--success);
}
.now-warn {
  color: var(--warn);
}
.now-down {
  color: var(--danger);
}
.now-none {
  color: var(--text-soft);
}

.service-desc {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 13px;
}

/* The 90-bar strip. Bars flex so the strip fits any width without a media
   query; min-width keeps them tappable-ish and stops 90 hairlines on a phone.
   The strip scrolls inside itself rather than widening the page. */
.strip {
  display: flex;
  gap: 2px;
  align-items: stretch;
  height: 34px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.strip::-webkit-scrollbar {
  display: none;
}

.bar {
  flex: 1 1 auto;
  min-width: 3px;
  border-radius: 2px;
  background: var(--none);
}

.bar-ok {
  background: var(--success);
}
.bar-warn {
  background: var(--warn);
}
.bar-down {
  background: var(--danger);
}

.strip-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
}

.strip-uptime {
  color: var(--text-mid);
}

/* ── Incidents ──────────────────────────────────────────────────────────── */

.incidents {
  margin-top: 34px;
}

.incidents h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 600;
}

.section-note {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.incident {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.incident-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.incident-what {
  font-weight: 600;
}

.incident-when {
  color: var(--text-soft);
  font-size: 13px;
}

.empty {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 14px;
}

/* ── Foot ───────────────────────────────────────────────────────────────── */

.foot {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 48px;
  color: var(--text-soft);
  font-size: 13px;
}

.foot p {
  margin: 0 0 8px;
}

.foot-links a {
  margin-right: 16px;
}

@media (max-width: 560px) {
  .service-head {
    flex-wrap: wrap;
    gap: 4px;
  }
  .strip {
    height: 30px;
  }
}
