:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --ink: #0c1322;
  --text: #384152;
  --muted: #6a7384;
  --faint: #9aa2b1;
  --line: #eceef3;
  --line-2: #e1e4eb;

  --accent: #4f46e5;
  --accent-2: #2563eb;
  --accent-ink: #3730a3;
  --accent-soft: #eef1ff;
  --grad: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  --grad-ink: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);

  --ok: #0ba678;
  --ok-soft: #e3f7f0;
  --bad: #e5484d;
  --bad-soft: #fdeced;
  --warn: #d97706;
  --warn-soft: #fdf3e2;
  --block: #ed6a1e;
  --block-soft: #fdeee3;
  --off: #8b94a3;
  --off-soft: #eef0f4;

  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --pill: 999px;

  --xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --sm: 0 2px 6px rgba(16, 24, 40, 0.05), 0 1px 2px rgba(16, 24, 40, 0.04);
  --md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --lg: 0 20px 50px rgba(16, 24, 40, 0.14);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f1c;
  --surface: #121a2e;
  --surface-2: #0d1424;
  --ink: #e6ecf7;
  --text: #aeb8ce;
  --muted: #7c879e;
  --faint: #56607a;
  --line: #1c2740;
  --line-2: #283350;
  --accent: #818cf8;
  --accent-2: #60a5fa;
  --accent-ink: #c7d2fe;
  --accent-soft: #1a2342;
  --ok: #34d399;
  --ok-soft: #0f2e26;
  --bad: #f87171;
  --bad-soft: #3a1a1e;
  --warn: #fbbf24;
  --warn-soft: #3a2a0e;
  --block: #fb923c;
  --block-soft: #3a210e;
  --off: #94a3b8;
  --off-soft: #1c2333;
  --xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --lg: 0 20px 50px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 100% -8%, rgba(99, 102, 241, 0.09), transparent 60%),
    radial-gradient(900px 520px at -8% 2%, rgba(37, 99, 235, 0.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad {
  background: var(--grad-ink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

select,
input[type="search"] {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

select:hover,
input[type="search"]:hover {
  border-color: var(--faint);
}

select:focus,
input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

button {
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

/* ===== 布局 ===== */
.app-shell {
  display: grid;
  grid-template-columns: 268px 1fr;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 26px 20px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 15px;
  color: var(--ink);
}

.brand-text small {
  font-size: 11.5px;
  color: var(--muted);
}

.status-pill {
  margin: 0;
  padding: 9px 14px;
  border-radius: var(--pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(11, 166, 120, 0.2);
  animation: pulse 2.4s var(--ease) infinite;
}

.status-pill.has-warning {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-pill.has-warning::before {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.cats-label {
  margin: 0 0 2px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.cats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.cat:hover {
  background: var(--surface);
  box-shadow: var(--xs);
}

.cat.is-active {
  background: var(--accent-soft);
  border-color: rgba(79, 70, 229, 0.16);
  color: var(--accent-ink);
}

.cat-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cat.is-active .cat-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}

.cat-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
}

.cat-name em {
  font-style: normal;
  margin-right: 2px;
  color: var(--accent);
  font-weight: 600;
}

.cat.is-active .cat-name em {
  color: var(--accent-ink);
}

.cat b {
  min-width: 24px;
  padding: 1px 8px;
  border-radius: var(--pill);
  background: var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cat.is-active b {
  background: #fff;
  color: var(--accent-ink);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.nav-links a {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 13px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.nav-links a:hover {
  background: var(--surface);
  color: var(--ink);
}

/* ===== 主区 ===== */
.main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 30px 34px 52px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sm);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.1), transparent);
  pointer-events: none;
}

.hero-text {
  position: relative;
}

.hero-text h1 {
  font-size: 25px;
}

.hero-sub {
  max-width: 62ch;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.sync-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 216px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sync-row span {
  font-size: 12px;
  color: var(--muted);
}

.sync-row strong {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.sync-card small {
  font-size: 11.5px;
  color: var(--faint);
}

/* ===== 概览数字 ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--xs);
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}

.stat::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--md);
  border-color: rgba(79, 70, 229, 0.22);
}

.stat:hover::after {
  transform: scaleX(1);
}

.stat span {
  font-size: 12px;
  color: var(--muted);
}

.stat strong {
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat.is-good strong {
  color: var(--ok);
}

.stat.is-warn strong {
  color: var(--warn);
}

/* ===== IP 类型分布 ===== */
.dist {
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sm);
}

.dist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dist-head h2 {
  font-size: 16px;
}

.dist-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.dist-row:hover {
  border-color: rgba(79, 70, 229, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--sm);
}

.dist-row.is-active {
  border-color: rgba(79, 70, 229, 0.3);
  background: var(--accent-soft);
}

.dist-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c);
}

.dist-name {
  flex: 0 0 auto;
  width: 70px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.dist-track {
  flex: 1;
  min-width: 60px;
  height: 10px;
  border-radius: var(--pill);
  background: var(--line);
  overflow: hidden;
}

.dist-fill {
  display: block;
  height: 100%;
  border-radius: var(--pill);
  background: var(--c);
  transition: width 0.6s var(--ease);
}

.dist-count {
  flex: 0 0 auto;
  min-width: 34px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dist-pct {
  flex: 0 0 auto;
  min-width: 46px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ===== 信任条 ===== */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--xs);
}

.trust > div {
  padding: 14px 22px;
  border-right: 1px solid var(--line);
}

.trust > div:last-child {
  border-right: none;
}

.trust span {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.trust strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.trust-wide strong {
  font-weight: 500;
  color: var(--text);
}

/* ===== 公告 ===== */
.notice {
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(37, 99, 235, 0.05));
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: var(--r-lg);
}

.notice h2 {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--accent-ink);
}

.notice ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notice li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: var(--text);
}

.notice li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--grad);
}

/* ===== 面板 ===== */
.panel,
.tools,
.guide {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 19px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.result-count {
  font-size: 12.5px;
  color: var(--muted);
}

.panel-note {
  max-width: 42ch;
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
}

button[data-refresh] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

button[data-refresh]:hover {
  border-color: var(--accent);
  color: var(--accent);
}

button[data-refresh]:active {
  transform: scale(0.97);
}

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.f-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.f-search input {
  width: 100%;
}

.filter-bar select {
  min-width: 120px;
}

button[data-filter-reset] {
  margin-left: auto;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

button[data-filter-reset]:hover {
  border-color: var(--faint);
  background: var(--surface);
}

/* ===== 表格 ===== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
}

.data-table {
  width: 100%;
  min-width: 1206px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  width: 144px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
  width: 72px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  width: 156px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
  width: 82px;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
  width: 116px;
}

.data-table th:nth-child(8),
.data-table td:nth-child(8) {
  width: 140px;
}

.data-table th:nth-child(9),
.data-table td:nth-child(9) {
  width: 150px;
}

.data-table th:nth-child(10),
.data-table td:nth-child(10) {
  width: 154px;
}

.data-table th:nth-child(11),
.data-table td:nth-child(11) {
  width: 88px;
  text-align: right;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

.data-table tbody td {
  position: relative;
  padding: 10px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background 0.12s var(--ease);
  cursor: pointer;
}

.data-table tbody tr:hover td {
  background: var(--surface-2);
}

.data-table tbody tr:hover .cell-compare-bar {
  opacity: 1;
}

.cell-compare-bar {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: var(--pill);
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}

tr.is-open td {
  background: var(--accent-soft) !important;
}

.col-compare,
.col-rec {
  width: 52px;
  text-align: center;
}

.cell-check {
  text-align: center;
}

.cell-check input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

.cell-rec {
  text-align: center;
}

.rec {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.dash {
  color: var(--faint);
}

.cell-product {
  min-width: 168px;
}

.prov {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.prov:hover {
  color: var(--accent);
}

.prov-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.cell-note {
  font-size: 12.5px;
  color: var(--muted);
}

.cell-spec {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  line-height: 1.55;
}

.spec-line {
  display: block;
  color: var(--text);
}

.spec-bw {
  color: var(--muted);
}

.spec-empty {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  color: var(--faint);
}

.cell-price {
  white-space: nowrap;
}

.cell-price strong {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13.8px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  white-space: nowrap;
  word-break: keep-all;
}

.cell-status {
  min-width: 0;
}

.cell-status .chip {
  margin: 2px 0;
}

.cell-status .chip + .chip {
  margin-left: 0;
}

.empty-row {
  padding: 40px !important;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* 展开详情行 */
.row-detail td {
  padding: 0 !important;
  background: var(--surface) !important;
  border-bottom: 1px solid var(--line) !important;
}

.row-detail-inner {
  padding: 4px 22px 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 22px;
  margin-top: 6px;
}

.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-grid dt {
  font-size: 11px;
  color: var(--faint);
}

.detail-grid dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.detail-evidence {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
}

.detail-evidence::before {
  content: "证据 ";
  font-weight: 600;
  color: var(--accent);
}

/* ===== 标签 chip ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 8px;
  border-radius: var(--pill);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.7;
  white-space: nowrap;
}

.chip-status::before,
.chip-evidence::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.chip-ip {
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--muted);
}

.chip-ip.is-home {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
}

.chip-ip.is-residential {
  background: #eef2ff;
  color: #4f46e5;
  border-color: transparent;
}

.chip-ip.is-isp {
  background: #f3ecff;
  color: #7c3aed;
  border-color: transparent;
}

.chip-ip.is-native {
  background: #e8f1ff;
  color: #2563eb;
  border-color: transparent;
}

.chip-ip.is-pending {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}

.chip-status.is-available {
  background: var(--ok-soft);
  color: var(--ok);
}

.chip-status.is-unavailable {
  background: var(--off-soft);
  color: var(--off);
}

.chip-status.is-unknown {
  background: var(--warn-soft);
  color: var(--warn);
}

.chip-status.is-blocked {
  background: var(--block-soft);
  color: var(--block);
}

.chip-status.is-error {
  background: var(--bad-soft);
  color: var(--bad);
}

.chip-evidence.is-official {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip-evidence.is-count {
  background: var(--ok-soft);
  color: var(--ok);
}

.chip-evidence.is-snapshot {
  background: var(--warn-soft);
  color: var(--warn);
}

.chip-evidence.is-blocked {
  background: var(--block-soft);
  color: var(--block);
}

.chip-evidence.is-error {
  background: var(--bad-soft);
  color: var(--bad);
}

.chip-evidence.is-unavailable {
  background: var(--off-soft);
  color: var(--off);
}

.chip-evidence.is-unknown {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line-2);
}

.link {
  display: inline-flex;
  min-width: 78px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.link:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.26);
}

.link.is-soft {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--muted);
  box-shadow: none;
}

.link.is-soft:hover {
  background: var(--surface-2);
  border-color: var(--faint);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: none;
}

/* ===== 骨架屏 ===== */
.skel-row td {
  padding: 14px !important;
}

.skel {
  display: block;
  height: 13px;
  border-radius: var(--pill);
  background: linear-gradient(90deg, #e9ebf1 25%, #f3f4f8 37%, #e9ebf1 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

/* ===== 移动端卡片 ===== */
.mobile-cards {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.mobile-product-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--xs);
}

.mobile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-card-head label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.mobile-card-head input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.mobile-product-card h3 {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.mobile-product-card > p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.mobile-product-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin-bottom: 12px;
}

.mobile-product-card dl div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-product-card dt {
  font-size: 11px;
  color: var(--faint);
}

.mobile-product-card dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.mobile-product-card dd strong,
.compare-card dd {
  word-break: keep-all;
}

.mobile-product-card .link {
  display: block;
  text-align: center;
}

/* ===== 对比停靠栏 ===== */
.compare-dock {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.09), rgba(37, 99, 235, 0.06));
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--accent-ink);
}

.compare-dock span {
  margin-right: auto;
}

.compare-dock b {
  font-family: var(--mono);
  font-size: 15px;
}

.compare-dock button {
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
}

.compare-dock button[data-open-compare] {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.24);
}

.compare-dock button[data-open-compare]:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.compare-dock button[data-open-compare]:disabled {
  background: var(--line-2);
  color: var(--faint);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.compare-dock button[data-clear-compare] {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(79, 70, 229, 0.22);
  color: var(--accent-ink);
}

.compare-dock button[data-clear-compare]:hover {
  background: #fff;
}

/* ===== 工具 ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.tool {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tool:hover {
  transform: translateY(-3px);
  box-shadow: var(--sm);
}

.tool-no {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
}

.tool-body {
  min-width: 0;
  flex: 1;
}

.tool-body h3 {
  margin-bottom: 5px;
  font-size: 13.5px;
}

.tool-body code {
  display: block;
  padding: 8px 10px;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--ink);
}

button[data-copy] {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

button[data-copy]:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== 指南 ===== */
.guide {
  padding: 26px 30px;
}

.guide h2 {
  margin-bottom: 14px;
  font-size: 19px;
}

.guide ol {
  display: flex;
  flex-direction: column;
  gap: 11px;
  counter-reset: guide;
}

.guide li {
  position: relative;
  padding-left: 36px;
  font-size: 13.5px;
  color: var(--text);
  counter-increment: guide;
}

.guide li::before {
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  content: counter(guide);
}

/* ===== 对比弹窗 ===== */
.modal {
  width: min(960px, 92vw);
  padding: 0;
  background: var(--surface);
  border: none;
  border-radius: var(--r-xl);
  box-shadow: var(--lg);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(12, 19, 34, 0.5);
  backdrop-filter: blur(3px);
}

.modal[open] {
  animation: dialogIn 0.28s var(--spring);
}

.modal form {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 16px;
}

.modal-head button {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.modal-head button:hover {
  background: var(--line);
  color: var(--ink);
  transform: rotate(90deg);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 14px;
  padding: 22px;
  overflow-y: auto;
}

.compare-card {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.compare-card h3 {
  font-size: 14px;
  color: var(--ink);
}

.compare-card > p {
  margin: 2px 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.compare-card dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
}

.compare-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}

.compare-card dt {
  color: var(--muted);
}

.compare-card dd {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.compare-card .evidence {
  padding: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}

/* ===== 页脚 ===== */
.footer {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 34px 42px;
  color: var(--muted);
  font-size: 12.5px;
}

.footer strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--ink);
}

/* ===== 动画 ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.data-table tbody tr {
  animation: fadeUp 0.32s var(--ease) both;
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .cats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-links {
    flex-direction: row;
    gap: 4px;
    margin-top: 0;
    margin-left: auto;
    padding-top: 0;
    border-top: none;
  }

  .main {
    padding: 22px 16px 44px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust {
    grid-template-columns: 1fr;
  }

  .trust > div {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .trust > div:last-child {
    border-bottom: none;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .table-wrap {
    display: none;
  }

  .mobile-cards {
    display: flex;
  }

  .data-table tbody tr {
    animation: none;
  }
}

/* ===== 视觉特效 ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(440px circle at 16% 24%, rgba(99, 102, 241, 0.1), transparent 60%),
    radial-gradient(540px circle at 84% 66%, rgba(37, 99, 235, 0.08), transparent 60%);
  animation: drift 22s var(--ease) infinite alternate;
}

@keyframes drift {
  to {
    transform: translate3d(-24px, -32px, 0) scale(1.06);
  }
}

.chip-status.is-available::before {
  animation: pulse 2.2s var(--ease) infinite;
}

.tool,
.dist-row {
  position: relative;
  overflow: hidden;
}

.tool::after,
.dist-row::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.45) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease);
}

.tool:hover::after,
.dist-row:hover::after {
  transform: translateX(130%);
}

.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.th-sort:hover {
  color: var(--accent);
}

.th-sort .sort-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}

.th-sort.is-active {
  color: var(--accent);
}

.th-sort.is-active .sort-arrow {
  opacity: 1;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 216px;
}

.ring-card {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  justify-self: end;
}

.ring {
  width: 132px;
  height: 132px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 10;
}

.ring-fg {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 1s var(--ease);
}

.ring-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ring-label strong {
  font-size: 25px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.ring-label span {
  font-size: 11px;
  color: var(--muted);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  box-shadow: var(--md);
  z-index: 50;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  filter: brightness(1.06);
  transform: translateY(-3px);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
