:root {
  --sidebar-w: 280px;
  --bg: #f3f7f8;
  --sidebar: #0b1c24;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #14303a;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #d7e4e8;
  --code-bg: #eef5f6;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(11, 28, 36, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #0b1c24 0%, #123039 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.brand {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.brand-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
}

.brand-tagline {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #cbd5e1;
  font-weight: 500;
}

.brand-keywords {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.brand-oltai {
  display: block;
  margin-top: 0.9rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #ea580c 140%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand-oltai:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.brand-oltai-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-oltai-title {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}

.brand-oltai-desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.9;
}

.brand-autoai {
  display: block;
  margin-top: 0.65rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  color: #042f2e;
  background: linear-gradient(135deg, #5eead4 0%, #14b8a6 55%, #fbbf24 140%);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand-autoai:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.brand-autoai-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(4, 47, 46, 0.18);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-autoai-title {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}

.brand-autoai-desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.82;
}

.nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.5rem 1rem;
}

.nav-group-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.75rem 0.75rem 0.35rem;
}

.nav-link {
  display: block;
  padding: 0.55rem 0.85rem;
  margin: 2px 0;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.nav-link.json-file {
  font-size: 0.82rem;
  opacity: 0.9;
}

.sidebar-contact-wrap {
  padding: 0.65rem 0.85rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-contact-card {
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.sidebar-contact-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.sidebar-contact-avatar {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  background: #475569;
}

.sidebar-contact-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.sidebar-contact-eyebrow {
  font-size: 0.68rem;
  color: #94a3b8;
}

.sidebar-contact-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9;
}

/* 固定小图标，避免 SVG 被全局样式撑大 */
.sidebar-contact-icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  max-width: 26px;
  max-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.sidebar-contact-icon svg {
  display: block;
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  flex: none;
}

.sidebar-contact-icon--phone {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-contact-icon--wechat {
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
}

/* 电话：浅底深字，不用蓝色 */
.sidebar-contact-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  margin-bottom: 0.4rem;
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(203, 213, 225, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar-contact-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(226, 232, 240, 0.4);
}

.sidebar-contact-action-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-contact-action-label {
  font-size: 0.65rem;
  color: #94a3b8;
}

.sidebar-contact-action-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sidebar-contact-wechat {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-contact-wechat-text {
  font-size: 0.72rem;
  color: #bbf7d0;
}

.sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

.sidebar-footer a {
  color: #93c5fd;
  text-decoration: none;
}

.sidebar-footer-sep {
  margin: 0 0.35rem;
  color: rgba(148, 163, 184, 0.7);
}

.sidebar-footer a:hover { text-decoration: underline; }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.topbar-actions a {
  margin-left: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.topbar-actions a.topbar-oltai {
  margin-left: 0;
  margin-right: 0.25rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #ea580c);
  font-weight: 700;
}

.topbar-actions a.topbar-oltai:hover {
  filter: brightness(1.05);
}

.topbar-actions a.topbar-buy {
  margin-left: 0;
  margin-right: 0.25rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  color: #042f2e;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  font-weight: 700;
}

.topbar-actions a.topbar-buy:hover {
  filter: brightness(1.05);
}

.content-wrap {
  flex: 1;
  padding: 1.5rem 2rem 3rem;
  max-width: 1100px;
  width: 100%;
}

.doc-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 2rem 2.25rem;
  min-height: 320px;
}

.doc-loading {
  color: var(--muted);
  text-align: center;
  padding: 3rem;
}

.site-disclaimer {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--muted);
}

.llm-discovery {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 55%, #f8fafc 100%);
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #0f766e;
}

.llm-discovery-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f766e;
}

.llm-discovery-lead {
  margin: 0 0 0.75rem;
  color: #115e59;
  font-size: 0.84rem;
}

.llm-discovery-list {
  margin: 0;
  padding-left: 1.15rem;
}

.llm-discovery-list li {
  margin: 0.35rem 0;
}

.llm-discovery-list a {
  color: #0d9488;
  font-weight: 600;
  text-decoration: none;
}

.llm-discovery-list a:hover {
  text-decoration: underline;
}

.llm-discovery-list code {
  font-size: 0.82rem;
  background: rgba(13, 148, 136, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.site-disclaimer-title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #475569;
}

.site-disclaimer-body p {
  margin: 0 0 0.65rem;
}

.site-disclaimer-body p:last-child {
  margin-bottom: 0;
}

.site-disclaimer-body code {
  font-size: 0.78rem;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.site-disclaimer-accept {
  margin: 0.85rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.78rem;
  color: #64748b;
}

.markdown-body {
  line-height: 1.75;
  font-size: 0.95rem;
}

.markdown-body h1 {
  font-size: 1.75rem;
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 0.4rem;
  margin-top: 0;
}

.markdown-body h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  color: #0f172a;
}

.markdown-body h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
}

.markdown-body a { color: var(--accent); }

.markdown-body code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}

.markdown-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.markdown-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.markdown-body th {
  background: var(--accent-soft);
  font-weight: 600;
}

.markdown-body blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--accent);
  background: #f8fafc;
  color: var(--muted);
}

.markdown-body img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  margin: 1rem 0 1.25rem;
  cursor: zoom-in;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.markdown-body img.doc-img-wide {
  width: 100%;
  max-width: 100%;
}

.doc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.78);
  cursor: zoom-out;
}

.doc-lightbox.open {
  display: flex;
}

.doc-lightbox img {
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  cursor: default;
  background: #fff;
}

.json-view {
  background: #0f172a;
  color: #a5f3fc;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre;
}

.menu-toggle {
  display: none;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    position: fixed;
    left: -100%;
    z-index: 100;
    transition: left 0.25s;
    width: min(85vw, var(--sidebar-w));
  }
  .sidebar.open { left: 0; }
  .menu-toggle { display: inline-block; }
  .content-wrap { padding: 1rem; }
  .doc-card { padding: 1.25rem; }
}
