/* ============================================================
   iOS 风格主题（v2）——只改视觉，不改布局结构
   基准：ai.jishu5.com 浅灰底 + 白卡 + 黑色胶囊
   ============================================================ */

:root {
  --primary: #1c1c1e;
  --primary-active: #000;
  --primary-disabled: #d1d1d6;
  --ink: #111114;
  --body: #3a3a3c;
  --body-strong: #1c1c1e;
  --muted: #8e8e93;
  --muted-soft: #aeaeb2;
  --hairline: #ececef;
  --hairline-soft: #f4f4f6;
  --canvas: #f5f5f7;
  --surface-soft: #f0f0f3;
  --surface-card: #ffffff;
  --surface-cream-strong: #fff;
  --surface-dark: #1c1c1e;
  --on-primary: #fff;
  --on-dark: #fff;
  --on-dark-soft: #aeaeb2;
  --accent-teal: #34c759;
  --accent-amber: #ff9500;
  --success: #34c759;
  --warning: #ff9500;
  --error: #ff3b30;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans SC", sans-serif;
  --display-xl-font-size: 34px;
  --display-lg-font-size: 28px;
  --display-md-font-size: 26px;
  --display-sm-font-size: 22px;
  --display-xl-font-family: var(--font-display);
  --display-lg-font-family: var(--font-display);
  --display-md-font-family: var(--font-display);
  --body-lg-font-size: 16px;
  --body-md-font-size: 15px;
  --caption-font-size: 12.5px;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-copy h1, .section-heading h2 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

/* 顶部：白胶囊 */
.site-header .header-inner, .header-inner, header .wrap {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.04);
}

/* 大标题尺寸收敛 */
.hero-copy h1 { font-size: 30px !important; line-height: 1.25 !important; font-weight: 700; letter-spacing: -0.03em; }
.hero-copy .lead { font-size: 15px; color: var(--muted); line-height: 1.6; }
.eyebrow { font-size: 12.5px; color: var(--muted); letter-spacing: 0; text-transform: none; }

/* 统计数字 */
.hero-stats dd { font-family: var(--font-display) !important; font-size: 26px !important; font-weight: 700; letter-spacing: -0.02em; }
.hero-stats dt { font-size: 12.5px; color: var(--muted); }

/* 搜索面板：白卡，输入框内嵌 */
.search-panel {
  background: #fff !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
}
.search-panel-heading { color: var(--muted); font-size: 12.5px; }
.search-input-wrap { background: #f5f5f7; border-radius: 12px; }
.search-form input, .search-form select, .field input, .field select {
  border: 1px solid var(--hairline) !important;
  border-radius: 12px !important;
  background: #fff !important;
  font-size: 15px !important;
  padding: 10px 14px !important;
  font-family: inherit;
  color: var(--ink);
  box-shadow: none !important;
}
.search-form input:focus, .search-form select:focus, .field input:focus, .field select:focus {
  border-color: #1c1c1e !important;
  box-shadow: 0 0 0 3px rgba(28,28,30,.07) !important;
  outline: none;
}

/* 按钮：黑色胶囊 */
.btn { border-radius: 999px !important; font-weight: 600; border: none !important; }
.btn-primary { background: #1c1c1e !important; color: #fff !important; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.btn-primary:hover { background: #000 !important; }
.btn-secondary { background: #fff !important; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* 筛选 tab：白底胶囊 */
.filter-tabs a, .filter-tabs button, .tag-list a {
  border-radius: 999px !important;
  border: none !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05) !important;
  font-size: 13.5px !important;
  font-weight: 500;
  padding: 8px 16px !important;
  color: var(--body) !important;
  text-decoration: none;
}
.filter-tabs a.is-active, .filter-tabs .is-active,
.filter-tabs a[aria-current], .filter-tabs a:hover {
  background: #fff !important;
  color: var(--ink) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.11) !important;
}

/* 卡片统一 */
.post-card, .detail-section, .claim-panel, .panel, .empty-state, .feed-section {
  background: #fff;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
}
.feed-section { padding: 18px !important; }

/* 列表卡片：左 logo 右内容 */
.post-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px !important; }
.post-logo {
  flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 700; letter-spacing: -0.02em;
  color: #fff; background: var(--brand, #007aff); text-decoration: none; user-select: none;
}
.post-card-body { flex: 1 1 auto; min-width: 0; }
.post-title { font-size: 16.5px !important; font-weight: 600; line-height: 1.4; letter-spacing: -0.02em; margin: 0 0 6px !important; }
.post-title a { color: var(--ink) !important; text-decoration: none; }
.post-summary {
  font-size: 13.5px !important; line-height: 1.55; color: var(--muted) !important;
  margin: 0 0 10px !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px !important; font-size: 12.5px !important; color: var(--muted); }
.meta-brand { font-weight: 600; color: var(--body); }

.pill { display: inline-flex; align-items: center; height: 23px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.pill-green  { background: #e8f9ec; color: #1f9d3d; }
.pill-orange { background: #fff2e0; color: #c77700; }
.pill-blue   { background: #e6f2ff; color: #007aff; }
.pill-gray   { background: #f0f0f3; color: #8e8e93; }
.source-link {
  display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 10px;
  border-radius: 999px; background: #f0f0f3; color: var(--body) !important;
  font-size: 11.5px; font-weight: 500; text-decoration: none; margin-left: auto;
}
.source-link:hover { background: #e5e5ea; }
.card-arrow { display: none; }

/* 详情页 */
.detail-section h2 { font-size: 15px !important; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 14px; }
.fact-grid dt { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.fact-grid dd { font-size: 14.5px; color: var(--body); }
.detail-section ol, .steps-list { counter-reset: step; list-style: none; padding: 0; }
.detail-section ol > li, .steps-list > li {
  counter-increment: step; position: relative; padding: 14px 16px 14px 52px !important;
  background: #f7f7f9; border-radius: 14px; margin-bottom: 10px; font-size: 14.5px; line-height: 1.6;
}
.detail-section ol > li::before, .steps-list > li::before {
  content: counter(step); position: absolute; left: 14px; top: 14px; width: 24px; height: 24px;
  border-radius: 50%; background: #1c1c1e; color: #fff; font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center;
}

/* 移动端收紧 */
@media (max-width: 720px) {
  .hero-copy h1 { font-size: 26px !important; }
  .post-card { padding: 14px !important; gap: 12px; }
  .post-logo { flex-basis: 46px; width: 46px; height: 46px; font-size: 14px; border-radius: 12px; }
  .post-title { font-size: 15.5px !important; }
  .post-summary { font-size: 13px !important; }
  .source-link { margin-left: 0; }
  .feed-section { padding: 14px !important; }
}

/* ---------- 头部胶囊：留出左右边距，避免圆角被裁 ---------- */
.site-header { border-block-end: none !important; background: var(--canvas) !important; padding: 12px 14px 0 !important; }
.site-header .header-inner {
  max-inline-size: 1120px;
  margin: 0 auto !important;
  padding: 8px 10px 8px 18px !important;
  min-block-size: 58px !important;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.05);
}
.mobile-category-nav { padding-inline: 14px !important; }
.mobile-category-nav a {
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  padding: 8px 16px !important;
  font-size: 13.5px !important;
  color: var(--body) !important;
}
.mobile-category-nav a.is-active, .mobile-category-nav a[aria-current] {
  background: #fff !important; color: var(--ink) !important; font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.11) !important;
}
.site-header .brand, .site-header .brand-mark { border-radius: 12px; }

/* ---------- 移动端分类导航：横向滚动，不换行 ---------- */
.mobile-category-nav {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto;
  padding: 10px 14px 4px !important;
  scrollbar-width: none;
}
.mobile-category-nav::-webkit-scrollbar { display: none; }
.mobile-category-nav a,
.mobile-category-nav button {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  inline-size: auto !important;
  min-inline-size: 0 !important;
  padding: 8px 15px !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ---------- 详情页卡片内边距与标题 ---------- */
.detail-section, .claim-panel { padding: 20px !important; }
.detail-section > h2:first-child, .detail-section .section-heading { margin-top: 0 !important; }
.detail-section h2 { padding: 0 !important; }
.detail-section + .detail-section { margin-top: 12px !important; }
.detail-title, .post-detail-title { font-size: 24px !important; line-height: 1.3 !important; font-weight: 700; letter-spacing: -0.03em; }
.reading-layout, .detail-layout { gap: 14px !important; }

/* ============================================================
   v6：卡片流结构（去掉 hero，主视觉是搜索 + 卡片列表）
   ============================================================ */

.feed-wrap {
  max-inline-size: 1120px;
  margin: 0 auto;
  padding: 6px 14px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 1000px) {
  .feed-wrap { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
}

/* 搜索：白胶囊 + 黑色按钮 */
.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.04);
}
.quick-search svg { color: #8e8e93; flex: 0 0 auto; }
.quick-search input[type="search"] {
  flex: 1 1 auto;
  min-inline-size: 0;
  border: none !important;
  background: transparent !important;
  padding: 8px 0 !important;
  font-size: 15px;
  box-shadow: none !important;
  outline: none;
}
.quick-search select {
  flex: 0 0 auto;
  border: none !important;
  background: transparent !important;
  font-size: 14px;
  color: #3a3a3c;
  padding: 6px 4px !important;
  box-shadow: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.quick-search button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: #1c1c1e;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.quick-search button:active { opacity: .85; }

/* 主卡片：白底大圆角，包住标题+筛选+列表 */
.feed-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.05);
  padding: 18px 14px 8px;
}
.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 12px;
}
.feed-head h2 {
  font-size: 19px !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 !important;
}
.feed-count {
  font-size: 13px;
  color: #0066cc;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

/* 筛选 chips 行 */
.feed-card .filter-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto;
  margin: 0 0 14px !important;
  padding: 0 2px 2px !important;
  scrollbar-width: none;
}
.feed-card .filter-tabs::-webkit-scrollbar { display: none; }
.feed-card .filter-tabs a {
  flex: 0 0 auto;
  white-space: nowrap;
  background: #f2f2f5 !important;
  box-shadow: none !important;
  color: #3a3a3c !important;
  padding: 8px 15px !important;
  font-size: 13.5px !important;
}
.feed-card .filter-tabs a[aria-current="true"] {
  background: #1c1c1e !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* 卡片流内部：去掉多余外框，只留分隔 */
.feed-card .post-feed { display: grid; gap: 10px; }
.feed-card .post-card {
  box-shadow: none !important;
  background: #fafafb !important;
  border-radius: 16px !important;
  padding: 14px !important;
}
.feed-card .post-card:hover { background: #f5f5f7 !important; }

/* 侧栏 */
.feed-side { display: grid; gap: 12px; }
.side-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
}
.side-card h3 { font-size: 14.5px !important; font-weight: 600; margin: 0 0 12px !important; }
.side-card .rank-list, .side-card .simple-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.side-card .rank-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.side-card .rank-number { color: #c7c7cc; font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; flex: 0 0 auto; padding-top: 2px; }
.side-card a { color: #111114; text-decoration: none; }
.side-card .simple-list a { font-size: 13.5px; color: #3a3a3c; }

/* 隐藏旧结构残留 */
.editorial-hero, .search-panel, .reading-sidebar, .eyebrow, .reader-note { display: none !important; }
@media (max-width: 720px) {
  .feed-wrap { padding: 4px 12px 90px; gap: 12px; }
  .feed-card { padding: 16px 10px 6px; border-radius: 20px; }
  .feed-head h2 { font-size: 18px !important; }
  .quick-search { padding: 5px 5px 5px 14px; }
  .quick-search button { height: 36px; padding: 0 16px; font-size: 14px; }
  .feed-card .post-card { padding: 12px !important; }
}

/* ============================================================
   v8：对齐原站细节
   ============================================================ */

/* 筛选选中态改回白底 + 阴影（原站风格，不用黑底） */
.feed-card .filter-tabs a[aria-current="true"] {
  background: #fff !important;
  color: #111114 !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.12) !important;
}

/* 卡片改纯白 + 浅描边，去掉灰底嵌套感 */
.feed-card .post-feed { gap: 0; }
.feed-card .post-card {
  background: #fff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid #f2f2f5 !important;
  padding: 16px 4px !important;
}
.feed-card .post-card:last-child { border-bottom: none !important; }
.feed-card .post-card:hover { background: #fafafb !important; }

/* 「全部 N 条」：灰色 + 箭头感 */
.feed-count { color: #8e8e93 !important; font-weight: 500; }
.feed-count::after { content: " ›"; font-size: 15px; }

/* 徽章更紧凑 */
.pill { height: 22px; font-size: 11px; padding: 0 9px; }
