:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #697386;
  --subtle: #98a2b3;
  --line: #e6e9ef;
  --line-strong: #d8dde6;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --accent: #155eef;
  --accent-soft: #eef4ff;
  --success: #087a55;
  --success-soft: #eafbf3;
  --max-width: 1240px;
}

* { box-sizing: border-box; }
html { background: #fff; scroll-behavior: smooth; }
body.pricing-page {
  min-width: 320px;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pricing-page a { color: inherit; text-decoration: none; }
.pricing-page button, .pricing-page input, .pricing-page select { font: inherit; }
.pricing-page [hidden] { display: none !important; }
.pricing-shell { width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; }

.pricing-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid rgba(230, 233, 239, .9);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}
.pricing-nav { display: flex; height: 68px; align-items: center; gap: 34px; }
.pricing-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; font-size: 16px; font-weight: 760; }
.pricing-brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.pricing-nav-links { display: flex; align-items: stretch; gap: 26px; height: 100%; margin-left: auto; color: var(--muted); font-size: 14px; }
.pricing-nav-links a { position: relative; display: inline-flex; align-items: center; }
.pricing-nav-links a:hover, .pricing-nav-links a.active { color: var(--ink); }
.pricing-nav-links a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--ink); content: ""; }
.pricing-nav-actions { display: flex; gap: 9px; }
.pricing-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 13px; font-weight: 650; }
.pricing-button:hover { border-color: #b8c0cc; background: var(--surface-soft); }
.pricing-button.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.pricing-button.primary:hover { background: #273142; }

.pricing-intro { padding-top: 30px; }
.pricing-eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .12em; }
.pricing-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.pricing-title-row h1 { margin: 0; font-size: 38px; font-weight: 760; letter-spacing: 0; line-height: 1.14; }
.pricing-title-row > div:first-child > p { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.official-price-note { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding-bottom: 4px; }
.verified-dot { width: 9px; height: 9px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 5px var(--success-soft); }
.official-price-note div { display: grid; gap: 2px; }
.official-price-note strong { font-size: 13px; }
.official-price-note small { color: var(--subtle); font-size: 11px; }

.pricing-search { position: relative; display: flex; height: 48px; align-items: center; margin-top: 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(16, 24, 40, .04); }
.pricing-search:focus-within { border-color: #84adff; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: relative; width: 17px; height: 17px; margin-left: 17px; border: 1.8px solid #8b95a5; border-radius: 50%; }
.search-icon::after { position: absolute; right: -4px; bottom: -3px; width: 6px; height: 1.8px; transform: rotate(45deg); border-radius: 2px; background: #8b95a5; content: ""; }
.pricing-search input { width: 100%; height: 100%; min-width: 0; padding: 0 46px 0 13px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.pricing-search input::placeholder { color: #9aa3b1; }
.pricing-search kbd { position: absolute; right: 14px; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: var(--subtle); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }

.pricing-workspace { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 30px; padding-top: 22px; padding-bottom: 72px; }
.pricing-filters { position: sticky; top: 94px; align-self: start; padding-right: 4px; }
.filter-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.filter-heading > div { display: grid; gap: 4px; }
.filter-heading strong, .price-rules > strong { font-size: 13px; }
.filter-heading span { color: var(--subtle); font-size: 11px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.text-button:hover { color: var(--accent); }
.provider-filters { display: grid; gap: 5px; margin-top: 16px; }
.provider-filter { display: flex; width: 100%; height: 37px; align-items: center; justify-content: space-between; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.provider-filter:hover { background: var(--surface-soft); color: var(--ink); }
.provider-filter.active { border-color: var(--line); background: var(--surface-soft); color: var(--ink); font-weight: 650; }
.provider-filter span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.provider-filter i { width: 8px; height: 8px; border-radius: 2px; background: var(--provider-color, #667085); }
.provider-filter b { min-width: 24px; padding: 2px 6px; border-radius: 999px; background: #eef0f3; color: #737d8c; font-size: 10px; font-weight: 650; text-align: center; }
.filter-divider { height: 1px; margin: 25px 0; background: var(--line); }
.price-rules dl { display: grid; gap: 10px; margin: 14px 0 0; }
.price-rules dl div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-rules dt, .price-rules dd { margin: 0; font-size: 11px; }
.price-rules dt { color: var(--muted); }
.price-rules dd { color: var(--ink); font-weight: 650; }
.filter-footnote { margin: 22px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.7; }

.pricing-results { min-width: 0; }
.results-toolbar { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.results-toolbar > div { display: flex; align-items: baseline; gap: 10px; }
.results-toolbar strong { font-size: 14px; }
.results-toolbar > div span { color: var(--subtle); font-size: 11px; }
.sort-control { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.sort-control select { height: 32px; padding: 0 28px 0 9px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fff; color: var(--ink); font-size: 12px; }
.sort-control select:focus { border-color: #84adff; }

.pricing-status { display: flex; min-height: 260px; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.pricing-status.error { color: #b42318; }
.loading-spinner { width: 16px; height: 16px; border: 2px solid #d9dee7; border-top-color: var(--accent); border-radius: 50%; animation: pricing-spin .8s linear infinite; }
@keyframes pricing-spin { to { transform: rotate(360deg); } }

.official-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 18px; }
.official-model-card { display: flex; min-width: 0; min-height: 250px; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.official-model-card:hover { transform: translateY(-1px); border-color: #cfd5df; box-shadow: 0 10px 26px rgba(16, 24, 40, .06); }
.model-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.model-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.provider-logo { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 8px; background: var(--provider-soft, #f2f4f7); }
.provider-logo img { width: 30px; height: 30px; object-fit: contain; }
.model-identity > div { min-width: 0; }
.model-identity h2 { margin: 0; overflow: hidden; color: var(--ink); font: 720 15px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.model-identity p { margin: 4px 0 0; color: var(--subtle); font-size: 10px; }
.model-badge { display: inline-flex; margin-right: 4px; padding: 1px 6px; border-radius: 4px; background: var(--provider-soft, #f2f4f7); color: var(--provider-color, #475467); font-weight: 700; }
.copy-model { position: relative; width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.copy-model::before, .copy-model::after { position: absolute; width: 9px; height: 9px; border: 1.3px solid #7a8492; border-radius: 2px; content: ""; }
.copy-model::before { top: 8px; left: 8px; }
.copy-model::after { top: 11px; left: 11px; background: #fff; }
.copy-model:hover { border-color: #b9c1cd; background: var(--surface-soft); }
.copy-model.copied::before { width: 10px; height: 5px; transform: rotate(-45deg); border-width: 0 0 1.5px 1.5px; border-color: var(--success); border-radius: 0; }
.copy-model.copied::after { display: none; }
.headline-prices { display: flex; min-height: 40px; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin-top: 14px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfd; }
.headline-price { display: inline-flex; min-width: 0; align-items: baseline; gap: 4px; }
.headline-price small { color: var(--muted); font-size: 10px; }
.headline-price strong { color: var(--ink); font-size: 13px; font-weight: 760; }
.headline-price em { color: var(--subtle); font-size: 9px; font-style: normal; }
.model-description { min-height: 42px; margin: 14px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.model-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.channel-area { min-width: 0; }
.channel-label { display: block; margin-bottom: 6px; color: var(--subtle); font-size: 9px; }
.channel-list { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; }
.channel-pill { max-width: 112px; overflow: hidden; padding: 3px 7px; border-radius: 5px; background: var(--surface-soft); color: #475467; font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.channel-health { display: flex; height: 22px; flex: 0 0 auto; align-items: center; }
.channel-health b { padding: 3px 7px; border-radius: 5px; background: var(--success-soft); color: var(--success); font-size: 9px; font-weight: 700; }
.provider-openai { --provider-color: #111827; --provider-soft: #f0f2f4; }
.provider-anthropic { --provider-color: #c25d35; --provider-soft: #fff2ec; }
.provider-grok { --provider-color: #111827; --provider-soft: #f0f2f4; }
.provider-gemini { --provider-color: #1769e0; --provider-soft: #edf4ff; }
.provider-kimi { --provider-color: #155eef; --provider-soft: #eef4ff; }
.provider-deepseek { --provider-color: #6941c6; --provider-soft: #f4f0ff; }
.provider-glm { --provider-color: #087a55; --provider-soft: #eafbf3; }

.pricing-footer { border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; }
.footer-inner { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 24px; }
.footer-inner div { display: flex; gap: 20px; }
.footer-inner a:hover { color: var(--ink); }

@media (max-width: 1050px) {
  .official-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .pricing-shell { width: min(calc(100% - 28px), var(--max-width)); }
  .pricing-nav { height: 62px; gap: 14px; }
  .pricing-nav-links { display: none; }
  .pricing-nav-actions { margin-left: auto; }
  .pricing-button.secondary { display: none; }
  .pricing-intro { padding-top: 26px; }
  .pricing-title-row { display: block; }
  .pricing-title-row h1 { font-size: 34px; }
  .official-price-note { margin-top: 22px; }
  .pricing-search { margin-top: 20px; }
  .pricing-workspace { display: block; padding-top: 20px; }
  .pricing-filters { position: static; padding: 0; }
  .filter-heading, .filter-divider, .price-rules, .filter-footnote { display: none; }
  .provider-filters { display: flex; margin: 0 0 20px; padding-bottom: 4px; overflow-x: auto; }
  .provider-filter { width: auto; flex: 0 0 auto; }
  .results-toolbar { align-items: flex-start; }
  .results-toolbar > div { display: grid; gap: 4px; }
  .official-model-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (max-width: 420px) {
  .pricing-brand span { display: none; }
  .official-model-card { min-height: 242px; }
  .sort-control > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
