:root {
  --bg: #090b09;
  --surface: #111511;
  --soft: #171e17;
  --elevated: #1e271e;
  --ink: #f1f6ec;
  --muted: #93a28e;
  --line: #253124;
  --accent: #c9f807;
  --accent-bright: #ebfa04;
  --on-accent: #090d07;
  --positive: #5ce68a;
  --warning: #facc15;
  --danger: #f87171;
  --radius: 16px;
  font: 15.5px/1.65 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f7f1;
  --surface: #ffffff;
  --soft: #ebefe4;
  --elevated: #e0e7d6;
  --ink: #10160f;
  --muted: #586454;
  --line: #d4decc;
  --accent: #527a00;
  --accent-bright: #c9f807;
  --on-accent: #ffffff;
  --positive: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
code, pre { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; }
h1, h2, h3, h4, p { margin: 0; }

.pub-wrap { max-width: 1240px; margin: 0 auto; padding: 0 22px; }

/* 顶栏 */
.pub-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 70px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}
.pub-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pub-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; flex-shrink: 0; }
.pub-brand img { width: 34px; height: 34px; object-fit: contain; }
.pub-brand em { font-style: normal; color: var(--accent); margin-left: 2px; }

.pub-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.pub-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .88rem;
  color: var(--muted);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.pub-nav a:hover { color: var(--ink); background: var(--soft); }
.pub-nav a.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  font-weight: 600;
}

.pub-header-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .12s, border-color .15s, filter .15s;
}
.pub-btn:hover { transform: translateY(-1px); }
.pub-btn-primary {
  background: linear-gradient(135deg, #ebfa04 0%, #c9f807 55%, #9ef006 100%);
  color: #090d07;
  box-shadow: 0 8px 24px rgba(201, 248, 7, 0.20);
}
:root[data-theme="light"] .pub-btn-primary {
  background: #10160f;
  color: #d4fc07;
  box-shadow: 0 8px 20px rgba(16, 22, 15, 0.16);
}
.pub-btn-secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.pub-btn-secondary:hover { border-color: var(--accent); }
.pub-btn-ghost {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.pub-btn-ghost:hover { color: var(--ink); border-color: var(--accent); }
.pub-btn-lg { padding: 12px 22px; font-size: .95rem; border-radius: 12px; }
.pub-btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: 8px; }

/* 首屏 Hero */
.pub-hero {
  position: relative;
  padding: 52px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(620px 300px at 14% 0%, rgba(201, 248, 7, 0.11), transparent 70%),
    radial-gradient(520px 280px at 88% 12%, rgba(92, 230, 138, 0.08), transparent 70%);
}
.pub-hero-grid { display: grid; grid-template-columns: 1.22fr .9fr; gap: 28px; align-items: start; }
.pub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  margin-bottom: 16px;
}
.pub-hero h1 { font-size: clamp(1.9rem, 3.3vw, 2.75rem); line-height: 1.2; letter-spacing: -.035em; font-weight: 800; }
.pub-hero h1 span { color: var(--accent); }
.pub-hero-sub { margin-top: 14px; font-size: 1.02rem; color: var(--muted); max-width: 650px; }
.pub-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pub-bonus-note {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  color: var(--positive);
  background: color-mix(in srgb, var(--positive) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--positive) 28%, var(--line));
  padding: 6px 12px;
  border-radius: 10px;
}

.pub-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.pub-kpi-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.pub-kpi-box strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.pub-kpi-box span { font-size: .78rem; color: var(--muted); }

/* 测速面板 */
.pub-speed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .28);
}
.pub-speed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pub-speed-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--positive);
}
.pub-dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 8px var(--positive); }
.pub-endpoint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.pub-endpoint-row code { font-size: .86rem; color: var(--accent); word-break: break-all; }
.pub-speed-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pub-speed-cell {
  background: var(--soft);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.pub-speed-cell small { display: block; font-size: .72rem; color: var(--muted); }
.pub-speed-cell strong { font-size: 1.05rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.pub-speed-list { display: grid; gap: 7px; font-size: .82rem; color: var(--muted); }
.pub-speed-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.pub-speed-item strong { color: var(--ink); font-weight: 600; }

/* 通用板块 */
.pub-section { padding: 48px 0; border-bottom: 1px solid var(--line); }
.pub-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pub-sec-head h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.025em; }
.pub-sec-head p { color: var(--muted); font-size: .92rem; margin-top: 4px; max-width: 720px; }

/* 双端枢纽卡片 */
.pub-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.pub-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pub-card p { color: var(--muted); font-size: .9rem; }
.pub-ul { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 7px; font-size: .88rem; color: var(--ink); }
.pub-ul li::marker { color: var(--accent); }

/* 筛选条与选型矩阵 */
.pub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.pub-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pub-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--bg);
}
.pub-pill:hover { border-color: var(--accent); color: var(--ink); }
.pub-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.pub-filters-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub-input, .pub-select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: .86rem;
  min-width: 170px;
}
.pub-input:focus, .pub-select:focus { outline: 2px solid var(--accent); border-color: transparent; }

.pub-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}
.pub-table { width: 100%; border-collapse: collapse; min-width: 820px; font-size: .88rem; }
.pub-table th, .pub-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.pub-table th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--soft); white-space: nowrap; }
.pub-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.pub-table tbody tr:last-child td { border-bottom: 0; }

.pub-model-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.pub-model-title { font-weight: 700; color: var(--ink); display: block; }
.pub-model-title:hover { color: var(--accent); text-decoration: underline; }
.pub-model-id { font-size: .76rem; color: var(--muted); font-family: monospace; }
.pub-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .74rem;
  font-weight: 600;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  margin: 2px 4px 2px 0;
  white-space: nowrap;
}
.pub-tag.accent {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}
.pub-tag.ok {
  color: var(--positive);
  background: color-mix(in srgb, var(--positive) 11%, var(--surface));
  border-color: color-mix(in srgb, var(--positive) 28%, var(--line));
}
.pub-price-strong { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pub-price-sub { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }

/* 厂商 SVG badge（复刻控制台质感） */
.vendor-logo-tile {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.vendor-logo-tile.sm { width: 28px; height: 28px; border-radius: 7px; }
.vendor-logo-tile.lg { width: 46px; height: 46px; border-radius: 12px; }
.vendor-svg { width: 19px; height: 19px; }
.vendor-logo-tile.sm .vendor-svg { width: 16px; height: 16px; }
.vendor-logo-tile.lg .vendor-svg { width: 26px; height: 26px; }

/* 全模型卡片网格 */
.pub-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pub-model-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, transform .15s;
}
.pub-model-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pub-mc-head { display: flex; align-items: center; gap: 10px; }
.pub-mc-head h3 { font-size: .98rem; line-height: 1.3; }
.pub-mc-desc { font-size: .83rem; color: var(--muted); line-height: 1.55; flex: 1; }
.pub-mc-price { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: .85rem; }
.pub-mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); }

/* 专题页 & 文档页 */
.pub-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .84rem; color: var(--muted); margin-bottom: 18px; }
.pub-breadcrumb a:hover { color: var(--accent); }
.pub-detail-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.pub-detail-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 18px; margin-top: 18px; }
.pub-code {
  background: #070a07;
  color: #e6f3dd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: .82rem;
  line-height: 1.55;
  margin: 10px 0 0;
}
.pub-docs-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.pub-docs-aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  position: sticky;
  top: 86px;
  display: grid;
  gap: 4px;
}
.pub-docs-aside a {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: .88rem;
  color: var(--muted);
}
.pub-docs-aside a:hover { background: var(--soft); color: var(--ink); }
.pub-docs-aside a.active {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-weight: 700;
}

.pub-security-banner {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--radius);
  padding: 22px;
}

/* 页脚 */
.pub-footer { padding: 34px 0 46px; font-size: .84rem; color: var(--muted); }
.pub-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 20px; }
.pub-footer h4 { color: var(--ink); margin-bottom: 10px; font-size: .9rem; }
.pub-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.pub-footer a:hover { color: var(--accent); }
.pub-footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.pub-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 600;
  z-index: 90;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

@media (max-width: 980px) {
  .pub-hero-grid, .pub-hub-grid, .pub-detail-grid, .pub-docs-grid, .pub-footer-grid { grid-template-columns: 1fr; }
  .pub-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-docs-aside { position: static; }
}
@media (max-width: 680px) {
  .pub-header { height: auto; padding: 10px 0; }
  .pub-header-inner { flex-wrap: wrap; }
  .pub-nav { order: 3; width: 100%; padding-top: 4px; }
  .pub-model-grid { grid-template-columns: 1fr; }
}
