/* =============================================================================
   磁力导航 (yiteng999.com) 前台样式
   —— 对齐参考站 4adh（WebStack Pro · 灰白模式）的视觉语言：
      左侧浅灰图标栏 + 悬浮半透明顶栏 + 整屏大图首屏 + 药丸标签 + 白色圆角卡片
   —— 零 JS 渲染：所有列表、分页、正文均已由 PHP 输出，本文件只负责视觉
   ========================================================================== */

/* ------------------------------------------------------------------ 变量 */
:root {
  --accent: #f1404b;          /* 参考站主色（红） */
  --accent-d: #d92a36;
  --accent-soft: rgba(241, 64, 75, .1);
  --ink: #282a2d;             /* 参考站正文色 */
  --text: #3f454c;
  --mut: #7f868d;
  --faint: #a6abb1;
  --bg: #f9f9f9;              /* 参考站 body 背景 */
  --panel: #fff;
  --soft: #f2f4f6;
  --line: rgba(129, 129, 129, .15);
  --line-2: rgba(129, 129, 129, .26);
  --rail: #f0f2f4;            /* 参考站侧栏灰 */
  --rail-ink: #515c6b;
  --dark: #2c2e2f;            /* 参考站深色块 */
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 0 10px rgba(0, 0, 0, .05);
  --shadow-up: 0 26px 40px -24px rgba(0, 36, 100, .3);
  --wrap: 1440px;
  --rail-w: 60px;
  --head-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "SF Pro SC", "SF Pro Text", "SF Pro Icons", PingFang SC, Lantinghei SC,
    "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; border: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.35; margin: 0; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.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: 12px; top: -60px; z-index: 999;
  padding: 8px 14px; border-radius: 0 0 10px 10px;
  background: var(--accent); color: #fff; font-size: 13px;
}
.skip-link:focus { top: 0; }

/* =========================================================================
   一、外层骨架：左侧图标栏 + 右侧内容区
   ====================================================================== */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 1081;
  width: var(--rail-w); padding: 0;
  display: flex; flex-direction: column;
  background: var(--rail);
  border-right: 1px solid var(--line);
  overflow: hidden;
  transition: width .22s ease, box-shadow .22s ease;
}
.rail:hover,
.rail:focus-within { width: 198px; box-shadow: 12px 0 30px rgba(20, 27, 38, .08); }

.rail-logo {
  display: flex; align-items: center; gap: 10px;
  height: var(--head-h); padding: 0 12px; flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}
.rail-logo .rail-mark { flex: 0 0 auto; width: 34px; height: 34px; }
.rail-logo .rail-text {
  font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap;
  opacity: 0; transform: translateX(-6px); transition: opacity .2s .04s, transform .2s .04s;
}
.rail:hover .rail-logo .rail-text,
.rail:focus-within .rail-logo .rail-text { opacity: 1; transform: none; }

.rail-nav { flex: 1 1 auto; padding: 10px 0; overflow-y: auto; overflow-x: hidden; }
.rail-foot { flex: 0 0 auto; padding: 8px 0; border-top: 1px solid var(--line); }

.rail-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 20px; color: var(--rail-ink);
  white-space: nowrap; transition: color .18s, background .18s;
}
.rail-item i {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
}
.rail-item span {
  font-size: 13px; opacity: 0; transform: translateX(-6px);
  transition: opacity .2s .04s, transform .2s .04s;
}
.rail:hover .rail-item span,
.rail:focus-within .rail-item span { opacity: 1; transform: none; }
.rail-item:hover { color: var(--accent); background: rgba(255, 255, 255, .7); }
.rail-item.is-active { color: var(--accent); }
.rail-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}

.shell {
  position: relative; margin-left: var(--rail-w);
  min-height: 100vh; display: flex; flex-direction: column;
}

/* =========================================================================
   二、顶部导航（首页悬浮在大图上，内页为白色吸顶）
   ====================================================================== */
.page-header {
  position: sticky; top: 0; z-index: 80;
  background: #fff; box-shadow: 0 0 25px 5px rgba(10, 10, 10, .05);
}
.page-header--over {
  position: absolute; top: 0; left: 0; right: 0;
  background: transparent; box-shadow: none;
}
.ph-inner {
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 26px;
  height: var(--head-h); display: flex; align-items: center; gap: 8px;
}

/* 桌面端 Logo 在左侧图标栏里，顶栏不再重复；移动端侧栏隐藏后才显示 */
.brand { display: none; align-items: center; gap: 9px; flex: 0 0 auto; margin-right: 6px; }
.brand-mark { display: flex; align-items: center; }
.brand-text { font-size: 16px; font-weight: 800; letter-spacing: .5px; color: var(--ink); }
.brand-logo { display: block; max-height: 36px; width: auto; }

.topnav { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 7px 12px; border-radius: 6px;
  font-size: 13.5px; color: var(--ink); white-space: nowrap;
  transition: color .18s, background .18s;
}
.nav-link:hover { color: var(--accent); background: rgba(0, 0, 0, .035); }
.nav-link.is-active { color: var(--accent); font-weight: 600; }

.page-header--over .nav-link { color: #23282f; text-shadow: 0 1px 6px rgba(255, 255, 255, .55); }
.page-header--over .nav-link:hover { background: rgba(255, 255, 255, .45); color: var(--accent); }

.nav-sub {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 95;
  min-width: 186px; padding: 8px;
  background: #fff; border-radius: var(--radius-sm);
  box-shadow: 0 5px 20px 0 rgba(0, 0, 0, .15);
  display: none; flex-direction: column; gap: 2px;
}
.nav-item:hover .nav-sub,
.nav-item:focus-within .nav-sub { display: flex; }
.nav-sub a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-radius: 6px; font-size: 13px; color: var(--text);
}
.nav-sub a:hover { background: var(--soft); color: var(--accent); }
.nav-sub em { font-style: normal; font-size: 11.5px; color: var(--faint); }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.btn-all {
  padding: 7px 15px; border-radius: 50px; font-size: 13px;
  background: var(--dark); color: #fff;
  transition: background .18s, transform .18s;
}
.btn-all:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-search-icon {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 50px; font-size: 13px;
  color: var(--ink); background: rgba(255, 255, 255, .5); border: 1px solid var(--line-2);
}
.page-header:not(.page-header--over) .btn-search-icon { background: var(--soft); border-color: transparent; }
.btn-search-icon:hover { color: var(--accent); border-color: var(--accent-soft); }

.nav-toggle {
  display: none; width: 38px; height: 34px; padding: 8px 9px;
  background: rgba(255, 255, 255, .5); border: 1px solid var(--line-2);
  border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; margin: 3px 0; background: var(--ink); border-radius: 2px; }

.mobile-menu {
  display: none; padding: 12px 18px 18px; background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu > a,
.mm-title {
  display: block; padding: 9px 0; font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mm-title { display: flex; justify-content: space-between; color: var(--mut); font-size: 13px; }
.mm-title em { font-style: normal; }
.mm-subs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; }
.mm-subs a {
  padding: 5px 11px; border-radius: 50px; font-size: 12.5px;
  background: var(--soft); color: var(--text);
}

/* =========================================================================
   三、首屏大图（整屏宽背景，不叠加任何滤镜/蒙版）
   ====================================================================== */
.hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: min(580px, 74vh);
  padding: calc(var(--head-h) + 54px) 22px 62px;
  background: var(--dark) var(--hero-bg, none) center / cover no-repeat;
  text-align: center;
}
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 860px; margin: 0 auto; }

/* 玻璃药丸：标题/标语用半透明白底，保证在任何背景下都可读，且不遮挡背景图 */
.hero-title {
  display: block; width: fit-content; margin: 0 auto;
  padding: 8px 26px; border-radius: 50px;
  font-size: 30px; font-weight: 800; letter-spacing: 1px; color: #1f2429;
  background: rgba(255, 255, 255, .52);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 8px 24px rgba(20, 27, 38, .1);
}
.hero-slogan {
  display: block; width: fit-content; margin: 12px auto 0; padding: 4px 16px; border-radius: 50px;
  font-size: 13.5px; letter-spacing: .4px; color: #333a42;
  background: rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero-tabs {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin: 20px 0 0;
}
.hero-tabs a {
  padding: 5px 15px; border-radius: 50px; font-size: 13px; color: #2f353c;
  background: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background .18s, color .18s;
}
.hero-tabs a:hover { background: rgba(255, 255, 255, .72); color: var(--accent); }
.hero-tabs a.is-active { background: var(--dark); color: #fff; }

.hero-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 660px;
  margin: 16px auto 0; padding: 6px 6px 6px 18px;
  background: rgba(255, 255, 255, .86);
  border-radius: 50px;
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 12px 34px rgba(20, 27, 38, .18);
  transition: box-shadow .2s, background .2s;
}
.hero-search:focus-within {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 40px rgba(20, 27, 38, .24);
}
.hs-icon { display: flex; color: var(--faint); flex: 0 0 auto; }
.hs-input {
  flex: 1 1 auto; min-width: 0; height: 40px;
  border: 0; outline: none; background: transparent;
  font-size: 14px; color: var(--ink);
}
.hs-input::placeholder { color: #9aa1a8; }
.hs-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 22px;
  border: 0; border-radius: 50px; cursor: pointer;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  transition: background .18s, transform .18s;
}
.hs-btn:hover { background: var(--accent-d); transform: translateY(-1px); }
.hs-btn svg { display: none; }

.hero-words {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  margin: 16px 0 0; font-size: 12.5px; color: #2f353c;
}
.hero-words > span { text-shadow: 0 1px 8px rgba(255, 255, 255, .7); }
.hero-words a {
  padding: 3px 12px; border-radius: 50px; font-size: 12.5px; color: #2f353c;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-words a:hover { background: rgba(255, 255, 255, .85); color: var(--accent); }

.hero-stat {
  display: inline-block; margin: 14px 0 0; padding: 4px 16px; border-radius: 50px;
  font-size: 12.5px; color: #2f353c; background: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-stat b { color: var(--accent-d); font-size: 13.5px; }
.hero-stat-link { margin-left: 6px; color: #1f5fd0; }
.hero-stat-link:hover { color: var(--accent); }
.hero-tip {
  display: block; width: fit-content; margin: 8px auto 0; padding: 3px 14px;
  background: rgba(255, 255, 255, .3); color: #3f454c;
}

/* 公告条：首页显示在首屏内，内页显示在内容区顶部 */
.domain-tip {
  background: #fff; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--mut); text-align: center; padding: 7px 0;
}
.domain-tip .container { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* =========================================================================
   四、内容区与区块标题（药丸标签，对齐参考站）
   ====================================================================== */
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 26px; }
.page-main { flex: 1 1 auto; padding-top: 22px; padding-bottom: 34px; }
.page-main--home { padding: 0; }
.content-site { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 26px 26px 0; }

.sec-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.sec-title {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 50px;
  background: var(--dark); color: #fff;
  font-size: 14.5px; font-weight: 600; letter-spacing: .3px;
}
.sec-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
.sec-sub {
  font-style: normal; font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, .62);
  margin-left: 2px;
}
.sec-cnt {
  font-size: 11.5px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .18); border-radius: 50px; padding: 0 8px;
}
.sec-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.sec-more {
  font-size: 12.5px; color: var(--mut); padding: 5px 13px;
  border-radius: 50px; background: var(--soft);
}
.sec-more:hover { color: #fff; background: var(--dark); }

.mod { margin-bottom: 30px; }
.mod-intro { margin: -4px 0 16px; font-size: 12.5px; color: var(--mut); }
.mod-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mod-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.mod-title em,
.mod-sub { font-style: normal; font-size: 12.5px; font-weight: 400; color: var(--mut); }
.mod-title .mod-cnt { font-size: 12px; font-weight: 600; color: var(--accent); }
.mod-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mod-chips--line { margin: 2px 0 16px; }
.mod-more {
  margin-left: auto; font-size: 12.5px; color: var(--mut);
  padding: 5px 13px; border-radius: 50px; background: var(--soft);
}
.mod-more:hover { color: #fff; background: var(--dark); }

/* ------------------------------------------------------------------ 酷站位 */
.cool { margin-bottom: 30px; }
.cool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cool-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px; border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.cool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-up); }
.cool-ico { flex: 0 0 auto; display: flex; }
.cool-main { flex: 1 1 auto; min-width: 0; }
.cool-name {
  display: flex; align-items: center; gap: 5px;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cool-badge {
  flex: 0 0 auto; font-style: normal; font-size: 10.5px; font-weight: 600;
  padding: 0 5px; border-radius: 4px; line-height: 16px;
  background: var(--accent); color: #fff;
}
.cool-desc {
  display: block; margin-top: 3px; font-size: 12px; color: var(--mut);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cool-go { flex: 0 0 auto; color: var(--line-2); font-size: 18px; line-height: 1; }
.cool-card:hover .cool-go { color: var(--accent); }

/* ------------------------------------------------------------------ 卡片 */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card-grid--dense { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.link-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 15px 15px 12px;
  background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.link-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-up); }
.lc-head { display: flex; align-items: center; gap: 10px; }
.lc-name {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-badge {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 600; line-height: 16px;
  padding: 0 5px; border-radius: 4px; background: var(--accent); color: #fff;
}
.lc-desc {
  font-size: 12.5px; color: var(--mut); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line);
}
.lc-foot--end { justify-content: flex-end; }
.lc-cat { font-size: 11.5px; color: var(--faint); }
.lc-btn {
  font-size: 12px; font-weight: 500; color: var(--mut);
  padding: 2px 11px; border-radius: 50px; background: var(--soft);
}
.link-card:hover .lc-btn { background: var(--accent); color: #fff; }

.ico-box { flex: 0 0 auto; border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); }
.ico-img { display: block; background: #fff; }
.ico-char { font-weight: 700; color: #fff; }

/* ------------------------------------------------------------------ 文章 */
.art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.art-grid--list { grid-template-columns: 1fr; }
.art-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.art-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 15px 16px;
  background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.art-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-up); }
.ai-main { display: block; }
.ai-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.5;
}
.art-item:hover .ai-title { color: var(--accent); }
.ai-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 4px; font-size: 12.5px; color: var(--mut); line-height: 1.6;
}
.ai-meta {
  display: flex; align-items: center; gap: 8px; margin-top: auto;
  font-size: 11.5px; color: var(--faint);
}
.ai-meta time { margin-left: auto; }

.art-card {
  padding: 16px 17px; background: var(--panel);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.art-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); }
.art-card-title { display: block; font-size: 15.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.art-card:hover .art-card-title { color: var(--accent); }
.art-card-desc { margin: 0 0 10px; font-size: 13px; color: var(--mut); }
.art-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); }
.art-views { color: var(--faint); }

/* ------------------------------------------------------------------ 徽章 */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 50px;
  font-size: 12.5px; color: var(--mut); background: var(--soft);
  transition: color .16s, background .16s;
}
.chip:hover { color: #fff; background: var(--dark); }
.chip.is-active { color: #fff; background: var(--dark); }
.chip-sm { font-size: 11.5px; padding: 2px 9px; background: var(--accent-soft); color: var(--accent-d); }
.chip-cnt { font-size: 11px; color: var(--faint); }
.chip.is-active .chip-cnt { color: rgba(255, 255, 255, .7); }

/* ------------------------------------------------------------------ 分页 */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 24px 0 4px; }
.pg {
  min-width: 34px; height: 34px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text);
  background: var(--panel); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.pg:hover { color: #fff; background: var(--dark); }
.pg.is-active { color: #fff; background: var(--accent); font-weight: 600; }
.pg.is-disabled { color: var(--faint); background: var(--soft); box-shadow: none; }
.pg-gap { padding: 0 4px; color: var(--faint); }
.pg-info { margin-left: 6px; font-size: 12px; color: var(--faint); }

/* ---------------------------------------------------------------- 面包屑 */
.crumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px; font-size: 12.5px; color: var(--mut);
}
.crumb a { color: var(--mut); }
.crumb a:hover { color: var(--accent); }
.crumb-sep { color: var(--line-2); }
.crumb-cur { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ 详情 */
.detail {
  padding: 22px 24px 24px; margin-bottom: 24px;
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
}
.detail-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.detail-title-row { display: flex; align-items: center; gap: 14px; }
.detail-title { font-size: 22px; line-height: 1.4; }
.detail-sub { margin: 6px 0 0; font-size: 13px; color: var(--mut); }
.detail-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12.5px; color: var(--faint);
}
.detail-meta a { color: var(--accent); }
.detail-body { font-size: 14px; color: var(--text); }
.detail-body h2 {
  margin: 24px 0 10px; padding-left: 11px;
  font-size: 17px; border-left: 3px solid var(--accent); border-radius: 2px; line-height: 1.4;
}
.detail-body h3 { margin: 18px 0 8px; font-size: 15.5px; }
.detail-body p { line-height: 1.85; }
.detail-list { padding-left: 20px; }
.detail-list li { margin-bottom: 7px; line-height: 1.75; }
.detail-tip { font-size: 12.5px; color: var(--mut); }
.detail-tags {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
}
.dt-label { font-size: 12.5px; color: var(--faint); }

.code-block {
  margin: 0 0 14px; padding: 12px 14px;
  background: var(--soft); border-radius: var(--radius-sm);
  color: #45505d; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}

.rich { line-height: 1.85; }
.rich h2 { margin: 26px 0 10px; font-size: 17.5px; }
.rich h3 { margin: 20px 0 8px; font-size: 16px; }
.rich p { margin: 0 0 14px; }
.rich ul, .rich ol { margin: 0 0 14px; padding-left: 22px; }
.rich li { margin-bottom: 7px; }
.rich a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.rich img { border-radius: var(--radius-sm); margin: 6px 0 14px; display: block; }
.rich blockquote {
  margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--soft); color: var(--mut);
}
.rich-note {
  font-size: 12.5px; color: var(--mut); background: var(--soft);
  border-radius: var(--radius-sm); padding: 10px 14px;
}

/* ------------------------------------------------------------------ 布局 */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.layout--home { grid-template-columns: minmax(0, 1fr); }
.layout--article { grid-template-columns: minmax(0, 1fr) 300px; }
.content { min-width: 0; }

.sidebar { display: flex; flex-direction: column; gap: 16px; }
.side-box { padding: 16px 17px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.side-title {
  margin: 0 0 12px; padding-bottom: 8px; font-size: 14.5px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.side-tree { list-style: none; margin: 0; padding: 0; }
.side-tree li { margin-bottom: 10px; }
.st-main {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.st-main:hover { color: var(--accent); }
.st-main em { font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--faint); }
.st-subs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.st-subs a { font-size: 12px; color: var(--mut); padding: 2px 9px; background: var(--soft); border-radius: 50px; }
.st-subs a:hover { background: var(--accent-soft); color: var(--accent-d); }
.side-more { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--accent); }
.side-stats { display: flex; list-style: none; margin: 0; padding: 0; gap: 8px; }
.side-stats li {
  flex: 1 1 0; text-align: center; padding: 10px 4px;
  background: var(--soft); border-radius: var(--radius-sm);
}
.side-stats b { display: block; font-size: 18px; color: var(--accent-d); }
.side-stats span { font-size: 11.5px; color: var(--mut); }
.side-tip p { margin: 0 0 8px; font-size: 12.5px; color: var(--mut); line-height: 1.7; }
.side-tip b { color: var(--ink); }
.side-links { display: flex; flex-wrap: wrap; gap: 6px; }
.side-links a {
  padding: 3px 11px; font-size: 12.5px; color: var(--mut);
  background: var(--soft); border-radius: 50px;
}
.side-links a:hover { color: #fff; background: var(--dark); }

/* -------------------------------------------------------- 导航总览 / 其它 */
.nav-all { display: block; }
.nav-group { padding: 0; margin-bottom: 32px; background: transparent; box-shadow: none; }
.page-hint { font-size: 12.5px; color: var(--faint); margin-bottom: 8px; }

.stat-bar {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 18px;
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: 12.5px; color: var(--mut);
}
.stat-bar b { color: var(--accent-d); font-size: 15px; }

.inline-search { display: flex; gap: 8px; margin: 0 0 16px; }
.inline-search input {
  flex: 1 1 auto; height: 42px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 50px; background: var(--panel);
  font-size: 13.5px; color: var(--ink); outline: none; box-shadow: var(--shadow);
}
.inline-search input:focus { border-color: var(--accent-soft); }

.empty {
  padding: 26px 18px; text-align: center; font-size: 13px; color: var(--mut);
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty a { color: var(--accent); }
.error { color: #b42318; }
.notice { color: #067647; }
.hint { font-size: 12px; color: var(--faint); }
.notfound { text-align: center; padding: 44px 20px; }
.notfound-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.seo-text { padding: 20px 22px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.seo-text p { font-size: 13px; color: var(--mut); line-height: 1.85; }
.seo-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px; border-radius: 50px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); color: #fff; }
.btn-ghost { background: var(--soft); color: var(--text); }
.btn-ghost:hover { color: #fff; background: var(--dark); }
.btn-line { background: var(--panel); color: var(--text); border-color: var(--line-2); }
.btn-line:hover { color: var(--accent); border-color: var(--accent-soft); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-danger { background: #fee4e2; color: #b42318; }
.btn-danger:hover { background: #fecdca; color: #b42318; }

/* =========================================================================
   五、友情链接（仿参考站页脚友链区）
   ====================================================================== */
.friendlinks {
  margin: 0 auto 26px; width: 100%; max-width: var(--wrap); padding: 0 26px;
}
.fl-card {
  padding: 18px 22px 20px;
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
}
.fl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fl-title {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 15px; border-radius: 50px; background: var(--dark); color: #fff;
  font-size: 14px; font-weight: 600;
}
.fl-title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.fl-note { margin: 0; font-size: 12px; color: var(--faint); }
.fl-apply { margin-left: auto; font-size: 12.5px; color: var(--mut); }
.fl-apply:hover { color: var(--accent); }
.fl-list {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px 18px; margin: 0; padding: 0; list-style: none;
}
.fl-list a {
  display: block; padding: 3px 0; font-size: 12.5px; color: var(--mut);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .16s;
}
.fl-list a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ 页脚 */
.site-footer { margin-top: 10px; padding: 34px 0 20px; background: var(--panel); border-top: 1px solid var(--line); }
.footer-top {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 26px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line);
}
.foot-name { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.foot-desc { margin: 0 0 10px; font-size: 12.5px; line-height: 1.75; color: var(--mut); }
.foot-stat { margin: 0; font-size: 12.5px; color: var(--mut); }
.foot-stat b { color: var(--accent-d); }
.foot-live { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
.foot-title { margin: 0 0 12px; font-size: 14px; color: var(--ink); }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 8px; }
.foot-links a { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mut); }
.foot-links a:hover { color: var(--accent); }
.foot-cnt { font-size: 11px; color: var(--faint); }

.foot-bottom { padding-top: 18px; text-align: center; }
.foot-note { margin: 0 0 8px; font-size: 12px; line-height: 1.8; color: var(--faint); }
.foot-note--dim { color: var(--faint); opacity: .8; }
.foot-copy { margin: 10px 0 0; font-size: 12px; color: var(--faint); }
.foot-copy a { color: var(--mut); }
.foot-copy a:hover { color: var(--accent); }

/* =========================================================================
   六、响应式
   ====================================================================== */
@media (max-width: 1280px) {
  .fl-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .card-grid, .card-grid--dense { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .art-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
  .rail { display: none; }
  .shell { margin-left: 0; }
  .brand { display: flex; }
  .topnav { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu:not([hidden]) { display: block; }
  .btn-search-icon span { display: none; }
  .btn-search-icon { padding: 7px 10px; }
  .layout--article { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .hero { min-height: 480px; }
  .fl-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .cool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .card-grid--dense { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-title { font-size: 24px; padding: 6px 20px; }
  .btn-all { display: none; }
  .brand-text { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 640px) {
  .container, .content-site, .friendlinks { padding-left: 15px; padding-right: 15px; }
  .ph-inner { padding: 0 15px; height: 58px; }
  .page-main { padding: 16px 0 26px; }
  .hero {
    min-height: 420px;
    padding: calc(58px + 34px) 15px 44px;
  }
  .hero-title { font-size: 20px; letter-spacing: .5px; }
  .hero-slogan { font-size: 12px; }
  .hero-tabs { gap: 6px; margin-top: 14px; }
  .hero-tabs a { padding: 4px 12px; font-size: 12.5px; }
  .hero-search { padding: 5px 5px 5px 14px; margin-top: 12px; }
  .hs-input { height: 36px; font-size: 13px; }
  .hs-btn { height: 36px; padding: 0 16px; font-size: 13px; }
  .hero-words { font-size: 12px; gap: 6px; }
  .hero-stat { font-size: 11.5px; }
  .cool-grid, .card-grid, .card-grid--dense, .art-grid, .art-grid--3 { grid-template-columns: 1fr; }
  .sec-title { font-size: 13.5px; padding: 5px 13px; }
  .sec-chips { margin-left: 0; }
  .detail { padding: 18px 16px; }
  .detail-title { font-size: 18px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 20px; }
  .foot-brand { grid-column: 1 / -1; }
  .fl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
