:root {
  color-scheme: dark;
  --bg: #111416; --panel: #191d20; --surface: #202529; --text: #edf0ec; --muted: #a3acae; --line: #333a3e;
  --accent: #dbe5d9; --green: #9bd8b0; --amber: #efc47b; --red: #f49a93; --unknown: #b5bec6;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { color-scheme: light; --bg: #f3f4f0; --panel: #fff; --surface: #e9ece7; --text: #1d2925; --muted: #56615d; --line: #d5dcd5; --accent: #253c2e; --green: #25613a; --amber: #8b5a0d; --red: #a4322c; --unknown: #596476; }
}
:root[data-theme="light"] { color-scheme: light; --bg: #f3f4f0; --panel: #fff; --surface: #e9ece7; --text: #1d2925; --muted: #56615d; --line: #d5dcd5; --accent: #253c2e; --green: #25613a; --amber: #8b5a0d; --red: #a4322c; --unknown: #596476; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--tg-theme-bg-color, var(--bg)); color: var(--tg-theme-text-color, var(--text)); min-width: 280px; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, a, input, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--tg-theme-button-color, var(--amber)); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(100%, 820px); margin-inline: auto; min-height: var(--tg-viewport-stable-height, 100svh); padding: max(20px, env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px))) max(20px, env(safe-area-inset-right), calc(var(--tg-safe-area-inset-right, 0px) + var(--tg-content-safe-area-inset-right, 0px))) max(24px, env(safe-area-inset-bottom), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px))) max(20px, env(safe-area-inset-left), calc(var(--tg-safe-area-inset-left, 0px) + var(--tg-content-safe-area-inset-left, 0px))); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; font-size: 17px; font-weight: 650; letter-spacing: -.5px; }
.brand-mark { width: 35px; height: 35px; border: 1px solid var(--muted); border-radius: 10px; display: grid; place-content: center; position: relative; font-size: 29px; line-height: 1; font-weight: 450; }
.brand-mark span { color: var(--amber); position: absolute; right: 4px; bottom: 2px; }
.brand-caption { display: block; font: 8px/1.8 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 1.5px; color: var(--muted); }
.readonly { font-size: 10px; color: var(--muted); white-space: nowrap; }
.readonly span { padding-right: 3px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; margin: 34px 0 24px; }
.eyebrow, .section-index, .status-label { font: 10px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 1.1px; }
.eyebrow { margin: 0 0 9px; color: var(--muted); }
h1 { font-size: clamp(34px, 8vw, 46px); line-height: 1.05; letter-spacing: -1.8px; margin: 0; font-weight: 550; }
.title-dot { color: var(--amber); }
.refresh { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-height: 44px; padding: 0 13px; display: flex; align-items: center; gap: 7px; font-size: 12px; }
.refresh:not(:disabled):hover { border-color: var(--muted); }
.refresh-icon { font-size: 22px; }
.overview { --state-color: var(--unknown); background: var(--tg-theme-secondary-bg-color, var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 21px 20px 0; overflow: hidden; }
[data-state="ok"] { --state-color: var(--green); }
[data-state="down"], [data-state="forbidden"] { --state-color: var(--red); }
[data-state="degraded"], [data-state="unavailable"], [data-state="unauthorized"] { --state-color: var(--amber); }
.status-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.status-label { display: flex; gap: 7px; align-items: center; color: var(--state-color); }
.signal { flex: 0 0 auto; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.section-index { color: var(--muted); font-size: 9px; letter-spacing: .5px; white-space: nowrap; }
.overview h2 { font-size: clamp(23px, 6vw, 31px); line-height: 1.2; font-weight: 550; letter-spacing: -.7px; margin: 23px 0 10px; overflow-wrap: anywhere; }
.status-description { color: var(--muted); line-height: 1.6; font-size: 13px; margin: 0 0 23px; max-width: 49ch; }
.totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 22px; gap: 8px; }
.totals div { border-left: 1px solid var(--line); padding-left: 11px; }
.totals div:first-child { padding-left: 0; border: 0; }
.totals dt { font-size: 10px; color: var(--muted); margin-bottom: 8px; white-space: nowrap; }
.totals dd { font: 28px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: -1.5px; margin: 0; }
#ok-count { color: var(--green); } #incident-count { color: var(--amber); } #unknown-count { color: var(--unknown); }
.snapshot { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.snapshot time { font-variant-numeric: tabular-nums; }
.servers-section { margin-top: 29px; }
.list-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.list-heading h2 { font-size: 15px; font-weight: 550; letter-spacing: -.3px; margin: 0; }
.filter { position: relative; display: inline-flex; align-items: center; min-height: 44px; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.filter input { position: absolute; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch { width: 27px; height: 16px; border: 1px solid var(--muted); border-radius: 12px; padding: 2px; }
.switch::after { content: ""; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.filter input:checked + .switch { background: var(--accent); border-color: var(--accent); }
.filter input:checked + .switch::after { background: var(--bg); transform: translateX(11px); }
.filter input:focus-visible + .switch { outline: 2px solid var(--amber); outline-offset: 4px; }
.list-note { color: var(--muted); font-size: 11px; margin: 5px 0 16px; line-height: 1.5; }
.server-list { display: grid; gap: 10px; }
.server { --state-color: var(--unknown); min-width: 0; border: 1px solid var(--line); background: var(--tg-theme-secondary-bg-color, var(--panel)); border-radius: 14px; }
.server[data-state="ok"] { --state-color: var(--green); } .server[data-state="degraded"] { --state-color: var(--amber); } .server[data-state="down"] { --state-color: var(--red); }
.server summary { min-height: 103px; list-style: none; padding: 17px 16px; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 11px; border-radius: 14px; }
.server summary::-webkit-details-marker { display: none; }
.server-name { font-size: 15px; font-weight: 550; overflow-wrap: anywhere; }
.server-role { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 5px; line-height: 1.45; }
.badge { color: var(--state-color); display: inline-flex; align-items: center; gap: 5px; font-size: 10px; line-height: 1.5; justify-self: end; align-self: start; white-space: nowrap; padding-top: 2px; }
.server-freshness { font-size: 10px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.chevron { justify-self: end; color: var(--muted); font-size: 13px; transition: transform .15s; }
.server[open] .chevron { transform: rotate(180deg); }
.server-body { border-top: 1px solid var(--line); padding: 17px 16px; }
.detail-caption { color: var(--muted); font: 9px/1.5 ui-monospace, monospace; letter-spacing: 1.2px; margin: 0 0 13px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check { padding-block: 13px; border-bottom: 1px solid var(--line); }
.check:first-child { padding-top: 0; } .check:last-child { border: 0; padding-bottom: 0; }
.check-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.check-name { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.check[data-state="ok"] { --state-color: var(--green); } .check[data-state="degraded"] { --state-color: var(--amber); } .check[data-state="down"] { --state-color: var(--red); } .check[data-state="unknown"] { --state-color: var(--unknown); }
.check p, .detail-note { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); margin: 18px 0 0; padding-top: 16px; }
.metrics dt { color: var(--muted); font-size: 10px; } .metrics dd { margin: 5px 0 0; font: 15px/1.4 ui-monospace, monospace; overflow-wrap: anywhere; }
.empty-state { padding: 30px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
.empty-mark { font: 27px/1 ui-monospace, monospace; color: var(--muted); }
.empty-state h3 { font-size: 14px; font-weight: 550; margin: 13px 0 7px; }
.empty-state p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0; }
footer { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 19px; color: var(--muted); font-size: 10px; line-height: 1.6; }
footer p { margin: 7px 0 0; } .footer-brand { color: var(--tg-theme-text-color, var(--text)); font-size: 11px; }
.noscript { padding: 20px; }
@media (min-width: 640px) { .shell { padding-inline: 32px; padding-top: 32px; } .page-heading { margin-top: 42px; } .overview { padding: 26px 28px 0; } .status-description { font-size: 14px; } .totals { max-width: 480px; } .server summary { padding-inline: 22px; } .server-body { padding-inline: 22px; } }
@media (max-width: 350px) { .section-index { display: none; } .readonly { font-size: 9px; } .brand { font-size: 15px; } .totals dt { font-size: 9px; } .server summary { padding-inline: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
