:root {
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --soft: #f6f6f6;
  --ok: #22b47a;
  --ok-soft: #e3f7ee;
  --degraded: #e8b931;
  --degraded-soft: #fdf6dd;
  --partial: #f08a4b;
  --partial-soft: #fdeee4;
  --full: #e5484d;
  --full-soft: #fde8e8;
  --maintenance: #3b82f6;
  --maintenance-soft: #e7f0fe;
  --none: #ececec;
  --radius: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.5; }
a { color: inherit; }
h1, h2 { margin: 0; font-weight: 500; }
h1 { font-size: 17px; }
h2 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.page { max-width: 702px; margin: 0 auto; padding: 32px 16px 40px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.brand img { display: block; height: 30px; width: auto; }
.actions { display: flex; gap: 12px; align-items: center; }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px; border: 1px solid #d4d4d4; border-radius: 6px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; list-style: none; white-space: nowrap;
}
.button:hover { background: var(--soft); }
.button-dark { background: #232326; border-color: #232326; color: #fff; }
.button-dark:hover { background: #000; }
summary.button::-webkit-details-marker { display: none; }

details { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.menu a { display: block; padding: 7px 10px; border-radius: 6px; text-decoration: none; font-size: 14px; }
.menu a:hover, .menu a[aria-current] { background: var(--soft); }

/* Status tones */
.icon { width: 16px; height: 16px; flex: none; }
.icon path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-ok circle { fill: var(--ok); }
.icon-degraded circle { fill: var(--degraded); }
.icon-partial circle { fill: var(--partial); }
.icon-full circle { fill: var(--full); }
.icon-maintenance circle { fill: var(--maintenance); }
.icon-none circle { fill: #bdbdbd; }

.banner { border: 1px solid var(--ok); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.banner-head { display: flex; align-items: center; gap: 10px; padding: 16px; background: var(--ok-soft); }
.banner-text { padding: 16px; font-size: 14px; }
.banner.tone-degraded { border-color: var(--degraded); }
.banner.tone-degraded .banner-head { background: var(--degraded-soft); }
.banner.tone-partial { border-color: var(--partial); }
.banner.tone-partial .banner-head { background: var(--partial-soft); }
.banner.tone-full { border-color: var(--full); }
.banner.tone-full .banner-head { background: var(--full-soft); }
.banner.tone-maintenance { border-color: var(--maintenance); }
.banner.tone-maintenance .banner-head { background: var(--maintenance-soft); }
.banner-incidents { padding: 4px 16px; }

.incident-card { padding: 12px 0; border-bottom: 1px solid var(--line); }
.incident-card:last-child { border-bottom: 0; }
.incident-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.incident-title { font-weight: 500; text-decoration: none; }
.incident-title:hover { text-decoration: underline; }
.incident-card .update { font-size: 14px; margin: 6px 0; }
.incident-card .update p { margin-top: 4px; }

.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--soft); color: var(--muted); white-space: nowrap;
}
.pill.tone-degraded { background: var(--degraded-soft); color: #8a6a00; }
.pill.tone-partial { background: var(--partial-soft); color: #a3480f; }
.pill.tone-full { background: var(--full-soft); color: #b4232a; }
.pill.tone-maintenance { background: var(--maintenance-soft); color: #1d4ed8; }

.card { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); }
.card-head { display: flex; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.card.upcoming { padding: 16px; }
.card.upcoming p { margin-top: 8px; font-size: 14px; }
.card.empty { padding: 32px 16px; text-align: center; }
.card.empty p { margin-top: 8px; }

.window { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.arrow { text-decoration: none; font-size: 18px; line-height: 1; padding: 0 2px; color: var(--muted); }
.arrow.off { color: #d0d0d0; }

.components { list-style: none; margin: 0; padding: 0; }
.component { padding: 14px 16px 16px; border-bottom: 1px solid var(--line); }
.component:last-child { border-bottom: 0; }
.component-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.component-name { font-weight: 500; }
.component-state { font-size: 13px; }
.component-state.tone-degraded { color: #8a6a00; }
.component-state.tone-partial { color: #a3480f; }
.component-state.tone-full { color: #b4232a; }
.component-state.tone-maintenance { color: #1d4ed8; }
.uptime { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }

.info {
  position: relative; display: inline-grid; place-items: center; width: 14px; height: 14px;
  border: 1.3px solid #a3a3a3; border-radius: 50%; color: #a3a3a3; font-size: 9px; font-weight: 700; cursor: help;
}

.bars { display: flex; gap: 2px; height: 16px; }
.bar { position: relative; flex: 1; min-width: 2px; border-radius: 2px; background: var(--none); }
.bar.tone-ok { background: var(--ok); }
.bar.tone-degraded { background: var(--degraded); }
.bar.tone-partial { background: var(--partial); }
.bar.tone-full { background: var(--full); }
.bar.tone-maintenance { background: var(--maintenance); }
.bar:hover { opacity: 0.75; }

.tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 20; transform: translateX(-50%);
  display: none; flex-direction: column; gap: 2px; width: max-content; max-width: 260px;
  padding: 8px 10px; border-radius: 8px; background: #1d1d1f; color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.4; text-align: left; pointer-events: none;
}
.bar:hover .tip, .bar:focus .tip, .info:hover .tip, .info:focus .tip { display: flex; }
.tip-incident::before { content: '● '; }
.tip-incident.tone-degraded::before { color: var(--degraded); }
.tip-incident.tone-partial::before { color: var(--partial); }
.tip-incident.tone-full::before { color: var(--full); }

/* On a phone the bars show the last 45 days. */
@media (max-width: 600px) {
  .bars .bar:nth-child(-n + 45) { display: none; }
  .top { flex-wrap: wrap; }
}

/* History */
.crumbs { padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; }
.crumbs span { color: var(--ink); }
.history-head { display: flex; align-items: center; gap: 16px; margin: 18px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.history-head .filter { margin-left: auto; }
.month { padding: 28px 0 8px; border-bottom: 1px solid var(--line); }
.month h2 { font-size: 15px; margin-bottom: 20px; }
.no-incidents { display: flex; align-items: center; gap: 8px; margin-top: -40px; justify-content: flex-end; padding-bottom: 20px; }
.day { display: flex; gap: 28px; padding: 14px 0 22px; border-bottom: 1px solid #f0f0f0; }
.day:last-child { border-bottom: 0; }
.day-label { width: 48px; flex: none; font-size: 14px; }
.day-entries { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.entry { padding-left: 14px; border-left: 3px solid var(--none); }
.entry.tone-degraded { border-color: var(--degraded); }
.entry.tone-partial { border-color: var(--partial); }
.entry.tone-full { border-color: var(--full); }
.entry.tone-maintenance { border-color: var(--maintenance); }
.entry-head { display: flex; justify-content: space-between; gap: 12px; }
.entry-head a { font-weight: 500; text-decoration: none; }
.entry-head a:hover { text-decoration: underline; }
.entry-head time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.entry p { color: #4b4b4b; font-size: 14px; margin-top: 3px; }

/* Incident */
.incident header { margin: 18px 0 20px; }
.incident h1 { font-size: 22px; margin-bottom: 10px; }
.incident header p { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.affected { padding: 16px; }
.affected ul { list-style: none; margin: 10px 0 0; padding: 0; }
.affected li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.timeline h2 { margin-bottom: 8px; }
.timeline-item { display: flex; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline-meta { width: 150px; flex: none; display: flex; flex-direction: column; font-size: 14px; }
.timeline-meta time { color: var(--muted); font-size: 13px; }
.timeline-body { flex: 1; font-size: 14px; }
.timeline-body p + p { margin-top: 8px; }

.cal { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.footer { margin-top: 56px; text-align: center; font-size: 13px; color: var(--muted); }
.footer p + p { margin-top: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .timeline-item, .day { flex-direction: column; gap: 6px; }
  .timeline-meta { width: auto; }
}
