/* 模桥 Arena：克制的渐变透明与交互。主色石墨 #1F2937，点睛 #22C55E。 */
.site-chrome {
  --mq-glass-h: 92px;
}
.site-chrome::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--mq-glass-h);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(255, 255, 255, 0.52) 52%,
    rgba(255, 255, 255, 0.00) 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 100%);
  transition: background .28s ease, height .28s ease, opacity .28s ease;
}
html[data-theme="dark"] .site-chrome::before {
  background: linear-gradient(
    to bottom,
    rgba(17, 24, 39, 0.88) 0%,
    rgba(17, 24, 39, 0.48) 52%,
    rgba(17, 24, 39, 0.00) 100%
  );
}
.site-chrome.is-condensed {
  --mq-glass-h: 84px;
}
.site-chrome.is-condensed::before {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(255, 255, 255, 0.70) 58%,
    rgba(255, 255, 255, 0.00) 100%
  );
  -webkit-backdrop-filter: blur(22px) saturate(1.32);
  backdrop-filter: blur(22px) saturate(1.32);
}
html[data-theme="dark"] .site-chrome.is-condensed::before {
  background: linear-gradient(
    to bottom,
    rgba(17, 24, 39, 0.94) 0%,
    rgba(17, 24, 39, 0.66) 58%,
    rgba(17, 24, 39, 0.00) 100%
  );
}
/* 让渐变层承担玻璃，避免实心底把透明吃掉 */
.site-chrome.is-condensed .nav {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.site-chrome.is-condensed .nav-inner {
  position: relative;
}
.site-chrome.is-condensed .nav-inner:after {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(31, 41, 55, .12), transparent);
  pointer-events: none;
}
html[data-theme="dark"] .site-chrome.is-condensed .nav-inner:after {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, .12), transparent);
}

/* 按钮与卡片：轻微抬起 + 边缘光泽，不用弹簧 */
.nav-cta,
.btn-primary,
.archive-download {
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, filter .22s ease;
}
.nav-cta::after,
.btn-primary::after,
.archive-download::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.18) 42%, transparent 68%);
  transform: translateX(-120%);
  transition: transform .45s ease;
  pointer-events: none;
}
.nav-cta:hover,
.btn-primary:hover,
.archive-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -12px rgba(31, 41, 55, .45);
}
.nav-cta:hover::after,
.btn-primary:hover::after,
.archive-download:hover::after {
  transform: translateX(120%);
}
.nav-ghost {
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.nav-ghost:hover { transform: translateY(-1px); }

.model-card,
.rank-card,
.benefit-card,
.cta-band,
.code-panel {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.model-card:hover,
.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -24px rgba(31, 41, 55, .35);
  border-color: color-mix(in srgb, #22C55E 28%, var(--line, #E5E7EB));
}

/* 区块入场：短位移淡入 */
.page-shell .page-wrap > *,
.page-shell .sq-layout,
.page-shell .sq-head {
  animation: mq-rise .48s cubic-bezier(.22, .61, .36, 1) both;
}
.page-shell .page-wrap > *:nth-child(2) { animation-delay: .05s; }
.page-shell .page-wrap > *:nth-child(3) { animation-delay: .1s; }
.page-shell .page-wrap > *:nth-child(4) { animation-delay: .15s; }
.page-shell .model-card {
  animation: mq-rise .42s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes mq-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-chrome::before,
  .nav-cta, .btn-primary, .archive-download, .nav-ghost,
  .model-card, .rank-card {
    transition: none !important;
  }
  .nav-cta::after, .btn-primary::after, .archive-download::after { display: none; }
  .page-shell .page-wrap > *,
  .page-shell .model-card,
  .page-shell .sq-layout,
  .page-shell .sq-head {
    animation: none !important;
  }
  .nav-cta:hover, .btn-primary:hover, .model-card:hover { transform: none; }
}


/* ——— 排版层级：标题更稳，正文更疏，数字更清 ——— */
html, body {
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.006em;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}
.page-title,
.home-hero h1 {
  letter-spacing: -0.042em;
  line-height: 1.08;
  font-weight: 750;
  color: var(--ink);
  text-wrap: balance;
}
.page-lead,
.home-hero .page-lead,
.section-block .sub {
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  max-width: 42rem;
}
.section-block h2 {
  letter-spacing: -0.032em;
  line-height: 1.15;
  font-weight: 720;
}
.kicker {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 650;
}
.tiny, .price-note, .sq-filters .hint, .card-meta {
  letter-spacing: 0.01em;
  line-height: 1.55;
}
.footer-brand-text strong {
  letter-spacing: -0.04em;
}
.footer-cols h5 {
  letter-spacing: 0.1em;
}
.foot-bar { letter-spacing: 0.02em; }

/* 模型卡片：左侧 Logo + 名称，不挤压标价 */
.model-card {
  padding: 18px 18px 16px;
  gap: 12px;
}
.model-card-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}
.model-card-id {
  min-width: 0;
  flex: 1;
  text-align: left;
}
.model-logo {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #F3F4F6;
  display: grid;
  place-items: center;
  overflow: hidden;
}
html[data-theme="dark"] .model-logo { background: #F3F4F6; }
.model-logo img,
.model-logo svg {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}
.model-logo img[src*="glm.svg"] {
  width: 28px;
  height: 28px;
}
.model-logo.is-letter {
  background: #1F2937;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}
.model-card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-card .maker {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
}
.model-card .desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  min-height: 3.2em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.price-row {
  padding: 12px 0;
  gap: 10px;
}
.price-row dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 3px;
}
.price-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "kern" 1;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
}
.model-card .tiny {
  line-height: 1.5;
}

/* 排行榜行：模型 Logo 与名称对齐 */
.board-row {
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  padding: 10px 0;
  align-items: center;
}
.board-model {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.board-model .model-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.board-model .model-logo img { width: 16px; height: 16px; }
.board-row .name {
  font-size: 13.5px;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-row .vol {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
  font-size: 13.5px;
}
.rank-total b {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  font-weight: 720;
}
.rank-tabs button {
  letter-spacing: 0.01em;
}
.sq-head .page-lead { margin-left: auto; margin-right: auto; }

/* 间距节奏 */
.sq-head { padding: 8px 0 32px; }
.section-block { padding: 88px 0; }
.page-shell { padding: 104px 0 88px; }

/* 焦点环与过渡：克制、清晰 */
:focus-visible {
  outline: 2px solid #22C55E;
  outline-offset: 2px;
  border-radius: 6px;
}
.nav-links a:focus-visible,
.nav-cta:focus-visible,
.nav-ghost:focus-visible,
.theme-toggle:focus-visible {
  outline-offset: 3px;
}
a, button, .model-card, .rank-card {
  transition-timing-function: ease;
}
.footer-cols a {
  transition: color .2s ease, transform .2s ease;
}
.footer-cols a:hover {
  color: var(--ink);
}
.seg button,
.filter-pills button,
.vendor-row,
.rank-tabs button {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.sq-search {
  transition: border-color .2s ease, box-shadow .2s ease;
}
.sq-search:focus-within {
  border-color: color-mix(in srgb, #22C55E 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, #22C55E 16%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  a, button, .model-card, .rank-card, .footer-cols a, .sq-search {
    transition: none !important;
  }
}


/* ——— 把竞技场交互语言铺到整站公开页：入场、hover 光泽、列表细腻度 ——— */
.page-shell .home-hero,
.page-shell .section-block,
.page-shell .cta-band,
.page-shell .sq-head,
.page-shell .sq-layout,
.page-shell .rank-tabs,
.page-shell .rank-card,
.model-index-main .arena-home-hero {
  animation: mq-rise .5s cubic-bezier(.22, .61, .36, 1) both;
}
.page-shell .section-block:nth-of-type(2),
.page-shell .rank-card:nth-of-type(2) { animation-delay: .06s; }
.page-shell .section-block:nth-of-type(3),
.page-shell .rank-card:nth-of-type(3) { animation-delay: .12s; }
.page-shell .section-block:nth-of-type(4),
.page-shell .cta-band { animation-delay: .16s; }

.info-card,
.code-panel,
.tool-grid > *,
.sq-filters,
.benefit-card {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.info-card:hover,
.code-panel:hover,
.benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -24px rgba(31, 41, 55, .35);
  border-color: color-mix(in srgb, #22C55E 28%, var(--line, #E5E7EB));
}

/* 卡片与次按钮：与 Arena CTA 同一道光泽扫过 */
.model-card,
.rank-card,
.info-card,
.btn-secondary {
  position: relative;
  overflow: hidden;
}
.model-card::after,
.rank-card::after,
.info-card::after,
.btn-secondary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.16) 42%, transparent 68%);
  transform: translateX(-120%);
  transition: transform .5s ease;
  pointer-events: none;
}
.model-card:hover::after,
.rank-card:hover::after,
.info-card:hover::after,
.btn-secondary:hover::after {
  transform: translateX(120%);
}
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -12px rgba(31, 41, 55, .28);
}

/* 排行榜行、筛选与分段控件 */
.board-row {
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
  border-radius: 8px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}
.board-row:hover {
  background: color-mix(in srgb, #22C55E 6%, transparent);
}
.author-row {
  transition: background-color .2s ease;
  border-radius: 8px;
}
.author-row:hover {
  background: color-mix(in srgb, #1F2937 5%, transparent);
}
.filter-pills button:hover,
.seg button:hover,
.rank-tabs button:hover,
.vendor-row:hover {
  transform: translateY(-1px);
}
.filter-pills button,
.seg button,
.rank-tabs button,
.vendor-row,
.nav-links a {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.sq-search:hover {
  border-color: color-mix(in srgb, #1F2937 18%, var(--line, #E5E7EB));
}

/* 页内链接克制下划线过渡 */
.page-shell a:not(.nav-cta):not(.nav-ghost):not(.btn-primary):not(.btn-secondary):not(.brand) {
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .page-shell .home-hero,
  .page-shell .section-block,
  .page-shell .cta-band,
  .page-shell .sq-head,
  .page-shell .sq-layout,
  .page-shell .rank-tabs,
  .page-shell .rank-card,
  .model-index-main .arena-home-hero {
    animation: none !important;
  }
  .info-card, .code-panel, .btn-secondary, .board-row {
    transition: none !important;
  }
  .model-card::after, .rank-card::after, .info-card::after, .btn-secondary::after { display: none; }
  .info-card:hover, .code-panel:hover, .btn-secondary:hover { transform: none; }
}
