/* 异动志 · 视觉层（skin）
   加载在 app.css 之后：只覆盖「观感」，不改布局结构，不影响任何模板的 class。
   回滚：删掉 base.html 里引用 skins.css 的那一行即可恢复原样。

   设计原则
   1. 一个底色 + 一个强调色，其余全部用中性灰阶拉开层次；
   2. 中文衬线做标题、无衬线做正文、等宽做数字，三层字体分工；
   3. 用发丝线和大留白代替阴影，卡片不再「浮」起来；
   4. 强调色只出现在「可点击」和「涨跌」两处，别处一律中性。
*/

:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-2: #f8f9fa;
  --text: #15181e;
  --muted: #6f7681;
  --line: #e5e6e9;
  --brand: #1d4ed8;
  --brand-soft: #eef2ff;
  --up: #d02f3a;
  --down: #0b7f57;
  --warn: #b45309;

  /* 层次与刻度 */
  --hair: rgba(21, 24, 30, .07);
  --hair-2: rgba(21, 24, 30, .12);
  --radius: 14px;
  --shadow: none;

  /* 字体分工 */
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

html[data-theme="eye"] {
  --hair: rgba(70, 60, 47, .14);
  --hair-2: rgba(70, 60, 47, .20);
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(29, 78, 216, .16); }

*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 细滚动条，避免整页出现系统粗条 */
* { scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--hair-2); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------------- 侧栏：从「三张浮卡」收成一条连续的栏 ---------------- */
.side {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 14px 12px 16px;
  gap: 4px;
}

.brand-card,
.user-card,
.nav-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brand-card {
  padding: 4px 6px 12px;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 6px;
}

.logo-mark { border-radius: 6px; }

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
}

.brand-text span {
  font-size: 10px;
  letter-spacing: .01em;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-toggle {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .01em;
  opacity: .85;
  flex: 0 0 auto;
  gap: 5px;
}
.theme-toggle:hover { opacity: 1; }

.user-card {
  padding: 10px 6px;
  gap: 9px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 6px;
}

.avatar {
  border-radius: 7px;
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.user-meta strong { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.user-meta span { font-size: 10.5px; letter-spacing: .01em; }

.nav-card { padding: 0; }

.nav-item {
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12.8px;
  letter-spacing: .02em;
  color: var(--muted);
  transition: background-color .14s, color .14s;
}

.nav-item:hover {
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  background: transparent;
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--text);
  border-radius: 0 8px 8px 0;
  padding-left: 11px;
}

.nav-item.active .nav-ico {
  background: transparent;
  color: var(--text);
  opacity: 1;
}

.nav-ico {
  width: 16px;
  font-size: 12px;
  opacity: .8;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
}

.subnav { margin: 2px 0 4px 22px; }
.subnav a { font-size: 12px; color: var(--muted); border-radius: 6px; padding: 4px 8px; }
.subnav a::before { opacity: .5; }

.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hair); gap: 6px; }

/* ---------------- 主区与顶栏 ---------------- */
.main { padding: 20px 26px 56px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  gap: 12px;
  margin: -20px -26px 18px;
  padding: 11px 26px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}

.ar-btn {
  height: 30px;
  border-radius: 7px;
  border-color: var(--line);
  background: var(--panel);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--muted);
}
.ar-btn:hover { color: var(--text); border-color: var(--hair-2); }
.ar-btn.on { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); background: var(--brand-soft); }
.ar-tip { font-size: 11px; font-family: var(--font-mono); }

.search-wrap { width: 300px; }

.search-wrap input {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 12.5px;
  padding: 0 34px 0 12px;
  transition: border-color .14s, box-shadow .14s;
}
.search-wrap input::placeholder { color: var(--muted); opacity: .8; }
.search-wrap input:focus {
  border-color: var(--hair-2);
  box-shadow: 0 0 0 3px var(--hair);
  outline: none;
}

.search-btn {
  right: 3px;
  top: 3px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  transition: color .14s, background-color .14s;
}
.search-btn:hover { background: var(--panel-2); color: var(--text); }

.search-pop { border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .10); border-color: var(--line); }

/* ---------------- 卡片 ---------------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.page-head { gap: 16px; margin-bottom: 2px; }

.page-head h1 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.3;
  margin: 0 0 6px;
}

.page-head p { font-size: 12.5px; line-height: 1.75; max-width: 960px; }

.meta-line {
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .01em;
}

.meta-line b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.01em;
}

.head-tools { gap: 8px; }

/* ---------------- 按钮 ---------------- */
.btn {
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  letter-spacing: .02em;
  transition: background-color .14s, border-color .14s, color .14s;
}

.btn:hover {
  border-color: var(--hair-2);
  background: var(--panel-2);
  color: var(--text);
}

.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--panel);
}
.btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--panel);
  opacity: .86;
}

.btn-sm { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }

/* ---------------- 标签页 ---------------- */
.tabs {
  gap: 2px;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0;
  margin-top: 16px;
}

.tab {
  border: 0;
  background: none;
  border-radius: 0;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--muted);
  position: relative;
  letter-spacing: .01em;
}

.tab:hover { color: var(--text); background: none; text-decoration: none; }

.tab.on {
  color: var(--text);
  font-weight: 600;
  background: none;
  box-shadow: none;
}

.tab.on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* ---------------- 标签 ---------------- */
.tag {
  font-size: 10.5px;
  line-height: 1.6;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  letter-spacing: .02em;
  font-weight: 400;
}

.tag-up {
  color: var(--up);
  border-color: color-mix(in srgb, var(--up) 22%, transparent);
  background: color-mix(in srgb, var(--up) 7%, transparent);
}

.tag-down {
  color: var(--down);
  border-color: color-mix(in srgb, var(--down) 22%, transparent);
  background: color-mix(in srgb, var(--down) 7%, transparent);
}

.tag-src { color: var(--muted); background: transparent; }

/* ---------------- 表格 ---------------- */
.table { font-size: 12.8px; }

.table th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 9px 10px;
  border-bottom: 1px solid var(--hair-2);
  background: transparent;
}

.table td {
  padding: 10px;
  border-bottom: 1px solid var(--hair);
  line-height: 1.6;
}

.table tbody tr:hover { background: var(--panel-2); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* ---------------- 指标卡 ---------------- */
.metrics { gap: 12px; }

.metric {
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel);
}

.metric .k {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 3px;
}

.metric .v {
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.metric .s { font-size: 10.5px; letter-spacing: .01em; }

.metric.up, .metric.down { border-left-width: 2px; }
.metric.up { border-left-color: var(--up); }
.metric.down { border-left-color: var(--down); }

/* ---------------- 快讯列表 ---------------- */
.brief { padding: 18px 2px 16px; border-bottom: 1px solid var(--hair); }
.brief-head { gap: 9px; margin-bottom: 8px; }
.brief-head .src { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; }
/* 正文限宽：中文一行 40~45 字最舒服，太宽会读断行 */
.brief-body { font-size: 13.5px; line-height: 1.95; letter-spacing: .015em; max-width: 820px; }
.brief-actions { margin-top: 10px; }
.brief-note { font-size: 11px; opacity: .75; }

/* ---------------- 页脚 ---------------- */
.footer-note {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--muted);
  letter-spacing: .01em;
}

.foot-links { margin-top: 10px; gap: 10px; font-size: 11.5px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--text); }
.foot-links i { opacity: .4; font-style: normal; }

/* ---------------- 杂项 ---------------- */
.pill, .chip, .cat-item { border-radius: 7px; }

.empty-note {
  font-size: 12.5px;
  color: var(--muted);
  padding: 22px 0;
  text-align: center;
  letter-spacing: .02em;
}

.pager { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

hr { border: 0; border-top: 1px solid var(--hair); }

/* ---------------- 登录 / 注册（独立页，样式单列） ---------------- */
.auth-wrap { background: var(--bg); padding: 48px 16px; }

.auth-card {
  max-width: 400px;
  border-radius: 16px;
  box-shadow: none;
  padding: 30px 28px;
}

.auth-card h1 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: .04em;
  margin: 0 0 8px;
}

.auth-card p.hint { font-size: 12.5px; line-height: 1.8; margin: 0 0 20px; }

.field { margin-bottom: 14px; }

.field label {
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  height: 38px;
  border-radius: 9px;
  background: var(--panel);
  font-size: 13.5px;
  transition: border-color .14s, box-shadow .14s;
}

.field input:focus {
  border-color: var(--hair-2);
  box-shadow: 0 0 0 3px var(--hair);
}

.auth-foot { font-size: 12px; }

/* ---------------- 窄屏 ---------------- */
@media (max-width: 900px) {
  .side {
    width: 100%;
    flex: 1 1 auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px 12px;
  }
  .main { padding: 16px 14px 40px; }
  .topbar {
    margin: -16px -14px 14px;
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .search-wrap { width: 100%; }
  .card { padding: 16px 14px; }
  .page-head h1 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ================================================================
   横版骨架（v2）：左侧竖栏 → 顶部两行横向导航
   结构在 base.html 里已改为 .hdr（.hdr-row + .hnav）+ .main；
   原 .side / .nav-card / .user-card / .side-foot 已从模板移除，
   下面只写新结构，旧规则留着不影响（无对应 DOM）。
   ================================================================ */
.layout { display: block; }

.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* ---- 第一行 ---- */
.hdr-row {
  max-width: 1440px;
  margin: 0 auto;
  height: 60px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .logo-mark { width: 27px; height: 27px; border-radius: 7px; }

.brand-text { min-width: 0; display: block; }
.brand-text strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .09em;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
}
.brand-text > span {
  display: block;
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  letter-spacing: .04em;
  margin-top: 2px;
  white-space: nowrap;
}

.hdr-right {
  margin-left: auto;
  min-width: 0;
  flex: 0 0 auto; /* 右侧控件按自身宽度，不参与收缩 */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* 每日一记：顶栏中段跑马灯；悬停暂停 + 出卡片看全文（句子长短不一，不挤版面） */
.hdr-quote {
  position: relative;
  /* basis 必须为 0：否则按跑马灯内容宽(1300px+)参与收缩，会挤压右侧搜索框 */
  flex: 1 1 0;
  min-width: 0;
  margin: 0 6px 0 2px;
  padding-left: 14px;
  display: flex;
  align-items: center;
  align-self: stretch; /* 撑满行高，让浮层从顶栏下沿探出 */
  cursor: default;
}
.hdr-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 15px;
  margin-top: -7.5px;
  background: var(--hair-2);
}

/* 视口：两端淡出，字进出不硬切 */
.hq-view {
  /* basis 必须为 0：跑马灯内容宽 1300px，用 auto 会参与 flex 收缩，把右侧搜索框挤窄 */
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 26px), transparent 100%);
}

.hq-track {
  display: flex;
  width: max-content;
  will-change: transform;
  /* 无论长短都滚动；短句由脚本补足最小宽度，保证 -50% 位移时无缝衔接 */
  animation: hq-marquee var(--hq-dur, 40s) linear infinite;
}

@keyframes hq-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.hq-text {
  flex: none;
  padding-right: 56px; /* 句间留白；与 -50% 配合实现无缝循环 */
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
  transition: color .16s;
}

/* 悬停：暂停滚动 + 文字提亮 */
.hq-view:hover .hq-track { animation-play-state: paused; }
.hq-view:hover .hq-text { color: var(--text); }

.hq-pop {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 80;
  width: max-content;
  max-width: 430px;
  padding: 12px 15px;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: .01em;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .13);
  white-space: normal;
  pointer-events: none;
  /* 用 visibility 而非 display，避免「display:none 后 JS 恢复失效」那类坑 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
/* 停 0.28s 再弹，鼠标横穿顶栏不会闪卡 */
.hq-view:hover + .hq-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: .28s, .28s, 0s;
}

/* 空间不够时先让位给搜索框与账号区（1240px 以下搜索框会被挤压，直接收起金句） */
@media (max-width: 1240px) {
  .hdr-quote { display: none; }
}

/* 自动刷新：收紧成一根细条 */
.hdr .ar { gap: 6px; }
.hdr .ar-tip { font-size: 10.5px; opacity: .8; }

/* 搜索框：融入顶栏，静默态无边框 */
.hdr .search-wrap { width: 216px; margin-left: 0; }
.hdr .search-wrap input {
  height: 32px;
  border-color: transparent;
  background: var(--panel-2);
  font-size: 12.5px;
  padding: 0 32px 0 11px;
}
.hdr .search-wrap input:hover { background: color-mix(in srgb, var(--panel-2) 60%, var(--line)); }
.hdr .search-wrap input:focus {
  background: var(--panel);
  border-color: var(--hair-2);
  box-shadow: 0 0 0 3px var(--hair);
}
.hdr .search-btn { top: 2px; right: 2px; width: 28px; height: 28px; }

.theme-toggle { margin-left: 0; gap: 6px; }
.theme-toggle .tt-label {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .02em;
}

/* 账号区：头像 + 名字的胶囊 */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  transition: background-color .14s, border-color .14s;
}
.user-chip:hover { background: var(--panel-2); border-color: var(--hair-2); text-decoration: none; }
.user-chip .avatar {
  width: 24px; height: 24px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--text);
  color: var(--panel);
}
.user-name {
  font-size: 12.5px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-vip {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--brand-soft);
  color: var(--brand);
}
.hdr-link { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.hdr-link:hover { color: var(--text); }

/* ---- 第二行：横向导航 ---- */
.hnav { border-top: 1px solid var(--hair); }

.hnav-inner {
  max-width: 1440px;
  margin: 0 auto;
  /* 与 .hdr-row 的 28px 对齐，让分组标签的左边缘和品牌 logo 落在同一条竖线上 */
  padding: 0 28px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.hnav-inner::-webkit-scrollbar { display: none; }

.hnav-item {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 43px;
  padding: 0 13px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .14s;
}
.hnav-item:hover { color: var(--text); text-decoration: none; }
.hnav-item.on { color: var(--text); font-weight: 600; }
.hnav-item.on::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
}
/* ---- 导航分组：极淡的分组小标签 + 组间发丝竖线 ---- */
.hnav-group {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}
.hnav-group-end { margin-left: auto; }

/* 组间分隔：细到 1px、只有 14px 高，和导航下划线同一档灰度 */
.hnav-group + .hnav-group::before {
  content: "";
  flex: 0 0 auto;
  width: 1px;
  height: 14px;
  margin: 0 10px 0 6px;
  background: var(--line);
}

.hnav-label {
  flex: 0 0 auto;
  padding: 1px 0 0;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .18em;
  color: var(--muted);
  opacity: .68;
  user-select: none;
  transition: opacity .14s;
}
.hnav-group:hover .hnav-label { opacity: .95; }

.hnav-sub { font-size: 12.5px; }
.hnav-item .nav-badge { margin-left: 2px; }

.hnav-more {
  margin-left: 6px;
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .14s, border-color .14s;
}
.hnav-more:hover { color: var(--text); border-color: var(--line); }

/* 右侧工具区与账号区之间也补一道发丝线，和导航的分隔呼应 */
.hdr .theme-toggle {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

/* ---- 数据质量门禁黄条（页头下方，仅在当日有断源/降级时出现）---- */
.dq-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: 1440px; margin: 10px auto -8px; padding: 8px 14px;
  border-radius: 10px; font-size: 12.5px; line-height: 1.5;
  background: #fff8e6; color: #8a5a00; border: 1px solid #f5d98a;
}
.dq-bar.alert { background: #fff0f0; color: #a11; border-color: #f3b5b5; }
.dq-icon {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%;
  background: #f0b429; color: #fff; font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.dq-bar.alert .dq-icon { background: #d64545; }
.dq-text { flex: 1 1 320px; }
.dq-detail {
  flex: 1 1 100%; font-size: 11px; opacity: .82;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: help;
}
html[data-theme="eye"] .dq-bar { background: #f6ecd6; color: #7a4e00; border-color: #d9bd80; }
html[data-theme="eye"] .dq-bar.alert { background: #f3e0dc; color: #8c3a2c; border-color: #d3a396; }

/* ---- 主区：横版后正文可占满宽，但仍留一个上限防止行长过宽 ---- */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 28px 64px;
}

/* ---- 横版下的收窄处理 ---- */
@media (max-width: 1200px) {
  .brand-text > span { display: none; }
  .hdr .ar-tip { display: none; }
  .hdr .search-wrap { width: 186px; }
  /* 窄屏先收掉分组小标签，保留竖线，分隔感还在但不占宽度 */
  .hnav-label { display: none; }
  .hnav-group + .hnav-group::before { margin: 0 8px 0 4px; }
}

@media (max-width: 1000px) {
  .hdr-row { height: 56px; padding: 0 16px; gap: 12px; }
  .hdr-right { gap: 8px; }
  .hdr .search-wrap { width: 156px; }
  .theme-toggle .tt-label { display: none; }
  .hdr-link { display: none; }
  .hnav-inner { padding: 0 16px; }
  .main { padding: 18px 16px 48px; }
}

@media (max-width: 760px) {
  .hdr-row { height: auto; padding: 9px 14px 8px; flex-wrap: wrap; gap: 8px; }
  /* 拆开 .hdr-right 容器，让搜索框能独占一行、账号控件留在第一行右侧 */
  .hdr-right { display: contents; }
  .brand { order: 1; }
  .theme-toggle { order: 2; margin-left: auto; padding-left: 0; border-left: 0; }
  .user-chip, .hdr-right > .btn, .hdr-link { order: 3; }
  .hdr .ar { display: none; }
  .hdr .search-wrap { order: 4; flex: 1 1 100%; width: 100%; }
  .user-name { display: none; }
  .user-chip { padding: 0 4px; }
  /* 「我的」组不再靠右，跟着一起横向滚动 */
  .hnav-group-end { margin-left: 0; }
  .hnav-group + .hnav-group::before { margin: 0 6px 0 2px; }
  .hnav-item { height: 40px; padding: 0 10px; font-size: 12.5px; }
  .hnav-item.on::after { left: 10px; right: 10px; }
  .hnav-more { display: none; }
  .main { padding: 14px 12px 44px; }

  /* 页头工具条在窄屏独占一行，避免输入框被挤出卡片 */
  .page-head { flex-wrap: wrap; row-gap: 10px; }
  .page-head > :first-child { flex: 1 1 100%; }
  .head-tools { margin-left: 0; width: 100%; flex: 1 1 100%; }
  .head-tools > * { flex: 1 1 auto; min-width: 0; }
  .head-tools input, .head-tools select { flex: 1 1 auto; min-width: 0; }
}

/* ================================================================
   「全部服务」弹窗：沿用导航的分组思路
   每组一个极淡小标题 + 一条延伸到右侧的发丝线，两列排布。
   ================================================================ */
.modal { max-width: 780px; }
.svc-groups {
  display: flex;
  gap: 0 30px;
}
.svc-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.svc-group h4 {
  margin: 0 0 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .18em;
  color: var(--muted);
  opacity: .85;
}
.svc-group h4::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--hair);
}
.svc-group dl { margin: 0; }
.svc-group dt {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.svc-group dt:first-of-type { margin-top: 0; }
.svc-group dd {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 720px) {
  .svc-groups { display: block; }
  .svc-col { display: block; }
  .svc-col + .svc-col { margin-top: 16px; }
  .modal { padding: 18px 16px; }
}
