/* One ISP's status page. One file, no framework: it has to load when things are down. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #0a1628;
  --muted: #5f6b7a;
  --line: #dde1e6;
  --link: #006ce0;
  --ok: #0d9488;
  --ok-soft: #e6f5f3;
  --warn: #d97706;
  --warn-soft: #fef3e2;
  --bad: #d13212;
  --bad-soft: #fdeceb;
  --info: #006ce0;
  --info-soft: #f0f7ff;
  --none: #d5dbe1;
  --radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a;
    --panel: #161d26;
    --text: #e9edf2;
    --muted: #9aa5b1;
    --line: #2b3542;
    --link: #42b4ff;
    --ok: #2dd4bf;
    --ok-soft: #0f2b2a;
    --warn: #fbbf24;
    --warn-soft: #33270d;
    --bad: #ff7a66;
    --bad-soft: #3a1712;
    --info: #42b4ff;
    --info-soft: #0f2238;
    --none: #364252;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo img { display: block; height: 30px; width: auto; }
.logo--dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .logo--light { display: none !important; }
  .logo--dark { display: block !important; }
}
.logo__tag {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.top__link {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
}
.top__link:hover { border-color: var(--text); text-decoration: none; }

/* Overall banner */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.banner__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--none); }
.banner__text { font-size: 20px; }
.banner--operational { border-color: var(--ok); background: var(--ok-soft); }
.banner--operational .banner__dot { background: var(--ok); }
.banner--degraded { border-color: var(--warn); background: var(--warn-soft); }
.banner--degraded .banner__dot { background: var(--warn); }
.banner--disruption { border-color: var(--bad); background: var(--bad-soft); }
.banner--disruption .banner__dot { background: var(--bad); }
.banner--maintenance { border-color: var(--info); background: var(--info-soft); }
.banner--maintenance .banner__dot { background: var(--info); }

/* Open incidents */
.incident {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 14px 18px;
  background: var(--panel);
}
.incident--danger { border-left-color: var(--bad); }
.incident--warning { border-left-color: var(--warn); }
.incident--info, .incident--primary { border-left-color: var(--info); }
.incident h3 { font-size: 16px; }
.incident p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.incident time { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }

/* Components */
.legend { margin: 28px 0 8px; font-size: 13px; color: var(--muted); text-align: right; }
.group { margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.group__name {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.comp { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.comp:last-child { border-bottom: 0; }
.comp__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.comp__name { font-size: 15px; font-weight: 600; }
.comp__state { flex: none; font-size: 14px; font-weight: 550; }
.comp__state--up { color: var(--ok); }
.comp__state--degraded { color: var(--warn); }
.comp__state--down { color: var(--bad); }
.comp__state--maintenance { color: var(--info); }

.bars { display: flex; gap: 2px; height: 30px; margin: 10px 0 6px; }
.bar {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--none);
  cursor: default;
}
.bar--up { background: var(--ok); }
.bar--degraded { background: var(--warn); }
.bar--down { background: var(--bad); }
.bar:hover, .bar:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.comp__foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.comp__foot::before, .comp__foot::after { content: ""; flex: 1; height: 1px; background: var(--line); order: 1; }
.comp__foot::after { order: 3; }
.comp__from { order: 0; }
.comp__pct { order: 2; }
.comp__to { order: 4; }

/* Past incidents */
.past { margin: 36px 0 48px; }
.past h2 { font-size: 20px; margin-bottom: 12px; }
.day { padding: 14px 0; border-top: 1px solid var(--line); }
.day__date { font-size: 15px; font-weight: 600; }
.day .incident { margin: 10px 0 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 16px; padding-bottom: 24px; font-size: 13px; }

/* A day's details, shown beside the bar under the pointer or the keyboard focus */
.tip {
  position: absolute;
  z-index: 10;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  font-size: 13px;
  pointer-events: none;
}
.tip strong { display: block; }

@media (max-width: 560px) {
  .banner__text { font-size: 17px; }
  .logo__tag { display: none; }
  .comp__head { flex-wrap: wrap; }
  .bars { height: 26px; gap: 1px; }
}
