/* /tool 计算器页公共外壳：设计令牌、基础排版、栅格与 FAQ 折叠块
   全部规则限定在 .toolx 容器内，不干扰主站公共头部与页脚 */

.toolx {
    --x2-bg: #fbfaf7;
    --x2-surface: #ffffff;
    --x2-surface-2: #f5f3ee;
    --x2-ink: #14161a;
    --x2-ink-2: #3d434c;
    --x2-muted: #6b7280;
    --x2-line: #e5e1d8;
    --x2-line-strong: #cfc9bc;
    --x2-accent: #e8590c;
    --x2-accent-soft: #fff1e8;
    --x2-accent-line: #f3c5a6;
    --x2-ok: #15803d;
    --x2-err: #b91c1c;
    --x2-ok-soft: #eaf7ef;
    --x2-err-soft: #fdeceb;
    --x2-swim: #0284c7;
    --x2-bike: #b45309;
    --x2-run: #dc2626;
    --x2-r: 16px;
    --x2-r-sm: 10px;
    --x2-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --x2-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --x2-shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 10px 30px -18px rgba(20, 22, 26, .28);

    background: var(--x2-bg);
    color: var(--x2-ink);
    font-family: var(--x2-font);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] .toolx {
    --x2-bg: #0e1013;
    --x2-surface: #16191e;
    --x2-surface-2: #1c2027;
    --x2-ink: #f2f3f5;
    --x2-ink-2: #c8ccd3;
    --x2-muted: #98a0ab;
    --x2-line: #262b33;
    --x2-line-strong: #3a414c;
    --x2-accent: #ff8a4c;
    --x2-accent-soft: rgba(255, 138, 76, .13);
    --x2-accent-line: rgba(255, 138, 76, .36);
    --x2-ok: #4ade80;
    --x2-err: #f87171;
    --x2-ok-soft: rgba(74, 222, 128, .12);
    --x2-err-soft: rgba(248, 113, 113, .12);
    --x2-swim: #38bdf8;
    --x2-bike: #fbbf24;
    --x2-run: #f87171;
    --x2-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -24px rgba(0, 0, 0, .8);
}

.toolx h1, .toolx h2, .toolx h3, .toolx h4 {
    margin: 0;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
}
.toolx p { margin: 0; }
.toolx a { color: var(--x2-accent); text-decoration: none; }
.toolx a:hover { text-decoration: underline; text-underline-offset: 3px; }
.toolx button { font-family: inherit; }
.toolx table { border-collapse: collapse; }

.toolx-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* 组件自身的 display 会盖掉 UA 的 [hidden]，这里强制生效 */
.toolx [hidden] { display: none !important; }

/* 常见问题折叠块 */
.toolx-faq { margin-top: 6px; }
.toolx-faq details { border-bottom: 1px solid var(--x2-line); }
.toolx-faq details:first-child { border-top: 1px solid var(--x2-line); }
.toolx-faq summary {
    position: relative;
    padding: 14px 30px 14px 0;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--x2-ink);
    list-style: none;
}
.toolx-faq summary::-webkit-details-marker { display: none; }
.toolx-faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 13px;
    font-family: var(--x2-mono);
    font-size: 16px;
    color: var(--x2-muted);
}
.toolx-faq details[open] summary::after { content: "−"; color: var(--x2-accent); }
.toolx-faq .toolx-faq-body { padding: 0 0 15px; font-size: 14px; line-height: 1.9; color: var(--x2-ink-2); }
