/* ===========================================================
   每日热榜 — 样式表
   浅色、纸质感、信息密度优先
   =========================================================== */

:root {
  --bg:        #f6f7f9;
  --surface:   #ffffff;
  --ink:       #11161c;
  --ink-2:     #3b4450;
  --ink-3:     #5b6572;
  --muted:     #8b939f;
  --line:      #e8ebef;
  --line-2:    #dde1e7;

  --accent-ai:     #4356e8;
  --accent-social: #cf4a2c;
  --accent-meme:   #0d8a7c;
  --accent:        var(--accent-ai);

  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(17, 22, 28, .04);
  --shadow-2: 0 8px 24px -12px rgba(17, 22, 28, .18);
  --head-h: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.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;
}

/* ---------- 顶部 ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-mark {
  width: 26px; height: 26px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 30% 28%, #7b8cff 0%, transparent 55%),
    linear-gradient(140deg, var(--accent-ai), #6a3fd8 55%, #cf4a2c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 4px 12px -4px rgba(67,86,232,.6);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; font-weight: 650; letter-spacing: .02em; }
.brand-text em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
  margin-top: 1px;
}

.head-right { display: flex; align-items: center; gap: 18px; }

.head-date { text-align: right; line-height: 1.25; }
.date-num {
  display: block;
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.date-meta { font-size: 11.5px; color: var(--muted); }

.edition-pick select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line-2);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%238b939f' stroke-width='1.4' stroke-linecap='round'/></svg>") no-repeat right 10px center;
  border-radius: 9px;
  padding: 7px 28px 7px 11px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s ease;
}
.edition-pick select:hover { border-color: #c8ced6; }
.edition-pick select:focus-visible { outline: 2px solid var(--accent-ai); outline-offset: 1px; }

/* ---------- 工具条 ---------- */

.toolbar {
  position: sticky;
  top: var(--head-h);
  z-index: 30;
  background: rgba(246, 247, 249, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.toolbar-inner {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filters { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }

.filter-btn {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .15s ease, color .15s ease;
}
.filter-btn:hover { background: #eceef2; color: var(--ink); }
.filter-btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2);
  font-weight: 600;
}
.filter-btn .fdot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fc, var(--muted));
}

.toolbar-side { display: flex; align-items: center; gap: 10px; flex: none; }
.read-stat {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ghost-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.ghost-btn:hover { color: var(--ink); background: #eceef2; }

/* ---------- 主体 ---------- */

.main { padding-top: 34px; padding-bottom: 60px; }

.section { margin-bottom: 46px; }
.section[hidden] { display: none; }

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 20px;
}

.section-idx {
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: .06em;
  padding-bottom: 3px;
}

.section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.35;
}

.section-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.section-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-bottom: 4px;
}

/* ---------- 卡片 ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 20px 16px;
  box-shadow: var(--shadow-1);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.card:hover {
  border-color: #d3d9e2;
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.card.is-read { opacity: .58; }
.card.is-read:hover { opacity: .85; }

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.card-num {
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: .04em;
}

.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-left: auto; }

.tag {
  font-size: 10.5px;
  color: var(--ink-3);
  background: #f2f4f7;
  border-radius: 5px;
  padding: 2px 6px;
  letter-spacing: .01em;
  white-space: nowrap;
}

.read-flag {
  position: absolute;
  top: 0; right: 0;
  font-size: 10px;
  color: #fff;
  background: var(--accent);
  border-radius: 0 var(--r-lg) 0 8px;
  padding: 2px 8px 3px;
  opacity: 0;
  transition: opacity .18s ease;
}
.card.is-read .read-flag { opacity: .85; }

.card-title {
  margin: 0 0 10px;
  font-size: 16.5px;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: .005em;
}
.card-title a { transition: color .15s ease; }
.card-title a:hover { color: var(--accent); }

.card-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.78;
  color: var(--ink-3);
}

.take {
  margin: 0 0 16px;
  padding: 2px 0 2px 11px;
  border-left: 2px solid var(--accent);
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--ink-2);
}
.take b {
  display: block;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--accent);
  letter-spacing: .1em;
  margin-bottom: 1px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 9px 4px 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  background: #fff;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.link-chip:hover {
  border-color: var(--pc, var(--accent));
  color: var(--ink);
  background: #fbfcfd;
}
.link-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pc, var(--muted));
  flex: none;
}
.link-chip .pf { font-weight: 600; }
.link-chip .lt { color: var(--muted); }
.link-chip .arw {
  color: var(--muted);
  font-size: 10px;
  transition: transform .15s ease, color .15s ease;
}
.link-chip:hover .arw { transform: translate(1px, -1px); color: var(--pc, var(--ink)); }

/* ---------- 空状态 / 页脚 ---------- */

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 60px 0;
}

.site-foot {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  padding: 34px 0 22px;
  margin-top: 20px;
}

.foot-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.foot-col h4 {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .1em;
  color: var(--ink);
}
.foot-col p {
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.foot-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .head-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .toolbar { position: static; }
  .toolbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .foot-inner { grid-template-columns: 1fr; gap: 20px; }
  .main { padding-top: 24px; }
  .section { margin-bottom: 36px; }
  .brand-text em { display: none; }
  .head-date { text-align: left; }
  .head-right { width: 100%; justify-content: space-between; }
  .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
