.hps-app{--hps-bg:#fff;--hps-panel:#f6f7f8;--hps-panel2:#eef1f3;--hps-text:#1d2327;--hps-muted:#646970;--hps-border:#c3c4c7;--hps-input:#fff;--hps-accent:#2271b1;--hps-accent-text:#fff;max-width:1180px;margin:0 auto;font:13px/1.35 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--hps-text);color-scheme:light dark}
@media(prefers-color-scheme:dark){.hps-app{--hps-bg:#17191c;--hps-panel:#202328;--hps-panel2:#292d33;--hps-text:#f1f3f5;--hps-muted:#adb5bd;--hps-border:#495057;--hps-input:#121416;--hps-accent:#72aee6;--hps-accent-text:#0b1a27}}
.hps-app *{box-sizing:border-box}.hps-topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:0 0 12px;padding:12px 14px;background:var(--hps-panel);border:1px solid var(--hps-border);border-radius:6px}.hps-topbar h2{font-size:20px;line-height:1.15;margin:0 0 3px;color:var(--hps-text)}.hps-topbar p{margin:0;color:var(--hps-muted);font-size:12px}.hps-unit-toggle{display:flex;border:1px solid var(--hps-border);border-radius:4px;overflow:hidden;flex:0 0 auto}.hps-unit-btn{border:0!important;border-radius:0!important;padding:6px 12px!important;min-height:32px!important;background:var(--hps-input)!important;color:var(--hps-text)!important;font-size:12px!important}.hps-unit-btn.is-active{background:var(--hps-accent)!important;color:var(--hps-accent-text)!important;font-weight:700}
.hps-section{border:1px solid var(--hps-border);border-radius:5px;margin:8px 0;background:var(--hps-bg);overflow:hidden}.hps-section>summary{list-style:none;cursor:pointer;padding:8px 11px;background:var(--hps-panel);font-weight:700;font-size:13px;color:var(--hps-text);display:flex;align-items:center;gap:8px}.hps-section>summary::-webkit-details-marker{display:none}.hps-section>summary::after{content:"+";margin-left:auto;display:inline-grid;place-items:center;width:20px;height:20px;border:1px solid var(--hps-border);border-radius:3px;background:var(--hps-input);color:var(--hps-text);font-size:15px;line-height:1;font-weight:600}.hps-section[open]>summary::after{content:"−"}.hps-section[open]>.hps-section-body{display:block!important}.hps-section:not([open])>.hps-section-body{display:none!important}.hps-section>summary span{display:inline-grid;place-items:center;width:24px;height:20px;border-radius:3px;background:var(--hps-panel2);font-size:11px;color:var(--hps-muted)}.hps-section-body{padding:10px}.hps-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px}.hps-field{min-width:0;display:grid;grid-template-columns:minmax(130px,1.1fr) minmax(130px,1fr);align-items:center;gap:8px;min-height:32px}.hps-field label{font-size:12px;font-weight:600;color:var(--hps-text)}.hps-field small{grid-column:2;color:var(--hps-muted);font-size:10px;margin-top:-5px}.hps-value-wrap,.hps-cell-unit{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px}.hps-unit{min-width:48px;color:var(--hps-muted);font-size:11px;white-space:nowrap}.hps-app input,.hps-app select{width:100%;height:30px!important;min-height:30px!important;padding:3px 7px!important;margin:0!important;border:1px solid var(--hps-border)!important;border-radius:3px!important;background:var(--hps-input)!important;color:var(--hps-text)!important;font:12px/1.2 inherit!important;box-shadow:none!important}.hps-app input:focus,.hps-app select:focus{outline:2px solid color-mix(in srgb,var(--hps-accent) 45%,transparent);outline-offset:1px;border-color:var(--hps-accent)!important}.hps-subtitle{font-weight:700;font-size:12px;margin:10px 0 5px;color:var(--hps-text)}.hps-table-wrap{overflow-x:auto;border:1px solid var(--hps-border);border-radius:4px}.hps-table{width:100%;border-collapse:collapse;min-width:780px;background:var(--hps-bg)}.hps-table th,.hps-table td{border-bottom:1px solid var(--hps-border);padding:4px 5px;text-align:left;vertical-align:middle;font-size:11px;color:var(--hps-text)}.hps-table th{background:var(--hps-panel);font-weight:700}.hps-table tr:last-child td{border-bottom:0}.hps-table input{height:27px!important;min-height:27px!important;font-size:11px!important}.hps-table td:first-child{width:28px;text-align:center;color:var(--hps-muted)}.hps-note{margin:0 0 8px;color:var(--hps-muted);font-size:11px}.hps-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-top:10px}.hps-summary-grid>div{border:1px solid var(--hps-border);background:var(--hps-panel);padding:7px;border-radius:4px}.hps-summary-grid span{display:block;color:var(--hps-muted);font-size:10px}.hps-summary-grid strong{display:block;margin-top:2px;color:var(--hps-text);font-size:13px}.hps-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.hps-actions button,.hps-import-label{height:32px!important;padding:5px 11px!important;border:1px solid var(--hps-border)!important;border-radius:4px!important;background:var(--hps-panel)!important;color:var(--hps-text)!important;font:600 12px/20px inherit!important;cursor:pointer}.hps-actions .hps-primary{background:var(--hps-accent)!important;color:var(--hps-accent-text)!important;border-color:var(--hps-accent)!important}.hps-import-label input{display:none!important}.hps-engine-status{margin-top:9px;padding:8px 10px;border-left:3px solid var(--hps-accent);background:var(--hps-panel);font-size:11px;color:var(--hps-muted)}.hps-engine-status strong{color:var(--hps-text)}
@media(max-width:800px){.hps-grid{grid-template-columns:1fr}.hps-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hps-topbar{align-items:flex-start;flex-direction:column}.hps-field{grid-template-columns:minmax(115px,.9fr) minmax(0,1.1fr)}}
@media(max-width:480px){.hps-field{grid-template-columns:1fr;gap:3px}.hps-field small{grid-column:1}.hps-summary-grid{grid-template-columns:1fr}.hps-actions>*{flex:1 1 calc(50% - 7px);text-align:center}.hps-unit-toggle{width:100%}.hps-unit-btn{flex:1}}
.hps-hyd-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:2px 0 10px}.hps-hyd-summary>div,.hps-hyd-detail>div{border:1px solid var(--hps-border);background:var(--hps-panel);padding:7px;border-radius:4px}.hps-hyd-summary span,.hps-hyd-detail span{display:block;color:var(--hps-muted);font-size:10px}.hps-hyd-summary strong,.hps-hyd-detail strong{display:block;margin-top:2px;color:var(--hps-text);font-size:13px}.hps-hyd-table{min-width:960px}.hps-hyd-table td:nth-child(n+3){font-variant-numeric:tabular-nums}.hps-hyd-detail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:9px}.hps-regime{font-weight:600}.hps-regime[data-regime="Laminar"]{color:#2271b1}.hps-regime[data-regime="Grey Zone"]{color:#b26200}.hps-regime[data-regime="Turbulent"]{color:#8a2424}@media(prefers-color-scheme:dark){.hps-regime[data-regime="Laminar"]{color:#72aee6}.hps-regime[data-regime="Grey Zone"]{color:#ffb44c}.hps-regime[data-regime="Turbulent"]{color:#ff8f8f}}@media(max-width:800px){.hps-hyd-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.hps-hyd-detail{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.hps-hyd-summary,.hps-hyd-detail{grid-template-columns:1fr}}
.hps-fit-table{min-width:860px}.hps-fit-table th{text-align:center}.hps-fit-table td:nth-child(n+3){width:72px;text-align:center}.hps-fit-table .hps-fit-count{width:62px!important;text-align:center}.hps-fit-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.hps-candidate-table{min-width:1040px}.hps-candidate-table td{font-variant-numeric:tabular-nums}.hps-use-candidate{height:25px!important;min-height:25px!important;padding:2px 7px!important;margin-right:6px!important;border:1px solid var(--hps-border)!important;border-radius:3px!important;background:var(--hps-panel2)!important;color:var(--hps-text)!important;font-size:10px!important;cursor:pointer}.hps-candidate-flag{font-size:10px;color:var(--hps-muted);white-space:nowrap}.hps-candidate-flag.is-bad{color:#9b1c1c;font-weight:700}@media(prefers-color-scheme:dark){.hps-candidate-flag.is-bad{color:#ff8f8f}}@media(max-width:800px){.hps-fit-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.hps-fit-summary{grid-template-columns:1fr}}
.hps-curve-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:2px 0 10px}.hps-curve-summary>div{border:1px solid var(--hps-border);background:var(--hps-panel);padding:7px;border-radius:4px}.hps-curve-summary span{display:block;color:var(--hps-muted);font-size:10px}.hps-curve-summary strong{display:block;margin-top:2px;color:var(--hps-text);font-size:13px}.hps-chart-wrap{position:relative;height:460px;min-height:320px;border:1px solid var(--hps-border);border-radius:4px;background:var(--hps-bg);padding:8px}.hps-chart-wrap canvas{width:100%!important;height:100%!important}.hps-candidate-flag:not(.is-bad){font-weight:600}@media(max-width:800px){.hps-curve-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.hps-chart-wrap{height:400px}}@media(max-width:480px){.hps-curve-summary{grid-template-columns:1fr}.hps-chart-wrap{height:360px;padding:4px}}

/* Dynamic fluid / solids component table */
.hps-components-table{min-width:980px}.hps-component-field{display:grid;grid-template-columns:minmax(95px,auto) minmax(120px,1fr);align-items:center;gap:5px}.hps-component-field-label{font-size:10px;font-weight:600;color:var(--hps-muted);line-height:1.15}.hps-component-prop-c .hps-component-field{grid-template-columns:minmax(150px,1fr)}.hps-component-na{display:block;text-align:center;color:var(--hps-muted)}.hps-component-actions{display:flex;justify-content:flex-start;margin-top:7px}.hps-component-actions button,.hps-delete-component{height:28px!important;min-height:28px!important;padding:3px 8px!important;border:1px solid var(--hps-border)!important;border-radius:3px!important;background:var(--hps-panel)!important;color:var(--hps-text)!important;font:600 11px/18px inherit!important;cursor:pointer}.hps-delete-component{white-space:nowrap}.hps-component-row.is-incomplete .hps-component-calculated{color:var(--hps-muted)}
