:root {
  --bg: #0a0a0b;
  --surface: #131316;
  --surface-2: #17171b;
  --border: #232327;
  --text: #e8e8ea;
  --muted: #8a8a92;
  --faint: #58585f;
  --ok: #3ddc84;
  --warn: #e8c547;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 0);
  background-size: 28px 28px;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }

header {
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-family: var(--mono); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }
.brand .mark { width: 20px; height: 20px; border-radius: 5px; background: var(--text); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.navlinks { display: none; gap: 1.75rem; font-size: 0.87rem; color: var(--muted); }
.navlinks a:hover { color: var(--text); }
.navlinks a.on { color: var(--text); }
@media (min-width: 720px) { .navlinks { display: flex; } }
.status-pill { display: flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; color: var(--muted); font-family: var(--mono); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(61,220,132,0.12); flex: none; }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(232,197,71,0.14); }

main { padding: 3.2rem 0 3rem; }
.eyebrow { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1rem; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; margin: 0 0 1rem; letter-spacing: -0.01em; max-width: 680px; }
h2 { font-size: 1.3rem; margin: 0 0 0.9rem; letter-spacing: -0.005em; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 540px; margin: 0 0 2.1rem; }
.cta { display: flex; gap: 0.75rem; margin-bottom: 3.5rem; flex-wrap: wrap; }
.btn { font-family: var(--mono); font-size: 0.85rem; padding: 0.62rem 1.1rem; border-radius: 7px; border: 1px solid var(--border); cursor: pointer; background: none; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.btn.ghost { color: var(--text); }
.btn.ghost:hover { border-color: var(--faint); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 3.5rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tabs { display: flex; gap: 1.1rem; font-family: var(--mono); font-size: 0.78rem; color: var(--faint); }
.tabs button { background: none; border: none; color: inherit; font-family: inherit; font-size: inherit; cursor: pointer; padding: 0; }
.tabs button.on { color: var(--text); }
.tabs button:hover { color: var(--muted); }
.dots { display: flex; gap: 5px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
pre { margin: 0; padding: 1.15rem 1.25rem; font-family: var(--mono); font-size: 0.82rem; overflow-x: auto; color: #c7c7cd; }
pre .k { color: #9aa7ff; }
pre .s { color: #7fdca4; }
pre .c { color: var(--faint); }
pre .m { color: #e8e8ea; font-weight: 600; }
.resp { border-top: 1px solid var(--border); }
.tabpane { display: none; }
.tabpane.show { display: block; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 3.5rem; }
.card { background: var(--surface); padding: 1.35rem 1.4rem; }
.card svg { width: 18px; height: 18px; stroke: var(--text); margin-bottom: 0.8rem; opacity: 0.85; }
.card h3 { font-size: 0.92rem; margin: 0 0 0.4rem; }
.card p { font-size: 0.83rem; color: var(--muted); margin: 0; }

table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.82rem; }
th { text-align: left; color: var(--faint); font-weight: 500; padding: 0.55rem 1.1rem; border-bottom: 1px solid var(--border); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
td { padding: 0.65rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--muted); }
td:first-child { color: var(--text); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
.m-post { color: #9aa7ff; } .m-get { color: #7fdca4; } .m-del { color: #ec9a9a; }

section.label { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.9rem; }

footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 2rem; }
.fwrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.8rem; color: var(--faint); }
.flinks { display: flex; gap: 1.3rem; }
.flinks a:hover { color: var(--muted); }

/* docs layout */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 760px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-side { font-size: 0.85rem; position: sticky; top: 80px; }
.docs-side .grp { margin-bottom: 1.6rem; }
.docs-side .grp-label { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.55rem; }
.docs-side a { display: block; padding: 0.3rem 0; color: var(--muted); }
.docs-side a.on { color: var(--text); font-weight: 600; }
.docs-side a:hover { color: var(--text); }
.docs-body h2 { margin-top: 2.2rem; }
.docs-body h2:first-child { margin-top: 0; }
.docs-body p { color: var(--muted); font-size: 0.93rem; max-width: 640px; }
.docs-body ul { color: var(--muted); font-size: 0.93rem; padding-left: 1.2rem; }
.docs-body li { margin-bottom: 0.4rem; }

/* status page */
.sys-banner { display: flex; align-items: center; gap: 0.7rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 2.2rem; font-family: var(--mono); font-size: 0.88rem; }
.svc-row { display: flex; align-items: center; justify-content: space-between; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--border); }
.svc-row:last-child { border-bottom: none; }
.svc-name { font-size: 0.9rem; }
.svc-meta { display: flex; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.uptime-bars { display: flex; gap: 2px; }
.uptime-bars span { width: 4px; height: 14px; border-radius: 1px; background: var(--ok); }
.uptime-bars span.deg { background: var(--warn); }
.incident { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.incident:last-child { border-bottom: none; }
.incident .idate { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); margin-bottom: 0.3rem; }
.incident .ititle { font-size: 0.92rem; margin-bottom: 0.25rem; }
.incident .ibody { font-size: 0.83rem; color: var(--muted); }
.badge { font-family: var(--mono); font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 4px; background: rgba(61,220,132,0.12); color: var(--ok); }
.badge.resolved { background: rgba(138,138,146,0.14); color: var(--muted); }

/* changelog */
.chlog-entry { padding: 1.6rem 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 140px 1fr; gap: 1.5rem; }
.chlog-entry:first-child { padding-top: 0; }
.chlog-entry:last-child { border-bottom: none; }
@media (max-width: 600px) { .chlog-entry { grid-template-columns: 1fr; gap: 0.5rem; } }
.chlog-date { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); white-space: nowrap; }
.chlog-ver { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; margin-bottom: 0.6rem; }
.chlog-entry h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.chlog-entry ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.87rem; }
.chlog-entry li { margin-bottom: 0.35rem; }
.tag { font-family: var(--mono); font-size: 0.68rem; padding: 0.1rem 0.4rem; border-radius: 4px; margin-right: 0.4rem; }
.tag.new { background: rgba(61,220,132,0.14); color: var(--ok); }
.tag.fix { background: rgba(154,167,255,0.14); color: #9aa7ff; }
.tag.chg { background: rgba(232,197,71,0.14); color: var(--warn); }
