/* ======================================================================
 * HC13 · 共享功能层（只做结构、可访问性、错误提示、打印）
 * 视觉主题（配色 / 布局 / 字体层级）由每个工具页各自的 CSS 独立设计，
 * 本文件不含任何卡片或首屏样式，避免 13 个页面长得一样。
 * 主题切换只认公共导航 #themeToggle 写入的 :root[data-theme]。
 * ====================================================================== */
.hc13 {
    --hc-ink: #1d2733;
    --hc-muted: #5d6a78;
    --hc-paper: #ffffff;
    --hc-soft: #f4f7f9;
    --hc-line: #dfe6ec;
    --hc-accent: #0f766e;
    --hc-warn: #b42318;
    --hc-shadow: 0 12px 32px rgba(16, 24, 40, .08);
    font-size: 15px;
    line-height: 1.78;
    color: var(--hc-ink);
    -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] .hc13 {
    --hc-ink: #e8edf5;
    --hc-muted: #a9b5c6;
    --hc-paper: #151b23;
    --hc-soft: #1b222c;
    --hc-line: #2c3542;
    --hc-accent: #7e9bff;
    --hc-warn: #ff9b8f;
    --hc-shadow: 0 12px 32px rgba(0, 0, 0, .42);
}
.hc13, .hc13 *, .hc13 *::before, .hc13 *::after { box-sizing: border-box; }
.hc13 [hidden] { display: none !important; }
.hc13 :focus-visible {
    outline: 3px solid var(--hc-accent);
    outline-offset: 2px;
}
.hc13 a { text-decoration: none; }
.hc13 strong, .hc13 b { font-weight: 700; }
.hc13 .hc-wrap {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}
.hc13 .hc-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;
}
.hc13 .hc-err {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-left: 3px solid var(--hc-warn);
    background: color-mix(in srgb, var(--hc-warn) 8%, transparent);
    color: var(--hc-warn);
    font-size: 13px;
    line-height: 1.65;
    border-radius: 0 8px 8px 0;
}
.hc13 .hc-crumb ol {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 6px; list-style: none; margin: 0; padding: 0;
    font-size: 12.5px; letter-spacing: .2px;
}
.hc13 .hc-crumb li + li::before {
    content: "›"; margin-right: 6px; color: var(--hc-muted);
}
.hc13 .hc-crumb a { color: var(--hc-muted); border-bottom: 1px solid transparent; }
.hc13 .hc-crumb a:hover { color: var(--hc-accent); border-bottom-color: currentColor; }
.hc13 .hc-crumb [aria-current="page"] { color: var(--hc-ink); font-weight: 700; }
.hc13 .hc-kw {
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--hc-muted); font-variant-numeric: tabular-nums;
}
.hc13 .hc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hc13 .hc-btn {
    appearance: none; border: 1px solid var(--hc-line); background: var(--hc-paper);
    color: var(--hc-ink); padding: 10px 18px; border-radius: 10px;
    font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.hc13 .hc-btn:hover { transform: translateY(-1px); box-shadow: var(--hc-shadow); }
.hc13 .hc-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.hc13 .hc-btn--main {
    background: var(--hc-accent); border-color: var(--hc-accent); color: #fff;
}
.hc13 .hc-input, .hc13 .hc-select, .hc13 .hc-textarea {
    width: 100%; font: inherit; font-size: 14px; color: var(--hc-ink);
    background: var(--hc-paper); border: 1px solid var(--hc-line);
    border-radius: 9px; padding: 9px 12px; line-height: 1.5;
}
.hc13 .hc-textarea { min-height: 108px; resize: vertical; font-variant-numeric: tabular-nums; }
.hc13 .hc-input:focus, .hc13 .hc-select:focus, .hc13 .hc-textarea:focus {
    border-color: var(--hc-accent);
}
.hc13 .hc-prose { max-width: 76ch; font-size: 15px; line-height: 1.9; }
.hc13 .hc-prose p { margin: 0 0 14px; }
.hc13 .hc-prose p + p { margin-top: 4px; }
.hc13 .hc-prose strong { color: var(--hc-ink); }
.hc13 .hc-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hc13 table.hc-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.hc13 .hc-table th, .hc13 .hc-table td {
    padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--hc-line);
    white-space: nowrap;
}
.hc13 .hc-table th { color: var(--hc-muted); font-weight: 650; letter-spacing: .3px; }
.hc13 .hc-note { color: var(--hc-muted); font-size: 13px; line-height: 1.75; }

/* 轻提示条：不是弹窗，仅在用户操作后出现 */
.hc13-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
    z-index: 100001; max-width: 86vw; padding: 10px 18px; border-radius: 999px;
    background: #182230; color: #fff; font-size: 13px; line-height: 1.5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28); opacity: 0;
    transition: opacity .22s ease, transform .22s ease; pointer-events: none;
}
.hc13-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 汇总弹窗：只在用户点「查看汇总」且已有结果时创建 */
.hc13-modal {
    position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center;
    padding: 20px; background: rgba(10, 16, 24, .58); backdrop-filter: blur(3px);
}
.hc13-modal-card {
    width: min(560px, 100%); max-height: 82vh; overflow: auto;
    background: #fff; color: #1d2733; border-radius: 18px; padding: 24px 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3); line-height: 1.8; font-size: 14px;
}
:root[data-theme="dark"] .hc13-modal-card { background: #151b23; color: #e8edf5; }
.hc13-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hc13-modal-head h2 { margin: 0; font-size: 18px; }
.hc13-modal-x {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid #dfe6ec;
    background: transparent; color: inherit; cursor: pointer; font-size: 17px; line-height: 1;
}
:root[data-theme="dark"] .hc13-modal-x { border-color: #2c3542; }
.hc13-modal-body pre {
    white-space: pre-wrap; word-break: break-word; font: inherit; margin: 0;
}
@media (max-width: 640px) {
    .hc13 .hc-wrap { width: min(100% - 28px, 1160px); }
    .hc13 { font-size: 14px; }
    .hc13 .hc-prose { font-size: 14px; line-height: 1.85; }
}
@media print {
    .hc13 .hc-no-print, .hc13 .hc-err, .hc13 .hc-crumb, .hc13-modal, .hc13-toast { display: none !important; }
    .hc13 { background: #fff !important; color: #111 !important; font-size: 12px; }
    .hc13 .hc-wrap { width: 100%; }
    .hc13 .hc-card, .hc13 .hc-panel { box-shadow: none !important; break-inside: avoid; }
    .hc13 [hidden] { display: none !important; }
}
