:root {
  color-scheme: light;
  --bg: #f3f2ee;
  --bloom-1: rgba(37, 87, 214, 0.05);
  --bloom-2: rgba(214, 120, 84, 0.04);
  --layer: rgba(255, 255, 255, 0.7);
  --layer-solid: #fbfbf9;
  --layer-alt: rgba(255, 255, 255, 0.45);
  --layer-hover: rgba(255, 255, 255, 0.92);
  --subtle-hover: rgba(0, 0, 0, 0.04);
  --subtle-press: rgba(0, 0, 0, 0.025);
  --stroke: rgba(0, 0, 0, 0.075);
  --stroke-strong: rgba(0, 0, 0, 0.15);
  --divider: rgba(0, 0, 0, 0.065);
  --ctl: rgba(255, 255, 255, 0.82);
  --ctl-hover: rgba(250, 250, 248, 0.95);
  --ctl-press: rgba(245, 245, 243, 0.9);
  --ctl-stroke: rgba(0, 0, 0, 0.07);
  --ctl-edge: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  --input-bottom: rgba(0, 0, 0, 0.42);
  --text: #1c1b19;
  --text-2: #5d5b56;
  --text-3: #8d8b85;
  --accent: #2557d6;
  --accent-hover: #2f62e2;
  --accent-press: #3d6ee8;
  --accent-text: #1e4ec2;
  --accent-soft: rgba(37, 87, 214, 0.1);
  --accent-ring: rgba(37, 87, 214, 0.35);
  --on-accent: #ffffff;
  --success: #0f7b0f;
  --success-bg: rgba(15, 123, 15, 0.09);
  --caution: #9d5d00;
  --caution-bg: rgba(157, 93, 0, 0.09);
  --critical: #c42b1c;
  --critical-bg: rgba(196, 43, 28, 0.08);
  --code-bg: rgba(0, 0, 0, 0.045);
  --acrylic: rgba(250, 249, 246, 0.8);
  --shadow-card: none;
  --shadow-raise: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-flyout: 0 8px 16px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.1);
  --shadow-window: 0 32px 64px rgba(30, 28, 24, 0.16), 0 2px 21px rgba(30, 28, 24, 0.1);
  --focus-outer: #1c1b19;
  --focus-inner: #ffffff;
  --scroll-thumb: rgba(0, 0, 0, 0.28);

  --font-ui: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-mono: "Cascadia Code", "Cascadia Mono", "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --r-ctl: 4px;
  --r-card: 8px;
  --r-window: 12px;
  --ease: cubic-bezier(0, 0, 0, 1);
  --ease-decel: cubic-bezier(0.1, 0.9, 0.2, 1);
  --t-fast: 83ms;
  --t-mid: 167ms;
  --t-slow: 333ms;

  --nav-h: 56px;
  --side-w: 288px;
  --side-w-compact: 68px;
  --gutter: 24px;
  --max: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1a19;
  --bloom-1: rgba(91, 140, 255, 0.07);
  --bloom-2: rgba(217, 119, 87, 0.03);
  --layer: rgba(255, 255, 255, 0.042);
  --layer-solid: #262523;
  --layer-alt: rgba(255, 255, 255, 0.022);
  --layer-hover: rgba(255, 255, 255, 0.068);
  --subtle-hover: rgba(255, 255, 255, 0.06);
  --subtle-press: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.072);
  --stroke-strong: rgba(255, 255, 255, 0.15);
  --divider: rgba(255, 255, 255, 0.07);
  --ctl: rgba(255, 255, 255, 0.06);
  --ctl-hover: rgba(255, 255, 255, 0.085);
  --ctl-press: rgba(255, 255, 255, 0.035);
  --ctl-stroke: rgba(255, 255, 255, 0.07);
  --ctl-edge: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --input-bottom: rgba(255, 255, 255, 0.55);
  --text: #f3f1ec;
  --text-2: rgba(243, 241, 236, 0.7);
  --text-3: rgba(243, 241, 236, 0.45);
  --accent: #8ab0ff;
  --accent-hover: #9cbdff;
  --accent-press: #7ba3f4;
  --accent-text: #a3c0ff;
  --accent-soft: rgba(138, 176, 255, 0.12);
  --accent-ring: rgba(138, 176, 255, 0.4);
  --on-accent: #0a1531;
  --success: #6ccb5f;
  --success-bg: rgba(108, 203, 95, 0.12);
  --caution: #fcd34d;
  --caution-bg: rgba(252, 211, 77, 0.1);
  --critical: #ff99a4;
  --critical-bg: rgba(255, 153, 164, 0.11);
  --code-bg: rgba(255, 255, 255, 0.065);
  --acrylic: rgba(36, 35, 33, 0.82);
  --shadow-card: none;
  --shadow-raise: 0 6px 16px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-flyout: 0 8px 16px rgba(0, 0, 0, 0.32), 0 0 1px rgba(0, 0, 0, 0.5);
  --shadow-window: 0 32px 64px rgba(0, 0, 0, 0.42), 0 2px 21px rgba(0, 0, 0, 0.36);
  --focus-outer: #ffffff;
  --focus-inner: #000000;
  --scroll-thumb: rgba(255, 255, 255, 0.28);
}

:root[data-accent="clay"] {
  --bloom-1: rgba(201, 100, 66, 0.05);
  --bloom-2: rgba(37, 87, 214, 0.02);
  --accent: #c15f3c;
  --accent-hover: #ca6a47;
  --accent-press: #d07754;
  --accent-text: #b1532f;
  --accent-soft: rgba(193, 95, 60, 0.1);
  --accent-ring: rgba(193, 95, 60, 0.35);
  --on-accent: #ffffff;
}

:root[data-theme="dark"][data-accent="clay"] {
  --bloom-1: rgba(217, 119, 87, 0.07);
  --bloom-2: rgba(91, 140, 255, 0.02);
  --accent: #eba487;
  --accent-hover: #f0b399;
  --accent-press: #df967a;
  --accent-text: #f1b59b;
  --accent-soft: rgba(235, 164, 135, 0.12);
  --accent-ring: rgba(235, 164, 135, 0.4);
  --on-accent: #2b1309;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 12% -8%, var(--bloom-1), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, var(--bloom-2), transparent 60%),
    radial-gradient(1200px 700px at 50% 120%, var(--bloom-1), transparent 70%);
}

::selection { background: var(--accent); color: var(--on-accent); }

* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 12px; border: 4px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { border-width: 3px; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-outer);
  outline-offset: 1px;
  box-shadow: 0 0 0 1px var(--focus-inner);
}

h1, h2, h3, h4 { margin: 0; color: var(--text); font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.2vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { font-weight: 600; color: var(--text); }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-size: 0.92em; font-variant-ligatures: none; }
.serif { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.015em; }
.accent { color: var(--accent-text); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.sm { font-size: 0.875rem; }
.xs { font-size: 0.78rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; display: block; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
#nav-root { display: contents; }

#px-discord-btn { display: none !important; }
.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 56px) var(--gutter) 96px;
  flex: 1;
}
.page-narrow { max-width: 860px; }
body.has-sidebar .page { padding-top: 40px; max-width: 1080px; }

.section { margin-top: 112px; }
.section-head { display: grid; gap: 10px; margin-bottom: 32px; max-width: 680px; }
.section-head.center { margin-inline: auto; justify-items: center; }
.eyebrow {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}
.section-head h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.75rem, 3.2vw, 2.4rem); letter-spacing: -0.02em; }
.lead { font-size: 1.06rem; color: var(--text-2); line-height: 1.6; max-width: 62ch; }

.page-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.page-head h1 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; max-width: none; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.badge-row .badge + .badge::before { content: "\00B7"; margin-right: 10px; color: var(--text-3); }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), backdrop-filter var(--t-mid) var(--ease);
}
.topbar.scrolled, .topbar.open {
  background: var(--acrylic);
  border-bottom-color: var(--stroke);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
}
.topbar-inner {
  height: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex: 0 0 auto; }
.brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 0 0 1px var(--stroke); }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.brand-name span { color: var(--text-3); font-weight: 500; margin-left: 4px; }

.topnav { display: flex; align-items: center; gap: 2px; flex: 1; }
.topnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-ctl);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.topnav-link:hover { background: var(--subtle-hover); color: var(--text); }
.topnav-link:active { background: var(--subtle-press); color: var(--text-2); }
.topnav-link.active { color: var(--text); }
.topnav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 16px;
  height: 3px;
  margin-left: -8px;
  border-radius: 3px;
  background: var(--accent);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn.topbar-menu { display: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--subtle-hover); color: var(--text); }
.icon-btn:active { background: var(--subtle-press); color: var(--text-3); }
.icon-btn .icon { width: 17px; height: 17px; }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 49;
  padding: 8px var(--gutter) 16px;
  background: var(--acrylic);
  border-bottom: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  animation: drop var(--t-slow) var(--ease-decel);
}
.mobile-menu.open { display: grid; gap: 2px; }
.mobile-menu .nav-item { height: 42px; }
.mobile-menu-actions { display: flex; gap: 8px; margin-top: 10px; }
.mobile-menu-actions .btn { flex: 1; }

.navview {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  padding: 14px 10px 12px;
  transition: width var(--t-slow) var(--ease-decel);
}
.navview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 0 10px; height: 40px; }
.navview-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 6px 18px;
  padding: 6px 4px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ctl-hover);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.navview-user-text { display: grid; min-width: 0; line-height: 1.3; }
.navview-user-name { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navview-user-role { font-size: 0.8rem; color: var(--text-3); }
.navview-nav { display: grid; gap: 3px; align-content: start; flex: 1; overflow-y: auto; padding: 0 2px; }
.navview-foot { display: grid; gap: 3px; padding: 8px 2px 0; }
.navview-foot .btn { justify-content: center; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  text-align: left;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-item .icon { width: 17px; height: 17px; color: var(--text-2); }
.nav-item:hover { background: var(--subtle-hover); }
.nav-item:active { background: var(--subtle-press); color: var(--text-2); }
.nav-item.active { background: var(--subtle-hover); font-weight: 600; }
.nav-item.active .icon { color: var(--text); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 16px;
  margin-top: -8px;
  border-radius: 3px;
  background: var(--accent);
  animation: pill var(--t-slow) var(--ease-decel);
}
.nav-item-label { overflow: hidden; text-overflow: ellipsis; }

body.has-sidebar .shell { padding-left: var(--side-w); transition: padding-left var(--t-slow) var(--ease-decel); }
body.sidebar-collapsed .navview { width: var(--side-w-compact); }
body.sidebar-collapsed.has-sidebar .shell { padding-left: var(--side-w-compact); }
body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .nav-item-label,
body.sidebar-collapsed .navview-user-text,
body.sidebar-collapsed .navview-head .brand { display: none; }
body.sidebar-collapsed .navview-head { justify-content: center; padding: 0; }
body.sidebar-collapsed .navview-user { justify-content: center; margin-inline: 0; }
body.sidebar-collapsed .navview-user .avatar { width: 36px; height: 36px; font-size: 0.9rem; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 0; gap: 0; }
body.sidebar-collapsed .collapse-btn .icon { transform: rotate(180deg); }
.collapse-btn .icon { transition: transform var(--t-slow) var(--ease-decel); }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--ctl-stroke);
  border-radius: var(--r-ctl);
  background: var(--ctl);
  box-shadow: var(--ctl-edge);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover { background: var(--ctl-hover); }
.btn:active { background: var(--ctl-press); color: var(--text-2); box-shadow: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-accent {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 80%, #fff 20%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  color: var(--on-accent);
}
.btn-accent:hover { background: var(--accent-hover); }
.btn-accent:active { background: var(--accent-press); color: color-mix(in srgb, var(--on-accent) 75%, transparent); box-shadow: none; }
.btn-subtle { background: transparent; border-color: transparent; box-shadow: none; }
.btn-subtle:hover { background: var(--subtle-hover); }
.btn-subtle:active { background: var(--subtle-press); }
.btn-danger { color: var(--critical); }
.btn-danger:hover { background: var(--critical-bg); border-color: color-mix(in srgb, var(--critical) 30%, transparent); }
.btn-lg { min-height: 44px; padding: 10px 22px; font-size: 0.97rem; border-radius: 6px; }
.btn-sm { min-height: 30px; padding: 4px 11px; font-size: 0.85rem; }
.btn-xs { min-height: 26px; padding: 2px 9px; font-size: 0.8rem; border-radius: 4px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled, .btn.btn-disabled {
  background: var(--subtle-press);
  border-color: var(--ctl-stroke);
  box-shadow: none;
  color: var(--text-3);
  cursor: not-allowed;
  pointer-events: none;
}
.btn-accent:disabled, .btn-accent.btn-disabled { background: var(--stroke-strong); color: var(--text-3); border-color: transparent; }
.btn-ms { gap: 10px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.label { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.hint { font-size: 0.8rem; color: var(--text-3); }
.input {
  width: 100%;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--ctl-stroke);
  border-bottom-color: var(--input-bottom);
  border-radius: var(--r-ctl);
  background: var(--ctl);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--text-3); }
.input:hover { background: var(--ctl-hover); }
.input:focus {
  background: var(--layer-solid);
  border-bottom-color: var(--accent);
  box-shadow: inset 0 -1px 0 var(--accent);
  outline: none;
}
.input-lg { min-height: 42px; font-size: 0.97rem; padding: 8px 13px; }
.input-code { font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
select.input {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  cursor: pointer;
}
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.form-error { min-height: 0; font-size: 0.85rem; color: var(--critical); }
.form-error:empty { display: none; }
.form-error:not(:empty) { margin: 4px 0 12px; }

.card {
  position: relative;
  background: var(--layer);
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-hover { transition: background-color var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease); }
.card-hover:hover { background: var(--layer-hover); border-color: var(--stroke-strong); }
.card-hover:active { background: var(--layer); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--divider); }
.card-head h3 { font-size: 0.98rem; }
.card-body { padding: 20px; }

.glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--text);
}
.glyph .icon { width: 22px; height: 22px; }
.glyph-sm .icon { width: 18px; height: 18px; }
.glyph-neutral { color: var(--text-3); }

.mci { width: 100%; height: 100%; object-fit: contain; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 400;
  white-space: nowrap;
}
.badge-accent { color: var(--accent-text); font-weight: 600; }
.badge-success { color: var(--success); }
.badge-caution { color: var(--caution); }
.badge-critical { color: var(--critical); }
.dot { display: none; }

.cmd {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.84em;
  line-height: 1.6;
  font-variant-ligatures: none;
  white-space: nowrap;
}
button.cmd { cursor: copy; transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
button.cmd:hover { background: var(--subtle-hover); color: var(--accent-text); }
.chip {
  color: var(--text-3);
  font-size: 0.78rem;
}

.copyfield {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--ctl-stroke);
  border-radius: 7px;
  background: var(--ctl);
  box-shadow: var(--ctl-edge);
}
.copyfield-tag { font-size: 0.85rem; color: var(--text-2); flex: 0 0 auto; min-width: 64px; }
.copyfield-value { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 0.95rem; font-variant-ligatures: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copyfield .btn { flex: 0 0 auto; }
.copyfield + .copyfield { margin-top: 8px; }
.code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px 18px;
  border-radius: var(--r-card);
  border: 1px solid var(--stroke);
  background: var(--ctl);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-ligatures: none;
  word-break: break-all;
  text-align: center;
}
.code-box-sm { font-size: 1.15rem; min-height: 54px; letter-spacing: 0.06em; }

.infobar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--stroke);
  background: var(--layer);
  font-size: 0.9rem;
  color: var(--text-2);
}
.infobar > .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--accent-text); }
.infobar-success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.infobar-success > .icon { color: var(--success); }
.infobar-caution { background: var(--caution-bg); border-color: color-mix(in srgb, var(--caution) 20%, transparent); }
.infobar-caution > .icon { color: var(--caution); }
.infobar-critical { background: var(--critical-bg); border-color: color-mix(in srgb, var(--critical) 20%, transparent); }
.infobar-critical > .icon { color: var(--critical); }
.infobar strong { color: var(--text); }

.ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--subtle-hover);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.ring-sm { width: 18px; height: 18px; border-width: 2px; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 14px 18px 14px 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--stroke);
  background: var(--acrylic);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: var(--shadow-flyout);
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity var(--t-mid) var(--ease), transform var(--t-slow) var(--ease-decel);
}
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast .icon { width: 18px; height: 18px; color: var(--accent-text); }

.flyout {
  position: fixed;
  z-index: 120;
  min-width: 220px;
  padding: 4px;
  border-radius: var(--r-card);
  border: 1px solid var(--stroke);
  background: var(--acrylic);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: var(--shadow-flyout);
  animation: flyin var(--t-slow) var(--ease-decel);
}
.flyout-label { padding: 8px 12px 4px; font-size: 0.75rem; font-weight: 600; color: var(--text-3); }
.flyout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}
.flyout-item:hover { background: var(--subtle-hover); }
.flyout-item:active { background: var(--subtle-press); color: var(--text-2); }
.flyout-item .icon { width: 16px; height: 16px; color: var(--text-2); }
.flyout-item .flyout-check { margin-left: auto; color: var(--accent-text); opacity: 0; }
.flyout-item.checked .flyout-check { opacity: 1; }
.flyout-swatch { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.flyout-sep { height: 1px; margin: 4px 0; background: var(--divider); }

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--text-2);
  border-radius: 10px;
  background: var(--ctl);
  cursor: pointer;
  transition: background-color var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 6px;
  background: var(--text-2);
  transition: transform var(--t-slow) var(--ease-decel), width var(--t-mid) var(--ease), height var(--t-mid) var(--ease), margin var(--t-mid) var(--ease), left var(--t-slow) var(--ease-decel), background-color var(--t-mid) var(--ease);
}
.switch:hover { background: var(--ctl-hover); }
.switch:hover::after { width: 14px; height: 14px; margin-top: -7px; left: 3px; }
.switch:active::after { width: 17px; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { left: 24px; background: var(--on-accent); }
.switch[aria-checked="true"]:hover::after { left: 23px; }
.switch[aria-checked="true"]:active::after { left: 20px; }

.group { display: grid; gap: 4px; }
.group + .group { margin-top: 28px; }
.group-title { font-size: 0.95rem; font-weight: 600; margin: 0 2px 6px; }
.setting {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 14px 18px;
  background: var(--layer);
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  transition: background-color var(--t-fast) var(--ease);
}
a.setting { color: inherit; text-decoration: none !important; }
a.setting:hover { background: var(--layer-hover); }
a.setting:active { background: var(--layer); }
.setting-icon { display: inline-flex; width: 20px; height: 20px; color: var(--text); flex: 0 0 auto; }
.setting-icon svg { width: 100%; height: 100%; }
.setting-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.setting-title { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.setting-desc { font-size: 0.8rem; color: var(--text-2); line-height: 1.45; }
.setting-control { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.setting-value { font-size: 0.88rem; color: var(--text-2); }
.setting-chevron { width: 16px; height: 16px; color: var(--text-2); }
.setting-block { display: block; padding: 0; }
.setting-block > .setting-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; min-height: 68px; }
.setting-block > .setting-sub { padding: 16px 18px 18px 54px; border-top: 1px solid var(--divider); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 32px; }
.step { display: grid; gap: 8px; color: var(--text-3); font-size: 0.84rem; }
.step::before { content: ""; height: 3px; border-radius: 2px; background: var(--divider); transition: background-color var(--t-slow) var(--ease); }
.step-dot { display: none; }
.step.done { color: var(--text-2); }
.step.done::before, .step.active::before { background: var(--accent); }
.step.active { color: var(--text); font-weight: 600; }

.selector {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.selector::-webkit-scrollbar { display: none; }
.selector-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.selector-item:hover { background: var(--subtle-hover); color: var(--text); }
.selector-item:active { background: var(--subtle-press); }
.selector-item.active { color: var(--text); font-weight: 600; }
.selector-item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 16px;
  height: 3px;
  margin-left: -8px;
  border-radius: 3px;
  background: var(--accent);
  animation: pillx var(--t-slow) var(--ease-decel);
}
.selector-item .mci-sm { width: 18px; height: 18px; }
.selector-count { font-size: 0.75rem; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }

.mci-sm { display: inline-flex; width: 20px; height: 20px; flex: 0 0 auto; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-top: 32px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 10px;
  margin-bottom: 28px;
  font-size: 0.88rem;
  color: var(--text-2);
}
.hero-meta span { color: var(--text-3); }
.hero-title {
  max-width: 14ch;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero-title em { font-style: italic; color: var(--accent-text); font-weight: 500; }
.hero-sub { max-width: 58ch; margin-top: 24px; font-size: clamp(1.02rem, 1.6vw, 1.15rem); line-height: 1.6; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero-join { width: min(460px, 100%); margin-top: 28px; }
.hero-visual { position: relative; width: 100%; max-width: 1040px; margin-top: 72px; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -8% 6% auto;
  height: 70%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-ring), transparent);
  filter: blur(60px);
  opacity: 0.2;
}

.window {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-window);
  border: 1px solid var(--stroke);
  background: var(--layer-solid);
  box-shadow: var(--shadow-window);
  text-align: left;
}
.window-bar { display: flex; align-items: center; gap: 10px; height: 44px; padding-left: 16px; border-bottom: 1px solid var(--divider); background: var(--layer-alt); user-select: none; -webkit-user-select: none; }
.window-bar img { width: 18px; height: 18px; border-radius: 4px; }
.window-title { font-size: 0.8rem; color: var(--text); }
.window-title span { color: var(--text-3); }
.window-ctl { display: flex; margin-left: auto; height: 100%; }
.window-ctl span { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 100%; color: var(--text-2); transition: background-color var(--t-fast) var(--ease); }
.window-ctl span:hover { background: var(--subtle-hover); }
.window-ctl span.close:hover { background: #c42b1c; color: #fff; }
.window-ctl svg { width: 10px; height: 10px; }
.window-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 440px; }
.window-nav { display: grid; align-content: start; gap: 3px; padding: 12px 8px; border-right: 1px solid var(--divider); background: var(--layer-alt); }
.window-nav .nav-item { gap: 12px; height: 40px; font-size: 0.86rem; }
.window-nav .nav-item .selector-count { margin-left: auto; }
.window-search { margin: 0 4px 10px; }
.window-search .input { min-height: 32px; font-size: 0.82rem; }
.window-pane { display: flex; flex-direction: column; min-width: 0; padding: 22px 24px 18px; }
.window-pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.window-pane-head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.window-list { display: grid; gap: 4px; align-content: start; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.window-list .setting { min-height: 58px; padding: 10px 14px; box-shadow: none; }
.window-list .setting-title { font-size: 0.86rem; }
.window-list .setting-desc { font-size: 0.76rem; }
.window-chat {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(10, 10, 12, 0.88);
  color: #e8e8e8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  min-height: 82px;
  align-content: end;
  grid-template-columns: minmax(0, 1fr);
}
.window-chat .ln { animation: chatin var(--t-slow) var(--ease-decel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-chat .tag { color: #6b9bff; font-weight: 600; }
.window-chat .on { color: #6ccb5f; }
.window-chat .off { color: #ff8a8a; }
.window-chat .you { color: #a5a5a5; }
.window-chat .caret { display: inline-block; width: 7px; height: 13px; vertical-align: -2px; background: #e8e8e8; animation: blink 1.1s steps(1) infinite; }
.window-tip { margin-top: 10px; font-size: 0.75rem; color: var(--text-3); text-align: center; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 88px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
  background: var(--layer);
  box-shadow: var(--shadow-card);
}
.stat { display: grid; gap: 4px; padding: 26px 28px; }
.stat + .stat { border-left: 1px solid var(--divider); }
.stat-value { font-family: var(--font-serif); font-size: 2.3rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.85rem; color: var(--text-2); }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; color: inherit; text-decoration: none !important; }
.cat-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.cat-art { width: 56px; height: 56px; display: inline-flex; }
.cat-card h3 { font-size: 1.12rem; }
.cat-card p { font-size: 0.9rem; color: var(--text-2); line-height: 1.55; }
.cat-link { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 500; color: var(--accent-text); }
.cat-link .icon { width: 14px; height: 14px; transition: transform var(--t-mid) var(--ease); }
.cat-card:hover .cat-link .icon { transform: translateX(3px); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.how-step { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--stroke-strong); }
.how-num {
  font-size: 0.84rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.how-step p { font-size: 0.92rem; color: var(--text-2); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { display: flex; gap: 18px; padding: 24px; }
.feature h3 { margin-bottom: 6px; }
.feature p { font-size: 0.92rem; color: var(--text-2); }

.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 112px;
  padding: 44px 48px;
  border-radius: var(--r-window);
}
.cta h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -0.02em; }
.cta p { margin-top: 8px; color: var(--text-2); }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.footer { border-top: 1px solid var(--divider); margin-top: auto; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 96px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 28px; }
.footer-brand { display: grid; gap: 10px; max-width: 320px; }
.footer-brand p { font-size: 0.82rem; color: var(--text-3); }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col h4 { font-size: 0.8rem; color: var(--text-3); font-weight: 600; margin-bottom: 2px; }
.footer-col a { font-size: 0.88rem; color: var(--text-2); }
.footer-col a:hover { color: var(--text); text-decoration: none; }
body.has-sidebar .footer { display: none; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar .input-icon { flex: 0 1 340px; min-width: 220px; }
.toolbar-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 10px);
  z-index: 10;
  margin: 0 0 24px;
  padding: 6px 6px 4px 8px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--acrylic);
  box-shadow: var(--shadow-raise);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
}
.toolbar-sticky .toolbar { margin: 0; flex-wrap: nowrap; }
.toolbar-sticky .selector { flex: 1 1 auto; min-width: 0; }
.toolbar-sticky .input-icon { flex: 0 0 240px; min-width: 0; }
.toolbar-sticky .selector { padding-bottom: 2px; }
.toolbar-sticky .input-icon { margin-bottom: 2px; }
.cat-block { margin-top: 44px; }
.cat-block:first-child { margin-top: 8px; }
.cat-block-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.cat-block-head .mci-sm { width: 30px; height: 30px; }
.cat-block-head h2 { font-size: 1.35rem; }
.cat-block-lead { color: var(--text-2); font-size: 0.92rem; margin: 0 0 18px 44px; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.module-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.module-card-head { display: flex; align-items: center; gap: 12px; }
.module-card-head h4 { font-size: 0.98rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.module-card p { font-size: 0.86rem; color: var(--text-2); line-height: 1.5; flex: 1; }
.module-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.module-card-foot .cmd { margin-right: auto; }
.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 64px 24px;
  text-align: center;
  color: var(--text-2);
}
.empty .glyph { margin-bottom: 6px; }

.cmd-list { display: grid; gap: 4px; }
.cmd-row { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 16px; padding: 12px 18px; }
.cmd-row p { font-size: 0.88rem; color: var(--text-2); }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; max-width: 1140px; }
.plan { display: flex; flex-direction: column; gap: 20px; padding: 30px; }
.plan-featured { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-head h2 { font-size: 1.15rem; font-family: var(--font-display); }
.plan-price { display: flex; align-items: baseline; gap: 10px; }
.plan-amount { font-family: var(--font-serif); font-size: 3.4rem; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.plan-period { color: var(--text-2); font-size: 0.92rem; }
.plan-desc { color: var(--text-2); font-size: 0.92rem; }
.plan-list { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--divider); flex: 1; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.plan-list .icon { width: 17px; height: 17px; color: var(--accent-text); margin-top: 2px; }
.plan-note { font-size: 0.78rem; color: var(--text-3); text-align: center; }

.numbered { display: grid; gap: 10px; counter-reset: n; }
.numbered li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--text-2); }
.numbered li::before {
  counter-increment: n;
  content: counter(n) ".";
  flex: 0 0 auto;
  min-width: 16px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.auth { display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: center; max-width: 1000px; margin: 0 auto; min-height: calc(100vh - var(--nav-h) - 260px); }
.auth-aside { display: grid; gap: 16px; }
.auth-aside h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.2rem, 4.4vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; }
.perks { display: grid; gap: 12px; margin-top: 12px; }
.perk { display: flex; align-items: center; gap: 14px; font-size: 0.95rem; color: var(--text-2); }
.auth-card { padding: 36px 36px 30px; border-radius: var(--r-window); box-shadow: var(--shadow-window); background: var(--layer-solid); }
.auth-card-head { display: grid; justify-items: center; gap: 6px; text-align: center; margin-bottom: 26px; }
.auth-card-head img { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 10px; box-shadow: 0 0 0 1px var(--stroke); }
.auth-card-head h2 { font-size: 1.5rem; }
.auth-card-head p { color: var(--text-2); font-size: 0.9rem; }
.auth-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--divider); text-align: center; font-size: 0.88rem; color: var(--text-2); }

.server-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.server-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--stroke);
  font: inherit;
  color: inherit;
  transition: background-color var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.server-card:hover { background: var(--layer-hover); border-color: var(--stroke-strong); }
.server-card:active { background: var(--layer); }
.server-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.server-card.disabled { cursor: not-allowed; opacity: 0.55; }
.server-card.disabled:hover { background: var(--layer); border-color: var(--stroke); }
.server-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.server-art { width: 60px; height: 60px; display: inline-flex; }
.server-check {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  color: var(--accent-text);
}
.server-check .icon { width: 18px; height: 18px; opacity: 0; }
.server-card.selected .server-check .icon { opacity: 1; }
.server-card h3 { font-size: 1.12rem; }
.server-desc { font-size: 0.88rem; color: var(--text-2); line-height: 1.5; }
.server-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.continue-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

.dash-head { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; flex-wrap: wrap; }
.dash-head-text { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.dash-head h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 2.5rem); letter-spacing: -0.025em; }
.dash-head p { color: var(--text-2); }
.dash-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.tile-body { display: grid; min-width: 0; }
.tile-label { font-size: 0.78rem; color: var(--text-2); }
.tile-value { font-size: 0.98rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready { padding: 28px; margin-bottom: 32px; }
.ready-top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.ready-top img { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 0 0 1px var(--stroke); }
.ready h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.ready p { color: var(--text-2); font-size: 0.92rem; max-width: 62ch; }
.ready-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.panel-loading { display: flex; align-items: center; gap: 16px; padding: 22px 24px; margin-bottom: 28px; }
.ms-flow { display: grid; gap: 14px; justify-items: start; }
.ms-flow .code-box { width: 100%; max-width: 360px; }
.inline-form { display: flex; gap: 8px; align-items: center; width: 100%; }
.inline-form .input { flex: 1; min-width: 0; }
.pulse { animation: pulse 1.2s var(--ease); }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.admin-stat { padding: 18px 20px; display: grid; gap: 2px; }
.admin-stat-val { font-family: var(--font-serif); font-size: 2rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.admin-stat-label { font-size: 0.82rem; color: var(--text-2); }
.table-wrap { overflow-x: auto; }
.datagrid { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.datagrid th { position: sticky; top: 0; padding: 10px 20px; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--divider); background: var(--layer-alt); white-space: nowrap; }
.datagrid td { padding: 11px 20px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.datagrid tbody tr { transition: background-color var(--t-fast) var(--ease); }
.datagrid tbody tr:hover { background: var(--subtle-hover); }
.datagrid tbody tr:last-child td { border-bottom: 0; }
.datagrid .th-actions, .datagrid td:last-child { text-align: right; }
.user-cell { display: grid; line-height: 1.35; }
.user-cell span { font-size: 0.8rem; color: var(--text-3); }
.row-actions { display: inline-flex; gap: 6px; }
.empty-cell { text-align: center !important; color: var(--text-3); padding: 40px !important; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--divider); }
.pager-label { font-size: 0.82rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; align-items: start; }
.tool { display: flex; flex-direction: column; gap: 16px; }
.tool-head { display: flex; gap: 14px; align-items: flex-start; }
.tool-head p { font-size: 0.84rem; color: var(--text-2); margin-top: 2px; }
.ban-list { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; margin-top: 2px; }
.ban-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 4px; font-size: 0.86rem; }
.ban-item:hover { background: var(--subtle-hover); }
.ban-empty { font-size: 0.84rem; color: var(--text-3); padding: 6px 2px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stack { display: grid; gap: 16px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.mb-3 { margin-bottom: 24px; }

html.js .reveal,
html.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease-decel);
}
html.js .reveal.is-visible,
html.js .reveal-stagger > .is-visible { opacity: 1; transform: none; }
html.js .reveal-stagger > *:nth-child(2) { transition-delay: 50ms; }
html.js .reveal-stagger > *:nth-child(3) { transition-delay: 100ms; }
html.js .reveal-stagger > *:nth-child(4) { transition-delay: 150ms; }
html.js .reveal-stagger > *:nth-child(5) { transition-delay: 200ms; }
html.js .reveal-stagger > *:nth-child(6) { transition-delay: 250ms; }
html.js .reveal-stagger > *:nth-child(n+7) { transition-delay: 300ms; }
.d1 { transition-delay: 60ms !important; }
.d2 { transition-delay: 120ms !important; }
.d3 { transition-delay: 180ms !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
@keyframes pill { from { transform: scaleY(0.2); } to { transform: none; } }
@keyframes pillx { from { transform: scaleX(0.2); } to { transform: none; } }
@keyframes flyin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes chatin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-ring); } 100% { box-shadow: 0 0 0 14px transparent; } }

@media (max-width: 1080px) {
  .module-grid, .cat-grid, .server-grid, .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
  .window-body { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  :root { --side-w: 0px; --side-w-compact: 0px; }
  .topnav, .topbar-actions .btn { display: none; }
  .icon-btn.topbar-menu { display: inline-flex; }
  .navview {
    position: sticky;
    top: 0;
    width: 100% !important;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--acrylic);
    border-bottom: 1px solid var(--stroke);
    -webkit-backdrop-filter: blur(30px) saturate(1.6);
    backdrop-filter: blur(30px) saturate(1.6);
  }
  .navview-head { padding: 0; }
  .navview-head .brand-name, .collapse-btn, .navview-user { display: none !important; }
  .navview-head .brand { display: inline-flex !important; }
  .navview-nav { display: flex; overflow-x: auto; scrollbar-width: none; gap: 2px; padding: 0; }
  .navview-nav::-webkit-scrollbar { display: none; }
  .navview-nav .nav-item { gap: 8px; padding: 0 10px; height: 36px; flex: 0 0 auto; justify-content: flex-start; }
  .navview-nav .nav-item-label { display: inline !important; }
  .navview-nav .nav-item.active::before { left: 50%; top: auto; bottom: 0; width: 16px; height: 3px; margin: 0 0 0 -8px; }
  .navview-foot { display: flex; padding: 0; }
  .navview-foot .nav-item-label, .navview-foot .btn { display: none; }
  .navview-foot .nav-item { padding: 0 9px; }
  body.has-sidebar .shell { padding-left: 0 !important; display: block; }
  body.has-sidebar .navview + * { padding-top: 0; }
  body.has-sidebar .page { padding-top: 28px; }
  .auth { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .auth-card { max-width: 480px; width: 100%; margin: 0 auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--divider); }
  .how, .features, .pricing { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: 1fr; }
  .window-body { grid-template-columns: minmax(0, 1fr); }
  .window-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--divider); padding: 8px; scrollbar-width: none; }
  .window-nav::-webkit-scrollbar { display: none; }
  .window-nav .nav-item { flex: 0 0 auto; }
  .window-nav .selector-count, .window-search { display: none; }
  .window-nav .nav-item.active::before { left: 50%; top: auto; bottom: 0; width: 16px; height: 3px; margin: 0 0 0 -8px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --nav-h: 54px; }
  body { font-size: 14.5px; }
  .page { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 72px; }
  .section { margin-top: 80px; }
  .module-grid, .cat-grid, .server-grid, .tool-grid, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 8px; }
  .hero-meta { font-size: 0.8rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-visual { margin-top: 48px; }
  .window-bar { height: 38px; }
  .window-ctl span { width: 38px; }
  .window-pane { padding: 16px 14px 14px; }
  .window-list { max-height: 260px; }
  .stat { padding: 20px; }
  .stat-value { font-size: 1.9rem; }
  .cta { padding: 30px 22px; margin-top: 80px; }
  .cta-actions, .cta-actions .btn { width: 100%; }
  .card { padding: 20px; }
  .auth-card { padding: 28px 22px 24px; }
  .plan { padding: 24px; }
  .cmd-row { grid-template-columns: 1fr; gap: 4px; }
  .setting { flex-wrap: wrap; }
  .setting-control { width: 100%; justify-content: flex-start; padding-left: 36px; }
  .setting-block > .setting-sub { padding-left: 18px; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .steps .step span:not(.step-dot) { display: none; }
  .continue-row .btn { width: 100%; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .footer-cols { gap: 36px; }
  .copyfield-tag { min-width: 0; }
  .dash-head .avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html.js .reveal, html.js .reveal-stagger > * { opacity: 1; transform: none; }
}

.module-flag { font-size: 0.78rem; color: var(--success); white-space: nowrap; }
.module-settings { font-size: 0.78rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 0.88rem; color: var(--text-2); }
.meta span { color: var(--text-3); }
