/* ======================================================================
 * HX · 第 4 / 5 / 6 组（医疗运动口腔 · 出行票务家居 · 政务升学开发）
 * 共享设计底座 base.css
 * ----------------------------------------------------------------------
 * 只提供「跨 30 个工具都成立」的骨架与原子件：
 *   · 设计令牌 + 深浅主题（消费公共导航 #themeToggle 写入的 data-theme）
 *   · 字体层级 / 行距 / 分段，降低阅读阻力
 *   · 栅格 / 卡片 / 表单 / 按钮 / 标签 / 表格 / 折叠 / 吐司 / 结果弹窗
 *   · 若干可复用复合件：评分环、时间轴、清单、步骤条、分段控件
 * 具体配色、版式与首屏构图由每个工具自己的 css/{组}/{slug}.css 决定，
 * 30 个工具互不复用视觉方案，禁止在此处写任何具体工具的样式。
 * ====================================================================== */

.hx {
    /* ---------- 令牌默认值（各页用自己的 [data-page] 覆盖） ---------- */
    --bg: #f6f7fb;
    --bg2: #eceff6;
    --card: #ffffff;
    --card2: #f5f7fb;
    --card3: #eaeef7;
    --ink: #161d2b;
    --ink2: #3b465a;
    --muted: #6d7889;
    --line: #dde3ee;
    --line2: #eaeff7;
    --accent: #33508f;
    --accent-ink: #ffffff;
    --accent-soft: #e6ecf9;
    --accent2: #a8541f;
    --accent2-soft: #fbeade;
    --ok: #1c7a4d;
    --ok-bg: #e1f3e9;
    --warn: #92600a;
    --warn-bg: #fbf0d9;
    --bad: #ab2f28;
    --bad-bg: #fbe8e5;
    --info: #146c86;
    --info-bg: #e2f2f7;
    --shadow-xs: 0 1px 2px rgba(20, 28, 43, .05);
    --shadow: 0 2px 8px rgba(20, 28, 43, .06), 0 12px 32px rgba(20, 28, 43, .07);
    --shadow-lg: 0 6px 20px rgba(20, 28, 43, .09), 0 30px 66px rgba(20, 28, 43, .13);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --font-head: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
    --head-weight: 780;
    --tracking: 0;

    display: block;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15.5px;
    line-height: 1.86;
    padding: 0 0 64px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 深色主题：只消费公共导航栏主题开关写入的 <html data-theme="dark"> */
:root[data-theme="dark"] .hx {
    --bg: #101520;
    --bg2: #161d2b;
    --card: #1a2230;
    --card2: #202939;
    --card3: #273142;
    --ink: #e6ecf6;
    --ink2: #bcc7d8;
    --muted: #8b98ab;
    --line: #303c4f;
    --line2: #26313f;
    --accent: #7fa6e8;
    --accent-ink: #0d1420;
    --accent-soft: #1d2a40;
    --accent2: #e0914f;
    --accent2-soft: #38291b;
    --ok: #5cbb87;
    --ok-bg: #1a3226;
    --warn: #d9ac57;
    --warn-bg: #342a17;
    --bad: #e08076;
    --bad-bg: #38211f;
    --info: #56bcd4;
    --info-bg: #16303a;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .45);
    --shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .32);
    --shadow-lg: 0 6px 20px rgba(0, 0, 0, .5), 0 30px 66px rgba(0, 0, 0, .42);
}

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

/* ---------- 1. 页面容器 ---------- */
.hx-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ---------- 2. 字体层级 ---------- */
.hx h1, .hx h2, .hx h3, .hx h4 {
    font-family: var(--font-head);
    font-weight: var(--head-weight);
    letter-spacing: var(--tracking);
    line-height: 1.32;
    margin: 0;
    color: var(--ink);
}
.hx h1 { font-size: clamp(27px, 3.5vw, 41px); letter-spacing: -.018em; }
.hx h2 { font-size: clamp(19px, 2.1vw, 23px); letter-spacing: -.01em; }
.hx h3 { font-size: 17px; }
.hx h4 { font-size: 15px; }
.hx p { margin: 0 0 12px; }
.hx p:last-child { margin-bottom: 0; }
.hx b, .hx strong { font-weight: 700; color: var(--ink); }
.hx .kw {
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 5px;
    padding: 0 5px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
:root[data-theme="dark"] .hx .kw { color: var(--accent2); background: var(--accent2-soft); }
.hx small { font-size: 12.5px; color: var(--muted); }
.hx code { font-family: var(--font-mono); font-size: .92em; background: var(--card2); padding: 1.5px 5px; border-radius: 5px; color: var(--ink2); }
.hx .mono, .hx .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hx .num { font-weight: 700; }
.hx .sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. 面包屑（复用公共 partial，只换皮肤） ---------- */
.hx .tsk-crumb-bar { background: transparent; border-bottom: 1px solid var(--line2); }
.hx .tsk-crumb-bar-in { max-width: 1180px; margin: 0 auto; padding: 11px 22px; }
.hx .tsk-crumb { font-size: 12.5px; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap; align-items: center; }
.hx .tsk-crumb a { color: var(--muted); text-decoration: none; }
.hx .tsk-crumb a:hover { color: var(--accent); text-decoration: underline; }
.hx .tsk-crumb-sep { margin: 0 8px; opacity: .5; }
.hx .tsk-crumb-cur { color: var(--ink2); font-weight: 600; }

/* ---------- 4. 区块结构 ---------- */
.hx-sec { margin: 0 0 26px; }
.hx-sec-hd {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line2);
}
.hx-sec-hd .idx {
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em;
    color: var(--accent); font-weight: 700; white-space: nowrap;
}
.hx-sec-hd .hint { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.hx-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
}
.hx-card--flat { box-shadow: none; background: var(--card2); border-style: dashed; }
.hx-card--pad0 { padding: 0; overflow: hidden; }
.hx-grid { display: grid; gap: 14px; }
.hx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hx-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hx-divider { height: 1px; background: var(--line2); margin: 18px 0; border: 0; }

/* ---------- 5. 表单原子 ---------- */
.hx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hx-field > label,
.hx-label {
    font-size: 13px; font-weight: 600; color: var(--ink2); line-height: 1.45;
}
.hx-field .tip { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.hx input[type="text"],
.hx input[type="number"],
.hx input[type="date"],
.hx input[type="time"],
.hx input[type="search"],
.hx select,
.hx textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    line-height: 1.6;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.hx textarea { min-height: 116px; resize: vertical; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; }
.hx input::placeholder, .hx textarea::placeholder { color: var(--muted); opacity: .75; }
.hx input:focus, .hx select:focus, .hx textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.hx input[aria-invalid="true"], .hx select[aria-invalid="true"], .hx textarea[aria-invalid="true"] {
    border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg);
}
.hx select {
    appearance: none; padding-right: 32px; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.hx input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.hx input[type="checkbox"], .hx input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; flex: 0 0 auto; }
.hx .checkline { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--ink2); line-height: 1.6; }
.hx .checkline input { margin-top: 4px; }
.hx-hint { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 6px; }

/* 分段控件（单选） */
.hx-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--card2); border: 1px solid var(--line); border-radius: var(--radius-pill); }
.hx-seg button {
    appearance: none; border: 0; background: transparent; color: var(--muted);
    font: 600 13px/1.4 var(--font-body); padding: 7px 15px; border-radius: var(--radius-pill);
    cursor: pointer; transition: .15s;
}
.hx-seg button:hover { color: var(--accent); }
.hx-seg button.on { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-xs); }

/* 胶囊标签组（多选） */
.hx-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-pills label {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--line); background: var(--card2); color: var(--ink2);
    border-radius: var(--radius-pill); padding: 7px 14px; font-size: 13.5px; cursor: pointer;
    transition: .15s;
}
.hx-pills label:hover { border-color: var(--accent); color: var(--accent); }
.hx-pills input { width: 15px; height: 15px; }
.hx-pills label.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------- 6. 按钮 ---------- */
.hx-acts { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 16px; }
.hx-btn {
    appearance: none; border: 1px solid var(--line); background: var(--card);
    color: var(--ink2); font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
    line-height: 1.4; padding: 9px 17px; border-radius: var(--radius-sm);
    cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}
.hx-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.hx-btn:active { transform: translateY(0); }
.hx-btn--main { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hx-btn--main:hover { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px var(--accent-soft); }
.hx-btn--alt { background: var(--accent2); color: #fff; border-color: var(--accent2); }
.hx-btn--alt:hover { background: var(--accent2); color: #fff; }
.hx-btn--ghost { background: transparent; }
.hx-btn--sm { padding: 6px 12px; font-size: 12.5px; }
.hx-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.hx :focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }

/* ---------- 7. 状态件 ---------- */
.hx-err {
    display: none; margin-top: 12px; padding: 10px 13px; font-size: 13.5px;
    color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad);
    border-radius: var(--radius-sm); line-height: 1.65;
}
.hx-err.is-on { display: block; }
.hx-note {
    font-size: 13.5px; color: var(--ink2); background: var(--card2);
    border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 11px 14px; line-height: 1.75;
}
.hx-note.is-warn { border-left-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
.hx-note.is-bad { border-left-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.hx-note.is-ok { border-left-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.hx-note.is-info { border-left-color: var(--info); background: var(--info-bg); color: var(--info); }
.hx-tag {
    display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.5;
    padding: 3px 9px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent);
}
.hx-tag.is-ok { background: var(--ok-bg); color: var(--ok); }
.hx-tag.is-warn { background: var(--warn-bg); color: var(--warn); }
.hx-tag.is-bad { background: var(--bad-bg); color: var(--bad); }
.hx-tag.is-info { background: var(--info-bg); color: var(--info); }

/* ---------- 8. 表格 / 滚动 ---------- */
.hx-table { width: 100%; border-collapse: collapse; font-size: 13.8px; line-height: 1.7; }
.hx-table th, .hx-table td { border-bottom: 1px solid var(--line2); padding: 10px 12px; text-align: left; vertical-align: top; }
.hx-table th { color: var(--ink2); font-weight: 700; background: var(--card2); white-space: nowrap; }
.hx-table td { color: var(--ink2); }
.hx-table tr:last-child th, .hx-table tr:last-child td { border-bottom: 0; }
.hx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hx-scroll table { min-width: 560px; }

/* ---------- 9. 结果 / 数据展示 ---------- */
.hx-result { display: none; }
.hx-result.is-on { display: block; }
.hx-empty { color: var(--muted); font-size: 13.5px; padding: 14px 0; }
.hx-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 10px; }
.hx-kv > div { background: var(--card2); border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 11px 13px; }
.hx-kv dt { font-size: 12px; color: var(--muted); margin: 0 0 3px; }
.hx-kv dd { margin: 0; font-size: 19px; font-weight: 700; font-family: var(--font-mono); color: var(--accent); letter-spacing: -.01em; }
.hx-kv dd small { font-size: 12px; font-weight: 400; }
.hx-bar { height: 7px; border-radius: var(--radius-pill); background: var(--line2); overflow: hidden; }
.hx-bar > i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent); transition: width .5s cubic-bezier(.3, .8, .3, 1); }

/* 评分环 */
.hx-ring {
    --pct: 0;
    width: 92px; height: 92px; border-radius: 50%; flex: 0 0 auto;
    display: grid; place-items: center; position: relative;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line2) 0);
}
.hx-ring::after {
    content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--card);
}
.hx-ring > span { position: relative; z-index: 1; font: 800 20px var(--font-mono); color: var(--accent); }
.hx-ring > span small { font-size: 11px; font-weight: 500; color: var(--muted); }

/* 时间轴 */
.hx-timeline { list-style: none; margin: 0; padding: 0; }
.hx-timeline li { position: relative; padding: 0 0 18px 26px; }
.hx-timeline li::before {
    content: ""; position: absolute; left: 5px; top: 8px; width: 9px; height: 9px;
    border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.hx-timeline li::after {
    content: ""; position: absolute; left: 9px; top: 20px; bottom: 0; width: 1px; background: var(--line);
}
.hx-timeline li:last-child { padding-bottom: 0; }
.hx-timeline li:last-child::after { display: none; }
.hx-timeline b { display: block; font-size: 14.5px; }
.hx-timeline span { font-size: 13.5px; color: var(--ink2); line-height: 1.78; }

/* 步骤条 */
.hx-steps { display: grid; gap: 0; counter-reset: hxstep; }
.hx-steps > div {
    counter-increment: hxstep; position: relative;
    padding: 0 0 18px 38px;
}
.hx-steps > div::before {
    content: counter(hxstep); position: absolute; left: 0; top: 0;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent);
    font: 800 13px/26px var(--font-mono); text-align: center;
}
.hx-steps > div::after {
    content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 1px; background: var(--line);
}
.hx-steps > div:last-child { padding-bottom: 0; }
.hx-steps > div:last-child::after { display: none; }
.hx-steps b { display: block; font-size: 14.5px; }
.hx-steps p { font-size: 13.5px; color: var(--ink2); margin: 2px 0 0; line-height: 1.78; }

/* 勾选清单 */
.hx-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hx-checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink2); line-height: 1.75; }
.hx-checklist input[type="checkbox"] { margin-top: 5px; }
.hx-checklist li.done > span { text-decoration: line-through; color: var(--muted); }

/* 对照卡 */
.hx-cmp { display: grid; gap: 12px; }
.hx-cmp-card {
    background: var(--card2); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 15px 17px; position: relative;
}
.hx-cmp-card.is-best { border-color: var(--accent); background: var(--accent-soft); }
.hx-cmp-card h4 { font-size: 15.5px; margin-bottom: 4px; }
.hx-cmp-card p { font-size: 13px; color: var(--ink2); margin: 6px 0 0; line-height: 1.75; }
.hx-cmp-card .sc { font: 800 22px var(--font-mono); color: var(--accent); }
.hx-cmp-card .sc small { font-size: 12px; font-weight: 500; color: var(--muted); }

/* ---------- 10. 正文阅读区 / FAQ ---------- */
.hx-prose { max-width: 880px; font-size: 15.2px; line-height: 1.95; color: var(--ink2); }
.hx-prose h3 { margin: 22px 0 9px; }
.hx-prose h3:first-child { margin-top: 0; }
.hx-prose p { margin: 0 0 14px; }
.hx-prose ul, .hx-prose ol { margin: 0 0 15px; padding-left: 23px; }
.hx-prose li { margin-bottom: 8px; }
.hx-prose strong { color: var(--ink); }
.hx-faq { display: grid; gap: 9px; }
.hx-faq details {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 0 16px;
}
.hx-faq summary {
    cursor: pointer; font-size: 14.8px; font-weight: 600; color: var(--ink);
    padding: 13px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.hx-faq summary::-webkit-details-marker { display: none; }
.hx-faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-mono); font-size: 18px; line-height: 1; }
.hx-faq details[open] summary::after { content: "−"; }
.hx-faq details > div { padding: 0 0 15px; font-size: 14.2px; line-height: 1.9; color: var(--ink2); }
.hx-faq details > div p { margin: 0; }

/* 同组推荐 */
.hx-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 10px; }
.hx-related a {
    display: flex; gap: 11px; align-items: center; text-decoration: none;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 12px 14px; transition: border-color .15s ease, transform .15s ease;
}
.hx-related a:hover { border-color: var(--accent); transform: translateY(-2px); }
.hx-related .ri { font-size: 20px; line-height: 1; }
.hx-related b { display: block; font-size: 13.8px; color: var(--ink); }
.hx-related small { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.hx-foot { margin-top: 30px; font-size: 12.5px; color: var(--muted); line-height: 1.85; }

/* ---------- 11. AI 面板 ---------- */
.hx-ai {
    margin-top: 18px; border: 1px dashed var(--line); border-radius: var(--radius);
    background: var(--card2); padding: 16px 18px;
}
.hx-ai-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hx-ai-hd b { font-size: 14.5px; }
.hx-ai-out { min-height: 26px; font-size: 14.2px; line-height: 1.85; color: var(--ink2); white-space: pre-wrap; margin-top: 10px; }
.hx-ai-status { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ---------- 12. 吐司（懒创建） ---------- */
#hxToast {
    position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(12px);
    z-index: 100010; max-width: min(86vw, 540px); padding: 11px 20px;
    border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.55;
    background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
}
#hxToast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
#hxToast.is-bad { background: var(--bad); color: #fff; }

/* ---------- 13. 结果弹窗（JS 在用户完成操作后创建，页面加载时不存在） ---------- */
#hxModalMask {
    position: fixed; inset: 0; z-index: 100020; background: rgba(10, 16, 23, .62);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(3px);
}
#hxModal {
    width: min(680px, 100%); max-height: min(80vh, 760px); overflow: auto;
    background: var(--card); color: var(--ink); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 24px 26px; font-size: 14.2px; line-height: 1.85;
}
#hxModal h3 { margin-bottom: 12px; }
#hxModal .hx-modal-acts { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
#hxModal pre {
    font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75;
    white-space: pre-wrap; word-break: break-word; background: var(--card2);
    border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 13px; margin: 0;
    color: var(--ink2);
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 940px) {
    .hx-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hx-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hx-sec-hd .hint { margin-left: 0; width: 100%; }
}
@media (max-width: 660px) {
    .hx { font-size: 15px; padding-bottom: 40px; }
    .hx-wrap { padding: 0 14px; }
    .hx .tsk-crumb-bar-in { padding: 9px 14px; }
    .hx-card { padding: 17px 15px; }
    .hx-grid--2, .hx-grid--3, .hx-grid--4 { grid-template-columns: minmax(0, 1fr); }
    .hx-acts { gap: 7px; }
    .hx-btn { padding: 8px 13px; font-size: 13px; }
    .hx-prose { line-height: 1.88; }
    .hx-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 公共推荐位（layouts.app 内）在窄屏下的既有溢出修复：
   base.css 只在这 30 个新页加载，不会改动任何线上已有页面。 */
@media (max-width: 660px) {
    .tool-rec { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; box-sizing: border-box; }
    .tool-rec-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .tool-rec-item { min-width: 0 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
    .tool-rec-body, .tool-rec-body b, .tool-rec-body small { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
    .hx *, .hx *::before, .hx *::after { transition: none !important; animation: none !important; }
}

@media print {
    .hx { background: #fff; color: #000; }
    .hx-acts, .hx-btn, #hxToast, #hxModalMask { display: none !important; }
    .hx-card { box-shadow: none; break-inside: avoid; }
}
