.solution-plan:has(.house-system) { display: block; }
.house-system { margin: 0; min-width: 0; border-block: 1px solid var(--line); }
.hs-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 28px 22px; }
.hs-heading h3 { margin: 8px 0; font-size: 23px; line-height: 1.5; }
.hs-heading p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
.hs-separation { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; color: #247558; }
.hs-separation svg { width: 19px; height: 19px; }
.hs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; border-block: 1px solid var(--line); }
.hs-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-modes button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; border: 0; background: transparent; color: #637477; min-height: 42px; padding: 10px 15px; font-size: 13px; border-radius: 4px; cursor: pointer; }
.hs-modes button svg { width: 18px; height: 18px; flex-shrink: 0; }
.hs-modes button[aria-selected="true"] { color: #253536; background: #ffcf67; }
.hs-modes button:hover { background: #f0f4f3; }
.hs-modes button[aria-selected="true"]:hover { background: #ffcf67; }
.hs-player { display: flex; gap: 6px; flex-shrink: 0; }
.hs-player .icon-button { width: 38px; height: 38px; }
.hs-legend { display: flex; gap: 12px 24px; flex-wrap: wrap; padding-block: 18px; }
.hs-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: #5d7174; }
.hs-legend i { display: block; width: 23px; height: 4px; }
.hs-key-thermal { background: #9460d9; }
.hs-key-cold { background: #18a169; }
.hs-key-hot { background: #eb7145; }
.hs-key-back { background: #309cdf; }
.hs-key-energy { background: #eeb627; }
.hs-canvas { overflow: hidden; background: #fcfefe; background-image: linear-gradient(#eaf0ef 1px, transparent 1px), linear-gradient(90deg, #eaf0ef 1px, transparent 1px); background-size: 32px 32px; }
.house-system-svg { width: 100%; height: auto; display: block; font-family: inherit; }
.hs-mobile { display: none; }
.house-system-svg text { fill: #344749; font-size: 15px; letter-spacing: 0; pointer-events: none; }
.house-system-svg .hs-zone-title { font-size: 17px; font-weight: 600; }
.house-system-svg .hs-floor-name { font-size: 21px; font-weight: 600; }
.house-system-svg .hs-equipment-name { font-size: 18px; font-weight: 600; }
.house-system-svg .hs-small { font-size: 14px; fill: #6c8083; }
.house-system-svg .hs-tiny { font-size: 12px; }
.house-system-svg .hs-temperature { font-size: 19px; font-weight: 600; }
.house-system-svg .hs-point-label { font-size: 13px; }
.house-system-svg .hs-principle-title { font-size: 21px; font-weight: 600; }
.house-system-svg .hs-thermal-text { fill: #8355c4; font-size: 14px; }
.house-system-svg .hs-hot-text { fill: #ca512f; font-size: 14px; }
.house-system-svg .hs-back-text { fill: #2584be; font-size: 14px; }
.house-system-svg .hs-cold-text { fill: #16845c; font-size: 14px; }
.hs-machine { fill: #fff; stroke: #bcccd0; stroke-width: 2; }
.hs-tank-shell { fill: #eaf0ef; stroke: #8a9b9f; stroke-width: 2.5; }
.hs-fan-ring { fill: #eef3f3; stroke: #8fa1a4; stroke-width: 2; }
.hs-fan { color: #778c91; transform-box: view-box; transform-origin: 0 0; animation: hs-fan-turn 5s linear infinite; }
.hs-floor-band { fill: #f6f9f8; stroke: #dce6e4; stroke-width: 1; }
.hs-zone-divider { stroke: #d0ddda; stroke-width: 1.5; }
.hs-pipe { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.hs-thermal { stroke: #9460d9; }
.hs-hot { stroke: #eb7145; }
.hs-cold { stroke: #18a169; }
.hs-back { stroke: #309cdf; }
.hs-channel { stroke: #e5ffed; }
.hs-feed { stroke: #91c6c4; }
.hs-stream { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 7 25; stroke-linecap: round; stroke-linejoin: round; animation: hs-water-flow .95s linear infinite; }
.hs-stream.hs-channel { stroke: #fff; }
.hs-exchanger [data-station-channel] .hs-pipe { stroke-width:7; }
.hs-exchanger [data-station-channel=domestic] .hs-pipe { stroke:#479db3; }
.hs-exchanger [data-station-channel] .hs-stream { stroke-width:3; stroke-dasharray:7 25; }
.hs-energy-line { fill: none; stroke: #eeb627; stroke-width: 2.5; }
.hs-energy-head { fill: none; stroke: #eeb627; stroke-width: 2.5; stroke-linejoin: round; }
.hs-energy-stream { stroke: #ffe67f; stroke-width: 4; stroke-dasharray: 3 20; animation: hs-heat-flow .8s linear infinite; }
.hs-outlet { cursor: pointer; outline: none; }
.hs-outlet-hit { fill: transparent; stroke: transparent; stroke-width: 1.5; }
.hs-outlet-icon { color: #768d91; pointer-events: none; }
.hs-outlet[aria-pressed="true"] .hs-outlet-hit { fill: #fff3dc; stroke: #efbd5a; }
.hs-outlet[aria-pressed="true"] .hs-outlet-icon { color: #b95528; }
.hs-outlet:hover .hs-outlet-hit { stroke: #d2a548; }
.hs-outlet:focus-visible .hs-outlet-hit { stroke: #246f74; stroke-width: 3; }
.hs-junction { fill: #fff; stroke: #309cdf; stroke-width: 2; }
.hs-drops { visibility: hidden; }
.hs-drops path { stroke: #409ed0; stroke-width: 2; stroke-linecap: round; animation: hs-drip .8s ease-in infinite; }
.hs-drops path:nth-child(2) { animation-delay: -.28s; }
.hs-outlet[aria-pressed="true"] .hs-drops { visibility: visible; }
.hs-pump { fill: #fff; stroke: #309cdf; stroke-width: 2; }
.hs-pump-blade { fill: #309cdf; }
.hs-outlet[aria-pressed="false"] .hs-outlet-supply .hs-stream { visibility: hidden; }
.house-system[data-mode="idle"] :is(.hs-stream,.hs-energy,.hs-drops) { visibility: hidden; }
.house-system[data-mode="idle"] .hs-fan { animation-play-state: paused; }
.house-system[data-mode="cycle"] .hs-mains .hs-stream { visibility: hidden; }
.house-system[data-mode="cycle"] .hs-drops { visibility: hidden; }
.house-system:is([data-paused="true"],[data-suspended="true"]) :is(.hs-stream,.hs-energy-stream,.hs-fan,.hs-drops path) { animation-play-state: paused; }
.hs-readout { display: flex; gap: 10px; align-items: baseline; padding: 16px 0; color: #247558; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.8; }
.hs-live-dot { width: 7px; height: 7px; background: #279565; border-radius: 50%; flex-shrink: 0; }
.house-system[data-mode="idle"] .hs-readout { color: #718284; }
.house-system[data-mode="idle"] .hs-live-dot { background: #8e9a9b; }
.hs-state-panels { padding: 22px 0 10px; min-height: 108px; }
.hs-state-panels [hidden] { display: none !important; }
.hs-state-panels h4 { margin: 0 0 8px; font-size: 17px; line-height: 1.7; }
.hs-state-panels p,.hs-note { margin: 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.hs-note { font-size: 11px; padding: 12px 0 24px; }
.solution-plan:has(.house-system) .solution-priorities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 30px; }
.solution-plan:has(.house-system) .solution-priorities > div { border: 0; padding: 0; }
@keyframes hs-water-flow { to { stroke-dashoffset: -32; } }
@keyframes hs-heat-flow { to { stroke-dashoffset: -23; } }
@keyframes hs-fan-turn { to { transform: rotate(360deg); } }
@keyframes hs-drip { 0% { transform: translateY(-2px); opacity: .2; } 55% { opacity: 1; } 100% { transform: translateY(2px); opacity: .2; } }
@media (prefers-reduced-motion: reduce) {
  /* Start paused; the diagram's play button opts into motion without losing pause position. */
  .house-system .hs-stream { animation: hs-water-flow .95s linear infinite !important; }
  .house-system .hs-energy-stream { animation: hs-heat-flow .8s linear infinite !important; }
  .house-system .hs-fan { animation: hs-fan-turn 5s linear infinite !important; }
  .house-system .hs-drops path { animation: hs-drip .8s ease-in infinite !important; }
  .house-system .hs-drops path:nth-child(2) { animation-delay: -.28s !important; }
  .house-system:is([data-paused="true"],[data-suspended="true"],[data-mode="idle"]) :is(.hs-stream,.hs-energy-stream,.hs-fan,.hs-drops path) { animation-play-state: paused !important; }
}
@media (max-width: 800px) {
  .hs-wide { display: none; }
  .hs-mobile { display: block; }
  .hs-heading { align-items: flex-start; }
  .hs-heading h3 { font-size: 20px; }
  .hs-separation { display: none; }
  .hs-toolbar { flex-wrap: wrap; gap: 8px; }
  .hs-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1; gap: 5px; }
  .hs-modes button { font-size: 12px; padding-inline: 10px; }
  .hs-player { flex-direction: column; }
  .hs-legend { gap: 10px 16px; }
  .hs-legend span { font-size: 10px; }
  .hs-state-panels { min-height: 152px; }
  .solution-plan:has(.house-system) .solution-priorities { grid-template-columns: 1fr; gap: 22px; }
}
