/* =====================================================================
   甲醛通风时长估算 —— 健康安全仪表盘风（自成体系，不依赖项目其他 CSS）
   白底 + 青绿医疗点缀 + 状态色（危险红→警告橙→临界青绿→安全绿）
   类名统一 fv- 前缀
   ===================================================================== */

.fv-page {
    --fv-bg: #f2f7f6;
    --fv-panel: #ffffff;
    --fv-panel-soft: #f6fbf9;
    --fv-ink: #16302b;
    --fv-ink-sub: #4d6a63;
    --fv-ink-muted: #87a099;
    --fv-line: #dfeae7;
    --fv-line-soft: #ecf3f1;
    --fv-teal: #0f9b8e;
    --fv-teal-deep: #0b726a;
    --fv-teal-soft: #e3f4f1;
    --fv-safe: #17a673;
    --fv-caution: #2bb673;
    --fv-warning: #ef8a17;
    --fv-danger: #e23b3b;
    --fv-radius: 16px;
    --fv-shadow: 0 1px 2px rgba(15, 60, 52, .05), 0 10px 28px rgba(15, 60, 52, .07);

    background: var(--fv-bg);
    color: var(--fv-ink);
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: 64px;
}
.fv-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------------- 顶部条 ---------------- */
.fv-topbar {
    background: linear-gradient(135deg, #0b726a 0%, #0f9b8e 55%, #14b8a6 100%);
    color: #eafaf7;
    padding: 20px 0 28px;
    margin-bottom: 24px;
}
.fv-crumb { font-size: 12.5px; color: #b9e7e0; margin-bottom: 18px; }
.fv-crumb a { color: #d2f3ee; text-decoration: none; }
.fv-crumb a:hover { color: #fff; }
.fv-crumb .sep { margin: 0 8px; opacity: .65; }
.fv-crumb .current { color: #ffffff; }

.fv-headline { display: flex; align-items: center; gap: 18px; }
.fv-head-icon {
    width: 58px; height: 58px; flex-shrink: 0;
    display: grid; place-items: center;
    font-size: 30px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
}
.fv-headline h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.fv-sub { margin: 6px 0 0; font-size: 13.5px; color: #c8eee9; }
.fv-sub b { color: #fff; font-weight: 700; }

.fv-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fv-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #e6faf7;
}

/* ---------------- 面板/卡片 ---------------- */
.fv-panel {
    background: var(--fv-panel);
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius);
    box-shadow: var(--fv-shadow);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.fv-panel-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 800;
    color: var(--fv-ink);
    margin-bottom: 18px;
}
.fv-panel-label .num {
    width: 25px; height: 25px; flex-shrink: 0;
    display: inline-grid; place-items: center;
    background: var(--fv-teal);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}
.fv-panel-label .fv-more {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--fv-ink-muted);
}

/* ---------------- 双栏布局 ---------------- */
.fv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 20px;
    align-items: start;
}
.fv-grid .fv-panel { margin-bottom: 0; }
.fv-stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------------- 表单 ---------------- */
.fv-field { margin-bottom: 18px; }
.fv-field:last-child { margin-bottom: 0; }
.fv-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--fv-ink-sub);
    margin-bottom: 8px;
}
.fv-label .fv-opt { font-weight: 400; color: var(--fv-ink-muted); }

.fv-input {
    width: 100%;
    padding: 10px 13px;
    font-size: 14.5px;
    color: var(--fv-ink);
    background: var(--fv-panel);
    border: 1.5px solid var(--fv-line);
    border-radius: 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.fv-input:focus {
    border-color: var(--fv-teal);
    box-shadow: 0 0 0 3px rgba(15, 155, 142, .15);
}
.fv-input-addon { position: relative; }
.fv-input-addon .fv-input { padding-right: 46px; }
.fv-input-addon .fv-unit {
    position: absolute;
    right: 13px; top: 50%;
    transform: translateY(-50%);
    font-size: 12.5px;
    color: var(--fv-ink-muted);
    pointer-events: none;
}
.fv-hint {
    margin: 7px 0 0;
    font-size: 12px;
    color: var(--fv-ink-muted);
}
.fv-hint b { color: var(--fv-ink-sub); }

/* 分段选择器 */
.fv-seg {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.fv-seg-btn {
    appearance: none;
    cursor: pointer;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fv-ink-sub);
    background: var(--fv-panel-soft);
    border: 1.5px solid var(--fv-line);
    border-radius: 99px;
    transition: all .15s;
    user-select: none;
}
.fv-seg-btn:hover { border-color: var(--fv-teal); color: var(--fv-teal-deep); }
.fv-seg-btn.is-active {
    background: var(--fv-teal);
    border-color: var(--fv-teal);
    color: #fff;
    box-shadow: 0 3px 10px rgba(15, 155, 142, .3);
}

.fv-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.fv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 22px; }
.fv-btn {
    appearance: none;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 11px;
    border: 1.5px solid transparent;
    transition: all .15s;
}
.fv-btn-primary {
    background: var(--fv-teal);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 155, 142, .28);
}
.fv-btn-primary:hover { background: var(--fv-teal-deep); }
.fv-btn-ghost {
    background: var(--fv-panel);
    color: var(--fv-teal-deep);
    border-color: var(--fv-line);
}
.fv-btn-ghost:hover { border-color: var(--fv-teal); background: var(--fv-teal-soft); }

/* ---------------- 仪表盘 ---------------- */
.fv-gauge-card {
    text-align: center;
    background:
        radial-gradient(120% 90% at 50% 0%, var(--fv-teal-soft) 0%, var(--fv-panel) 62%);
}
.fv-gauge-wrap {
    position: relative;
    max-width: 320px;
    margin: 2px auto 6px;
}
.fv-gauge { width: 100%; height: auto; display: block; overflow: visible; }
.fv-gauge-tick { stroke: var(--fv-line); stroke-width: 2; }
.fv-gauge-needle {
    transition: transform .5s cubic-bezier(.22, 1, .36, 1);
    transform-origin: 100px 100px;
}
.fv-gauge-cap { fill: var(--fv-ink); }
.fv-gauge-center {
    position: absolute;
    left: 0; right: 0;
    bottom: 4%;
    text-align: center;
}
.fv-risk-name {
    display: inline-block;
    font-size: 21px;
    font-weight: 800;
    padding: 3px 18px;
    border-radius: 99px;
    color: #fff;
    background: var(--fv-teal);
}
.fv-gauge[data-risk="safe"] .fv-risk-name { background: var(--fv-safe); }
.fv-gauge[data-risk="caution"] .fv-risk-name { background: var(--fv-caution); }
.fv-gauge[data-risk="warning"] .fv-risk-name { background: var(--fv-warning); }
.fv-gauge[data-risk="danger"] .fv-risk-name { background: var(--fv-danger); }
.fv-risk-desc { margin-top: 7px; font-size: 12.5px; color: var(--fv-ink-sub); }

.fv-gauge-ends {
    display: flex;
    justify-content: space-between;
    max-width: 300px;
    margin: 0 auto;
    font-size: 11.5px;
    color: var(--fv-ink-muted);
    padding: 0 6px;
}

/* 大号读数 */
.fv-readouts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}
.fv-readout {
    background: var(--fv-panel-soft);
    border: 1px solid var(--fv-line-soft);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}
.fv-readout .k { display: block; font-size: 11.5px; color: var(--fv-ink-muted); margin-bottom: 3px; }
.fv-readout .v {
    display: block;
    font-size: 21px;
    font-weight: 800;
    color: var(--fv-teal-deep);
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}
.fv-readout .v small { font-size: 11px; font-weight: 600; color: var(--fv-ink-muted); margin-left: 2px; }

/* 倒计时 */
.fv-countdown {
    margin-top: 16px;
    border: 1.5px dashed var(--fv-line);
    border-radius: 13px;
    padding: 15px 18px;
    background: var(--fv-panel-soft);
    text-align: center;
}
.fv-cd-big {
    font-size: 34px;
    font-weight: 800;
    color: var(--fv-teal-deep);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.fv-cd-big small { font-size: 16px; font-weight: 700; color: var(--fv-ink-sub); }
.fv-cd-sub { margin-top: 5px; font-size: 12.5px; color: var(--fv-ink-sub); }
.fv-text-safe { color: var(--fv-safe); }
.fv-text-danger { color: var(--fv-danger); }

/* 明细键值 */
.fv-factors { list-style: none; margin: 0; padding: 0; }
.fv-factors li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--fv-line-soft);
    font-size: 13px;
}
.fv-factors li:last-child { border-bottom: 0; }
.fv-factors .k { color: var(--fv-ink-muted); flex-shrink: 0; }
.fv-factors .v { color: var(--fv-ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- 策略对比表 ---------------- */
.fv-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--fv-line); }
.fv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 480px;
}
.fv-table th {
    background: var(--fv-teal-soft);
    color: var(--fv-teal-deep);
    font-weight: 800;
    text-align: left;
    padding: 11px 14px;
    white-space: nowrap;
}
.fv-table td { padding: 11px 14px; border-top: 1px solid var(--fv-line-soft); vertical-align: middle; }
.fv-table tbody tr:nth-child(even) { background: var(--fv-panel-soft); }
.fv-table tr.is-current { background: rgba(15, 155, 142, .09); }
.fv-table tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--fv-teal); }
.fv-days-cell { font-weight: 700; color: var(--fv-teal-deep); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fv-cur-tag {
    display: inline-block;
    margin-left: 8px;
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    background: var(--fv-teal);
    border-radius: 5px;
    padding: 1px 7px;
    vertical-align: middle;
}

/* ---------------- 通风方案 ---------------- */
.fv-plan-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fv-plan-item {
    display: flex;
    gap: 11px;
    padding: 14px;
    background: var(--fv-panel-soft);
    border: 1px solid var(--fv-line-soft);
    border-radius: 12px;
}
.fv-plan-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    display: grid; place-items: center;
    font-size: 19px;
    background: #fff;
    border: 1px solid var(--fv-line);
    border-radius: 10px;
}
.fv-plan-item b { display: block; font-size: 13.5px; margin-bottom: 3px; color: var(--fv-ink); }
.fv-plan-item p { margin: 0; font-size: 12.5px; color: var(--fv-ink-sub); line-height: 1.55; }

/* ---------------- 检测建议 & 避坑 ---------------- */
.fv-advice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fv-advice-card {
    border: 1px solid var(--fv-line);
    border-radius: 13px;
    padding: 16px 18px;
    background: var(--fv-panel-soft);
}
.fv-advice-card h3 {
    margin: 0 0 10px;
    font-size: 14.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 7px;
}
.fv-advice-card ul { margin: 0; padding-left: 18px; }
.fv-advice-card li { margin-bottom: 8px; font-size: 12.8px; color: var(--fv-ink-sub); }
.fv-advice-card li:last-child { margin-bottom: 0; }
.fv-advice-card li b { color: var(--fv-ink); }
.fv-advice-card--test { border-color: #bfe6df; background: linear-gradient(180deg, #f2fbfa, var(--fv-panel-soft)); }
.fv-advice-card--avoid { border-color: #f3ddc0; background: linear-gradient(180deg, #fef6ec, var(--fv-panel-soft)); }

.fv-pit {
    display: flex;
    gap: 8px;
    align-items: baseline;
}
.fv-pit .tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: 5px;
}
.tag-no { background: #fbe3e3; color: #c02d2d; }
.tag-cond { background: #fdf0d8; color: #b06a08; }
.tag-ok { background: #dcf3e8; color: #0d8155; }

/* ---------------- 免责声明 ---------------- */
.fv-disclaim {
    background: var(--fv-teal-soft);
    border: 1px solid #bfe6df;
    border-left: 4px solid var(--fv-teal);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 12.8px;
    color: var(--fv-ink-sub);
    margin: 8px 0 0;
}
.fv-disclaim b { color: var(--fv-teal-deep); }

/* ---------------- Mini tabs ---------------- */
.fv-mini-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 2px solid var(--fv-line);
    margin: 8px 0 18px;
}
.fv-mini-tab {
    appearance: none;
    cursor: pointer;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--fv-ink-sub);
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
}
.fv-mini-tab.is-active { color: var(--fv-teal-deep); border-bottom-color: var(--fv-teal); }
.fv-mini-panel { display: none; }
.fv-mini-panel.is-active { display: block; }
.fv-h2 { font-size: 17px; font-weight: 800; margin: 18px 0 10px; }
.fv-h2:first-child { margin-top: 0; }
.fv-p { font-size: 13.5px; color: var(--fv-ink-sub); margin: 0 0 12px; }
.fv-p code {
    background: var(--fv-teal-soft);
    color: var(--fv-teal-deep);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 12.5px;
}
.fv-faq {
    border: 1px solid var(--fv-line);
    border-radius: 11px;
    padding: 4px 16px;
    margin-bottom: 9px;
    background: var(--fv-panel);
}
.fv-faq summary { cursor: pointer; font-weight: 700; font-size: 13.5px; padding: 9px 0; color: var(--fv-ink); }
.fv-faq .faq-a { font-size: 12.8px; color: var(--fv-ink-sub); padding: 0 0 12px; }

/* ---------------- 相关工具 ---------------- */
.fv-related h2 { font-size: 17px; font-weight: 800; margin: 0 0 12px; }
.fv-rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fv-rel-item {
    display: block;
    padding: 12px 16px;
    background: var(--fv-panel);
    border: 1px solid var(--fv-line);
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--fv-ink);
    text-decoration: none;
    transition: border-color .15s;
}
.fv-rel-item:hover { border-color: var(--fv-teal); color: var(--fv-teal-deep); }

/* ---------------- 返回顶部 ---------------- */
.back-to-top {
    position: fixed;
    right: 26px; bottom: 26px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--fv-teal);
    color: #fff;
    font-size: 19px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 155, 142, .4);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, background .2s;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--fv-teal-deep); }

/* =====================================================================
   深色模式
   ===================================================================== */
[data-theme="dark"] .fv-page {
    --fv-bg: #0e1a18;
    --fv-panel: #142522;
    --fv-panel-soft: #182d2a;
    --fv-ink: #e2f2ee;
    --fv-ink-sub: #9db9b2;
    --fv-ink-muted: #6f8c85;
    --fv-line: #28403b;
    --fv-line-soft: #203633;
    --fv-teal-soft: #153a36;
    --fv-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
}
[data-theme="dark"] .fv-topbar { background: linear-gradient(135deg, #0a4f49, #0d7268 60%, #0f8b80); }
[data-theme="dark"] .fv-gauge-card { background: radial-gradient(120% 90% at 50% 0%, #153a36 0%, #142522 65%); }
[data-theme="dark"] .fv-gauge-tick { stroke: #28403b; }
[data-theme="dark"] .fv-gauge-cap { fill: #e2f2ee; }
[data-theme="dark"] .fv-plan-icon { background: #142522; border-color: #28403b; }
[data-theme="dark"] .fv-advice-card--test { background: linear-gradient(180deg, #14322f, #182d2a); border-color: #1f4e48; }
[data-theme="dark"] .fv-advice-card--avoid { background: linear-gradient(180deg, #33251a, #182d2a); border-color: #54402a; }
[data-theme="dark"] .tag-no { background: #4a2222; color: #f0a0a0; }
[data-theme="dark"] .tag-cond { background: #453520; color: #e0b46e; }
[data-theme="dark"] .tag-ok { background: #173d30; color: #6fd6a6; }
[data-theme="dark"] .fv-table tr.is-current { background: rgba(15, 155, 142, .16); }
[data-theme="dark"] .fv-disclaim { background: #153a36; border-color: #1f4e48; }
[data-theme="dark"] .fv-faq { background: #142522; }
[data-theme="dark"] .fv-rel-item { background: #142522; }
[data-theme="dark"] .back-to-top { background: #0d7268; }

/* =====================================================================
   响应式
   ===================================================================== */
@media (max-width: 920px) {
    .fv-grid { grid-template-columns: 1fr; }
    .fv-advice-grid { grid-template-columns: 1fr; }
    .fv-rel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .fv-container { padding: 0 13px; }
    .fv-panel { padding: 16px 15px; }
    .fv-headline h1 { font-size: 21px; }
    .fv-head-icon { width: 48px; height: 48px; font-size: 24px; }
    .fv-row2 { grid-template-columns: 1fr; }
    .fv-readouts { grid-template-columns: 1fr; }
    .fv-plan-list { grid-template-columns: 1fr; }
    .fv-rel-grid { grid-template-columns: 1fr; }
    .fv-cd-big { font-size: 28px; }
    .fv-seg-btn { padding: 7px 11px; font-size: 12.5px; }
    .back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}

/* =====================================================================
   打印：白底、隐藏按钮与交互元素
   ===================================================================== */
@media print {
    .fv-page {
        --fv-bg: #fff;
        --fv-panel: #fff;
        --fv-panel-soft: #fff;
        --fv-ink: #000;
        --fv-ink-sub: #333;
        --fv-ink-muted: #555;
        --fv-line: #999;
        --fv-line-soft: #bbb;
        --fv-teal-soft: #fff;
        --fv-shadow: none;
        background: #fff;
        padding-bottom: 0;
    }
    .fv-topbar { background: #fff; color: #000; padding: 0 0 10px; margin-bottom: 12px; }
    .fv-topbar .fv-sub,
    .fv-topbar .fv-badges { display: none; }
    .fv-headline h1, .fv-crumb, .fv-crumb a, .fv-crumb .current { color: #000; }
    .fv-panel {
        box-shadow: none;
        border: 1px solid #888;
        break-inside: avoid;
        margin-bottom: 12px;
        padding: 12px 14px;
    }
    .fv-grid { grid-template-columns: 1fr; gap: 0; }
    .fv-actions, .fv-btn, .back-to-top, .fv-mini-tabs { display: none !important; }
    .fv-mini-panel { display: none !important; }
    .fv-mini-panel[data-mp="method"] { display: block !important; }
    .fv-table-wrap, .fv-table { min-width: 0; }
    .fv-gauge-card { background: #fff; }
    .fv-plan-list, .fv-advice-grid, .fv-rel-grid { grid-template-columns: 1fr; }
    .fv-table tr.is-current { background: #fff; }
    a { text-decoration: none; color: #000; }
}
