:root {
  --paper: #f2eee6;
  --paper-deep: #e9e3d8;
  --ink: #20221f;
  --muted: #77756d;
  --faint: #a6a39b;
  --line: #d7d1c6;
  --line-strong: #c3bbae;
  --accent: #df5b37;
  --accent-deep: #b63d26;
  --mint: #3b8068;
  --mint-bg: #dcebe2;
  --amber: #a86927;
  --amber-bg: #f6e6ca;
  --slate: #686b68;
  --slate-bg: #e5e5df;
  --card: #fbfaf7;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(54, 48, 37, 0.055);
  color: var(--ink);
  background: var(--paper);
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  content: '';
  background-image: radial-gradient(rgba(70, 62, 49, .14) .65px, transparent .65px);
  background-size: 9px 9px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}
a { color: inherit; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(223, 91, 55, .38); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 8px 13px;
  color: var(--card);
  background: var(--ink);
  border-radius: 7px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.page-shell { width: min(1160px, calc(100% - 64px)); margin: 0 auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { display: inline-flex; width: 29px; height: 29px; align-items: center; justify-content: center; color: #fff3e8; border-radius: 8px; background: var(--accent); font-family: Manrope, sans-serif; font-size: .62rem; font-weight: 800; letter-spacing: -.08em; }
.brand-name { font-family: Manrope, sans-serif; font-size: 1.15rem; font-weight: 800; letter-spacing: -.06em; }
.header-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-family: 'DM Mono', monospace; font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; }
.header-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(59, 128, 104, .12); }

.directory { padding: 52px 0 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 30px; }
h1 { margin: 0; font-family: Manrope, 'Noto Sans SC', sans-serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.08em; line-height: 1.05; }
.category-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-strong); }
.category-tab { position: relative; display: flex; gap: 9px; align-items: baseline; padding: 0 26px 15px 0; margin-right: 26px; color: var(--faint); background: transparent; border: 0; cursor: pointer; font-size: .9rem; transition: color .2s ease; }
.category-tab::after { position: absolute; right: 26px; bottom: -1px; left: 0; height: 2px; background: transparent; content: ''; transition: background .2s ease; }
.category-tab:hover, .category-tab.is-active { color: var(--ink); }
.category-tab.is-active::after { background: var(--accent); }
.category-tab small { color: var(--faint); font-family: 'DM Mono', monospace; font-size: .59rem; }
.category-tab.is-active small { color: var(--accent); }

.filter-bar { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.search-box { display: flex; flex: 1; min-width: 220px; max-width: 390px; gap: 11px; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); transition: border-color .2s ease, box-shadow .2s ease; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(223, 91, 55, .08); }
.search-box input { width: 100%; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: .77rem; }
.search-box input::placeholder { color: var(--faint); }
kbd { padding: 3px 5px; color: var(--faint); border: 1px solid var(--line); border-radius: 4px; font-family: 'DM Mono', monospace; font-size: .57rem; }
.select-group { display: flex; gap: 8px; align-items: center; }
.select-wrap { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .69rem; white-space: nowrap; }
.select-wrap select { padding: 8px 28px 8px 10px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; outline: 0; cursor: pointer; font-size: .72rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 11px) 50%, calc(100% - 7px) 50%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.select-wrap select:hover, .select-wrap select:focus { border-color: var(--accent); }
.list-meta { display: flex; justify-content: space-between; align-items: center; min-height: 46px; }
.list-meta p { margin: 0; color: var(--muted); font-family: 'DM Mono', monospace; font-size: .62rem; letter-spacing: .04em; }
.clear-button { padding: 5px 0; color: var(--accent-deep); background: transparent; border: 0; cursor: pointer; font-size: .69rem; }
.clear-button span { display: inline-block; margin-left: 4px; font-size: 1rem; line-height: 0; }
.is-hidden { display: none !important; }

.provider-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.provider-card { display: flex; flex-direction: column; width: 100%; max-width: 360px; min-width: 0; min-height: 218px; padding: 21px 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 5px 18px rgba(54, 48, 37, .035); animation: reveal .4s both; animation-delay: calc(var(--card-index) * 45ms); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.provider-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.provider-topline { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.name-line { display: flex; gap: 9px; align-items: center; min-width: 0; flex-wrap: wrap; }
.name-line h3 { margin: 0; font-family: Manrope, 'Noto Sans SC', sans-serif; font-size: 1.08rem; font-weight: 800; letter-spacing: -.055em; }
.status-badge { display: inline-flex; gap: 5px; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: .61rem; font-weight: 600; line-height: 1; white-space: nowrap; }
.status-badge > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-recommended { color: var(--mint); background: var(--mint-bg); }
.status-average { color: var(--amber); background: var(--amber-bg); }
.status-not-recommended { color: var(--accent-deep); background: #f6dcd3; }
.status-unknown { color: var(--slate); background: var(--slate-bg); }
.provider-rating { color: var(--amber); font-size: .72rem; letter-spacing: .04em; line-height: 1; white-space: nowrap; }
.rate-row { display: flex; flex-wrap: wrap; gap: 7px; }
.rate-pill { display: inline-flex; gap: 0; align-items: stretch; overflow: hidden; border-radius: 5px; font-size: .66rem; line-height: 1; }
.rate-model { padding: 5px 7px; color: var(--muted); background: #efece4; font-weight: 500; }
.rate-value { padding: 5px 8px; font-family: 'DM Mono', monospace; font-weight: 500; letter-spacing: -.02em; }
.rate-pill-claude .rate-value { color: #76501c; background: #fff1d9; }
.rate-pill-claude-new .rate-value { color: #4e5b92; background: #e5e9fb; }
.rate-pill-deepseek .rate-value { color: #506176; background: #e7ebed; }
.rate-pill-国产 .rate-value { color: #4c599a; background: #e7eafa; }
.rate-pill-gpt .rate-value { color: #2d7655; background: #e1f4e7; }
.rate-pill-gemini .rate-value { color: #52629b; background: #e9edff; }
.rate-pill-default .rate-value { color: var(--muted); background: #f1eee7; }
.benefit-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 15px 0 17px; list-style: none; }
.benefit-list li { padding: 6px 8px; color: var(--accent-deep); background: #f9e7df; border-radius: 4px; font-size: .68rem; line-height: 1.3; }
.benefit-list li.benefit-expired { color: var(--faint); background: #f0ede6; text-decoration: line-through; text-decoration-color: var(--faint); }
.provider-models { padding: 13px 0; border-top: 1px solid var(--line); }
.models-label, .rate-label { display: block; margin-bottom: 8px; color: var(--faint); font-size: .62rem; }
.rate-label { margin-top: 13px; }
.model-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.model-tag { display: inline-flex; max-width: 100%; gap: 5px; align-items: center; padding: 5px 9px 5px 7px; border: 0; border-radius: 999px; font-size: .66rem; line-height: 1.25; overflow-wrap: anywhere; }
.model-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 13px; height: 13px; font-size: .72rem; line-height: 1; }
.model-tag-claude { color: #76501c; background: #fff1d9; }
.model-tag-claude-new { color: #4e5b92; background: #e5e9fb; }
.model-tag-deepseek { color: #506176; background: #e7ebed; }
.model-tag-国产 { color: #4c599a; background: #e7eafa; }
.model-tag-gpt { color: #2d7655; background: #e1f4e7; }
.model-tag-gemini { color: #52629b; background: #e9edff; }
.model-tag-default { color: var(--muted); background: #f1eee7; }
.model-empty { margin: 0; color: var(--faint); font-size: .68rem; line-height: 1.5; }
.visit-button { display: inline-flex; flex-shrink: 0; gap: 6px; align-items: center; justify-content: center; min-width: 66px; padding: 7px 9px; color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 5px; text-decoration: none; font-size: .64rem; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.visit-button:hover { color: var(--card); background: var(--ink); border-color: var(--ink); }
.arrow { font-size: .9rem; line-height: .5; }
.provider-detail { padding: 8px 10px; margin: 5px 0 0; color: #8c4828; background: #fff0e7; border: 1px solid #f4d4c4; border-radius: 6px; font-size: .68rem; font-weight: 600; line-height: 1.55; }
.empty-state { grid-column: 1 / -1; padding: 58px 20px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(251, 250, 247, .55); }
.empty-number { display: block; margin-bottom: 14px; color: var(--accent); font-family: 'DM Mono', monospace; font-size: 1.4rem; }
.empty-state h3 { margin-bottom: 8px; font-size: 1rem; }
.empty-state p { margin: 0; color: var(--muted); font-size: .75rem; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px 0 38px; color: var(--faint); font-size: .65rem; line-height: 1.7; }
.site-footer p { margin: 0; }
.site-footer strong { color: var(--muted); font-weight: 600; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 800px) {
  .page-shell { width: min(100% - 36px, 600px); }
  .site-header { min-height: 76px; }
  .header-meta { font-size: .54rem; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .select-group { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .select-wrap { flex-shrink: 0; }
  .provider-card { gap: 0; padding: 21px 18px 19px; }
  .provider-models { padding: 0; border: 0; }
  .site-footer { flex-direction: column; gap: 4px; }
}
@media (max-width: 460px) {
  .page-shell { width: calc(100% - 28px); }
  .header-meta { display: none; }
  .directory { padding-top: 38px; }
  .category-tab { padding-right: 20px; margin-right: 20px; }
  .category-tab::after { right: 20px; }
  .provider-list { grid-template-columns: 1fr; }
  .provider-card { max-width: none; }
  .provider-topline { gap: 10px; }
  .name-line { flex: 1 1 auto; }
  .name-line h3 { font-size: 1rem; letter-spacing: -.04em; }
  .visit-button { width: auto; min-width: 62px; }
}
