/* 移动优先：默认样式针对手机，≥768px 再加宽 */
:root {
  --bg: #f7f6f3; --card: #ffffff; --ink: #1c2430; --sub: #5b6472;
  --brand: #c8102e; --brand-dark: #9c0c24; --gold: #b8860b;
  --line: #e6e2da; --ok: #1a7f4b; --radius: 12px;
}
* { box-sizing: border-box; margin: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65; font-size: 16px; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* 顶栏：手机汉堡不折叠也放得下——横向滚动导航 */
header.site { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.logo { font-weight: 800; font-size: 18px; color: var(--ink); white-space: nowrap; }
.logo span { color: var(--brand); }
.langswitch { margin-left: auto; font-size: 14px; white-space: nowrap; }
.langswitch a { padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--sub); }
.langswitch a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
nav.main { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; padding-bottom: 8px; }
nav.main a { display: inline-block; padding: 6px 10px; color: var(--sub); font-size: 15px; border-radius: 8px; }
nav.main a.on, nav.main a:active { color: var(--brand); background: #fdeef0; }

/* 首屏 */
.hero { background: linear-gradient(160deg, #1c2430 0%, #40222a 55%, var(--brand-dark) 100%); color: #fff; padding: 44px 0 36px; }
.hero h1 { font-size: 26px; line-height: 1.35; margin-bottom: 12px; }
.hero p.lead { color: #f0e6dd; font-size: 15px; margin-bottom: 22px; }
.cta-row { display: flex; flex-direction: column; gap: 10px; }
.btn { display: block; text-align: center; padding: 13px 18px; border-radius: 10px; font-weight: 600; font-size: 16px; border: none; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-light { background: #fff; color: #123f2e; border: none; }

/* 卡片与网格：手机单列 */
section.block { padding: 28px 0; }
h2.sec { font-size: 20px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card .meta { color: var(--sub); font-size: 13px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 20px; background: #eef2f6; color: var(--sub); margin-right: 6px; }
.badge.ok { background: #e6f5ec; color: var(--ok); }
.badge.warn { background: #fdf3e3; color: var(--gold); }
.badge.demo { background: #f3e8fd; color: #7b2fbe; }

/* 筛选栏：手机纵向排列 */
.filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.filters select, .filters input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; }

/* 表单 */
form.stack { display: flex; flex-direction: column; gap: 12px; }
form.stack label { font-size: 14px; font-weight: 600; }
form.stack input, form.stack textarea, form.stack select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; }
form.stack textarea { min-height: 110px; }
.consent-box { background: #fdf3e3; border: 1px solid #ecd9ae; border-radius: var(--radius); padding: 14px; }

/* AI 对话 */
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { max-width: 92%; padding: 12px 14px; border-radius: 14px; font-size: 15px; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .src { font-size: 12px; color: var(--sub); margin-top: 6px; }
.chat-input { display: flex; gap: 8px; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
.chat-input input { flex: 1; padding: 13px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; }
.chat-input button { padding: 0 20px; border-radius: 12px; }

/* 结果条目 */
.result-item { border-left: 3px solid var(--brand); }

/* 详情字段表 */
dl.fields { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 15px; }
dl.fields dt { color: var(--sub); }

/* 后台表格：手机可横滚 */
.table-scroll { overflow-x: auto; }
table.admin { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; }
table.admin th, table.admin td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; }
table.admin th { background: #f0ede6; }

footer.site { border-top: 1px solid var(--line); margin-top: 30px; padding: 22px 0; color: var(--sub); font-size: 13px; }
.notice { background: #eef6ff; border: 1px solid #cfe3fa; border-radius: var(--radius); padding: 12px 14px; font-size: 14px; color: #28496e; }
.error-box { background: #fdeef0; border: 1px solid #f3c2cb; color: var(--brand-dark); border-radius: var(--radius); padding: 12px 14px; }

/* ≥768px：PC 增强 */
@media (min-width: 768px) {
  .hero h1 { font-size: 38px; }
  .hero { padding: 70px 0 56px; }
  .cta-row { flex-direction: row; }
  .cta-row .btn { width: auto; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-direction: row; }
  .filters select, .filters input { width: auto; }
  .msg { max-width: 70%; }
}

/* ---------- v0.4 增量：追踪页 / 法务页 / 意图胶囊 / 表单反馈 ---------- */
:root { --bg-soft: #f0ede6; --muted: #8a93a0; --brand-soft: #fdeef0; }
.form-error { background: #fdeef0; border: 1px solid #f3c2cb; color: var(--brand-dark); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.form-ok { background: #e6f5ec; border: 1px solid #b9e2c9; color: var(--ok); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.btn-sm { display: inline-block; width: auto; padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 进度追踪 */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline li.dim::before { background: var(--muted); }
.timeline .when { display: block; font-size: 12px; color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: 10px; }
.thread .bubble { max-width: 88%; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); overflow-wrap: anywhere; }
.thread .bubble.user { align-self: flex-end; background: var(--brand-soft); }
.thread .bubble.internal { align-self: flex-start; border: 1px dashed var(--gold); }
.thread .who { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 14px; }
.kv dt { color: var(--sub); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* AI 助手：意图胶囊 + 输入态 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chips button { background: #fff; border: 1px solid var(--line); color: var(--sub); border-radius: 20px; padding: 8px 13px; font-size: 14px; cursor: pointer; }
.chips button:active { border-color: var(--brand); color: var(--brand); }
.typing { color: var(--muted); font-size: 14px; padding: 6px 2px; }

/* 法务页 */
.doc h3 { font-size: 17px; margin: 18px 0 6px; }
.doc p { font-size: 15px; color: var(--sub); }
.doc .card { margin-bottom: 12px; }
.doc .updated { font-size: 13px; color: var(--muted); }

/* 后台小工具 */
.reply-box textarea { min-height: 84px; }

/* ---------- v0.6 增量：合并询盘 ---------- */
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.fld > span { font-size: 14px; color: var(--sub); }
.card .btn-compare { position: absolute; right: 10px; top: 10px; z-index: 2;
  background: #fff; border: 1px solid var(--line); color: var(--sub);
  border-radius: 18px; padding: 6px 11px; font-size: 13px; cursor: pointer; }
.card .btn-compare.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.res-card { position: relative; }
.compare-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--ink, #22262b); color: #fff; border-radius: 14px; padding: 10px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: 14px; }
.compare-bar.show { display: flex; }
.compare-bar .btn { width: auto; padding: 9px 16px; font-size: 14px; }

/* ---------- v0.7 增量：城市安家指南（安家路线） ---------- */
.fact-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 6px; }
@media (min-width: 720px) { .fact-strip { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--bg-soft); border-radius: var(--radius); padding: 12px; text-align: center; }
.fact strong { display: block; font-size: 18px; color: var(--brand); }
.fact span { font-size: 12px; color: var(--muted); }
.fact.wide { grid-column: 1 / -1; text-align: left; padding: 12px 14px; }
.fact.wide strong { font-size: 14.5px; line-height: 1.5; }
@media (min-width: 720px) { .fact.wide { grid-column: span 2; } }
.chain-cover { height: 128px; background-size: cover; background-position: center; border-radius: 12px 12px 0 0; }
.ind-hero { border-radius: 14px; background-size: cover; background-position: center 40%; color: #fff; padding: 30px 22px; position: relative; overflow: hidden; }
.ind-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,42,68,.55), rgba(6,42,68,.72)); }
.ind-hero > * { position: relative; }

/* 台商成就页 */
.achv-hero { border-left: 4px solid var(--brand); }
.achv-kicker { font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .08em; }
.achv-card { margin-top: 12px; }
.achv-body { font-size: 14.5px; color: var(--sub); line-height: 1.85; margin: 8px 0 0; max-width: 74ch; overflow-wrap: anywhere; }
.achv-src { margin-top: 10px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.achv-src a { color: var(--brand); }
.journey-nav { margin: 18px 0 4px; }
.journey-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.journey-scroll a { flex: 0 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 8px 13px; font-size: 13px; color: var(--sub); text-decoration: none; }
.journey-scroll a b { color: var(--brand); margin-right: 4px; }
.guide-sec { margin-top: 26px; }
.guide-sec > h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.sec-no { background: var(--brand); color: #fff; border-radius: 10px; font-size: 13px; padding: 3px 9px; }

/* ---------- v0.8 增量：资源库（借鉴招商会客厅：数据横幅+筛选chips+卡片网格） ---------- */
.res-hero { padding: 34px 0 26px; }
.res-hero h1 { font-size: 26px; margin-bottom: 4px; }
.res-hero .lead { margin-bottom: 18px; }
/* 横排金色大数字（参考招商会客厅），移动端自动换行 */
.stat-strip { display: flex; flex-wrap: wrap; gap: 14px 34px; }
.stat { display: inline-flex; align-items: baseline; gap: 4px; }
.stat strong { font-size: 26px; color: #ffd9a8; font-weight: 800; }
.stat em { font-style: normal; font-size: 13px; color: #ffd9a8; }
.stat span { font-size: 13px; color: #cfc4ba; }

.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.filter-tag { display: inline-block; background: var(--brand-soft); border: 1px solid #f3c2cb; color: var(--brand); border-radius: 16px; padding: 4px 12px; font-size: 13px; text-decoration: none; }
.filter-clear { font-size: 13px; color: var(--sub); text-decoration: underline; }
.result-bar { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 2px; margin-bottom: 14px; font-size: 14px; color: var(--ink); font-weight: 600; }

.chip-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.chip-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.chip-label { flex: 0 0 auto; font-size: 13px; color: var(--muted); min-width: 34px; }
.chip { flex: 0 0 auto; font-size: 13px; padding: 5px 12px; border-radius: 18px; border: 1px solid var(--line); background: #fff; color: var(--sub); text-decoration: none; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.res-grid { grid-template-columns: 1fr; }
.res-card { padding: 0; overflow: hidden; }
.res-cover { height: 96px; position: relative; display: flex; align-items: flex-end; padding: 10px; }
.res-cover .res-type-badge { background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.t-residential { background: linear-gradient(135deg,#2b5876,#4e4376); }
.t-commercial_space { background: linear-gradient(135deg,#8e2f3c,#c8102e); }
.t-office { background: linear-gradient(135deg,#1f3b5c,#3a6ea5); }
.t-industrial_space { background: linear-gradient(135deg,#3d3d3d,#6b5b3e); }
.t-industrial_park { background: linear-gradient(135deg,#1a4a3a,#2b7a5e); }
.t-land { background: linear-gradient(135deg,#5c4a1f,#9c7a2c); }
.t-supplier { background: linear-gradient(135deg,#26314b,#455a8a); }
.t-local_service { background: linear-gradient(135deg,#4a2b5e,#7b2f8e); }
.t-company, .t-education, .t-healthcare, .t-other { background: linear-gradient(135deg,#444,#777); }
.res-body { padding: 12px 14px 14px; }
.res-body h3 { font-size: 15px; line-height: 1.45; margin-bottom: 4px; }
.res-loc { font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.res-nums { display: flex; gap: 18px; border-top: 1px dashed var(--line); padding-top: 8px; margin-bottom: 8px; }
.res-nums .num strong { display: block; font-size: 15px; color: var(--brand); }
.res-nums .num span { font-size: 11px; color: var(--muted); }
.res-nums .num-wide { flex: 1; min-width: 0; }
.res-nums .num-wide .num-text { font-size: 12px !important; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.intent-card { display: block; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.intent-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.10); }
.intent-card h3 { color: var(--brand); }

@media (min-width: 768px) {
  .res-hero h1 { font-size: 32px; }
  .stat strong { font-size: 30px; }
  .res-grid { grid-template-columns: repeat(3, 1fr); }
  .res-cover { height: 120px; }
}
/* RTL（阿语）：定位徽标与按钮镜像 */
[dir="rtl"] .card .btn-compare { right: auto; left: 10px; }
[dir="rtl"] .res-loc, [dir="rtl"] .chip-label { text-align: right; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pager-info { font-size: 13px; color: var(--sub); }

/* v1.0 商协会名录（2026-10-25） */
.assoc-cover-chamber { background: linear-gradient(135deg,#7a1f2b,#c8102e); }
.assoc-cover-association { background: linear-gradient(135deg,#1f3b5c,#3a6ea5); }
.assoc-cover-chamber strong, .assoc-cover-association strong { position: absolute; top: 10px; inset-inline-end: 10px; color: rgba(255,255,255,.92); font-size: 13px; font-weight: 600; background: rgba(0,0,0,.22); padding: 2px 10px; border-radius: 6px; }
.assoc-contacts { margin: 8px 0; display: grid; gap: 4px; }
.assoc-contacts div { display: flex; gap: 8px; font-size: 13px; }
.assoc-contacts dt { color: var(--sub); min-width: 44px; flex: none; }
.assoc-contacts dd { margin: 0; word-break: break-all; }
.assoc-contacts a { color: var(--brand); }
.assoc-members { font-size: 13px; color: var(--sub); background: var(--soft,#f6f3ee); border-radius: 8px; padding: 8px 10px; }

/* v1.1 商协会详情页（2026-10-25） */
.detail-wrap { display: grid; grid-template-columns: 1fr; gap: 18px; }
.detail-list { display: grid; gap: 6px; margin: 10px 0 18px; }
.detail-list div { display: flex; gap: 10px; font-size: 14px; }
.detail-list dt { color: var(--sub); min-width: 60px; flex: none; }
.detail-list dd { margin: 0; word-break: break-all; }
.detail-list a { color: var(--brand); }
.unk { color: var(--sub); }
.member-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.member-table th, .member-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line,#e8e2d8); }
.member-table th { color: var(--sub); font-weight: 600; font-size: 13px; }
.src-list { margin: 0; padding-inline-start: 18px; font-size: 13px; display: grid; gap: 6px; }
.src-list a { color: var(--brand); word-break: break-all; }
.detail-side .card { margin-bottom: 14px; }
@media (min-width: 900px) { .detail-wrap { grid-template-columns: 2fr 1fr; } }

/* v1.2 行业理事分组（2026-10-25） */
.member-group { border: 1px solid var(--line,#e8e2d8); border-radius: 8px; margin: 8px 0; padding: 0; }
.member-group summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14px; list-style: none; }
.member-group summary::before { content: '▸ '; color: var(--brand); }
.member-group[open] summary::before { content: '▾ '; }
.member-names { padding: 0 14px 12px; margin: 0; font-size: 13px; line-height: 2; color: var(--text,#333); }

/* ---------- 资源详情页（两站共用，配色跟随 --brand） ---------- */
.crumb { font-size: 13px; color: var(--sub); padding: 14px 0 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumb a { color: var(--sub); }
.crumb b { color: var(--ink); font-weight: 600; }
.detail-wrap { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px 0 40px; }
.detail-main, .detail-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.detail-side { height: fit-content; }
.detail-title { font-size: 21px; line-height: 1.42; font-weight: 700; letter-spacing: -.2px; }
.badge-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.pill { display: inline-block; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.05); color: var(--sub); }
.pill.gold { background: #fdf5e0; color: #8a6a10; }
.pill.gray { background: #f1f4f7; color: var(--sub); }
.keyfacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0 0; }
.keyfacts .kf { background: rgba(0,0,0,.025); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.keyfacts .kf span { display: block; font-size: 11.5px; color: var(--sub); }
.keyfacts .kf b { display: block; font-size: 15px; font-weight: 700; margin-top: 2px; line-height: 1.4; }
.detail-desc { margin: 16px 0 0; font-size: 15px; line-height: 1.85; color: #2b3542; }
h3.sub-h { font-size: 15px; font-weight: 700; margin: 22px 0 8px; padding-left: 9px; border-left: 3px solid var(--brand); }
h4.side-h { font-size: 13px; font-weight: 700; color: var(--sub); letter-spacing: .4px; margin-bottom: 8px; }
.detail-list { display: grid; }
.detail-list .kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.detail-list .kv:last-child { border-bottom: none; }
.detail-list .kv span { color: var(--sub); flex: 0 0 auto; }
.detail-list .kv b { font-weight: 600; text-align: right; word-break: break-word; }
.quote-box { margin-top: 20px; background: #fbfaf7; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 14px 16px; }
.quote-box h4 { font-size: 12.5px; color: var(--sub); font-weight: 700; letter-spacing: .4px; margin-bottom: 7px; }
.quote-box blockquote { font-size: 13.5px; line-height: 1.85; color: #3a4453; }
.src-link { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; }
.quote-note { font-size: 12px; color: #8a939f; margin-top: 9px; line-height: 1.7; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.75; background: #fff8e6; border: 1px solid #f0e0b8; color: #7a5b12; }
.detail-main .cta-row { flex-direction: row; flex-wrap: wrap; margin-top: 22px; }
.detail-main .cta-row .btn { width: auto; flex: 1 1 auto; min-width: 140px; }
.src-list { list-style: none; }
.src-list li { font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 10px; }
.src-list li b { font-weight: 600; line-height: 1.5; }
.src-list li a { white-space: normal; overflow-wrap: anywhere; font-size: 12.5px; }
.rel-list { display: grid; gap: 8px; }
.rel-item { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rel-item b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.rel-item span { display: block; font-size: 12px; color: var(--sub); margin-top: 3px; }
.rel-item:active { border-color: var(--brand); }
.muted { color: var(--sub); font-size: 13px; }

@media (min-width: 720px) {
  .keyfacts { grid-template-columns: repeat(3, 1fr); }
  .detail-title { font-size: 25px; }
  .detail-main, .detail-side { padding: 24px; }
}
@media (min-width: 900px) {
  .detail-wrap { grid-template-columns: 1.9fr 1fr; gap: 20px; }
}

/* 资源卡片封面：无实景图时用类型首字填充，避免大片空白 */
.res-cover { height: 84px; align-items: center; justify-content: space-between; }
.res-cover-ico { font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, .3); line-height: 1; letter-spacing: -1px; }
@media (min-width: 720px) { .res-cover { height: 96px; } .res-cover-ico { font-size: 36px; } }

/* ---------- 全站搜索：顶栏搜索框 ---------- */
.sitesearch { display: flex; align-items: center; gap: 7px; margin-left: auto; flex: 0 1 220px;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: transparent; min-width: 0; }
.sitesearch:focus-within { border-color: var(--brand); }
.sitesearch svg { width: 15px; height: 15px; color: var(--sub); flex: none; }
.sitesearch input { border: none; outline: none; background: transparent; font: inherit; font-size: 13.5px; width: 100%; min-width: 0; color: inherit; }
.sitesearch input::placeholder { color: var(--sub); opacity: .8; }
.topbar:has(.sitesearch) .langswitch { margin-left: 0; }
@media (max-width: 639px) {
  .topbar { flex-wrap: wrap; }
  .sitesearch { order: 5; flex: 1 1 100%; margin: 2px 0 4px; padding: 7px 14px; }
  .sitesearch input { font-size: 14.5px; }
}

/* ---------- 搜索结果页 ---------- */
.searchbar { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--brand);
  border-radius: 14px; padding: 10px 16px; margin: 18px 0 10px; background: #fff; }
.searchbar svg { width: 19px; height: 19px; color: var(--brand); flex: none; }
.searchbar input { flex: 1; border: none; outline: none; background: transparent; font: inherit; font-size: 15.5px; color: inherit; min-width: 0; }
.searchbar .btn { flex: none; }
.hotwords { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); margin-top: 6px; }
.hotwords a { text-decoration: none; }
.search-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.search-tabs .pill { text-decoration: none; }
.search-tabs .pill.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.search-tabs .pill b { font-weight: 700; margin-left: 4px; opacity: .75; font-size: 12px; }
.search-group { margin-top: 22px; }
.search-group-h { font-size: 15.5px; font-weight: 700; color: var(--ink); border-left: 3px solid var(--brand); padding-left: 10px; margin-bottom: 4px; }
.search-group-h span { color: var(--sub); font-weight: 500; font-size: 13px; margin-left: 6px; }
.search-hit h3 mark, .search-snippet mark { background: rgba(200, 16, 46, .14); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-snippet { margin-top: 6px; font-size: 13px; color: var(--sub); line-height: 1.6; }
@media (max-width: 639px) {
  .searchbar { padding: 9px 13px; }
  .searchbar input { font-size: 14.5px; }
}

/* ---------- 溢出防护（2026-11-04）：grid 轨道可收缩 + 长串强制断行 ---------- */
/* 场景：政策原文的 source_url 等超长 ASCII 串会把 1fr 轨道撑破，导致整页横向滚动 */
.detail-wrap { grid-template-columns: minmax(0, 1fr); }
.detail-main, .detail-side { min-width: 0; }
.detail-main a, .detail-main p, .detail-main b, .detail-main h1, .detail-main h2, .detail-main h3,
.card a, .card p, .list-item a, .list-item p { overflow-wrap: anywhere; }
.detail-main a { word-break: break-all; }
@media (min-width: 900px) { .detail-wrap { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); } }

/* ---------- 岗位详情：薪资强调条 ---------- */
.salary-band { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding: 13px 16px; border-radius: 12px;
  background: #f4f8fc; border-left: 3px solid var(--brand); }
.salary-band span { font-size: 12.5px; color: var(--sub); flex: none; }
.salary-band strong { font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 639px) {
  .salary-band { padding: 12px 14px; gap: 6px; flex-direction: column; align-items: flex-start; }
  .salary-band strong { font-size: 16px; }
}

/* ================= 布局排版打磨（2026-11-04 第二批） ================= */

/* 1) 筛选标签：手机上换行而不是被裁掉一半 */
.chip-row { flex-wrap: wrap; overflow-x: visible; row-gap: 6px; }
.chip { padding: 7px 13px; min-height: 34px; display: inline-flex; align-items: center; line-height: 1.15; }

/* 2) 搜索表单：手机上输入框与按钮同一行，按钮不再占满整行 */
@media (max-width: 639px) {
  .filters { flex-direction: row; align-items: stretch; gap: 8px; }
  .filters input, .filters select { flex: 1 1 auto; min-width: 0; width: auto; }
  .filters .btn, .filters button { flex: 0 0 auto; width: auto; padding-left: 18px; padding-right: 18px; white-space: nowrap; }
}

/* 3) 列表项：桌面悬停给出可点击反馈（原来只有卡片有） */
.list-item { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
@media (hover: hover) {
  .list-item:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(16, 33, 46, .06); }
}
.list-item h3 { overflow-wrap: anywhere; }
.list-item .meta { line-height: 1.7; }

/* 4) 键盘可达性：焦点必须看得见 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px;
}

/* 5) 尊重系统「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- 正文可读性：行长与段距（2026-11-04 第三批） ---------- */
/* PC 上 1080px 宽的正文字符数过多（约 90 字/行），限制到 74ch 提升阅读舒适度 */
.detail-main > p, .detail-main .prose p, .card > p { max-width: 74ch; }
/* 相邻段落要分开，避免糊成一块 */
.detail-main p + p, .card p + p, .prose p + p { margin-top: 10px; }
/* 提示框内链接换行时不要撑破 */
.notice a { overflow-wrap: anywhere; }

/* ---------- 城市指南：章节导航（2026-11-04） ---------- */
/* 手机上保留横向滑动；桌面/平板改成换行，9 节全部可见，不再被裁掉最后一节 */
@media (min-width: 720px) {
  .journey-scroll { flex-wrap: wrap; overflow-x: visible; row-gap: 8px; }
}
.journey-scroll a:hover { border-color: var(--brand); color: var(--ink); }
.guide-sec .card h4 { line-height: 1.45; }
.guide-sec .card p { line-height: 1.75; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .fact { padding: 11px 8px; }
  .fact strong { font-size: 16px; line-height: 1.35; }
}
