/* ==========================================================================
   媒体雷达 MediaRadar — 设计系统 + 新闻发布站样式（site.css）
   零外网依赖：字体仅系统字体，图标全部内联 SVG，无 @import / 无 CDN。
   操作台 console.html 也加载本文件以复用变量与基础组件（按钮/表单/徽标等）。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */

:root {
  color-scheme: light;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Code", Consolas,
    "Liberation Mono", monospace;

  --bg: #f4f5f7;
  --bg-soft: #eceef2;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f5;

  --ink: #0b1220;
  --ink-800: #111b2e;
  --ink-700: #1a2740;
  --text: #18212f;
  --text-2: #515d72;
  --text-3: #7c8799;

  --border: #e2e6ed;
  --border-strong: #cdd4df;

  --brand: #1f6feb;
  --brand-strong: #1557bd;
  --brand-soft: #e8f0ff;
  --brand-contrast: #ffffff;

  --accent: #e8453c;
  --accent-soft: #fdecea;

  --ok: #0f7b53;
  --ok-soft: #e4f5ed;
  --warn: #a85b00;
  --warn-soft: #fdf1df;
  --danger: #c02323;
  --danger-soft: #fdeaea;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px -12px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 48px -24px rgba(15, 23, 42, 0.3);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;

  --maxw: 1320px;
  --gutter: 24px;
}

/* 深色：跟随系统（未手动选择时） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0a101c;
    --bg-soft: #0d1524;
    --surface: #101a2b;
    --surface-2: #152033;
    --surface-3: #1a2740;

    --ink: #e8eef8;
    --ink-800: #0f1929;
    --ink-700: #16233a;
    --text: #e3e9f2;
    --text-2: #a4b0c6;
    --text-3: #7a869e;

    --border: #22304a;
    --border-strong: #31415f;

    --brand: #4f8dff;
    --brand-strong: #79a8ff;
    --brand-soft: rgba(79, 141, 255, 0.16);
    --brand-contrast: #ffffff;

    --accent: #ff6b61;
    --accent-soft: rgba(255, 107, 97, 0.15);

    --ok: #45d99a;
    --ok-soft: rgba(69, 217, 154, 0.14);
    --warn: #f0b45c;
    --warn-soft: rgba(240, 180, 92, 0.14);
    --danger: #ff7a72;
    --danger-soft: rgba(255, 122, 114, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px -14px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 28px 56px -28px rgba(0, 0, 0, 0.8);
  }
}

/* 深色：手动选择（系统为浅色时也生效） */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a101c;
  --bg-soft: #0d1524;
  --surface: #101a2b;
  --surface-2: #152033;
  --surface-3: #1a2740;

  --ink: #e8eef8;
  --ink-800: #0f1929;
  --ink-700: #16233a;
  --text: #e3e9f2;
  --text-2: #a4b0c6;
  --text-3: #7a869e;

  --border: #22304a;
  --border-strong: #31415f;

  --brand: #4f8dff;
  --brand-strong: #79a8ff;
  --brand-soft: rgba(79, 141, 255, 0.16);
  --brand-contrast: #ffffff;

  --accent: #ff6b61;
  --accent-soft: rgba(255, 107, 97, 0.15);

  --ok: #45d99a;
  --ok-soft: rgba(69, 217, 154, 0.14);
  --warn: #f0b45c;
  --warn-soft: rgba(240, 180, 92, 0.14);
  --danger: #ff7a72;
  --danger-soft: rgba(255, 122, 114, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px -14px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 28px 56px -28px rgba(0, 0, 0, 0.8);
}

/* ---------- 2. 基础重置 ---------- */

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

/* 保证 [hidden] 不被组件自身的 display 覆盖（弹窗/开关/令牌按钮等依赖该属性） */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 3. 通用组件 ---------- */

/* 图标按钮 */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.1s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-contrast);
  box-shadow: 0 1px 2px rgba(31, 111, 235, 0.35);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.92);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn.is-loading {
  position: relative;
  color: transparent !important;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

.btn-secondary.is-loading::after,
.btn-ghost.is-loading::after {
  border-color: var(--border-strong);
  border-top-color: var(--brand);
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.badge-brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--surface-3); color: var(--text-2); }

.badge .dot {
  width: 6px;
  height: 6px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pcolor, var(--brand));
  flex: none;
}

/* 平台徽标 / 平台标签：中性底 + 平台色圆点，深色模式下也清晰 */
.platform-badge,
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.platform-badge .pdot,
.platform-chip .pdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pcolor, var(--brand));
  flex: none;
}

/* 今日新增 */
.new-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.new-chip::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tag:hover {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* 表单 */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span,
.field > .field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--text-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.textarea {
  height: auto;
  min-height: 104px;
  padding: 10px 12px;
  line-height: 1.65;
  resize: vertical;
}

.input-sm {
  height: 32px;
  font-size: 13px;
  padding: 0 10px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

/* 开关 */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 38px;
  height: 22px;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.18s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch-track {
  background: var(--brand);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

/* 加载骨架 */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius-xs);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: skeleton-shimmer 1.4s ease infinite;
}

:root[data-theme="dark"] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  }
}

@keyframes skeleton-shimmer {
  100% { transform: translateX(100%); }
}

/* 空态 / 错误态 */
.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-3);
}

.empty-state svg,
.error-state svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
  margin-bottom: 4px;
}

.empty-state strong,
.error-state strong {
  font-size: 15px;
  font-weight: 650;
  color: var(--text-2);
}

.empty-state p,
.error-state p {
  font-size: 13.5px;
  max-width: 420px;
  line-height: 1.7;
}

.error-state svg {
  color: var(--danger);
}

/* ---------- 4. 新闻站：顶部 ---------- */

.site-header {
  position: relative;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.utility-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-3);
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  flex-wrap: wrap;
}

.utility-left,
.utility-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.utility-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.utility-stat {
  font-variant-numeric: tabular-nums;
}

.utility-stat b {
  color: var(--text-2);
  font-weight: 650;
}

.utility-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  color: var(--text-2);
  transition: color 0.15s ease, background 0.15s ease;
}

.utility-link:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.utility-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.masthead {
  padding: 22px 0;
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.masthead-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.search {
  display: flex;
  align-items: stretch;
  width: min(340px, 38vw);
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
}

.search input::placeholder {
  color: var(--text-3);
}

.search button {
  display: grid;
  place-items: center;
  width: 46px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease;
}

.search button:hover {
  background: var(--brand);
  color: #fff;
}

.search button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 手动深色切换按钮：显示太阳/月亮 */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* 平台导航 */
.platform-nav {
  border-top: 1px solid var(--border);
}

.platform-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.platform-tabs::-webkit-scrollbar {
  display: none;
}

.platform-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.platform-tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.platform-tab.is-active {
  color: var(--brand-strong);
  border-bottom-color: var(--brand);
}

.tab-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

.platform-tab.is-active .tab-count {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

/* 页面提示条（搜索 / 标签） */
.notice-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 44px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13.5px;
  color: var(--text-2);
}

.notice-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.notice-inner strong {
  color: var(--text);
  font-weight: 700;
}

.notice-clear {
  margin-left: auto;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 600;
}

.notice-clear:hover {
  text-decoration: underline;
}

/* ---------- 5. 新闻站：主体布局 ---------- */

.site-main {
  padding-top: 28px;
  padding-bottom: 48px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: var(--text);
}

.section-kicker::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

.section-kicker .section-note {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
}

.section-kicker .section-link {
  margin-left: auto;
  font-size: 13px;
  font-weight: 550;
  color: var(--brand-strong);
}

.section-kicker .section-link:hover {
  text-decoration: underline;
}

/* 头条区 */
.headline-section {
  margin-bottom: 36px;
}

.headline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
}

.lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 340px;
}

.lead-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.lead-card .lead-cover {
  min-height: 100%;
}

.lead-cover .cover-img {
  transition: transform 0.5s ease;
}

.lead-card:hover .lead-cover .cover-img {
  transform: scale(1.03);
}

.lead-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 26px;
  min-width: 0;
}

.lead-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-title {
  font-size: 26px;
  font-weight: 740;
  line-height: 1.36;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-title a:hover {
  color: var(--brand-strong);
}

.lead-summary {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
}

.meta-row .meta-author {
  color: var(--text-2);
  font-weight: 600;
}

.meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}

.meta-row time {
  font-variant-numeric: tabular-nums;
}

/* 次条 */
.lead-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.mini-card {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 0;
}

.mini-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.mini-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mini-title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-title a:hover {
  color: var(--brand-strong);
}

.mini-cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  align-self: center;
  width: 100%;
}

/* 封面（图片 + 平台色降级块，img onerror 会被移除，自动露出降级块） */
.cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0b1220;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(
      120% 120% at 82% 0%,
      color-mix(in srgb, var(--pcolor, #1f6feb) 52%, transparent) 0%,
      transparent 62%
    ),
    linear-gradient(135deg, #16264a 0%, #0a1220 100%);
  color: rgba(255, 255, 255, 0.85);
}

.cover-fallback svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

.cover-fallback em {
  font-style: normal;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.82);
}

.cover-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1220;
}

/* 外链封面加载失败（403/防盗链）时，隐藏图片露出平台色占位块 */
.cover.is-fallback .cover-img {
  display: none;
}

.cover .platform-chip {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  border-color: transparent;
  background: rgba(9, 15, 27, 0.74);
  color: #fff;
}

.cover .platform-chip .pdot {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.cover .new-flag {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

/* 主体两栏 */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.content-main {
  display: flex;
  flex-direction: column;
  gap: 34px;
  min-width: 0;
}

/* 平台分组 */
.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.group-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.group-title .dot {
  width: 10px;
  height: 10px;
}

.group-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}

.group-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 550;
  color: var(--brand-strong);
  white-space: nowrap;
}

.group-more:hover {
  text-decoration: underline;
}

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

/* 新闻卡片 */
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-cover {
  aspect-ratio: 16 / 9;
}

.card-cover .cover-img {
  transition: transform 0.45s ease;
}

.news-card:hover .card-cover .cover-img {
  transform: scale(1.04);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 15px 15px;
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: var(--brand-strong);
}

.card-summary {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-3);
}

.card-meta .meta-author {
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font-weight: 550;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px dashed var(--border);
}

.card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.card-stats {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: var(--text-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.stat-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.stat-inline svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

a.page-btn:hover {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.page-btn.is-current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 650;
}

.page-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  color: var(--text-3);
  font-size: 13px;
}

/* ---------- 6. 新闻站：右侧栏 ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  position: sticky;
  top: 24px;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.side-title .side-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
}

.cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cloud-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  line-height: 1.55;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cloud-tag:hover {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.cloud-tag span {
  font-size: 10.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.cloud-tag.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 650;
}

.side-empty {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.7;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.timeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}

.timeline-row .date {
  font-variant-numeric: tabular-nums;
}

.timeline-row .count {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.timeline-bar {
  height: 5px;
  margin-top: -6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.timeline-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  opacity: 0.85;
}

.about-text {
  font-size: 13px;
  line-height: 1.78;
  color: var(--text-2);
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-size: 13px;
  transition: color 0.15s ease, background 0.15s ease;
}

.side-link:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.side-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- 7. 新闻站：详情页 ---------- */

.detail-main {
  padding-top: 26px;
  padding-bottom: 56px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.article {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 12.5px;
  color: var(--text-3);
}

.breadcrumb a:hover {
  color: var(--brand-strong);
}

.breadcrumb .current {
  color: var(--text-2);
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.article-title {
  margin-bottom: 16px;
  font-size: 34px;
  font-weight: 750;
  line-height: 1.32;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.article-dek {
  margin-bottom: 18px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-2);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 600;
}

.author-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.article-cover {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.article-cover.cover {
  position: relative;
}

.article-body {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text);
}

.article-body p {
  margin: 0 0 16px;
}

.article-body .article-summary {
  padding: 18px 20px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.85;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0;
}

.stat-tile {
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: center;
}

.stat-tile b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.stat-tile span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 26px 0;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, var(--brand-soft), transparent 72%),
    var(--surface);
}

.cta-card .cta-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.cta-card .cta-text span {
  font-size: 12.5px;
  color: var(--text-2);
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.article-tags .tags-label {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-3);
}

.article-tags .tag {
  height: 26px;
  padding: 0 9px;
  font-size: 12.5px;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 550;
}

.back-home:hover {
  color: var(--brand-strong);
}

.back-home svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.related-list li + li {
  border-top: 1px solid var(--border);
}

.related-link {
  display: block;
  padding: 12px 0;
}

.related-link:hover .rel-title {
  color: var(--brand-strong);
}

.rel-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.55;
  transition: color 0.15s ease;
}

.rel-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}

.source-card p {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-2);
}

.source-card .source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 600;
}

.source-card .source-link:hover {
  text-decoration: underline;
}

.side-console {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.side-console:hover {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* ---------- 8. 新闻站：页脚 ---------- */

.site-footer {
  margin-top: 44px;
  background: #0b1220;
  color: #c3cbd9;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  padding: 38px 0 28px;
}

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

.footer-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.footer-brand strong {
  display: block;
  color: #f1f5f9;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.footer-brand em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: #8ea0b8;
  margin-top: 2px;
}

.footer-note {
  margin-top: 14px;
  max-width: 560px;
  color: #8ea0b8;
  font-size: 12.5px;
  line-height: 1.85;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 13px;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid #1e293b;
  color: #7c8aa0;
  font-size: 12px;
}

.footer-bottom .footer-source {
  font-variant-numeric: tabular-nums;
}

/* ---------- 9. 404 页 ---------- */

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background:
    radial-gradient(80% 60% at 50% 0%, var(--brand-soft) 0%, transparent 62%),
    var(--bg);
}

.error-page .theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.error-card {
  width: 100%;
  max-width: 540px;
  padding: 46px 36px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.error-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.error-code {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--brand) 10%, var(--accent) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-title {
  margin: 14px 0 8px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.error-desc {
  margin: 0 auto 26px;
  max-width: 400px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.error-help {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.8;
}

/* ---------- 10. 响应式 ---------- */

@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 26px;
  }

  .lead-title {
    font-size: 23px;
  }
}

@media (max-width: 1024px) {
  .headline-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-side {
    flex-direction: row;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .detail-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
  }

  .stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --gutter: 18px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .masthead {
    padding: 16px 0;
  }

  .masthead-inner {
    flex-wrap: wrap;
    gap: 14px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand-text strong {
    font-size: 21px;
  }

  .masthead-right {
    width: 100%;
  }

  .search {
    width: 100%;
  }

  .lead-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .lead-card .lead-cover {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .lead-title {
    font-size: 22px;
  }

  .lead-side {
    flex-direction: column;
  }

  .utility-date {
    display: none;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .article-title {
    font-size: 27px;
  }

  .article-dek {
    font-size: 15.5px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 14.5px;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .headline-section {
    margin-bottom: 28px;
  }

  .content-main {
    gap: 28px;
  }

  .lead-body {
    padding: 18px;
  }

  .lead-title {
    font-size: 20px;
  }

  .mini-card {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .mini-title {
    -webkit-line-clamp: 2;
  }

  .site-main {
    padding-top: 20px;
  }

  .group-title {
    font-size: 16px;
  }

  .article-title {
    font-size: 23px;
  }

  .article-meta {
    gap: 8px;
  }

  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-card {
    padding: 16px;
  }

  .error-card {
    padding: 36px 22px;
    border-radius: 18px;
  }

  .error-code {
    font-size: 52px;
  }

  .article-cover {
    border-radius: var(--radius);
  }

  .related-link {
    padding: 10px 0;
  }

  .sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-aside {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 11. 无障碍 / 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
