:root {
  color-scheme: light;
  --a3s-bg: #f7f7f8;
  --a3s-panel: #ffffff;
  --a3s-panel-soft: #f2f3f5;
  --a3s-panel-strong: #e9ebef;
  --a3s-ink: #17181a;
  --a3s-muted: #71757d;
  --a3s-subtle: #8b9098;
  --a3s-faint: #a1a5ad;
  --a3s-line: #e2e4e8;
  --a3s-line-strong: #d3d6dc;
  --a3s-action: #242424;
  --a3s-action-hover: #111111;
  --a3s-action-ink: #ffffff;
  --a3s-blue: #2864e8;
  --a3s-blue-soft: #edf3ff;
  --a3s-purple: #5420bd;
  --a3s-green: #14a675;
  --a3s-red: #d84b4f;
  --a3s-warning: #c97816;
  --a3s-shadow: 0 24px 64px rgb(20 24 40 / 18%);
  --a3s-shadow-soft: 0 14px 36px rgb(20 24 40 / 12%);
  --a3s-radius: 16px;
  --a3s-radius-sm: 9px;
  --sidebar-width: 232px;
  --topbar-height: 58px;
  --a3s-ui-font:
    ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --a3s-bg: #101118;
  --a3s-panel: #171820;
  --a3s-panel-soft: #1e2028;
  --a3s-panel-strong: #282b35;
  --a3s-ink: #f2f3f5;
  --a3s-muted: #a4a8b2;
  --a3s-subtle: #8d929e;
  --a3s-faint: #727783;
  --a3s-line: #2a2d35;
  --a3s-line-strong: #3a3d48;
  --a3s-action: #f2f3f5;
  --a3s-action-hover: #ffffff;
  --a3s-action-ink: #17181a;
  --a3s-blue: #6ca3ff;
  --a3s-blue-soft: #192844;
  --a3s-purple: #9b7af5;
  --a3s-green: #3ccf91;
  --a3s-red: #f27777;
  --a3s-warning: #eda94c;
  --a3s-shadow: 0 22px 70px rgb(0 0 0 / 35%);
  --a3s-shadow-soft: 0 9px 30px rgb(0 0 0 / 24%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  background: var(--a3s-bg);
  color: var(--a3s-ink);
  font-family: var(--a3s-ui-font);
  font-size: 15px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.is-sidebar-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

img,
svg {
  display: block;
}

:where(button, input, select, a):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--a3s-blue) 78%, white);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: var(--a3s-radius-sm);
  background: var(--a3s-action);
  color: var(--a3s-action-ink);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--a3s-line);
  background: color-mix(in srgb, var(--a3s-panel-soft) 58%, var(--a3s-panel));
}

.sidebar-product {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--a3s-line);
}

.product-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.product-brand img {
  flex: 0 0 auto;
  border-radius: 10px;
}

.product-brand span {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.product-brand strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-brand small {
  margin-top: 3px;
  color: var(--a3s-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--a3s-muted);
  cursor: pointer;
  font-size: 22px;
}

.workspace-card {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  margin: 14px 12px 6px;
  padding: 10px;
  border: 1px solid var(--a3s-line);
  border-radius: 11px;
  background: var(--a3s-bg);
}

.workspace-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--a3s-blue);
  color: #fff;
  font-size: 16px;
}

.workspace-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.workspace-card small {
  color: var(--a3s-muted);
  font-size: 12px;
}

.workspace-card strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-card b {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--a3s-panel);
  color: var(--a3s-blue);
  font-size: 12px;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  padding: 10px 12px 16px;
  overflow-y: auto;
}

.sidebar-nav p {
  margin: 18px 10px 7px;
  color: var(--a3s-faint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.sidebar-nav a,
.sidebar-nav button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  padding: 5px 10px;
  border-radius: 9px;
  background: transparent;
  color: var(--a3s-muted);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav button:hover {
  background: var(--a3s-panel-soft);
  color: var(--a3s-ink);
}

.sidebar-nav a.is-active {
  background: var(--a3s-blue-soft);
  color: var(--a3s-blue);
  font-weight: 700;
}

.sidebar-nav a.is-active::before {
  display: none;
}

.sidebar-nav a > span,
.sidebar-nav button > span {
  display: grid;
  width: 28px;
  place-items: center;
  font-size: 16px;
}

.sidebar-nav .sidebar-nav-icon {
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, currentcolor 14%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, currentcolor 7%, var(--a3s-panel));
}

.sidebar-nav-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sidebar-nav-icon[data-tone="blue"] {
  color: #3974e8;
}

.sidebar-nav-icon[data-tone="green"] {
  color: #159469;
}

.sidebar-nav-icon[data-tone="purple"] {
  color: var(--a3s-purple);
}

.sidebar-nav a b {
  min-width: 25px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--a3s-blue) 10%, transparent);
  font-size: 12px;
  text-align: center;
}

.nav-dot {
  width: 8px;
  height: 8px;
  margin-left: 7px;
  border-radius: 50%;
}

.nav-dot-skill {
  background: var(--a3s-green);
}

.nav-dot-mcp {
  background: #0f9f87;
}

.nav-dot-software {
  background: var(--a3s-blue);
}

.nav-dot-agent {
  background: var(--a3s-warning);
}

.sidebar-footer {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-top: 1px solid var(--a3s-line);
}

.sidebar-footer a,
.sidebar-footer button {
  display: grid;
  min-height: 40px;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 9px;
  background: transparent;
  color: var(--a3s-muted);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.sidebar-footer a:hover,
.sidebar-footer button:hover {
  background: var(--a3s-panel-soft);
  color: var(--a3s-ink);
}

.app-shell {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.app-topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--a3s-line) 88%, transparent);
  background: color-mix(in srgb, var(--a3s-panel) 92%, transparent);
  backdrop-filter: blur(16px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--a3s-muted);
  font-size: 13px;
}

.breadcrumbs i {
  color: var(--a3s-faint);
  font-style: normal;
}

.breadcrumbs strong {
  color: var(--a3s-ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.registry-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--a3s-muted);
  font-size: 13px;
}

.registry-status i,
.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--a3s-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a3s-green) 15%, transparent);
}

.mobile-menu {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--a3s-panel-soft);
  cursor: pointer;
}

.workspace {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: 34px clamp(24px, 3.2vw, 52px) 0;
}

.overview-section,
.workspace-section {
  scroll-margin-top: 70px;
}

.workspace-section {
  padding-top: 52px;
}

.page-header,
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.page-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.page-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--a3s-blue);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--a3s-blue) 25%, transparent);
  font-size: 21px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--a3s-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-header h1,
.section-header h2 {
  margin: 0;
  color: var(--a3s-ink);
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.page-header p:not(.eyebrow),
.section-header p:not(.eyebrow) {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--a3s-muted);
  font-size: 15px;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: var(--a3s-radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--a3s-action);
  color: var(--a3s-action-ink);
}

.button-primary:hover {
  background: var(--a3s-action-hover);
}

.button-secondary {
  border-color: var(--a3s-line-strong);
  background: var(--a3s-panel);
  color: var(--a3s-ink);
}

.button-secondary:hover {
  border-color: color-mix(in srgb, var(--a3s-line-strong) 55%, var(--a3s-ink));
  background: var(--a3s-panel-soft);
}

.button-inverse {
  border-color: rgb(255 255 255 / 20%);
  background: #fff;
  color: #17181a;
}

.button-small {
  min-height: 36px;
  padding: 6px 11px;
  font-size: 13px;
}

.section-header {
  align-items: end;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 25px;
}

.section-meta {
  flex: 0 0 auto;
  color: var(--a3s-muted);
  font-size: 13px;
}

.section-meta b {
  color: var(--a3s-ink);
  font-size: 17px;
}

.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 46px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--a3s-line);
  color: var(--a3s-muted);
  font-size: 13px;
}

.workspace-footer b {
  color: inherit;
  font-weight: 600;
}

.mobile-scrim {
  position: fixed;
  z-index: 45;
  inset: 0;
  background: rgb(15 18 27 / 48%);
  backdrop-filter: blur(2px);
}

.noscript-message {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  max-width: 520px;
  padding: 14px 18px;
  border: 1px solid var(--a3s-line);
  border-radius: 12px;
  background: var(--a3s-panel);
  box-shadow: var(--a3s-shadow-soft);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
