/* The fonts are files of this site: the page must display when every other
   host is down. Onest for the text, Exo 2 for the wordmark only. */
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/exo-2-latin-300-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/exo-2-latin-600-normal.woff2") format("woff2");
}

:root {
  --operational: #00b093;
  --degraded: #ecc94b;
  --partial: #ff8c00;
  --major: #8f485d;
  --maintenance: #004968;

  --page: #fcfcfd;
  --card: #ffffff;
  --fill: #eeeef0;
  --border: #dadade;
  --text: #37373c;
  --strong: #171717;
  --muted: #64646e;
  --accent: #527475;
  --accent-hover: #496869;
  --button: #171717;
  --button-hover: #303030;
  --button-text: #ffffff;
  --wash: 0.1;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.03), 0 4px 16px -4px rgb(0 0 0 / 0.06);
  --popover-shadow:
    0 2px 6px rgb(0 0 0 / 0.04), 0 12px 32px -8px rgb(0 0 0 / 0.14);
  /* Card edges and separators: the border at about 60 percent. */
  --hairline: color-mix(in srgb, var(--border) 60%, transparent);
  --day: var(--operational);
  --sans:
    Onest, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #161618;
    --card: #1c1c1f;
    --fill: #282828;
    --border: #303030;
    --text: #d2d2d7;
    --strong: #f5f5f5;
    --muted: #a3a3a3;
    --accent: #96babb;
    --accent-hover: #b3cecf;
    --button: #f5f5f5;
    --button-hover: #dcdcdc;
    --button-text: #171717;
    --wash: 0.05;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 4px 16px -4px rgb(0 0 0 / 0.3);
    --popover-shadow:
      0 2px 6px rgb(0 0 0 / 0.3), 0 12px 32px -8px rgb(0 0 0 / 0.5);
    --hairline: var(--border);
    --major: #b8657f;
    --maintenance: #0f86b6;
    --day: color-mix(in srgb, var(--operational) 55%, var(--card));
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* The brand tint, barely there, behind the top of the page. */
  background:
    radial-gradient(
        60% 340px at 15% 0,
        rgb(100 180 168 / var(--wash)),
        transparent
      )
      no-repeat,
    radial-gradient(
        50% 300px at 90% 0,
        rgb(205 160 168 / var(--wash)),
        transparent
      )
      no-repeat,
    var(--page);
  color: var(--text);
  font: 14px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
  /* Keeps the footer at the bottom of a short page. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Status colors, for shapes only (icons, dots, day marks, tints), not for
   text. */
.status-OPERATIONAL {
  --status: var(--operational);
  color: var(--operational);
}
.status-DEGRADEDPERFORMANCE {
  --status: var(--degraded);
  color: var(--degraded);
}
.status-PARTIALOUTAGE {
  --status: var(--partial);
  color: var(--partial);
}
.status-MAJOROUTAGE {
  --status: var(--major);
  color: var(--major);
}
.status-UNDERMAINTENANCE {
  --status: var(--maintenance);
  color: var(--maintenance);
}

.icon,
.chevron {
  flex: none;
  width: 16px;
  height: 16px;
}

.icon .glyph,
.chevron {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .glyph {
  stroke: var(--card);
}

.chevron {
  stroke: currentColor;
}

/* Tiny labels: section titles, month headings, the legend of the bars. */
h2,
.days-legend {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The header, on the page background. */
.site-header {
  padding: 28px 0;
}

.site-header .column {
  display: flex;
  align-items: center;
  gap: 8px 20px;
}

/* The brand: the mark and the wordmark in a row, centred on each other. */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  border-radius: 6px;
  color: var(--strong);
  font:
    600 20px/1 "Exo 2",
    var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms ease-out;
}

.logo:hover {
  color: var(--accent);
}

/* The capitals sit above the middle of their line: this puts them on it. */
.logo > span {
  padding-bottom: 0.2em;
}

.logo span span {
  font-weight: 300;
}

.report {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.report,
.page-links a,
.section-head a,
.site-footer a,
.notice h3 a {
  transition: color 200ms ease-out;
}

.report:hover,
.page-links a:hover,
.section-head a:hover,
.site-footer a:hover,
.notice h3 a:hover {
  color: var(--accent);
}

/* Buttons are pills. The outline one is for a secondary action. */
.button,
.subscribe-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1);
  color: var(--button-text);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 200ms ease-out,
    border-color 200ms ease-out;
}

.button:hover,
.subscribe-menu > summary:hover {
  background: var(--button-hover);
}

.button-outline {
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: transparent;
  box-shadow: none;
  color: var(--strong);
}

.button-outline:hover {
  border-color: color-mix(in srgb, var(--text) 35%, transparent);
  background: color-mix(in srgb, var(--text) 4%, transparent);
}

/* Forced colors drop the fill: a border keeps the shape of the button. */
@media (forced-colors: active) {
  .button,
  .subscribe-menu > summary {
    border: 1px solid ButtonText;
  }
}

/* The "Get updates" menu. */
.subscribe-menu {
  position: relative;
}

.subscribe-menu > summary {
  padding-right: 16px;
  user-select: none;
}

.subscribe-menu > summary::-webkit-details-marker {
  display: none;
}

.subscribe-menu .chevron {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
}

.subscribe-menu ul {
  position: absolute;
  z-index: 1;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--popover-shadow);
  list-style: none;
}

.subscribe-menu a {
  display: block;
  padding: 7px 12px;
  border-radius: 10px;
  text-decoration: none;
}

.subscribe-menu a:hover,
.subscribe-menu a:focus-visible {
  background: var(--fill);
  color: var(--strong);
}

main {
  margin-bottom: 56px;
}

.card {
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

/* The overall status: a card in a tint of the status color. */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 20px;
  padding: 20px clamp(18px, 4vw, 28px);
  border: 1px solid color-mix(in srgb, var(--status) 34%, var(--card));
  border-radius: 20px;
  background: color-mix(in srgb, var(--status) 9%, var(--card));
  color: var(--strong);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.banner .icon {
  width: 22px;
  height: 22px;
}

/* Top of the history, a notice page and the subscribe pages. */
.page-head {
  padding-block: 12px 24px;
}

.page-head h1 {
  margin: 0 0 10px;
  color: var(--strong);
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.page-head p {
  margin: 0;
}

.page-head p a,
.card p a:not(.button),
.message a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.page-head p a:hover,
.card p a:not(.button):hover,
.message a:hover {
  color: var(--accent-hover);
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.page-links a {
  text-decoration: none;
}

.empty-month {
  margin: 12px 0 0;
  color: var(--muted);
}

/* Components and uptime bars: one card, a row per component. */
.components > .component {
  padding-block: 18px;
  border-top: 1px solid var(--hairline);
}

.components > h2 {
  margin-bottom: 18px;
}

.components > .component:last-child {
  padding-bottom: 0;
}

.group > summary {
  display: block;
  border-radius: 6px;
  cursor: pointer;
}

.group > summary::-webkit-details-marker {
  display: none;
}

.group > summary .chevron {
  display: block;
  transition: transform 0.15s;
}

.group[open] > summary .chevron {
  transform: rotate(90deg);
}

.group > .component {
  margin: 18px 0 0 24px;
}

.row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 10px;
}

.name {
  color: var(--strong);
  font-weight: 500;
}

.count {
  color: var(--muted);
  white-space: nowrap;
}

.uptime {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.days {
  display: flex;
  gap: clamp(1px, 0.3vw, 3px);
  height: 30px;
}

.day {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--day);
  overflow: hidden;
}

/* Forced colors drop backgrounds: the bars keep theirs, or no day shows. */
@media (forced-colors: active) {
  .day {
    forced-color-adjust: none;
  }
}

a.day:hover {
  opacity: 0.7;
}

a.day:focus-visible {
  outline-color: var(--strong);
  outline-offset: 1px;
}

.day-tooltip {
  position: fixed;
  z-index: 10;
  width: max-content;
  max-width: min(320px, calc(100vw - 16px));
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--button);
  box-shadow: var(--popover-shadow);
  color: var(--button-text);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  white-space: pre-line;
  transition: opacity 80ms ease;
}

.day-tooltip.visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

.mark {
  position: absolute;
  inset: auto 0 0;
  height: max(calc(var(--f) * 100%), 8px);
  background: currentColor;
}

.days-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
}

/* Notices. */
.notices {
  padding-block: 20px 12px;
}

.components + .notices {
  padding-top: 40px;
}

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

.section-head a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.section-head .chevron {
  width: 14px;
  height: 14px;
}

.empty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding-block: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
}

.notices > h2 + .notice,
.notices > .section-head + .notice {
  margin-top: 12px;
}

.notice {
  padding-block: 20px;
  border-top: 1px solid var(--hairline);
}

.notice h3 {
  margin: 0 0 8px;
  color: var(--strong);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notice h3 a {
  text-decoration: none;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.notice > .meta:not(:last-child) {
  margin-bottom: 16px;
}

/* An impact as a pill: a tint and a dot in the status color, the text in the
   text color. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status) 15%, transparent);
  color: var(--strong);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status, currentColor);
}

/* The updates of a notice, newest first, as a timeline. */
.updates {
  margin: 0;
  padding: 0;
  list-style: none;
}

.updates > li {
  position: relative;
  padding: 0 0 20px 22px;
  border-left: 1px solid var(--border);
}

.updates > li:last-child {
  padding-bottom: 0;
}

.updates > li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--page);
  border-radius: 50%;
  background: var(--muted);
}

.updates > li:first-child::before {
  background: var(--strong);
}

.update-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin: 0;
}

.update-head strong {
  color: var(--strong);
  font-weight: 500;
}

.update-head time {
  color: var(--muted);
  font-size: 12px;
}

.message {
  overflow-wrap: anywhere;
}

.message > * {
  margin: 6px 0;
}

.message > :last-child {
  margin-bottom: 0;
}

.message h1,
.message h2,
.message h3 {
  color: var(--strong);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.message ul {
  list-style-type: disc;
}

.message img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.message code,
.subscribe code,
.api-docs p code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--strong);
  font-size: 0.92em;
}

.more {
  display: flex;
  justify-content: center;
  margin: 28px 0 0;
}

/* The subscribe pages, the answers of the app server to their forms, and the
   public API page. */
.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.subscribe h2,
.api-docs h2 {
  margin-bottom: 10px;
}

.subscribe ol {
  padding-left: 20px;
}

.subscribe form {
  max-width: 440px;
}

/* What an address or URL is used for, under a subscribe form. */
.data-use {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.secret {
  overflow-wrap: anywhere;
}

.api-docs h2:not(:first-child) {
  margin-top: 28px;
}

.api-docs pre {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--page);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
}

.field {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: var(--strong);
  font-size: 13px;
  font-weight: 500;
}

.field legend {
  padding: 0;
  margin-bottom: 6px;
}

.field input:not([type="checkbox"], [type="radio"]),
.field select,
.field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  margin-top: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font: 400 14px/1.5 var(--sans);
  transition:
    border-color 200ms ease-out,
    box-shadow 200ms ease-out;
}

.field input:not([type="checkbox"], [type="radio"]):focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--accent);
  /* Transparent, so the ring below is the focus mark; forced colors drop the
     shadow and paint this outline. */
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

.field textarea {
  resize: vertical;
}

/* The 404 page: one centred column in the middle of the space between the
   header and the footer. */
main:has(.not-found) {
  display: flex;
  flex: 1;
  align-items: center;
}

.not-found {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-block: 16px 24px;
  text-align: center;
  animation: not-found-in 500ms ease-out both;
}

@keyframes not-found-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* The brand tints again, behind the illustration. */
.not-found::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -24px 0 30%;
  background:
    radial-gradient(
      closest-side at 22% 55%,
      rgb(100 180 168 / var(--wash)),
      transparent
    ),
    radial-gradient(
      closest-side at 80% 45%,
      rgb(205 160 168 / var(--wash)),
      transparent
    );
}

.not-found-art {
  position: relative;
  width: min(100%, 28rem);
  margin-bottom: 32px;
  border-radius: 16px;
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.05),
    0 24px 48px -16px rgb(82 116 117 / 0.3);
  overflow: hidden;
}

.not-found-art img {
  display: block;
  width: 100%;
  height: auto;
}

/* The fade at the bottom of the illustration. */
.not-found-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--page) 70%, transparent),
    transparent 50%
  );
}

.not-found-art span {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(255 255 255 / 0.92);
  font-size: clamp(88px, 28vw, 128px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 8px 28px rgb(0 0 0 / 0.35);
}

.not-found h1 {
  margin: 0 0 12px;
  color: var(--strong);
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.not-found p {
  max-width: 28rem;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 16px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.not-found-actions .button {
  height: 44px;
  padding-inline: 24px;
}

/* The footer: a few quiet links. */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 12px;
}

.site-footer .column {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding-block: 24px 32px;
}

.site-footer a {
  text-decoration: none;
}

@media (max-width: 640px) {
  .site-header {
    padding: 20px 0;
  }

  /* The footer has the link too. */
  .site-header .report {
    display: none;
  }

  /* Below 16px a phone zooms into a field that gets the focus. */
  .field input:not([type="checkbox"], [type="radio"]),
  .field select,
  .field textarea {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .not-found-actions {
    flex-direction: column;
    align-self: stretch;
  }
}

@media (max-width: 400px) {
  .button,
  .subscribe-menu > summary {
    padding-inline: 16px;
  }
}
