:root {
  color-scheme: dark;
  --bg: #090b0a;
  --bg-2: #121715;
  --line: rgba(236, 244, 236, 0.08);
  --line-strong: rgba(236, 244, 236, 0.16);
  --text: #edf3ee;
  --muted: #a3b1a8;
  --faint: #7d8c84;
  --emerald: #3ecf8e;
  --emerald-2: #8ef0c0;
  --emerald-ink: #062117;
  --gold: #e0b85c;
  --gold-ink: #2a2108;
  --rose: #ff8b84;
  --sky: #9ec1ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --sidebar: 248px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at -10% -20%, rgba(62, 207, 142, 0.1), transparent 55%),
    radial-gradient(700px 420px at 110% -10%, rgba(224, 184, 92, 0.06), transparent 50%);
  z-index: 0;
}

::selection { background: rgba(62, 207, 142, 0.28); }

:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }

a { color: var(--emerald-2); }

h1, h2 { font-weight: 650; letter-spacing: -0.03em; }

button, input, select { font: inherit; color: inherit; }

.app { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  border-right: 1px solid var(--line);
  background: #0c100e;
  z-index: 40;
}

.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 18px; }
.brand-mark { width: 32px; height: 32px; color: var(--emerald); flex: none; }
.brand-text strong { display: block; letter-spacing: 0.14em; font-size: 13px; }
.brand-text span { color: var(--faint); font-size: 12px; }

.nav { display: grid; gap: 4px; overflow: auto; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
}
.nav-link svg { width: 18px; height: 18px; flex: none; }
.nav-link:hover { background: rgba(255, 255, 255, 0.03); color: var(--text); }
.nav-link.is-active { background: rgba(62, 207, 142, 0.12); color: var(--text); }

.side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 8px 0;
}
.who { display: flex; gap: 8px; align-items: center; min-width: 0; }
.who strong { display: block; font-size: 14px; }
.who span { color: var(--faint); font-size: 12px; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(62, 207, 142, 0.16);
  color: var(--emerald-2);
  font-weight: 700;
  flex: none;
}

.text-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.text-btn:hover { color: var(--text); }

.nav-toggle, .nav-close { display: none; }

.workspace { flex: 1; min-width: 0; }
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 72px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.kicker {
  margin: 0 0 4px;
  color: var(--emerald);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
h1 { margin: 0; font-size: 36px; line-height: 1.1; }
.lede { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.banner {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(224, 184, 92, 0.08);
  border: 1px solid rgba(224, 184, 92, 0.22);
  color: #f0e2c0;
  font-size: 13.5px;
}

.stats, .metrics {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.stats-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.stat, .metrics article {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.stat-label, .metrics span {
  display: block;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.stat strong, .metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat strong.stat-text {
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.35;
}
.metrics strong { font-size: 22px; }
.stat .of { font-size: 16px; color: var(--muted); font-weight: 500; }
.stat-sub, .metrics em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-style: normal;
  font-size: 12.5px;
}
.stat-accent strong { color: var(--emerald-2); }

.dash, .split, .keys-layout {
  display: grid;
  gap: 16px;
}
.dash { grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.9fr); }
.split { grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); }
.keys-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.dash .wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 16px; align-content: start; }

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px 18px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.panel h2, .wizard h2 { margin: 0 0 12px; font-size: 16px; }
.panel-head h2 { margin: 0; }
.muted, .sub, .hint { color: var(--muted); }
.hint { font-size: 13.5px; margin: 10px 0 0; }
.sub { font-size: 13px; }
.mono, .code, .term, .fp, .pill { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

.chart svg { width: 100%; height: 180px; display: block; }
.chart-x {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.people, .events, .services, .deps, .vps-rows, .facts, .manual-steps, .check-preview {
  list-style: none;
  margin: 0;
  padding: 0;
}
.people { display: grid; }
.people li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.people li:first-child { border-top: 0; }
.lvl {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(62, 207, 142, 0.1);
  color: var(--emerald-2);
  font-size: 13px;
  font-weight: 700;
}
.people b, .services b, .dep b, .vps-rows b, .card-top b { display: block; font-weight: 650; }
.people span, .services .mono { color: var(--muted); font-size: 13px; }
.people em { font-style: normal; color: var(--faint); font-size: 12px; }

.events { display: grid; gap: 12px; }
.event {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
}
.event time { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 13px; }
.event p { margin: 0; }
.event-ok { border-left-color: var(--emerald); }
.event-warn { border-left-color: var(--gold); }
.event-info { border-left-color: var(--sky); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  padding: 0 12px 8px 0;
}
.table td {
  padding: 11px 12px 11px 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.table a { color: var(--text); font-weight: 650; text-decoration: none; }
.table a:hover { color: var(--emerald-2); }
.fp { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.key-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.key-list > li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.key-list > li:first-child { border-top: 0; padding-top: 0; }
.key-list b { display: block; }
.key-list .sub { display: block; margin-top: 2px; color: var(--muted); }
.row-actions { flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; }
.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
dialog.modal {
  width: min(560px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #141816;
  color: var(--text);
  box-shadow: var(--shadow);
}
dialog.modal-sm { width: min(420px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.62); }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-head h2 { margin: 0 0 4px; }
.modal .field { margin-top: 12px; }
.modal textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c0f0d;
  color: var(--text);
  resize: vertical;
}
.provider-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.provider-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1c2120;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.provider-btn svg { width: 16px; height: 16px; }
.provider-btn:hover { border-color: #3a4440; }
.git-list { margin-top: 18px; }
.git-log {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0c0f0d;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.switch {
  width: 36px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #2a2e2c;
  position: relative;
  cursor: pointer;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8b938e;
}
.switch.is-on { background: var(--emerald); }
.switch.is-on::after { transform: translateX(14px); background: var(--emerald-ink); }
.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.switch-line input { width: 18px; height: 18px; accent-color: var(--emerald); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.vps-rows { overflow-x: auto; }
.vps-rows a {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 160px 120px 56px;
  gap: 12px;
  align-items: center;
  min-width: 620px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.vps-rows li:first-child a { border-top: 0; }
.vps-rows em { font-style: normal; font-weight: 650; text-align: right; }
.mini-meters { display: grid; gap: 4px; }
.mini-meter, .meter-track, .bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: #0c0f0d;
  overflow: hidden;
}
.bar { height: 8px; }
.mini-meter i, .meter-track i, .bar i { display: block; height: 100%; background: var(--emerald); }
.mini-meter i.warm, .meter-track i.warm { background: var(--gold); }
.mini-meter i.hot, .meter-track i.hot { background: var(--rose); }

.vps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.vps-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.vps-card:hover { border-color: rgba(62, 207, 142, 0.45); }
.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
a.chip { text-decoration: none; }
.remote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.remote-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #121614;
  border: 1px solid var(--line);
}
.remote-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.remote-facts li { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 13px; }
.remote-facts b { color: var(--text); font-weight: 600; }
.remote-actions { display: flex; justify-content: flex-end; gap: 4px; }
.pill {
  display: inline-flex;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.btn-block { width: 100%; }
dialog.modal-lg { width: min(720px, calc(100vw - 32px)); }
.callout {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(62, 207, 142, 0.08);
  border: 1px solid rgba(62, 207, 142, 0.28);
  color: var(--muted);
  font-size: 13px;
}
.setup-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.modal h3 { margin: 16px 0 8px; font-size: 14px; }
.modal .code, .modal .deps { margin-top: 8px; }
.modal textarea.short { min-height: 72px; }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.card-top b { font-size: 16px; }
.stat-inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-inline span {
  display: block;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stat-inline strong { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.meter-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter-top b { color: var(--text); font-weight: 650; }
.meter-track { margin-top: 4px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}
.status-online { color: var(--emerald); }
.status-offline { color: var(--faint); }
.status-bad { color: #ff9d86; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--text);
}
.btn-primary { background: var(--emerald); color: var(--emerald-ink); }
.btn-primary:hover { background: #62e2a8; }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: #ecc56e; }
.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover { border-color: rgba(62, 207, 142, 0.5); }
.btn-danger {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  border-color: rgba(255, 139, 132, 0.45);
  color: #ffb4ae;
}
.btn-danger:hover { background: rgba(255, 139, 132, 0.08); }
.btn-stop {
  border: 1px solid rgba(255, 139, 132, 0.45);
  color: #ffb4ae;
}
.btn-stop:hover { border-color: #ff8b84; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; font-weight: 600; }
.btn:disabled, .btn.is-busy { opacity: 0.55; cursor: default; }

.chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chip.is-on { color: var(--emerald-ink); background: var(--emerald); border-color: transparent; }

.deps { display: grid; }
.dep {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  animation: rise 0.4s ease both;
}
.dep:first-child { border-top: 0; }
.dep span { color: var(--muted); font-size: 13px; }
.dep em { font-style: normal; font-size: 13px; }
.dep-ok em { color: var(--emerald); }
.dep-missing em { color: #ff9d86; }
.dep-skip em { color: var(--faint); }
.dep-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.dep-ok .dep-mark { background: var(--emerald); }
.dep-missing .dep-mark { background: var(--rose); }
.deps.is-checking { opacity: 0.4; }
.dep:nth-child(2) { animation-delay: 0.05s; }
.dep:nth-child(3) { animation-delay: 0.1s; }
.dep:nth-child(4) { animation-delay: 0.15s; }
.dep:nth-child(5) { animation-delay: 0.2s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.term {
  margin-top: 12px;
  background: #070908;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: auto;
  max-height: 260px;
}
.term-bar {
  position: sticky;
  top: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  color: var(--faint);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  background: #070908;
}
.term-bar i { width: 8px; height: 8px; border-radius: 50%; background: #2c3833; }
.term pre {
  margin: 0;
  padding: 12px 14px 16px;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: #d5e6da;
}
.term.console-screen {
  max-height: min(70vh, 640px);
  min-height: 460px;
  margin-top: 0;
}
.term.console-screen pre { min-height: 400px; }
.term-bar .pulse {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--faint);
}
.term-bar.is-live .pulse { background: var(--emerald, #3dbe7a); box-shadow: 0 0 0 4px rgba(61, 190, 122, 0.16); }
.power-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 18px;
}
.power-bar h2 { margin-bottom: 4px; }
.power-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.power-bar .term { flex-basis: 100%; margin-top: 0; }

.subnav { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.subnav a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  text-decoration: none;
}
.subnav a.is-on { color: var(--emerald-ink); background: var(--emerald); border-color: transparent; }

.checks { display: flex; flex-direction: column; gap: 8px; }
.checks-row { flex-direction: row; flex-wrap: wrap; gap: 14px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; }
.checks em { color: var(--muted); font-style: normal; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form > .btn, .stack-form > form { align-self: flex-start; }

.plans { list-style: none; margin: 0; padding: 0; }
.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.plan:first-child { border-top: 0; }
.plan p { margin: 6px 0 0; }
.plan .row-actions { align-items: flex-start; }

.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 0 0 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.field.span-2 { grid-column: 1 / -1; }

.code {
  margin: 12px 0 0;
  padding: 14px;
  overflow: auto;
  background: #070908;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: #d5e6da;
  white-space: pre-wrap;
}

.manual-steps { display: grid; gap: 10px; margin: 14px 0; counter-reset: step; }
.manual-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.manual-steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(62, 207, 142, 0.12);
  color: var(--emerald-2);
  font-size: 13px;
}
.manual-steps b { display: block; }
.manual-steps span { color: var(--muted); }

details.manual { padding: 0; margin-top: 16px; }
details.manual summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 650;
  list-style: none;
}
details.manual summary::-webkit-details-marker { display: none; }
details.manual .manual-body { padding: 0 18px 18px; }

.wizard-ind {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  color: var(--faint);
}
.wizard-ind li { display: flex; align-items: center; gap: 8px; }
.wizard-ind span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  font-size: 12px;
}
.wizard-ind .is-on { color: var(--text); }
.wizard-ind .is-on span, .wizard-ind .is-done span {
  background: var(--emerald);
  color: var(--emerald-ink);
  border-color: transparent;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #0c0f0d;
  padding: 0 12px;
}
.field textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(62, 207, 142, 0.45);
  border-color: transparent;
}
.field input::placeholder {
  color: #667068;
  opacity: 1;
}
.field input.is-invalid, .field select.is-invalid { border-color: rgba(255, 139, 132, 0.8); }
.field-error, .form-error { color: #ffb4ae; font-size: 13px; margin: 6px 0 0; }
.form-ok { color: var(--emerald-2); font-size: 13px; margin: 6px 0 0; }
.form-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
.summary { display: grid; gap: 8px; margin: 0 0 14px; }
.summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.summary dt { color: var(--faint); }
.summary dd { margin: 0; text-align: right; }
.check-preview { margin: 0 0 8px; padding-left: 18px; color: var(--muted); }
.test-result { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; }
.test-result.is-ok { background: rgba(62, 207, 142, 0.1); color: var(--emerald-2); }
.test-result.is-bad { background: rgba(255, 139, 132, 0.1); color: #ffb4ae; }

.services { display: grid; gap: 10px; }
.services li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.services em { color: var(--muted); font-style: normal; font-size: 13px; }

.bar-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.bar-row b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.empty { color: var(--muted); margin: 8px 0; }
.empty-block {
  padding: 28px;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
}
.empty-block h2 { margin-top: 0; }

.key-callout {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.06);
}
.key-callout h2 { margin: 0 0 8px; font-size: 18px; }

.toast {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #1a2420;
  border: 1px solid rgba(62, 207, 142, 0.4);
  box-shadow: var(--shadow);
}

.login {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.login-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 48px 48px 32px;
  background:
    radial-gradient(800px 420px at 0% 0%, rgba(62, 207, 142, 0.16), transparent 55%),
    radial-gradient(500px 320px at 100% 100%, rgba(224, 184, 92, 0.1), transparent 50%),
    #0c100e;
}
.login-aside h1 {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.02;
  max-width: 11em;
}
.facts { display: grid; gap: 14px; margin-top: 28px; }
.facts b { display: block; }
.facts span { color: var(--muted); }
.nodes { width: min(100%, 480px); }
.login-main { display: grid; place-items: center; padding: 32px 24px; }
.login-card { width: min(420px, 100%); }
.login-card h2 { margin: 0; font-size: 32px; }
.login-form { display: grid; gap: 12px; margin-top: 18px; }
.files { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.filetree, .filetree ul { list-style: none; margin: 0; padding: 0 0 0 12px; }
.filetree { padding-left: 0; }
.dirname {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.filetree a {
  display: block;
  margin: 2px 0;
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
}
.filetree a:hover, .filetree a.is-on { background: rgba(62, 207, 142, 0.12); color: var(--emerald-2); }
.filetree li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.filetree li > a { flex: 1; min-width: 0; }
.file-meta { color: var(--faint); font-size: 12px; white-space: nowrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--emerald-2); }
.crumb-sep { color: var(--faint); }
.editor textarea {
  width: 100%;
  min-height: 460px;
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #070908;
  color: #d5e6da;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}
.editor textarea:focus { outline: 2px solid rgba(62, 207, 142, 0.45); }
.path-title { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.editor .form-actions { align-items: flex-end; }
.editor .hint { margin: 0; max-width: 46ch; }
.demo { margin-top: 16px; color: var(--muted); font-size: 13px; }
.demo code {
  font-family: var(--mono);
  color: var(--text);
  background: #0c0f0d;
  padding: 1px 6px;
  border-radius: 6px;
}

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.l2map {
  position: relative;
  aspect-ratio: 1000 / 640;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c1416;
}
.l2map svg, .l2map canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.l2map canvas { z-index: 1; }
.l2map-tags { z-index: 2; pointer-events: none; }
.l2town text {
  fill: #d5e6da;
  font-size: 13px;
  font-family: Manrope, sans-serif;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #0c1416;
  stroke-width: 3px;
}
.l2map-legend, .l2map-banner {
  position: absolute;
  z-index: 2;
  font-size: 12px;
}
.l2map-legend {
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8, 12, 11, 0.82);
  color: var(--muted);
}
.l2map-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
}
.dot-play { background: #3ecf8e; }
.dot-trade { background: #e2b657; }
.l2map-banner {
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(8, 12, 11, 0.88);
  color: #f0d2d2;
}
.l2map-tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(8, 12, 11, 0.92);
  color: #d5e6da;
  font-size: 12px;
  white-space: nowrap;
}
.map-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 12px; }
.map-counts span { display: block; color: var(--muted); font-size: 12px; }
.map-counts strong { font-size: 22px; }
.map-side .people { padding: 0 8px 8px; }
.map-empty { color: var(--muted); }
.map-side .hint { padding: 0 16px 16px; }

.db-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.db-side {
  position: sticky; top: 16px; max-height: calc(100vh - 120px); overflow: auto;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); padding: 8px;
}
.db-label { margin: 12px 8px 4px; color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.db-link { display: flex; flex-direction: column; gap: 1px; margin: 2px 0; padding: 7px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.db-link b { font-weight: 650; }
.db-link small { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.db-link.is-sub { padding-left: 22px; color: var(--muted); }
.db-link.is-on { background: rgba(62, 207, 142, 0.12); color: var(--emerald-2); }
.db-main { min-width: 0; }
.db-crumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.db-crumb a { color: var(--muted); text-decoration: none; }
.db-crumb a:hover { color: var(--emerald-2); }
.db-sql, .db-form { display: grid; gap: 10px; margin-top: 16px; }
.db-sql textarea, .db-form input { width: 100%; }
.db-structure { margin-bottom: 14px; }
.db-structure summary { cursor: pointer; color: var(--muted); }
.row-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.row-actions form { margin: 0; }

@media (max-width: 1100px) {
  .stats, .stats.stats-4, .stats.stats-7, .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
    position: fixed;
    z-index: 30;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: #121715;
    padding: 0;
  }
  .nav-toggle span { display: block; height: 1.5px; margin: 5px 11px; background: var(--text); }
  .nav-close { display: inline-flex; margin: 0 8px 10px; }
  .sidebar { position: fixed; transform: translateX(-105%); transition: transform 0.2s ease; }
  .sidebar.is-open { transform: none; }
  .page { padding: 68px 16px 48px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .stats, .stats.stats-4, .stats.stats-7, .metrics, .dash, .split, .keys-layout, .files, .login, .form-grid, .plan, .map-layout, .db-app {
    grid-template-columns: 1fr;
  }
  .db-side { position: static; max-height: none; }
  .dash .wide { grid-column: auto; }
  h1 { font-size: 30px; }
  .login-aside { padding: 28px 20px 12px; }
  .login-aside h1 { max-width: none; }
  .services li { grid-template-columns: 16px minmax(0, 1fr); }
  .services em { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
