/* ===== 冷库保温板厚度 · 计算流图 ===== */
.cri {
    background: #f9fcfc;
    border: 1px solid #dceae9;
    border-radius: 10px;
    padding: 24px 22px;
    margin-bottom: 26px;
    box-shadow: 0 8px 26px rgba(26, 90, 88, .06);
}

.cri-flow { display: flex; align-items: stretch; gap: 0; }
.cri-node {
    flex: 1 1 0; min-width: 0;
    background: #fff; border: 1px solid #dceae9; border-radius: 8px;
    padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 5px;
    position: relative;
}
.cri-node b { font-size: 12.5px; color: #2c4140; line-height: 1.3; }
.cri-node-tag {
    font-size: 9.5px; letter-spacing: .1em; color: #8aa3a1;
    text-transform: uppercase;
}
.cri-node output {
    font-size: 30px; line-height: 1; color: #0f766e;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-variant-numeric: tabular-nums; font-weight: 700;
}
.cri-node output.cri-out-sm { font-size: 21px; }
.cri-node > em { font-style: normal; font-size: 10px; color: #8aa3a1; margin-top: -2px; }
.cri-node p { margin: 2px 0 0; font-size: 10.5px; line-height: 1.55; color: #7c8f8e; }
.cri-formula {
    font-family: ui-monospace, monospace; font-size: 10px; color: #7c8f8e;
    background: #eef6f5; border-radius: 4px; padding: 3px 6px; align-self: flex-start;
}
.cri-meta { font-family: ui-monospace, monospace; }
.cri-meta span { color: #115e59; font-weight: 700; }

.cri-link { flex: 0 0 34px; display: flex; align-items: center; justify-content: center; position: relative; }
.cri-link::before {
    content: ''; position: absolute; left: 4px; right: 8px; top: 50%;
    height: 1px; background: #d3e3e1;
}
.cri-link i {
    width: 0; height: 0; border-left: 6px solid #a9c1bf;
    border-top: 4px solid transparent; border-bottom: 4px solid transparent;
    position: relative; z-index: 1; margin-left: 6px;
}

.cri-node--out { background: #f6fdfc; }
.cri-badge {
    margin-top: 2px; display: inline-block; align-self: flex-start;
    font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 3px;
    background: #eef2f1; color: #5c6b6a; border: 1px solid #d9e2e0;
}
.cri-badge.is-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.cri-badge.is-bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.cri-badge.is-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.cri-params { margin-top: 20px; border-top: 1px solid #dceae9; padding-top: 16px; }
.cri-params h2 { font-size: 12px; letter-spacing: .08em; color: #5c6b6a; margin: 0 0 12px; }
.cri-rooms { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.cri-room {
    border: 1px solid #d9e2e0; background: #fff; color: #115e59;
    border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.cri-room:hover { background: #f0f8f7; }
.cri-room.active { background: #0f766e; border-color: #0f766e; color: #fff; }

.cri-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cri-grid label { display: flex; flex-direction: column; gap: 4px; }
.cri-grid span { font-size: 11px; color: #7c8f8e; }
.cri-grid input, .cri-grid select {
    font: inherit; font-size: 12.5px; padding: 7px 9px; border: 1px solid #d9e2e0;
    border-radius: 5px; background: #fff; color: #2c4140; font-variant-numeric: tabular-nums;
    min-width: 0;
}
.cri-grid input:focus, .cri-grid select:focus { outline: 2px solid rgba(15, 118, 110, .2); border-color: #0f766e; }
.cri-grid input.is-bad { border-color: #dc2626; background: #fef2f2; }

.cri-basis { margin-top: 18px; border-top: 1px dashed #d9e2e0; padding-top: 14px; }
.cri-basis h2 { font-size: 12px; color: #5c6b6a; margin: 0 0 8px; letter-spacing: .06em; }
.cri-basis ul { margin: 0; padding-left: 18px; }
.cri-basis li { font-size: 11.5px; line-height: 1.8; color: #7c8f8e; }
.cri-basis code { background: #eef6f5; padding: 1px 4px; color: #115e59; }

@media (max-width: 980px) {
    .cri-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .cri-link { display: none; }
    .cri-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .cri { padding: 16px 14px; }
    .cri-flow { grid-template-columns: 1fr; }
    .cri-grid { grid-template-columns: 1fr; }
    .cri-node output { font-size: 26px; }
}

/* 深色模式 */
[data-theme="dark"] .cri { background: #0f1414; border-color: #24302f; box-shadow: none; }
[data-theme="dark"] .cri-node { background: #141c1b; border-color: #24302f; }
[data-theme="dark"] .cri-node b { color: #d6e6e4; }
[data-theme="dark"] .cri-node-tag { color: #7c8f8e; }
[data-theme="dark"] .cri-node output { color: #5eead4; }
[data-theme="dark"] .cri-node p, [data-theme="dark"] .cri-node > em { color: #7c8f8e; }
[data-theme="dark"] .cri-formula { background: #1b2524; color: #8aa3a1; }
[data-theme="dark"] .cri-meta span { color: #5eead4; }
[data-theme="dark"] .cri-node--out { background: #141c1b; }
[data-theme="dark"] .cri-badge { background: #1b2524; border-color: #24302f; color: #8aa3a1; }
[data-theme="dark"] .cri-badge.is-ok { background: rgba(4, 120, 87, .2); color: #6ee7b7; border-color: rgba(110, 231, 183, .3); }
[data-theme="dark"] .cri-badge.is-bad { background: rgba(185, 28, 28, .2); color: #fca5a5; border-color: rgba(252, 165, 165, .3); }
[data-theme="dark"] .cri-badge.is-warn { background: rgba(217, 119, 6, .18); color: #fcd34d; border-color: rgba(252, 211, 77, .3); }
[data-theme="dark"] .cri-link::before { background: #2c3a39; }
[data-theme="dark"] .cri-link i { border-left-color: #4a5b59; }
[data-theme="dark"] .cri-params, [data-theme="dark"] .cri-basis { border-color: #24302f; }
[data-theme="dark"] .cri-params h2, [data-theme="dark"] .cri-basis h2 { color: #8aa3a1; }
[data-theme="dark"] .cri-room { background: #141c1b; color: #5eead4; border-color: #24302f; }
[data-theme="dark"] .cri-room.active { background: #0f766e; color: #fff; }
[data-theme="dark"] .cri-grid input, [data-theme="dark"] .cri-grid select { background: #141c1b; color: #d6e6e4; border-color: #24302f; }
[data-theme="dark"] .cri-basis li { color: #7c8f8e; }
[data-theme="dark"] .cri-basis code { background: #1b2524; color: #5eead4; }
