/* Nunito, by Vernon Adams et al., SIL Open Font License 1.1. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/nunito-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
    U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --brand: #221ab2;
  --brand-deep: #170f86;
  --bg: #f4f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e5ebf3;
  --none: #e2e8f0;
  --link: #221ab2;
  --up: #16a34a;
  --up-soft: #dcfce7;
  --degraded: #d97706;
  --degraded-soft: #fef3c7;
  --down: #dc2626;
  --down-soft: #fee2e2;
  --unknown: #64748b;
  --unknown-soft: #e8edf4;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1f;
    --card: #111a2e;
    --ink: #f1f5f9;
    --body: #cbd5e1;
    --muted: #94a3b8;
    --line: #1e2a45;
    --none: #24314d;
    --link: #a5b4fc;
    --up: #22c55e;
    --up-soft: rgba(34, 197, 94, 0.15);
    --degraded: #f59e0b;
    --degraded-soft: rgba(245, 158, 11, 0.16);
    --down: #f87171;
    --down-soft: rgba(248, 113, 113, 0.16);
    --unknown: #94a3b8;
    --unknown-soft: rgba(148, 163, 184, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.band {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%);
  padding: 28px 16px 76px;
  text-align: center;
}

.brand {
  display: inline-block;
}

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

.band p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  letter-spacing: 0.04em;
}

main {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin: -52px auto 0;
  padding: 0 16px;
}

.card,
.overall,
.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.notice {
  padding: 14px 18px;
  border-left: 5px solid var(--brand);
  color: var(--ink);
  font-weight: 700;
}

.notice.warning {
  border-left-color: var(--degraded);
}

.notice.outage {
  border-left-color: var(--down);
}

.overall {
  --state: var(--unknown);
  --soft: var(--unknown-soft);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border-top: 5px solid var(--state);
}

.overall.up,
.pill.up {
  --state: var(--up);
  --soft: var(--up-soft);
}

.overall.degraded,
.pill.degraded {
  --state: var(--degraded);
  --soft: var(--degraded-soft);
}

.overall.down,
.pill.down {
  --state: var(--down);
  --soft: var(--down-soft);
}

.badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--state);
  color: #ffffff;
}

.badge svg {
  width: 26px;
  height: 26px;
}

.overall h1 {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.25;
}

.overall p {
  margin-top: 4px;
}

.overall .checked {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.card {
  padding: 4px 22px;
}

.card h2 {
  margin: 18px 0 2px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.parts,
.incidents {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.part:last-child,
.incident:last-child {
  border-bottom: 0;
}

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

.part h3,
.incident h3 {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
}

.part p,
.incident p {
  color: var(--muted);
  font-size: 0.88rem;
}

.pill {
  --state: var(--unknown);
  --soft: var(--unknown-soft);
  display: inline-flex;
  flex: none;
  gap: 5px;
  align-items: center;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--state);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill svg {
  width: 16px;
  height: 16px;
}

.pill .ms {
  margin-left: 3px;
  font-weight: 600;
  opacity: 0.75;
}

.bars {
  display: grid;
  grid-template-columns: repeat(90, 1fr);
  gap: 2px;
  height: 32px;
  margin-top: 14px;
}

.day {
  border-radius: 3px;
  background: var(--none);
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.day.up {
  background: var(--up);
}

.day.degraded {
  background: var(--degraded);
}

.day.down {
  background: var(--down);
}

.day:hover {
  transform: scaleY(1.12);
  opacity: 0.8;
}

.legend {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.legend .tip {
  color: var(--body);
  font-weight: 700;
  text-align: center;
}

.legend .from-short {
  display: none;
}

.empty {
  padding: 4px 0 20px;
  color: var(--muted);
}

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

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

.incident.degraded .dot {
  background: var(--degraded);
}

.incident.down .dot {
  background: var(--down);
}

.incident strong {
  color: var(--body);
}

.incident.down strong {
  color: var(--down);
}

.incident.degraded strong {
  color: var(--degraded);
}

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 44px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

footer p + p {
  margin-top: 6px;
}

@media (max-width: 560px) {
  .band {
    padding-top: 22px;
  }

  .brand img {
    width: 112px;
  }

  .overall {
    padding: 18px;
  }

  .overall h1 {
    font-size: 1.18rem;
  }

  .card {
    padding: 4px 16px;
  }

  .part-head {
    flex-direction: column;
    gap: 8px;
  }

  .bars {
    grid-template-columns: repeat(30, 1fr);
    gap: 3px;
  }

  .day:nth-child(-n + 60) {
    display: none;
  }

  .legend .from {
    display: none;
  }

  .legend .from-short {
    display: inline;
  }
}
