:root {
            --ink-900: #13212b;
            --ink-700: #425562;
            --ink-500: #6e7e8b;
            --stone-050: #fbf8f3;
            --stone-100: #f2ece4;
            --stone-200: #e3d8c7;
            --stone-300: #d1bea3;
            --steel-100: #eaf1f2;
            --steel-300: #b7c9cc;
            --teal-700: #002277;
            --teal-600: #003399;
            --rust-600: #0044bb;
            --rust-500: #2266cc;
            --white: #ffffff;
            --border-strong: rgba(19, 33, 43, 0.14);
            --shadow-soft: 0 20px 48px rgba(34, 46, 58, 0.12);
            --shadow-card: 0 12px 28px rgba(25, 38, 49, 0.09);
            --stack-gap: 12px;
            --nav-card-h: 170px;
            --nav-scale: 1;
            --network-h2-size: 20px;
            --network-body-size: 13px;
            --network-list-gap: 8px;
            --network-row-pad: 5px;
            --network-banner-gap: 8px;
            --network-banner-pad: 8px 10px;
            --network-image-max-h: 180px;
            --footer-gap: 6px;
            --footer-pad: 10px 16px;
            --footer-meta-size: 12px;
            --footer-legal-size: 12px;
        }

            *,
            *::before,
            *::after {
                box-sizing: border-box;
            }

            html,
            body {
                margin: 0;
                padding: 0;
                min-height: 100%;
            }

            body {
                font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
                color: var(--ink-900);
                background: radial-gradient(circle at top right, #fff9f1 0%, #f4f7fa 46%, #edf2f7 100%);
            }

            .layer {
                display: none;
                min-height: 100vh;
            }

            .layer.active {
                display: flex;
            }

            /* Defensive guard: only one top-level layer should ever render */
            #layer1,
            #layer2,
            #layer3,
            #layer4 {
                display: none;
            }

            #layer1.active,
            #layer2.active,
            #layer3.active,
            #layer4.active {
                display: flex;
            }

            .selector-landing {
                display: flex;
                flex-direction: column;
                gap: 14px;
                padding: 20px;
            }

            .landing-topbar,
            .selector-footer {
                gap: 18px;
                padding: 10px 18px;
                background: rgba(255, 255, 255, 0.72);
                backdrop-filter: blur(12px);
                border: 1px solid rgba(255, 255, 255, 0.72);
                border-radius: 22px;
                box-shadow: var(--shadow-soft);
            }

            .selector-footer {
                margin-top: auto;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: var(--footer-gap);
                text-align: center;
                padding: var(--footer-pad);
                width: min(760px, 100%);
                align-self: center;
            }

            .landing-topbar {
                display: grid;
                grid-template-columns: 2fr 1fr 1fr;
                align-items: center;
            }

            .landing-brand {
                display: flex;
                align-items: center;
                gap: 18px;
            }

            .landing-brand-copy {
                text-align: center;
                justify-self: center;
            }

            .landing-topbar-actions {
                display: flex;
                align-items: center;
                gap: 12px;
                justify-content: flex-end;
                justify-self: end;
            }

            .landing-logo {
                width: 160px;
                height: 40px;
                flex: 0 0 auto;
                justify-self: center;
            }

            .landing-brand-copy h1,
            .landing-card h2,
            .quick-results-header h3,
            .support-banner h3 {
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                letter-spacing: 0.02em;
            }

            .landing-brand-kicker,
            .section-tag {
                font-size: 12px;
                font-weight: 700;
                letter-spacing: 0.18em;
                text-transform: uppercase;
            }

            .landing-brand-kicker {
                color: var(--rust-600);
                margin-bottom: 2px;
            }

            .landing-brand-copy h1 {
                margin: 0;
                font-size: 22px;
            }

            .unit-toolbar {
                display: flex;
                flex-wrap: wrap;
                justify-content: flex-end;
                gap: 12px;
            }

            .selector-footer-left {
                color: var(--ink-700);
                font-size: var(--footer-meta-size);
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: none;
            }

            .selector-footer-legal {
                color: var(--ink-900);
                font-size: var(--footer-legal-size);
                line-height: 1.45;
                font-weight: 700;
                max-width: 920px;
                text-align: center;
            }

            html[data-scale-profile='hd'] .selector-footer {
                --footer-gap: 5px;
                --footer-pad: 8px 12px;
                --footer-meta-size: 11px;
                --footer-legal-size: 11px;
            }

            html[data-scale-profile='fhd'] .selector-footer {
                --footer-gap: 6px;
                --footer-pad: 10px 16px;
                --footer-meta-size: 12px;
                --footer-legal-size: 12px;
            }

            html[data-scale-profile='qhd'] .selector-footer {
                --footer-gap: 7px;
                --footer-pad: 11px 20px;
                --footer-meta-size: 13px;
                --footer-legal-size: 12px;
            }

            html[data-scale-profile='4k'] .selector-footer {
                --footer-gap: 8px;
                --footer-pad: 12px 24px;
                --footer-meta-size: 13px;
                --footer-legal-size: 13px;
            }

            .unit-launch-btn {
                border: 1px solid rgba(0, 51, 153, 0.25);
                background: linear-gradient(145deg, rgba(0, 51, 153, 0.12), rgba(0, 51, 153, 0.04));
                color: var(--teal-700);
                border-radius: 12px;
                padding: 10px 16px;
                font-size: 13px;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                cursor: pointer;
                transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
            }

            .unit-launch-btn:hover {
                transform: translateY(-1px);
                box-shadow: 0 8px 20px rgba(31, 49, 64, 0.12);
                background: linear-gradient(145deg, rgba(0, 51, 153, 0.2), rgba(0, 51, 153, 0.08));
            }

            .topbar-qr {
                display: block;
                width: 44px;
                height: 44px;
                border-radius: 8px;
                object-fit: contain;
                background: rgba(255,255,255,0.6);
                border: 1px solid var(--border-strong);
            }

            .unit-popup-backdrop {
                position: fixed;
                inset: 0;
                background: rgba(13, 25, 33, 0.45);
                display: none;
                align-items: center;
                justify-content: center;
                z-index: 1200;
                padding: 20px;
            }

            .unit-popup-backdrop.show {
                display: flex;
            }

            .unit-popup {
                width: min(560px, 100%);
                border-radius: 20px;
                border: 1px solid rgba(255, 255, 255, 0.82);
                background: linear-gradient(170deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 252, 0.98));
                box-shadow: 0 26px 60px rgba(0, 0, 0, 0.18);
                padding: 18px 18px 20px;
            }

            .unit-popup-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding-bottom: 10px;
                border-bottom: 1px solid rgba(19, 33, 43, 0.08);
                margin-bottom: 14px;
            }

            .unit-popup-header h3 {
                margin: 0;
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                font-size: 22px;
                color: var(--ink-900);
            }

            .unit-popup-close {
                border: 1px solid rgba(19, 33, 43, 0.16);
                background: rgba(255, 255, 255, 0.92);
                color: var(--ink-700);
                width: 34px;
                height: 34px;
                border-radius: 10px;
                cursor: pointer;
                font-size: 14px;
                font-weight: 700;
                line-height: 1;
            }

            .unit-popup-grid {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 12px;
            }

            .unit-control {
                display: flex;
                flex-direction: column;
                gap: 6px;
                min-width: 116px;
                font-size: 12px;
                font-weight: 700;
                color: var(--ink-700);
                letter-spacing: 0.08em;
                text-transform: uppercase;
            }

            .unit-select,
            .dash-select,
            .dash-input,
            .search-input-group input {
                width: 100%;
                border: 1px solid var(--border-strong);
                border-radius: 14px;
                padding: 13px 14px;
                background: rgba(255, 255, 255, 0.94);
                color: var(--ink-900);
                font-size: 15px;
                transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
            }

            .input-highlight {
                padding: 12px 14px !important;
                font-size: 16px !important;
                font-weight: 600;
                border: 2px solid rgba(0, 51, 153, 0.35) !important;
                border-radius: 16px !important;
                background: rgba(255, 255, 255, 0.98) !important;
                box-shadow: 0 4px 16px rgba(0, 51, 153, 0.1), inset 0 1px 3px rgba(0, 51, 153, 0.06);
            }

            .input-highlight::placeholder {
                color: var(--ink-500);
                font-size: 14px;
                font-weight: 400;
            }

            .input-highlight:focus {
                border-color: rgba(0, 51, 153, 0.7) !important;
                box-shadow: 0 0 0 5px rgba(0, 68, 187, 0.18), 0 4px 16px rgba(0, 51, 153, 0.12) !important;
            }

            .unit-select:focus,
            .dash-select:focus,
            .dash-input:focus,
            .search-input-group input:focus {
                outline: none;
                border-color: rgba(0, 51, 153, 0.55);
                box-shadow: 0 0 0 4px rgba(0, 68, 187, 0.14);
                transform: translateY(-1px);
            }

            .landing-grid {
                display: grid;
                grid-template-columns: minmax(420px, 2fr) minmax(320px, 1fr) minmax(280px, 1fr);
                gap: 14px;
                align-items: start;
                min-height: 0;
                flex: 1 1 auto;
            }

            .landing-stack {
                display: grid;
                grid-template-rows: auto;
                gap: var(--stack-gap);
                min-height: 0;
                align-content: start;
                align-self: start;
            }

            .landing-card {
                display: flex;
                flex-direction: column;
                gap: 12px;
                padding: 18px;
                border-radius: 28px;
                background:
                    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82)),
                    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
                border: 1px solid rgba(255, 255, 255, 0.75);
                box-shadow: var(--shadow-card);
            }

            .info-card-small {
                min-height: 0;
            }

            .section-tag {
                color: var(--teal-700);
            }

            .landing-card h2,
            .network-hero h2 {
                margin: 0;
                font-size: 20px;
                line-height: 1.08;
            }

            .landing-card p,
            .quick-results-header p,
            .detail-row span,
            .support-banner p {
                margin: 0;
                color: var(--ink-700);
                line-height: 1.55;
            }

            .metric-pills {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 12px;
            }

            .metric-pill {
                padding: 14px 15px;
                border-radius: 18px;
                background: linear-gradient(180deg, rgba(0, 51, 153, 0.08), rgba(0, 51, 153, 0.02));
                border: 1px solid rgba(0, 51, 153, 0.14);
            }

            .metric-pill span,
            .detail-row strong,
            .field-label,
            .search-input-group span,
            .series-card-label {
                display: block;
                font-size: 12px;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--ink-500);
            }

            .metric-pill strong {
                display: block;
                margin-top: 8px;
                font-size: 20px;
            }

            .detail-list {
                display: grid;
                gap: 12px;
            }

            .detail-row {
                display: grid;
                grid-template-columns: minmax(80px, 96px) 1fr;
                gap: 8px;
                padding-top: 5px;
                border-top: 1px solid rgba(19, 33, 43, 0.08);
            }

            .landing-select {
                margin-top: -4px;
            }

            .series-chips {
                display: flex;
                flex-wrap: wrap;
                gap: 10px;
            }

            .series-chip {
                padding: 9px 13px;
                border-radius: 999px;
                background: rgba(0, 68, 187, 0.09);
                color: var(--rust-600);
                font-size: 13px;
                font-weight: 700;
            }

            .quick-card {
                gap: 10px;
            }

            .quick-section {
                display: flex;
                flex-direction: column;
                gap: 10px;
            }

            .quick-section-form {
                padding-bottom: 12px;
                border-bottom: 1px solid rgba(19, 33, 43, 0.08);
            }

            .quick-form-grid {
                display: grid;
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .search-input-group {
                display: flex;
                flex-direction: column;
                gap: 8px;
            }

            .compact-field strong {
                color: var(--teal-700);
            }

            .compact-select {
                height: 40px;
            }

            .btn-huge-search {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 10px;
                width: 100%;
                border: none;
                border-radius: 18px;
                padding: 10px 18px;
                background: linear-gradient(135deg, var(--rust-600), var(--teal-700));
                color: var(--white);
                font-size: 14px;
                font-weight: 800;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                cursor: pointer;
                box-shadow: 0 16px 30px rgba(82, 70, 54, 0.2);
                transition: transform 0.2s ease, box-shadow 0.2s ease;
            }

            .liquid-setup-strip {
                border: 1px solid rgba(19, 33, 43, 0.12);
                border-radius: 14px;
                padding: 10px;
                background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 248, 251, 0.82));
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
            }

            .liquid-strip-title {
                grid-column: 1 / -1;
                font-size: 12px;
                font-weight: 800;
                letter-spacing: 0.06em;
                color: var(--ink-700);
                text-transform: uppercase;
            }

            .liquid-field {
                display: flex;
                flex-direction: column;
                gap: 4px;
            }

            .liquid-field span {
                font-size: 11px;
                color: var(--ink-500);
                font-weight: 700;
            }

            .liquid-field input {
                border: 1px solid rgba(19, 33, 43, 0.16);
                border-radius: 10px;
                height: 36px;
                padding: 8px 10px;
                font-size: 13px;
                font-weight: 700;
                color: var(--ink-800);
                background: rgba(255, 255, 255, 0.96);
                outline: none;
            }

            .liquid-field select {
                border: 1px solid rgba(19, 33, 43, 0.16);
                border-radius: 10px;
                height: 36px;
                padding: 0 10px;
                font-size: 13px;
                font-weight: 700;
                color: var(--ink-800);
                background: rgba(255, 255, 255, 0.96);
                outline: none;
            }

            .liquid-field input:focus {
                border-color: rgba(0, 51, 153, 0.5);
                box-shadow: 0 0 0 3px rgba(0, 68, 187, 0.12);
            }

            .liquid-field select:focus {
                border-color: rgba(0, 51, 153, 0.5);
                box-shadow: 0 0 0 3px rgba(0, 68, 187, 0.12);
            }

            .liquid-reset-btn {
                border: 1px solid rgba(19, 33, 43, 0.2);
                border-radius: 10px;
                background: rgba(255, 255, 255, 0.9);
                color: var(--ink-700);
                font-size: 12px;
                font-weight: 800;
                letter-spacing: 0.04em;
                text-transform: uppercase;
                cursor: pointer;
                padding: 0 10px;
                height: 36px;
                align-self: end;
            }

            .liquid-context-note {
                grid-column: 1 / -1;
                margin: 0;
                font-size: 11px;
                color: var(--ink-500);
                font-weight: 700;
            }

            .liquid-slot-card {
                gap: 8px;
                padding: 14px;
                border-radius: 24px;
            }

            .liquid-slot-card .liquid-setup-strip {
                border: none;
                background: transparent;
                padding: 0;
            }

            .liquid-slot-card .liquid-strip-title {
                margin-bottom: 2px;
            }

            .btn-huge-search:hover {
                transform: translateY(-2px);
                box-shadow: 0 20px 34px rgba(82, 70, 54, 0.24);
            }

            .search-icon {
                font-size: 18px;
            }

            .quick-results-header {
                display: flex;
                justify-content: space-between;
                align-items: flex-end;
                gap: 12px;
            }

            .quick-results-header h3 {
                margin: 0 0 3px;
                font-size: 17px;
            }

            .results-wrapper {
                display: block;
                min-height: 100%;
            }

            .results-grid {
                display: grid;
                gap: 12px;
            }

            .series-summary-card {
                width: 100%;
                border: 1px solid rgba(19, 33, 43, 0.1);
                background: rgba(255, 255, 255, 0.9);
                border-radius: 16px;
                padding: 14px 16px;
                text-align: left;
                cursor: pointer;
                transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
            }

            .series-summary-card:hover {
                transform: translateY(-2px);
                border-color: rgba(0, 51, 153, 0.28);
                box-shadow: 0 10px 20px rgba(31, 49, 64, 0.1);
            }

            .series-summary-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 10px;
            }

            .series-count-badge {
                font-size: 12px;
                font-weight: 700;
                color: var(--teal-700);
                background: rgba(0, 51, 153, 0.08);
                border: 1px solid rgba(0, 51, 153, 0.16);
                border-radius: 999px;
                padding: 5px 10px;
            }

            .series-summary-body {
                margin-top: 8px;
            }

            .series-summary-body strong {
                color: var(--ink-900);
                font-size: 16px;
            }

            .series-summary-body p {
                margin: 5px 0 0;
                color: var(--ink-700);
                font-size: 13px;
            }

            .series-card {
                width: 100%;
                display: grid;
                gap: 14px;
                border: 1px solid rgba(19, 33, 43, 0.08);
                border-radius: 22px;
                padding: 18px;
                background: linear-gradient(180deg, rgba(234, 241, 242, 0.7), rgba(255, 255, 255, 0.96));
                cursor: pointer;
                text-align: left;
                transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            }

            .series-card:hover {
                transform: translateY(-2px);
                border-color: rgba(0, 51, 153, 0.28);
                box-shadow: 0 14px 26px rgba(31, 49, 64, 0.1);
            }

            .series-card-header {
                display: flex;
                justify-content: space-between;
                gap: 16px;
                align-items: flex-start;
            }

            .series-card-title {
                margin: 4px 0 0;
                font-size: 22px;
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
            }

            .series-card-subtitle {
                margin: 6px 0 0;
                color: var(--ink-700);
            }

            .series-card-tag {
                padding: 8px 11px;
                border-radius: 999px;
                background: rgba(0, 51, 153, 0.1);
                color: var(--teal-700);
                font-size: 12px;
                font-weight: 800;
                letter-spacing: 0.08em;
                text-transform: uppercase;
            }

            .series-card-metrics {
                display: grid;
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 10px;
            }

            .series-card-metric {
                padding: 12px;
                border-radius: 16px;
                background: rgba(255, 255, 255, 0.88);
                border: 1px solid rgba(19, 33, 43, 0.06);
            }

            .series-card-value {
                display: block;
                margin-top: 6px;
                font-size: 18px;
                font-weight: 800;
                color: var(--ink-900);
            }

            .series-top-models {
                display: grid;
                gap: 8px;
                padding: 12px;
                border-radius: 16px;
                background: rgba(255, 255, 255, 0.9);
                border: 1px solid rgba(19, 33, 43, 0.08);
            }

            .series-top-models ul {
                list-style: none;
                margin: 0;
                padding: 0;
                display: grid;
                gap: 6px;
            }

            .series-top-models li {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 10px;
                font-size: 13px;
                color: var(--ink-800);
            }

            .series-top-models li strong {
                font-size: 12px;
                color: var(--teal-700);
                background: rgba(0, 51, 153, 0.08);
                border: 1px solid rgba(0, 51, 153, 0.15);
                border-radius: 999px;
                padding: 2px 8px;
            }

            .empty-state {
                padding: 20px;
                border-radius: 20px;
                border: 1px dashed rgba(19, 33, 43, 0.18);
                background: rgba(255, 255, 255, 0.48);
                color: var(--ink-700);
            }

            .network-card {
                justify-content: space-between;
                min-height: 0;
                overflow: visible;
            }

            .network-hero {
                display: flex;
                flex-direction: column;
                gap: 5px;
            }

            .network-hero h2 {
                margin: 0;
                font-size: var(--network-h2-size);
            }

            .network-card .network-hero p,
            .network-card .detail-row span,
            .network-card .support-banner p {
                font-size: var(--network-body-size);
                overflow-wrap: anywhere;
            }

            .network-card .detail-row span a {
                color: var(--teal-700);
                text-decoration: none;
                font-size: inherit;
                line-height: inherit;
                font-weight: 500;
            }

            .network-card .detail-row span a:hover {
                text-decoration: underline;
            }

            .application-visual {
                width: 100%;
                overflow: hidden;
                border-radius: 20px;
                background: linear-gradient(145deg, rgba(0, 51, 153,0.1), rgba(0, 51, 153,0.02));
                border: 1px solid rgba(0, 51, 153,0.14);
            }

            .application-visual img {
                width: 100%;
                height: auto;
                display: block;
                object-fit: contain;
                max-height: var(--network-image-max-h);
            }

            .application-fallback {
                position: absolute;
                inset: 0;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 10px;
                padding: 24px;
                text-align: center;
                color: var(--teal-700);
            }

            .application-fallback span {
                font-size: 12px;
                font-weight: 700;
                letter-spacing: 0.14em;
                text-transform: uppercase;
            }

            .application-fallback strong {
                font-size: 18px;
            }

            .application-visual:not(.is-missing) .application-fallback {
                display: none;
            }

            .network-list {
                gap: var(--network-list-gap);
            }

            .network-card .detail-row {
                padding-top: var(--network-row-pad);
            }

            .support-banner {
                display: flex;
                align-items: flex-start;
                justify-content: flex-start;
                gap: var(--network-banner-gap);
                padding: var(--network-banner-pad);
                border-radius: 16px;
                background: linear-gradient(135deg, rgba(0, 68, 187, 0.12), rgba(0, 51, 153, 0.14));
                border: 1px solid rgba(19, 33, 43, 0.08);
            }

            .support-banner h3 {
                margin: 0 0 2px;
                font-size: 16px;
                line-height: 1.2;
            }

            .support-banner p {
                margin: 0;
                line-height: 1.35;
            }

            .network-card.network-compact {
                --network-h2-size: 18px;
                --network-body-size: 12px;
                --network-list-gap: 6px;
                --network-row-pad: 3px;
                --network-banner-gap: 7px;
                --network-banner-pad: 7px 9px;
                --network-image-max-h: 145px;
            }

            .network-card.network-tight {
                --network-h2-size: 16px;
                --network-body-size: 11px;
                --network-list-gap: 4px;
                --network-row-pad: 2px;
                --network-banner-gap: 6px;
                --network-banner-pad: 6px 8px;
                --network-image-max-h: 120px;
            }

            .network-card.is-scrollable {
                overflow-y: auto;
                padding-right: 10px;
                scrollbar-gutter: stable;
            }

            .dashboard-ui {
                flex-direction: column;
                min-height: 100vh;
                background: rgba(244, 247, 250, 0.92);
            }

            .header-dash {
                display: flex;
                justify-content: space-between;
                align-items: center;
                position: relative;
                gap: 16px;
                padding: 20px 28px;
                background: rgba(255, 255, 255, 0.96);
                border-bottom: 1px solid rgba(19, 33, 43, 0.08);
            }

            .header-dash-logo {
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
                width: 56px;
                height: 56px;
            }

            /* ── Model Info Tabs (shared Layer 2 + Layer 4) ───── */
            .model-info-tabs {
                display: flex;
                gap: 0;
                border-bottom: 2px solid rgba(19, 33, 43, 0.10);
                padding: 0 16px;
                background: rgba(255, 255, 255, 0.96);
                flex-shrink: 0;
            }
            .model-info-tab {
                padding: 10px 20px 8px;
                border: none;
                border-bottom: 3px solid transparent;
                background: transparent;
                color: #6e7e8b;
                font-size: 12px;
                font-weight: 600;
                letter-spacing: 0.03em;
                cursor: pointer;
                transition: color 0.15s, border-color 0.15s;
                white-space: nowrap;
            }
            .model-info-tab:hover {
                color: #425562;
            }
            .model-info-tab.is-active {
                color: #002277;
                border-bottom-color: #002277;
            }
            .model-info-panel {
                flex: 1;
                min-height: 0;
                overflow-y: auto;
            }
            .model-info-panel[hidden] {
                display: none !important;
            }
            .info-panel-inner {
                padding: 24px 28px;
                max-width: 800px;
            }
            .info-panel-inner h3 {
                font-size: 15px;
                font-weight: 700;
                color: #13212b;
                margin: 0 0 12px;
            }
            .info-panel-inner p {
                font-size: 13px;
                color: #425562;
                line-height: 1.6;
                margin: 0 0 16px;
            }
            .info-table {
                width: 100%;
                border-collapse: collapse;
                font-size: 12px;
                margin-bottom: 20px;
            }
            .info-table th {
                background: #13212b;
                color: #fff;
                font-size: 10px;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                padding: 8px 12px;
                text-align: left;
            }
            .info-table td {
                padding: 8px 12px;
                border-bottom: 1px solid rgba(19, 33, 43, 0.08);
                color: #1a1a1a;
            }
            .info-table tbody tr:nth-child(even) {
                background: rgba(244, 247, 250, 0.6);
            }
            .info-spec-grid {
                display: grid;
                grid-template-columns: 160px 1fr;
                gap: 0;
                margin-bottom: 20px;
            }
            .info-spec-grid dt {
                padding: 6px 12px;
                font-size: 11px;
                font-weight: 700;
                color: #6e7e8b;
                text-transform: uppercase;
                letter-spacing: 0.06em;
                border-bottom: 1px solid rgba(19, 33, 43, 0.06);
            }
            .info-spec-grid dd {
                padding: 6px 12px;
                font-size: 13px;
                color: #13212b;
                margin: 0;
                border-bottom: 1px solid rgba(19, 33, 43, 0.06);
            }
            .info-features {
                list-style: none;
                padding: 0;
                margin: 0 0 20px;
            }
            .info-features li {
                padding: 6px 0 6px 20px;
                position: relative;
                font-size: 13px;
                color: #425562;
                line-height: 1.5;
            }
            .info-features li::before {
                content: '';
                position: absolute;
                left: 0;
                top: 12px;
                width: 8px;
                height: 8px;
                background: #002277;
                border-radius: 50%;
            }
            .info-placeholder {
                text-align: center;
                padding: 60px 20px;
                color: #6e7e8b;
                font-size: 14px;
            }
            .info-placeholder .info-placeholder-icon {
                font-size: 40px;
                margin-bottom: 12px;
                opacity: 0.4;
            }

            /* ── Datasheet panel (Grundfos-style) ─────────────── */
            .ds-page {
                max-width: 860px;
                padding: 28px 32px 20px;
                font-family: inherit;
            }
            .ds-header {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                padding: 16px 20px;
                background: linear-gradient(135deg, #13212b 0%, #1e3a4c 100%);
                border-radius: 6px;
                margin-bottom: 20px;
                color: #fff;
            }
            .ds-kicker {
                font-size: 10px;
                font-weight: 600;
                letter-spacing: 0.12em;
                text-transform: uppercase;
                opacity: 0.7;
                margin-bottom: 4px;
            }
            .ds-model-name {
                font-size: 20px;
                font-weight: 800;
                margin: 0 0 2px;
                line-height: 1.2;
            }
            .ds-series {
                font-size: 12px;
                opacity: 0.8;
            }
            .ds-header-right {
                text-align: right;
            }
            .ds-issued {
                font-size: 10px;
                opacity: 0.6;
                margin-bottom: 6px;
            }
            .ds-badge {
                display: inline-block;
                background: rgba(255,255,255,0.15);
                border: 1px solid rgba(255,255,255,0.3);
                border-radius: 3px;
                padding: 3px 8px;
                font-size: 10px;
                font-weight: 700;
                letter-spacing: 0.06em;
            }
            .ds-section {
                margin-bottom: 18px;
            }
            .ds-section-title {
                font-size: 12px;
                font-weight: 700;
                color: #1a2b75;
                text-transform: uppercase;
                letter-spacing: 0.08em;
                margin: 0 0 8px;
                padding-bottom: 4px;
                border-bottom: 2px solid #f59e0b;
            }
            .ds-table {
                width: 100%;
                border-collapse: collapse;
                font-size: 12px;
            }
            .ds-table th {
                background: #1a2b75;
                color: #fff;
                font-size: 10px;
                font-weight: 600;
                letter-spacing: 0.06em;
                text-transform: uppercase;
                padding: 6px 12px;
                text-align: left;
            }
            .ds-table td {
                padding: 6px 12px;
                border-bottom: 1px solid rgba(26, 43, 117, 0.08);
                color: #1e1e1e;
            }
            .ds-table tbody tr:nth-child(even) {
                background: #f0f2f8;
            }
            .ds-label-cell {
                font-weight: 600;
                color: #1a2b75;
                width: 160px;
                white-space: nowrap;
            }
            .ds-chart-box {
                background: #fafafa;
                border: 0.5px solid #d1d5db;
                border-radius: 2px;
                padding: 8px;
                text-align: center;
            }
            .ds-chart-img {
                max-width: 100%;
                height: auto;
            }
            .ds-footer {
                display: flex;
                justify-content: space-between;
                padding-top: 12px;
                margin-top: 8px;
                border-top: 1px solid rgba(19, 33, 43, 0.1);
                font-size: 10px;
                color: #6e7e8b;
            }
            .ds-motor-note {
                font-size: 10px;
                color: #6b7280;
                margin: 6px 0 0;
                line-height: 1.4;
                font-style: italic;
            }

            .ds-pr-footer {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 20px;
                margin-top: 20px;
                padding: 16px 20px;
                background: #f8f9fa;
                border-top: 2px solid #1d3557;
                border-radius: 0 0 6px 6px;
            }
            .ds-pr-footer-info {
                display: flex;
                flex-direction: column;
                gap: 2px;
                color: #374151;
            }
            .ds-pr-footer-logo {
                width: 120px;
                max-height: 32px;
                object-fit: contain;
                object-position: left center;
                margin-bottom: 4px;
            }
            .ds-pr-footer-brand {
                margin: 0;
                font-size: 13px;
                font-weight: 700;
                color: #1d3557;
            }
            .ds-pr-footer-line {
                margin: 0;
                font-size: 11px;
                line-height: 1.35;
                color: #4b5563;
            }
            .ds-pr-footer-qr-wrap {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 4px;
                flex-shrink: 0;
            }
            .ds-pr-footer-qr {
                width: 72px;
                height: 72px;
                object-fit: contain;
                border: 1px solid rgba(29, 53, 87, 0.18);
                border-radius: 4px;
                padding: 3px;
            }
            .ds-pr-footer-qr-caption {
                font-size: 9px;
                color: #6b7280;
                text-align: center;
                line-height: 1.15;
            }

            /* ── Layer 2 sidebar+main layout ──────────────────── */
            .layer2-body {
                display: grid;
                grid-template-columns: 290px 1fr;
                gap: 20px;
                padding: 20px 24px 32px;
                align-items: start;
                flex: 1;
            }

            .layer2-sidebar {
                display: grid;
                gap: 12px;
                position: sticky;
                top: 20px;
                max-height: calc(100vh - 90px);
                overflow-y: auto;
                scrollbar-gutter: stable;
                padding-right: 2px;
                padding-bottom: 4px;
            }

            .layer2-main {
                display: grid;
                gap: 16px;
                align-content: start;
                min-width: 0;
            }

            /* ── Sidebar cards ─────────────────────────────────── */
            .sidebar-card {
                background: rgba(255, 255, 255, 0.96);
                border: 1px solid rgba(19, 33, 43, 0.08);
                border-radius: 16px;
                box-shadow: 0 8px 24px rgba(15, 35, 70, 0.07);
                padding: 14px 16px;
                display: grid;
                gap: 10px;
            }

            .sidebar-card-title {
                font-size: 10px;
                font-weight: 700;
                letter-spacing: 0.12em;
                text-transform: uppercase;
                color: var(--ink-500);
                padding-bottom: 8px;
                border-bottom: 1px solid rgba(19, 33, 43, 0.06);
                margin-bottom: 2px;
            }

            .sidebar-field {
                display: grid;
                gap: 5px;
            }

            .sidebar-label {
                font-size: 10px;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--ink-500);
            }

            /* ── Duty Point inputs ─────────────────────────────── */
            .sidebar-duty-inputs {
                display: grid;
                gap: 8px;
            }

            .sidebar-duty-row {
                display: grid;
                grid-template-columns: 22px 1fr auto;
                gap: 8px;
                align-items: center;
            }

            .sidebar-duty-label {
                font-size: 13px;
                font-weight: 800;
                color: var(--ink-500);
                text-align: center;
            }

            .sidebar-duty-input {
                border: 1px solid var(--border-strong);
                border-radius: 10px;
                padding: 9px 12px;
                background: rgba(255, 255, 255, 0.95);
                color: var(--teal-700);
                font-size: 15px;
                font-weight: 700;
                width: 100%;
                outline: none;
                transition: border-color 0.2s ease, box-shadow 0.2s ease;
                font-family: inherit;
            }

            .sidebar-duty-input:focus {
                border-color: rgba(0, 51, 153, 0.55);
                box-shadow: 0 0 0 3px rgba(0, 68, 187, 0.13);
            }

            .sidebar-duty-unit {
                font-size: 11px;
                font-weight: 600;
                color: var(--ink-400);
                white-space: nowrap;
                min-width: 32px;
                text-align: right;
            }

            .sidebar-duty-actions {
                display: grid;
                grid-template-columns: 1fr 1fr auto;
                gap: 6px;
            }

            .btn-duty {
                border: none;
                border-radius: 10px;
                padding: 9px 8px;
                font-size: 13px;
                font-weight: 700;
                cursor: pointer;
                transition: opacity 0.18s, transform 0.14s;
                font-family: inherit;
                line-height: 1;
            }

            .btn-duty:hover { opacity: 0.83; transform: translateY(-1px); }

            .btn-duty--plot {
                background: var(--teal-700);
                color: #fff;
            }

            .btn-duty--opt {
                background: rgba(0, 51, 153, 0.1);
                color: var(--teal-700);
                border: 1px solid rgba(0, 51, 153, 0.22);
            }

            .btn-duty--clear {
                background: rgba(19, 33, 43, 0.06);
                color: var(--ink-700);
                border: 1px solid rgba(19, 33, 43, 0.1);
                padding: 9px 10px;
            }

            .btn-duty--print {
                grid-column: 1 / -1;
                background: linear-gradient(145deg, rgba(12, 36, 67, 0.92), rgba(24, 64, 108, 0.92));
                color: #fff;
                border: 1px solid rgba(12, 36, 67, 0.35);
            }

            /* ── Operating Point Card ──────────────────────────── */
            .op-point-card {
                background: linear-gradient(150deg, rgba(0, 51, 153, 0.07), rgba(255, 255, 255, 0.97));
                border: 1px solid rgba(0, 51, 153, 0.22);
                border-radius: 16px;
                box-shadow: 0 8px 28px rgba(0, 51, 153, 0.09);
                padding: 14px 16px;
                display: grid;
                gap: 12px;
            }

            .crossmap-card {
                background: linear-gradient(160deg, rgba(13, 115, 119, 0.07), rgba(255, 255, 255, 0.97));
                border-color: rgba(13, 115, 119, 0.18);
            }

            .crossmap-content {
                display: grid;
                gap: 10px;
            }

            .crossmap-item {
                display: grid;
                gap: 6px;
                padding: 10px 12px;
                border-radius: 12px;
                background: rgba(255, 255, 255, 0.92);
                border: 1px solid rgba(19, 33, 43, 0.08);
            }

            .crossmap-item-head {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 8px;
            }

            .crossmap-source {
                font-size: 12px;
                font-weight: 800;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--teal-700);
            }

            .crossmap-level {
                font-size: 10px;
                padding: 3px 8px;
                border-radius: 999px;
                background: rgba(13, 115, 119, 0.09);
                color: var(--ink-700);
                border: 1px solid rgba(13, 115, 119, 0.15);
            }

            .crossmap-line {
                display: grid;
                gap: 2px;
            }

            .crossmap-label {
                font-size: 10px;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--ink-500);
            }

            .crossmap-value {
                font-size: 13px;
                color: var(--ink-900);
                word-break: break-word;
            }

            .op-point-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
            }

            .op-point-title {
                font-size: 10px;
                font-weight: 700;
                letter-spacing: 0.12em;
                text-transform: uppercase;
                color: var(--teal-700);
            }

            .op-status-badge {
                font-size: 10px;
                font-weight: 700;
                letter-spacing: 0.06em;
                text-transform: uppercase;
                padding: 2px 9px;
                border-radius: 999px;
                background: rgba(0, 51, 153, 0.1);
                color: var(--teal-700);
                border: 1px solid rgba(0, 51, 153, 0.2);
            }

            .op-status-badge.is-warning {
                background: rgba(240, 140, 0, 0.1);
                color: #955000;
                border-color: rgba(240, 140, 0, 0.3);
            }

            .op-metrics-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 7px;
            }

            /* last row: 2 items, center them */
            .op-metrics-grid .op-metric:nth-child(4),
            .op-metrics-grid .op-metric:nth-child(5) {
                grid-column: span 1;
            }

            .op-metric {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 2px;
                background: rgba(255, 255, 255, 0.9);
                border: 1px solid rgba(19, 33, 43, 0.07);
                border-radius: 12px;
                padding: 9px 6px 7px;
                text-align: center;
            }

            .op-metric--eff {
                background: linear-gradient(160deg, rgba(0, 51, 153, 0.09), rgba(255, 255, 255, 0.96));
                border-color: rgba(0, 51, 153, 0.16);
            }

            .op-metric-label {
                font-size: 9px;
                font-weight: 700;
                letter-spacing: 0.1em;
                text-transform: uppercase;
                color: var(--ink-500);
            }

            .op-metric-value {
                font-size: 17px;
                font-weight: 800;
                color: var(--ink-900);
                line-height: 1.15;
                font-variant-numeric: tabular-nums;
            }

            .op-metric--eff .op-metric-value {
                color: var(--teal-700);
                font-size: 19px;
            }

            .op-metric-unit {
                font-size: 9px;
                color: var(--ink-500);
                font-weight: 600;
            }

            /* ── Export button (sidebar) ───────────────────────── */
            .btn-export-data {
                display: block;
                width: 100%;
                padding: 9px 12px;
                border: 1px solid rgba(19, 33, 43, 0.12);
                border-radius: 12px;
                background: rgba(255, 255, 255, 0.88);
                color: var(--ink-700);
                font-size: 12px;
                font-weight: 700;
                cursor: pointer;
                text-align: center;
                font-family: inherit;
                transition: background 0.18s, border-color 0.18s;
            }

            .btn-export-data:hover {
                border-color: rgba(0, 51, 153, 0.3);
                background: rgba(0, 51, 153, 0.05);
            }

            /* Legacy alias – keeps old controls-wrapper usable if anything relies on it */
            .controls-wrapper {
                display: grid;
                grid-template-columns: minmax(320px, 420px) 1fr;
                gap: 18px;
                padding: 18px 28px 28px;
                align-items: start;
            }

            .selection-workspace {
                background: rgba(255, 255, 255, 0.96);
                border: 1px solid rgba(19, 33, 43, 0.08);
                border-radius: 20px;
                box-shadow: 0 18px 40px rgba(15, 35, 70, 0.08);
                padding: 18px;
                display: grid;
                gap: 12px;
                max-height: 320px;
                overflow: hidden;
            }

            .selection-workspace-head h3 {
                margin: 0;
                font-size: 18px;
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                color: var(--ink-900);
            }

            .selection-workspace-head p {
                margin: 6px 0 0;
                color: var(--ink-700);
                font-size: 13px;
            }

            .selection-workspace-filter {
                display: grid;
                gap: 6px;
            }

            .selection-workspace-filter label {
                font-size: 11px;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--ink-500);
            }

            .candidate-list {
                display: grid;
                gap: 8px;
                overflow: auto;
                padding-right: 4px;
            }

            .candidate-item {
                width: 100%;
                border: 1px solid rgba(19, 33, 43, 0.1);
                border-radius: 14px;
                background: rgba(255, 255, 255, 0.92);
                padding: 10px 12px;
                text-align: left;
                cursor: pointer;
                display: grid;
                gap: 4px;
                transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
            }

            .candidate-item:hover {
                border-color: rgba(0, 51, 153, 0.3);
                box-shadow: 0 8px 20px rgba(31, 49, 64, 0.1);
                transform: translateY(-1px);
            }

            .candidate-item.is-active {
                border-color: rgba(0, 51, 153, 0.45);
                background: linear-gradient(160deg, rgba(0, 51, 153, 0.12), rgba(255, 255, 255, 0.96));
            }

            .candidate-item.is-unreachable {
                opacity: 0.5;
                border-style: dashed;
                cursor: default;
            }

            .candidate-unreachable-note {
                font-style: italic;
                color: var(--ink-500);
            }

            .candidate-item-head {
                display: grid;
                grid-template-columns: auto 1fr auto;
                gap: 8px;
                align-items: center;
            }

            .candidate-rank {
                font-size: 11px;
                font-weight: 800;
                color: var(--teal-700);
                background: rgba(0, 51, 153, 0.12);
                border: 1px solid rgba(0, 51, 153, 0.2);
                border-radius: 999px;
                padding: 2px 7px;
            }

            .candidate-score {
                font-size: 12px;
                font-weight: 700;
                color: var(--teal-700);
            }

            .candidate-item-meta {
                font-size: 12px;
                color: var(--ink-700);
            }

            .analysis-panel,
            .chart-container {
                background: rgba(255, 255, 255, 0.96);
                border: 1px solid rgba(19, 33, 43, 0.08);
                border-radius: 20px;
                box-shadow: 0 18px 40px rgba(15, 35, 70, 0.08);
                width: 100%;
            }

            .analysis-panel {
                padding: 22px;
                display: none;
            }

            .chart-container {
                min-height: 780px;
                display: flex;
                flex-direction: column;
                padding: 0;
                overflow: hidden;
            }

            .chart-hint {
                padding: 8px 20px;
                font-size: 12px;
                color: var(--ink-500);
                border-bottom: 1px solid rgba(19, 33, 43, 0.06);
                background: rgba(244, 247, 250, 0.5);
                border-radius: 20px 20px 0 0;
                flex-shrink: 0;
            }

            #pumpChart {
                width: 100%;
                flex: 1;
                min-height: 740px;
                cursor: crosshair;
            }

            /* ── Print Report Shell ───────────────────────────────────────────────── */
            .print-report-shell {
                display: none;
            }

            .print-report-page {
                width: 100%;
                min-height: 100%;
                background: #fff;
                color: #1f2937;
                padding: 8mm;
                display: grid;
                grid-template-rows: auto auto 1fr auto auto;
                gap: 4mm;
                font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            }

            /* Header */
            .pr-header {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                gap: 4mm;
                padding-bottom: 3mm;
                border-bottom: 2.5px solid #1d3557;
            }
            .pr-kicker {
                margin: 0 0 1.5mm;
                font-size: 8pt;
                text-transform: uppercase;
                letter-spacing: 0.1em;
                color: #6b7280;
            }
            .pr-model-name {
                margin: 0 0 1mm;
                font-size: 17pt;
                font-weight: 700;
                color: #1d3557;
                line-height: 1.1;
            }
            .pr-series {
                margin: 0;
                font-size: 9pt;
                color: #4b5563;
            }
            .pr-curve-no {
                margin: 2px 0 0;
                font-size: 8.5pt;
                color: #6b7280;
                font-weight: 600;
                letter-spacing: 0.02em;
            }
            .pr-header-meta {
                text-align: right;
                flex-shrink: 0;
                display: flex;
                flex-direction: column;
                align-items: flex-end;
                gap: 2mm;
            }
            .pr-issued {
                margin: 0;
                font-size: 8pt;
                color: #6b7280;
            }
            .pr-iso-badge {
                display: inline-block;
                font-size: 9pt;
                font-weight: 700;
                color: #1d3557;
                border: 1.5px solid #1d3557;
                border-radius: 999px;
                padding: 1mm 3.5mm;
                white-space: nowrap;
            }

            /* Conditions strip */
            .pr-cond-strip {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 3mm 4mm;
                padding: 2.5mm 3.5mm;
                background: #f0f4f8;
                border-radius: 2mm;
                border: 1px solid rgba(29, 53, 87, 0.14);
            }
            .pr-cond-item {
                display: flex;
                flex-direction: column;
                gap: 1mm;
            }
            .pr-cond-lbl {
                font-size: 7pt;
                font-weight: 700;
                color: #6b7280;
                text-transform: uppercase;
                letter-spacing: 0.06em;
            }
            .pr-cond-val {
                font-size: 9.5pt;
                font-weight: 600;
                color: #111827;
            }

            /* Chart box */
            .pr-chart-box {
                border: 1px solid rgba(29, 53, 87, 0.18);
                border-radius: 2mm;
                overflow: hidden;
                background: #fff;
                display: flex;
                align-items: stretch;
                min-height: 110mm;
            }
            .pr-chart-box img {
                width: 100%;
                object-fit: contain;
                display: block;
            }

            /* Result strip */
            .pr-result-strip {
                display: grid;
                grid-template-columns: 1.6fr repeat(4, 1fr) 1fr 2fr;
                gap: 3mm;
                padding: 2mm 3.5mm;
                background: #f8fafc;
                border-radius: 2mm;
                border: 1px solid rgba(29, 53, 87, 0.1);
                align-items: start;
            }
            .pr-result-item {
                display: flex;
                flex-direction: column;
                gap: 0.8mm;
            }
            .pr-result-lbl {
                font-size: 7pt;
                font-weight: 700;
                color: #6b7280;
                text-transform: uppercase;
                letter-spacing: 0.06em;
            }
            .pr-result-val {
                font-size: 9pt;
                color: #111827;
                font-weight: 500;
            }
            .print-multiline {
                white-space: pre-line;
                line-height: 1.3;
                font-size: 7pt;
                color: #4b5563;
                font-weight: 400;
            }

            .pr-footer {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 4mm;
                border-top: 1px solid rgba(29, 53, 87, 0.22);
                padding-top: 2mm;
            }
            .pr-footer-info {
                display: flex;
                flex-direction: column;
                gap: 0.7mm;
                color: #374151;
            }
            .pr-footer-brand {
                margin: 0;
                font-size: 9pt;
                font-weight: 700;
                color: #1d3557;
            }
            .pr-footer-logo {
                width: 36mm;
                max-height: 9mm;
                object-fit: contain;
                object-position: left center;
                margin-bottom: 0.4mm;
            }
            .pr-footer-line {
                margin: 0;
                font-size: 7pt;
                line-height: 1.2;
            }
            .pr-footer-qr-wrap {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 1mm;
                flex-shrink: 0;
            }
            .pr-footer-qr {
                width: 22mm;
                height: 22mm;
                object-fit: contain;
                border: 1px solid rgba(29, 53, 87, 0.18);
                border-radius: 1.2mm;
                padding: 1.2mm;
                background: #fff;
            }
            .pr-footer-qr-caption {
                font-size: 6.5pt;
                color: #6b7280;
                text-align: center;
                line-height: 1.15;
            }

            @media print {
                @page {
                    /* Explicit mm dimensions are honoured more reliably than the
                       "A4" keyword by mobile Safari (iOS) and Android Chrome. */
                    size: 210mm 297mm;
                    margin: 10mm;
                }

                body.print-layer2-report {
                    background: #fff;
                }
                body.print-layer2-report .layer,
                body.print-layer2-report .unit-popup-backdrop,
                body.print-layer2-report #printDatasheetShell {
                    display: none !important;
                }
                body.print-layer2-report .print-report-shell {
                    display: block !important;
                }

                .print-report-page {
                    padding: 0;
                    min-height: 0;
                    /* 1mm safety margin (vs 297mm − 2×10mm = 277mm) absorbs sub-pixel
                       rounding on iOS Safari & Android Chrome which otherwise pushes
                       the footer onto a second blank page. */
                    height: 276mm;
                    max-height: 276mm;
                    display: grid;
                    grid-template-rows: auto auto 1fr auto auto;
                    gap: 2.5mm;
                    overflow: hidden;
                    box-sizing: border-box;
                }

                .pr-header {
                    padding-bottom: 2.5mm;
                }

                .pr-cond-strip {
                    gap: 2mm;
                    padding: 2mm 3mm;
                    page-break-inside: avoid;
                    break-inside: avoid;
                }

                .pr-chart-box {
                    min-height: 0;
                    page-break-inside: avoid;
                    break-inside: avoid;
                }

                .pr-result-strip {
                    gap: 2mm;
                    padding: 1.8mm 3mm;
                    page-break-inside: avoid;
                    break-inside: avoid;
                }

                .pr-footer {
                    padding-top: 1.8mm;
                    page-break-inside: avoid;
                    break-inside: avoid;
                }

                .pr-footer-logo {
                    width: 34mm;
                    max-height: 8mm;
                }

                .pr-footer-qr {
                    width: 20mm;
                    height: 20mm;
                }

                /* ── Datasheet print mode ──────────────────── */
                body.print-datasheet {
                    background: #fff;
                    font-size: 0;  /* collapse whitespace text nodes outside print pages */
                    /* Force backgrounds/colours to render on iOS & Android print-to-PDF */
                    -webkit-print-color-adjust: exact;
                    print-color-adjust: exact;
                    color-adjust: exact;
                }
                body.print-datasheet .layer,
                body.print-datasheet .unit-popup-backdrop,
                body.print-datasheet #printReportShell {
                    display: none !important;
                }
                body.print-datasheet #printDatasheetShell {
                    display: block !important;
                }

                /* Belt-and-suspenders: if BOTH print classes are accidentally on
                   <body> at the same time (e.g. iOS Safari skipped 'afterprint'
                   from a previous print, leaving the legacy class lingering),
                   datasheet wins — never render two print shells in one job. */
                body.print-datasheet.print-layer2-report .print-report-shell,
                body.print-datasheet.print-layer2-report #printReportShell {
                    display: none !important;
                }

                .print-ds-page {
                    position: relative;
                    display: flex;
                    flex-direction: column;
                    width: 100%;
                    /* 1mm safety margin: 297mm − 2×10mm @page = 277mm; we use 276mm to
                       absorb sub-pixel rounding on mobile browsers and avoid the
                       footer being pushed to a phantom next page. */
                    height: 276mm;
                    max-height: 276mm;
                    padding: 0;
                    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
                    color: #1f2937;
                    box-sizing: border-box;
                    overflow: hidden;  /* prevent content overflow → no extra blank pages */
                }
                .ds-page-break {
                    page-break-after: always;
                    break-after: page;
                }
                .print-ds-page[hidden] {
                    display: none !important;
                    page-break-after: avoid;
                    break-after: avoid;
                }
                .ds-page-body {
                    flex: 1 1 0;
                    display: flex;
                    flex-direction: column;
                    min-height: 0;  /* flex overflow containment */
                    overflow: hidden;
                    /* Footer is now a flex item (not absolutely positioned),
                       so we no longer need to reserve bottom padding here. */
                }
                /* Prevent Chrome print from pushing sections to next page
                   within the overflow:hidden body — let content clip instead */
                .ds-page-body .ds-print-section,
                .ds-page-body .ds-print-row-2col {
                    page-break-inside: auto;
                    break-inside: auto;
                    page-break-before: auto;
                    break-before: auto;
                }
                .ds-page-body--img {
                    flex: 1 1 auto;
                    display: flex;
                    flex-direction: column;
                    min-height: 0;
                    overflow: hidden;
                }
                .ds-page-footer {
                    /* In-flow flex item at the bottom of the page (was absolute).
                       This eliminates rounding-induced overflows that pushed the
                       footer to a new page on iOS Safari & Android Chrome. */
                    flex: 0 0 auto;
                    margin-top: auto;
                    padding-top: 2mm;
                    border-top: 1px solid rgba(29, 53, 87, 0.22);
                    page-break-inside: avoid;
                    break-inside: avoid;
                }
                .ds-page-number {
                    flex: 0 0 auto;
                    text-align: center;
                    font-size: 7pt;
                    color: #9ca3af;
                    padding: 1mm 0 0 0;
                    page-break-inside: avoid;
                    break-inside: avoid;
                }

                .pr-header--compact {
                    padding: 2mm 0 1.5mm;
                    margin-bottom: 2mm;
                }
                .pr-header--compact .pr-model-name {
                    font-size: 12pt;
                }
                .ds-model-echo {
                    /* filled by JS — echoes model name on pages 2 & 3 */
                    display: block;
                }

                .ds-print-section {
                    margin-bottom: 2mm;
                    page-break-inside: avoid;
                    break-inside: avoid;
                }

                /* ── 2-column layout for Technical Data ── */
                .ds-techdata-2col {
                    display: flex;
                    gap: 4mm;
                    align-items: flex-start;
                }
                .ds-techdata-2col > .ds-print-table {
                    flex: 1 1 0;
                    min-width: 0;
                    font-size: 8pt;
                }
                .ds-techdata-2col .ds-print-lbl {
                    width: 28mm;
                }

                /* ── 2-column row: LEFT (Op Cond + Conn/Dim) · RIGHT (Motor + IE Eff) ── */
                .ds-print-row-2col {
                    display: flex;
                    gap: 4mm;
                    align-items: flex-start;
                    margin-bottom: 0;
                    page-break-inside: avoid;
                    break-inside: avoid;
                }
                .ds-print-row-2col > .ds-print-col {
                    flex: 1 1 0;
                    min-width: 0;
                    margin-bottom: 0;  /* parent handles spacing */
                }
                .ds-print-row-2col .ds-print-table {
                    font-size: 7.5pt;
                }
                .ds-print-row-2col .ds-print-lbl {
                    width: 28mm;
                }
                .ds-print-row-2col .ds-print-title {
                    font-size: 8pt;
                }
                .ds-print-row-2col .ds-motor-note {
                    font-size: 6.5pt;
                }
                .ds-print-title {
                    font-size: 9pt;
                    font-weight: 700;
                    color: var(--ral-3000);
                    text-transform: uppercase;
                    letter-spacing: 0.08em;
                    margin: 0 0 1.5mm;
                    padding-bottom: 1mm;
                    border-bottom: 1.5px solid var(--ral-3000);
                }
                .ds-print-table {
                    width: 100%;
                    border-collapse: collapse;
                    font-size: 8.5pt;
                    margin-bottom: 1mm;
                }
                .ds-print-table th {
                    background: #13212b;
                    color: #fff;
                    font-size: 7.5pt;
                    font-weight: 700;
                    letter-spacing: 0.06em;
                    text-transform: uppercase;
                    padding: 1.5mm 2.5mm;
                    text-align: left;
                }
                .ds-print-table td {
                    padding: 1.2mm 2.5mm;
                    border-bottom: 0.5px solid #d1d5db;
                }
                .ds-print-table tbody tr:nth-child(even) {
                    background: #f8f9fa;
                }
                .ds-print-lbl {
                    font-weight: 600;
                    color: #4b5563;
                    width: 35mm;
                    white-space: nowrap;
                }
                .ds-print-chart-section {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    min-height: 0;
                    overflow: hidden;
                }
                .ds-print-chart-box {
                    flex: 1;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    text-align: center;
                    border: 0.5px solid #d1d5db;
                    padding: 2mm;
                    min-height: 0;  /* flex overflow containment */
                    overflow: hidden;
                }
                .ds-print-chart-box img {
                    width: 100%;
                    height: 100%;
                    max-height: 100%;
                    object-fit: contain;
                }
                /* ─── Product image gallery (print) ─── */
                .ds-print-img-gallery {
                    display: flex;
                    gap: 5mm;
                    margin-top: 2mm;
                }
                .ds-print-img-item {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 1.5mm;
                }
                .ds-print-img-item img {
                    max-width: 100%;
                    max-height: 80mm;
                    object-fit: contain;
                    border: 0.5px solid #d1d5db;
                    padding: 1.5mm;
                    background: #f9f9f9;
                }
                .ds-print-img-caption {
                    font-size: 8pt;
                    color: #6b7280;
                    text-align: center;
                    font-style: italic;
                }
                .ds-print-features {
                    list-style: none;
                    padding: 0;
                    margin: 1mm 0 0;
                    font-size: 8.5pt;
                    color: #4b5563;
                }
                .ds-print-features li {
                    padding: 0.8mm 0 0.8mm 4mm;
                    position: relative;
                }
                .ds-print-features li::before {
                    content: '\2022';
                    position: absolute;
                    left: 0;
                    color: var(--ral-3000);
                    font-weight: 700;
                }

                /* ── Category badge ── */
                .pr-category-badge {
                    display: inline-block;
                    font-size: 7pt;
                    font-weight: 700;
                    letter-spacing: 0.1em;
                    text-transform: uppercase;
                    padding: 1mm 3mm;
                    border-radius: 3px;
                    margin-bottom: 1mm;
                    color: #fff;
                    background: #4b5563;
                }
                .pr-cat-split_casing   { background: #1e40af; }
                .pr-cat-long_coupling  { background: #065f46; }
                .pr-cat-monobloc       { background: #7c2d12; }
                .pr-cat-borehole       { background: #1e3a5f; }
                .pr-cat-sewage         { background: #581c87; }

                /* ── Dimension table ── */
                .ds-dim-drawing-section {
                    flex: 0 1 auto;
                }
                .ds-dim-img-box {
                    max-height: 135mm;
                    text-align: center;
                }
                .ds-dim-img-box img {
                    max-height: 130mm;
                }
                .ds-dim-img-box svg {
                    max-height: 130mm;
                    width: auto;
                    max-width: 100%;
                }
                .ds-dim-blank-note {
                    text-align: center;
                    color: #999;
                    font-style: italic;
                    font-size: 10pt;
                    margin-top: 50mm;
                }
                /* Horizontal dim table (print) */
                #dsDimTableSection .ds-print-table {
                    table-layout: auto;
                }
                #dsDimTableSection .ds-print-table th.ds-dim-col-hdr {
                    text-align: center;
                    padding: 0.8mm 1.5mm;
                    font-size: 7pt;
                    white-space: nowrap;
                }
                #dsDimTableSection .ds-print-table td {
                    text-align: center;
                    padding: 0.8mm 1.5mm;
                    white-space: nowrap;
                    font-variant-numeric: tabular-nums;
                    font-size: 7.5pt;
                }
                .ds-dim-key {
                    display: inline-block;
                    min-width: 4mm;
                    text-align: center;
                    font-weight: 700;
                    font-size: 7pt;
                    color: #13212b;
                    background: rgba(19,33,43,0.07);
                    border-radius: 1.5px;
                    padding: 0.3mm 1mm;
                    margin-right: 1.5mm;
                }
                .ds-dim-note {
                    font-size: 7pt;
                    color: #6b7280;
                    font-style: italic;
                    margin-top: 1mm;
                }
                .ds-dim-ref-note {
                    font-size: 7.5pt;
                    color: #b45309;
                    font-style: italic;
                    font-weight: 600;
                    margin: 1.5mm 0 0 0;
                    padding: 1mm 2mm;
                    background: #fffbeb;
                    border-left: 2px solid #f59e0b;
                    border-radius: 2px;
                    line-height: 1.35;
                }

                /* ── Motor note ── */
                .ds-motor-note {
                    font-size: 7.5pt;
                    color: #6b7280;
                    font-style: italic;
                    margin-top: 1mm;
                    padding-top: 1mm;
                    border-top: 0.5px solid #e5e7eb;
                }

                /* ── Motor Efficiency Comparison table (IE1–IE4) ── */
                .ds-print-eff-table {
                    font-size: 7.5pt;
                }
                .ds-print-eff-table th {
                    text-align: center;
                    font-size: 7pt;
                    padding: 1.2mm 2mm;
                }
                .ds-print-eff-table td {
                    text-align: center;
                    font-variant-numeric: tabular-nums;
                }
                .ds-print-eff-table td.ds-eff-active {
                    font-weight: 700;
                    color: var(--ral-3000);
                    background: #fef3f2;
                }
                .ds-print-eff-table td:first-child,
                .ds-print-eff-table th:first-child {
                    text-align: left;
                    font-weight: 600;
                }
            }

            /* ── Datasheet toolbar (screen) ────────────────── */
            .ds-toolbar {
                margin-bottom: 12px;
                display: flex;
                align-items: center;
                justify-content: flex-end;
                gap: 14px;
            }
            .ds-toolbar-toggle {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                font-size: 12px;
                font-weight: 600;
                color: var(--ink-700);
                cursor: pointer;
                user-select: none;
            }
            .ds-toolbar-toggle input[type="checkbox"] {
                width: 15px;
                height: 15px;
                accent-color: var(--ral-3000);
                cursor: pointer;
            }
            .ds-print-btn {
                font-size: 12px !important;
            }

            /* ── Nav icon cards (landing left column) ───────────────── */
            .nav-icon-card {
                display: flex;
                align-items: center;
                gap: clamp(10px, calc(14px * var(--nav-scale)), 18px);
                padding: clamp(12px, calc(16px * var(--nav-scale)), 20px) clamp(12px, calc(18px * var(--nav-scale)), 22px);
                border-radius: 24px;
                background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
                border: 1px solid rgba(255,255,255,0.75);
                box-shadow: var(--shadow-card);
                cursor: pointer;
                text-align: left;
                width: 100%;
                min-height: var(--nav-card-h);
                height: var(--nav-card-h);
                transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
            }
            .nav-icon-card:hover {
                transform: translateY(-2px);
                border-color: rgba(167, 41, 32,0.3);
                box-shadow: 0 18px 36px rgba(31,49,64,0.12);
            }
            .nav-icon-wrap {
                flex: 0 0 clamp(36px, calc(42px * var(--nav-scale)), 52px);
                width: clamp(36px, calc(42px * var(--nav-scale)), 52px);
                height: clamp(36px, calc(42px * var(--nav-scale)), 52px);
                border-radius: clamp(12px, calc(14px * var(--nav-scale)), 16px);
                background: linear-gradient(145deg, rgba(167, 41, 32,0.14), rgba(167, 41, 32,0.04));
                border: 1px solid rgba(167, 41, 32,0.14);
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--teal-700);
            }
            .nav-icon-svg {
                width: clamp(22px, calc(28px * var(--nav-scale)), 32px);
                height: clamp(22px, calc(28px * var(--nav-scale)), 32px);
            }
            .nav-icon-body {
                flex: 1;
                display: flex;
                flex-direction: column;
                gap: clamp(4px, calc(6px * var(--nav-scale)), 8px);
            }
            .nav-icon-title {
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                font-size: clamp(13px, calc(15px * var(--nav-scale)), 18px);
                color: var(--ink-900);
                line-height: 1.2;
            }
            .nav-icon-desc {
                font-size: 13px;
                color: var(--ink-700);
                line-height: 1.4;
            }
            .nav-icon-arrow {
                font-size: clamp(18px, calc(26px * var(--nav-scale)), 30px);
                font-weight: 300;
                color: var(--teal-700);
            }

            /* ── Sub-layers (layer3 / layer4) ───────────────────────── */
            .sub-layer {
                flex-direction: column !important;
                height: var(--landing-h, 100vh);
                background: var(--stone-050);
                overflow-y: auto;
                overflow-x: hidden;
            }
            .btn-back {
                padding: 10px 18px;
                border-radius: 14px;
                background: rgba(167, 41, 32,0.1);
                border: 1px solid rgba(167, 41, 32,0.18);
                color: var(--teal-700);
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                font-size: 14px;
                cursor: pointer;
                white-space: nowrap;
                transition: background 0.15s ease;
            }
            .btn-back:hover {
                background: rgba(167, 41, 32,0.18);
            }
            .sub-header {
                display: flex;
                align-items: center;
                gap: 14px;
                padding: 12px 22px;
                background: rgba(255,255,255,0.92);
                border-bottom: 1px solid rgba(19,33,43,0.08);
                flex-wrap: wrap;
                position: sticky;
                top: 0;
                z-index: 10;
            }
            .mkd-logo-svg-small {
                width: 36px;
                height: 36px;
                flex-shrink: 0;
            }
            .sub-header-titles {
                flex: 1;
            }
            .sub-header-titles h1 {
                margin: 3px 0 0;
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                font-size: 20px;
                color: var(--ink-900);
            }
            .sub-header-filters {
                display: flex;
                gap: 12px;
                flex-wrap: wrap;
            }

            .cat-filters {
                align-items: center;
            }

            .cat-view-toggle {
                display: inline-flex;
                border: 1px solid rgba(19, 33, 43, 0.16);
                border-radius: 999px;
                overflow: hidden;
                background: rgba(255, 255, 255, 0.88);
            }

            .cat-view-btn {
                border: 0;
                background: transparent;
                color: var(--ink-700);
                font-size: 12px;
                font-weight: 800;
                letter-spacing: 0.04em;
                text-transform: uppercase;
                padding: 9px 12px;
                cursor: pointer;
            }

            .cat-view-btn.is-active {
                background: linear-gradient(140deg, rgba(167, 41, 32, 0.2), rgba(167, 41, 32, 0.08));
                color: var(--teal-700);
            }

            .cat-search-wrap {
                display: grid;
                grid-template-columns: 1fr auto;
                align-items: center;
                min-width: 280px;
                border-radius: 999px;
                border: 1px solid rgba(19, 33, 43, 0.16);
                background: rgba(255, 255, 255, 0.92);
                overflow: hidden;
            }

            .cat-search-wrap input {
                border: 0;
                outline: none;
                font-size: 13px;
                font-weight: 600;
                color: var(--ink-800);
                background: transparent;
                padding: 10px 14px;
            }

            .cat-search-wrap input::placeholder {
                color: var(--ink-500);
            }

            .cat-search-wrap button {
                border: 0;
                border-left: 1px solid rgba(19, 33, 43, 0.12);
                background: rgba(19, 33, 43, 0.05);
                color: var(--ink-700);
                font-size: 13px;
                font-weight: 800;
                padding: 9px 12px;
                cursor: pointer;
            }

            .catalogue-alpha-wrap {
                position: sticky;
                top: 64px;
                z-index: 9;
                display: grid;
                gap: 10px;
                padding: 12px 22px;
                background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(248, 250, 252, 0.94));
                border-bottom: 1px solid rgba(19, 33, 43, 0.08);
            }

            .catalogue-shell {
                display: grid;
                grid-template-columns: 56px minmax(0, 1fr);
                align-items: start;
                gap: 0;
            }

            .catalogue-alpha-rail {
                position: sticky;
                top: 136px;
                align-self: start;
                display: grid;
                gap: 6px;
                padding: 18px 8px 18px 14px;
                max-height: calc(100vh - 180px);
                overflow-y: auto;
            }

            .cat-alpha-rail-btn {
                width: 32px;
                height: 32px;
                border-radius: 10px;
                border: 1px solid rgba(19, 33, 43, 0.14);
                background: rgba(255, 255, 255, 0.88);
                color: var(--ink-700);
                font-size: 11px;
                font-weight: 800;
                text-transform: uppercase;
                cursor: pointer;
                padding: 0;
            }

            .cat-alpha-rail-btn.is-active {
                border-color: rgba(167, 41, 32, 0.42);
                background: linear-gradient(140deg, rgba(167, 41, 32, 0.2), rgba(167, 41, 32, 0.08));
                color: var(--teal-700);
            }

            .catalogue-summary {
                font-size: 13px;
                font-weight: 700;
                color: var(--ink-700);
            }

            .catalogue-alpha-bar {
                display: flex;
                flex-wrap: wrap;
                gap: 6px;
            }

            .cat-alpha-btn {
                border: 1px solid rgba(19, 33, 43, 0.14);
                background: rgba(255, 255, 255, 0.88);
                color: var(--ink-700);
                border-radius: 999px;
                min-width: 34px;
                padding: 6px 10px;
                font-size: 11px;
                font-weight: 800;
                letter-spacing: 0.05em;
                text-transform: uppercase;
                cursor: pointer;
                transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
            }

            .cat-alpha-btn:hover {
                transform: translateY(-1px);
                border-color: rgba(167, 41, 32, 0.35);
            }

            .cat-alpha-btn.is-active {
                background: linear-gradient(140deg, rgba(167, 41, 32, 0.2), rgba(167, 41, 32, 0.08));
                border-color: rgba(167, 41, 32, 0.42);
                color: var(--teal-700);
            }
            .sub-layout {
                display: grid;
                grid-template-columns: 340px 1fr;
                gap: 18px;
                padding: 18px 22px;
                align-items: start;
            }
            .chart-setting-item {
                display: flex;
                align-items: center;
                gap: 8px;
                font-size: 12px;
                font-weight: 700;
                color: var(--ink-700);
                user-select: none;
            }
            .chart-setting-item input[type='checkbox'] {
                accent-color: var(--ral-3000);
                width: 14px;
                height: 14px;
                margin: 0;
                cursor: pointer;
            }

            .chart-popup {
                width: min(420px, 100%);
                max-height: calc(100vh - 40px);
                overflow-y: auto;
                overflow-x: hidden;
            }

            .chart-popup .chart-settings-list {
                gap: 10px;
            }

            .chart-popup .chart-setting-item {
                padding: 8px 10px;
                border: 1px solid rgba(19, 33, 43, 0.09);
                border-radius: 10px;
                background: rgba(255, 255, 255, 0.85);
            }

            .chart-popup-tabs {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 8px;
                margin-bottom: 10px;
            }

            .chart-tab-btn {
                border: 1px solid rgba(19, 33, 43, 0.15);
                background: rgba(255, 255, 255, 0.86);
                border-radius: 10px;
                height: 36px;
                font-size: 12px;
                font-weight: 800;
                letter-spacing: 0.06em;
                text-transform: uppercase;
                color: var(--ink-700);
                cursor: pointer;
            }

            .chart-tab-btn.is-active {
                border-color: rgba(167, 41, 32, 0.28);
                background: linear-gradient(145deg, rgba(167, 41, 32, 0.12), rgba(167, 41, 32, 0.04));
                color: var(--teal-700);
            }

            .chart-tab-panel {
                display: grid;
                gap: 12px;
                max-height: min(60vh, 560px);
                overflow-y: auto;
                overflow-x: hidden;
                padding-right: 4px;
            }

            .chart-tab-panel[hidden] {
                display: none !important;
            }

            .chart-tab-panel::-webkit-scrollbar,
            .chart-popup::-webkit-scrollbar {
                width: 8px;
            }

            .chart-tab-panel::-webkit-scrollbar-thumb,
            .chart-popup::-webkit-scrollbar-thumb {
                background: rgba(19, 33, 43, 0.26);
                border-radius: 8px;
            }

            .chart-advanced-block {
                display: grid;
                gap: 8px;
                border: 1px solid rgba(19, 33, 43, 0.09);
                border-radius: 12px;
                background: rgba(255, 255, 255, 0.82);
                padding: 10px;
            }

            .chart-advanced-label {
                display: flex;
                justify-content: space-between;
                align-items: center;
                font-size: 12px;
                font-weight: 700;
                color: var(--ink-700);
            }

            .chart-axis-grid {
                display: grid;
                grid-template-columns: 1fr 1fr 1fr;
                gap: 8px;
            }

            .chart-axis-grid label {
                display: grid;
                gap: 4px;
                font-size: 11px;
                color: var(--ink-500);
                font-weight: 700;
            }

            .chart-axis-grid input,
            #csLineWidthScale {
                width: 100%;
            }

            .chart-axis-grid input {
                height: 34px;
                border: 1px solid rgba(19, 33, 43, 0.16);
                border-radius: 8px;
                padding: 6px 8px;
                font-size: 12px;
                font-weight: 700;
                color: var(--ink-800);
                background: rgba(255, 255, 255, 0.96);
            }

            .chart-popup-actions {
                display: flex;
                gap: 8px;
                justify-content: flex-end;
            }

            .chart-popup-btn {
                border: none;
                border-radius: 9px;
                padding: 8px 12px;
                background: var(--teal-700);
                color: #fff;
                font-size: 12px;
                font-weight: 800;
                cursor: pointer;
            }

            .chart-popup-btn.is-ghost {
                background: rgba(19, 33, 43, 0.08);
                color: var(--ink-700);
                border: 1px solid rgba(19, 33, 43, 0.14);
            }
            .sub-form-panel {
                background: rgba(255,255,255,0.92);
                border: 1px solid rgba(255,255,255,0.75);
                border-radius: 20px;
                padding: 18px;
                display: flex;
                flex-direction: column;
                gap: 12px;
                box-shadow: var(--shadow-card);
                position: sticky;
                top: 60px;
            }
            .sub-form-grid {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 14px;
            }
            .sub-result-title {
                margin: 0;
                font-size: 14px;
                color: var(--ink-700);
            }
            .sub-results {
                display: grid;
                gap: 12px;
            }

            /* ── Catalogue grid (layer4) ─────────────────────────────── */
            .catalogue-grid {
                display: grid;
                grid-template-columns: 1fr;
                gap: 16px;
                padding: 18px 22px 18px 10px;
                align-content: start;
            }

            .cat-group-section {
                display: grid;
                gap: 12px;
                padding: 14px;
                border-radius: 20px;
                border: 1px solid rgba(19, 33, 43, 0.08);
                background: rgba(255, 255, 255, 0.82);
            }

            .cat-group-head {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 12px;
                position: sticky;
                top: 138px;
                z-index: 3;
                background: rgba(255, 255, 255, 0.96);
                border-radius: 12px;
                padding: 8px 10px;
                border: 1px solid rgba(19, 33, 43, 0.08);
            }

            .cat-group-title {
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                font-size: 18px;
                color: var(--ink-900);
                letter-spacing: 0.06em;
                text-transform: uppercase;
            }

            .cat-group-count {
                padding: 5px 10px;
                border-radius: 999px;
                font-size: 11px;
                font-weight: 800;
                color: var(--teal-700);
                border: 1px solid rgba(167, 41, 32, 0.22);
                background: rgba(167, 41, 32, 0.08);
            }

            .cat-group-grid {
                display: grid;
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
                gap: 12px;
            }
            .cat-card {
                display: flex;
                flex-direction: column;
                gap: 10px;
                padding: 20px;
                border-radius: 22px;
                background: rgba(255,255,255,0.92);
                border: 1px solid rgba(19,33,43,0.08);
                box-shadow: var(--shadow-card);
                cursor: pointer;
                text-align: left;
                transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            }

            .catalogue-grid.is-list-view .cat-group-grid {
                grid-template-columns: 1fr;
            }

            .cat-table-wrap {
                width: 100%;
                overflow: auto;
                border: 1px solid rgba(19, 33, 43, 0.1);
                border-radius: 14px;
                background: rgba(255, 255, 255, 0.94);
            }

            .cat-table {
                width: 100%;
                min-width: 1080px;
                border-collapse: collapse;
            }

            .cat-table thead th {
                position: sticky;
                top: 0;
                z-index: 2;
                text-align: left;
                font-size: 11px;
                font-weight: 800;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--ink-600);
                background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
                border-bottom: 1px solid rgba(19, 33, 43, 0.12);
                padding: 11px 12px;
                white-space: nowrap;
            }

            .cat-table tbody td {
                padding: 11px 12px;
                border-bottom: 1px solid rgba(19, 33, 43, 0.08);
                font-size: 13px;
                color: var(--ink-800);
                white-space: nowrap;
            }

            .cat-table tbody tr:last-child td {
                border-bottom: 0;
            }

            .cat-col-model strong {
                font-size: 14px;
                color: var(--ink-900);
                font-weight: 800;
            }

            .cat-row {
                cursor: pointer;
                transition: background 0.15s ease;
            }

            .cat-row:hover,
            .cat-row:focus-visible {
                outline: none;
                background: linear-gradient(140deg, rgba(167, 41, 32, 0.1), rgba(167, 41, 32, 0.04));
            }
            .cat-card:hover {
                transform: translateY(-3px);
                border-color: rgba(167, 41, 32,0.28);
                box-shadow: 0 14px 26px rgba(31,49,64,0.1);
            }
            .cat-card-name {
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                font-size: 20px;
                color: var(--ink-900);
            }
            .cat-card-sub {
                font-size: 13px;
                color: var(--ink-700);
            }
            .cat-card-metrics {
                display: grid;
                grid-template-columns: repeat(4, 1fr);
                gap: 8px;
                margin-top: 4px;
            }
            .cat-metric {
                padding: 10px;
                border-radius: 14px;
                background: rgba(167, 41, 32,0.06);
                border: 1px solid rgba(167, 41, 32,0.1);
            }
            .cat-metric span {
                display: block;
                font-size: 11px;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.08em;
                color: var(--ink-500);
            }
            .cat-metric strong {
                display: block;
                margin-top: 4px;
                font-size: 15px;
                color: var(--ink-900);
            }

            /* ──────────────────────────────────────────────────────────────────────────── */
            /* Hydraulics Panel — SPump-style form                           */
            /* ──────────────────────────────────────────────────────────────────────────── */
            .hyd-form-panel {
                padding: 0;
                gap: 0;
            }

            .hyd-form-section {
                display: grid;
                gap: 10px;
                padding: 14px 18px;
                border-bottom: 1px solid rgba(19, 33, 43, 0.07);
            }

            .hyd-form-section.hyd-form-actions {
                gap: 8px;
            }

            .hyd-form-section-title {
                font-size: 10px;
                font-weight: 800;
                letter-spacing: 0.14em;
                text-transform: uppercase;
                color: var(--teal-700);
                opacity: 0.8;
            }

            .hyd-input-row {
                display: grid;
                grid-template-columns: 46px 1fr;
                gap: 8px;
                align-items: center;
            }

            .hyd-input-label {
                font-size: 12px;
                font-weight: 800;
                color: var(--ink-700);
            }

            .hyd-filter-row {
                display: grid;
                grid-template-columns: 46px 1fr;
                gap: 8px;
                align-items: center;
            }

            .hyd-filter-label {
                font-size: 12px;
                font-weight: 700;
                color: var(--ink-700);
            }

            .hyd-input-with-unit {
                display: grid;
                grid-template-columns: 1fr auto;
                gap: 6px;
                align-items: center;
            }

            .hyd-duty-input {
                width: 100%;
                border: 1.5px solid var(--border-strong);
                border-radius: 12px;
                padding: 9px 12px;
                background: rgba(255, 255, 255, 0.96);
                color: var(--ink-900);
                font-size: 15px;
                font-weight: 600;
                transition: border-color 0.2s ease, box-shadow 0.2s ease;
            }

            .hyd-duty-input:focus {
                outline: none;
                border-color: rgb(var(--ral-3000-rgb) / 0.55);
                box-shadow: 0 0 0 3px rgb(var(--ral-3000-rgb) / 0.12);
            }

            .hyd-unit-select {
                border: 1.5px solid var(--border-strong);
                border-radius: 10px;
                padding: 7px 8px;
                background: rgba(255, 255, 255, 0.9);
                color: var(--teal-700);
                font-size: 12px;
                font-weight: 700;
                cursor: pointer;
            }

            .hyd-unit-select:focus { outline: none; border-color: rgb(var(--ral-3000-rgb) / 0.5); }

            /* Drive toggle */
            .hyd-drive-toggle {
                display: flex;
                gap: 6px;
            }

            .hyd-drive-btn {
                display: inline-flex;
                align-items: center;
                gap: 5px;
                padding: 7px 12px;
                border-radius: 10px;
                border: 1.5px solid rgba(19, 33, 43, 0.12);
                background: rgba(255, 255, 255, 0.88);
                color: var(--ink-700);
                font-size: 12px;
                font-weight: 700;
                cursor: pointer;
                transition: all 0.15s ease;
            }

            .hyd-drive-btn:hover { border-color: rgb(var(--ral-3000-rgb) / 0.3); color: var(--teal-700); }

            .hyd-drive-btn.is-active {
                border-color: rgb(var(--ral-3000-rgb) / 0.45);
                background: linear-gradient(135deg, rgb(var(--ral-3000-rgb) / 0.12), rgba(255, 255, 255, 0.96));
                color: var(--teal-700);
            }

            /* Pole chips */
            .hyd-poles-group {
                display: flex;
                flex-wrap: wrap;
                gap: 6px;
            }

            .hyd-pole-chip { display: inline-flex; cursor: pointer; }
            .hyd-pole-chip input { display: none; }

            .hyd-pole-chip span {
                padding: 5px 11px;
                border-radius: 999px;
                border: 1.5px solid rgba(19, 33, 43, 0.14);
                background: rgba(255, 255, 255, 0.88);
                color: var(--ink-700);
                font-size: 12px;
                font-weight: 700;
                letter-spacing: 0.03em;
                transition: all 0.15s ease;
                user-select: none;
            }

            .hyd-pole-chip input:checked + span {
                border-color: rgb(var(--ral-3000-rgb) / 0.45);
                background: linear-gradient(135deg, rgb(var(--ral-3000-rgb) / 0.1), rgba(255, 255, 255, 0.96));
                color: var(--teal-700);
            }

            .hyd-pole-chip:hover span { border-color: rgb(var(--ral-3000-rgb) / 0.3); }

            /* NFPA 20 section */
            .hyd-nfpa-section {
                padding: 0;
                gap: 0;
                border-bottom: none;
                background: rgb(var(--ral-3000-rgb) / 0.03);
                border-top: 1px solid rgba(19, 33, 43, 0.07);
            }

            .hyd-nfpa-toggle {
                display: flex;
                align-items: center;
                gap: 8px;
                width: 100%;
                padding: 12px 18px;
                border: none;
                background: none;
                cursor: pointer;
                font-size: 13px;
                font-weight: 700;
                color: var(--teal-700);
                text-align: left;
            }

            .hyd-nfpa-toggle:hover { background: rgb(var(--ral-3000-rgb) / 0.05); }

            .hyd-toggle-chevron {
                margin-left: auto;
                transition: transform 0.2s ease;
                color: var(--ink-500);
                flex-shrink: 0;
            }

            .hyd-nfpa-toggle.is-open .hyd-toggle-chevron { transform: rotate(180deg); }

            .hyd-nfpa-panel {
                display: grid;
                gap: 10px;
                padding: 0 18px 14px;
                border-top: 1px solid rgb(var(--ral-3000-rgb) / 0.1);
            }

            .hyd-nfpa-panel[hidden] { display: none; }

            .hyd-nfpa-desc {
                margin: 8px 0 4px;
                font-size: 12px;
                color: var(--ink-700);
                line-height: 1.6;
            }

            .hyd-sync-btn {
                padding: 8px 10px;
                border-radius: 10px;
                border: 1.5px solid rgb(var(--ral-3000-rgb) / 0.25);
                background: rgb(var(--ral-3000-rgb) / 0.07);
                color: var(--teal-700);
                font-size: 11px;
                font-weight: 800;
                cursor: pointer;
                white-space: nowrap;
                transition: background 0.15s ease;
            }

            .hyd-sync-btn:hover { background: rgb(var(--ral-3000-rgb) / 0.16); }

            .hyd-form-actions {
                border-bottom: none;
            }

            /* NFPA result badges on cards */
            .nfpa-badge {
                display: flex;
                flex-direction: column;
                gap: 3px;
                padding: 10px 14px;
                border-radius: 12px;
                font-size: 13px;
                font-weight: 700;
            }

            .nfpa-badge span {
                font-size: 11px;
                font-weight: 500;
                opacity: 0.85;
            }

            .nfpa-pass {
                background: rgba(22, 163, 74, 0.1);
                border: 1px solid rgba(22, 163, 74, 0.28);
                color: #15803d;
            }

            .nfpa-fail {
                background: rgba(192, 54, 47, 0.1);
                border: 1px solid rgba(192, 54, 47, 0.28);
                color: var(--rust-600);
            }

            @media (max-width: 1240px) {
                .landing-grid {
                    grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr);
                }

                .network-card {
                    grid-column: 1 / -1;
                }
            }

            @media (max-width: 960px) {
                .selector-landing {
                    padding: 18px;
                }

                .landing-topbar,
                .support-banner,
                .header-dash {
                    flex-direction: column;
                    align-items: flex-start;
                }

                .selector-footer {
                    align-items: center;
                    justify-content: center;
                }

                .landing-topbar {
                    grid-template-columns: 1fr;
                    justify-items: center;
                    text-align: center;
                }

                .landing-topbar-actions {
                    justify-content: center;
                }

                .sub-layout {
                    grid-template-columns: 1fr;
                }

                .layer2-body {
                    grid-template-columns: 1fr;
                    padding: 16px;
                }

                .layer2-sidebar {
                    position: static;
                    max-height: none;
                    overflow-y: visible;
                }

                .sub-form-panel {
                    position: static;
                }

                .sub-form-grid {
                    grid-template-columns: 1fr 1fr;
                }

                .unit-control {
                    flex: 1 1 140px;
                }

                .unit-popup-grid {
                    grid-template-columns: 1fr;
                }

                .landing-grid,
                .network-hero,
                .series-card-metrics,
                .metric-pills {
                    grid-template-columns: 1fr;
                }

                .selection-workspace {
                    max-height: none;
                }

                .landing-stack {
                    grid-template-rows: auto;
                    gap: 12px;
                }

                .nav-icon-card {
                    height: auto;
                    min-height: 0;
                }

                .landing-card {
                    padding: 22px;
                }

                .landing-brand-copy h1 {
                    font-size: 28px;
                }

                .landing-logo {
                    width: 170px;
                }

                .selector-footer,
                .selector-footer-legal {
                    text-align: center;
                }

                .cat-search-wrap {
                    min-width: 220px;
                    width: 100%;
                }

                .catalogue-alpha-wrap {
                    top: 88px;
                }

                .catalogue-shell {
                    grid-template-columns: 1fr;
                }

                .catalogue-alpha-rail {
                    display: none;
                }

                .catalogue-grid {
                    padding: 16px;
                }

                .cat-group-head {
                    top: 158px;
                }

                .catalogue-grid.is-list-view .cat-card {
                    grid-template-columns: 1fr;
                }

                .cat-table {
                    min-width: 940px;
                }
            }

            @media (max-width: 640px) {
                .selector-landing {
                    padding: 14px;
                }

                .landing-topbar,
                .selector-footer {
                    padding: 16px;
                }

                .unit-launch-btn {
                    width: auto;
                }

                .landing-brand {
                    flex-direction: column;
                    align-items: flex-start;
                }

                .landing-card h2,
                .network-hero h2 {
                    font-size: 24px;
                }

                .series-card-header {
                    flex-direction: column;
                }

                .detail-row {
                    grid-template-columns: 1fr;
                    gap: 6px;
                }

                .catalogue-grid {
                    padding: 14px;
                }

                .catalogue-alpha-wrap {
                    top: 108px;
                    padding: 10px 14px;
                }

                .cat-group-head {
                    top: 174px;
                }

                .cat-group-grid {
                    grid-template-columns: 1fr;
                }

                .cat-view-toggle {
                    width: 100%;
                }

                .cat-view-btn {
                    flex: 1;
                }
            }

            /* Layer 4 Model Selection redesign based on Form datasheet/Model Selection.html */
            #layer4.model-selection-layer {
                background: #d8d8d8;
                padding: 8px;
                overflow: hidden;
                flex-direction: column;
            }

            #layer4 .msl-app {
                width: 100%;
                flex: 1;
                min-height: 0;
                display: flex;
                flex-direction: column;
                background: #f6f6f6;
                border: 1px solid #a0a0a0;
                box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.22);
                overflow: hidden;
            }

            #layer4 .msl-header {
                min-height: 56px;
                display: flex;
                align-items: stretch;
                gap: 8px;
                background: #fcfcfc;
                border-bottom: 1px solid #d8d8d8;
                flex-shrink: 0;
            }

            #layer4 .msl-logo-wrap {
                display: flex;
                align-items: center;
                gap: 8px;
                padding: 0 12px;
                border-right: 1px solid #e0e0e0;
                flex-shrink: 0;
            }

            #layer4 .msl-logo-wrap .btn-back {
                padding: 5px 12px;
                border-radius: 2px;
                border: 1px solid #b4b4b4;
                background: linear-gradient(180deg, #fefefe, #e6e6e6);
                color: #333;
                font-size: 11px;
                font-family: Tahoma, "Segoe UI", Arial, sans-serif;
            }

            #layer4 .msl-app-name {
                font-size: 12px;
                font-weight: 700;
                color: #1f4fa3;
                white-space: nowrap;
            }

            #layer4 .msl-tabs {
                display: flex;
                align-items: flex-end;
                gap: 3px;
                padding: 0 8px;
                flex: 1;
            }

            #layer4 .msl-tab {
                padding: 5px 14px 4px;
                border: 1px solid transparent;
                border-bottom: 0;
                border-radius: 3px 3px 0 0;
                background: transparent;
                color: #555;
                font-size: 11px;
                cursor: pointer;
            }

            #layer4 .msl-tab.is-active {
                border-color: #c0c0c0;
                background: #fcfcfc;
                color: #1f4fa3;
                font-weight: 700;
            }

            #layer4 .msl-header-right {
                display: flex;
                align-items: center;
                gap: 6px;
                padding: 0 12px;
                border-left: 1px solid #e0e0e0;
                flex-shrink: 0;
            }

            #layer4 .msl-head-btn {
                height: 24px;
                padding: 0 10px;
                border: 1px solid #b4b4b4;
                border-radius: 2px;
                background: linear-gradient(180deg, #fefefe, #e6e6e6);
                color: #333;
                font-size: 10px;
                cursor: pointer;
            }

            #layer4 .msl-head-btn.is-active {
                border-color: #6a9fd0;
                background: linear-gradient(180deg, #dce8f8, #c2d7f0);
                color: #1f4fa3;
                font-weight: 700;
            }

            #layer4 .msl-quickbar {
                background: #1f4fa3;
                border-bottom: 1px solid #1a4390;
                padding: 6px 12px;
                display: flex;
                align-items: center;
                gap: 8px;
                flex-wrap: wrap;
                flex-shrink: 0;
            }

            #layer4 .msl-group {
                display: flex;
                flex-direction: column;
                gap: 2px;
            }

            #layer4 .msl-label {
                font-size: 9px;
                color: rgba(255, 255, 255, 0.68);
                text-transform: uppercase;
                letter-spacing: 0.05em;
            }

            #layer4 .msl-input,
            #layer4 .msl-select {
                height: 22px;
                border: 1px solid #4470c0;
                border-radius: 2px;
                background: #fff;
                color: #222;
                font-size: 11px;
                padding: 0 6px;
                min-width: 88px;
            }

            #layer4 .msl-vsep {
                width: 1px;
                height: 34px;
                background: rgba(255, 255, 255, 0.2);
            }

            #layer4 .msl-run {
                height: 28px;
                padding: 0 14px;
                border: 1px solid #0e3070;
                border-radius: 2px;
                background: linear-gradient(180deg, #3b70d8, #1c4799);
                color: #fff;
                font-size: 11px;
                font-weight: 700;
                cursor: pointer;
            }

            #layer4 .msl-content {
                flex: 1;
                min-height: 0;
                display: flex;
                overflow: hidden;
            }

            #layer4 .msl-nav {
                width: 250px;
                background: #1f4fa3;
                border-right: 1px solid #1a4390;
                padding: 8px 10px;
                display: flex;
                flex-direction: column;
                gap: 8px;
                overflow: auto;
                flex-shrink: 0;
            }

            #layer4 .msl-nav-title {
                font-size: 9px;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.08em;
                color: rgba(255, 255, 255, 0.55);
                border-bottom: 1px solid rgba(255, 255, 255, 0.14);
                padding-bottom: 5px;
            }

            #layer4 .msl-chip-row {
                display: flex;
                flex-wrap: wrap;
                gap: 4px;
            }

            #layer4 .msl-chip {
                padding: 2px 7px;
                border: 1px solid rgba(255, 255, 255, 0.24);
                border-radius: 2px;
                background: rgba(255, 255, 255, 0.1);
                color: rgba(255, 255, 255, 0.8);
                font-size: 9px;
                font-weight: 700;
            }

            #layer4 .msl-chip.is-on {
                background: rgba(255, 255, 255, 0.24);
                color: #fff;
            }

            #layer4 .msl-nav-field {
                display: flex;
                flex-direction: column;
                gap: 3px;
            }

            #layer4 .msl-nav-field span {
                font-size: 9px;
                color: rgba(255, 255, 255, 0.62);
                text-transform: uppercase;
            }

            #layer4 .msl-nav-ctrl {
                height: 22px;
                border: 1px solid rgba(255, 255, 255, 0.24);
                border-radius: 2px;
                background: rgba(255, 255, 255, 0.14);
                color: #fff;
                font-size: 11px;
                padding: 0 6px;
            }

            #layer4 .msl-nav-ctrl option {
                background: #1f4fa3;
                color: #fff;
            }

            #layer4 .msl-main {
                flex: 1;
                min-width: 0;
                min-height: 0;
                display: flex;
                flex-direction: column;
                background: #f6f6f6;
                overflow: hidden;
            }

            #layer4 .msl-summary {
                display: grid;
                grid-template-columns: repeat(7, minmax(0, 1fr));
                border-bottom: 1px solid #d4d4d4;
            }

            #layer4 .msl-sum-card {
                padding: 5px 10px;
                border-right: 1px solid #d4d4d4;
                background: #fafafa;
            }

            #layer4 .msl-sum-card:last-child {
                border-right: 0;
            }

            #layer4 .msl-sum-card span {
                display: block;
                font-size: 9px;
                text-transform: uppercase;
                color: #888;
            }

            #layer4 .msl-sum-card strong {
                display: block;
                margin-top: 1px;
                font-size: 12px;
                color: #1f3f70;
            }

            #layer4 .msl-tablebar {
                height: 30px;
                padding: 0 10px;
                display: flex;
                align-items: center;
                gap: 10px;
                border-bottom: 1px solid #d4d4d4;
                background: #f0f2f5;
                flex-shrink: 0;
            }

            #layer4 .msl-table-title {
                font-size: 11px;
                font-weight: 700;
                color: #1f4fa3;
            }

            #layer4 .msl-table-meta {
                font-size: 10px;
                color: #666;
            }

            #layer4 .msl-table-wrap {
                flex: 1 1 auto;
                min-height: 0;
                overflow: auto;
                -webkit-overflow-scrolling: touch;
                background: #fff;
            }

            #layer4 .msl-table {
                width: 100%;
                min-width: 980px;
                border-collapse: collapse;
                table-layout: fixed;
            }

            #layer4 .msl-table thead th {
                position: sticky;
                top: 0;
                z-index: 2;
                height: 26px;
                border-right: 1px solid #c8d4e4;
                border-bottom: 2px solid #1f4fa3;
                background: linear-gradient(180deg, #eef2f8, #dde5f0);
                color: #1f3f70;
                font-size: 10px;
                font-weight: 700;
                padding: 0 7px;
                text-align: left;
            }

            #layer4 .msl-table thead th.right,
            #layer4 .msl-table tbody td.right {
                text-align: right;
            }

            #layer4 .msl-table tbody td {
                height: 24px;
                border-right: 1px solid #edf1f8;
                border-bottom: 1px solid #e9eff7;
                padding: 0 7px;
                font-size: 11px;
                color: #2a2a2a;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            #layer4 .msl-table tbody tr:nth-child(even) {
                background: #f5f8fc;
            }

            #layer4 .msl-table tbody tr:hover {
                background: #d8e8f8;
            }

            #layer4 .msl-table tbody tr.is-active {
                background: #bccfe6 !important;
            }

            #layer4 .msl-table tbody tr.is-active td {
                color: #0d2a5c;
            }

            #layer4 .msl-model {
                font-weight: 700;
            }

            #layer4 .msl-eff {
                color: #165c30;
                font-weight: 700;
            }

            #layer4 .msl-score {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 30px;
                padding: 1px 6px;
                border-radius: 2px;
                font-size: 10px;
                font-weight: 700;
                border: 1px solid #b0c8e8;
                background: #e4ecf8;
                color: #1a3a68;
            }

            #layer4 .msl-score.is-hi {
                border-color: #b5dcc2;
                background: #dff0e4;
                color: #136b41;
            }

            #layer4 .msl-score.is-mid {
                border-color: #b0c8e8;
                background: #e4ecf8;
                color: #1a3a68;
            }

            #layer4 .msl-score.is-lo {
                border-color: #f0c898;
                background: #fff4e8;
                color: #9a4c14;
            }

            #layer4 .msl-statusbar {
                height: 22px;
                display: flex;
                align-items: center;
                gap: 14px;
                padding: 0 10px;
                border-top: 1px solid #c8c8c8;
                background: #e4e4e4;
                color: #555;
                font-size: 10px;
                flex-shrink: 0;
            }

            @media (max-width: 1180px) {
                #layer4 .msl-content {
                    flex-direction: column;
                }

                #layer4 .msl-nav {
                    width: 100%;
                    max-height: 38vh;
                    border-right: 0;
                    border-bottom: 1px solid #1a4390;
                    flex-shrink: 1;
                }

                #layer4 .msl-main {
                    flex: 1 1 auto;
                    min-height: 320px;
                }

                #layer4 .msl-table-wrap {
                    min-height: 240px;
                }

                #layer4 .msl-summary {
                    grid-template-columns: repeat(3, minmax(0, 1fr));
                }
            }

            @media (max-width: 760px) {
                #layer4.model-selection-layer {
                    padding: 6px;
                }

                #layer4 .msl-header {
                    flex-wrap: wrap;
                    min-height: 0;
                }

                #layer4 .msl-header-right {
                    width: 100%;
                    border-left: 0;
                    border-top: 1px solid #e0e0e0;
                    padding: 6px 10px;
                }

                #layer4 .msl-tabs {
                    width: 100%;
                    border-top: 1px solid #e8e8e8;
                    padding: 6px 10px 0;
                }

                #layer4 .msl-summary {
                    grid-template-columns: repeat(2, minmax(0, 1fr));
                }

                #layer4 .msl-table {
                    min-width: 860px;
                }
            }

            /* Layer 4 color sync with existing Makida theme */
            #layer4 .msl-app-name,
            #layer4 .msl-tab.is-active,
            #layer4 .msl-table-title {
                color: var(--teal-700);
            }

            #layer4 .msl-head-btn.is-active {
                border-color: rgb(var(--ral-3000-rgb) / 0.34);
                background: linear-gradient(145deg, rgb(var(--ral-3000-rgb) / 0.2), rgb(var(--ral-3000-rgb) / 0.08));
                color: var(--teal-700);
            }

            #layer4 .msl-quickbar,
            #layer4 .msl-nav,
            #layer4 .msl-nav-ctrl option {
                background: var(--teal-700);
            }

            #layer4 .msl-quickbar,
            #layer4 .msl-nav {
                border-color: rgba(19, 33, 43, 0.24);
            }

            #layer4 .msl-input,
            #layer4 .msl-select {
                border-color: rgba(19, 33, 43, 0.2);
            }

            #layer4 .msl-run {
                border-color: rgb(var(--ral-3000-rgb) / 0.55);
                background: linear-gradient(145deg, rgb(var(--ral-3000-rgb) / 0.95), rgb(var(--ral-3000-rgb) / 0.82));
            }

            #layer4 .msl-run:hover {
                background: linear-gradient(145deg, rgb(var(--ral-3000-rgb) / 0.88), rgb(var(--ral-3000-rgb) / 0.98));
            }

            #layer4 .msl-table thead th {
                border-bottom-color: var(--teal-700);
                color: var(--teal-700);
                background: linear-gradient(180deg, rgb(var(--ral-3000-rgb) / 0.12), rgb(var(--ral-3000-rgb) / 0.04));
            }

            #layer4 .msl-table tbody tr:hover {
                background: rgb(var(--ral-3000-rgb) / 0.11);
            }

            #layer4 .msl-table tbody tr.is-active {
                background: rgb(var(--ral-3000-rgb) / 0.2) !important;
            }

            #layer4 .msl-table tbody tr.is-active td {
                color: #5f1818;
            }

            #layer4 .msl-eff {
                color: var(--teal-700);
            }

            #layer4 .msl-score.is-mid {
                border-color: rgb(var(--ral-3000-rgb) / 0.34);
                background: rgb(var(--ral-3000-rgb) / 0.13);
                color: var(--teal-700);
            }

            #layer4 .msl-statusbar {
                border-top-color: rgba(19, 33, 43, 0.2);
                background: rgb(var(--ral-3000-rgb) / 0.08);
                color: #5f1818;
            }

            /* ═══════════════════════════════════════════════════════════
               Configure & Optimize Panel Styles
               ═══════════════════════════════════════════════════════════ */
            .cfg-page {
                padding: 24px 28px 32px;
                max-width: 860px;
                font-family: var(--font-main, 'Segoe UI', Tahoma, sans-serif);
                color: var(--gray-900, #13212b);
            }
            .cfg-header {
                margin-bottom: 20px;
                padding-bottom: 14px;
                border-bottom: 2px solid var(--ral-3000);
            }
            .cfg-title {
                margin: 0;
                font-size: 18px;
                font-weight: 700;
                color: var(--ral-3000);
            }
            .cfg-subtitle {
                display: block;
                margin-top: 4px;
                font-size: 12px;
                color: #6e7e8b;
            }
            .cfg-section {
                margin-bottom: 22px;
                padding: 16px 18px;
                background: #fafbfc;
                border: 1px solid rgba(19, 33, 43, 0.1);
                border-radius: 6px;
            }
            .cfg-section-title {
                margin: 0 0 12px;
                font-size: 14px;
                font-weight: 700;
                color: var(--ral-3000);
                display: flex;
                align-items: center;
                gap: 8px;
                padding-bottom: 8px;
                border-bottom: 1px solid rgba(19, 33, 43, 0.08);
            }
            .cfg-section-icon {
                font-size: 15px;
                width: 22px;
                text-align: center;
            }
            .cfg-table {
                width: 100%;
                border-collapse: collapse;
                font-size: 12.5px;
            }
            .cfg-table td,
            .cfg-table th {
                padding: 5px 10px;
                text-align: left;
                border-bottom: 1px solid rgba(19, 33, 43, 0.06);
            }
            .cfg-table th {
                font-weight: 600;
                font-size: 11px;
                text-transform: uppercase;
                letter-spacing: 0.03em;
                color: #4e6272;
                background: rgba(19, 33, 43, 0.04);
            }
            .cfg-label {
                width: 150px;
                font-weight: 600;
                color: #4e6272;
                white-space: nowrap;
            }
            .cfg-value {
                font-weight: 600;
                color: var(--ink-900);
            }
            .cfg-table-alt tbody tr:nth-child(even) {
                background: rgba(19, 33, 43, 0.03);
            }
            .cfg-two-col {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 16px;
            }
            @media (max-width: 700px) {
                .cfg-two-col { grid-template-columns: 1fr; }
            }
            .cfg-note {
                font-size: 11px;
                color: #6e7e8b;
                margin: 10px 0 0;
                line-height: 1.5;
                font-style: italic;
            }

            /* ── Optimize-specific controls ── */
            .opt-desc {
                font-size: 12px;
                color: #4e6272;
                margin: 0 0 14px;
                line-height: 1.5;
            }
            .opt-control-row {
                display: flex;
                align-items: center;
                gap: 10px;
                margin-bottom: 14px;
                flex-wrap: wrap;
            }
            .opt-label {
                font-size: 12.5px;
                font-weight: 600;
                color: var(--ink-900);
                min-width: 120px;
            }
            .opt-slider {
                flex: 1;
                min-width: 140px;
                accent-color: var(--ral-3000);
            }
            .opt-input {
                width: 72px;
                padding: 4px 6px;
                font-size: 12.5px;
                border: 1px solid #c5cdd4;
                border-radius: 4px;
                text-align: right;
            }
            .opt-unit {
                font-size: 12px;
                color: #6e7e8b;
                min-width: 30px;
            }
            .opt-speed-display {
                font-size: 12.5px;
                font-weight: 600;
                color: var(--ral-3000);
                margin-left: 6px;
                padding: 3px 8px;
                background: rgb(var(--ral-3000-rgb) / 0.08);
                border-radius: 4px;
            }
            .opt-result {
                margin-top: 6px;
            }
            .opt-btn {
                padding: 6px 16px;
                font-size: 12.5px;
                font-weight: 600;
                color: #fff;
                background: var(--ral-3000);
                border: none;
                border-radius: 4px;
                cursor: pointer;
                transition: background 0.15s;
            }
            .opt-btn:hover {
                background: #8c2218;
            }
            .opt-chip {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                padding: 3px 8px;
                font-size: 12px;
                border: 1px solid #c5cdd4;
                border-radius: 4px;
                cursor: pointer;
                user-select: none;
                transition: background 0.12s;
            }
            .opt-chip:hover {
                background: rgb(var(--ral-3000-rgb) / 0.06);
            }
            .opt-chip input[type="checkbox"] {
                accent-color: var(--ral-3000);
            }
            .opt-freq-chips {
                display: flex;
                flex-wrap: wrap;
                gap: 6px;
            }
            .opt-multi-row {
                flex-wrap: wrap;
            }

            /* ── Optimize panel new elements ── */
            .opt-badge {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                padding: 2px 8px;
                border-radius: 10px;
                font-size: 11.5px;
                font-weight: 700;
                margin-bottom: 8px;
            }
            .opt-badge--ok   { background: #dcfce7; color: #16a34a; }
            .opt-badge--warn { background: #fef9c3; color: #a16207; }

            .opt-solve-result {
                background: rgb(var(--ral-3000-rgb) / 0.03);
                border: 1px solid rgb(var(--ral-3000-rgb) / 0.10);
                border-radius: 8px;
                padding: 12px 14px 10px;
                margin-bottom: 14px;
            }

            .opt-no-duty {
                font-size: 12px;
                color: #6b7280;
                margin: 6px 0 12px;
                font-style: italic;
            }

            .opt-sub {
                font-size: 10.5px;
                color: #6b7280;
                margin-left: 4px;
            }

            .opt-explore-result {
                margin: 4px 0 10px;
                font-size: 12px;
            }

            .opt-manual-row {
                margin-top: 10px;
            }

            .opt-multi-controls {
                margin-bottom: 10px;
            }

            .opt-ctrl-row-wrap {
                flex-wrap: wrap;
                row-gap: 6px;
            }

            .opt-radio-lbl {
                display: inline-flex;
                align-items: center;
                gap: 5px;
                font-size: 12px;
                color: var(--ink-900);
                cursor: pointer;
                padding: 3px 0;
            }
            .opt-radio-lbl input { accent-color: var(--ral-3000); cursor: pointer; }

            .opt-label-sm {
                font-size: 11.5px;
                color: #6b7280;
            }

            .opt-input--sm { width: 48px; }

            .opt-multi-chart-wrap {
                width: 100%;
                height: 300px;
                border-radius: 6px;
                overflow: hidden;
                border: 1px solid rgb(var(--ral-3000-rgb) / 0.10);
                margin-bottom: 10px;
            }

            .opt-multi-table-wrap {
                margin-top: 4px;
                font-size: 12px;
            }

            .opt-multi-tbl td, .opt-multi-tbl th {
                padding: 5px 8px;
                font-size: 11.5px;
            }

            /* ── Motor bar (above inline performance chart) ── */
            .hyd-motor-bar {
                flex: 0 0 auto;
                display: flex;
                align-items: center;
                gap: 8px;
                padding: 4px 10px;
                background: #f6f3f0;
                border-bottom: 1px solid rgb(var(--ral-3000-rgb) / 0.10);
                min-height: 30px;
            }
            .hyd-motor-bar-label {
                font-size: 11.5px;
                font-weight: 600;
                color: var(--ral-3000);
                white-space: nowrap;
                cursor: default;
            }
            .hyd-motor-select {
                font-size: 12px;
                padding: 2px 6px;
                border: 1px solid rgb(var(--ral-3000-rgb) / 0.25);
                border-radius: 4px;
                background: #fff;
                color: var(--ink-900);
                cursor: pointer;
            }
            .hyd-motor-select:focus { outline: 2px solid var(--ral-3000); }
            .hyd-motor-bar-warn {
                font-size: 11px;
                font-weight: 600;
                color: #dc2626;
                background: #fef2f2;
                border: 1px solid #fca5a5;
                border-radius: 4px;
                padding: 2px 7px;
                white-space: nowrap;
            }

            /* ═══════════════════════════════════════════════════════════
               Layer 3 — Ebara-style Hydraulic Selection
               ═══════════════════════════════════════════════════════════ */

            /* Full-screen shell*/
            .hyd-layer {
                flex-direction: row !important;
                height: var(--landing-h, 100vh);
                background: radial-gradient(circle at top right, #fff9f1 0%, #f5f2ee 46%, #f0ece7 100%);
                overflow: hidden;
            }

            /* Two-column shell */
            .hyd-shell {
                display: flex;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }

            /* ── Left sidebar ── */
            .hyd-sidebar {
                width: 300px;
                min-width: 260px;
                flex-shrink: 0;
                background: linear-gradient(180deg, var(--teal-700) 0%, var(--teal-600) 100%);
                display: flex;
                flex-direction: column;
                overflow-y: auto;
                overflow-x: hidden;
            }

            .hyd-sidebar::-webkit-scrollbar { width: 5px; }
            .hyd-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

            /* Brand strip */
            .hyd-sidebar-brand {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 12px;
                padding: 12px 16px;
                background: rgba(0,0,0,0.18);
                border-bottom: 1px solid rgba(255,255,255,0.08);
                flex-shrink: 0;
            }

            .hyd-back-btn {
                padding: 7px 13px;
                border-radius: 10px;
                background: rgba(255,255,255,0.12);
                border: 1px solid rgba(255,255,255,0.2);
                color: #fff;
                font-size: 12px;
                font-weight: 700;
                cursor: pointer;
                transition: background 0.15s ease;
                white-space: nowrap;
            }
            .hyd-back-btn:hover { background: rgba(255,255,255,0.22); }

            .hyd-sidebar .mkd-logo-svg-small {
                width: 100px;
                height: 30px;
                filter: brightness(0) invert(1);
                opacity: 0.9;
            }

            /* Title block */
            .hyd-sidebar-title {
                padding: 20px 18px 14px;
                border-bottom: 1px solid rgba(255,255,255,0.08);
                flex-shrink: 0;
            }

            .hyd-sidebar-tag {
                font-size: 10px;
                font-weight: 800;
                letter-spacing: 0.18em;
                text-transform: uppercase;
                color: rgba(255,255,255,0.5);
                margin-bottom: 6px;
            }

            .hyd-sidebar-heading {
                font-size: 22px;
                font-weight: 800;
                color: #fff;
                line-height: 1.25;
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
            }

            /* Form sections */
            .hyd-sidebar-section {
                padding: 14px 18px;
                border-bottom: 1px solid rgba(255,255,255,0.07);
                display: grid;
                gap: 10px;
                flex-shrink: 0;
            }

            .hyd-sidebar-section-label {
                font-size: 10px;
                font-weight: 800;
                letter-spacing: 0.14em;
                text-transform: uppercase;
                color: rgba(255,255,255,0.45);
            }

            /* Override existing hyd-input-label for sidebar context */
            .hyd-sidebar .hyd-input-label,
            .hyd-sidebar .hyd-filter-label {
                color: rgba(255,255,255,0.82);
                font-size: 12px;
                font-weight: 700;
            }

            .hyd-sidebar .hyd-duty-input {
                background: rgba(255,255,255,0.1);
                border-color: rgba(255,255,255,0.2);
                color: #fff;
                font-size: 14px;
            }
            .hyd-sidebar .hyd-duty-input::placeholder { color: rgba(255,255,255,0.35); }
            .hyd-sidebar .hyd-duty-input:focus {
                border-color: rgba(255,255,255,0.55);
                box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
                background: rgba(255,255,255,0.15);
            }

            .hyd-sidebar .hyd-unit-select {
                background: rgba(255,255,255,0.12);
                border-color: rgba(255,255,255,0.2);
                color: #fff;
                font-size: 11px;
            }
            .hyd-sidebar .hyd-unit-select option { background: var(--teal-700); }

            .hyd-sidebar .compact-select {
                background: rgba(255,255,255,0.1);
                border: 1px solid rgba(255,255,255,0.2);
                border-radius: 10px;
                color: #fff;
                font-size: 12px;
                font-weight: 700;
                padding: 7px 8px;
                width: 100%;
            }
            .hyd-sidebar .compact-select option { background: var(--teal-700); }

            /* Drive buttons in sidebar */
            .hyd-sidebar .hyd-drive-btn {
                background: rgba(255,255,255,0.1);
                border-color: rgba(255,255,255,0.18);
                color: rgba(255,255,255,0.75);
            }
            .hyd-sidebar .hyd-drive-btn.is-active {
                background: rgba(255,255,255,0.25);
                border-color: rgba(255,255,255,0.5);
                color: #fff;
            }

            /* Pole chips in sidebar */
            .hyd-sidebar .hyd-pole-chip span {
                background: rgba(255,255,255,0.1);
                border-color: rgba(255,255,255,0.18);
                color: rgba(255,255,255,0.75);
            }
            .hyd-sidebar .hyd-pole-chip input:checked + span {
                background: rgba(255,255,255,0.28);
                border-color: rgba(255,255,255,0.6);
                color: #fff;
            }

            /* NFPA section overrides for sidebar */
            .hyd-sidebar .hyd-nfpa-toggle {
                background: rgb(var(--ral-3000-rgb) / 0.15);
                border-color: rgb(var(--ral-3000-rgb) / 0.3);
                color: rgba(255,255,255,0.92);
            }
            .hyd-sidebar .hyd-nfpa-toggle:hover {
                background: rgb(var(--ral-3000-rgb) / 0.25);
            }
            .hyd-sidebar .hyd-nfpa-desc {
                color: rgba(255,255,255,0.6);
                font-size: 11px;
            }
            .hyd-sidebar .hyd-sync-btn {
                background: rgba(255,255,255,0.12);
                border-color: rgba(255,255,255,0.2);
                color: rgba(255,255,255,0.75);
            }

            /* Search button */
            .hyd-sidebar-actions {
                padding: 14px 18px 10px;
            }

            .hyd-search-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 8px;
                width: 100%;
                padding: 13px 16px;
                border-radius: 14px;
                border: none;
                background: linear-gradient(135deg, rgb(var(--ral-3000-rgb) / 0.96), rgb(var(--ral-3000-rgb) / 0.84));
                color: #fff;
                font-size: 15px;
                font-weight: 800;
                letter-spacing: 0.04em;
                cursor: pointer;
                transition: opacity 0.15s ease, transform 0.15s ease;
                box-shadow: 0 4px 14px rgb(var(--ral-3000-rgb) / 0.45);
            }
            .hyd-search-btn:hover {
                opacity: 0.92;
                transform: translateY(-1px);
            }
            .hyd-search-btn:active {
                transform: translateY(0);
            }

            /* Status lines */
            .hyd-sidebar-status {
                padding: 12px 18px 18px;
                display: grid;
                gap: 5px;
                flex-shrink: 0;
            }

            .hyd-status-line {
                margin: 0;
                font-size: 12px;
                font-weight: 700;
                color: rgba(255,255,255,0.82);
            }

            .hyd-status-dim {
                font-size: 11px;
                color: rgba(255,255,255,0.45);
                font-weight: 600;
            }

            /* ── Col 2: Results + Viewer ── */
            .hyd-col2 {
                flex: 1;
                display: flex;
                flex-direction: column;
                overflow: hidden;
                background: #f3f0ec;
                min-width: 0;
            }

            .hyd-col2-topbar {
                padding: 14px 22px 12px;
                background: rgba(255,255,255,0.72);
                border-bottom: 1px solid rgba(19,33,43,0.1);
                flex-shrink: 0;
                display: flex;
                align-items: baseline;
                gap: 14px;
                flex-wrap: wrap;
            }

            .hyd-main-title {
                font-size: 15px;
                font-weight: 800;
                color: #13212b;
            }

            .hyd-main-hint {
                font-size: 12px;
                color: rgba(19,33,43,0.5);
                font-weight: 600;
            }

            /* Inner row: results list + model panel side by side */
            .hyd-col2-inner {
                flex: 1;
                display: flex;
                flex-direction: column;
                overflow: hidden;
                min-height: 0;
            }

            .hyd-col2-results {
                flex-shrink: 0;
                display: block;
                overflow-y: auto;
                min-height: 60px;
                height: 40%;
                scrollbar-width: auto;
                scrollbar-color: rgba(175,43,30,0.35) rgba(19,33,43,0.05);
            }
            .hyd-col2-results::-webkit-scrollbar { width: 10px; }
            .hyd-col2-results::-webkit-scrollbar-track { background: rgba(19,33,43,0.05); border-radius: 6px; }
            .hyd-col2-results::-webkit-scrollbar-thumb { background: rgba(175,43,30,0.35); border-radius: 6px; min-height: 40px; }
            .hyd-col2-results::-webkit-scrollbar-thumb:hover { background: rgba(175,43,30,0.55); }

            /* Drag-to-resize handle between results and chart panel */
            .hyd-resizer {
                flex-shrink: 0;
                height: 6px;
                background: rgb(var(--ral-3000-rgb) / 0.08);
                cursor: ns-resize;
                position: relative;
                transition: background 0.15s;
                z-index: 10;
            }
            .hyd-resizer::before {
                content: '';
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
                width: 32px;
                height: 3px;
                border-radius: 2px;
                background: rgb(var(--ral-3000-rgb) / 0.25);
            }
            .hyd-resizer:hover, .hyd-resizer.is-dragging {
                background: rgb(var(--ral-3000-rgb) / 0.16);
            }
            .hyd-resizer:hover::before, .hyd-resizer.is-dragging::before {
                background: rgb(var(--ral-3000-rgb) / 0.50);
            }

            /* Viewer panel inside col2 — shown in expand/fullscreen mode */
            .hyd-col2-viewer {
                display: none;
            }

            .hyd-col2.is-maximized .hyd-col2-inner {
                display: none;
            }

            .hyd-col2.is-maximized .hyd-col2-viewer {
                flex: 1;
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }

            /* ── Model detail panel (lower section: header + two-column body) ── */
            .hyd-model-panel {
                flex: 1;
                min-height: 0;
                display: flex;
                flex-direction: column;
                background: #fff;
                border-top: 2px solid rgb(var(--ral-3000-rgb) / 0.22);
                overflow: hidden;
            }

            .hyd-model-panel-header {
                padding: 9px 14px;
                background: var(--ral-3000);
                flex-shrink: 0;
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 8px;
            }

            .hyd-model-panel-name {
                font-size: 13px;
                font-weight: 800;
                color: #fff;
                line-height: 1.35;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .hyd-model-panel-close {
                width: 24px;
                height: 24px;
                border-radius: 6px;
                border: 1px solid rgba(255,255,255,0.3);
                background: transparent;
                color: rgba(255,255,255,0.75);
                font-size: 12px;
                cursor: pointer;
                flex-shrink: 0;
                line-height: 1;
                transition: background 0.15s;
            }

            .hyd-model-panel-close:hover {
                background: rgba(255,255,255,0.15);
                color: #fff;
            }

            /* ── Control bar: Impeller + Duty + Actions ── */
            .hyd-control-bar {
                display: flex;
                align-items: center;
                gap: 6px;
                padding: 6px 12px;
                background: #f6f3f0;
                border-bottom: 1px solid rgba(19,33,43,0.08);
                flex-shrink: 0;
                flex-wrap: wrap;
            }
            .hyd-ctl-group {
                display: flex;
                align-items: center;
                gap: 4px;
            }
            .hyd-ctl-label {
                font-size: 11px;
                font-weight: 700;
                color: var(--ink-700);
                white-space: nowrap;
            }
            .hyd-ctl-select {
                font-size: 12px;
                font-weight: 600;
                padding: 3px 6px;
                border: 1px solid rgba(19,33,43,0.14);
                border-radius: 6px;
                background: #fff;
                color: var(--ink-900);
                cursor: pointer;
                max-width: 100px;
            }
            .hyd-ctl-select:focus { outline: 2px solid var(--ral-3000); }
            .hyd-ctl-input {
                width: 64px;
                padding: 3px 6px;
                border: 1px solid rgba(19,33,43,0.14);
                border-radius: 6px;
                background: #fff;
                font-size: 12px;
                font-weight: 600;
                color: var(--ink-900);
            }
            .hyd-ctl-input:focus {
                outline: none;
                border-color: var(--ral-3000);
                box-shadow: 0 0 0 2px rgb(var(--ral-3000-rgb) / 0.12);
            }
            .hyd-ctl-unit {
                font-size: 10px;
                font-weight: 700;
                color: var(--ink-500);
                white-space: nowrap;
            }
            .hyd-ctl-sep {
                width: 1px;
                height: 20px;
                background: rgba(19,33,43,0.12);
                flex-shrink: 0;
                margin: 0 2px;
            }
            .hyd-ctl-spacer { flex: 1; }
            .hyd-ctl-btn {
                padding: 4px 10px;
                border-radius: 6px;
                border: 1px solid var(--ral-3000);
                background: var(--ral-3000);
                color: #fff;
                font-size: 11px;
                font-weight: 700;
                cursor: pointer;
                white-space: nowrap;
                transition: opacity 0.15s;
            }
            .hyd-ctl-btn:hover { opacity: 0.88; }
            .hyd-ctl-btn--opt {
                background: rgb(var(--ral-3000-rgb) / 0.12);
                color: var(--ral-3000);
                border-color: rgb(var(--ral-3000-rgb) / 0.3);
            }
            .hyd-ctl-btn--ghost {
                background: transparent;
                color: var(--ink-700);
                border-color: rgba(19,33,43,0.14);
            }
            .hyd-ctl-btn--ghost:hover {
                background: rgba(19,33,43,0.05);
                border-color: rgba(19,33,43,0.22);
            }

            /* ── Operating Point Card (inline metrics strip) ── */
            .hyd-op-card {
                display: flex;
                align-items: center;
                gap: 10px;
                padding: 6px 14px;
                background: linear-gradient(90deg, rgb(var(--ral-3000-rgb) / 0.05) 0%, transparent 100%);
                border-bottom: 1px solid rgba(19,33,43,0.07);
                flex-shrink: 0;
                flex-wrap: wrap;
            }
            .hyd-op-header {
                display: flex;
                align-items: center;
                gap: 6px;
                margin-right: 4px;
            }
            .hyd-op-title {
                font-size: 10px;
                font-weight: 800;
                letter-spacing: 0.1em;
                text-transform: uppercase;
                color: var(--ink-500);
            }
            .hyd-op-badge {
                font-size: 10px;
                font-weight: 700;
                padding: 2px 7px;
                border-radius: 999px;
                background: rgba(22,163,74,0.12);
                color: #15803d;
                border: 1px solid rgba(22,163,74,0.2);
            }
            .hyd-op-badge.is-warning {
                background: rgba(217,119,6,0.12);
                color: #92400e;
                border-color: rgba(217,119,6,0.2);
            }
            .hyd-op-metrics {
                display: flex;
                align-items: center;
                gap: 14px;
                flex-wrap: wrap;
            }
            .hyd-op-metric {
                display: flex;
                align-items: baseline;
                gap: 3px;
            }
            .hyd-op-metric span {
                font-size: 10px;
                font-weight: 700;
                color: var(--ink-500);
            }
            .hyd-op-metric strong {
                font-size: 13px;
                font-weight: 800;
                color: var(--ink-900);
            }
            .hyd-op-metric small {
                font-size: 9px;
                font-weight: 600;
                color: var(--ink-500);
            }
            .hyd-op-metric--eff strong {
                color: var(--ral-3000);
            }

            /* ── Two-column body: chart left, tabs+content right ── */
            .hyd-model-panel-body {
                flex: 1;
                min-height: 0;
                display: flex;
                flex-direction: row;
                overflow: hidden;
            }

            /* Main area: chart and content occupy the same space */
            .hyd-panel-main {
                flex: 1;
                min-width: 0;
                min-height: 0;
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }

            .hyd-model-panel-chart {
                flex: 1;
                min-height: 0;
                background: #fdfcfa;
                position: relative;
            }

            /* Content area — fills main area when visible */
            .hyd-panel-content {
                flex: 1;
                min-height: 0;
                overflow-y: auto;
                background: #fff;
            }

            /* ── Vertical tab bar — always fixed on right, never moves ── */
            .hyd-panel-tabs {
                flex: 0 0 110px;
                display: flex;
                flex-direction: column;
                background: #f6f3f0;
                border-left: 1px solid rgb(var(--ral-3000-rgb) / 0.10);
                overflow-y: auto;
                scrollbar-width: none;
            }
            .hyd-panel-tabs::-webkit-scrollbar { display: none; }

            .hyd-panel-tab {
                flex-shrink: 0;
                display: flex;
                align-items: center;
                gap: 6px;
                padding: 10px 11px;
                border: none;
                border-left: 3px solid transparent;
                background: transparent;
                color: var(--ink-700);
                font-size: 11px;
                font-weight: 600;
                cursor: pointer;
                white-space: nowrap;
                text-align: left;
                transition: color 0.14s, border-color 0.14s, background 0.14s;
            }
            .hyd-panel-tab:hover {
                background: rgb(var(--ral-3000-rgb) / 0.06);
                color: var(--ral-3000);
            }
            .hyd-panel-tab.is-active {
                color: var(--ral-3000);
                border-left-color: var(--ral-3000);
                background: #fff;
                font-weight: 700;
            }
            .hyd-panel-tab svg { opacity: 0.7; flex-shrink: 0; }
            .hyd-panel-tab.is-active svg { opacity: 1; }

            .hyd-panel-tab--dash {
                margin-top: auto;
                color: var(--ral-3000);
                font-weight: 700;
                font-size: 11px;
                border-top: 1px solid rgb(var(--ral-3000-rgb) / 0.10);
            }

            .hyd-viewer-bar {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 10px 16px;
                background: rgb(var(--ral-3000-rgb) / 0.06);
                border-bottom: 1px solid rgb(var(--ral-3000-rgb) / 0.10);
                flex-shrink: 0;
                gap: 12px;
            }

            .hyd-viewer-name {
                font-size: 13px;
                font-weight: 800;
                color: var(--ral-3000);
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                min-width: 0;
            }

            .hyd-viewer-btns {
                display: flex;
                gap: 6px;
                flex-shrink: 0;
            }

            .hyd-viewer-btn {
                padding: 5px 11px;
                border-radius: 7px;
                border: 1px solid rgb(var(--ral-3000-rgb) / 0.25);
                background: rgba(255,255,255,0.8);
                color: var(--ral-3000);
                font-size: 12px;
                font-weight: 700;
                cursor: pointer;
                transition: background 0.15s, border-color 0.15s;
                white-space: nowrap;
            }

            .hyd-viewer-btn:hover {
                background: rgb(var(--ral-3000-rgb) / 0.08);
                border-color: rgb(var(--ral-3000-rgb) / 0.40);
            }

            .hyd-viewer-dash-btn {
                background: var(--ral-3000);
                color: #fff;
                border-color: var(--ral-3000);
            }

            .hyd-viewer-dash-btn:hover {
                background: #8c2218;
                border-color: #8c2218;
            }

            .hyd-viewer-body {
                flex: 1;
                overflow: hidden;
                position: relative;
            }

            /* (hyd-col3 and accordion styles removed — detail panels now in layer2 tabs) */

            /* Selected result row */
            .hyd-cand-row.is-selected > td {
                background: rgb(var(--ral-3000-rgb) / 0.08) !important;
            }



            /* Scrollable list container */
            .hyd-result-list {
                padding: 16px 18px 24px;
                display: grid;
                gap: 14px;
                align-content: start;
            }

            /* ── Result group (one per series) ── */
            .hyd-series-group {
                border-radius: 18px;
                background: rgba(255,255,255,0.88);
                border: 1px solid rgba(19,33,43,0.08);
                box-shadow: 0 2px 10px rgba(19,33,43,0.06);
                overflow: hidden;
            }

            .hyd-series-head {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 12px 18px;
                background: linear-gradient(90deg, rgb(var(--ral-3000-rgb) / 0.07) 0%, rgb(var(--ral-3000-rgb) / 0.02) 100%);
                border-bottom: 1px solid rgba(19,33,43,0.07);
                gap: 12px;
            }

            .hyd-series-name {
                font-size: 16px;
                font-weight: 800;
                color: var(--ral-3000);
                font-family: "Grundfos-Extd", "Lucida Grande", Tahoma, Geneva, Verdana, sans-serif;
                letter-spacing: 0.04em;
                text-transform: uppercase;
            }

            .hyd-series-count {
                font-size: 11px;
                font-weight: 800;
                padding: 4px 10px;
                border-radius: 999px;
                background: rgb(var(--ral-3000-rgb) / 0.1);
                color: var(--ral-3000);
                border: 1px solid rgb(var(--ral-3000-rgb) / 0.15);
            }

            /* Candidates table */
            .hyd-cand-table {
                width: 100%;
                border-collapse: collapse;
            }

            .hyd-cand-table thead th {
                padding: 8px 12px;
                text-align: left;
                font-size: 10px;
                font-weight: 800;
                letter-spacing: 0.1em;
                text-transform: uppercase;
                color: rgba(19,33,43,0.5);
                background: rgba(248,250,252,0.9);
                border-bottom: 1px solid rgba(19,33,43,0.08);
                white-space: nowrap;
            }

            .hyd-cand-row {
                cursor: pointer;
                transition: background 0.15s ease;
            }

            .hyd-cand-row:hover > td {
                background: rgb(var(--ral-3000-rgb) / 0.04);
            }

            .hyd-cand-row.is-open > td {
                background: rgb(var(--ral-3000-rgb) / 0.07);
            }

            .hyd-cand-row td {
                padding: 11px 12px;
                border-bottom: 1px solid rgba(19,33,43,0.06);
                font-size: 13px;
                color: #13212b;
                vertical-align: middle;
                white-space: nowrap;
            }

            .hyd-cand-row:last-of-type td {
                border-bottom: none;
            }

            .hyd-cand-name {
                font-weight: 800;
                font-size: 14px;
                color: var(--ral-3000);
            }

            .hyd-cand-speed {
                color: rgba(19,33,43,0.6);
                font-size: 12px;
                font-weight: 600;
            }

            .hyd-cand-score-badge {
                display: inline-block;
                padding: 3px 9px;
                border-radius: 999px;
                font-size: 11px;
                font-weight: 800;
                background: rgb(var(--ral-3000-rgb) / 0.1);
                color: var(--ral-3000);
                border: 1px solid rgb(var(--ral-3000-rgb) / 0.15);
            }

            .hyd-cand-score-badge.is-best {
                background: rgba(21,128,61,0.12);
                color: #155a2c;
                border-color: rgba(21,128,61,0.2);
            }

            .hyd-cand-expand-btn {
                display: inline-flex;
                align-items: center;
                gap: 5px;
                padding: 5px 10px;
                border-radius: 8px;
                border: 1px solid rgba(19,33,43,0.14);
                background: rgba(255,255,255,0.85);
                font-size: 11px;
                font-weight: 800;
                color: rgba(19,33,43,0.7);
                cursor: pointer;
                transition: background 0.12s, border-color 0.12s;
                white-space: nowrap;
            }
            .hyd-cand-expand-btn:hover {
                background: rgb(var(--ral-3000-rgb) / 0.07);
                border-color: rgb(var(--ral-3000-rgb) / 0.22);
                color: var(--ral-3000);
            }
            .hyd-cand-row.is-open .hyd-cand-expand-btn {
                background: rgb(var(--ral-3000-rgb) / 0.12);
                border-color: rgb(var(--ral-3000-rgb) / 0.30);
                color: var(--ral-3000);
            }

            /* Detail panel (hidden by default) */
            .hyd-detail-panel {
                background: rgba(250,248,246,0.96);
                border-bottom: 1px solid rgba(19,33,43,0.08);
            }

            .hyd-detail-panel[hidden] {
                display: none !important;
            }

            /* Tab bar inside detail panel */
            .hyd-detail-tabs {
                display: flex;
                gap: 0;
                border-bottom: 1px solid rgba(19,33,43,0.1);
                padding: 0 16px;
                background: rgba(243,240,236,0.92);
            }

            .hyd-detail-tab-btn {
                padding: 10px 16px;
                border: none;
                border-bottom: 3px solid transparent;
                background: transparent;
                font-size: 12px;
                font-weight: 800;
                letter-spacing: 0.06em;
                text-transform: uppercase;
                color: rgba(19,33,43,0.55);
                cursor: pointer;
                transition: color 0.15s, border-color 0.15s;
                white-space: nowrap;
            }

            .hyd-detail-tab-btn:hover {
                color: var(--ral-3000);
            }

            .hyd-detail-tab-btn.is-active {
                color: var(--ral-3000);
                border-bottom-color: var(--ral-3000);
            }

            .hyd-detail-tab-content {
                padding: 0;
            }

            .hyd-detail-tab-pane {
                padding: 18px 20px;
            }

            .hyd-detail-tab-pane[hidden] {
                display: none !important;
            }

            /* Chart pane inside detail */
            .hyd-chart-pane {
                padding: 14px 16px;
                display: flex;
                flex-direction: column;
                gap: 10px;
            }

            .hyd-chart-pane canvas {
                max-width: 100%;
                border-radius: 10px;
            }

            .hyd-open-dashboard-btn {
                display: inline-flex;
                align-items: center;
                gap: 7px;
                padding: 9px 16px;
                border-radius: 11px;
                background: linear-gradient(135deg, var(--ral-3000), #c43a2d);
                border: none;
                color: #fff;
                font-size: 13px;
                font-weight: 800;
                cursor: pointer;
                align-self: flex-start;
                transition: opacity 0.15s;
            }
            .hyd-open-dashboard-btn:hover { opacity: 0.88; }

            /* NFPA + liquid badges inside result list */
            .hyd-nfpa-badge {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                padding: 4px 10px;
                border-radius: 999px;
                font-size: 11px;
                font-weight: 800;
                background: rgba(21,128,61,0.1);
                color: #155a2c;
                border: 1px solid rgba(21,128,61,0.2);
                white-space: nowrap;
            }

            .hyd-warn-badge {
                background: rgba(217,119,6,0.1);
                color: #7c4a03;
                border-color: rgba(217,119,6,0.2);
            }

            /* Responsive: collapse sidebar on small screens */
            @media (max-width: 860px) {
                .hyd-shell {
                    flex-direction: column;
                }
                .hyd-sidebar {
                    width: 100%;
                    min-width: 0;
                    max-height: 50vh;
                }
                .hyd-col2 {
                    min-height: 0;
                }
                .hyd-model-panel {
                    width: 100%;
                    min-height: 350px;
                }
                .hyd-cand-table thead {
                    display: none;
                }
                .hyd-cand-row td {
                    display: block;
                    border-bottom: none;
                    padding: 6px 12px;
                }
                .hyd-cand-row td:first-child {
                    padding-top: 10px;
                }
                .hyd-cand-row td:last-child {
                    padding-bottom: 10px;
                    border-bottom: 1px solid rgba(19,33,43,0.06);
                }
            }

            /* ── Toast Notification ── */
            .mkd-toast-container {
                position: fixed;
                top: 20px;
                left: 50%;
                transform: translateX(-50%);
                z-index: 100000;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 8px;
                pointer-events: none;
            }
            .mkd-toast {
                padding: 12px 24px;
                border-radius: 12px;
                background: rgba(19, 33, 43, 0.92);
                color: #fff;
                font-size: 13px;
                font-weight: 500;
                backdrop-filter: blur(12px);
                box-shadow: 0 4px 24px rgba(0,0,0,0.18);
                opacity: 0;
                transform: translateY(-12px);
                animation: mkdToastIn 0.3s ease forwards;
                pointer-events: auto;
                max-width: 480px;
                text-align: center;
            }
            .mkd-toast.mkd-toast-warn {
                background: rgba(175, 43, 30, 0.92);
            }
            .mkd-toast.mkd-toast-out {
                animation: mkdToastOut 0.3s ease forwards;
            }
            @keyframes mkdToastIn {
                to { opacity: 1; transform: translateY(0); }
            }
            @keyframes mkdToastOut {
                to { opacity: 0; transform: translateY(-12px); }
            }

            /* ── iOS Mobile Optimization (Safari / iPhone) ── */
            :root {
                --safe-top: env(safe-area-inset-top, 0px);
                --safe-right: env(safe-area-inset-right, 0px);
                --safe-bottom: env(safe-area-inset-bottom, 0px);
                --safe-left: env(safe-area-inset-left, 0px);
            }

            html {
                -webkit-text-size-adjust: 100%;
                text-size-adjust: 100%;
            }

            .layer,
            .selector-landing,
            .dashboard-ui,
            .sub-layer {
                min-height: 100dvh;
            }

            @supports (-webkit-touch-callout: none) {
                .layer,
                .selector-landing,
                .dashboard-ui,
                .sub-layer {
                    min-height: -webkit-fill-available;
                }
            }

            @media (max-width: 860px) {
                body {
                    padding-left: var(--safe-left);
                    padding-right: var(--safe-right);
                    padding-bottom: var(--safe-bottom);
                    overscroll-behavior-y: contain;
                }

                .selector-landing,
                .dashboard-ui,
                .sub-layer,
                #layer4.model-selection-layer {
                    padding-bottom: max(12px, var(--safe-bottom));
                }

                /* Prevent iOS Safari auto-zoom on focus */
                input,
                select,
                textarea,
                button,
                .dash-select,
                .dash-input,
                .search-input-group input,
                .hyd-duty-input,
                .hyd-unit-select,
                .sidebar-duty-input,
                .reg-field input {
                    font-size: 16px !important;
                }

                /* Apple HIG touch target: at least 44px */
                button,
                .btn-back,
                .btn-duty,
                .btn-huge-search,
                .nav-icon-card,
                .unit-launch-btn,
                .reg-submit,
                .dash-select,
                .hyd-unit-select,
                .search-input-group input,
                .hyd-duty-input {
                    min-height: 44px;
                    touch-action: manipulation;
                }

                a,
                button,
                .nav-icon-card,
                .result-card,
                .series-card {
                    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
                }

                .landing-topbar {
                    padding-top: max(10px, var(--safe-top));
                }

                .selector-footer {
                    padding-bottom: max(12px, var(--safe-bottom));
                }

                .layer2-body,
                .sub-layout,
                #layer4 .msl-content {
                    gap: 12px;
                }
            }

            /* ── Multi-duty Points (Additional Duty Points card) ── */
            .edp-card { margin-top: 10px; }
            .edp-card-hint {
                font-size: 11.5px;
                color: var(--slate-500, #64748b);
                margin: 4px 0 8px 0;
                line-height: 1.35;
            }
            .edp-container { display: flex; flex-direction: column; gap: 6px; }
            .edp-row {
                display: grid;
                grid-template-columns: 22px 1fr auto 22px;
                align-items: center;
                gap: 6px;
                padding: 4px 6px;
                background: #f8fafc;
                border: 1px solid #e2e8f0;
                border-radius: 6px;
            }
            .edp-row-idx {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 22px; height: 22px;
                border-radius: 50%;
                background: #e67e22;
                color: #fff;
                font-size: 11px;
                font-weight: 700;
            }
            .edp-row-input {
                width: 100%;
                padding: 4px 6px;
                font-size: 12px;
                border: 1px solid #cbd5e1;
                border-radius: 4px;
                background: #fff;
            }
            .edp-row-input:focus { outline: 2px solid #93c5fd; outline-offset: 0; }
            .edp-row-h-auto {
                font-size: 11px;
                color: var(--slate-600, #475569);
                white-space: nowrap;
            }
            .edp-row-remove {
                width: 22px; height: 22px;
                border: none;
                background: transparent;
                color: #dc2626;
                font-size: 16px;
                line-height: 1;
                cursor: pointer;
                border-radius: 4px;
            }
            .edp-row-remove:hover { background: #fee2e2; }
            .edp-actions-row {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 8px;
                margin-top: 8px;
            }
            .btn-edp-add {
                flex: 1;
                padding: 6px 10px;
                font-size: 12px;
                font-weight: 600;
                color: #0f172a;
                background: #e2e8f0;
                border: 1px dashed #94a3b8;
                border-radius: 5px;
                cursor: pointer;
            }
            .btn-edp-add:hover { background: #cbd5e1; }
            .btn-edp-apply {
                padding: 6px 12px;
                font-size: 12px;
                font-weight: 600;
                color: #fff;
                background: var(--brand-700, #1e3a8a);
                border: none;
                border-radius: 5px;
                cursor: pointer;
            }
            .btn-edp-apply:hover { opacity: 0.9; }
            .edp-result-table { margin-top: 10px; overflow-x: auto; }
            .edp-table {
                width: 100%;
                border-collapse: collapse;
                font-size: 11px;
            }
            .edp-th, .edp-td {
                border: 1px solid #e2e8f0;
                padding: 4px 5px;
                text-align: center;
            }
            .edp-th {
                background: #f1f5f9;
                font-weight: 600;
                color: #334155;
            }
            .edp-td-idx {
                background: #fef3c7;
                font-weight: 600;
            }

