/* ==========================================================================
   家庭财务压力测试计算器 /tool/financial-stress-test-calc
   视觉主题：深海仪表舱 —— 藏青 + 藏青 + 警戒琥珀 + 危险珊瑚
   深浅双主题；深色模式跟随导航栏 #themeToggle，页面内不另设切换开关
   ========================================================================== */

.fst-page {
    /* ---- 浅色（默认） ---- */
    --fst-bg: #eef3f9;
    --fst-bg-2: #e3ebf5;
    --fst-card: #ffffff;
    --fst-card-2: #f7fafd;
    --fst-ink: #0d2a46;
    --fst-ink-2: #3a5b7c;
    --fst-ink-3: #7893ad;
    --fst-line: #d6e2ef;
    --fst-line-2: #e8eff7;
    --fst-navy: #123a60;
    --fst-navy-2: #1d5287;
    --fst-sky: #2f7fc4;
    --fst-sky-soft: #e4f0fb;
    --fst-amber: #cf8400;
    --fst-amber-soft: #fdf0d8;
    --fst-coral: #d44a30;
    --fst-coral-soft: #fce8e4;
    --fst-teal: #0d7a71;
    --fst-teal-soft: #dff2ef;
    --fst-shadow: 0 18px 40px rgba(13, 42, 70, .12);
    --fst-shadow-sm: 0 6px 18px rgba(13, 42, 70, .08);
    --fst-radius: 20px;
    --fst-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

:root[data-theme="dark"] .fst-page {
    /* ---- 深色 ---- */
    --fst-bg: #08111c;
    --fst-bg-2: #0c1826;
    --fst-card: #0f1f31;
    --fst-card-2: #14263a;
    --fst-ink: #e9f1f9;
    --fst-ink-2: #a7bed4;
    --fst-ink-3: #748ea6;
    --fst-line: #1e3349;
    --fst-line-2: #17293c;
    --fst-navy: #7bb8ea;
    --fst-navy-2: #a3cdf0;
    --fst-sky: #6fb0e8;
    --fst-sky-soft: #12293f;
    --fst-amber: #f0b24e;
    --fst-amber-soft: #33270f;
    --fst-coral: #ef8a76;
    --fst-coral-soft: #351c17;
    --fst-teal: #4cc4b8;
    --fst-teal-soft: #0f2f2d;
    --fst-shadow: 0 18px 44px rgba(0, 0, 0, .55);
    --fst-shadow-sm: 0 6px 18px rgba(0, 0, 0, .4);
}

.fst-page {
    color: var(--fst-ink);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.75;
    font-variant-numeric: tabular-nums;
    padding-bottom: 40px;
    background:
        radial-gradient(circle at 1px 1px, rgba(18, 58, 96, .07) 1px, transparent 0) 0 0 / 22px 22px,
        linear-gradient(180deg, var(--fst-bg-2), var(--fst-bg));
    border-radius: var(--fst-radius);
    padding: 26px 26px 30px;
    margin-top: 22px;
    border: 1px solid var(--fst-line);
    box-shadow: var(--fst-shadow);
}

.fst-page * { box-sizing: border-box; }

.fst-page h1,
.fst-page h2,
.fst-page h3 {
    margin: 0;
    letter-spacing: .3px;
    line-height: 1.35;
}

.fst-page h1 { font-size: 31px; font-weight: 800; color: var(--fst-navy); }
.fst-page h2 { font-size: 20px; font-weight: 800; color: var(--fst-ink); }
.fst-page h3 { font-size: 15px; font-weight: 700; color: var(--fst-ink); }

/* ===================== 首屏 ===================== */
.fst-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: 26px;
    align-items: start;
    margin-bottom: 18px;
}

.fst-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--fst-sky);
    background: var(--fst-sky-soft);
    border: 1px solid var(--fst-line);
    border-radius: 999px;
    padding: 3px 13px;
    margin-bottom: 12px;
}

.fst-lead {
    margin: 10px 0 14px;
    font-size: 15px;
    color: var(--fst-ink-2);
    max-width: 60ch;
    line-height: 1.85;
}
.fst-lead b { color: var(--fst-navy); font-weight: 700; }
.fst-lead .fst-hl { color: var(--fst-coral); font-weight: 700; }

.fst-tags { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fst-tags li {
    font-size: 12px;
    color: var(--fst-ink-2);
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    border-radius: 999px;
    padding: 3px 11px;
}

/* ---- 首屏操作台 ---- */
.fst-console {
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: var(--fst-shadow-sm);
}

.fst-console-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 13px;
    border-bottom: 1px dashed var(--fst-line);
}
.fst-console-head b { font-size: 15px; color: var(--fst-navy); }
.fst-console-head span { font-size: 12.5px; color: var(--fst-ink-3); }

.fst-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 13px;
}
.fst-grid2 .fst-field.is-wide { grid-column: 1 / -1; }

.fst-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.fst-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--fst-ink-2);
    display: flex;
    align-items: baseline;
    gap: 5px;
}
.fst-label .fst-unit { font-size: 11px; color: var(--fst-ink-3); font-weight: 400; }

.fst-input,
.fst-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--fst-line);
    border-radius: 10px;
    background: var(--fst-card-2);
    color: var(--fst-ink);
    font-size: 15px;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.fst-input:focus,
.fst-select:focus {
    outline: none;
    border-color: var(--fst-sky);
    background: var(--fst-card);
    box-shadow: 0 0 0 3px var(--fst-sky-soft);
}
.fst-input.is-bad { border-color: var(--fst-coral); background: var(--fst-coral-soft); }
.fst-input::placeholder { color: var(--fst-ink-3); }

.fst-input--big { font-size: 17px; font-weight: 700; font-family: var(--fst-mono); }

.fst-console-foot {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--fst-line);
}

.fst-btn {
    border: 1px solid var(--fst-line);
    background: var(--fst-card-2);
    color: var(--fst-ink);
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    padding: 9px 16px;
    border-radius: 11px;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .18s ease, background .16s ease, border-color .16s ease;
}
.fst-btn:hover { transform: translateY(-1px); box-shadow: var(--fst-shadow-sm); border-color: var(--fst-sky); }
.fst-btn:active { transform: translateY(0); }
.fst-btn--primary {
    background: linear-gradient(135deg, var(--fst-navy), var(--fst-navy-2));
    border-color: transparent;
    color: #fff;
}
:root[data-theme="dark"] .fst-btn--primary { color: #06131f; }
.fst-btn--amber {
    background: linear-gradient(135deg, var(--fst-amber), #b06f00);
    border-color: transparent;
    color: #fff;
}
:root[data-theme="dark"] .fst-btn--amber { color: #1c1204; }
.fst-btn--ghost { background: transparent; color: var(--fst-ink-3); }

/* ---- 仪表 ---- */
.fst-gauge {
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: var(--fst-shadow-sm);
    position: relative;
    overflow: hidden;
}
.fst-gauge::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fst-teal), var(--fst-amber), var(--fst-coral));
}
.fst-gauge-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--fst-ink-3);
    text-align: center;
    margin-bottom: 6px;
}
.fst-gauge-wrap { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.fst-gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fst-gauge-track { fill: none; stroke: var(--fst-line-2); stroke-width: 13; }
.fst-gauge-arc {
    fill: none;
    stroke: var(--fst-teal);
    stroke-width: 13;
    stroke-linecap: round;
    transition: stroke-dasharray .5s ease, stroke .3s ease;
}
.fst-gauge-arc.is-safe { stroke: var(--fst-teal); }
.fst-gauge-arc.is-steady { stroke: var(--fst-sky); }
.fst-gauge-arc.is-alert { stroke: var(--fst-amber); }
.fst-gauge-arc.is-danger { stroke: var(--fst-coral); }
.fst-gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
}
.fst-gauge-value {
    font-family: var(--fst-mono);
    font-size: 34px;
    font-weight: 700;
    color: var(--fst-navy);
    line-height: 1.1;
}
.fst-gauge-label {
    font-size: 11.5px;
    color: var(--fst-ink-3);
    line-height: 1.5;
    max-width: 132px;
    margin-top: 2px;
}

/* ---- 仪表下方速览 ---- */
.fst-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px dashed var(--fst-line);
}
.fst-fact {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
}
.fst-fact span { font-size: 11.5px; color: var(--fst-ink-3); }
.fst-fact b {
    font-family: var(--fst-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--fst-navy);
}

.fst-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.fst-risk-badge.is-safe { background: var(--fst-teal-soft); color: var(--fst-teal); }
.fst-risk-badge.is-steady { background: var(--fst-sky-soft); color: var(--fst-sky); }
.fst-risk-badge.is-alert { background: var(--fst-amber-soft); color: var(--fst-amber); }
.fst-risk-badge.is-danger { background: var(--fst-coral-soft); color: var(--fst-coral); }

/* ===================== 预置示例 ===================== */
.fst-presets {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.fst-presets-label { font-size: 12.5px; color: var(--fst-ink-3); font-weight: 600; }
.fst-presets button {
    font-size: 12.5px;
    font-family: inherit;
    font-weight: 600;
    color: var(--fst-ink-2);
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    border-radius: 999px;
    padding: 5px 14px;
    cursor: pointer;
    transition: all .16s ease;
}
.fst-presets button:hover {
    color: var(--fst-navy);
    border-color: var(--fst-sky);
    background: var(--fst-sky-soft);
}

/* ===================== 情景卡 ===================== */
.fst-worst {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
    padding: 11px 15px;
    margin-bottom: 13px;
    border-radius: 13px;
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
    border-left: 4px solid var(--fst-line);
}
.fst-worst.is-safe { border-left-color: var(--fst-teal); }
.fst-worst.is-steady { border-left-color: var(--fst-sky); }
.fst-worst.is-alert { border-left-color: var(--fst-amber); }
.fst-worst.is-danger { border-left-color: var(--fst-coral); background: var(--fst-coral-soft); }
.fst-worst-tag {
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    color: var(--fst-ink-2);
}
.fst-worst.is-danger .fst-worst-tag { color: var(--fst-coral); border-color: var(--fst-coral); }
.fst-worst b { font-size: 14.5px; color: var(--fst-ink); }
.fst-worst-text { font-size: 13px; color: var(--fst-ink-2); }
.fst-worst-btn {
    margin-left: auto;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--fst-navy);
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    border-radius: 999px;
    padding: 4px 13px;
    cursor: pointer;
    transition: all .16s ease;
}
.fst-worst-btn:hover { border-color: var(--fst-sky); background: var(--fst-sky-soft); color: var(--fst-sky); }

.fst-section-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}
.fst-section-title .fst-st-kicker {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--fst-sky);
}
.fst-section-title p { margin: 0; font-size: 13px; color: var(--fst-ink-3); }

.fst-scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
    gap: 13px;
    margin-bottom: 20px;
}

.fst-sc-card {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 12px;
    align-items: start;
    text-align: left;
    padding: 15px 16px 14px;
    border: 1px solid var(--fst-line);
    border-left: 4px solid var(--fst-line);
    border-radius: 14px;
    background: var(--fst-card);
    cursor: pointer;
    font-family: inherit;
    transition: transform .16s ease, box-shadow .18s ease, border-color .16s ease;
}
.fst-sc-card:hover { transform: translateY(-2px); box-shadow: var(--fst-shadow-sm); }
.fst-sc-card.is-safe { border-left-color: var(--fst-teal); }
.fst-sc-card.is-steady { border-left-color: var(--fst-sky); }
.fst-sc-card.is-alert { border-left-color: var(--fst-amber); }
.fst-sc-card.is-danger { border-left-color: var(--fst-coral); }
.fst-sc-card.is-active {
    border-color: var(--fst-sky);
    box-shadow: 0 0 0 3px var(--fst-sky-soft), var(--fst-shadow-sm);
    background: var(--fst-card-2);
}

.fst-sc-ico {
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
}
.fst-sc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fst-sc-name { font-size: 15px; font-weight: 800; color: var(--fst-ink); }
.fst-sc-desc { font-size: 12px; color: var(--fst-ink-3); line-height: 1.6; }

.fst-sc-metrics {
    grid-column: 2;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.fst-sc-metric { display: flex; flex-direction: column; }
.fst-sc-metric b {
    font-family: var(--fst-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--fst-navy);
}
.fst-sc-metric i { font-style: normal; font-size: 11px; color: var(--fst-ink-3); }

.fst-sc-risk {
    position: absolute;
    top: 13px;
    right: 14px;
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
}
.fst-sc-risk.is-safe { background: var(--fst-teal-soft); color: var(--fst-teal); }
.fst-sc-risk.is-steady { background: var(--fst-sky-soft); color: var(--fst-sky); }
.fst-sc-risk.is-alert { background: var(--fst-amber-soft); color: var(--fst-amber); }
.fst-sc-risk.is-danger { background: var(--fst-coral-soft); color: var(--fst-coral); }

/* ===================== 面板 ===================== */
.fst-panel {
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    border-radius: var(--fst-radius);
    padding: 22px 22px 20px;
    margin-bottom: 18px;
    box-shadow: var(--fst-shadow-sm);
}
.fst-panel-head { margin-bottom: 16px; }
.fst-panel-head h2 { margin-bottom: 5px; }
.fst-panel-head p { margin: 0; font-size: 13.5px; color: var(--fst-ink-3); line-height: 1.8; }
.fst-panel-head .fst-st-kicker {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--fst-sky);
    margin-bottom: 6px;
}

/* ---- KPI ---- */
.fst-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 11px;
    margin-bottom: 18px;
}
.fst-kpi {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 15px;
    border-radius: 13px;
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
    border-left: 3px solid var(--fst-line);
}
.fst-kpi.is-good { border-left-color: var(--fst-teal); }
.fst-kpi.is-warn { border-left-color: var(--fst-amber); }
.fst-kpi.is-bad { border-left-color: var(--fst-coral); }
.fst-kpi-label { font-size: 12px; color: var(--fst-ink-3); }
.fst-kpi-value {
    font-family: var(--fst-mono);
    font-size: 21px;
    font-weight: 700;
    color: var(--fst-navy);
    line-height: 1.25;
}
.fst-kpi-value i {
    font-style: normal;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--fst-ink-3);
    margin-left: 4px;
}
.fst-kpi.is-bad .fst-kpi-value { color: var(--fst-coral); }
.fst-kpi.is-warn .fst-kpi-value { color: var(--fst-amber); }
.fst-kpi.is-good .fst-kpi-value { color: var(--fst-teal); }

/* ---- 情景详情头 ---- */
.fst-detail-head {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
    padding-bottom: 15px;
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--fst-line);
}
.fst-detail-ico {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
}
.fst-detail-titles { flex: 1; min-width: 180px; }
.fst-detail-titles h2 { font-size: 19px; margin-bottom: 3px; }
.fst-detail-titles p { margin: 0; font-size: 13px; color: var(--fst-ink-3); line-height: 1.75; }

/* ---- 曲线 ---- */
.fst-curve {
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
    border-radius: 14px;
    padding: 14px 10px 8px;
    margin-bottom: 18px;
    overflow-x: auto;
}
.fst-curve-svg { width: 100%; min-width: 560px; height: auto; display: block; }
.fst-curve-zero { stroke: var(--fst-line); stroke-width: 1.5; stroke-dasharray: 5 5; }
.fst-curve-bar.is-pos { fill: var(--fst-sky); opacity: .82; }
.fst-curve-bar.is-neg { fill: var(--fst-coral); opacity: .78; }
.fst-curve-bar.is-depleted { fill: var(--fst-coral); opacity: 1; stroke: var(--fst-coral); stroke-width: 2; }
.fst-curve-tick { font-size: 11px; fill: var(--fst-ink-3); }
.fst-curve-x { font-size: 11px; fill: var(--fst-ink-3); }

/* ---- 表格 ---- */
.fst-table-wrap { overflow-x: auto; border-radius: 13px; border: 1px solid var(--fst-line); }
.fst-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.fst-table th, .fst-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--fst-line-2);
    vertical-align: top;
}
.fst-table thead th {
    background: var(--fst-card-2);
    color: var(--fst-ink-2);
    font-weight: 700;
    font-size: 12.5px;
    white-space: nowrap;
}
.fst-table tbody tr:last-child th,
.fst-table tbody tr:last-child td { border-bottom: none; }
.fst-table tbody th { font-weight: 700; color: var(--fst-ink); white-space: nowrap; }
.fst-table td { color: var(--fst-ink-2); font-variant-numeric: tabular-nums; }
.fst-table td.is-pos { color: var(--fst-teal); font-weight: 700; }
.fst-table td.is-neg { color: var(--fst-coral); font-weight: 700; }

.fst-pill {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
}
.fst-pill.is-safe { background: var(--fst-teal-soft); color: var(--fst-teal); }
.fst-pill.is-steady { background: var(--fst-sky-soft); color: var(--fst-sky); }
.fst-pill.is-alert { background: var(--fst-amber-soft); color: var(--fst-amber); }
.fst-pill.is-danger { background: var(--fst-coral-soft); color: var(--fst-coral); }

/* ---- 建议 ---- */
.fst-advice { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.fst-advice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 13px;
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
    border-left: 3px solid var(--fst-line);
}
.fst-advice.is-now { border-left-color: var(--fst-coral); }
.fst-advice.is-next { border-left-color: var(--fst-amber); }
.fst-advice.is-plan { border-left-color: var(--fst-sky); }
.fst-advice-tag {
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 7px;
    background: var(--fst-card);
    border: 1px solid var(--fst-line);
    color: var(--fst-ink-2);
}
.fst-advice.is-now .fst-advice-tag { color: var(--fst-coral); border-color: var(--fst-coral); background: var(--fst-coral-soft); }
.fst-advice.is-next .fst-advice-tag { color: var(--fst-amber); border-color: var(--fst-amber); background: var(--fst-amber-soft); }
.fst-advice-main b { display: block; font-size: 14.5px; color: var(--fst-ink); margin-bottom: 4px; }
.fst-advice-main p { margin: 0; font-size: 13.5px; color: var(--fst-ink-2); line-height: 1.85; }

/* ---- 错误条 ---- */
.fst-errbar {
    border-radius: 13px;
    padding: 13px 16px;
    margin-bottom: 16px;
    background: var(--fst-coral-soft);
    border: 1px solid var(--fst-coral);
    color: var(--fst-coral);
    font-size: 13.5px;
    line-height: 1.8;
}
.fst-errbar.is-warn {
    background: var(--fst-amber-soft);
    border-color: var(--fst-amber);
    color: var(--fst-amber);
}
.fst-err-line { margin: 2px 0; }
.fst-err-line.is-err { color: var(--fst-coral); }
.fst-err-line.is-warn { color: var(--fst-amber); }

/* ---- 预览 ---- */
.fst-pre {
    margin: 0;
    padding: 15px 17px;
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
    border-radius: 13px;
    font-family: var(--fst-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--fst-ink-2);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 380px;
    overflow: auto;
}

/* ---- FAQ ---- */
.fst-faq { display: flex; flex-direction: column; gap: 9px; }
.fst-faq-item {
    background: var(--fst-card-2);
    border: 1px solid var(--fst-line);
    border-radius: 12px;
    overflow: hidden;
}
.fst-faq-item[open] { border-color: var(--fst-sky); box-shadow: 0 0 0 3px var(--fst-sky-soft); }
.fst-faq-item > summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 42px 13px 15px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--fst-ink);
    position: relative;
    line-height: 1.65;
}
.fst-faq-item > summary::-webkit-details-marker { display: none; }
.fst-faq-item > summary::after {
    content: "＋";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fst-ink-3);
    font-weight: 700;
}
.fst-faq-item[open] > summary::after { content: "－"; color: var(--fst-sky); }
.fst-faq-a {
    padding: 12px 16px 15px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--fst-ink-2);
    border-top: 1px dashed var(--fst-line);
}
.fst-faq-a b { color: var(--fst-ink); }

/* ---- 操作条 ---- */
.fst-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---- 提示 ---- */
.fst-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(13, 42, 70, .95);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 999px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 10px 26px rgba(13, 42, 70, .28);
    max-width: 88vw;
    text-align: center;
}
.fst-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== A4 打印单 ===================== */
.fst-sheet { display: none; }

@media print {
    body * { visibility: hidden !important; }
    .fst-sheet,
    .fst-sheet * { visibility: visible !important; }
    .fst-sheet {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
    }
    @page { size: A4; margin: 14mm; }
    .fst-sheet h1 { font-size: 20pt; margin-bottom: 6pt; }
    .fst-sheet h2 { font-size: 13pt; margin: 12pt 0 6pt; border-bottom: 1px solid #333; padding-bottom: 3pt; }
    .fst-sheet h3 { font-size: 11.5pt; margin: 9pt 0 4pt; }
    .fst-sheet-sub { font-size: 9pt; color: #555; margin-bottom: 10pt; }
    .fst-sheet-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-bottom: 8pt; }
    .fst-sheet-table th, .fst-sheet-table td { border: 1px solid #bbb; padding: 5pt 7pt; text-align: left; }
    .fst-sheet-table th { background: #f0f0f0; }
    .fst-sheet-table ol { margin: 0 0 8pt; padding-left: 16pt; font-size: 9.5pt; line-height: 1.7; }
    .fst-sheet-table li { margin-bottom: 4pt; }
}

/* ===================== 响应式 ===================== */
@media (max-width: 1080px) {
    .fst-hero { grid-template-columns: 1fr; }
    .fst-gauge-wrap { width: 210px; height: 210px; }
}

@media (max-width: 720px) {
    .fst-page { padding: 18px 15px 26px; border-radius: 16px; }
    .fst-page h1 { font-size: 24px; }
    .fst-lead { font-size: 14px; }
    .fst-grid2 { grid-template-columns: 1fr; }
    .fst-panel { padding: 17px 15px 16px; border-radius: 16px; }
    .fst-kpi-value { font-size: 18px; }
    .fst-detail-head { align-items: flex-start; }
    .fst-advice { flex-direction: column; gap: 9px; }
}
