/* =====================================================================
   HC14 · 健康刚需工具页设计基座
   ---------------------------------------------------------------------
   只做 token / 骨架 / 无障碍兜底；每页 CSS 在此之上定义独立色板、字体层级、
   版式母题（仪表盘 / 处方笺 / 时间轴 / 光谱 / 环形 / 尺规 / 阶梯 / 图鉴 …）。
   所有选择器限定 .hc14 容器，不影响线上任何已有页面。
   主题由导航 #themeToggle 控制：html[data-theme=dark] 时翻转变量。
   ===================================================================== */
.hc14 {
    --bg: #f7f8f6;
    --surface: #ffffff;
    --surface-2: #f1f4f0;
    --ink: #18201e;
    --sub: #4b5b56;
    --muted: #86958f;
    --line: #dce5df;
    --line-strong: #bccdc4;
    --c1: #2f6b58;
    --c2: #8a5a3b;
    --tint: #e8f2ec;
    --on-c1: #ffffff;
    --ok: #247a54;
    --ok-tint: #e4f3ea;
    --warn: #96620d;
    --warn-tint: #fbf0d9;
    --danger: #b23a3a;
    --danger-tint: #fbe8e8;
    --font: "PingFang SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --r: 16px;
    --r-sm: 10px;
    --shadow: 0 2px 4px rgba(20,40,32,.04), 0 16px 38px rgba(20,40,32,.07);
    --maxw: 1120px;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px 68px;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}
.hc14 *, .hc14 *::before, .hc14 *::after { box-sizing: border-box; }
html[data-theme="dark"] .hc14 {
    --bg: #101815;
    --surface: #17221e;
    --surface-2: #1d2a25;
    --ink: #eef6f1;
    --sub: #b8c9c1;
    --muted: #8aa097;
    --line: #2b3c35;
    --line-strong: #3d554b;
    --tint: #1d332a;
    --ok-tint: #163527;
    --warn-tint: #382b12;
    --danger-tint: #3a2020;
    --shadow: 0 18px 40px rgba(0,0,0,.34);
}
.hc14 p { margin: 0 0 14px; }
.hc14 b, .hc14 strong { font-weight: 750; color: var(--ink); }
.hc14 h1,.hc14 h2,.hc14 h3,.hc14 h4 { margin: 0; font-weight: 800; line-height: 1.3; }
.hc14 small { font-size: 12.5px; color: var(--muted); }
.hc14 [hidden] { display: none !important; }
.hc14 :focus-visible { outline: 3px solid var(--c1); outline-offset: 3px; border-radius: 6px; }

/* 首屏骨架 */
.hc14-hero { padding: 34px 0 22px; }
.hc14-eyebrow { display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:800; letter-spacing:.14em; color:var(--c1); text-transform:uppercase; }
.hc14-eyebrow::before { content:""; width:20px; height:2px; background:currentColor; }
.hc14-hero h1 { font-size: clamp(28px, 4.4vw, 44px); letter-spacing:-.03em; margin:12px 0 10px; }
.hc14-sub { font-size:16px; line-height:1.75; color:var(--sub); max-width:780px; margin:0; }
.hc14-sub b { color:var(--c1); }
.hc14-meta { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:16px; font-size:12.5px; color:var(--muted); }
.hc14-meta b { color:var(--c1); font-size:15px; }

/* 通用组件 */
.hc14-sec { margin-top:38px; }
.hc14-sec-head { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; padding-bottom:10px; margin-bottom:18px; border-bottom:1px solid var(--line-strong); }
.hc14-sec-head .idx { font-family:var(--mono); font-size:12px; font-weight:700; color:var(--c1); letter-spacing:.08em; }
.hc14-sec-head h2 { font-size:21px; }
.hc14-sec-head .note { font-size:12.5px; color:var(--muted); }
.hc14-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:22px; box-shadow:var(--shadow); }
.hc14-row { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.hc14-field { display:flex; flex-direction:column; gap:6px; min-width:0; }
.hc14-field label { font-size:13px; font-weight:700; color:var(--sub); }
.hc14-input, .hc14-select, .hc14-textarea {
    width:100%; padding:11px 13px; border:1.5px solid var(--line-strong); border-radius:var(--r-sm);
    background:var(--surface-2); color:var(--ink); font:inherit; font-size:15px; outline:none; transition:border-color .15s,box-shadow .15s;
}
.hc14-input:focus, .hc14-select:focus, .hc14-textarea:focus { border-color:var(--c1); box-shadow:0 0 0 3px color-mix(in srgb, var(--c1) 18%, transparent); }
.hc14-textarea { min-height:120px; resize:vertical; font-family:var(--mono); font-size:13px; line-height:1.7; }
.hc14-hint { font-size:12px; color:var(--muted); line-height:1.6; }
.hc14-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.hc14-btn {
    appearance:none; border:1.5px solid var(--c1); border-radius:999px; padding:10px 20px;
    background:var(--c1); color:var(--on-c1); font:inherit; font-size:14px; font-weight:750;
    cursor:pointer; transition:transform .15s,filter .15s;
}
.hc14-btn:hover { filter:brightness(1.07); transform:translateY(-1px); }
.hc14-btn--soft { background:transparent; color:var(--c1); }
.hc14-btn--ghost { border-color:var(--line-strong); background:transparent; color:var(--sub); }
.hc14-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:999px; background:var(--tint); color:var(--c1); font-size:12px; font-weight:700; }
.hc14-note { padding:12px 15px; border-radius:var(--r-sm); border-left:4px solid var(--c1); background:var(--tint); font-size:13px; line-height:1.75; }
.hc14-note--warn { border-color:var(--warn); background:var(--warn-tint); }
.hc14-note--danger { border-color:var(--danger); background:var(--danger-tint); }
.hc14-err { min-height:20px; margin-top:10px; color:var(--danger); font-size:13px; font-weight:700; }
.hc14-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--r); }
.hc14-table { width:100%; border-collapse:collapse; font-size:13px; }
.hc14-table th,.hc14-table td { padding:11px 13px; text-align:left; border-bottom:1px solid var(--line); vertical-align:top; }
.hc14-table th { background:var(--surface-2); font-weight:750; color:var(--sub); white-space:nowrap; }
.hc14-table tr:last-child td { border-bottom:none; }
.hc14-table caption { padding:11px 13px; font-size:12px; color:var(--muted); text-align:left; }
.hc14-table .is-bad { background:var(--danger-tint); }
.hc14-result { margin-top:18px; padding:18px; border-radius:var(--r); background:var(--surface-2); border:1px dashed var(--line-strong); }
.hc14-value { font-family:var(--mono); font-weight:800; letter-spacing:-.02em; }
.hc14-foot { margin-top:44px; padding-top:18px; border-top:1px solid var(--line); font-size:12.5px; color:var(--muted); }
.hc14-foot a { color:var(--c1); }
@media (max-width: 720px) {
    .hc14 { padding:0 16px 52px; }
    .hc14-card { padding:17px; }
    .hc14-sec { margin-top:30px; }
}
