/* ============================================================
   water-hardness-calc · 水质硬度与软水机计算器
   水质科学风（whc-）：水滴蓝 + 矿硬灰 + 刻度盘
   ============================================================ */
.whc-page {
    --whc-blue: #2b8ec0; --whc-blue-deep: #1a6b96; --whc-blue-soft: rgba(43,142,192,0.12);
    --whc-mineral: #8b7355; --whc-mineral-deep: #5e4d3a;
    --whc-hard: #c24545; --whc-hard-soft: rgba(194,69,69,0.12);
    --whc-soft: #4f8c6b; --whc-soft-soft: rgba(79,140,107,0.14);
    --whc-paper: #ffffff; --whc-paper-deep: #f4f8fc;
    --whc-text: #1a2430; --whc-muted: #6a7480;
    --whc-line: #e2e8ef; --whc-line-strong: #bfcad8;
    --whc-shadow: 0 6px 18px rgba(26,107,150,0.08);
    color: var(--whc-text); font-size: 15px; line-height: 1.75;
}
[data-theme="dark"] .whc-page {
    --whc-blue: #5fbfe8; --whc-blue-deep: #a4dcff; --whc-blue-soft: rgba(95,191,232,0.14);
    --whc-mineral: #b8a288; --whc-mineral-deep: #d4c1a8;
    --whc-hard: #e07a7a; --whc-hard-soft: rgba(224,122,122,0.14);
    --whc-soft: #7fbc95; --whc-soft-soft: rgba(127,188,149,0.14);
    --whc-paper: #22252b; --whc-paper-deep: #2a2f38;
    --whc-text: #e8ecf2; --whc-muted: #939cb0;
    --whc-line: #30343c; --whc-line-strong: #444a56;
    --whc-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.whc-page b { color: var(--whc-blue-deep); }

.whc-hero { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(180px,0.8fr) minmax(200px,0.7fr); gap: 22px; align-items: center; padding: 28px 30px 24px; margin-bottom: 22px; border: 1px solid var(--whc-line); border-radius: 20px; background:
    radial-gradient(90% 120% at 100% 0%, var(--whc-hard-soft), transparent 55%),
    radial-gradient(70% 100% at 0% 100%, var(--whc-blue-soft), transparent 55%),
    var(--whc-paper); box-shadow: var(--whc-shadow); }
.whc-kicker { display: inline-block; padding: 5px 14px; margin-bottom: 12px; border-radius: 8px; background: var(--whc-blue-soft); color: var(--whc-blue-deep); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; }
.whc-hero h1 { margin: 0 0 10px; font-size: clamp(26px,3.4vw,36px); font-weight: 900; }
.whc-hero-sub { margin: 0 0 14px; max-width: 58ch; color: var(--whc-muted); }
.whc-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.whc-hero-chips li { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--whc-line-strong); background: var(--whc-paper-deep); color: var(--whc-muted); font-size: 12px; font-weight: 700; }

/* Dial visual (unique) */
.whc-hero-dial { display: grid; place-items: center; }
.whc-dial-face { width: 160px; height: 160px; border-radius: 50%; position: relative; background: var(--whc-paper-deep); border: 3px solid var(--whc-line-strong); box-shadow: inset 0 -6px 18px rgba(0,0,0,0.06); }
.whc-dial-scale { position: absolute; inset: 14px; border-radius: 50%; background:
    conic-gradient(from 210deg, var(--whc-soft) 0deg 60deg, #b2c94f 60deg 90deg, var(--whc-mineral) 90deg 120deg, var(--whc-hard) 120deg 150deg, transparent 150deg 360deg);
    -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.whc-dial-pointer { position: absolute; top: 50%; left: 50%; width: 3px; height: 55px; background: var(--whc-hard); border-radius: 2px; transform-origin: 50% 100%; transform: translate(-50%, -100%) rotate(0deg); transition: transform 0.3s ease; box-shadow: 0 0 6px rgba(194,69,69,0.4); }
.whc-dial-pointer::after { content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--whc-hard); border: 2px solid var(--whc-paper); }
.whc-dial-value { position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 900; color: var(--whc-blue-deep); font-variant-numeric: tabular-nums; }
.whc-dial-unit { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 800; color: var(--whc-muted); }

.whc-hero-readout { padding: 18px; border: 1px solid var(--whc-line-strong); border-radius: 14px; border-top: 4px solid var(--whc-blue); background: var(--whc-paper-deep); text-align: center; }
.whc-readout-label { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--whc-muted); }
.whc-readout-num { font-size: 24px; font-weight: 900; color: var(--whc-blue-deep); margin: 6px 0 2px; }
.whc-readout-avg { font-size: 12px; color: var(--whc-muted); }

/* Calc */
.whc-calc { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,0.85fr); gap: 22px; margin-bottom: 22px; }
.whc-panel { padding: 20px; border: 1px solid var(--whc-line); border-radius: 16px; background: var(--whc-paper); box-shadow: var(--whc-shadow); margin-bottom: 14px; }
.whc-panel-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.whc-step { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--whc-blue-deep); color: #fff; font-size: 13px; font-weight: 900; }
.whc-panel-head h2 { margin: 0 0 2px; font-size: 16px; font-weight: 900; }
.whc-panel-head p { margin: 0; font-size: 12px; color: var(--whc-muted); }

.whc-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.whc-field { display: grid; gap: 5px; }
.whc-label { font-size: 12.5px; font-weight: 800; color: var(--whc-muted); }
.whc-input-wrap, .whc-select-wrap { position: relative; }
.whc-input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--whc-line-strong); border-radius: 8px; background: var(--whc-paper-deep); color: var(--whc-text); font-size: 14px; font-weight: 600; outline: none; }
.whc-input:focus { border-color: var(--whc-blue); box-shadow: 0 0 0 3px var(--whc-blue-soft); }
select.whc-input { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%236a7480' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; }
.whc-input-wrap .whc-unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: var(--whc-muted); pointer-events: none; }

/* Result col */
.whc-result-col { position: sticky; top: 20px; align-self: start; }
.whc-result-hero { padding: 18px; border: 1px solid var(--whc-line); border-radius: 14px; background: var(--whc-paper-deep); box-shadow: var(--whc-shadow); margin-bottom: 12px; }
.whc-rh-label { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--whc-muted); margin-bottom: 10px; display: block; }
.whc-rh-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.whc-rh-item { padding: 8px; border-radius: 8px; background: var(--whc-paper); border: 1px solid var(--whc-line); text-align: center; }
.whc-rh-item span { display: block; font-size: 10px; font-weight: 800; color: var(--whc-muted); }
.whc-rh-item b { display: block; font-size: 15px; font-weight: 900; color: var(--whc-blue-deep); font-variant-numeric: tabular-nums; margin-top: 3px; }
.whc-mini-card { padding: 14px 16px; border: 1px solid var(--whc-line); border-radius: 12px; background: var(--whc-paper); box-shadow: var(--whc-shadow); margin-bottom: 12px; }
.whc-mini-card h3 { margin: 0 0 8px; font-size: 13px; font-weight: 900; color: var(--whc-blue-deep); }
.whc-mini-card ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--whc-muted); line-height: 1.9; }
.whc-rec { padding: 14px; border-radius: 12px; font-size: 13px; line-height: 1.8; }
.whc-rec.is-soft { background: var(--whc-soft-soft); border-left: 4px solid var(--whc-soft); color: var(--whc-soft-deep, #36654a); }
.whc-rec.is-hard { background: var(--whc-hard-soft); border-left: 4px solid var(--whc-hard); color: var(--whc-hard); }

/* Softener grid */
.whc-softener { margin-bottom: 24px; padding: 22px 24px; border-radius: 18px; background: var(--whc-paper); border: 1px solid var(--whc-line); box-shadow: var(--whc-shadow); }
.whc-section-head { margin-bottom: 14px; }
.whc-section-kicker { font-size: 11px; font-weight: 900; letter-spacing: 0.18em; color: var(--whc-blue-deep); }
.whc-section-head h2 { margin: 4px 0 4px; font-size: 20px; font-weight: 900; }
.whc-so-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.whc-so-card { padding: 16px; border-radius: 12px; background: var(--whc-paper-deep); border: 1px solid var(--whc-line); }
.whc-so-card h4 { margin: 0 0 6px; font-size: 14px; font-weight: 900; color: var(--whc-blue-deep); }
.whc-so-card p { margin: 0; font-size: 12px; color: var(--whc-muted); line-height: 1.7; }
.whc-so-card.is-recommend { border-color: var(--whc-blue); box-shadow: 0 0 0 2px var(--whc-blue-soft); }

.whc-top { position: fixed; right: 26px; bottom: 30px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--whc-line-strong); border-radius: 10px; background: var(--whc-paper); color: var(--whc-blue-deep); font-size: 17px; font-weight: 900; cursor: pointer; box-shadow: var(--whc-shadow); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.15s ease; z-index: 60; }
.whc-top.is-show { opacity: 1; pointer-events: auto; }

@media (max-width: 1080px) {
    .whc-hero { grid-template-columns: minmax(0,1fr); }
    .whc-calc { grid-template-columns: minmax(0,1fr); }
    .whc-result-col { position: static; }
    .whc-so-grid { grid-template-columns: minmax(0,1fr); }
}
