/* =====================================================================
 * 40 台风来临准备 · 视觉母题「档位 × 物资 × 转移阈值表」
 * ---------------------------------------------------------------------
 * 色板：深钢蓝（--typh-pri #3a5566）+ 冷灰蓝（--typh-pri2）。
 * 版式：F 表格主导 —— 首屏就是可编辑对照表，行内即时算，右栏固定给结论。
 * 纯 CSS / 内联 SVG，零图片请求；只作用于 .b11--typh 容器。
 * ===================================================================== */

.b11--typh {
    --typh-pri: #3a5566;
    --typh-pri2: #64879c;
    --typh-hot: #b3541f;
    --typh-tint: #dfe6ea;
    --typh-ink: #22333d;
    --b11-pri: #3a5566;
    --b11-pri2: #64879c;
    --b11-tint: #dfe6ea;
    --b11-bg: #edf1f3;
    --b11-bg2: #e0e6ea;
    --b11-card2: #f6f8f9;
    background-image:
        linear-gradient(to right, color-mix(in srgb, var(--typh-pri) 8%, transparent) 1px, transparent 1px);
    background-size: 28px 100%;
}
:root[data-theme="dark"] .b11.b11--typh {
    --typh-pri: #7fa4bb;
    --typh-pri2: #9dbed1;
    --typh-hot: #e0864f;
    --typh-tint: #1c2a32;
    --typh-ink: #c6d9e3;
    --b11-pri: #7fa4bb;
    --b11-pri2: #9dbed1;
    --b11-tint: #1c2a32;
    --b11-bg: #101517;
    --b11-bg2: #171d20;
    --b11-card2: #1e2529;
}

/* ---------- 首屏 ---------- */
.typh-hero { padding: 32px 0 4px; }
.typh-hero .b11-h1 em { color: var(--typh-pri); }
.typh-hero .b11-lead b { box-shadow: inset 0 -.42em 0 var(--typh-tint); }
.typh-hero .b11-lead { max-width: 880px; }

/* ---------- 表格主导舞台 ---------- */
.typh-stage { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, .58fr); gap: var(--b11-gap); align-items: start; }
.typh-main { min-width: 0; }
.typh-stage-hd { display: flex; align-items: baseline; gap: 13px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--b11-line2); }
.typh-stage-hd .no {
    font-family: var(--b11-mono); font-size: 12px; font-weight: 800; letter-spacing: .12em;
    color: var(--b11-on); background: var(--typh-pri); padding: 2px 9px;
}
.typh-stage-hd h2 { flex: 1 1 auto; }
.typh-stage-hd .note { font-size: var(--b11-sm); color: var(--b11-mute); }
.typh-inputs { margin-bottom: 16px; }
.typh-inputs .b11-field { flex: 1 1 170px; }

/* 行内即时算列 */
.typh-main .b11-table td.calc { font-family: var(--b11-mono); color: var(--typh-pri); font-weight: 800; }
.typh-main .b11-table tr.is-sel { background: var(--typh-tint); }
.typh-main .b11-table tr.is-sel td { border-color: color-mix(in srgb, var(--typh-pri) 30%, transparent); }
.typh-main .b11-table tr.is-sel td:first-child { border-left: 4px solid var(--typh-pri); }

/* ---------- 右栏结论 ---------- */
.typh-side {
    position: sticky; top: 90px;
    background: var(--b11-card); border: 1px solid var(--b11-line); border-top: 4px solid var(--typh-pri);
    box-shadow: var(--b11-shadow); padding: 18px 20px 16px;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.typh-score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px dashed var(--b11-line2); }
.typh-score-ring { flex: none; }
.typh-score-ring svg { width: 118px; height: auto; display: block; }
.typh-score-txt b { display: block; font-size: var(--b11-base); color: var(--b11-ink); }
.typh-score-txt span { display: block; font-size: var(--b11-xs); color: var(--b11-mute); line-height: 1.66; margin-top: 3px; }
.typh-side-box { margin-top: 14px; }
.typh-side-t { font-family: var(--b11-mono); font-size: var(--b11-xs); letter-spacing: .1em; color: var(--typh-pri); font-weight: 800; margin-bottom: 9px; padding-bottom: 6px; border-bottom: 2px solid var(--typh-pri); }

.typh-mini { list-style: none; margin: 0; padding: 0; counter-reset: tm; }
.typh-mini li {
    position: relative; counter-increment: tm; padding: 7px 0 7px 30px;
    font-size: var(--b11-xs); color: var(--b11-sub); border-bottom: 1px dotted var(--b11-line2); line-height: 1.66;
}
.typh-mini li:last-child { border-bottom: 0; }
.typh-mini li::before {
    content: counter(tm); position: absolute; left: 0; top: 7px; width: 20px; height: 20px;
    display: grid; place-items: center; background: var(--typh-tint); color: var(--typh-pri);
    font-family: var(--b11-mono); font-size: 10px; font-weight: 800;
}
.typh-mini li b { color: var(--b11-ink); }

.typh-missing { list-style: none; margin: 0; padding: 0; }
.typh-missing li {
    position: relative; padding: 6px 0 6px 24px; font-size: var(--b11-xs); color: var(--b11-sub);
    border-bottom: 1px dotted var(--b11-line2); line-height: 1.62;
}
.typh-missing li:last-child { border-bottom: 0; }
.typh-missing li::before {
    content: "○"; position: absolute; left: 0; top: 5px; width: 17px; height: 17px;
    display: grid; place-items: center; background: var(--b11-warnbg); color: var(--b11-warn); font-size: 10px; font-weight: 800;
}
.typh-missing li.done::before { content: "✓"; background: var(--b11-okbg); color: var(--b11-ok); }
.typh-missing li.done { color: var(--b11-mute); text-decoration: line-through; }

/* ---------- 准备项勾选 ---------- */
.typh-tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 9px; }
.typh-task {
    position: relative; cursor: pointer; display: grid; grid-template-columns: 24px minmax(0, 1fr);
    gap: 11px; align-items: start; background: var(--b11-card);
    border: 1.5px solid var(--b11-line2); padding: 11px 13px; transition: all .15s;
}
.typh-task:hover { border-color: var(--typh-pri); }
.typh-task input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.typh-task .bx {
    width: 22px; height: 22px; border: 2px solid var(--b11-line2); background: var(--b11-card);
    display: grid; place-items: center; font-size: 13px; font-weight: 900; color: transparent;
}
.typh-task .nm { font-size: var(--b11-sm); font-weight: 750; color: var(--b11-ink); line-height: 1.5; }
.typh-task .mt { display: block; font-size: var(--b11-xs); color: var(--b11-mute); line-height: 1.62; margin-top: 3px; }
.typh-task .mn { display: inline-block; margin-top: 5px; font-family: var(--b11-mono); font-size: 10px; color: var(--typh-pri); background: var(--typh-tint); padding: 1px 7px; }
.typh-task.on { border-color: var(--typh-pri); background: var(--typh-tint); }
.typh-task.on .bx { background: var(--typh-pri); border-color: var(--typh-pri); color: var(--b11-on); }
.typh-task:has(input:focus-visible) { outline: 3px solid var(--typh-pri2); outline-offset: 2px; }

/* ---------- 结果 ---------- */
.typh-final { list-style: none; margin: 0; padding: 0; counter-reset: tf; }
.typh-final li {
    position: relative; counter-increment: tf; padding: 11px 0 11px 42px;
    border-bottom: 1px dotted var(--b11-line2); font-size: var(--b11-sm); color: var(--b11-sub); line-height: 1.74;
}
.typh-final li:last-child { border-bottom: 0; }
.typh-final li::before {
    content: counter(tf); position: absolute; left: 0; top: 11px; width: 28px; height: 28px;
    display: grid; place-items: center; background: var(--typh-tint); color: var(--typh-pri);
    font-family: var(--b11-mono); font-size: 12px; font-weight: 800;
}
.typh-final li b { display: block; color: var(--b11-ink); }
.typh-final li.done::before { background: var(--b11-okbg); color: var(--b11-ok); content: "✓"; }
.typh-final li.hot::before { background: var(--typh-hot); color: #fff; }

.typh-sup, .typh-power { list-style: none; margin: 0; padding: 0; }
.typh-sup li, .typh-power li {
    position: relative; padding: 9px 0 9px 30px; font-size: var(--b11-sm); color: var(--b11-sub);
    border-bottom: 1px dotted var(--b11-line2); line-height: 1.74;
}
.typh-sup li:last-child, .typh-power li:last-child { border-bottom: 0; }
.typh-sup li::before, .typh-power li::before {
    content: "✓"; position: absolute; left: 0; top: 9px; width: 20px; height: 20px;
    display: grid; place-items: center; background: var(--b11-okbg); color: var(--b11-ok); font-size: 11px; font-weight: 800;
}
.typh-power li::before { background: var(--typh-tint); color: var(--typh-pri); content: "!"; }
.typh-sup li b, .typh-power li b { color: var(--b11-ink); }

.typh-timeline { list-style: none; margin: 0; padding: 0; }
.typh-timeline li {
    position: relative; display: grid; grid-template-columns: 108px 24px minmax(0, 1fr);
    gap: 0 12px; padding-bottom: 20px;
}
.typh-timeline li:last-child { padding-bottom: 0; }
.typh-timeline .d { text-align: right; padding-top: 2px; }
.typh-timeline .d b { display: block; font-family: var(--b11-mono); font-size: var(--b11-sm); font-weight: 800; color: var(--typh-pri); }
.typh-timeline .d small { display: block; font-size: 11px; color: var(--b11-mute); font-family: var(--b11-mono); }
.typh-timeline .ax { position: relative; display: flex; justify-content: center; }
.typh-timeline .ax::before { content: ""; position: absolute; top: 6px; bottom: -20px; width: 3px; background: var(--b11-line2); }
.typh-timeline li:last-child .ax::before { display: none; }
.typh-timeline .ax i {
    width: 17px; height: 17px; border-radius: 50%; background: var(--b11-card);
    border: 3px solid var(--typh-pri); margin-top: 4px; position: relative; z-index: 1;
}
.typh-timeline li.hot .ax i { background: var(--typh-pri); box-shadow: 0 0 0 5px var(--typh-tint); }
.typh-timeline .c b { display: block; font-size: var(--b11-base); color: var(--b11-ink); }
.typh-timeline .c p { margin: 3px 0 0; font-size: var(--b11-sm); color: var(--b11-sub); line-height: 1.74; }

/* ---------- 批量清洗条 ---------- */
.typh-cleanbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    margin-top: 14px; padding: 12px 14px; background: var(--b11-card2);
    border: 1px solid var(--b11-line); font-size: var(--b11-sm);
}
.typh-cleanbar > b { color: var(--typh-pri); font-family: var(--b11-mono); font-size: var(--b11-xs); letter-spacing: .08em; }
.typh-cleanbar code { margin-left: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
    .typh-stage { grid-template-columns: minmax(0, 1fr); }
    .typh-side { position: static; }
}
@media (max-width: 560px) {
    .typh-timeline li { grid-template-columns: 80px 20px minmax(0, 1fr); gap: 0 8px; }
    .typh-cleanbar code { margin-left: 0; }
}
