:root {
  --bg: #07070f;
  --bg-2: #0d0c18;
  --card: rgba(16, 14, 28, 0.78);
  --card-hover: rgba(22, 18, 40, 0.92);
  --line: rgba(167, 139, 250, 0.18);
  --line-strong: rgba(126, 240, 244, 0.35);
  --text: #eceaf8;
  --muted: #9b97b8;
  --faint: #6c6888;
  --cyan: #7ef0f4;
  --cyan-dim: rgba(126, 240, 244, 0.14);
  --purple: #b89bff;
  --purple-dim: rgba(167, 139, 250, 0.16);
  --up: #34d399;
  --up-dim: rgba(52, 211, 153, 0.16);
  --down: #fb7185;
  --down-dim: rgba(251, 113, 133, 0.16);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.14);
  --done: #818cf8;
  --done-dim: rgba(129, 140, 248, 0.16);
  --paused: #94a3b8;
  --paused-dim: rgba(148, 163, 184, 0.14);
  --building: #fbbf24;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Syne", "Instrument Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(126, 240, 244, 0.16), transparent 55%),
    radial-gradient(800px 600px at 110% 0%, rgba(167, 139, 250, 0.22), transparent 50%),
    radial-gradient(700px 500px at 50% 120%, rgba(88, 40, 160, 0.2), transparent 50%),
    var(--bg);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.5rem;
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 15, 0.72);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.brand h1 {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.1;
}
.kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
}
.mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 50%, var(--cyan) 0 5px, transparent 6px),
    conic-gradient(from 120deg, var(--cyan), var(--purple), var(--cyan));
  box-shadow: 0 0 0 1px rgba(126,240,244,0.25), 0 0 22px rgba(126,240,244,0.25);
  flex-shrink: 0;
}
.jump { display: flex; gap: 0.4rem; flex: 1; }
.jump a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}
.jump a:hover { color: var(--text); background: var(--purple-dim); }
.top-meta { margin-left: auto; text-align: right; }
.clock { margin: 0.15rem 0 0; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.pill::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.pill.operational { color: var(--up); background: var(--up-dim); border-color: rgba(52,211,153,0.3); }
.pill.degraded { color: var(--warn); background: var(--warn-dim); border-color: rgba(251,191,36,0.3); }
.pill.down { color: var(--down); background: var(--down-dim); border-color: rgba(251,113,133,0.3); }
.pill.pending { color: var(--muted); background: rgba(155,151,184,0.1); }
.pill.operational::before,
.pill.live::before { animation: pulse 2s ease-out infinite; }
.pill.live { color: var(--up); background: var(--up-dim); border-color: rgba(52,211,153,0.3); }
.pill.building { color: var(--building); background: var(--warn-dim); border-color: rgba(251,191,36,0.3); }
.pill.paused { color: var(--paused); background: var(--paused-dim); }
.pill.done { color: var(--done); background: var(--done-dim); border-color: rgba(129,140,248,0.3); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 8px transparent; opacity: 0.8; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.hero { margin-bottom: 2.2rem; }
.lede { font-size: 1.15rem; max-width: 46rem; margin: 0 0 0.75rem; color: #d8d5ef; }
.meta-line { margin: 0; color: var(--muted); font-size: 0.92rem; }
.meta-line strong { color: var(--text); font-weight: 600; }

.block { margin: 2.5rem 0; }
.block-head h2, .block-head h3, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; margin: 0 0 0.35rem; }
h2 { font-size: 1.7rem; }
h3, .group-title { font-size: 1.05rem; margin: 1.4rem 0 0.8rem; color: var(--purple); }
.block-head p { margin: 0; color: var(--muted); max-width: 46rem; }
.block-head.tight { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.block-head.tight h3 { margin: 0; color: var(--text); }

.seg { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 1.2rem; }
.seg-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}
.seg-btn.on, .seg-btn:hover { color: var(--bg); background: linear-gradient(120deg, var(--cyan), var(--purple)); border-color: transparent; }

.monitor-grid, .project-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  animation: rise 0.6s ease both;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--card-hover);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; }
.card h3 { margin: 0; color: var(--text); font-size: 1.12rem; }
.aka { margin: 0.15rem 0 0; color: var(--faint); font-size: 0.8rem; }
.desc { margin: 0.7rem 0; color: #c9c6e0; font-size: 0.92rem; }
.facts { margin: 0 0 0.8rem; padding: 0 0 0 1.1rem; color: var(--muted); font-size: 0.85rem; }
.facts li { margin: 0.15rem 0; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.links a, .btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: var(--cyan-dim);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}
.links a:hover, .btn:hover { background: rgba(126,240,244,0.24); }
.btn.primary {
  color: #041416;
  background: linear-gradient(120deg, var(--cyan), #a5b4fc);
  border-color: transparent;
}
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.danger { color: var(--down); border-color: rgba(251,113,133,0.35); background: var(--down-dim); }

.last {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.8rem;
  margin: 0.85rem 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.last b { color: var(--text); font-weight: 500; }
.uptimes { display: flex; gap: 0.5rem; margin-bottom: 0.7rem; }
.up-stat {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem 0.5rem;
  text-align: center;
}
.up-stat .n { font-family: var(--display); font-size: 1.05rem; color: var(--text); display: block; }
.up-stat .l { font-size: 0.68rem; color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; }

.ticks { display: flex; gap: 2px; height: 22px; align-items: stretch; margin-top: 0.35rem; }
.tick {
  flex: 1;
  border-radius: 1px;
  background: rgba(255,255,255,0.06);
  min-width: 0;
}
.tick.up { background: var(--up); }
.tick.down { background: var(--down); }
.tick.degraded, .tick.mixed { background: var(--warn); }
.tick-label { margin: 0.3rem 0 0; font-size: 0.7rem; color: var(--faint); }

.notice, .banner {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--purple-dim);
  color: #d9d4f5;
  font-size: 0.92rem;
}
.banner.warn { background: var(--warn-dim); border-color: rgba(251,191,36,0.3); color: #fde68a; }
.banner.warn strong { color: #fff3c4; }

.table-wrap { margin-top: 1.8rem; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.checks { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.checks th, table.checks td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.checks th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
table.checks td:last-child { white-space: normal; color: var(--muted); }
table.checks tbody tr:hover { background: rgba(255,255,255,0.03); }
select {
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
}

.updates { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.updates li { padding: 0.45rem 0; border-top: 1px solid var(--line); font-size: 0.85rem; }
.updates time, .timeline time { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); margin-bottom: 0.1rem; }
.schedule { margin: 0 0 0.5rem; font-size: 0.82rem; color: var(--purple); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.15rem 1.2rem; animation: rise 0.5s ease both; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.05rem;
  top: 0.35rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(167,139,250,0.15);
}
.timeline .who { font-weight: 600; color: var(--text); }
.timeline p { margin: 0.15rem 0 0; color: #c9c6e0; font-size: 0.92rem; }

.notes-bar, .form-row, .notes-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.notes-bar { justify-content: space-between; margin: 1rem 0; }
.notes-bar label span { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.25rem; }
.note-form textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  resize: vertical;
  margin: 0.3rem 0 0.7rem;
}
.note-form label { font-size: 0.8rem; color: var(--muted); }
.file-btn { position: relative; overflow: hidden; display: inline-flex; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.notes-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.note-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.85rem 1rem; }
.note-card .when { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); margin: 0 0 0.4rem; }
.note-card p { margin: 0 0 0.6rem; white-space: pre-wrap; }
.note-card .row { display: flex; gap: 0.4rem; }

footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}
footer code { font-family: var(--mono); font-size: 0.8rem; color: var(--cyan); }
.fine { color: var(--faint); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

section[id] { scroll-margin-top: 5.5rem; }

@media (max-width: 800px) {
  .top { flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.55rem 0.75rem; }
  .brand { flex: 1 1 auto; }
  .top-meta { margin-left: auto; }
  .jump {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .lede { font-size: 1.02rem; }
  main { width: calc(100% - 1.4rem); padding-top: 1.4rem; }
  .last { grid-template-columns: 1fr; }
  .uptimes { flex-direction: column; }
  section[id] { scroll-margin-top: 7.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .card:hover { transform: none; }
}
