.flow-calculator { grid-column: 1 / -1; min-width: 0; width: 100%; border-top: 1px solid #dbe3df; padding-top: 34px; margin-top: 12px; color: #354742; letter-spacing: 0; }
.flow-heading { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin-bottom: 28px; }
.flow-heading h4 { font-size: 28px; line-height: 1.5; margin: 0; }
.flow-heading > p { font-size: 12px; line-height: 1.9; color: #6c8078; margin: 0; }
.flow-fields, .flow-fields * { min-width: 0; }
.flow-calculator h5 { font-size: 14px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.flow-calculator h6 { font-size: 13px; margin: 0 0 15px; }
.flow-calculator svg:not(.flow-scene-svg) { width: 17px; height: 17px; flex-shrink: 0; }
.flow-scenario { display: grid; grid-template-columns: minmax(230px, .55fr) 1fr; align-items: end; gap: 30px; padding-bottom: 22px; }
.flow-scenario > label { display: grid; gap: 9px; font-size: 12px; }
.flow-scenario p, .flow-note { font-size: 11px; line-height: 1.9; color: #73847c; margin: 10px 0 0; overflow-wrap: anywhere; }
.flow-calculator input, .flow-calculator select { border-radius: 3px; padding: 10px; font-size: 12px; background: #fff; border: 1px solid #cbd7d1; height: 40px; width: 100%; color: #3e5850; box-sizing: border-box; }
.flow-calculator input:focus, .flow-calculator select:focus { outline: 2px solid #edb348; outline-offset: 2px; }
.flow-calculator input:disabled, .flow-calculator select:disabled { background: #f2f5f3; color: #99a79f; }
.flow-calculator [aria-invalid=true] { border-color: #bd5c41; outline-color: #bd5c41; }
.flow-rows-heading { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid #dce5df; }
.flow-row { border-top: 1px solid #e1e7e3; padding: 18px 0; }
.flow-row-name { display: grid; grid-template-columns: 70px minmax(0, 230px) 34px; align-items: center; gap: 12px; margin-bottom: 14px; }
.flow-row-name > input { font-weight: 600; }
.flow-row-data { display: grid; grid-template-columns: 1fr .75fr 1.1fr 1.35fr 1fr .9fr; gap: 15px; align-items: start; }
.flow-field { display: grid; gap: 8px; font-size: 12px; color: #52685e; }
.flow-field > span:first-child { min-height: 18px; line-height: 1.5; }
.flow-field small { font-size: 10px; line-height: 1.75; color: #809086; }
.flow-input { display: flex; align-items: center; position: relative; }
.flow-input input { padding-right: 50px; }
.flow-input > span { position: absolute; right: 9px; font-size: 10px; color: #819087; pointer-events: none; white-space: nowrap; }
.flow-volume { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.flow-switch { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #4d665a; margin: 15px 0; }
.flow-switch input { width: 16px; height: 16px; margin: 0; accent-color: #cb9e26; flex: 0 0 16px; }
.flow-row-name .flow-switch { margin: 0; }
.flow-row[data-active=false] .flow-row-data { opacity: .6; }
.flow-base { border-top: 1px solid #dfe6e1; padding: 22px 0; }
.flow-base .flow-field-grid { max-width: 580px; }
.flow-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.flow-results { border-top: 3px solid #e8b331; background: #f2f6f2; padding: 26px; margin-top: 6px; }
.flow-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.flow-metrics > div { min-width: 0; }
.flow-metrics > div > span { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5c7868; }
.flow-metrics strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 13px; min-height: 45px; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.flow-metrics small { font-size: 12px; font-weight: 400; }
.flow-metrics p { color: #7a8c7d; font-size: 11px; line-height: 1.85; margin: 7px 0 0; }
.flow-capacity { border-top: 1px solid #d1dfd2; margin-top: 22px; padding-top: 19px; }
.flow-capacity-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; flex-wrap: wrap; }
.flow-capacity-heading strong { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.flow-capacity-heading > span { color: #7b8d7e; font-size: 11px; }
.flow-capacity p, .flow-winter p { font-size: 11px; line-height: 1.85; color: #718474; margin-bottom: 0; }
.flow-capacity[data-state=shortfall] .flow-capacity-heading strong { color: #a15b38; }
.flow-compare { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; margin-top: 15px; }
.flow-compare b { font-weight: 600; }
.flow-demand-bar { height: 7px; background: #dce5d9; margin-top: 10px; position: relative; }
.flow-demand-bar i { display: block; height: 100%; background: #73a48d; }
.flow-demand-bar b { width: 2px; height: 13px; background: #c48822; position: absolute; top: -3px; transform: translateX(-100%); }
.flow-winter { border-top: 1px solid #d1dfd2; padding-top: 19px; margin-top: 22px; }
.flow-winter h5 { margin-bottom: 12px; }
.flow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 22px; }
.flow-actions > span { color: #788a79; font-size: 11px; flex: 1 1 230px; line-height: 1.85; }
.flow-calculator .icon-button { width: 34px; height: 34px; min-width: 34px; border: 1px solid #cdd9d0; border-radius: 4px; background: #fff; color: #6e8570; padding: 7px; display: grid; place-items: center; }
.flow-calculator button:disabled { opacity: .45; cursor: not-allowed; }
.flow-error { color: #a7563b; font-size: 12px; line-height: 1.9; }
.flow-error:not(:empty) { padding-bottom: 8px; }
.flow-advanced { margin-top: 28px; }
.flow-advanced details, .flow-method { border-top: 1px solid #d9e2dc; padding-bottom: 20px; }
.flow-advanced summary, .flow-method summary { display: flex; align-items: center; gap: 10px; min-height: 66px; cursor: pointer; font-size: 13px; color: #476755; list-style: none; }
.flow-advanced summary::after, .flow-method summary::after { content: "+"; margin-left: auto; color: #899b8b; }
.flow-advanced details[open] summary::after, .flow-method[open] summary::after { content: "-"; }
.flow-advanced summary > span { font-size: 10px; color: #819487; margin-left: auto; text-align: right; }
.flow-advanced summary > span + * { margin-left: 0; }
.flow-advanced details:not([open]) { padding-bottom: 0; }
.flow-advanced .flow-field-grid { max-width: 760px; }
.flow-measure { display: grid; grid-template-columns: 1fr .6fr; gap: 25px; max-width: 850px; }
.flow-measure > div:last-child { display: grid; gap: 13px; }
.flow-measure strong { color: #328d91; font-size: 23px; }
.flow-command { border: 1px solid #ccdacf; background: #f4f7f3; border-radius: 3px; color: #4a6a57; font-size: 12px; padding: 10px 14px; width: fit-content; display: flex; align-items: center; gap: 8px; }
.flow-storage-result { padding: 20px 0; border-top: 1px solid #dfe7e1; margin-top: 20px; max-width: 760px; }
.flow-storage-result > div { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; padding: 8px 0; }
.flow-storage-result b { font-weight: 500; }
.flow-storage-result p { font-size: 12px; line-height: 1.9; color: #417c62; }
.flow-storage-result small { font-size: 11px; line-height: 1.85; color: #7b8e7f; }
[data-flow-pipe] { color: #497b63; font-size: 12px; line-height: 1.9; margin-top: 20px; }
.flow-method { margin-top: 0; font-size: 11px; line-height: 1.9; color: #768a7c; }
.flow-method a { display: inline-flex; align-items: center; gap: 8px; text-decoration: underline; text-underline-offset: 3px; }
.flow-audit-table > div { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #e0e7df; }
.flow-audit-table > div > * { overflow-wrap: anywhere; font-size: 11px; }
.flow-scene-svg { width: 100%; display: block; height: auto; }
.flow-outlet-water { fill: none; stroke-width: 3; stroke-dasharray: 4 10; stroke-linecap: round; animation: flow-outlet-stream .9s linear infinite; }
.flow-outlet-pipe { fill: none; stroke-width: 3; stroke-dasharray: 4 14; stroke-linecap: round; animation: flow-outlet-stream 1.3s linear infinite; }
@keyframes flow-outlet-stream { to { stroke-dashoffset: -36; } }
[data-flow-outlet][data-running=false] .flow-outlet-water, [data-flow-outlet][data-running=false] .flow-outlet-pipe { opacity: 0; animation-play-state: paused !important; }
[data-flow-outlet][data-running=false] > g { opacity: .4; }
.story-flow-limited .flow-outlet-water { stroke-width: 1.5; stroke-dasharray: 2 17; animation-duration: 2s; }
@media (max-width: 1050px) {
  .flow-row-data { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 680px) {
  .flow-heading { display: block; }
  .flow-heading h4 { font-size: 24px; }
  .flow-heading > p { margin-top: 14px; }
  .flow-scenario { grid-template-columns: 1fr; gap: 0; }
  .flow-row-data { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
  .flow-row-name { grid-template-columns: 63px minmax(0, 1fr) 34px; gap: 8px; }
  .flow-field-grid { gap: 18px 12px; }
  .flow-results { padding: 20px 16px; }
  .flow-metrics { grid-template-columns: 1fr; gap: 18px; }
  .flow-metrics > div { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; border-bottom: 1px solid #d6e1d6; padding-bottom: 16px; }
  .flow-metrics > div > span { align-self: center; font-size: 11px; }
  .flow-metrics strong { margin: 0; min-height: 0; font-size: 27px; gap: 5px; }
  .flow-metrics p { grid-column: 1 / -1; margin: 0; }
  .flow-capacity { border: 0; margin-top: 0; }
  .flow-capacity-heading { align-items: start; flex-direction: column; gap: 8px; }
  .flow-actions > span { flex-basis: 100%; margin-top: 5px; }
  .flow-advanced summary { flex-wrap: wrap; padding: 16px 0; min-height: 64px; }
  .flow-advanced summary > span { margin-left: 27px; flex-basis: calc(100% - 60px); order: 2; text-align: left; }
  .flow-measure { grid-template-columns: 1fr; gap: 20px; }
  .flow-advanced .flow-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-audit-table > div { grid-template-columns: 1.2fr repeat(3, 1fr); gap: 7px; }
  .flow-audit-table > div > * { font-size: 10px; }
}
@media (max-width: 370px) {
  .flow-volume { grid-template-columns: 1fr; }
  .flow-metrics > div { grid-template-columns: 1fr; }
  .flow-metrics p { grid-column: auto; }
  .flow-input input { padding-left: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-outlet-water, .flow-outlet-pipe { animation: none; }
}
