/* ===== 排水坡度 · 水力曲线屏 ===== */
.drn {
    background: #0f1c2e;
    border: 1px solid #1e3a54;
    border-radius: 12px;
    margin-bottom: 26px;
    color: #dbeafe;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(6, 20, 35, .35);
}

.drn-head {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
    padding: 20px 22px 16px;
    background: linear-gradient(115deg, #12293f 0%, #0f1c2e 55%);
    border-bottom: 1px solid #1e3a54;
}
.drn-eyebrow { font-size: 10px; letter-spacing: .16em; color: #22d3ee; text-transform: uppercase; }
.drn-head h1 { font-size: 21px; margin: 7px 0 5px; color: #f1f5f9; }
.drn-head p { margin: 0; font-size: 12px; color: #93a9bf; }
.drn-head code { color: #67e8f9; background: rgba(34, 211, 238, .1); padding: 1px 5px; border-radius: 3px; }
.drn-head-stats { display: flex; gap: 18px; }
.drn-head-stats > div { text-align: right; }
.drn-head-stats span { display: block; font-size: 10px; color: #7d93a8; letter-spacing: .06em; }
.drn-head-stats b {
    font-size: 24px; color: #67e8f9; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-variant-numeric: tabular-nums; line-height: 1.1;
}
.drn-head-stats em { font-style: normal; font-size: 10px; color: #64748b; margin-left: 3px; }
.drn-head-stats b.is-bad { color: #fca5a5; }
.drn-head-stats b.is-ok { color: #6ee7b7; }

.drn-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.drn-chart-wrap { padding: 14px 18px 6px; border-right: 1px solid #1e3a54; min-width: 0; }
.drn-chart-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 10.5px; color: #7d93a8; margin-bottom: 2px;
}
.drn-legend i {
    display: inline-block; width: 14px; height: 2px; background: #22d3ee;
    vertical-align: middle; margin-right: 4px;
}
.drn-legend i.drn-legend--req { background: #f87171; margin-left: 10px; }
.drn-chart { display: block; width: 100%; height: auto; }

.drn-controls { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.drn-field { display: flex; flex-direction: column; gap: 5px; }
.drn-field label { font-size: 11px; color: #8aa2b8; display: flex; justify-content: space-between; }
.drn-field output {
    font-family: ui-monospace, monospace; color: #67e8f9; font-size: 12px;
}
.drn-field select, .drn-field input[type="number"] {
    font: inherit; font-size: 12.5px; padding: 7px 9px;
    background: #13253a; color: #e2e8f0; border: 1px solid #264660; border-radius: 5px;
    font-variant-numeric: tabular-nums;
}
.drn-field select:focus, .drn-field input:focus { outline: 2px solid rgba(34, 211, 238, .35); border-color: #22d3ee; }
.drn-field input[type="number"].is-bad { border-color: #ef4444; background: #3b1219; }

.drn-field input[type="range"] {
    -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, #22d3ee 0%, #22d3ee var(--p, 30%), #24415a var(--p, 30%), #24415a 100%);
    outline: none; margin: 6px 0 2px;
}
.drn-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: #e0f2fe; border: 3px solid #0891b2; cursor: grab;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .15);
}
.drn-field input[type="range"]::-moz-range-thumb {
    width: 14px; height: 14px; border-radius: 50%; background: #e0f2fe;
    border: 3px solid #0891b2; cursor: grab;
}
.drn-range-scale { display: flex; justify-content: space-between; font-size: 9.5px; color: #5f7a92; font-family: ui-monospace, monospace; }

.drn-report {
    display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px;
    padding: 14px 22px 20px; border-top: 1px solid #1e3a54; background: #0c1726;
}
.drn-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.drn-table th, .drn-table td { padding: 7px 8px; border-bottom: 1px solid #1b3047; }
.drn-table th { text-align: left; font-weight: 400; color: #8aa2b8; width: 23%; }
.drn-table td {
    text-align: right; color: #e2e8f0; width: 27%;
    font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums;
}
.drn-verdict {
    border-left: 3px solid #475569; background: rgba(148, 163, 184, .08);
    padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; align-self: start;
}
.drn-verdict b { font-size: 12.5px; color: #cbd5e1; }
.drn-verdict span { font-size: 11px; line-height: 1.6; color: #94a3b8; }
.drn-verdict.is-ok { border-color: #10b981; background: rgba(16, 185, 129, .12); }
.drn-verdict.is-ok b { color: #6ee7b7; }
.drn-verdict.is-warn { border-color: #f59e0b; background: rgba(245, 158, 11, .12); }
.drn-verdict.is-warn b { color: #fcd34d; }
.drn-verdict.is-bad { border-color: #ef4444; background: rgba(239, 68, 68, .12); }
.drn-verdict.is-bad b { color: #fca5a5; }

.drn-basis { padding: 14px 22px 18px; border-top: 1px solid #1e3a54; }
.drn-basis h2 { font-size: 12px; margin: 0 0 8px; color: #cbd5e1; letter-spacing: .06em; }
.drn-basis ul { margin: 0; padding-left: 18px; }
.drn-basis li { font-size: 11.5px; line-height: 1.8; color: #8aa2b8; }
.drn-basis code { color: #67e8f9; background: rgba(34, 211, 238, .1); padding: 1px 4px; }
.drn-basis b { color: #cbd5e1; }

@media (max-width: 980px) {
    .drn-body { grid-template-columns: 1fr; }
    .drn-chart-wrap { border-right: 0; border-bottom: 1px solid #1e3a54; }
    .drn-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
    .drn-report { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .drn-head { padding: 16px 14px; }
    .drn-head h1 { font-size: 19px; }
    .drn-head-stats { width: 100%; justify-content: space-between; gap: 10px; }
    .drn-head-stats b { font-size: 20px; }
    .drn-chart-wrap, .drn-controls, .drn-report, .drn-basis { padding-left: 14px; padding-right: 14px; }
    .drn-controls { grid-template-columns: 1fr; }
    .drn-table { font-size: 10.5px; }
    .drn-table th { width: 30%; }
}

/* 深色模式（本身偏暗，仅做加深与描边强化） */
[data-theme="dark"] .drn { background: #08111d; border-color: #16293c; }
[data-theme="dark"] .drn-head { background: linear-gradient(115deg, #0b1f31 0%, #08111d 55%); }
[data-theme="dark"] .drn-report { background: #060e18; }
[data-theme="dark"] .drn-chart-wrap, [data-theme="dark"] .drn-head, [data-theme="dark"] .drn-report, [data-theme="dark"] .drn-basis { border-color: #16293c; }
[data-theme="dark"] .drn-field select, [data-theme="dark"] .drn-field input[type="number"] { background: #0c1a2a; border-color: #1e3a54; }
[data-theme="dark"] .drn-table th, [data-theme="dark"] .drn-table td { border-color: #14263a; }
