:root {
  /* Warm off-white ground, near-black ink -- sampled close to the reference page. */
  --bg: #F5F3EC;
  --surface: #FBFAF6;
  --ink: #1A1915;
  --ink-soft: #46443C;
  --muted: #79766B;
  --border: #E3DFD3;
  --border-strong: #D6D1C2;

  --ok: #6B9F3D;
  --ok-tick: #6B9F3D;
  --warn: #D08A2C;
  --warn-tick: #E0A32F;
  --down: #C0452F;
  --down-tick: #C0452F;
  --maint: #6E8BA8;
  --empty: #DFDACC;

  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 900px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
}

.muted { color: var(--muted); }

/* ---------- Topbar ---------- */

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  padding-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand__logo {
  height: 34px;
  width: auto;
  max-width: 44px;
  display: block;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
  line-height: 1.1;
  white-space: nowrap;
}

.subscribe-btn {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: #fff;
  background: #16150F;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.06s ease;
}

.subscribe-btn:hover { background: #2E2C22; }
.subscribe-btn:active { transform: translateY(1px); }
.subscribe-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Status banner ---------- */

.banner {
  width: 100%;
  background: var(--muted);
  color: #fff;
  transition: background 0.3s ease;
}

.banner[data-state="operational"] { background: var(--ok); }
.banner[data-state="degraded"]    { background: var(--warn); }
.banner[data-state="down"]        { background: var(--down); }
.banner[data-state="pending"]     { background: #8C897E; }

.banner__inner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 30px;
  padding-bottom: 30px;
}

.banner__icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  position: relative;
}

.banner__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.banner__headline {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

/* ---------- Uptime header row ---------- */

.main { padding-bottom: 8px; }

.uptime-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 18px;
}

.uptime-head__label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.uptime-head__link {
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
  white-space: nowrap;
}

.uptime-head__link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Notice strip ---------- */

.notice {
  background: #FAF3E0;
  border: 1px solid #EBDCB4;
  color: #6B5518;
  border-radius: 8px;
  padding: 11px 15px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

/* ---------- Service groups + rows ---------- */

.services { display: flex; flex-direction: column; gap: 22px; }

.group__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px 2px;
}

.group__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.service {
  padding: 20px 22px 16px;
  border-top: 1px solid var(--border);
}

.group__card > .service:first-child { border-top: none; }

.service__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.service__name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service__state {
  font-size: 0.87rem;
  font-weight: 500;
  white-space: nowrap;
}

.service__state--operational { color: var(--ok); }
.service__state--degraded    { color: var(--warn); }
.service__state--down        { color: var(--down); }
.service__state--unknown     { color: var(--muted); }

/* ---------- 90-day tick bar ---------- */

.ticks {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 34px;
  width: 100%;
}

.tick {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--empty);
  transition: opacity 0.12s ease;
}

.tick--ok    { background: var(--ok-tick); }
.tick--warn  { background: var(--warn-tick); }
.tick--down  { background: var(--down-tick); }
.tick--maint { background: var(--maint); }
.tick--empty { background: var(--empty); }

.ticks:hover .tick { opacity: 0.55; }
.ticks .tick:hover { opacity: 1; }

.service__legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  font-size: 0.76rem;
  color: var(--muted);
}

.service__legend span:nth-child(2) {
  flex: 1;
  text-align: center;
}

.service__legend .legend__rule {
  display: none;
}

/* ---------- Skeleton ---------- */

.skeleton-row {
  height: 96px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #EDE9DE 25%, #F6F3EA 37%, #EDE9DE 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-row { animation: none; }
}

/* ---------- Incidents ---------- */

.incidents {
  margin-top: 52px;
  border-top: 1px solid var(--border-strong);
  padding-top: 32px;
}

.incidents__heading {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}

.incident-day {
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.incident-day:last-child { border-bottom: none; margin-bottom: 0; }

.incident-day__date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.incident__title {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--ink);
}

.incident__update {
  margin: 0 0 12px;
  padding-left: 15px;
  border-left: 2px solid var(--border-strong);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.incident__update:last-child { margin-bottom: 0; }

.incident__update-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.state-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
}

.state-badge--resolved      { color: var(--ok); }
.state-badge--monitoring    { color: var(--maint); }
.state-badge--identified,
.state-badge--investigating { color: var(--warn); }

.incident__time {
  font-size: 0.76rem;
  color: var(--muted);
}

.no-incidents { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- Footer ---------- */

.footer {
  margin: 44px auto 40px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.footer p { margin: 0; }

/* ---------- Subscribe modal ---------- */

.modal { position: fixed; inset: 0; z-index: 40; }
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 21, 15, 0.42);
}

.modal__panel {
  position: relative;
  max-width: 400px;
  margin: 14vh auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 18px 44px rgba(22, 21, 15, 0.18);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.modal__close:hover { color: var(--ink); }

.modal__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.modal__body { margin: 0 0 20px; font-size: 0.92rem; color: var(--ink-soft); }

.modal__cta {
  display: inline-block;
  background: #16150F;
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 10px 20px;
}

.modal__cta:hover { background: #2E2C22; }

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
  .wrap { padding: 0 18px; }
  .brand__name { font-size: 1.3rem; }
  .subscribe-btn { font-size: 0.8rem; padding: 9px 15px; }
  .banner__headline { font-size: 1.2rem; }
  .service { padding: 17px 15px 14px; }
  .ticks { height: 30px; gap: 1px; }
  .uptime-head { flex-direction: column; gap: 5px; margin-top: 30px; }
}

@media (max-width: 460px) {
  /* Below this the 90 ticks stop being legible individually; drop the gap so the bar
     still reads as a continuous timeline rather than a smear of slivers. */
  .ticks { gap: 0.5px; }
  .service__head { flex-direction: column; align-items: flex-start; gap: 2px; }
}
