:root {
  color-scheme: light;
  --page-bg: linear-gradient(180deg, #f1f3f7 0%, #e8ebf1 100%);
  --bg-glow-1: rgba(122, 165, 255, 0.10);
  --bg-glow-2: rgba(255, 255, 255, 0);

  --text-strong: #0c1220;
  --text-body: #3a4258;
  --text-muted: #7d869b;

  --surface: #ffffff;
  --surface-grad: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  --surface-soft: #f6f7fa;
  --surface-border: rgba(15, 23, 42, 0.07);
  --surface-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.05);
  --surface-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04);

  --accent: #2f6bff;
  --accent-soft: rgba(47, 107, 255, 0.10);
  --accent-dot: #3b76ff;

  --line: rgba(15, 23, 42, 0.08);

  --button-fill: rgba(15, 23, 42, 0.04);
  --button-fill-hover: rgba(15, 23, 42, 0.07);
  --button-fill-active: #ffffff;
  --button-border: rgba(15, 23, 42, 0.10);
  --button-fg: var(--text-body);

  --pill-bg: rgba(15, 23, 42, 0.04);
  --pill-fg: var(--text-body);
  --pill-border: rgba(15, 23, 42, 0.08);

  --primary-fill: #0d111c;
  --primary-fg: #ffffff;

  --theme-switch-bg: rgba(255, 255, 255, 0.92);
  --theme-switch-border: rgba(15, 23, 42, 0.08);
  --theme-switch-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.08);
  --theme-switch-active-bg: #0d111c;
  --theme-switch-active-fg: #ffffff;
}

[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: linear-gradient(180deg, #070a12 0%, #0a0d18 100%);
  --bg-glow-1: rgba(70, 110, 230, 0.16);
  --bg-glow-2: rgba(120, 80, 220, 0.06);

  --text-strong: rgba(245, 248, 255, 0.96);
  --text-body: rgba(220, 226, 240, 0.78);
  --text-muted: rgba(170, 182, 205, 0.58);

  --surface: #10131e;
  --surface-grad: linear-gradient(180deg, #11151f 0%, #161a2a 100%);
  --surface-soft: #0e111a;
  --surface-border: rgba(255, 255, 255, 0.06);
  --surface-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.36);
  --surface-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);

  --accent: #6c97ff;
  --accent-soft: rgba(108, 151, 255, 0.16);
  --accent-dot: #6c97ff;

  --line: rgba(255, 255, 255, 0.07);

  --button-fill: rgba(255, 255, 255, 0.04);
  --button-fill-hover: rgba(255, 255, 255, 0.07);
  --button-fill-active: rgba(255, 255, 255, 0.06);
  --button-border: rgba(255, 255, 255, 0.08);
  --button-fg: var(--text-body);

  --pill-bg: rgba(255, 255, 255, 0.04);
  --pill-fg: var(--text-body);
  --pill-border: rgba(255, 255, 255, 0.08);

  --primary-fill: #ffffff;
  --primary-fg: #0d111c;

  --theme-switch-bg: rgba(20, 24, 36, 0.86);
  --theme-switch-border: rgba(255, 255, 255, 0.08);
  --theme-switch-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px rgba(0, 0, 0, 0.5);
  --theme-switch-active-bg: #ffffff;
  --theme-switch-active-fg: #0d111c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--page-bg);
  color: var(--text-strong);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(80vw 60vh at 12% 0%, var(--bg-glow-1), transparent 60%),
    radial-gradient(60vw 50vh at 100% 100%, var(--bg-glow-2), transparent 60%),
    var(--page-bg);
}

.bg-orb,
.bg-noise {
  display: none;
}

.glass-panel {
  position: relative;
  background: var(--surface-grad);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  box-shadow: var(--surface-shadow);
  overflow: hidden;
}

.eyebrow,
.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-left: 14px;
  position: relative;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before,
.panel-tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-dot);
  transform: translateY(-50%);
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, filter 0.7s ease;
}

.boot.hide {
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
}

.boot-shell {
  width: min(420px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
  background: var(--boot-shell-bg, rgba(255, 255, 255, 0.72));
  border: 1px solid var(--boot-shell-border, rgba(15, 23, 42, 0.08));
  box-shadow: var(--boot-shell-shadow, 0 24px 60px rgba(51, 65, 85, 0.12));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.progress {
  width: 120px;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--boot-progress-bg, rgba(15, 23, 42, 0.1));
  box-shadow: inset 0 0 0 1px var(--boot-progress-edge, rgba(15, 23, 42, 0.04));
}

.bar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: var(--boot-bar-bg, linear-gradient(90deg, #121722 0%, #5b667c 55%, #171d28 100%));
  transform-origin: left center;
  transform: translateZ(0) scaleX(0);
}

.bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--boot-bar-shine, linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.34) 45%, transparent 100%));
  transform: translateX(-130%);
  animation: barSweep 1.8s linear infinite;
}

.boot-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  height: 176px;
  padding: 10px 14px;
  border-radius: 20px;
  background: var(--boot-list-bg, rgba(255, 255, 255, 0.9));
  border: 1px solid var(--boot-list-border, rgba(15, 23, 42, 0.08));
  overflow: hidden;
}

.boot-item {
  display: flex;
  flex: none;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  max-height: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.45;
  font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--boot-text, rgba(17, 24, 39, 0.88));
  opacity: 0;
  overflow: hidden;
  filter: blur(8px);
  transform: translateY(-8px) scale(0.985);
  transform-origin: top center;
  transition:
    max-height 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.34s ease,
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.52s ease;
}

.boot-item.show {
  max-height: 40px;
  padding: 8px 0;
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.boot-item + .boot-item {
  border-top: 1px solid var(--boot-line, var(--line));
}

.boot-item-label {
  display: block;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boot-item-status {
  flex: none;
  min-width: 52px;
  text-align: right;
  color: var(--boot-text-muted, var(--text-muted));
  font-size: 11px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.boot-item.is-active .boot-item-label {
  color: var(--boot-text-active, var(--text-strong));
}

.boot-item.is-done .boot-item-status {
  color: var(--boot-text-done, var(--text-body));
}

.boot-item.is-failed .boot-item-status {
  color: #ef6868;
  font-weight: 800;
}

.boot-item.is-done:not(.is-failed) .boot-item-status,
.boot-item.is-cached .boot-item-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 52px;
  height: 18px;
  font-size: 0;
}

.boot-cache-mark,
.boot-cache-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.boot-cache-icon {
  fill: none;
  color: currentColor;
  overflow: visible;
}

.boot-cache-ring,
.boot-cache-check {
  vector-effect: non-scaling-stroke;
  stroke: currentColor;
}

.boot-cache-ring { stroke-width: 1.35; opacity: 0.72; }
.boot-cache-check { stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@keyframes barSweep {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

.boot-plain-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 22px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--page-bg);
  color: var(--text-body);
  font: 13px/1.48 Consolas, "SFMono-Regular", "Liberation Mono", Menlo, monospace;
  letter-spacing: 0.02em;
  opacity: var(--boot-plain-opacity, 1);
  filter: blur(var(--boot-plain-blur, 0));
  transition: opacity 0.18s linear, filter 0.18s linear;
  pointer-events: none;
}

.boot-plain-layer.is-hidden {
  opacity: 0;
  filter: blur(8px);
}

.app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 22px;
  row-gap: 14px;
  width: min(1460px, calc(100vw - 40px));
  height: min(940px, calc(100vh - 40px));
  margin: 20px auto;
  opacity: var(--boot-app-opacity, 1);
  filter: blur(var(--boot-app-blur, 0));
  transition: filter 0.18s linear, opacity 0.18s linear;
}

.app-topbar {
  grid-column: 1 / -1;
  position: relative;
  z-index: 60;
}

.app.boot-app-hidden,
.theme-switch.boot-app-hidden {
  opacity: 0;
  filter: blur(14px);
  pointer-events: none;
}

.app.style-loading,
.theme-switch.style-loading {
  opacity: var(--boot-app-opacity, 1);
  filter: blur(var(--boot-app-blur, 0));
}

.app.interface-pending .btn,
.theme-switch.interface-pending .seg {
  pointer-events: none;
  opacity: 0.66;
}

.app.switching .content {
  opacity: 0.42;
  transform: translateY(8px);
  filter: blur(8px);
}

.sidebar {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
}

.brand-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: none;
}

.brand-mark-wrap {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--primary-fill);
  box-shadow: var(--surface-shadow-soft);
}

[data-theme="dark"] .brand-mark {
  background: transparent;
  box-shadow: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-copy .eyebrow {
  margin-bottom: 0;
}

.brand-copy h1 {
  font-size: clamp(44px, 5.4vw, 64px);
  line-height: 0.92;
  letter-spacing: 0.16em;
  font-weight: 900;
  color: var(--text-strong);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "cv01";
  text-transform: uppercase;
}

.brand-copy p {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.brand-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-pill,
.mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--pill-fg);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.device-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-border);
  min-width: 0;
  overflow: hidden;
}

.device-card .eyebrow {
  margin-bottom: 0;
  letter-spacing: 0.16em;
}

.device-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.device-row[hidden] { display: none; }

.device-row span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}

.device-row strong,
.device-copy-value {
  min-width: 0;
  text-align: right;
  color: var(--text-strong);
  font-size: 12px;
  line-height: 1.32;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.device-copy-value {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.device-copy-value:hover,
.device-copy-value:focus-visible {
  color: var(--accent);
  outline: none;
}

.device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.device-action {
  flex: 1 1 0;
  min-width: 64px;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--button-fill);
  color: var(--button-fg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.device-action:hover {
  background: var(--button-fill-hover);
  color: var(--text-strong);
}

.device-action[hidden] { display: none; }

.device-action.primary {
  background: var(--primary-fill);
  color: var(--primary-fg);
  border-color: var(--primary-fill);
}

.device-action.primary:hover {
  background: var(--primary-fill);
  color: var(--primary-fg);
  filter: brightness(1.05);
}

.device-status {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.item { position: relative; }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.topbar-spacer { flex: 1; }

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow-soft);
  color: var(--text-body);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.topbar-btn:hover {
  background: var(--button-fill-hover);
  color: var(--text-strong);
}

.topbar-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.topbar-btn:hover svg { color: var(--text-strong); }

.topbar-btn[data-active="true"] {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
  color: var(--primary-fg);
}

.topbar-btn[data-active="true"] svg { color: var(--primary-fg); }

.topbar-kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--button-fill);
  border: 1px solid var(--button-border);
  color: var(--text-muted);
  font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cmdk-overlay,
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  justify-content: center;
  padding: 80px 20px 20px;
  background: rgba(8, 12, 22, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.login-overlay { align-items: center; padding-top: 20px; }

.cmdk-overlay[hidden],
.login-overlay[hidden] { display: none; }

.cmdk-shell {
  width: min(640px, 100%);
  height: fit-content;
  max-height: calc(100dvh - 120px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
}

.cmdk-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.cmdk-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.cmdk-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 14px;
}

.cmdk-input::placeholder { color: var(--text-muted); }
.cmdk-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.cmdk-clear {
  flex: none;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--button-fill);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.cmdk-clear:hover { background: var(--button-fill-hover); color: var(--text-strong); }
.cmdk-clear[hidden] { display: none; }

.cmdk-esc {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--button-fill);
  border: 1px solid var(--button-border);
  color: var(--text-muted);
  font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 10.5px;
  font-weight: 600;
}

.cmdk-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  scrollbar-width: none;
}

.cmdk-results::-webkit-scrollbar { display: none; }

.cmdk-results:empty { display: none; }

.search-result-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-body);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.search-result-item + .search-result-item { margin-top: 2px; }

.search-result-item:hover,
.search-result-item.is-active {
  background: var(--button-fill);
}

.search-result-item.is-active { color: var(--text-strong); }

.search-result-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
}

.search-result-slug {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--button-fill);
  border: 1px solid var(--button-border);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-result-snippet {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-item mark {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 1px;
  border-radius: 3px;
}

.search-empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.login-shell {
  width: min(420px, 100%);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow);
}

.login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.login-head h2 {
  margin: 3px 0 0;
  color: var(--text-strong);
  font-size: 18px;
  letter-spacing: -0.01em;
}

.login-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--button-border);
  border-radius: 50%;
  background: var(--button-fill);
  color: var(--text-body);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.login-close:hover { background: var(--button-fill-hover); color: var(--text-strong); }

.login-hint {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.login-input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--surface-soft);
  color: var(--text-strong);
  font: inherit;
  font-size: 13.5px;
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-status {
  font-size: 12.5px;
  color: #ef6868;
  min-height: 1em;
}

.login-status[hidden] { display: none; }

.login-status.is-ok { color: var(--accent); }

.login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.login-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  background: var(--button-fill);
  color: var(--button-fg);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.login-btn.ghost:hover { background: var(--button-fill-hover); color: var(--text-strong); }

.login-btn.primary {
  background: var(--primary-fill);
  color: var(--primary-fg);
  border-color: var(--primary-fill);
}

.login-btn.primary:hover { filter: brightness(1.05); }

.login-btn[disabled] { opacity: 0.6; cursor: progress; }

.info-overlay {
  position: fixed;
  inset: 0;
  z-index: 9400;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(8, 12, 22, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.info-overlay[hidden] { display: none; }

.info-shell {
  width: min(560px, 100%);
  max-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
}

.info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.info-head h2 {
  margin: 3px 0 0;
  color: var(--text-strong);
  font-size: 18px;
  letter-spacing: -0.01em;
}

.info-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--button-border);
  border-radius: 50%;
  background: var(--button-fill);
  color: var(--text-body);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.info-close:hover { background: var(--button-fill-hover); color: var(--text-strong); }

.info-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-height: 0;
}

.info-body::-webkit-scrollbar { display: none; }

.info-entry header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.info-entry h3 {
  font-size: 15px;
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.info-tag {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--button-fill);
  border: 1px solid var(--button-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.info-entry p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-body);
}

.info-entry ul {
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-body);
}

.info-entry ul li + li { margin-top: 2px; }

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, var(--line) 8%, var(--line) 92%, transparent 100%);
}

.timeline-item {
  position: relative;
  display: flex;
  width: 100%;
  padding: 10px 0;
  justify-content: flex-start;
}

.timeline-item.is-left { justify-content: flex-start; padding-right: calc(50% + 22px); }
.timeline-item.is-right { justify-content: flex-end; padding-left: calc(50% + 22px); }

.timeline-item::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-card {
  position: relative;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow-soft);
  margin: 0;
}

.timeline-item.is-left .timeline-card,
.timeline-item.is-right .timeline-card { margin: 0; }

.timeline-card::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -6px;
  width: 10px;
  height: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-border);
  transform: rotate(45deg);
  border-right: 0;
  border-top: 0;
}

.timeline-item.is-left .timeline-card::before {
  left: auto;
  right: -6px;
  border-left: 0;
  border-bottom: 0;
  border-right: 1px solid var(--surface-border);
  border-top: 1px solid var(--surface-border);
}

.timeline-item.is-right .timeline-card::before {
  left: -6px;
  right: auto;
  border-right: 0;
  border-top: 0;
  border-left: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.timeline-card h3 {
  margin-bottom: 4px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.timeline-card p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-body);
}

.timeline-card ul {
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-body);
}

.timeline-card ul li + li { margin-top: 2px; }

.timeline-card time {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--button-fill);
  border: 1px solid var(--button-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .timeline::before { left: 12px; }
  .timeline-item,
  .timeline-item.is-left,
  .timeline-item.is-right {
    justify-content: flex-start;
    padding-left: 28px;
    padding-right: 0;
  }
  .timeline-item::before { left: 12px; }
  .timeline-item .timeline-card { margin: 0; width: 100%; }
  .timeline-item .timeline-card::before {
    left: -6px;
    right: auto;
    border-right: 0;
    border-top: 0;
    border-left: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
  }
}

.btn {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: var(--button-fill);
  color: var(--text-strong);
}

.btn.is-active {
  background: var(--surface);
  border-color: var(--surface-border);
  color: var(--text-strong);
  box-shadow: var(--surface-shadow-soft);
  position: relative;
}

.btn.is-active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.btn-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--button-fill);
  border: 1px solid var(--button-border);
  color: var(--text-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.btn.is-active .btn-index {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
  color: var(--primary-fg);
}

.btn-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.btn-copy strong {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.btn-copy small {
  font-size: 12px;
  color: var(--text-muted);
}

.content {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface-grad);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow);
  transition: opacity 0.32s ease, filter 0.32s ease, transform 0.32s ease;
}

.page {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 22px;
  scrollbar-width: none;
}

.page::-webkit-scrollbar { display: none; }

.page-enter {
  opacity: 0;
  transform: translate3d(24px, 0, 0);
  filter: blur(8px);
}

.page-enter-active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
  transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, filter 0.3s ease;
}

.page-exit {
  opacity: 0;
  transform: translate3d(-14px, 0, 0);
  filter: blur(6px);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, filter 0.2s ease;
}

.docs-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.docs-empty {
  align-items: center;
  justify-content: center;
  min-height: clamp(320px, 60vh, 560px);
}

.docs-empty-art {
  width: clamp(240px, 40vw, 360px);
  height: auto;
  display: block;
}

.docs-empty-tag {
  margin: 0;
}

.entry-list {
  gap: 12px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 22px 24px;
  text-align: left;
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.entry-card:hover,
.entry-card:focus-visible {
  background: var(--surface);
  border-color: var(--accent, var(--text-strong));
  box-shadow: var(--surface-shadow);
  outline: none;
  transform: translateY(-1px);
}

.entry-card .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted, var(--text-body));
}

.entry-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.entry-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-body);
}

.entry-detail {
  gap: 18px;
}

.entry-back {
  align-self: flex-start;
  appearance: none;
  padding: 6px 14px;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  background: var(--button-fill);
  color: var(--text-body);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.entry-back:hover,
.entry-back:focus-visible {
  background: var(--button-fill-hover);
  color: var(--text-strong);
  outline: none;
}

.entry-detail-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.entry-detail-head .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted, var(--text-body));
}

.entry-detail-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.entry-detail-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

.entry-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
}

.workspace-header,
.metric-card,
.quick-card,
.section-panel,
.manual-nav,
.article-sheet,
.platform-card,
.schema-panel {
  padding: 26px;
}

.docs-page > .glass-panel,
.docs-band > .glass-panel {
  background: transparent;
  border: 1px solid var(--surface-border);
  box-shadow: none;
}

.workspace-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.workspace-copy h2 {
  max-width: 18ch;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.workspace-copy p {
  margin-top: 14px;
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
}

.workspace-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.stats-grid,
.quick-grid,
.platform-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.quick-grid {
  grid-template-columns: 1fr;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.metric-card p,
.quick-card p,
.revision-row p,
.chapter-item p,
.article-head p,
.step-row p,
.article-note p,
.platform-card p,
.schema-row p,
.workspace-copy p,
.section-head p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
}

.docs-band {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  align-items: start;
}

.section-head h3,
.manual-nav h3,
.article-head h3,
.platform-card h3,
.schema-panel h3 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.section-head p {
  max-width: none;
  text-align: left;
}

.quick-card h4 {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.revision-list,
.catalog-list,
.chapter-list,
.step-list,
.schema-table {
  display: flex;
  flex-direction: column;
}

.revision-row,
.catalog-row,
.chapter-item,
.schema-row {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.revision-row:first-child,
.catalog-row:first-child,
.chapter-item:first-child,
.schema-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.revision-row strong,
.catalog-row strong,
.chapter-item strong,
.step-row strong,
.schema-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.24;
  color: var(--text-strong);
}

.revision-row span,
.catalog-row span,
.schema-row span {
  display: inline-flex;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manual-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.chapter-item.is-active {
  position: relative;
}

.chapter-item.is-active::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.article-sheet {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.article-block {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.step-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.step-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: var(--button-fill);
  border: 1px solid var(--button-border);
  color: var(--text-body);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.article-note {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-border);
}

.platform-card h3 { min-height: 2.3em; }

.schema-head {
  display: grid;
  grid-template-columns: 180px 180px 1fr;
  gap: 16px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.schema-head span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.schema-row {
  display: grid;
  grid-template-columns: 180px 180px 1fr;
  gap: 16px;
  align-items: start;
}

.theme-switch {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--theme-switch-bg);
  border: 1px solid var(--theme-switch-border);
  box-shadow: var(--theme-switch-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.seg:hover { color: var(--text-strong); }

.seg.active {
  background: var(--theme-switch-active-bg);
  color: var(--theme-switch-active-fg);
}

.network-details {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 12, 22, 0.36);
  contain: layout paint;
}

.network-details[hidden] { display: none; }

.network-details-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(580px, calc(100dvh - 36px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
}

.network-details-dialog::before { display: none; }

.network-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.network-details-head h2 {
  margin: 3px 0 0;
  color: var(--text-strong);
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.network-details-close {
  appearance: none;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--button-border);
  border-radius: 50%;
  background: var(--button-fill);
  color: var(--text-body);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.network-details-close:hover,
.network-details-close:focus-visible {
  background: var(--button-fill-hover);
  color: var(--text-strong);
  outline: none;
}

.network-details-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.network-details-body::-webkit-scrollbar { display: none; }

.network-details-body > * {
  width: 100%;
  max-width: 460px;
}

.network-detail-group,
.network-detail-row {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.network-detail-group { gap: 8px; }

.network-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.network-detail-row {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.network-detail-label,
.network-detail-row span {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.network-detail-row strong {
  min-width: 0;
  color: var(--text-strong);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.network-topology {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.network-topology-node {
  position: relative;
  flex: 1 1 0;
  max-width: 140px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
  gap: 7px;
  min-width: 0;
}

.network-topology-node:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: calc(50% + 27px);
  right: calc(-50% + 27px);
  top: 21px;
  height: 1px;
  border-radius: 999px;
  background: var(--line);
  pointer-events: none;
}

.network-topology-icon {
  position: relative;
  z-index: 2;
  display: block;
  width: 42px;
  height: 42px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--surface-shadow-soft);
}

.network-topology-icon::before,
.network-topology-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.network-topology-node.is-device .network-topology-icon::before {
  left: 10px; top: 10px; width: 22px; height: 15px;
  border: 2px solid var(--text-strong); border-radius: 4px;
}
.network-topology-node.is-device .network-topology-icon::after {
  left: 14px; top: 28px; width: 14px; height: 2px;
  border-radius: 999px; background: var(--text-muted);
}

.network-topology-node.is-router .network-topology-icon::before {
  left: 9px; top: 13px; width: 24px; height: 16px;
  border: 2px solid var(--text-strong); border-radius: 7px;
}
.network-topology-node.is-router .network-topology-icon::after {
  left: 12px; top: 20px; width: 3px; height: 3px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 7px 0 0 var(--accent), 14px 0 0 var(--accent);
}

.network-topology-node.is-switch .network-topology-icon::before {
  left: 8px; top: 15px; width: 26px; height: 13px;
  border: 2px solid var(--text-strong); border-radius: 5px;
}
.network-topology-node.is-switch .network-topology-icon::after {
  left: 10.8px; top: 20px; width: 3px; height: 3px;
  border-radius: 1px; background: var(--accent);
  box-shadow: 5.8px 0 0 var(--accent), 11.6px 0 0 var(--accent), 17.4px 0 0 var(--accent);
}

.network-topology-node.is-wan .network-topology-icon::before {
  left: 10px; top: 10px; width: 22px; height: 22px;
  border: 2px solid var(--accent); border-radius: 50%;
}
.network-topology-node.is-wan .network-topology-icon::after {
  left: 6px; top: 20px; width: 30px; height: 2px;
  border-radius: 999px; background: var(--accent);
  transform: rotate(45deg); transform-origin: center;
}

.network-topology-node.is-internet .network-topology-icon::before {
  left: 10px; top: 10px; width: 22px; height: 22px;
  border: 2px solid var(--text-strong); border-radius: 50%;
}
.network-topology-node.is-internet .network-topology-icon::after {
  left: 16px; top: 10px; width: 10px; height: 22px;
  border-left: 1px solid var(--text-muted);
  border-right: 1px solid var(--text-muted);
  border-radius: 50%;
}

.network-topology-node.is-pending .network-topology-icon { opacity: 0.5; }
.network-topology-node.is-pending .network-topology-card { color: var(--text-muted); }

.network-topology-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.network-topology-title {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.network-topology-value {
  min-width: 0;
  color: var(--text-strong);
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.network-topology-meta {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.mobile-panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition:
    grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-panel.open {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.mobile-panel-body {
  min-height: 0;
  overflow: hidden;
}

.mobile-panel .docs-page {
  padding: 14px 0 4px;
  gap: 14px;
}

.mobile-panel .workspace-header,
.mobile-panel .metric-card,
.mobile-panel .quick-card,
.mobile-panel .section-panel,
.mobile-panel .manual-nav,
.mobile-panel .article-sheet,
.mobile-panel .platform-card,
.mobile-panel .schema-panel {
  padding: 20px;
}

@media (max-width: 1240px) {
  .app {
    width: calc(100vw - 28px);
    height: calc(100vh - 28px);
    margin: 14px auto;
  }

  .workspace-header,
  .stats-grid,
  .quick-grid,
  .platform-grid,
  .split-grid,
  .manual-shell,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .workspace-flags { justify-content: flex-start; }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .section-head p {
    max-width: none;
    text-align: left;
  }

  .schema-head,
  .schema-row {
    grid-template-columns: 150px 150px 1fr;
  }
}

@media (max-width: 980px) {
  html, body {
    overflow: auto;
    min-height: 100dvh;
  }

  .app {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    margin: 0;
    padding: 14px 14px calc(112px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 14px;
  }

  .sidebar { width: 100%; }

  .brand-panel { min-height: auto; }

  .content { display: none; }

  .workspace-header { grid-template-columns: 1fr; }

  .workspace-copy h2 {
    max-width: 100%;
    font-size: clamp(28px, 9vw, 38px);
  }

  .workspace-copy p { max-width: 100%; }

  .manual-shell,
  .article-grid,
  .split-grid,
  .stats-grid,
  .quick-grid,
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .schema-head { display: none; }

  .schema-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .theme-switch {
    left: 50%;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: min(286px, calc(100vw - 32px));
    transform: translateX(-50%);
    justify-content: center;
  }

  .seg {
    flex: 1;
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

.entry-list[data-entry-layout="tiles"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  align-content: start;
}

.template-tile {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-body);
  text-decoration: none;
  transition: background 0.18s ease;
}

.template-tile:hover,
.template-tile:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.template-tile-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-tile-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.template-tile-icon .template-tile-icon-dark {
  display: none;
}

[data-theme="dark"] .template-tile.has-dark-icon .template-tile-icon-light {
  display: none;
}

[data-theme="dark"] .template-tile.has-dark-icon .template-tile-icon-dark {
  display: block;
}

.template-tile-icon-fallback {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-border);
  display: block;
}

.template-tile-title {
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-strong);
  text-align: center;
  word-break: break-all;
  max-width: 100%;
}

.entry-list[data-entry-layout="groups"] {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-content: start;
}

.nav-group-head {
  margin: 0 0 12px;
}

.nav-group-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-strong);
}

.nav-group-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-soft, var(--text-body));
}

.nav-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  align-content: start;
}

@media (max-width: 480px) {
  .entry-list[data-entry-layout="tiles"] {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .nav-group-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .template-tile {
    padding: 12px 6px;
    gap: 8px;
  }
  .template-tile-icon {
    width: 56px;
    height: 56px;
  }
  .template-tile-title {
    font-size: 12px;
  }
}
