/* BypassData landing — dark tech / neon theme */

:root {
  --bg: #0b0e14;
  --bg-2: #0d111a;
  --surface: #12161f;
  --surface-2: #171c27;
  --surface-3: #1e2530;
  --border: #202836;
  --border-2: #2a3342;
  --text: #e6edf3;
  --muted: #94a3b8;
  --muted-2: #64748b;

  --accent: #818cf8;      /* proxy / brand */
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --green: #34d399;       /* direct / bypass */
  --amber: #fbbf24;
  --sky: #38bdf8;
  --danger: #f87171;

  --grad: linear-gradient(90deg, var(--cyan), var(--violet));
  --grad-br: linear-gradient(135deg, var(--cyan), var(--violet));

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --shadow: 0 20px 60px -25px rgba(0, 0, 0, 0.8);
  --glow: 0 0 0 1px rgba(129, 140, 248, 0.18), 0 18px 50px -20px rgba(129, 140, 248, 0.35);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glows + grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 78% -8%, rgba(129, 140, 248, 0.16), transparent 60%),
    radial-gradient(50rem 35rem at 8% 6%, rgba(34, 211, 238, 0.10), transparent 55%),
    radial-gradient(45rem 40rem at 50% 120%, rgba(167, 139, 250, 0.10), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}

.section { padding: 96px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-top: 14px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 14px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 650;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--grad);
  color: #06131a;
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(129, 140, 248, 0.6); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-2);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(129, 140, 248, 0.08); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 13px; }

/* "how it works" → illustrated guide CTA */
.how-cta { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 11px; text-align: center; }
.how-cta-note { color: var(--muted); font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 14, 20, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(11, 14, 20, 0.9); }
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; display: block; }
.nav-links { display: flex; gap: 2px; margin-left: 12px; }
.nav-links a {
  padding: 8px 9px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 550;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* language switch */
.lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.lang button {
  font-family: inherit;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.lang button.active { color: #06131a; background: var(--grad); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 60px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  font-weight: 850;
  margin: 20px 0 0;
}
.hero .lead {
  font-size: clamp(19px, 2.4vw, 23px);
  color: var(--text);
  font-weight: 600;
  margin: 18px 0 0;
  max-width: 34ch;
}
.hero .sub { color: var(--muted); font-size: 17.5px; margin: 18px 0 0; max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-badges {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 550;
}
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* Panel mockup */
.mockup {
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow), var(--glow);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-9deg) rotateX(3deg);
  transition: transform 0.5s ease;
}
.mockup:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.mockup-title { margin-left: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mockup-body { padding: 18px; }
.mk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.mk-stat { background: var(--surface-3); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.mk-stat .k { font-size: 11px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.mk-stat .v { font-size: 20px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }
.mk-stat .v.cyan { color: var(--cyan); } .mk-stat .v.green { color: var(--green); } .mk-stat .v.accent { color: var(--accent); }
.mk-rows { display: flex; flex-direction: column; gap: 9px; }
.mk-row { display: flex; align-items: center; gap: 12px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.mk-port { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 600; min-width: 62px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.02em; }
.chip.direct { color: var(--green); background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.3); }
.chip.proxy { color: var(--accent); background: rgba(129, 140, 248, 0.12); border: 1px solid rgba(129, 140, 248, 0.3); }
.mk-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.mk-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.mk-bps { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 74px; text-align: right; }

/* ---------- Metric strip ---------- */
.metrics { border-block: 1px solid var(--border); background: rgba(255, 255, 255, 0.012); }
.metrics .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 34px; }
.metric { text-align: center; }
.metric .n { font-size: clamp(24px, 3vw, 34px); font-weight: 850; }
.metric .l { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- Feature grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--glow); }
.card .icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.22);
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; stroke: var(--cyan); }
.card h3 { font-size: 18.5px; font-weight: 750; }
.card p { color: var(--muted); font-size: 15.5px; margin: 10px 0 0; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 44px; }
.step { position: relative; padding: 24px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step .num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #06131a;
  background: var(--grad);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  margin-bottom: 14px;
}
.step h3 { font-size: 17px; font-weight: 720; }
.step p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }

/* flow diagram */
.flow {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.flow-node {
  flex: 1;
  min-width: 150px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface-3);
  text-align: center;
}
.flow-node .t { font-weight: 720; font-size: 15px; }
.flow-node .d { color: var(--muted); font-size: 13px; margin-top: 5px; }
.flow-node.brand-node { border-color: rgba(129, 140, 248, 0.4); box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.12); }
.flow-arrow { display: grid; place-items: center; color: var(--muted-2); font-size: 22px; }
.flow-split { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 160px; }
.flow-node.exit-direct { border-color: rgba(52, 211, 153, 0.35); }
.flow-node.exit-proxy { border-color: rgba(129, 140, 248, 0.35); }

/* ---------- Security ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.sec-item { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sec-item .ic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.22); }
.sec-item .ic svg { width: 22px; height: 22px; stroke: var(--green); }
.sec-item h3 { font-size: 16.5px; font-weight: 720; }
.sec-item p { color: var(--muted); font-size: 15px; margin: 7px 0 0; }

/* ---------- Download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.dl-card { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); padding: 28px 26px; display: flex; flex-direction: column; }
.dl-card .os { display: flex; align-items: center; gap: 12px; }
.dl-card .os svg { width: 28px; height: 28px; }
.dl-card .os h3 { font-size: 20px; font-weight: 780; }
.dl-card > p { color: var(--muted); font-size: 15.5px; margin: 14px 0 18px; }
.code {
  font-family: var(--mono);
  font-size: 13px;
  background: #090c12;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: #cbd5e1;
  overflow-x: auto;
  margin-bottom: 18px;
}
.code .p { color: var(--green); }
.dl-card .btn { margin-top: auto; }
.dl-note { color: var(--muted-2); font-size: 14px; text-align: center; margin-top: 22px; }

/* ---------- Free band ---------- */
.free-band { text-align: center; }
.free-inner {
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 22px;
  background:
    radial-gradient(40rem 20rem at 50% -30%, rgba(129, 140, 248, 0.18), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: 60px 32px;
  box-shadow: var(--glow);
}
.free-inner h2 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 850; }
.free-inner p { color: var(--muted); font-size: 18px; max-width: 56ch; margin: 16px auto 28px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.faq {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.faq[open] { border-color: var(--border-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 650;
  font-size: 16.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 22px 20px; color: var(--muted); font-size: 15.5px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 15px; max-width: 34ch; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin: 0 0 14px; font-weight: 700; }
.footer-col a { display: block; color: var(--muted); font-size: 15px; padding: 5px 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 24px; color: var(--muted-2); font-size: 13.5px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .mockup { transform: none; max-width: 520px; margin-inline: auto; }
  .mockup:hover { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .metrics .container { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}

/* Collapse the full nav into a hamburger where the 7 Vietnamese labels stop fitting.
   Vietnamese is the default language and its labels run wider than the English set,
   so the horizontal nav only appears once there is comfortable room for them. */
@media (max-width: 1119px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px; height: 42px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .nav-toggle svg { width: 22px; height: 22px; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: rgba(11, 14, 20, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px 20px;
    gap: 2px;
    margin: 0;
  }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .nav-right .btn-primary { display: none; }
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
}

@media (max-width: 420px) {
  .metrics .container { grid-template-columns: 1fr; }
  .mk-stats { grid-template-columns: 1fr; }
}

/* =====================================================================
   Documentation & legal pages
   ===================================================================== */
.page-hero { padding: 56px 0 8px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted-2); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: 0.5; }
.page-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 850; margin-top: 8px; }
.page-hero .lead { color: var(--muted); font-size: 18.5px; margin-top: 14px; max-width: 62ch; }
.page-meta { color: var(--muted-2); font-size: 13.5px; margin-top: 14px; }

/* two-column doc layout with sticky TOC */
.doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding: 40px 0 40px;
}
.toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 18px;
}
.toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin: 0 0 12px; font-weight: 700; }
.toc a {
  display: block;
  color: var(--muted);
  font-size: 14.5px;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.toc a:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.toc a.active { color: var(--text); border-left-color: var(--accent); background: rgba(129, 140, 248, 0.08); }

/* prose */
.prose { max-width: 760px; }
.prose > section { scroll-margin-top: 92px; padding-bottom: 12px; }
.prose h2 { font-size: 26px; font-weight: 800; margin: 44px 0 16px; letter-spacing: -0.02em; }
.prose section:first-child h2 { margin-top: 0; }
.prose h3 { font-size: 19px; font-weight: 720; margin: 28px 0 10px; }
.prose p { color: var(--muted); margin: 12px 0; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a.inline { color: var(--accent); border-bottom: 1px solid rgba(129, 140, 248, 0.35); }
.prose a.inline:hover { border-bottom-color: var(--accent); }
.prose ul, .prose ol { color: var(--muted); margin: 12px 0; padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--muted-2); }
.prose code:not(.code code) {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 6px;
  padding: 1px 6px;
  color: #c7d2fe;
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }

/* code block with header + copy */
.codeblock { margin: 18px 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #090c12; }
.codeblock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}
.codeblock-head .label { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 600; }
.copy-btn {
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted); background: transparent;
  border: 1px solid var(--border-2); border-radius: 7px;
  padding: 4px 10px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.copied { color: var(--green); border-color: rgba(52, 211, 153, 0.4); }
.copy-btn svg { width: 14px; height: 14px; }
.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.codeblock code { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #cbd5e1; white-space: pre; }
.codeblock .c { color: #5b6879; }        /* comment */
.codeblock .p { color: var(--green); }    /* prompt */
.codeblock .k { color: var(--cyan); }     /* keyword / command */
.codeblock .s { color: #fca5a5; }         /* string */
.codeblock .v { color: var(--amber); }    /* variable / value */

/* callouts */
.callout {
  display: flex; gap: 14px;
  border: 1px solid var(--border-2);
  border-left-width: 3px;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
  background: var(--surface);
  font-size: 15px;
  color: var(--muted);
}
.callout .ci { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.callout .ci svg { width: 22px; height: 22px; }
.callout strong { display: block; color: var(--text); margin-bottom: 3px; }
.callout.note { border-left-color: var(--sky); } .callout.note .ci svg { stroke: var(--sky); }
.callout.tip { border-left-color: var(--green); } .callout.tip .ci svg { stroke: var(--green); }
.callout.warn { border-left-color: var(--amber); } .callout.warn .ci svg { stroke: var(--amber); }
.callout.danger { border-left-color: var(--danger); background: rgba(248, 113, 113, 0.05); } .callout.danger .ci svg { stroke: var(--danger); }

/* method tabs (install page) */
.tabs { margin: 22px 0; }
.tabbar { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabbar button {
  font-family: inherit; font-size: 14.5px; font-weight: 620;
  color: var(--muted); background: transparent; border: 0;
  padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 0.15s, border-color 0.15s;
}
.tabbar button:hover { color: var(--text); }
.tabbar button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabpanel { display: none; }
.tabpanel.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* numbered install steps */
.steplist { counter-reset: st; list-style: none; padding: 0; margin: 18px 0; }
.steplist > li {
  position: relative; padding: 0 0 22px 46px; margin: 0;
  border-left: 1px solid var(--border);
}
.steplist > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steplist > li::before {
  counter-increment: st; content: counter(st);
  position: absolute; left: -15px; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--border-2);
  color: var(--text); font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
}
.steplist > li h3 { margin: 2px 0 6px; font-size: 17px; }

/* spec table */
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--border); border-radius: 12px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.spec th, table.spec td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); }
table.spec th { color: var(--muted-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(255,255,255,0.015); }
table.spec tr:last-child td { border-bottom: 0; }
table.spec td { color: var(--muted); }
table.spec td strong { color: var(--text); }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 8px; }
  .toc { position: static; margin-bottom: 24px; }
}

/* ============================================================
   ILLUSTRATED GUIDE — walkthrough ("video") + UI re-creations.
   Every framed screen below is a faithful HTML/CSS re-creation
   of the real app (colours, layout, copy), NOT a screenshot.
   Two skins: .ui-panel (web control panel) and .ui-mgr (the
   desktop Manager) reproduce their real design tokens.
   ============================================================ */

.illus { margin: 10px auto 8px; }
.illus > h2 { font-size: clamp(22px, 3.2vw, 28px); margin: 0 0 12px; letter-spacing: -0.02em; }
.illus .illus-lead { color: var(--muted); font-size: 16px; max-width: 780px; margin: 0 0 18px; line-height: 1.65; }

/* the "not a real screenshot" disclaimer */
.render-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--cyan);
  background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.24);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.render-badge svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---- walkthrough shell ---- */
.walk {
  border: 1px solid var(--border-2); border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 30px 70px -34px rgba(0,0,0,0.7);
}
.walk-progress { height: 3px; background: rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.walk-progress > i {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: var(--grad); border-radius: 0 3px 3px 0;
}
.walk-progress > i.run { transition: width linear; }

.walk-stage {
  position: relative; height: 588px;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(129,140,248,0.12), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.014) 0 2px, transparent 2px 22px);
}
.walk-frame {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px 26px;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.985);
  transition: opacity 0.5s ease, transform 0.5s ease; pointer-events: none;
}
.walk-frame.active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }

/* caption — one .cap per frame, only the active one shows */
.walk-cap { border-top: 1px solid var(--border); background: var(--surface-2); min-height: 100px; }
.walk-cap .cap { display: none; gap: 15px; align-items: flex-start; padding: 18px 22px; }
.walk-cap .cap.active { display: flex; }
.walk-cap .num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #0b0e14;
  background: var(--grad); box-shadow: 0 6px 16px -6px rgba(34,211,238,0.6);
}
.walk-cap .capbody { min-width: 0; }
.walk-cap .kicker { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.walk-cap h3 { margin: 3px 0 5px; font-size: 17px; }
.walk-cap p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* controls */
.walk-ctrl { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.walk-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--surface-3); color: var(--text);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.walk-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.walk-btn:active { transform: scale(0.94); }
.walk-btn svg { width: 17px; height: 17px; fill: currentColor; }
.walk-play { width: 44px; height: 44px; background: var(--grad); border: 0; color: #0b0e14; }
.walk-play:hover { filter: brightness(1.06); background: var(--grad); }
.walk-play .i-pause { display: none; }
.walk.playing .walk-play .i-pause { display: block; }
.walk.playing .walk-play .i-play { display: none; }
.walk-dots { display: flex; gap: 9px; margin: 0 4px; flex-wrap: wrap; }
.walk-dot { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: var(--border-2); cursor: pointer; transition: width 0.25s, background 0.25s; }
.walk-dot:hover { background: var(--muted-2); }
.walk-dot.active { width: 26px; background: var(--accent); }
.walk-count { margin-left: auto; font: 600 13px/1 'JetBrains Mono', monospace; color: var(--muted-2); white-space: nowrap; }

/* ---- generic app-window chrome ---- */
.appwin {
  width: 100%; max-width: 960px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 24px 50px -22px rgba(0,0,0,0.75); background: #0b0e14;
  display: flex; flex-direction: column; height: 540px;
}
.appwin-bar { flex: 0 0 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.appwin.browser .appwin-bar { background: #10141d; }
.appwin.native .appwin-bar { background: #1a1c24; }
.wd { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.wd.r { background: #ff5f57; } .wd.y { background: #febc2e; } .wd.g { background: #28c840; }
.appwin-url {
  margin-left: 10px; font: 12px/1 'JetBrains Mono', monospace; color: var(--muted);
  background: rgba(255,255,255,0.05); padding: 6px 12px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 7px; max-width: 60%;
}
.appwin-url svg { width: 12px; height: 12px; stroke: var(--green); fill: none; stroke-width: 2; }
.appwin-name { font-size: 13px; font-weight: 600; color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; }
.appwin.native .appwin-bar .winbtns { margin-left: auto; display: flex; gap: 16px; color: #8b90a0; }
.appwin.native .winbtns b { font-weight: 400; font-size: 13px; line-height: 1; }
.appwin-body { flex: 1 1 auto; min-height: 0; overflow: hidden; position: relative; }
/* the mock screens are illustrative — taller ones clip cleanly inside the window
   and a bottom fade signals "the real screen continues", never overlapping the caption */
.appwin-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px;
  pointer-events: none; z-index: 5; }
.appwin-body.ui-panel::after { background: linear-gradient(rgba(11,14,20,0), var(--p-bg)); }
.appwin-body.ui-mgr::after { background: linear-gradient(rgba(17,18,23,0), var(--m-bg)); }

@media (max-width: 620px) {
  .appwin-url { font-size: 10px; max-width: 52%; }
}

/* ============================================================
   PANEL SKIN  (.ui-panel)  — web control panel design tokens
   bg #0b0e14 · card #171c27 · line #232a36 · accent #6366f1/#818cf8
   ============================================================ */
.ui-panel {
  --p-bg: #0b0e14; --p-card: #171c27; --p-card2: #1e2530; --p-line: #232a36;
  --p-fg: #e6e9ef; --p-muted: #9aa4b2; --p-dim: #5f6b7a;
  --p-acc: #6366f1; --p-acc-t: #818cf8; --p-green: #34d399; --p-cyan: #22d3ee; --p-amber: #fbbf24;
  height: 100%; background: var(--p-bg); color: var(--p-fg);
  font-family: 'Inter', system-ui, sans-serif; font-size: 13px; line-height: 1.45;
}

/* login */
.ui-panel .pl-wrap { height: 100%; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(700px 380px at 50% 8%, rgba(99,102,241,0.14), transparent 70%); }
.ui-panel .pl-card { width: 340px; max-width: 100%; background: var(--p-card); border: 1px solid var(--p-line);
  border-radius: 12px; padding: 30px 28px; text-align: center; box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6); }
.ui-panel .pl-logo { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 16px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--p-acc), #8b5cf6); box-shadow: 0 10px 24px -8px rgba(99,102,241,0.7); }
.ui-panel .pl-logo svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2; }
.ui-panel .pl-card h3 { margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.ui-panel .pl-card .sub { color: var(--p-muted); font-size: 13px; margin: 0 0 22px; }
.ui-panel .pl-field { text-align: left; margin-bottom: 14px; }
.ui-panel .pl-field label { display: block; font-size: 11.5px; color: var(--p-muted); margin-bottom: 6px; font-weight: 600; }
.ui-panel .pl-input { display: flex; align-items: center; gap: 9px; background: var(--p-bg); border: 1px solid var(--p-line);
  border-radius: 10px; padding: 10px 12px; color: var(--p-fg); }
.ui-panel .pl-input svg { width: 15px; height: 15px; stroke: var(--p-dim); fill: none; stroke-width: 2; flex: 0 0 auto; }
.ui-panel .pl-input .val { color: var(--p-fg); } .ui-panel .pl-input .ph { color: var(--p-dim); letter-spacing: 2px; }
.ui-panel .pl-input.focus { border-color: var(--p-acc); box-shadow: 0 0 0 3px rgba(99,102,241,0.18); }
.ui-panel .pl-btn { width: 100%; margin-top: 6px; padding: 11px; border-radius: 10px; border: 0; cursor: default;
  background: linear-gradient(140deg, var(--p-acc), #8b5cf6); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.ui-panel .pl-note { color: var(--p-dim); font-size: 11.5px; margin: 16px 0 0; }

/* app shell */
.ui-panel .pnl { display: grid; grid-template-columns: 208px 1fr; height: 100%; }
.ui-panel .pnl-side { background: #0d1017; border-right: 1px solid var(--p-line); padding: 14px 10px; overflow: hidden; }
.ui-panel .pnl-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 14px; }
.ui-panel .pnl-brand .mk { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(140deg, var(--p-acc), #8b5cf6);
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 14px; }
.ui-panel .pnl-brand b { font-size: 14.5px; font-weight: 800; }
.ui-panel .pnl-nav a { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; color: var(--p-muted);
  font-size: 12.5px; font-weight: 500; margin-bottom: 1px; }
.ui-panel .pnl-nav a .ic { width: 15px; height: 15px; color: var(--p-dim); display: grid; place-items: center; flex: 0 0 auto; }
.ui-panel .pnl-nav a .ic svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.ui-panel .pnl-nav a.on { background: rgba(99,102,241,0.14); color: #fff; }
.ui-panel .pnl-nav a.on .ic { color: var(--p-acc-t); }
.ui-panel .pnl-side .grp { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--p-dim); padding: 12px 9px 5px; }

/* simple-mode: full width, slim top bar, no sidebar */
.ui-panel .pnl-topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--p-line); background: #0d1017; }
.ui-panel .pnl-topbar .seg { margin-left: auto; display: inline-flex; background: var(--p-bg); border: 1px solid var(--p-line); border-radius: 9px; padding: 3px; gap: 3px; }
.ui-panel .pnl-topbar .seg span { padding: 5px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--p-muted); }
.ui-panel .pnl-topbar .seg span.on { background: rgba(99,102,241,0.18); color: #fff; }
.ui-panel .pnl-page { padding: 16px 18px; overflow: hidden; }
.ui-panel .pstrip { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 13px; }
.ui-panel .pnl-main { padding: 18px 20px; overflow: hidden; }
.ui-panel .pnl-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.ui-panel .pnl-top h2 { margin: 0 0 3px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.ui-panel .pnl-top p { margin: 0; color: var(--p-muted); font-size: 12.5px; }
.ui-panel .pnl-top .sp { margin-left: auto; }
.ui-panel .pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--p-line); color: var(--p-muted); background: var(--p-card); white-space: nowrap; }
.ui-panel .pill.acc { background: linear-gradient(140deg, var(--p-acc), #8b5cf6); color: #fff; border-color: transparent; }

.ui-panel .pnl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 14px; }
.ui-panel .pstat { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 12px; padding: 13px 14px; }
.ui-panel .pstat .k { font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--p-dim); font-weight: 700; }
.ui-panel .pstat .v { font-size: 24px; font-weight: 800; margin: 5px 0 2px; letter-spacing: -0.02em; }
.ui-panel .pstat .s { font-size: 11.5px; color: var(--p-muted); }
.ui-panel .v.cyan { color: var(--p-cyan); } .ui-panel .v.green { color: var(--p-green); }
.ui-panel .v.acc { color: var(--p-acc-t); } .ui-panel .v.amber { color: var(--p-amber); }

.ui-panel .pcard { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 12px; padding: 14px 15px; margin-bottom: 12px; }
.ui-panel .pcard > .h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 11px; }
.ui-panel .pcard > .h b { font-size: 13.5px; } .ui-panel .pcard > .h span { font-size: 11.5px; color: var(--p-dim); }
.ui-panel .prow { display: flex; align-items: center; gap: 10px; }
.ui-panel .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* chart mock */
.ui-panel .chart { height: 118px; border-radius: 10px; background: linear-gradient(180deg, rgba(34,211,238,0.10), transparent 78%);
  border: 1px solid var(--p-line); position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 3px; padding: 8px; }
.ui-panel .chart i { flex: 1; background: linear-gradient(180deg, var(--p-cyan), rgba(99,102,241,0.5)); border-radius: 3px 3px 0 0; opacity: 0.85; }

/* numbered code-ish list (proxy in/out) */
.ui-panel .lines { background: var(--p-bg); border: 1px solid var(--p-line); border-radius: 9px; padding: 9px 10px; height: 128px; overflow: hidden;
  font: 11.5px/1.7 'JetBrains Mono', monospace; color: var(--p-muted); }
.ui-panel .lines .ln { display: flex; gap: 10px; } .ui-panel .lines .no { color: var(--p-dim); width: 16px; text-align: right; flex: 0 0 auto; }
.ui-panel .flabel { font-size: 11px; color: var(--p-dim); margin-bottom: 6px; display: flex; justify-content: space-between; }

/* chips */
.ui-panel .chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--p-line); color: var(--p-muted); }
.ui-panel .chip.g { color: var(--p-green); border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.08); }
.ui-panel .chip.b { color: var(--p-acc-t); border-color: rgba(99,102,241,0.3); background: rgba(99,102,241,0.10); }
.ui-panel .chip.a { color: var(--p-amber); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.08); }
.ui-panel .toggle { width: 34px; height: 19px; border-radius: 999px; background: var(--p-line); position: relative; flex: 0 0 auto; }
.ui-panel .toggle.on { background: var(--p-acc); } .ui-panel .toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.ui-panel .toggle.on::after { left: 17px; }

/* ports table */
.ui-panel .ptbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.ui-panel .ptbl th { text-align: left; padding: 7px 9px; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--p-dim); font-weight: 700; border-bottom: 1px solid var(--p-line); }
.ui-panel .ptbl td { padding: 7px 9px; border-bottom: 1px solid rgba(35,42,54,0.6); color: var(--p-muted); }
.ui-panel .ptbl .port { font-family: 'JetBrains Mono', monospace; color: var(--p-fg); font-weight: 600; }
.ui-panel .ptbl .up { color: var(--p-fg); }
.ui-panel .filters { display: flex; gap: 8px; margin-bottom: 11px; flex-wrap: wrap; }
.ui-panel .sel { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--p-line); background: var(--p-bg); color: var(--p-muted); font-size: 11.5px; }
.ui-panel .sel svg { width: 11px; height: 11px; stroke: var(--p-dim); fill: none; stroke-width: 2; }
.ui-panel .search { flex: 1; min-width: 120px; }

/* activity + health rows */
.ui-panel .arow { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-top: 1px solid rgba(35,42,54,0.6); }
.ui-panel .arow:first-child { border-top: 0; }
.ui-panel .atag { flex: 0 0 auto; font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: rgba(99,102,241,0.12); color: var(--p-acc-t); text-transform: uppercase; letter-spacing: 0.04em; }
.ui-panel .arow .tx { color: var(--p-fg); font-size: 12px; } .ui-panel .arow .tm { color: var(--p-dim); font-size: 10.5px; margin-left: auto; white-space: nowrap; }
.ui-panel .hrow { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; border-top: 1px solid rgba(35,42,54,0.6); }
.ui-panel .hrow:first-child { border-top: 0; } .ui-panel .hrow .k { color: var(--p-muted); } .ui-panel .hrow .v { color: var(--p-fg); font-weight: 600; }
.ui-panel .split { height: 9px; border-radius: 999px; overflow: hidden; display: flex; background: var(--p-line); margin: 8px 0; }
.ui-panel .split i.d { background: var(--p-green); } .ui-panel .split i.u { background: var(--p-acc); }

/* ============================================================
   MANAGER SKIN  (.ui-mgr) — desktop Manager design tokens
   bg #111217 · panel #1a1c24 · panel-2 #21242f · line #2b2f3c
   accent #4f8cff · ok #35c46a · warn #f0a83a · Segoe UI
   ============================================================ */
.ui-mgr {
  --m-bg: #111217; --m-panel: #1a1c24; --m-panel2: #21242f; --m-line: #2b2f3c;
  --m-fg: #e7e9ee; --m-muted: #8b90a0; --m-acc: #4f8cff; --m-ok: #35c46a; --m-warn: #f0a83a; --m-off: #6b7180; --m-err: #ff5c6c;
  height: 100%; background: var(--m-bg); color: var(--m-fg);
  font-family: 'Segoe UI', system-ui, sans-serif; font-size: 13px; line-height: 1.45;
  padding: 13px 18px; overflow: hidden;
}
.ui-mgr .m-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.ui-mgr .m-logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--m-acc), #7d5cff);
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 19px; flex: 0 0 auto; }
.ui-mgr .m-head b { font-size: 15px; } .ui-mgr .m-head .ver { font-size: 11.5px; color: var(--m-muted); }
.ui-mgr .m-head .sp { margin-left: auto; }

.ui-mgr .m-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; background: var(--m-panel); border: 1px solid var(--m-line);
  border-radius: 11px; padding: 5px; margin-bottom: 11px; }
.ui-mgr .m-tab { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--m-muted); }
.ui-mgr .m-tab.on { background: var(--m-panel2); color: var(--m-fg); box-shadow: inset 0 0 0 1px var(--m-line); }
.ui-mgr .m-tab .fl { font-size: 15px; }

.ui-mgr .m-status { display: flex; align-items: center; gap: 11px; background: var(--m-panel); border: 1px solid var(--m-line);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 9px; }
.ui-mgr .m-status .dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(255,255,255,0.04); }
.ui-mgr .m-status.ok .dot { background: var(--m-ok); box-shadow: 0 0 0 4px rgba(53,196,106,0.16); }
.ui-mgr .m-status.warn .dot { background: var(--m-warn); box-shadow: 0 0 0 4px rgba(240,168,58,0.16); }
.ui-mgr .m-status.off .dot { background: var(--m-off); }
.ui-mgr .m-status b { font-size: 14px; } .ui-mgr .m-status .sub { font-size: 11.5px; color: var(--m-muted); }
.ui-mgr .m-status .ic { margin-left: auto; color: var(--m-muted); font-size: 15px; }

.ui-mgr .m-card { background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 9px; }
.ui-mgr .m-card > .r { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.ui-mgr .m-card > .r b { font-size: 13.5px; } .ui-mgr .m-card > .r span { font-size: 11.5px; color: var(--m-muted); }
.ui-mgr .m-check { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.ui-mgr .m-box { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--m-line); flex: 0 0 auto; margin-top: 1px; position: relative; }
.ui-mgr .m-box.on { background: var(--m-acc); border-color: var(--m-acc); }
.ui-mgr .m-box.on::after { content: ''; position: absolute; left: 5px; top: 1px; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ui-mgr .m-check b { font-size: 12.5px; } .ui-mgr .m-check .sub { font-size: 11px; color: var(--m-muted); display: block; margin-top: 2px; }
.ui-mgr code { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; color: var(--m-fg); }

.ui-mgr .m-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 9px; }
.ui-mgr .m-btn { padding: 9px; border-radius: 9px; text-align: center; font-size: 12.5px; font-weight: 600; border: 1px solid var(--m-line); background: var(--m-panel2); color: var(--m-fg); }
.ui-mgr .m-btn.primary { background: var(--m-acc); border-color: var(--m-acc); color: #fff; }
.ui-mgr .m-btn.off { color: var(--m-off); }
.ui-mgr .m-wide { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 9px; border: 1px solid var(--m-line);
  background: var(--m-panel2); color: var(--m-fg); font-size: 12.5px; font-weight: 600; margin-bottom: 9px; }
.ui-mgr .m-lan { display: flex; gap: 10px; align-items: center; background: var(--m-panel2); border: 1px solid var(--m-line); border-radius: 10px; padding: 11px 13px; margin-bottom: 12px; }
.ui-mgr .m-lan .sw { width: 36px; height: 20px; border-radius: 999px; background: var(--m-line); position: relative; flex: 0 0 auto; }
.ui-mgr .m-lan .sw.on { background: var(--m-acc); } .ui-mgr .m-lan .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.ui-mgr .m-lan .sw.on::after { left: 18px; }
.ui-mgr .m-field { margin-bottom: 10px; } .ui-mgr .m-field label { display: block; font-size: 11px; color: var(--m-muted); margin-bottom: 5px; }
.ui-mgr .m-inp { background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 8px; padding: 9px 11px; color: var(--m-fg); font-size: 12.5px; }
.ui-mgr .m-inp.dim { color: var(--m-off); }
.ui-mgr .m-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ui-mgr .m-pw { display: flex; align-items: center; justify-content: space-between; background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 8px; padding: 9px 11px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
.ui-mgr .m-pw .lnk { color: var(--m-acc); font-family: 'Segoe UI', sans-serif; }
.ui-mgr .m-conn { display: flex; align-items: center; gap: 10px; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 11px; padding: 9px 13px; margin-bottom: 9px; }
.ui-mgr .m-conn .who { font-size: 13px; font-weight: 600; } .ui-mgr .m-conn .fp { font-size: 10px; color: var(--m-muted); font-family: 'JetBrains Mono', monospace; }
.ui-mgr .m-conn .lnk { margin-left: auto; color: var(--m-acc); font-size: 12px; }

/* ---- responsive: shrink the recreated UIs on small screens ---- */
@media (max-width: 760px) {
  .walk-stage { height: 536px; padding: 18px 14px; }
  .walk-frame { padding: 18px 14px; }
  .appwin { height: 500px; }
  .ui-panel { font-size: 12px; }
  .ui-panel .pnl { grid-template-columns: 60px 1fr; }
  .ui-panel .pnl-brand b, .ui-panel .pnl-nav a span, .ui-panel .pnl-side .grp { display: none; }
  .ui-panel .pnl-nav a { justify-content: center; padding: 8px 0; }
  .ui-panel .pnl-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .walk-stage { height: 468px; }
  .walk-frame { padding: 14px 12px; }
  .appwin { height: 440px; }
  .ui-panel .grid2, .ui-mgr .m-grid2 { grid-template-columns: 1fr; }
  .ui-panel .pstat .v { font-size: 20px; }
  .walk-count { display: none; }
}
