*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* ---------- 浅色主题（2026-09-21 由深色切换） ---------- */
  color-scheme: light; /* 让滚动条、下拉框等原生控件跟着变浅 */
  --bg: #fbfbfd;
  --bg-soft: #ffffff;
  --card: rgba(255, 255, 255, 0.78);
  --card-hover: #ffffff;
  --line: rgba(18, 18, 34, 0.1);
  --line-2: rgba(18, 18, 34, 0.2);
  --fg: #16161f;
  --muted: #57576b;
  /* 弱化文字用在一堆小字上（时间、来源、页脚、统计标签…）。
     原来的 #86869a 只有 3.45:1，低于 WCAG AA 要求的 4.5:1，
     换深一档到 4.8:1，观感仍然比 --muted 轻，但小字号能看清。 */
  --faint: #6e6e84;
  --violet: #5b4be8;
  --cyan: #0ea5e9;
  /* 关键：渐变文字必须以深色起头，白底上用白色起点的渐变会直接消失 */
  --grad: linear-gradient(115deg, #16161f 8%, #5b4be8 48%, #0ea5e9 100%);
  --font: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, Menlo, Consolas, monospace;
  --w: 1120px;

  /* ---------- 装饰层：深色下靠发光，浅色下要压淡否则糊成一片 ---------- */
  --grid-line: rgba(91, 75, 232, 0.085);
  --glow-1: rgba(124, 107, 255, 0.15);
  --glow-2: rgba(14, 165, 233, 0.1);
  --glow-3: rgba(124, 107, 255, 0.06);
  --nav-bg: rgba(251, 251, 253, 0.82);
  --panel-bg: linear-gradient(180deg, #ffffff, #f6f6fb);
  --shadow: 0 1px 2px rgba(16, 16, 40, 0.04), 0 10px 30px rgba(16, 16, 40, 0.05);

  /* ---------- 强调色派生物 ---------- */
  --accent-text: #5b4be8; /* 浅底上的可读紫 */
  --icon-bg: rgba(91, 75, 232, 0.08);
  --tag-bg: rgba(255, 255, 255, 0.9);
  --mark-bg: rgba(91, 75, 232, 0.16);
  --mark-fg: #3a2ec0;
  --img-bg: rgba(18, 18, 34, 0.045);

  /* ---------- 首屏神经网络 SVG ---------- */
  --link: rgba(91, 75, 232, 0.3);
  --pulse: #0ea5e9;
  --node: #5b4be8;
  --node-ring: rgba(91, 75, 232, 0.13);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- 两条容易被自己写死的规则 ---------- */

/**
 * hidden 属性来自 UA 样式表的 [hidden]{display:none}，优先级极低。
 * 作者样式里只要有任何 display 声明就会赢（#loadMore 是 button.btn，
 * 而 .btn 有 display:inline-flex → 该隐藏时根本藏不住，
 * 页面底部就一直杵着一个「加载更多（还有 0 条）」还能点）。
 * 用 !important 兜住，以后谁给隐藏元素加 display 都不会失效。
 */
[hidden] {
  display: none !important;
}

/**
 * 键盘焦点必须有可见指示。
 * 鼠标点击时不给（否则满屏焦点环是噪音），键盘 Tab 时必须给 ——
 * 原来 select 只有 outline:none 且没有任何替代视觉，Tab 到它等于失明。
 */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

/* 跳过导航：平时藏在视口上方，键盘聚焦时滑下来。Nav 的层级是 40，这里必须更高。 */
.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100;
  transform: translate(-50%, -220%);
  padding: 11px 20px;
  border-radius: 11px;
  background: var(--violet);
  color: #fff;
  font-size: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 32px;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bg-layer .grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% 22%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 58% at 50% 22%, #000 30%, transparent 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}

.blob.b1 {
  width: 620px;
  height: 620px;
  top: -280px;
  left: -140px;
  background: var(--glow-1);
}

.blob.b2 {
  width: 540px;
  height: 540px;
  top: 60px;
  right: -200px;
  background: var(--glow-2);
}

.blob.b3 {
  width: 700px;
  height: 700px;
  top: 1200px;
  left: 30%;
  background: var(--glow-3);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(160%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}

.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--grad);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  color: var(--muted);
}

.nav-links a {
  position: relative; /* 供 .is-current 的 ::after 下划线定位 */
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--fg);
}

.hero {
  padding: 116px 0 40px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 34px;
}

.badge .live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(56, 189, 248, 0.05);
  }
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  margin: 0 auto 40px;
  max-width: 620px;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

/* 邮箱地址：主按钮之外再给一个可复制的明文入口。
   用等宽字体，地址里的 l/I/0/O 一眼分得清，抄错的概率小很多 */
.contact-mail {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--line-2);
  transition: color 0.2s, border-color 0.2s;
}
.contact-mail:hover {
  color: var(--accent-text);
  border-bottom-color: var(--accent-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 11px;
  font-size: 15.5px;
  font-weight: 500;
  border: 1px solid var(--line-2);
  color: var(--fg);
  background: var(--card);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  background: var(--card-hover);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(115deg, #6d5bf0, #4f8ff7 55%, #22a7e0);
  color: #fff;
  font-weight: 500;
}

.btn-primary:hover {
  box-shadow: 0 14px 40px rgba(124, 107, 255, 0.4);
}

.hero-visual {
  margin: 64px auto 0;
  max-width: 980px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual svg {
  display: block;
  width: 100%;
  height: 300px;
}

/* 神经网络的配色交给变量，主题切换时不用改 JS */
.hero-visual .nlink {
  stroke: var(--link);
}
.hero-visual .npulse {
  fill: var(--pulse);
}
.hero-visual .ndot {
  fill: var(--node);
}
.hero-visual .nring {
  fill: var(--node-ring);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.stat .num {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: block;
}

.stat .label {
  font-size: 13.5px;
  color: var(--faint);
}

.section {
  padding: 116px 0;
}

.sec-head {
  margin-bottom: 52px;
}

.sec-tag {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--violet);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

.sec-head h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 680px;
}

.sec-head p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 620px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  padding: 32px 28px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.24s ease,
    background 0.24s ease;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(91, 75, 232, 0.09), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--card-hover);
}

.card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--icon-bg);
  margin-bottom: 22px;
}

.card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-text);
}

.card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.card p {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
}

.cases {
  display: grid;
  gap: 18px;
}

.case {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 34px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.22s ease, background 0.22s ease;
}

.case:hover {
  border-color: var(--line-2);
  background: var(--card-hover);
}

.case .c-side {
  border-right: 1px solid var(--line);
  padding-right: 24px;
}

.case h3 {
  font-size: 22px;
  letter-spacing: -0.024em;
  margin-bottom: 8px;
}

.case .c-kind {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--violet);
}

/* 项目配图位：图片不存在时降级为占位块（onerror 会移除 img），不会露破碎图标 */
.c-shot {
  position: relative;
  margin-top: 20px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(91, 75, 232, 0.09), rgba(14, 165, 233, 0.05));
}

/* 占位图形；真实截图存在时会被 img 盖住 */
.c-shot::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--faint);
  opacity: 0.5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='M21 16l-5-5L6 20'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='M21 16l-5-5L6 20'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.c-shot img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case p {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 640px;
}

.case ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.case li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 9px;
  font-size: 15px;
  color: var(--muted);
}

.case li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

.stack-rows {
  border-top: 1px solid var(--line);
}

.stack-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.stack-row .k {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

.stack-row .v {
  font-size: 17px;
}

.contact {
  text-align: center;
  padding: 110px 0 130px;
  border-top: 1px solid var(--line);
}

.contact h2 {
  font-size: clamp(30px, 4.4vw, 50px);
  letter-spacing: -0.032em;
  margin-bottom: 20px;
}

.contact p {
  color: var(--muted);
  font-size: 17px;
  margin: 0 auto 36px;
  max-width: 520px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  font-size: 13.5px;
  color: var(--faint);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* 页脚邮箱：新闻页没有联系区，从资讯页进来的访客只能在这里找到入口 */
.footer-mail {
  font-family: var(--mono);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.footer-mail:hover {
  color: var(--accent-text);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .wrap {
    padding: 0 22px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
  }
  .case {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .case .c-side {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 18px;
  }
  .stack-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .section {
    padding: 76px 0;
  }
  .hero {
    padding: 78px 0 30px;
  }
  .nav-links {
    gap: 18px;
  }
}

.news-updated {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12.5px;
}

.news-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.news-filter {
  display: flex;
  gap: 8px;
}

.news-sources {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.chip-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chip-btn:hover {
  color: var(--fg);
  border-color: var(--line-2);
}

.chip-btn.is-active {
  background: rgba(91, 75, 232, 0.1);
  border-color: rgba(91, 75, 232, 0.45);
  color: var(--accent-text);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease,
    background 0.22s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--card-hover);
}

.n-img {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--img-bg);
  border-bottom: 1px solid var(--line);
}

/* 无配图条目（Solidot 这类纯文字源）：做成有意的排版留白，
   加一层点阵底纹，让它看起来是设计选择而不是图片加载失败 */
/* 主题配图角标：右下角，弱化到几乎不抢图，但足够说明「这不是新闻原图」 */
.n-cover {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #fff;
  /* 不用 backdrop-filter：父级 .n-img.is-cover 带 filter，会改变 backdrop root，
     子元素的 backdrop-filter 在部分浏览器下直接失效，只剩一层边框。半透明底色足够。
     0.52 时若图片本身偏白，白字只有 3.7:1 不达标；0.62 最坏情况（纯白图）仍有 5.2:1。 */
  background: rgba(18, 18, 34, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
/* 兜底插画压一档饱和，跟真实新闻照放在一起时不至于比原图还抢眼 */
.n-img.is-cover {
  filter: saturate(0.82);
}

.n-img-empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 1px 1px, rgba(91, 75, 232, 0.16) 1px, transparent 0) 0 0 / 16px 16px,
    linear-gradient(135deg, rgba(91, 75, 232, 0.09), rgba(14, 165, 233, 0.05));
}

.n-ph {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.n-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--tag-bg);
  border: 1px solid rgba(91, 75, 232, 0.35);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.n-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.n-body h3 {
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.014em;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.n-body p {
  margin: 0 0 16px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.n-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
}

.n-src {
  color: var(--accent-text);
}

.news-empty {
  padding: 44px 0;
  text-align: center;
  color: var(--faint);
  font-size: 15px;
}

.news-empty code {
  font-family: var(--mono);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 5px;
  color: var(--accent-text);
}

/* ---------- 新闻中心页 ---------- */
.page-hero {
  padding: 84px 0 8px;
}

.page-hero .lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 640px;
}

.page-hero h1 {
  font-size: clamp(38px, 5.4vw, 58px);
  letter-spacing: -0.035em;
  margin-top: 20px;
}

.num-sml {
  font-size: 19px !important;
  font-family: var(--mono);
  color: var(--muted);
  padding-top: 10px;
}

.nav-links a.is-current {
  color: var(--fg);
}

.nav-links a.is-current::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--violet);
}

.news-page {
  padding-top: 56px;
}

/* 工具条：搜索 + 开关 + 排序 */
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.search-box {
  position: relative;
  flex: 1 1 320px;
  min-width: 240px;
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  /* 同理不写 outline:none，交给全局 :focus-visible 画焦点环 */
  transition: border-color 0.2s, background 0.2s, outline-color 0.2s;
}

.search-box input::placeholder {
  color: var(--faint);
}

.search-box input:focus {
  border-color: var(--line-2);
  background: var(--card-hover);
}

.search-box input::-webkit-search-cancel-button {
  filter: invert(0.6);
  cursor: pointer;
}

.tool-right {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.switch input {
  appearance: none;
  width: 38px;
  height: 21px;
  margin: 0;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--faint);
  transition: transform 0.2s, background 0.2s;
}

.switch input:checked {
  background: rgba(91, 75, 232, 0.22);
  border-color: rgba(91, 75, 232, 0.45);
}

.switch input:checked::after {
  transform: translateX(17px);
  background: #fff;
}

.switch input:checked + span {
  color: var(--fg);
}

.select {
  font: inherit;
  font-size: 14.5px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  /* 不写 outline:none —— 它会盖掉全局 :focus-visible 的焦点环，
     Tab 到这个下拉框就完全看不出焦点在哪了。鼠标点击由 :focus:not(:focus-visible) 兜。 */
}

.select option {
  background: var(--bg-soft);
  color: var(--fg);
}

.result-count {
  font-size: 13.5px;
  color: var(--faint);
  font-family: var(--mono);
  white-space: nowrap;
}

.chip-btn b {
  font-weight: 500;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 2px;
}

.chip-btn.is-active b {
  color: var(--accent-text);
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.load-more-row .btn {
  cursor: pointer;
  font: inherit;
  font-size: 15px;
}

/* 搜索命中高亮 */
mark {
  background: var(--mark-bg);
  color: var(--mark-fg);
  border-radius: 3px;
  padding: 0 2px;
}

@media (max-width: 860px) {
  .page-hero {
    padding-top: 56px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-right {
    justify-content: space-between;
  }
  .news-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
