/* TokenMark 公开目录共享样式（/models、/models/<id>、/pricing 共用）
   深浅色主题跟随 .theme 的 data-theme，与首页 /index.html 保持一致。 */
:root { --bg:#fff; --surface:#f8f9fa; --surface-2:#f1f3f5; --border:#e8eaed; --text:#202124; --muted:#5f6368; --accent:#4f8cff; --blue:#2563eb; --accent-soft:rgba(79,140,255,.10); --accent-border:rgba(79,140,255,.28); --green:#34a853; --red:#ea4335; --shadow-sm:0 1px 3px rgba(15,23,42,.08); --code-bg:#f6f8fa; }
[data-theme="dark"] { --bg:#0b0e14; --surface:#151a23; --surface-2:#1d2430; --border:#232a36; --text:#e6eaf2; --muted:#9aa4b2; --accent:#5b9bff; --blue:#60a5fa; --accent-soft:rgba(91,155,255,.14); --accent-border:rgba(91,155,255,.35); --green:#81c995; --red:#f28b82; --shadow-sm:0 1px 3px rgba(0,0,0,.45); --code-bg:#10151c; }
* { box-sizing:border-box; }
html,body { margin:0; padding:0; }
body { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif; background:var(--bg); color:var(--text); line-height:1.65; min-height:100vh; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; }

/* ===== 顶栏 ===== */
.nav { position:sticky; top:0; z-index:10; display:flex; align-items:center; gap:20px; padding:12px 28px; background:var(--bg); border-bottom:1px solid var(--border); }
.brand img { height:36px; width:auto; display:block; }
.nav-links { display:flex; align-items:center; gap:2px; flex:0 1 auto; margin-left:8px; overflow-x:auto; }
.nav-links a { padding:8px 13px; border-radius:10px; font-size:14.5px; font-weight:500; color:var(--muted); transition:background-color .15s,color .15s; white-space:nowrap; }
.nav-links a:hover { color:var(--text); background:var(--surface-2); }
.nav-links a.active { color:var(--accent); background:var(--accent-soft); }
.nav-right { display:flex; align-items:center; gap:12px; font-size:14px; flex:0 0 auto; margin-left:auto; }
.nav-right .link { color:var(--muted); font-weight:500; }
.nav-right .link:hover { color:var(--text); }
.nav-right .signup { padding:8px 16px; border-radius:22px; font-weight:550; background:var(--accent); color:#fff; box-shadow:0 1px 3px var(--accent-border); transition:transform .15s,background-color .15s; }
.nav-right .signup:hover { transform:translateY(-1px); background:var(--blue); }

/* ===== 布局 ===== */
.wrap { max-width:1080px; margin:0 auto; padding:0 24px; }
.page-head { padding:40px 0 8px; }
.page-head h1 { font-size:32px; margin:0 0 8px; font-weight:700; letter-spacing:-.5px; }
.page-head .sub { font-size:15px; color:var(--muted); max-width:720px; margin:0; line-height:1.6; }
.section { margin:34px 0; }
.section-head { margin-bottom:16px; }
.section-head h2 { font-size:21px; margin:0 0 4px; font-weight:600; }
.section-head p { margin:0; font-size:13.5px; color:var(--muted); }

/* ===== 徽标 / 状态 ===== */
.badge { display:inline-flex; align-items:center; gap:6px; padding:3px 11px; border-radius:999px; font-size:12.5px; font-weight:550; }
.badge.ok { background:rgba(52,168,83,.12); color:var(--green); }
.badge.bad { background:rgba(234,67,53,.12); color:var(--red); }
.badge.neutral { background:var(--surface-2); color:var(--muted); }
.badge.tier { background:var(--accent-soft); color:var(--accent); }

/* ===== 工具条（筛选/排序/搜索） ===== */
.toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:14px 0 18px; }
.toolbar input[type="search"] { flex:1 1 220px; min-width:180px; padding:9px 14px; border:1px solid var(--border); border-radius:10px; background:var(--bg); color:var(--text); font-size:14px; font-family:inherit; outline:none; }
.toolbar input[type="search"]:focus { border-color:var(--accent); }
.toolbar select { padding:9px 12px; border:1px solid var(--border); border-radius:10px; background:var(--bg); color:var(--text); font-size:13.5px; font-family:inherit; cursor:pointer; }
.toolbar .count { font-size:12.5px; color:var(--muted); margin-left:auto; }

/* ===== 模型卡片网格 ===== */
.model-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.model-card { display:flex; flex-direction:column; gap:10px; background:var(--bg); border:1px solid var(--border); border-radius:14px; padding:18px; transition:transform .16s,border-color .16s,box-shadow .16s; }
.model-card:hover { transform:translateY(-3px); border-color:var(--accent-border); box-shadow:0 8px 22px rgba(32,33,36,.10); }
[data-theme="dark"] .model-card { background:var(--surface); }
[data-theme="dark"] .model-card:hover { box-shadow:0 8px 22px rgba(0,0,0,.4); }
.mc-top { display:flex; align-items:center; gap:10px; }
.mc-logo { width:32px; height:32px; border-radius:8px; background:var(--surface-2); display:flex; align-items:center; justify-content:center; overflow:hidden; flex:0 0 auto; }
.mc-logo img { width:22px; height:22px; object-fit:contain; display:block; }
.mc-logo .txt { font-size:12px; font-weight:700; color:var(--muted); }
.mc-company { font-size:12.5px; color:var(--muted); }
.mc-id { font-size:15px; font-weight:600; color:var(--text); font-family:"SF Mono",Menlo,Consolas,monospace; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mc-meta { display:flex; gap:6px; flex-wrap:wrap; }
.mc-price { display:flex; flex-direction:column; gap:2px; font-size:13px; }
.mc-price .in { color:var(--text); }
.mc-price .in b { font-size:16px; font-weight:700; }
.mc-price .out { color:var(--muted); font-size:12.5px; }
.mc-unit { font-size:11.5px; color:var(--muted); }

/* ===== 价格表 ===== */
.price-table { width:100%; border-collapse:collapse; font-size:14px; }
.price-table th, .price-table td { border:1px solid var(--border); padding:9px 12px; text-align:left; vertical-align:top; }
.price-table th { background:var(--surface); font-weight:550; font-size:13px; white-space:nowrap; }
.price-table td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.price-table tr:hover td { background:var(--surface); }
.price-table .id-cell { font-family:"SF Mono",Menlo,Consolas,monospace; font-size:13px; }

/* ===== 详情页 ===== */
.detail-hero { display:flex; align-items:center; gap:16px; padding:22px 0 4px; flex-wrap:wrap; }
.detail-logo { width:52px; height:52px; border-radius:12px; background:var(--surface-2); display:flex; align-items:center; justify-content:center; overflow:hidden; flex:0 0 auto; }
.detail-logo img { width:36px; height:36px; object-fit:contain; }
.detail-logo .txt { font-size:18px; font-weight:700; color:var(--muted); }
.detail-id { font-size:22px; font-weight:700; font-family:"SF Mono",Menlo,Consolas,monospace; margin:0; }
.detail-company { font-size:13px; color:var(--muted); margin:2px 0 0; }
.kv { display:grid; grid-template-columns:180px 1fr; gap:0; border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.kv-row { display:contents; }
.kv-row .k { padding:12px 16px; background:var(--surface); font-size:13px; color:var(--muted); border-bottom:1px solid var(--border); font-weight:500; }
.kv-row .v { padding:12px 16px; font-size:14px; border-bottom:1px solid var(--border); }
.kv-row:last-child .k, .kv-row:last-child .v { border-bottom:none; }
.price-hero { display:flex; gap:18px; flex-wrap:wrap; }
.price-box { flex:1 1 180px; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:16px 18px; }
.price-box .label { font-size:12px; color:var(--muted); margin-bottom:4px; }
.price-box .val { font-size:24px; font-weight:700; }
.price-box .unit { font-size:12px; color:var(--muted); }
.nx-pill { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-weight:600; font-size:13px; }

/* ===== 代码块 ===== */
pre.code { position:relative; background:#101418; color:#e8e8e6; padding:16px 18px; border-radius:12px; overflow-x:auto; margin:14px 0; line-height:1.55; font-size:13px; }
pre.code code { font-family:"SF Mono",Menlo,Consolas,monospace; }
.copy-btn { position:absolute; top:8px; right:8px; cursor:pointer; font-size:12px; color:#9a9a94; background:transparent; border:1px solid #3a3a36; border-radius:6px; padding:3px 10px; }
.copy-btn:hover { color:#fff; border-color:#666; }
.copy-btn.copied { color:#7ee2a8; border-color:#2f7a4f; }

/* ===== 公告条 ===== */
.annbar { display:none; padding:9px 24px; font-size:13.5px; border-bottom:1px solid var(--border); background:var(--accent-soft); color:var(--text); }
.annbar.show { display:block; }
.annbar a { color:var(--accent); }

/* ===== CTA / 页脚 ===== */
.cta-box { text-align:center; padding:34px 24px; background:linear-gradient(135deg, rgba(79,140,255,.06), rgba(52,168,83,.05)); border:1px solid var(--border); border-radius:16px; margin:40px 0 24px; }
.cta-box h2 { margin:0 0 8px; font-size:20px; font-weight:600; }
.cta-box p { margin:0 0 16px; color:var(--muted); font-size:14px; }
.btn { display:inline-flex; align-items:center; gap:7px; padding:11px 24px; border-radius:24px; font-size:15px; font-weight:550; transition:transform .15s,box-shadow .15s,background .15s; cursor:pointer; letter-spacing:.2px; border:none; }
.btn.primary { background:var(--accent); color:#fff; box-shadow:0 1px 3px var(--accent-border); }
.btn.primary:hover { transform:translateY(-1px); background:var(--blue); }
.btn.ghost { background:var(--bg); color:var(--text); border:1px solid var(--border); }
.btn.ghost:hover { border-color:var(--muted); background:var(--surface); }
.foot { margin-top:28px; padding:18px 0 24px; border-top:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:12.5px; color:var(--muted); }
.foot .links { display:flex; gap:18px; flex-wrap:wrap; }
.foot a:hover { color:var(--text); }

@media (max-width:860px) { .model-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px) { .model-grid { grid-template-columns:1fr; } .kv { grid-template-columns:1fr; } .nav-links { display:none; } .page-head h1 { font-size:26px; } }
