@font-face {
  font-family: "Manrope";
  src: url("/manrope-latin-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #111827;
  --ink-2: #3f4a5a;
  --muted: #596579;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --primary: #075fce;
  --primary-hover: #064fae;
  --primary-soft: #eaf2ff;
  /* Bar colours keep at least 3:1 contrast against white. */
  --ok: #1f9d55;
  --ok-text: #15803d;
  --ok-soft: #e7f6ee;
  --degraded: #ca8a04;
  --degraded-text: #b45309;
  --degraded-soft: #fef3e2;
  --partial: #ea580c;
  --down: #dc2626;
  --down-text: #b91c1c;
  --down-soft: #fdecec;
  --maintenance: #075fce;
  --nodata: #d1d5db;
  --radius: 16px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

@supports (font-size-adjust: from-font) {
  body {
    font-size-adjust: from-font;
  }
}

a {
  color: var(--primary);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.wrap {
  width: min(100% - 32px, 820px);
  margin-inline: auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  flex-wrap: wrap;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

.brand-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tabs {
  margin-inline: auto;
}

.tabs ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabs a {
  display: block;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.tabs a:hover {
  color: var(--ink);
  background: var(--canvas);
}

.tabs a[aria-current="page"] {
  color: var(--ink);
  background: #eceef2;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--quiet {
  background: #f1f2f5;
  border-color: var(--line);
  color: var(--ink);
}

.button--quiet:hover {
  background: #e8eaee;
  color: var(--ink);
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

@media (max-width: 640px) {
  .tabs {
    order: 3;
    width: 100%;
    margin-inline: 0;
  }
  .tabs ul {
    overflow-x: auto;
  }
  .header-row > .button {
    margin-left: auto;
  }
}

/* Hero */
.hero {
  text-align: center;
  padding: 64px 0 40px;
}

.hero h1 {
  margin: 14px 0 6px;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-time {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.status-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  flex: none;
}

.status-icon svg {
  width: 62%;
  height: 62%;
}

.status-icon--ok { background: var(--ok); }
.status-icon--warn { background: var(--degraded); }
.status-icon--down { background: var(--down); }
.status-icon--maint { background: var(--maintenance); }
.status-icon--unknown { background: var(--nodata); color: var(--muted); }

.status-icon--large {
  width: 44px;
  height: 44px;
  box-shadow: 0 0 0 6px var(--ok-soft);
}

.hero--degraded .status-icon--large,
.hero--unknown .status-icon--large { box-shadow: 0 0 0 6px var(--degraded-soft); }
.hero--partial .status-icon--large,
.hero--major .status-icon--large { box-shadow: 0 0 0 6px var(--down-soft); }
.hero--maintenance .status-icon--large { box-shadow: 0 0 0 6px var(--primary-soft); }

.status-icon--small {
  width: 18px;
  height: 18px;
}

/* Cards and sections */
.section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 18px;
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.04);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.pill--ok { background: var(--ok-soft); color: var(--ok-text); }
.pill--warn { background: var(--degraded-soft); color: var(--degraded-text); }
.pill--down { background: var(--down-soft); color: var(--down-text); }
.pill--maint { background: var(--primary-soft); color: var(--primary); }

.services {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
}

.service-meta {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.service-meta--good { color: var(--ok-text); }
.service-meta--fair { color: var(--degraded-text); }
.service-meta--poor { color: var(--down-text); }

.service-desc {
  margin: 2px 0 10px 26px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.service-detail {
  display: block;
  color: var(--ink-2);
  font-weight: 600;
}

.bars {
  display: grid;
  grid-template-columns: repeat(90, minmax(0, 1fr));
  gap: 2px;
  height: 34px;
}

.bar {
  display: block;
  border-radius: 2px;
  background: var(--nodata);
}

.bar--operational { background: var(--ok); }
.bar--degraded { background: var(--degraded); }
.bar--partial { background: var(--partial); }
.bar--down { background: var(--down); }
.bar--maintenance { background: var(--maintenance); }

.bars .bar:hover {
  opacity: 0.75;
}

.bars-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.axis-30 {
  display: none;
}

/* Thirty days on narrow screens keeps each bar wide enough to see. */
@media (max-width: 600px) {
  .bars {
    grid-template-columns: repeat(30, minmax(0, 1fr));
  }
  .bars .bar:nth-child(-n + 60) {
    display: none;
  }
  .axis-90 { display: none; }
  .axis-30 { display: inline; }
  .card { padding: 18px 16px 14px; }
}

.card-note {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin: 18px 0 56px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend .bar {
  width: 8px;
  height: 14px;
}

/* Incidents */
.notices {
  margin-bottom: 24px;
}

.notices .section-title,
.month .section-title,
section > .section-title {
  margin: 28px 0 12px;
}

.incident {
  border: 1px solid var(--line);
  border-left: 4px solid var(--degraded);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--surface);
}

.incident--major { border-left-color: var(--down); background: #fffafa; }
.incident--minor { border-left-color: var(--degraded); background: #fffcf6; }
.incident--maintenance { border-left-color: var(--maintenance); }
.incident--resolved { border-left-color: var(--ok); }

.incident h1,
.incident h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.35;
}

.incident h1 {
  font-size: 1.5rem;
}

.incident h1 a,
.incident h3 a {
  color: var(--ink);
  text-decoration: none;
}

.incident h3 a:hover {
  text-decoration: underline;
}

.incident-services,
.incident-schedule {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.timeline {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--line);
}

.timeline p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.timeline .update-time {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted);
}

.page-head {
  padding: 48px 0 8px;
}

.page-head.narrow {
  max-width: 560px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem);
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 0 0 12px;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-size: 0.9375rem;
}

.back-link {
  margin: 32px 0 12px;
  font-size: 0.875rem;
}

.notice-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--ink) !important;
}

/* Subscribe form */
.subscribe-form label {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
}

.subscribe-form .hint {
  display: block;
  margin: 2px 0 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
}

.field-row input:user-invalid {
  border-color: var(--down);
  background: var(--down-soft);
}

.field-error {
  display: none;
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: var(--down-text);
}

.subscribe-form:has(input:user-invalid) .field-error {
  display: block;
}

.error-mark {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--down);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
}

.form-result {
  margin: 8px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.form-result:empty {
  display: none;
}

.fineprint {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.channel-heading {
  margin: 22px 0 8px;
  font-size: 0.9375rem;
}

.channel-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-list li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.channel-list a {
  font-weight: 700;
}

.channel-list span {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Dialog */
.updates-dialog {
  width: min(100% - 32px, 480px);
  max-height: min(100% - 32px, 720px);
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgb(17 24 39 / 0.18);
  color: var(--ink);
}

.updates-dialog:modal {
  overscroll-behavior: contain;
}

.updates-dialog::backdrop {
  background: rgb(17 24 39 / 0.45);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.125rem;
}

.dialog-head form {
  margin: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--canvas);
  color: var(--ink);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-row p {
  margin: 0;
}

.footer-row ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-row a {
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .tabs a,
  .button,
  .icon-button {
    transition: background-color 0.15s ease, color 0.15s ease;
  }
}
