/* --- Quiet Instrument · Bangumi Status ------------------------------------- */

:root {
  --bg:           #fbfaf7;
  --bg-grain:    rgba(0,0,0,0.015);
  --surface:      #ffffff;
  --surface-2:    #f5f3ee;
  --surface-sunk: #f7f5f0;
  --border:       #ecebe4;
  --border-strong:#d9d7ce;
  --text:         #1b1d1a;
  --text-dim:     #6a6d66;
  --text-faint:   #9a9c94;

  --brand:        #e28a92;
  --brand-ink:    #b9606a;
  --accent:       #e28a92;

  --ok:           #3f8f5f;
  --ok-soft:      #e5f2ea;
  --ok-line:      #b3d4bf;

  --degraded:     #c4882a;
  --degraded-soft:#f7ecd3;
  --degraded-line:#e3c488;

  --down:         #c04e4e;
  --down-soft:    #f4dede;
  --down-line:    #deb1b1;

  --none:         #e6e4dc;
  --none-soft:    #eeece4;

  --shadow-sm: 0 1px 0 rgba(26,24,20,0.04);
  --shadow-md: 0 1px 2px rgba(26,24,20,0.04), 0 6px 24px -12px rgba(26,24,20,0.08);

  --radius:    10px;
  --radius-sm: 6px;

  --font-sans:   "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif:  "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono:   "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #121311;
    --bg-grain:    rgba(255,255,255,0.02);
    --surface:      #191b18;
    --surface-2:    #1f211d;
    --surface-sunk: #15171400;
    --border:       #272a26;
    --border-strong:#3a3e38;
    --text:         #e8e6df;
    --text-dim:     #a7a69c;
    --text-faint:   #71736b;

    --brand:        #e89ba3;
    --brand-ink:    #f1b6bd;
    --accent:       #e89ba3;

    --ok:           #5fb37b;
    --ok-soft:      #112418;
    --ok-line:      #23452e;

    --degraded:     #e0b25b;
    --degraded-soft:#2a2212;
    --degraded-line:#553f16;

    --down:         #e07676;
    --down-soft:    #2a1414;
    --down-line:    #552424;

    --none:         #2c2f2a;
    --none-soft:    #23251f;

    --shadow-sm: 0 1px 0 rgba(0,0,0,0.3);
    --shadow-md: 0 1px 2px rgba(0,0,0,0.4), 0 10px 40px -20px rgba(0,0,0,0.6);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  text-autospace: normal;
}

body {}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; margin: 0; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero", "ss02";
  letter-spacing: -0.01em;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Accent top rule ------------------------------------------------------ */
.accent-rule { display: none; }

/* --- Header --------------------------------------------------------------- */
.hdr {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  font-size: 17px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-badge {
  width: 28px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  color: var(--brand-ink);
  transform: translateY(3px);
}
.brand-badge svg { width: 100%; height: 100%; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-name-italic {
  font-style: italic;
  font-weight: 600;
  font-size: 19px;
  color: var(--brand-ink);
  margin-right: -2px;
}

.hdr-right {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}
.hdr-nav {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-dim);
}
.hdr-nav a { display: inline-flex; align-items: center; gap: 3px; }
.hdr-nav .arr { font-size: 10px; opacity: 0.5; transition: transform 0.15s ease, opacity 0.15s ease; }
.hdr-nav a:hover .arr { transform: translate(1px, -1px); opacity: 0.9; }

.lang-btn {
  padding: 5px 11px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-btn:hover { border-color: var(--brand); color: var(--brand-ink); }

.subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, color 0.15s ease;
}
.subscribe-btn svg {
  width: 13px;
  height: 13px;
  color: var(--brand-ink);
  transition: color 0.15s ease;
}
.subscribe-btn:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
  transform: translateY(-1px);
}
.subscribe-btn:hover svg { color: var(--brand); }
.subscribe-btn:active { transform: translateY(0); }

@media (max-width: 640px) {
  .hdr-nav { display: none; }
  .hdr-right { gap: 0; }
  .container { padding: 0 18px; }
  .subscribe-btn span { display: none; }
  .subscribe-btn { padding: 7px 10px; }
  .subscribe-btn svg { width: 15px; height: 15px; }
}

main.container { padding-top: 40px; padding-bottom: 80px; }

/* --- Banner --------------------------------------------------------------- */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 26px;
  margin-bottom: 30px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--border-strong);
  transition: background 0.3s ease;
}
.banner__left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.banner__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--none);
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.06);
}
.banner__icon svg { width: 18px; height: 18px; display: block; }
.banner__text { min-width: 0; }
.banner__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.banner__sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.banner__meta {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  text-align: right;
}
.banner__meta > div { display: flex; flex-direction: column; gap: 4px; }
.banner__meta dt {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 500;
}
.banner__meta dd {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.banner--loading::before { background: var(--border-strong); }
.banner--loading .banner__icon { background: var(--surface-2); color: var(--text-faint); }
.banner--loading .banner__icon svg { animation: pulse 1.4s ease-in-out infinite; }

.banner--ok { border-color: var(--ok-line); }
.banner--ok::before { background: var(--ok); }
.banner--ok .banner__icon { background: var(--ok); }

.banner--degraded { border-color: var(--degraded-line); }
.banner--degraded::before { background: var(--degraded); }
.banner--degraded .banner__icon { background: var(--degraded); }

.banner--down { border-color: var(--down-line); }
.banner--down::before { background: var(--down); }
.banner--down .banner__icon { background: var(--down); }

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@media (max-width: 640px) {
  .banner { gap: 12px; padding: 14px 16px; }
  .banner__left { gap: 12px; }
  .banner__icon { width: 28px; height: 28px; flex-shrink: 0; }
  .banner__icon svg { width: 14px; height: 14px; }
  .banner__title { font-size: 16px; }
  .banner__sub { font-size: 12px; }
  .banner__meta { gap: 16px; text-align: right; flex-shrink: 0; }
  .banner__meta dt { font-size: 10px; }
  .banner__meta dd { font-size: 16px; }
}

/* --- Sections ------------------------------------------------------------- */
.components-section { margin-bottom: 44px; }

/* --- Legend --------------------------------------------------------------- */
.legend {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
  padding: 0 2px;
}
.legend__item { display: inline-flex; align-items: center; gap: 7px; }
.legend__spacer { flex: 1; min-width: 10px; }
.legend__axis {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot--ok { background: var(--ok); }
.dot--degraded { background: var(--degraded); }
.dot--down { background: var(--down); }
.dot--none { background: var(--none); border: 1px solid var(--border-strong); }

/* --- Components ----------------------------------------------------------- */
.components {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: var(--surface-sunk);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.domain-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-dim);
}
.uptime-hint {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 500;
}

.group-hdr-right { display: inline-flex; align-items: center; gap: 10px; }

.guest-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 2px 8px 2px 5px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.guest-toggle:hover { color: var(--text); background: var(--surface); border-color: var(--border); }
.guest-toggle__chevron {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
  transition: transform 0.18s ease;
}
.guest-toggle[aria-pressed="true"] .guest-toggle__chevron { transform: rotate(90deg); }
.guest-toggle[aria-pressed="true"] { color: var(--text); }

/* Guest rows hidden when group lacks .show-guest — regardless of status. */
.group:not(.show-guest) .component[data-kind="guest"] {
  display: none;
}
/* When guest row is hidden, auth becomes the visually-first row and needs no top border. */
.group:not(.show-guest) .component[data-kind="guest"] + .component {
  border-top: none;
}

.component {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 0;
  align-items: start;
  padding: 12px 18px 8px;
  border-top: 1px solid var(--border);
  transition: background 0.15s ease;
  overflow: hidden;
}
.component:first-of-type { border-top: none; }
.component:hover { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }

.component-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
  height: 20px;
}
.component-label .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.component-label .label-text { font-weight: 500; color: var(--text); }
.component-label .status-text {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-left: 1px;
}

.status-dot.status-ok { background: var(--ok); }
.status-dot.status-degraded { background: var(--degraded); }
.status-dot.status-down { background: var(--down); }
.status-dot.status-none { background: var(--none); }

.component-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

/* 90-day strip */
.strip {
  display: flex;
  gap: 1.5px;
  align-items: stretch;
  height: 20px;
  flex: 1;
  min-width: 0;
}
.strip-cell {
  flex: 1 1 0;
  min-width: 0;
  background: var(--none);
  border-radius: 2px;
  cursor: help;
  transition: transform 0.08s ease, filter 0.08s ease;
}
.strip-cell:hover { filter: brightness(1.12); }
.strip-cell.cell-ok { background: var(--ok); }
.strip-cell.cell-degraded { background: var(--degraded); }
.strip-cell.cell-down { background: var(--down); }
.strip-cell.cell-none { background: var(--none-soft); border: 1px solid var(--border); }

.component-right .mid {
  color: var(--text-dim);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 0 80px;
  text-align: right;
}

@media (max-width: 720px) {
  .component { grid-template-columns: 1fr; column-gap: 0; row-gap: 8px; padding: 10px 14px; }
  .component-right { flex-wrap: wrap; gap: 4px 8px; }
  .strip { flex: 1 1 100%; }
  .component-right .mid { flex: 1 0 auto; font-size: 10.5px; text-align: left; }
}

/* Probe detail (expandable) */
.probe-detail {
  grid-column: 1 / -1;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
  display: none;
  overflow: hidden;
  min-width: 0;
}
.component.open .probe-detail { display: block; }

.probe-row {
  display: grid;
  grid-template-columns: minmax(80px, 180px) minmax(0, 1fr) 80px 90px;
  gap: 10px;
  padding: 7px 0;
  font-size: 12.5px;
  align-items: center;
  color: var(--text-dim);
  min-width: 0;
}
.probe-row + .probe-row { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.probe-row .probe-name {
  color: var(--text);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.probe-row .probe-err {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.probe-row .probe-lat {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text);
}
.probe-row .probe-status {
  text-align: right;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.probe-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 20px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.probe-toggle:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.component.open .probe-toggle { color: var(--text); border-color: var(--border-strong); }
.probe-toggle__count { font-variant-numeric: tabular-nums; }
.probe-toggle__chevron::before { content: "▸"; font-size: 9px; }
.component.open .probe-toggle__chevron::before { content: "▾"; }

/* --- Probes section ------------------------------------------------------- */
.probes-section { margin-bottom: 48px; }
.probes-toggle { cursor: pointer; user-select: none; }
.probes-toggle::after { content: "▸"; margin-left: 6px; font-size: 11px; color: var(--text-faint); transition: transform 0.15s ease; display: inline-block; }
.probes-toggle[aria-expanded="true"]::after { transform: rotate(90deg); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0 2px;
}
.section-head h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.section-head__hint {
  font-size: 11.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.section-head__right {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.probe-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.probe-list[hidden] {
  display: none;
}
.probe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.probe-card:hover { border-color: var(--border-strong); }
.probe-card .name {
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.probe-card .region {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 2px;
  font-family: var(--font-mono);
}
.pill {
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.probe-card.online .pill {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--ok-line);
}
.probe-card.offline {
  opacity: 0.75;
}
.probe-card.offline .pill {
  background: var(--down-soft);
  color: var(--down);
  border-color: var(--down-line);
}

/* --- Footer --------------------------------------------------------------- */
.ftr {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.ftr__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ftr__right .ftr__meta { margin: 0; }
.ftr__desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  max-width: 540px;
  line-height: 1.55;
}
.ftr__meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}
.ftr__meta .num { color: var(--text-dim); }

/* --- Online users chart -------------------------------------------------- */
.online-section { margin-bottom: 44px; }
.online-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.online-tabs {
  display: flex;
  gap: 1px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunk);
}
.online-tab {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.online-tab:hover { color: var(--text); background: var(--surface); border-color: var(--border); }
.online-tab.active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}
.online-card__chart {
  position: relative; width: 100%; height: 140px;
  padding: 0 18px;
  margin-top: 14px;
}
.online-card__chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.online-card__chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.55; }
.online-card__chart .axis {
  fill: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.online-card__chart .area { fill: color-mix(in srgb, var(--brand) 18%, transparent); stroke: none; }
.online-card__chart .line {
  fill: none;
  stroke: var(--brand-ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.online-card__chart .cursor {
  stroke: var(--text-dim);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}
.online-card__chart .marker {
  fill: var(--brand-ink);
  stroke: var(--surface);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}
.online-card__chart:hover .cursor,
.online-card__chart:hover .marker { opacity: 1; }
.online-card__chart .peak-dot {
  fill: var(--brand-ink);
  stroke: var(--surface);
  stroke-width: 1.5;
  pointer-events: none;
}
.online-card__chart .peak-label {
  fill: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  pointer-events: none;
}
.online-card__chart:hover .peak-dot,
.online-card__chart:hover .peak-label { opacity: 0.4; }
.online-card__chart .hit { fill: transparent; cursor: crosshair; }
.online-card__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-faint);
  font-size: 12px;
  font-style: italic;
}
.online-card__note {
  margin: 8px 0 0;
  padding: 0 18px;
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
@media (max-width: 560px) {
  .online-card__chart { height: 120px; }
  .probe-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
  }
  .probe-row .probe-name   { grid-column: 1; grid-row: 1; }
  .probe-row .probe-status { grid-column: 2; grid-row: 1; }
  .probe-row .probe-err    { grid-column: 1; grid-row: 2; white-space: normal; word-break: break-all; }
  .probe-row .probe-lat    { grid-column: 2; grid-row: 2; }
}

/* --- Incidents (unresolved + past) --------------------------------------- */
.inc-section { margin-bottom: 44px; }
.inc-section--unresolved {
  margin-bottom: 30px;
  padding: 14px 18px 16px;
  border: 1px solid var(--down-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--down-soft) 85%, transparent), var(--surface) 80%);
  box-shadow: var(--shadow-sm);
}
.inc-section--unresolved .section-head { margin-bottom: 10px; padding: 0; }
.inc-section--unresolved .section-head h2 {
  color: var(--down);
}
.inc-section--unresolved .section-head__hint { color: var(--down); }

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

.inc-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--none);
  border-radius: var(--radius-sm);
}
.inc-card--down { border-left-color: var(--down); }
.inc-card--degraded { border-left-color: var(--degraded); }

.inc-card__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--none);
  color: #fff;
  margin-top: 1px;
}
.inc-card__icon svg { width: 12px; height: 12px; display: block; }
.inc-card--down .inc-card__icon { background: var(--down); }
.inc-card--degraded .inc-card__icon { background: var(--degraded); }

.inc-card__body { flex: 1; min-width: 0; }
.inc-card__title {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.inc-card__title .inc-title__sev { color: var(--text); font-weight: 600; }
.inc-card__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-dim);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}
.inc-card__meta .sep { color: var(--text-faint); }
.inc-card__meta .mono { font-family: var(--font-mono); font-size: 11.5px; }

/* Past incidents - grouped by day */
.inc-days { display: flex; flex-direction: column; gap: 22px; }
.inc-day {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}
.inc-day:last-child { border-bottom: none; padding-bottom: 0; }
.inc-day__date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.inc-day__date .inc-day__rel {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.inc-day__none {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
  padding: 2px 0;
}
.inc-day__list { display: flex; flex-direction: column; gap: 8px; }
.inc-day__collapsed {
  display: none;
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
}
.inc-day__collapsed:hover { color: var(--text); }
.inc-day__collapsed:focus-visible {
  outline: 2px solid var(--accent, currentColor);
  outline-offset: 2px;
  border-radius: 3px;
}
.inc-day:not(.show-guest) .inc-day__entry[data-kind="guest"] {
  display: none;
}
.inc-day.has-guest .inc-day__collapsed {
  display: block;
}
.inc-day__entry {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text);
}
.inc-day__entry + .inc-day__entry { border-top: 1px dashed color-mix(in srgb, var(--border) 70%, transparent); }
.inc-day__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  justify-self: center;
  transform: translateY(1px);
}
.inc-day__dot.status-down { background: var(--down); }
.inc-day__dot.status-degraded { background: var(--degraded); }
.inc-day__entry .label {
  min-width: 0;
}
.inc-day__entry .label .sev { font-weight: 600; }
.inc-day__entry .label .sev--down { color: var(--down); }
.inc-day__entry .label .sev--degraded { color: var(--degraded); }
.inc-day__entry .label .comp { color: var(--text); }
.inc-day__entry .label .desc {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 2px;
}
.inc-day__entry .metric {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .inc-day__entry { grid-template-columns: 18px 1fr; }
  .inc-day__entry .metric { grid-column: 2; color: var(--text-dim); }
}

/* --- Subscribe modal ----------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 19, 16, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.18s ease-out;
}
@media (prefers-color-scheme: dark) {
  .modal__backdrop { background: rgba(0, 0, 0, 0.6); }
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px -20px rgba(26,24,20,0.25), 0 4px 12px -4px rgba(26,24,20,0.1);
  padding: 22px 24px 24px;
  animation: modalIn 0.22s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.modal__head h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--brand-ink);
  font-size: 22px;
}
.modal__close {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  transition: color 0.15s ease, background 0.15s ease;
}
.modal__close svg { width: 14px; height: 14px; }
.modal__close:hover { color: var(--text); background: var(--surface-2); }
.modal__intro {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.55;
}
.modal__foot {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.55;
}

.sub-option + .sub-option { margin-top: 12px; }
.sub-option {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface-sunk);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sub-option:hover { border-color: var(--border-strong); }
.sub-option__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sub-option__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sub-option__icon svg { width: 15px; height: 15px; }
.sub-option__text { flex: 1; min-width: 0; }
.sub-option__title { font-weight: 500; font-size: 13.5px; color: var(--text); }
.sub-option__desc { margin-top: 3px; font-size: 12px; color: var(--text-dim); line-height: 1.55; }
.sub-option__action {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.sub-url {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sub-url:focus { outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 1px; border-color: var(--brand); }
.copy-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--surface);
  background: var(--text);
  border: 1px solid var(--text);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.copy-btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.copy-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

/* --- Footer link --------------------------------------------------------- */
.ftr__link {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--text-dim) 45%, transparent);
}
.ftr__link:hover { color: var(--brand-ink); border-bottom-color: var(--brand); text-decoration: none; }

/* --- Tooltip -------------------------------------------------------------- */
.tooltip {
  position: fixed;
  background: var(--text);
  color: var(--bg);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
  z-index: 50;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,0.25);
  letter-spacing: 0.01em;
}

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
