:root {
  --bg: #f4f6fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --ink: #172033;
  --muted: #5f6f86;
  --line: rgba(23, 32, 51, 0.1);
  --accent: #fb7299;
  --accent-deep: #d64b79;
  --cyan: #14b8d4;
  --good: #0f9d58;
  --warn: #f59e0b;
  --bad: #e11d48;
  --shadow: 0 24px 80px rgba(16, 30, 55, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 114, 153, 0.2), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(20, 184, 212, 0.18), transparent 24%),
    linear-gradient(180deg, #fdfcff 0%, #f6f8fc 45%, #edf2f8 100%);
  color: var(--ink);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.page-shell {
  width: min(1580px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 16px 0 72px;
  display: grid;
  grid-template-columns: minmax(236px, 272px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.8)),
    linear-gradient(180deg, rgba(251,114,153,0.08), rgba(72,199,223,0.05));
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
}

.sidebar-panel::-webkit-scrollbar { width: 8px; }
.sidebar-panel::-webkit-scrollbar-thumb {
  background: rgba(23,32,51,0.14);
  border-radius: 999px;
}

.sidebar-block + .sidebar-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 32, 51, 0.08);
}

.sidebar-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-title {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.sidebar-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.sidebar-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-list,
.sidebar-model-list {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(23,32,51,0.08);
  color: var(--muted);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  transform: translateX(2px);
  color: var(--ink);
  border-color: rgba(251,114,153,0.28);
  background: rgba(255,255,255,0.96);
}

.sidebar-link strong {
  font-size: 14px;
  color: inherit;
}

.sidebar-link span {
  font-size: 12px;
  line-height: 1.55;
}

.sidebar-model {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.sidebar-model-copy {
  min-width: 0;
}

.sidebar-rank {
  font-size: 12px;
  font-weight: 700;
  color: rgba(23, 32, 51, 0.46);
}

.sidebar-score {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(251,114,153,0.1);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.content-column {
  min-width: 0;
}

.shell {
  display: grid;
  gap: 34px;
  min-width: 0;
}

.shell > *,
.section,
.panel,
.table-wrap,
.feature-grid,
.tree-grid,
.model-detail-grid {
  min-width: 0;
}

.hero {
  padding: 22px 0 0;
}

.hero-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  border: 1px solid rgba(255,255,255,0.86);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-inner {
  padding: 26px 28px 28px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
  align-items: start;
}

.hero-title {
  margin: 0 0 6px;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 820px;
}

.hero-side {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.hero-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 32, 51, 0.08);
  font-size: 13px;
  color: var(--muted);
  box-shadow: 0 8px 20px rgba(16, 30, 55, 0.06);
}

.hero-chip strong { color: var(--ink); }

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 28px 28px;
}

.hero-nav a {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 32, 51, 0.08);
  color: var(--muted);
  white-space: nowrap;
}

.hero-nav a:hover { color: var(--ink); border-color: rgba(251, 114, 153, 0.36); }

.section {
  scroll-margin-top: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.7;
  font-size: 15px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.82));
  border-radius: 22px;
  border: 1px solid rgba(23, 32, 51, 0.08);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  margin-top: 12px;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 800;
  line-height: 1;
}

.stat-meta {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

thead th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
}

tbody td {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

thead th:nth-child(1),
tbody td:nth-child(1) { width: 92px; }

thead th:nth-child(2),
tbody td:nth-child(2) { width: 250px; }

thead th:nth-child(3),
tbody td:nth-child(3) { width: 148px; }

thead th:nth-child(4),
tbody td:nth-child(4) { width: 330px; }

thead th:nth-child(5),
tbody td:nth-child(5) { width: 110px; }

thead th:nth-child(6),
tbody td:nth-child(6) { width: auto; }

tbody tr:hover td { background: rgba(255,255,255,0.55); }

.rank {
  font-size: 28px;
  font-weight: 800;
  color: rgba(23, 32, 51, 0.3);
}

.model-name {
  font-size: 18px;
  font-weight: 700;
}

.meta-stack {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-chip,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.tag.good { color: var(--good); border-color: rgba(15, 157, 88, 0.22); }
.tag.warn { color: var(--warn); border-color: rgba(245, 158, 11, 0.24); }
.tag.bad { color: var(--bad); border-color: rgba(225, 29, 72, 0.24); }
.tag.pink { color: var(--accent-deep); border-color: rgba(251, 114, 153, 0.28); }

.score-box {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.score-total {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

.score-breakdown {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.startup-copy,
.reason-copy {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.reason-line {
  display: block;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(23, 32, 51, 0.06);
}

.feature-grid {
  display: grid;
  gap: 14px;
}

.feature-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.84));
  border: 1px solid rgba(23, 32, 51, 0.08);
}

.feature-card h3,
.model-detail h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.feature-card p,
.model-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.gallery-switcher {
  display: grid;
  gap: 18px;
}

.gallery-head {
  display: grid;
  gap: 14px;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  background: rgba(255,255,255,0.66);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.gallery-tab:hover,
.gallery-tab.is-active {
  color: var(--ink);
  background: rgba(255,255,255,0.96);
  border-color: rgba(251,114,153,0.28);
  transform: translateY(-1px);
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gallery-density-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(23, 32, 51, 0.08);
}

.gallery-density-label {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.gallery-density-button {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.gallery-density-button:hover,
.gallery-density-button.is-active {
  background: rgba(251,114,153,0.12);
  color: var(--ink);
  transform: translateY(-1px);
}

.gallery-meta-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.gallery-slot-panel {
  display: none;
}

.gallery-slot-panel.is-active {
  display: block;
}

.gallery-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.gallery-switcher[data-density="detail"] .gallery-slot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-card {
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.82));
  border: 1px solid rgba(23, 32, 51, 0.08);
  box-shadow: 0 12px 28px rgba(20, 34, 56, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.gallery-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251,114,153,0.16);
  box-shadow: 0 18px 32px rgba(20, 34, 56, 0.09);
}

.gallery-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.gallery-card-head .model-name {
  font-size: 16px;
  line-height: 1.25;
}

.gallery-card-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.gallery-card-head .subtle-chip {
  flex-shrink: 0;
}

.gallery-thumb {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(244,247,251,0.95), rgba(236,241,248,0.95));
  border: 1px solid rgba(23, 32, 51, 0.08);
}

.gallery-thumb img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  object-position: center top;
  background: #f4f7fb;
}

.gallery-switcher[data-density="detail"] .gallery-thumb img {
  height: 220px;
}

.gallery-card-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.gallery-card-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.gallery-evidence {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-switcher[data-density="detail"] .gallery-evidence {
  -webkit-line-clamp: 4;
}

.tree-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tree-card {
  padding: 20px 22px;
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.arch-section {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(23, 32, 51, 0.08);
}

.arch-section strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.arch-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 14px;
}

.tree-card pre {
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: #0f1728;
  color: #dce7ff;
  overflow: auto;
  font-size: 13px;
  line-height: 1.6;
}

.model-detail-grid {
  display: grid;
  gap: 20px;
}

.model-detail {
  padding: 22px 24px;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  background: rgba(255,255,255,0.72);
}

.detail-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.score-bars {
  display: grid;
  gap: 10px;
}

.score-bar {
  display: grid;
  gap: 6px;
}

.score-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.track {
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
  overflow: hidden;
}

.track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.method-card {
  padding: 22px 24px;
}

.method-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 32, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal.open { display: flex; }

.modal img {
  max-width: min(96vw, 1440px);
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.4);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subtle-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.64);
  border: 1px solid rgba(23,32,51,0.08);
}

@media (max-width: 1180px) {
  .page-shell,
  .hero-inner,
  .detail-columns,
  .method-grid,
  .tree-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100vw - 24px, 1680px);
  }

  .sidebar-panel {
    position: relative;
    top: auto;
    max-height: none;
  }

  table {
    table-layout: auto;
    min-width: 1180px;
  }

  .gallery-slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-switcher[data-density="detail"] .gallery-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero-inner,
  .hero-nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-nav a { padding: 10px 12px; border-radius: 14px; }
  .panel { border-radius: 22px; }
  .tree-card pre { font-size: 12px; }
  .arch-grid { grid-template-columns: 1fr; }
  .page-shell { width: min(100vw - 16px, 1580px); }
  .gallery-slot-grid { grid-template-columns: 1fr; }
  .gallery-switcher[data-density="detail"] .gallery-slot-grid { grid-template-columns: 1fr; }
  .gallery-thumb img { height: 210px; }
  .gallery-switcher[data-density="detail"] .gallery-thumb img { height: 240px; }
  .gallery-controls { align-items: flex-start; }
}
