:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --line: #e3e8ef;
  --line-soft: #eef2f7;
  --text: #1a2332;
  --text-2: #4a5666;
  --text-3: #7b8797;
  --brand: #1a6ee0;
  --brand-dark: #1557b0;
  --brand-soft: #e8f1fe;
  --warn: #b26a00;
  --warn-soft: #fff5e3;
  --danger: #c0392b;
  --ok: #1f8a4c;
  --ok-soft: #e8f6ee;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 35, 60, .04), 0 4px 16px rgba(20, 35, 60, .05);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* 吸顶导航栏高 52px。锚点跳转时留出余量，否则目标内容会藏在栏下 */
  scroll-padding-top: 68px;
}

/* 键盘 Tab 聚焦到的元素同样避开吸顶栏 */
[id] { scroll-margin-top: 68px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }

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

/* ---------- 头部滚动新闻条 ---------- */
.ticker {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; height: 38px; overflow: hidden;
}
.ticker-label {
  flex: none; padding: 0 14px; height: 100%; display: flex; align-items: center;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600;
  letter-spacing: .5px; margin-right: 12px; white-space: nowrap;
}
.ticker-viewport { flex: 1; min-width: 0; overflow: hidden; height: 100%; position: relative; }
.ticker-track {
  display: flex; align-items: center; gap: 34px; height: 100%;
  white-space: nowrap; will-change: transform;
  animation: tk-scroll 64s linear infinite;
  padding-left: 12px;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-track a {
  font-size: 13px; color: var(--text-2); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.ticker-track a:hover { color: var(--brand); text-decoration: none; }
.tk-src { font-size: 11.5px; color: var(--text-3); }
.tk-hot::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--danger); display: inline-block;
}
@keyframes tk-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* 无障碍：尊重系统的减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; overflow-x: auto; }
}
@media (max-width: 620px) {
  .ticker-label { padding: 0 10px; font-size: 12px; margin-right: 8px; }
  .tk-src { display: none; }
}

/* ---------- 学段概览卡 ---------- */
.stage-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--panel-2); }
.sc-head { display: flex; align-items: baseline; gap: 8px; }
.sc-head b { font-size: 15px; }
.sc-head span { font-size: 12.5px; color: var(--text-3); margin-left: auto; }
.sc-bar { height: 5px; background: var(--line); border-radius: 3px; margin: 9px 0 7px; overflow: hidden; }
.sc-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.sc-note { font-size: 12px; color: var(--text-3); line-height: 1.6; min-height: 2.4em; }
.sc-ver { font-size: 12px; color: var(--ok); margin-top: 5px; }

/* ==========================================================================
   广告位
   投放原则：只在侧栏中下部和列表/文章末尾出现，
   绝不在首屏、搜索框、入口卡片区、填报按钮附近投放。
   ========================================================================== */
.ad-card { border-color: #dfe5ec; }
.ad-head {
  padding: 6px 12px !important;
  border-bottom: 1px solid var(--line-soft) !important;
  min-height: 0;
}
/* 「广告」标签用浅灰底，不抢注意力但必须可识别 */
.ad-tag {
  font-size: 11px; color: var(--text-3); letter-spacing: 2px;
  background: #f2f4f7; padding: 2px 7px; border-radius: 3px; font-weight: 400;
}
.ad-b-compact { padding: 8px !important; }
.ad-item { margin-bottom: 8px; }
.ad-item:last-child { margin-bottom: 0; }
.ad-item img {
  display: block; max-width: 100%; height: auto;
  border-radius: var(--radius-sm); margin: 0 auto;
}
.ad-img-link { display: block; }
.ad-item iframe { max-width: 100%; border: 0; display: block; margin: 0 auto; }
/* 移动端：广告横向铺满，但保留左右边距不贴边 */
@media (max-width: 768px) {
  .ad-b-compact { padding: 10px 12px !important; }
}

/* ---------- 顶栏文字广告（站名右侧） ----------
   家润指定位置。设计要点：
   - 只在桌面端出现，移动端顶栏本来就挤（站名+汉堡按钮）
   - 必须标注「推广」，不伪装成站内导航
   - 用 rel="sponsored" 告诉搜索引擎这是付费链接
   - 视觉上明显弱于站名和主导航，避免抢注意力 */
.hd-ads {
  display: inline-flex; align-items: center; gap: 10px;
  margin-left: 16px; min-width: 0;
}
.hd-ad {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-2); white-space: nowrap;
  padding: 3px 9px; border-radius: 12px;
  background: #f6f8fa; border: 1px solid var(--line-soft);
}
.hd-ad:hover {
  color: var(--brand); background: var(--brand-soft);
  border-color: #cfe1fb; text-decoration: none;
}
/* 「推广」标签：灰底小字，明确这是广告 */
.hd-ad-tag {
  font-size: 10.5px; color: var(--text-3); background: #e9edf2;
  padding: 1px 5px; border-radius: 3px; letter-spacing: .5px; line-height: 1.5;
}
.hd-ad:hover .hd-ad-tag { background: #dbe7fb; color: var(--brand-d); }
.hd-ad-arrow { font-size: 15px; line-height: 1; color: var(--text-3); }
.hd-ad:hover .hd-ad-arrow { color: var(--brand); }

/* 侧栏/卡片里的文字广告 */
.ad-text-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel-2);
  color: var(--text); font-size: 14px; font-weight: 500;
}
.ad-text-link:hover {
  border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand-dark); text-decoration: none;
}
.ad-text-arrow { color: var(--line); font-size: 17px; }
.ad-text-link:hover .ad-text-arrow { color: var(--brand); }

/* 移动端隐藏顶栏文字广告 */
@media (max-width: 768px) {
  .hd-ads { display: none; }
}

/* ---------- skip link (a11y) ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; color: #fff; }

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

/* ---------- header ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  height: 52px; display: flex; align-items: center; gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--brand); }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--brand), #4a94ff);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--text-2); padding: 6px 11px; border-radius: var(--radius-sm); font-size: 13.5px;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.nav a.on { color: var(--brand); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 13.5px; cursor: pointer;
  font-family: inherit;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, #fff, #f7faff);
  border-bottom: 1px solid var(--line);
  padding: 26px 0 22px;
}
.hero h1 { font-size: 25px; letter-spacing: -.2px; }
.hero p { margin: 7px 0 0; color: var(--text-2); font-size: 14.5px; max-width: 760px; }
.hero-stats { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.hero-stats div { font-size: 13px; color: var(--text-3); }
.hero-stats b { display: block; font-size: 19px; color: var(--brand); font-weight: 700; line-height: 1.2; }

.searchbox { margin-top: 16px; position: relative; max-width: 560px; }
.searchbox input {
  width: 100%; padding: 10px 88px 10px 14px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
}
.searchbox input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.searchbox button {
  position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 18px;
  background: var(--brand); color: #fff; border: 0; border-radius: var(--radius-sm);
  font-size: 14px; cursor: pointer; font-family: inherit;
}
.searchbox button:hover { background: var(--brand-dark); }
.suggest {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); overflow: hidden; z-index: 30; display: none;
}
.suggest.show { display: block; }
.suggest a {
  display: block; padding: 8px 13px; color: var(--text); border-bottom: 1px solid var(--line-soft);
}
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover { background: var(--brand-soft); text-decoration: none; }
.suggest .s-tag { font-size: 11.5px; color: var(--text-3); margin-left: 6px; }
.suggest .empty { padding: 10px 13px; color: var(--text-3); font-size: 13px; }

/* ---------- layout ---------- */
main { padding: 20px 0 40px; }
.crumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--brand); }
.crumb span { margin: 0 6px; }

.grid2 { display: grid; grid-template-columns: 1fr 296px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- card ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-h {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
}
.card-h h2, .card-h h3 { font-size: 15.5px; }
.card-h .more { margin-left: auto; font-size: 13px; color: var(--text-3); }
.card-h .more:hover { color: var(--brand); }
.card-b { padding: 14px 16px; }
.bar { width: 3px; height: 14px; border-radius: 2px; background: var(--brand); flex: none; }

/* ---------- region tabs ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button {
  padding: 5px 14px; border: 1px solid var(--line); background: #fff;
  border-radius: 20px; font-size: 13.5px; color: var(--text-2); cursor: pointer; font-family: inherit;
}
.tabs button:hover { border-color: var(--brand); color: var(--brand); }
.tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- link grid (hao123 style) ---------- */
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 8px; }
.linkcard {
  display: block; padding: 9px 11px; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); background: var(--panel-2); position: relative;
}
.linkcard:hover {
  border-color: var(--brand); background: var(--brand-soft); text-decoration: none;
  transform: translateY(-1px);
}
.linkcard .lc-name {
  display: block; color: var(--text); font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.linkcard .lc-url {
  display: block; color: var(--text-3); font-size: 11.5px; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.linkcard:hover .lc-name { color: var(--brand-dark); }

.fav-btn {
  position: absolute; top: 50%; right: 6px; margin-top: -11px;
  width: 22px; height: 22px;
  border: 0; background: transparent; cursor: pointer; color: var(--text-3);
  border-radius: 4px; font-size: 14px; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .12s;
  /* 触摸目标放大到 44px，视觉尺寸仍为 22px */
  padding: 0;
}
.linkcard:hover .fav-btn, .fav-btn.on { opacity: 1; }
.fav-btn:hover { background: #fff; color: var(--warn); }
.fav-btn.on { color: var(--warn); }
/* 触屏没有 hover，收藏按钮必须常显，否则用户永远看不到它 */
@media (hover: none) {
  .fav-btn { opacity: 1; background: rgba(255, 255, 255, .8); }
  .linkcard { padding-right: 34px; }
}
/* 键盘操作时也要看得见 */
.fav-btn:focus-visible { opacity: 1; background: #fff; }

/* ---------- badges ---------- */
.badge {
  display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px;
  line-height: 1.6; font-weight: 500; vertical-align: middle; white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--brand-soft); color: var(--brand-dark); }
.badge-gray { background: #f0f2f5; color: var(--text-3); }

/* ---------- notice ---------- */
.notice {
  display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; line-height: 1.7; margin-bottom: 16px; border: 1px solid;
}
.notice-info { background: var(--brand-soft); border-color: #cfe1fb; color: #17457f; }
.notice-warn { background: var(--warn-soft); border-color: #f5dfae; color: #7a4b00; }
.notice-icon { flex: none; font-weight: 700; }

/* ---------- platform item ---------- */
.pitem {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px; background: var(--panel-2);
}
.pitem:last-child { margin-bottom: 0; }
.pitem-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pitem-h h3 { font-size: 14.5px; }
.pitem-row { display: flex; gap: 8px; margin-top: 7px; font-size: 13.5px; align-items: flex-start; }
.pitem-row .k { color: var(--text-3); flex: none; width: 3.5em; }
.pitem-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--text-2); word-break: break-all;
}
.go {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 13px;
  background: var(--brand); color: #fff; border-radius: var(--radius-sm);
  font-size: 13.5px; white-space: nowrap;
}
.go:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.go::after { content: "›"; font-size: 16px; line-height: 1; }
.pitem-note { margin-top: 7px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.pitem { position: relative; }
.pitem-tags {
  margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
/* pitem 内的收藏按钮常显（无 hover 依赖），放在标签行右侧而非绝对定位右上角，
   避免被吸顶导航栏遮住导致点不到 */
.pitem .fav-btn {
  position: static; margin: 0 0 0 auto; opacity: 1;
  border: 1px solid var(--line); background: #fff; width: 28px; height: 28px;
  font-size: 15px; flex: none;
}
.pitem .fav-btn:hover { border-color: var(--warn); background: var(--warn-soft); }

/* ---------- list ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
.list li:last-child { border-bottom: 0; }
.list a.t { color: var(--text); font-weight: 500; }
.list a.t:hover { color: var(--brand); }
.list .meta { font-size: 12.5px; color: var(--text-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.list .d {
  margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.75;
}

/* ---------- article ---------- */
.article { padding: 22px 26px; }
.article h1 { font-size: 23px; margin-bottom: 8px; letter-spacing: -.2px; }
.article .a-meta { font-size: 13px; color: var(--text-3); padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.article h2 { font-size: 17px; margin: 26px 0 10px; padding-left: 10px; border-left: 3px solid var(--brand); }
.article h3 { font-size: 15px; margin: 18px 0 8px; }
.article p { margin: 0 0 12px; color: var(--text-2); line-height: 1.85; }
.article ul, .article ol { color: var(--text-2); line-height: 1.85; padding-left: 22px; margin: 0 0 12px; }
.article li { margin-bottom: 5px; }
.article table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article th { background: var(--panel-2); font-weight: 600; white-space: nowrap; }
.article td code { background: #f0f2f5; padding: 1px 5px; border-radius: 3px; font-size: 12.5px; }
.article blockquote {
  margin: 14px 0; padding: 11px 15px; background: var(--panel-2);
  border-left: 3px solid var(--brand); color: var(--text-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- sidebar ---------- */
.side { position: sticky; top: 68px; }
.side .card-b { padding: 12px 14px; }
.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav li { border-bottom: 1px solid var(--line-soft); }
.side-nav li:last-child { border-bottom: 0; }
.side-nav a { display: flex; padding: 7px 0; color: var(--text-2); font-size: 13.5px; }
.side-nav a:hover { color: var(--brand); text-decoration: none; }
.side-nav .dot { color: var(--line); margin-right: 7px; }
.side-nav a:hover .dot { color: var(--brand); }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.tbl th { background: var(--panel-2); font-weight: 600; white-space: nowrap; font-size: 13px; color: var(--text-2); }
.tbl tbody tr:hover { background: #fafcff; }
.tbl td.nowrap { white-space: nowrap; }
.tbl a { font-weight: 500; }

/* ---------- member ---------- */
.member-box { padding: 18px; }
.member-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand), #4a94ff); color: #fff;
  display: grid; place-items: center; font-size: 18px; font-weight: 600;
}
.member-info h3 { font-size: 16px; }
.member-info .meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty-state .icon { font-size: 40px; margin-bottom: 10px; opacity: .35; }

.fav-list { list-style: none; margin: 0; padding: 0; }
.fav-list li {
  display: flex; align-items: center; gap: 11px; padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.fav-list li:last-child { border-bottom: 0; }
.fav-list .f-info { min-width: 0; flex: 1; }
.fav-list .f-name { color: var(--text); font-weight: 500; display: block; }
.fav-list .f-url { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fav-list .f-ops { display: flex; gap: 6px; flex: none; }
.iconbtn {
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm);
  width: 30px; height: 30px; cursor: pointer; color: var(--text-3); font-size: 14px;
  display: grid; place-items: center; font-family: inherit;
}
.iconbtn:hover { border-color: var(--brand); color: var(--brand); }
.iconbtn.del:hover { border-color: var(--danger); color: var(--danger); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(80px);
  background: #1a2332; color: #fff; padding: 9px 18px; border-radius: 20px;
  font-size: 13.5px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); z-index: 200;
  transition: transform .22s; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.footer {
  background: #fff; border-top: 1px solid var(--line); padding: 24px 0;
  margin-top: 30px; font-size: 13px; color: var(--text-3);
}
.footer-in { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.footer h4 { font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; }
.footer-links { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--brand); }
.footer .disc {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  line-height: 1.85; font-size: 12.5px;
}

/* ---------- corrections ---------- */
.corr { border-left: 3px solid var(--danger); background: #fff; padding: 13px 15px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 11px; }
.corr h3 { font-size: 14.5px; color: #8c2b20; margin-bottom: 5px; }
.corr p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.75; }

/* ==========================================================================
   移动端专用布局（≤ 768px）
   做法参考 hao123 的移动站：顶部极简 + 底部固定标签栏 + 抽屉菜单。
   PC 端这些元素全部隐藏，不影响桌面体验。
   ========================================================================== */

/* ---------- 移动端顶栏 ---------- */
.m-topbar, .m-tabbar, .m-drawer, .m-drawer-mask { display: none; }

/* 桌面顶栏在移动端整体隐藏，只留移动版 */
@media (max-width: 768px) {
  .topbar { display: none; }
}

/* ---------- 平板与手机共用 ---------- */
@media (max-width: 768px) {
  /* grid 子项默认 min-width:auto，内容过宽时会把整列撑开。
     必须显式设 0，让超宽内容在卡片内部换行而不是顶宽整个页面。
     这是 CSS Grid/Flex 的经典坑：设了 1fr 还不够，必须配 min-width:0。 */
  .grid2 > * { min-width: 0; }
  .card, .card-b, .notice, .pitem, .article { min-width: 0; }

  /* 正文里的长串（网址、英文）必须能断行，否则顶宽容器 */
  .notice span, .card-b, .pitem-note, .article p { overflow-wrap: anywhere; }

  /* 用 100dvh 而非 100vh：iOS Safari 地址栏收起时 100vh 会导致底部栏被顶出屏幕 */
  :root { --m-tabbar-h: 56px; }

  body { padding-bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px)); }

  /* 桌面导航在移动端完全隐藏，交给底部栏 */
  .topbar .nav { display: none; }

  /* 移动顶栏 */
  .m-topbar {
    display: flex; align-items: center; gap: 10px;
    height: 50px; padding: 0 12px;
    background: #fff; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 60;
  }
  .m-topbar .m-logo {
    display: flex; align-items: center; gap: 7px;
    font-size: 15.5px; font-weight: 700; color: var(--text);
  }
  .m-topbar .m-logo:hover { text-decoration: none; }
  .m-topbar .m-title { font-size: 14px; color: var(--text-3); font-weight: 400;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 汉堡按钮：触摸目标至少 44x44，符合移动端可点性要求 */
  .m-menu-btn {
    margin-left: auto; flex: none;
    width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
    display: grid; place-items: center; color: var(--text-2); padding: 0;
  }
  .m-menu-btn:hover { background: var(--line-soft); }
  .m-menu-btn span { display: block; width: 19px; height: 2px; background: currentColor;
    border-radius: 1px; position: relative; }
  .m-menu-btn span::before, .m-menu-btn span::after {
    content: ''; position: absolute; left: 0; width: 19px; height: 2px;
    background: currentColor; border-radius: 1px;
  }
  .m-menu-btn span::before { top: -6px; }
  .m-menu-btn span::after { top: 6px; }

  /* 抽屉菜单
     关键：关闭态用 visibility:hidden + transform 移出。
     之前只有 translateX(100%)，抽屉虽不可见但仍在文档流里占 290px 宽，
     把 body 撑到 542px（视口 390），导致页面能横向滑动露出大片空白。 */
  .m-drawer-mask {
    display: block; position: fixed; inset: 0; background: rgba(15, 25, 40, .42);
    opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 90;
    visibility: hidden;
  }
  .m-drawer-mask.on { opacity: 1; pointer-events: auto; visibility: visible; }
  .m-drawer {
    display: block; position: fixed; top: 0; right: 0; bottom: 0;
    width: min(78vw, 290px); background: #fff; z-index: 95;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .26s cubic-bezier(.4, 0, .2, 1), visibility .26s;
    overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px));
  }
  .m-drawer.on {
    transform: translateX(0); visibility: visible;
    box-shadow: -6px 0 24px rgba(0, 0, 0, .14);
  }
  .m-drawer-hd {
    display: flex; align-items: center; padding: 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px; font-weight: 600;
  }
  .m-drawer-close {
    margin-left: auto; width: 40px; height: 40px; border: 0; background: none;
    font-size: 22px; color: var(--text-3); cursor: pointer; line-height: 1;
  }
  .m-drawer nav { padding: 6px 0; }
  .m-drawer nav a {
    display: flex; align-items: center; min-height: 48px; padding: 0 16px;
    color: var(--text); font-size: 15px; border-bottom: 1px solid var(--line-soft);
  }
  .m-drawer nav a.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
  .m-drawer nav a .arw { margin-left: auto; color: var(--line); }
  .m-drawer-sec { padding: 14px 16px 6px; font-size: 12.5px; color: var(--text-3); }
  .m-drawer-prov { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 16px; }
  .m-drawer-prov a {
    display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px;
    border: 1px solid var(--line); border-radius: 17px;
    font-size: 13px; color: var(--text-2); min-height: 34px;
  }
  .m-drawer-prov a:active { background: var(--brand-soft); }

  /* ---------- 底部固定标签栏 ---------- */
  .m-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    height: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .m-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: var(--text-3); font-size: 11.5px; min-height: 44px;
  }
  .m-tabbar a.on { color: var(--brand); font-weight: 600; }
  .m-tabbar a:active { background: var(--brand-soft); }
  .m-tabbar .ti { width: 20px; height: 20px; }
  .m-tabbar a:active { border-radius: 8px; }

  /* ---------- 滚动新闻条：移动端不能压在内容上 ---------- */
  .ticker { height: 34px; }
  .ticker-label { padding: 0 9px; font-size: 11.5px; margin-right: 7px; }
  /* 滚动条内的链接加高点击热区：文字本身只有 21px 高，
     整条 34px 高度都可点，避免移动端点不中 */
  .ticker-track a {
    height: 34px; align-items: center; padding: 0 4px;
    font-size: 12.5px;
  }
  .ticker-track a:active { background: var(--brand-soft); }

  /* ---------- 头部区 ---------- */
  .hero { padding: 16px 0 14px; }
  .hero h1 { font-size: 18.5px; line-height: 1.4; }
  .hero p { font-size: 13px; margin-top: 6px; }
  .hero-stats {
    /* 移动端横向滑动，避免 5 个数字把首屏全占掉 */
    display: flex; gap: 0; overflow-x: auto; margin-top: 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; scrollbar-width: none;
  }
  .hero-stats::-webkit-scrollbar { display: none; }
  .hero-stats div {
    flex: 1 0 auto; min-width: 74px; padding: 10px 8px; text-align: center;
    border-right: 1px solid var(--line-soft);
  }
  .hero-stats div:last-child { border-right: 0; }
  .hero-stats b { font-size: 17px; }
  .hero-stats span { font-size: 11px; }

  .searchbox { margin-top: 12px; }
  .searchbox input { padding: 10px 74px 10px 12px; font-size: 15px; }
  .searchbox button { padding: 0 14px; font-size: 13.5px; }

  /* ---------- 学段卡片：移动端压缩为一行一个但更紧凑 ---------- */
  .stage-cards { grid-template-columns: 1fr; gap: 8px; }
  .stat-card { padding: 11px 13px; display: grid;
    grid-template-columns: 1fr auto; grid-template-areas: "head ver" "bar bar" "note note";
    gap: 4px 8px; align-items: center; }
  .sc-head { grid-area: head; }
  .sc-head b { font-size: 14.5px; }
  .sc-ver { grid-area: ver; margin-top: 0; }
  .sc-bar { grid-area: bar; margin: 3px 0 0; height: 4px; }
  .sc-note { grid-area: note; min-height: 0; font-size: 11.5px; margin-top: 3px; }

  /* ---------- 区域标签横向滚动 ---------- */
  .tabs {
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button {
    flex: none; min-height: 34px; padding: 0 14px; white-space: nowrap;
  }

  /* ---------- 链接网格：两列，触摸目标够大 ---------- */
  /* 注意 grid 子项要设 min-width:0，否则内部的 .lc-url/.lc-name
     （white-space:nowrap）会按内容宽度撑开列，导致整行溢出屏幕 */
  .linkgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .linkgrid > * { min-width: 0; }
  .linkcard {
    padding: 10px 32px 10px 11px; min-height: 52px;
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0; max-width: 100%;
  }
  .linkcard:active { transform: none; background: var(--brand-soft); }
  .linkcard .lc-name { font-size: 13.5px; }

  /* ---------- 卡片与平台项 ---------- */
  .card { margin-bottom: 12px; border-radius: 8px; }
  .card-h { padding: 11px 13px; min-height: 44px; }
  .card-h h2, .card-h h3 { font-size: 14.5px; }
  .card-b { padding: 12px 13px; }
  /* 卡片标题栏右侧的「更多 ›」是常用操作，必须够大。
     结构是 <span class="more"><a>…</a></span>，所以 a 要自己撑高，
     只给 .more 设 min-height 会被 flex 的 align-items:center 压回内容高度。 */
  .card-h .more {
    display: inline-flex; align-items: stretch; align-self: stretch;
  }
  .card-h .more > a {
    display: inline-flex; align-items: center; padding: 9px 0;
    min-height: 32px;
  }
  /* 正文里夹在段落中的链接也加点击区。
     必须用 inline 而不是 inline-block：段落内的链接需要跟着文字折行，
     inline-block 会被当成独立盒子，长句时撑破容器宽度。 */
  .card-b a:not(.go):not(.linkcard):not(.btn):not(.fav-btn) {
    display: inline; padding: 6px 0; line-height: 1.6;
    background-image: linear-gradient(transparent 78%, var(--brand-soft) 0);
  }
  .article p a {
    display: inline; padding: 6px 0; line-height: 1.6;
    background-image: linear-gradient(transparent 78%, var(--brand-soft) 0);
  }
  .notice a { display: inline; padding: 6px 0; }

  .pitem { padding: 11px 12px; }
  .pitem-row { flex-direction: column; gap: 2px; }
  .pitem-row .k { width: auto; font-size: 12px; }
  .pitem-url { font-size: 12px; }
  .go { width: 100%; justify-content: center; min-height: 44px; }

  /* ---------- 文章页 ---------- */
  .article { padding: 16px 14px; }
  .article h1 { font-size: 18px; line-height: 1.45; }
  .article h2 { font-size: 15.5px; margin: 20px 0 8px; padding-left: 8px; }
  .article p { font-size: 14px; line-height: 1.8; }
  /* 移动端表格横向滚动，不撑破布局 */
  .article table { font-size: 12.5px; }
  .article th, .article td { padding: 7px 8px; }
  .article td.code { max-width: 190px; word-break: break-all; }

  .tbl { font-size: 12.5px; }
  .tbl th, .tbl td { padding: 7px 8px; }
  /* 表格内的省份名与网址是主要操作入口，触摸区必须够大 */
  .tbl a {
    display: inline-flex; align-items: center; min-height: 34px;
    padding: 2px 0; line-height: 1.4;
  }
  .tbl td a { word-break: break-all; }
  .pitem-url { display: inline-flex; align-items: center; min-height: 30px; }

  /* ---------- 触摸目标不小于 44px / 28px，够手指点中 ---------- */
  .field input, .field select, .field textarea,
  input[type=text], input[type=search], input[type=url], input[type=password], select {
    min-height: 44px; font-size: 16px; /* 16px 可避免 iOS 聚焦时自动放大页面 */
    padding: 10px 12px;
  }
  .btn { min-height: 40px; padding: 8px 14px; }
  .fav-btn { width: 30px; height: 30px; }
  .pitem .fav-btn { width: 34px; height: 34px; }

  /* 列表与正文里的链接：加大行高与点击区 */
  .list li { padding: 0; }
  .list a.t {
    display: flex; align-items: center; min-height: 40px;
    padding: 6px 0; line-height: 1.55;
  }
  .side-nav a { min-height: 38px; }
  /* 段落/列表里的链接保持 inline，避免长句时撑破容器宽度 */
  .article li a, .card-b li a {
    display: inline; padding: 5px 0; line-height: 1.6;
    background-image: linear-gradient(transparent 78%, var(--brand-soft) 0);
  }

  /* 页脚链接：默认 26px 左右，移动端加大 */
  .footer-links a {
    display: inline-flex; align-items: center; min-height: 32px;
    padding: 0 2px;
  }

  /* 顶部 logo 本身也是链接，扩大热区 */
  .m-logo { min-height: 44px; }
  .logo { min-height: 44px; }

  /* 纠错块里的链接 */
  .corr a { display: inline; padding: 6px 0; }

  /* ---------- 页脚：移动端底部有标签栏，加高底部间距 ---------- */
  .footer { padding: 18px 0 12px; margin-top: 20px; }
  .footer-links { gap: 6px 14px; }
  .footer-links a { font-size: 12.5px; }

  .crumb { font-size: 12px; margin-bottom: 12px; }
  /* 面包屑是辅助导航，但 16px 高度点不准，链接本身加点击区 */
  .crumb a { display: inline-flex; align-items: center; padding: 7px 0; }
  .notice { padding: 10px 12px; font-size: 12.5px; }
  .notice a { display: inline-block; padding: 6px 0; }
  .corr a { display: inline-block; padding: 6px 0; }

  .empty-state { padding: 30px 16px; }
}

/* 极窄屏（iPhone SE 一类，320-360px）再收一档 */
@media (max-width: 360px) {
  .linkgrid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 17px; }
  .hero-stats div { min-width: 66px; }
}

/* 桌面端不要出现移动元素 */
@media (min-width: 769px) {
  .m-topbar, .m-tabbar, .m-drawer, .m-drawer-mask { display: none !important; }
}