
:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --line: #dde6f0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eaf2ff;
  --sidebar: #fbfdff;
  --ok: #2f7d5c;
  --warn: #a56218;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand {
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-block;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: inset 0 0 0 5px #dbeafe;
}
nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
}
nav a.active, nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
}
main {
  width: min(1380px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}
.page-interfaces main {
  width: 100%;
  padding: 0;
}
section {
  margin: 0 0 28px;
  padding: 0;
}
.hero, .page-head {
  padding: 28px 0 10px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
}
h1, h2, h3 {
  letter-spacing: 0;
  line-height: 1.25;
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
}
.app-content h1 {
  font-size: clamp(30px, 3vw, 38px);
}
h2 {
  margin: 0 0 14px;
  font-size: 24px;
}
h3 {
  margin: 18px 0 10px;
  font-size: 18px;
}
.lead {
  max-width: 900px;
  color: #314154;
  font-size: 18px;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.stat, .panel, .doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: var(--accent-strong);
}
.stat span { color: var(--muted); }
.grid.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}
.app-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 20px 16px 28px;
  border-right: 1px solid #edf1f6;
  background: #fff;
  scrollbar-color: #d4ddea transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
.app-content {
  min-width: 0;
  padding: 34px clamp(24px, 4vw, 54px) 56px;
}
.app-sidebar::-webkit-scrollbar { width: 10px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb {
  border: 3px solid #fff;
  border-radius: 999px;
  background: #d4ddea;
  background-clip: padding-box;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #263244;
  font-size: 1.05rem;
  font-weight: 800;
}
.sidebar-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: #eef5ff;
  color: #2563eb;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}
.source-filter-summary {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid #dfe7f2;
  border-radius: 6px;
  background: #fbfcfe;
  color: #526173;
  padding: 6px 7px 6px 9px;
  text-align: left;
}
.source-filter-summary:hover,
.source-filter-summary.active {
  border-color: #bfd4fa;
  background: #f0f5ff;
  color: #2465dc;
  text-decoration: none;
}
.source-filter-current,
.source-filter-action {
  display: inline-flex;
  min-width: 0;
  align-items: center;
}
.source-filter-current { gap: 6px; }
.source-filter-current strong {
  min-width: 0;
  overflow: hidden;
  color: #263244;
  font-size: .78rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-filter-current em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2f7;
  color: #667085;
  font-size: .68rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1;
  padding: 3px 6px;
}
.source-filter-action {
  flex: 0 0 auto;
  color: #7b8798;
  font-size: .72rem;
  font-weight: 740;
  white-space: nowrap;
}
.catalog-tree {
  display: grid;
  gap: 10px;
}
.tree-group {
  display: grid;
  gap: 2px;
}
.tree-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin: 0;
  border-radius: 4px;
  color: #253247;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 760;
  list-style: none;
  padding: 5px 6px;
}
.tree-group-toggle::-webkit-details-marker { display: none; }
.tree-group-toggle:hover {
  background: #f5f8fd;
  color: #2465dc;
}
.tree-group-toggle.tree-level-0 {
  color: #2f7cf6;
  font-size: .92rem;
  font-weight: 820;
}
.tree-group-toggle.tree-level-1 {
  color: #243244;
  font-size: .9rem;
}
.tree-group-toggle.tree-level-2,
.tree-group-toggle.tree-level-3 {
  color: #344054;
  font-size: .86rem;
}
.tree-group-toggle em {
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 999px;
  background: #eef2f7;
  color: #667085;
  font-size: .68rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1;
  padding: 3px 6px;
}
.tree-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #8b96a8;
}
.tree-chevron::before {
  content: "›";
  display: block;
  font-size: 18px;
  line-height: 12px;
  transform: rotate(90deg);
}
.tree-group:not([open]) > .tree-group-toggle .tree-chevron::before {
  transform: rotate(0deg);
}
.tree-children {
  display: grid;
  gap: 2px;
  margin-left: 11px;
  border-left: 1px solid #eef2f7;
  padding-left: 9px;
}
.tree-item {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 5px;
  color: #334155;
  padding: 6px 7px;
}
.tree-item:hover,
.tree-item.active {
  background: #eaf2ff;
  color: #155bd7;
  text-decoration: none;
}
.tree-item span,
.tree-item strong,
.tree-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-item strong {
  display: block;
  font-size: .78rem;
  font-weight: 760;
}
.tree-item small {
  display: block;
  color: #7b8798;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: .68rem;
}
.tree-item em {
  color: #7b8798;
  font-size: .66rem;
  font-style: normal;
  font-weight: 760;
}
.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(200px, 300px);
  gap: 12px;
  align-items: end;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--surface-strong);
  color: #2b3b4f;
  font-weight: 700;
}
td code {
  display: block;
  margin-top: 4px;
}
code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef2f6;
  color: #1e3a4f;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: .92em;
}
pre {
  overflow-x: auto;
  min-height: 112px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  color: #0f172a;
}
pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}
.definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.definition-grid div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
dt { color: var(--muted); font-size: 13px; }
dd { margin: 4px 0 0; font-weight: 650; }
.interface-head {
  margin: 0 0 24px;
  padding: 6px 0 24px;
  border-bottom: 1px solid #e8eef6;
}
.interface-title-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.interface-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid #bfd4fa;
  border-radius: 7px;
  background: #eef5ff;
  color: #2563eb;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
}
.interface-head h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
  color: #172033;
  font-size: clamp(30px, 3vw, 40px);
}
.interface-head h1 span {
  border: 1px solid #bfd4fa;
  border-radius: 6px;
  background: #eef5ff;
  color: #1d4ed8;
  font-size: .78rem;
  font-weight: 760;
  padding: 3px 7px;
}
.interface-head p {
  margin: 0;
  color: #314154;
  font-size: 1rem;
}
.interface-section {
  margin: 0 0 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid #e8eef6;
}
.interface-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #18243a;
  font-size: 1.18rem;
}
.interface-section h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #2563eb;
}
.metadata-list {
  display: grid;
  gap: 12px;
  margin: 0;
  max-width: 820px;
}
.metadata-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}
.metadata-list dt {
  color: #7b8798;
  font-size: .86rem;
  font-weight: 760;
}
.metadata-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #10213d;
  font-size: .95rem;
  font-weight: 500;
}
.section-note {
  margin: 18px 0 0;
  color: #314154;
}
.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.example-grid h3 {
  margin-top: 0;
  color: #526173;
  font-size: .88rem;
}
.snapshot-note {
  margin: 0 0 12px;
  border: 1px solid #dfe7f2;
  border-radius: 6px;
  background: #fbfcfe;
  color: #40536b;
  padding: 9px 12px;
}
.sample-table {
  max-width: 100%;
}
.sample-table table {
  min-width: max-content;
}
.snapshot-more {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .86rem;
}
.empty-state {
  margin: 0;
  color: var(--muted);
}
.breadcrumb, .code-title, .build-note, footer {
  color: var(--muted);
}
.note {
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
}
.code-note pre {
  margin-top: 10px;
  background: #f7fbff;
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.doc-card {
  color: var(--text);
}
.doc-card strong, .doc-card span {
  display: block;
}
.doc-card span {
  color: var(--muted);
  font-size: 14px;
}
.markdown-body img {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px clamp(18px, 4vw, 48px);
  font-size: 14px;
}
@media (max-width: 720px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .toolbar { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: static; height: auto; max-height: 55vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-content { padding: 24px 16px 42px; }
  .example-grid { grid-template-columns: 1fr; }
  .metadata-list div { grid-template-columns: 1fr; gap: 2px; }
  main { width: min(100vw - 24px, 1180px); }
  .page-interfaces main { width: 100%; }
}
