/* ============================================================
   pages.css — 各页面特有样式（严格按设计稿尺寸还原）
   基准视口 1440px
   ============================================================ */

/* 通栏背景带（分类区 / 榜单区 使用「区块底」#0E121B） */
.band { background: var(--surface); padding: 68px 0; }
.band .sec { padding-top: 0; }

/* ============================================================
   首页 · Hero
   ============================================================ */
.hero { padding: 68px 0 0; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
.hero-l { max-width: 780px; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .6px; color: var(--accent); margin-bottom: 12px;
}
.hero-h1 { font-size: 40px; font-weight: 900; letter-spacing: 1px; line-height: 1.22; }
.hero-sub { font-size: 15px; color: var(--text-3); margin-top: 16px; line-height: 1.7; }

.hero-stat {
  width: 336px; flex-shrink: 0; background: var(--card);
  border: 1px solid var(--card-hover); border-radius: var(--r-card);
  padding: 20px 22px 16px;
}
.stat-line { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 0; }
.stat-k { font-size: 12.5px; color: var(--text-3); }
.stat-v { font-family: var(--mono); font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.stat-v.ok { color: var(--ok); }
.stat-v.accent { color: var(--accent); }
.stat-foot {
  border-top: 1px solid var(--line); margin-top: 6px; padding-top: 11px;
  font-size: 11.5px; color: var(--text-3);
}

.hero-search { display: flex; gap: 14px; margin-top: 44px; }
.hero-input {
  flex: 1; height: 56px; padding: 0 24px 0 48px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: 14px; outline: none; transition: border-color .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235F6A80' stroke-width='1.6'%3E%3Ccircle cx='6.8' cy='6.8' r='4.6'/%3E%3Cpath d='M10.4 10.4 14 14'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 20px center; background-size: 16px;
}
.hero-input::placeholder { color: var(--text-3); }
.hero-input:focus { border-color: var(--brand); }

.hero-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.hero-row + .hero-row { margin-top: 14px; }
.hero-lbl { font-size: 12.5px; color: var(--text-3); flex-shrink: 0; }

/* 药丸筛选片 */
.pill {
  display: inline-flex; align-items: center;
  height: 32px; padding: 0 15px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3); transition: all .15s; white-space: nowrap;
}
.pill:hover { color: var(--text-2); border-color: #2f3a52; }
.pill.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ============================================================
   首页 · 分类卡（3 列，区内卡片以边框区分，底色同区块底）
   ============================================================ */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }
.cat-card {
  display: block; background: transparent;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 22px 34px; transition: border-color .15s, background .15s;
}
.cat-card:hover { border-color: #2f3a52; background: var(--card); }
.cat-ico { display: block; width: 26px; height: 26px; margin-bottom: 18px; }
.cat-ico svg { width: 100%; height: 100%; }
.cat-name { font-size: 15.5px; font-weight: 700; }
.cat-count { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

/* ============================================================
   CTA 卡
   ============================================================ */
.cta {
  margin-top: 56px; background: var(--card); border: 1px solid var(--card-hover);
  border-radius: 18px; padding: 30px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta h3 { font-size: 19px; font-weight: 700; }
.cta p { font-size: 13px; color: var(--text-3); margin-top: 8px; }
.cta-act { display: flex; gap: 10px; }

/* ============================================================
   页面头（分类 / 榜单 / 提交 / 详情 共用）
   ============================================================ */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); padding: 22px 0 0; }
.crumb a:hover { color: var(--text-2); }
.crumb .sp { color: #39425a; }
.phead { padding-top: 14px; }
.phead h1 { font-size: 32px; font-weight: 800; letter-spacing: .6px; }
.phead .sub { font-size: 13.5px; color: var(--text-3); margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.phead .sub .v { color: var(--text-2); }
.phead .lead { font-size: 13.5px; color: var(--text-3); margin-top: 12px; line-height: 1.7; max-width: 900px; }
.phead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.stamp {
  font-size: 11.5px; color: var(--text-3); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 14px; white-space: nowrap;
}

/* 筛选条（上下发丝线） */
.filterbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 30px; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.filterbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* 分页 */
.pager { display: flex; justify-content: center; gap: 8px; padding: 36px 0 4px; }
.pg {
  min-width: 34px; height: 34px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.pg:hover { color: var(--text-1); border-color: #2f3a52; }
.pg.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pg.dots { background: none; border: none; color: var(--text-3); }

/* ============================================================
   站点详情页
   ============================================================ */
.d-hero {
  background: var(--card); border: 1px solid var(--card-hover); border-radius: 18px;
  padding: 26px 28px; margin-top: 22px;
  display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap;
}
.d-ava { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 24px; flex-shrink: 0; }
.d-info { flex: 1; min-width: 260px; }
.d-name { display: flex; align-items: center; gap: 10px; }
.d-name span { font-size: 28px; font-weight: 800; letter-spacing: .4px; }
.d-name .dot { width: 8px; height: 8px; }
.d-desc { font-size: 14px; color: var(--text-2); margin-top: 10px; }
.d-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.d-acts { width: 168px; display: flex; flex-direction: column; gap: 10px; }
.d-acts .btn { width: 100%; }
.d-acts .stamp { text-align: center; border: none; background: none; padding: 0; }

.d-sec { padding-top: 48px; }
.d-sec h2 { font-size: 20px; font-weight: 600; }
.d-sec .lead { font-size: 13.5px; color: var(--text-3); margin-top: 8px; }
.d-sec .body { font-size: 14px; color: var(--text-2); margin-top: 14px; line-height: 1.85; }
.d-sec .body + .body { margin-top: 8px; }
.d-sec-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }

/* 收藏理由卡：图标与标题左右排列，说明文字换行在下方 */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.reason {
  background: var(--surface); border: 1px solid var(--card-hover); border-radius: 14px; padding: 20px;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; column-gap: 12px; row-gap: 10px;
}
.reason .ic { color: var(--brand); margin-bottom: 0; }
.reason .ic svg { width: 22px; height: 22px; }
.reason h4 { font-size: 14px; font-weight: 700; }
.reason p { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); margin-top: 0; line-height: 1.7; }

/* 运行状态指标 */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.metric { background: var(--surface); border: 1px solid var(--card-hover); border-radius: 14px; padding: 16px 20px; }
.metric .k { font-size: 12px; color: var(--text-3); }
.metric .v { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin-top: 8px; }
.metric .v.ok { color: var(--ok); }
.metric .v.brand { color: var(--brand); }
.metric .v.accent { color: var(--accent); }

/* 巡检记录（行式列表） */
.checks { display: flex; flex-direction: column; gap: 5px; margin-top: 18px; }
.check-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: 10px; padding: 13px 18px;
}
.check-row .t { font-family: var(--mono); font-size: 12px; color: var(--text-3); width: 92px; flex-shrink: 0; }
.check-row .r { font-size: 13px; color: var(--text-2); }
.check-row .ms { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.check-row .ms.slow { color: var(--accent); }

@media (max-width: 1024px) {
  .reasons { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   榜单页
   ============================================================ */
.tabs { display: flex; gap: 8px; margin-top: 24px; }
.rank-note {
  margin-top: 34px; background: var(--surface); border: 1px solid var(--card-hover);
  border-radius: 14px; padding: 17px 22px; font-size: 13px; color: var(--text-3); line-height: 1.7;
}

/* ============================================================
   提交收录页
   ============================================================ */
.submit-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; margin-top: 26px; align-items: start; }
.panel {
  background: var(--card); border: 1px solid var(--card-hover);
  border-radius: 18px; padding: 24px;
}
.panel + .panel { margin-top: 20px; }
.panel-h { font-size: 17px; font-weight: 700; }
.panel-h4 { font-size: 15px; font-weight: 700; }
.panel-d { font-size: 12.5px; color: var(--text-3); margin-top: 9px; line-height: 1.75; }

.steps { display: flex; gap: 8px; margin: 18px 0 16px; flex-wrap: wrap; }
.step {
  height: 28px; padding: 0 13px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--text-3);
  display: inline-flex; align-items: center;
}
.step.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.urlrow { display: flex; gap: 12px; }
.inp {
  width: 100%; height: 44px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  font-size: 13.5px; outline: none; transition: border-color .15s;
}
.inp::placeholder { color: var(--text-3); }
.inp:focus { border-color: var(--brand); }
.urlrow .inp { flex: 1; }
.sel { appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.f-label { display: block; font-size: 12.5px; color: var(--text-2); margin: 18px 0 8px; }
.f-label .tip { color: var(--text-3); }

.recog {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
}
.recog-l { display: flex; align-items: center; gap: 12px; }
.recog-ava { width: 40px; height: 40px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; }
.recog-n { font-size: 14px; font-weight: 700; }
.recog-s { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 2px; }
.recog-r { font-size: 12px; color: var(--ok); font-weight: 600; white-space: nowrap; }

.shot { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 10px; }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; }
.shot-bar .u { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-left: 8px; }
.shot-body { height: 132px; display: grid; place-items: center; font-size: 12px; color: var(--text-3); }

.note-warn {
  display: flex; align-items: center; gap: 8px; margin-top: 20px;
  background: var(--accent-dim); border: 1px solid rgba(255,122,69,.3);
  border-radius: 10px; padding: 11px 16px; font-size: 12.5px; color: var(--accent);
}
.slider-row { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.slider-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.slider-row .txt { flex: 1; font-size: 12.5px; color: var(--text-3); }
.submit-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.submit-foot .nt { font-size: 11.5px; color: var(--text-3); }

.ck-list { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 4px; }
.ck-list li { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.ck-list .ck { color: var(--ok); font-weight: 700; flex-shrink: 0; }
.num-list { list-style: none; counter-reset: n; display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.num-list li { display: flex; gap: 11px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; counter-increment: n; }
.num-list li::before { content: counter(n); font-family: var(--mono); font-size: 12px; color: var(--text-3); flex-shrink: 0; padding-top: 1px; }
.hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.token-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; margin-top: 14px;
}
.token-row .code { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); letter-spacing: .5px; }
.cloud { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.about { padding-top: 48px; }
.about h3 { font-size: 18px; font-weight: 800; }
.about p { font-size: 13px; color: var(--text-3); margin-top: 12px; max-width: 900px; line-height: 1.85; }

@media (max-width: 1024px) {
  .submit-grid { grid-template-columns: 1fr; }
  .hero-top { flex-direction: column; }
  .hero-stat { width: 100%; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .hero-h1 { font-size: 30px; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
}

/* ============================================================
   SEO 内容块（分类页导语 / FAQ / 详情页正文小标题）
   由 seo_content.py 自动生成内容，样式保持设计系统一致。
   ============================================================ */
.seo-intro { padding-top: 40px; }
.seo-intro h2 { font-size: 20px; font-weight: 600; }
.seo-intro .body { font-size: 14px; color: var(--text-2); margin-top: 14px; line-height: 1.85; }
.seo-intro .body + .body { margin-top: 10px; }

.faq-list { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--card-hover); border-radius: 12px; padding: 16px 20px; }
.faq-item h3 { font-size: 14px; font-weight: 700; color: var(--text-1); }
.faq-item p { font-size: 13px; color: var(--text-2); margin-top: 8px; line-height: 1.8; }

.d-sec h3 { font-size: 14px; font-weight: 700; margin-top: 16px; }

/* ============================================================
   分类页瀑布流（CSS columns）
   卡片高度不同（简介 1~2 行、标签数量不同），用列布局形成瀑布流；
   分页仍由静态页 /category/{key}/page/{n}/ 提供，SEO 与直达都可用。
   ============================================================ */
.grid4.masonry {
  display: block;
  column-count: 4;
  column-gap: 20px;
  margin-top: 22px;
}
.grid4.masonry .card {
  display: flex;
  width: 100%;
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 20px;
}
@media (max-width: 1240px) { .grid4.masonry { column-count: 3; } }
@media (max-width: 1024px) { .grid4.masonry { column-count: 2; } }
@media (max-width: 720px)  { .grid4.masonry { column-count: 1; } }
