/* ======================================================================
   home-water-leak-locate · 家庭漏水点定位
   独立设计：水蓝 #2b7a9e + 青灰 / 横向分区阀决策树 + 概率条
   浅色 = 浅青灰管路底；深色 = 深水蓝面板
   ====================================================================== */
.hwll{
  --ink:#173442; --sub:#5b7480; --faint:#89a3af;
  --card:#ffffff; --card2:#f4fafc; --line:#cfe0e8; --line2:#e0edf2;
  --pri:#2b7a9e; --pri-soft:rgba(43,122,158,.12);
  --ok:#1f7a5a; --warn:#b5821f; --bad:#b23a3a; --bg:#eef5f8;
  --r:14px; --shadow:0 1px 2px rgba(23,52,66,.06),0 8px 22px rgba(23,52,66,.08);
  color:var(--ink);
  font-family:-apple-system,"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:14.5px; line-height:1.75;
  background:
    radial-gradient(circle at 10px 10px, rgba(43,122,158,.07) 0 2px, transparent 3px) 0 0/34px 34px,
    var(--bg);
  padding:0 16px 54px;
}
:root[data-theme="dark"] .hwll{
  --ink:#dcecf3; --sub:#8fb0bd; --faint:#5e7d8b;
  --card:#12242e; --card2:#162c37; --line:#23404d; --line2:#1b333f;
  --pri:#5bb0d0; --pri-soft:rgba(91,176,208,.14);
  --ok:#5cc39a; --warn:#e0b358; --bad:#f08a8a; --bg:#0b1921;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 10px 28px rgba(0,0,0,.36);
  background:
    radial-gradient(circle at 10px 10px, rgba(91,176,208,.07) 0 2px, transparent 3px) 0 0/34px 34px,
    var(--bg);
}
.hwll *{box-sizing:border-box;}
.hwll [hidden]{display:none!important;}
.hwll-wrap{max-width:1180px;margin:0 auto;}
.hwll b{font-weight:800;color:var(--pri);}

/* ---------- Hero：水蓝管路横幅 ---------- */
.hwll-hero{
  margin:22px 0 18px;padding:26px 30px;position:relative;overflow:hidden;
  background:linear-gradient(118deg,#1f5f7d,#2b7a9e 55%,#3a8fae);
  border:1px solid #2b7a9e;border-radius:var(--r);box-shadow:var(--shadow);
}
.hwll-hero:before{
  content:"";position:absolute;left:0;right:0;top:56%;height:2px;
  background:repeating-linear-gradient(90deg,rgba(255,255,255,.45) 0 14px,transparent 14px 26px);opacity:.3;
}
.hwll-hero h1{margin:0 0 8px;font-size:30px;line-height:1.35;font-weight:900;color:#f4fbff;position:relative;}
.hwll-hero p{margin:0;max-width:820px;color:#dceef6;font-size:14.5px;position:relative;}
.hwll-hero p b{color:#ffe09a;}
.hwll-badge{
  display:inline-block;margin-bottom:10px;padding:3px 13px;border-radius:999px;
  background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.42);
  color:#fff;font-size:12.5px;font-weight:800;letter-spacing:.5px;position:relative;
}

/* ---------- 左右双栏工作台 ---------- */
.hwll-cols{display:grid;grid-template-columns:1.06fr .94fr;gap:16px;align-items:start;}
.hwll-col{min-width:0;}
.hwll-card{
  background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);padding:18px;margin-bottom:16px;
}
.hwll-card h2{margin:0 0 12px;font-size:16px;font-weight:900;display:flex;align-items:center;gap:9px;}
.hwll-step{
  display:inline-flex;align-items:center;justify-content:center;width:23px;height:23px;flex:none;
  border-radius:7px;background:var(--pri);color:#fff;font-size:12px;font-weight:900;
}
.hwll-step.ok{background:var(--ok);}
:root[data-theme="dark"] .hwll-step{color:#08202b;}
.hwll-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.hwll-field span{display:block;margin-bottom:5px;font-size:13px;font-weight:700;color:var(--sub);}
.hwll input,.hwll select,.hwll textarea{
  width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:9px;
  background:var(--card2);color:var(--ink);font-size:14px;outline:none;
  font-family:inherit;transition:border-color .15s,box-shadow .15s;
}
.hwll input:focus,.hwll select:focus,.hwll textarea:focus{border-color:var(--pri);box-shadow:0 0 0 3px var(--pri-soft);}
.hwll-tip,.hwll-note{margin:10px 0 0;font-size:12.5px;color:var(--sub);}
.hwll-note{margin:0;align-self:center;}
.hwll code{background:var(--card2);border:1px solid var(--line2);border-radius:5px;padding:1px 5px;font-size:12px;color:var(--pri);}
.hwll-ta{min-height:96px;resize:vertical;line-height:1.6;}

/* ---------- 分区表 ---------- */
.hwll-scroll{overflow-x:auto;border:1px solid var(--line2);border-radius:11px;}
.hwll-table{width:100%;border-collapse:collapse;min-width:520px;}
.hwll-table th,.hwll-table td{border-bottom:1px solid var(--line2);padding:7px 8px;text-align:left;font-size:13px;}
.hwll-table th{background:var(--card2);font-size:12.5px;font-weight:800;color:var(--sub);white-space:nowrap;}
.hwll-table tr:last-child td{border-bottom:none;}
.hwll-table td input,.hwll-table td select{padding:6px 8px;font-size:13px;border-radius:8px;}
.hwll-del{
  border:1px solid var(--line);background:var(--card2);color:var(--bad);
  width:28px;height:28px;border-radius:8px;cursor:pointer;font-size:16px;font-weight:900;line-height:1;
  transition:all .15s;
}
.hwll-del:hover{background:var(--bad);color:#fff;border-color:var(--bad);}
.hwll-rowbtns{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px;}

/* ---------- 按钮 ---------- */
.hwll-btn{
  border:1px solid transparent;border-radius:10px;padding:9px 16px;
  font-size:13.5px;font-weight:800;cursor:pointer;font-family:inherit;transition:all .15s;
}
.hwll-btn-go{background:var(--pri);color:#fff;box-shadow:0 4px 12px var(--pri-soft);}
:root[data-theme="dark"] .hwll-btn-go{color:#08202b;}
.hwll-btn-go:hover{filter:brightness(1.1);transform:translateY(-1px);}
.hwll-btn-ghost{background:var(--card2);color:var(--ink);border-color:var(--line);}
.hwll-btn-ghost:hover{border-color:var(--pri);color:var(--pri);}
.hwll-btn:disabled{opacity:.5;cursor:not-allowed;transform:none;filter:none;}
.hwll-msg{margin-top:10px;min-height:18px;font-size:13px;font-weight:700;}
.hwll-msg.ok{color:var(--ok);} .hwll-msg.err{color:var(--bad);}
.hwll-empty{padding:22px 14px;text-align:center;color:var(--faint);font-size:13.5px;border:1px dashed var(--line);border-radius:11px;background:var(--card2);}
.hwll-sub{margin:18px 0 9px;font-size:14px;font-weight:900;color:var(--sub);border-left:3px solid var(--pri);padding-left:9px;}

/* ---------- 结论数字 ---------- */
.hwll-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;}
.hwll-kpi{background:var(--card2);border:1px solid var(--line2);border-radius:11px;padding:10px 11px;}
.hwll-kpi span{display:block;font-size:12px;font-weight:700;color:var(--sub);}
.hwll-kpi b{display:block;margin-top:2px;font-size:20px;font-weight:900;color:var(--pri);line-height:1.3;}

/* ---------- 横向决策树 ---------- */
.hwll-tree{background:var(--card2);border:1px dashed var(--line);border-radius:12px;padding:14px 12px;}
.hwll-layer{display:flex;align-items:center;gap:12px;margin-bottom:11px;flex-wrap:wrap;}
.hwll-layer:last-child{margin-bottom:0;}
.hwll-layer-tag{flex:0 0 104px;font-size:12px;font-weight:800;color:var(--sub);}
.hwll-nodes{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.hwll-node{
  position:relative;border:1px solid var(--line);border-radius:10px;
  padding:5px 11px;background:var(--card);font-size:12.5px;line-height:1.5;
}
.hwll-node:before{content:"";position:absolute;left:-9px;top:50%;width:8px;height:1px;background:var(--line);}
.hwll-layer:first-child .hwll-node:before{display:none;}
.hwll-node b{font-weight:900;color:var(--ink);}
.hwll-node em{font-style:normal;margin-left:6px;font-size:11px;color:var(--sub);}
.hwll-node.root{background:var(--pri);border-color:var(--pri);color:#fff;}
.hwll-node.root b{color:#fff;}
.hwll-node.root em{color:#dceef6;}
.hwll-node.hit{background:var(--pri-soft);border-color:var(--pri);}
.hwll-node.out{opacity:.55;text-decoration:line-through;}
.hwll-node.wait{border-style:dashed;}

/* ---------- 概率条 ---------- */
.hwll-bar{display:grid;grid-template-columns:88px 1fr 64px;gap:10px;align-items:center;margin-bottom:9px;}
.hwll-bar-name{font-size:13px;font-weight:700;}
.hwll-bar-track{height:14px;background:var(--card2);border:1px solid var(--line);border-radius:999px;overflow:hidden;}
.hwll-bar-track i{display:block;height:100%;background:linear-gradient(90deg,var(--pri),#5bb0d0);border-radius:999px;transition:width .35s;}
.hwll-bar-val{text-align:right;font-size:18px;font-weight:900;color:var(--pri);}
.hwll-pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:800;}
.hwll-pill.ok{background:rgba(31,122,90,.12);color:var(--ok);}
.hwll-pill.warn{background:rgba(181,130,31,.14);color:var(--warn);}
.hwll-pill.bad{background:rgba(178,58,58,.12);color:var(--bad);}

@media (max-width:860px){
  .hwll-cols{grid-template-columns:1fr;}
  .hwll-fields{grid-template-columns:1fr;}
  .hwll-kpis{grid-template-columns:repeat(2,1fr);}
  .hwll-hero{padding:20px 18px;}
  .hwll-hero h1{font-size:26px;}
  .hwll-layer-tag{flex-basis:100%;}
  .hwll-bar{grid-template-columns:74px 1fr 58px;}
}
