:root {
  --bg: #EEECE6;
  --bg-2: #E5E2D7;
  --ink: #14130F;
  --ink-2: #2A2823;
  --muted: #6E6A5E;
  --hairline: rgba(20, 19, 15, 0.12);
  --good: #2F6B4F;
  --accent: #2F6B4F;
  --warn: #9A6B2F;
  --bad: #9B3D3D;
  --unknown: #8F8B7E;
  --display: "Instrument Serif", "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.brand {
  font-family: var(--display);
  font-size: 32px;
  font-style: italic;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.b1 { font-style: italic; color: var(--ink); }
.b2 {
  font-family: var(--display);
  font-style: italic;
  color: var(--accent);
  font-size: 1em;
  letter-spacing: -0.01em;
}

.head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
}
.pill.ok { background: rgba(47, 107, 79, 0.12); color: var(--good); }
.pill.warn { background: rgba(154, 107, 47, 0.12); color: var(--warn); }
.pill.bad { background: rgba(155, 61, 61, 0.12); color: var(--bad); }

.muted { color: var(--muted); font-size: 13px; }

.section { margin-bottom: 28px; }
.section-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.monitor-list { display: flex; flex-direction: column; gap: 10px; }

.monitor {
  background: rgba(244, 242, 236, 0.85);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 16px;
}

.monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.monitor-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.monitor-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.up { background: var(--good); }
.status-dot.degraded { background: var(--warn); }
.status-dot.down { background: var(--bad); }
.status-dot.unknown { background: var(--unknown); }

.uptime-bar {
  display: flex;
  gap: 2px;
  width: 100%;
  height: 28px;
  align-items: stretch;
  position: relative;
}

.bar-seg {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--unknown);
  opacity: 0.35;
}
.bar-seg.up { background: var(--good); opacity: 0.85; }
.bar-seg.degraded { background: var(--warn); opacity: 0.9; }
.bar-seg.down { background: var(--bad); opacity: 0.95; }
.bar-seg.unknown { background: var(--unknown); opacity: 0.25; }

.vpn-avail-wrap {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.vpn-avail-scroll { overflow-x: auto; }
.vpn-avail-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}
.vpn-avail-table th,
.vpn-avail-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  text-align: center;
}
.vpn-avail-table thead th {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.vpn-avail-table tbody th {
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}
.vpn-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.vpn-dot.up { background: var(--good); }
.vpn-dot.partial { background: var(--warn); }
.vpn-dot.down { background: var(--bad); }
.vpn-avail-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  padding: 14px 16px;
  font-size: 12px;
}
.vpn-avail-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-desc { margin: -8px 0 16px; font-size: 14px; line-height: 1.5; }

.bar-seg.has-incident {
  outline: 1px solid var(--ink);
  outline-offset: -1px;
}

.bar-tooltip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  max-width: 260px;
  line-height: 1.35;
  display: none;
}

.collapse-trigger {
  appearance: none;
  border: 1px solid var(--hairline);
  background: rgba(244, 242, 236, 0.85);
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.collapse-trigger:hover { background: var(--bg-2); }

.chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s;
}
.collapse-trigger[aria-expanded="true"] .chev {
  transform: rotate(45deg);
}

.collapse-panel { margin-top: 10px; }
.collapse-panel[hidden] { display: none !important; }

.count { margin-left: auto; }

.foot {
  margin-top: 40px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.foot-sep { color: var(--hairline); }
.foot-right { text-align: right; }

@media (max-width: 560px) {
  .head { flex-direction: column; align-items: flex-start; }
  .head-meta { align-items: flex-start; }
}
