:root {
    --ex402elc-bg: #f4f5f3;
    --ex402elc-panel: #ffffff;
    --ex402elc-panel-alt: #f8f9f7;
    --ex402elc-text: #1e2420;
    --ex402elc-muted: #626b65;
    --ex402elc-border: #d8ded9;
    --ex402elc-border-strong: #bac4bc;
    --ex402elc-accent: #9d4d29;
    --ex402elc-accent-dark: #76381d;
    --ex402elc-green: #526d3d;
    --ex402elc-green-soft: #edf3e8;
    --ex402elc-yellow: #a66f08;
    --ex402elc-yellow-soft: #fff7df;
    --ex402elc-red: #a42f2f;
    --ex402elc-red-soft: #fff0ef;
    --ex402elc-shadow: 0 14px 38px rgba(24, 36, 28, .08);
    --ex402elc-radius: 14px;
}

[data-ex402elc-app],
[data-ex402elc-app] * {
    box-sizing: border-box;
}

[data-ex402elc-app] {
    color: var(--ex402elc-text);
    font-family: inherit;
    line-height: 1.45;
}

.ex402elc-shell {
    width: min(1640px, calc(100vw - 40px));
    max-width: none;
    margin: 24px 0 40px 50%;
    transform: translateX(-50%);
    background: var(--ex402elc-bg);
    border: 1px solid var(--ex402elc-border);
    border-radius: 20px;
    overflow: hidden;
    overflow: clip;
    box-shadow: var(--ex402elc-shadow);
}

.ex402elc-shell h1,
.ex402elc-shell h2,
.ex402elc-shell h3,
.ex402elc-shell p {
    margin-top: 0;
}

.ex402elc-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 30px 34px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 10%, rgba(151, 190, 113, .28), transparent 32%),
        linear-gradient(125deg, #171d18 0%, #273128 58%, #49311f 100%);
}

.ex402elc-hero h1 {
    margin: 4px 0 8px;
    color: #fff;
    font-size: clamp(28px, 2.4vw, 42px);
    line-height: 1.08;
    letter-spacing: -.025em;
}

.ex402elc-hero p {
    max-width: 900px;
    margin-bottom: 0;
    color: rgba(255,255,255,.82);
    font-size: 16px;
}

.ex402elc-eyebrow,
.ex402elc-card-label {
    display: block;
    color: var(--ex402elc-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.ex402elc-hero .ex402elc-eyebrow {
    color: #d7b191;
}

.ex402elc-save-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: rgba(255,255,255,.82);
    font-size: 12px;
    white-space: nowrap;
}

.ex402elc-save-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9fc77b;
    box-shadow: 0 0 0 4px rgba(159,199,123,.13);
}

.ex402elc-projectbar {
    display: grid;
    grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(160px, 1fr));
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--ex402elc-border);
}

.ex402elc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
}

.ex402elc-field > span {
    color: #3f4942;
    font-size: 12px;
    font-weight: 750;
}

.ex402elc-field small,
.ex402elc-row-note,
.ex402elc-muted,
.ex402elc-footnote {
    color: var(--ex402elc-muted);
    font-size: 11px;
    font-weight: 500;
}

.ex402elc-field input,
.ex402elc-field select,
.ex402elc-field textarea,
.ex402elc-addbar select,
.ex402elc-table-input,
.ex402elc-table-select {
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px 10px;
    color: var(--ex402elc-text);
    background: #fff;
    border: 1px solid var(--ex402elc-border-strong);
    border-radius: 8px;
    box-shadow: none;
    font: inherit;
    font-size: 13px;
}

.ex402elc-field input:focus,
.ex402elc-field select:focus,
.ex402elc-field textarea:focus,
.ex402elc-addbar select:focus,
.ex402elc-table-input:focus,
.ex402elc-table-select:focus {
    outline: 3px solid rgba(157,77,41,.16);
    border-color: var(--ex402elc-accent);
}

.ex402elc-field input:disabled,
.ex402elc-field select:disabled,
.ex402elc-table-input:disabled {
    color: #7d8580;
    background: #eef0ee;
}

.ex402elc-input-suffix {
    display: flex;
    align-items: stretch;
}

.ex402elc-input-suffix input {
    border-radius: 8px 0 0 8px;
}

.ex402elc-input-suffix b {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 0 9px;
    background: #ecefeb;
    border: 1px solid var(--ex402elc-border-strong);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    color: #4b554e;
    font-size: 12px;
}

.ex402elc-input-suffix.ex402elc-compact input {
    min-height: 34px;
    padding: 5px 7px;
}

.ex402elc-input-suffix.ex402elc-compact b {
    min-width: 30px;
}

.ex402elc-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-bottom: 1px solid var(--ex402elc-border);
}

.ex402elc-tabs .ex402elc-tab-control {
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0;
    padding: 8px 15px 11px;
    color: #505a53;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(157, 77, 41, .14);
}

.ex402elc-tabs .ex402elc-tab-control:hover,
.ex402elc-tabs .ex402elc-tab-control:focus {
    color: var(--ex402elc-text);
    background: #f5f6f4;
    text-decoration: none;
}

.ex402elc-tabs .ex402elc-tab-control.is-active {
    color: var(--ex402elc-accent-dark);
    border-bottom-color: var(--ex402elc-accent);
    background: #fbf6f3;
    text-decoration: none;
}

.ex402elc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
    gap: 18px;
    align-items: start;
    padding: 20px;
}

.ex402elc-main {
    min-width: 0;
}

.ex402elc-card,
.ex402elc-summary,
.ex402elc-callout {
    margin-bottom: 18px;
    padding: 20px;
    background: var(--ex402elc-panel);
    border: 1px solid var(--ex402elc-border);
    border-radius: var(--ex402elc-radius);
}

.ex402elc-card:last-child,
.ex402elc-callout:last-child {
    margin-bottom: 0;
}

.ex402elc-card-head,
.ex402elc-summary-head,
.ex402elc-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.ex402elc-card-head h2,
.ex402elc-summary-head h2,
.ex402elc-summary-section h2 {
    margin-bottom: 4px;
    color: var(--ex402elc-text);
    font-size: 18px;
    line-height: 1.2;
}

.ex402elc-card-head h3,
.ex402elc-editor-subsection h3,
.ex402elc-mini-card h3,
.ex402elc-library-card h3,
.ex402elc-data-grid h3 {
    margin-bottom: 4px;
    color: var(--ex402elc-text);
    font-size: 15px;
}

.ex402elc-card-head p,
.ex402elc-editor-subsection p,
.ex402elc-library-card p,
.ex402elc-mini-card p,
.ex402elc-data-grid p,
.ex402elc-callout p {
    margin-bottom: 0;
    color: var(--ex402elc-muted);
    font-size: 13px;
}

.ex402elc-button,
.ex402elc-icon-button,
.ex402elc-modal-close {
    appearance: none;
    margin: 0;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.ex402elc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    padding: 8px 13px;
    color: #fff;
    background: var(--ex402elc-accent);
    border: 1px solid var(--ex402elc-accent);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
}

.ex402elc-button:hover {
    color: #fff;
    background: var(--ex402elc-accent-dark);
    border-color: var(--ex402elc-accent-dark);
}

.ex402elc-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.ex402elc-button-secondary {
    color: #354039;
    background: #fff;
    border-color: var(--ex402elc-border-strong);
}

.ex402elc-button-secondary:hover {
    color: #1f2822;
    background: #f2f4f1;
    border-color: #9faa9f;
}

.ex402elc-button-danger {
    color: var(--ex402elc-red);
    background: #fff;
    border-color: #e6b7b3;
}

.ex402elc-button-danger:hover {
    color: #fff;
    background: var(--ex402elc-red);
    border-color: var(--ex402elc-red);
}

.ex402elc-icon-button {
    padding: 5px 7px;
    color: #4a554d;
    background: transparent;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.ex402elc-icon-button:hover {
    color: var(--ex402elc-text);
    background: #edf0ed;
}

.ex402elc-icon-button.is-danger {
    color: var(--ex402elc-red);
}

.ex402elc-actions-cell {
    text-align: right;
    white-space: nowrap;
}

.ex402elc-actions-cell .ex402elc-icon-button + .ex402elc-icon-button {
    margin-left: 2px;
}

.ex402elc-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--ex402elc-border);
    border-radius: 10px;
}

.ex402elc-table {
    width: 100%;
    min-width: 760px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: auto;
    background: #fff;
    font-size: 12px;
}

.ex402elc-table th,
.ex402elc-table td {
    padding: 9px 10px;
    vertical-align: middle;
    border: 0;
    border-bottom: 1px solid #e7ebe7;
    text-align: left;
}

.ex402elc-table th {
    color: #4c564f;
    background: #f1f3f1;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ex402elc-table tbody tr:last-child td {
    border-bottom: 0;
}

.ex402elc-table tbody tr:hover td {
    background: #fbfcfb;
}

.ex402elc-table-input,
.ex402elc-table-select {
    min-width: 115px;
    min-height: 34px;
    padding: 5px 7px;
    font-size: 12px;
}

.ex402elc-table-loads th:first-child,
.ex402elc-table-loads td:first-child {
    min-width: 220px;
}

.ex402elc-table-loads th:nth-child(6),
.ex402elc-table-loads td:nth-child(6) {
    min-width: 195px;
}

.ex402elc-small-number {
    min-width: 70px;
    max-width: 90px;
}

.ex402elc-row-kicker,
.ex402elc-row-note {
    display: block;
    margin-bottom: 2px;
}

.ex402elc-row-kicker {
    color: var(--ex402elc-green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ex402elc-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.ex402elc-inline-check input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.ex402elc-footnote {
    margin: 10px 0 0;
}

.ex402elc-addbar,
.ex402elc-filterbar,
.ex402elc-rack-toolbar {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 11px;
    background: var(--ex402elc-panel-alt);
    border: 1px solid #e1e6e1;
    border-radius: 10px;
}

.ex402elc-addbar select {
    flex: 1 1 auto;
    min-width: 240px;
}

.ex402elc-filterbar {
    justify-content: space-between;
    align-items: center;
}

.ex402elc-filterbar .ex402elc-field {
    min-width: 270px;
}

.ex402elc-standard-badge {
    padding: 8px 11px;
    color: #455047;
    background: #fff;
    border: 1px solid var(--ex402elc-border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}

.ex402elc-rack-placement {
    margin-top: 12px;
    border: 1px solid var(--ex402elc-border);
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
}

.ex402elc-rack-placement > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    color: #2c352f;
    background: #eef1ed;
    cursor: pointer;
    list-style: none;
}

.ex402elc-rack-placement > summary::-webkit-details-marker {
    display: none;
}

.ex402elc-rack-placement > summary span:first-child {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.ex402elc-rack-placement > summary b {
    font-size: 14px;
}

.ex402elc-rack-placement > summary small,
.ex402elc-summary-hint {
    color: var(--ex402elc-muted);
    font-size: 11px;
}

.ex402elc-rack-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px auto;
    align-items: end;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
}

.ex402elc-toolbar-actions {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
}

.ex402elc-rack-placement .ex402elc-table-wrap {
    border: 0;
    border-radius: 0;
}

.ex402elc-empty {
    padding: 28px 20px;
    text-align: center;
    background: #fafbfa;
    border: 1px dashed var(--ex402elc-border-strong);
    border-radius: 10px;
}

.ex402elc-empty h3 {
    margin-bottom: 5px;
    font-size: 15px;
}

.ex402elc-empty p {
    max-width: 680px;
    margin: 0 auto 14px;
    color: var(--ex402elc-muted);
    font-size: 13px;
}

.ex402elc-empty-table {
    padding: 14px;
    border: 0;
}

.ex402elc-empty-summary {
    padding: 13px;
}

.ex402elc-callout {
    background: #f7f0eb;
    border-color: #dfc7b8;
}

.ex402elc-callout h3 {
    margin-bottom: 4px;
    font-size: 14px;
}

.ex402elc-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ex402elc-mini-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 160px;
    padding: 14px;
    background: var(--ex402elc-panel-alt);
    border: 1px solid var(--ex402elc-border);
    border-radius: 10px;
}

.ex402elc-mini-card p {
    flex: 1 1 auto;
}

.ex402elc-mini-card .ex402elc-button {
    margin-top: 12px;
}

.ex402elc-library-list {
    display: grid;
    gap: 10px;
}

.ex402elc-library-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 15px;
    background: var(--ex402elc-panel-alt);
    border: 1px solid var(--ex402elc-border);
    border-radius: 10px;
}

.ex402elc-library-card.is-example {
    background: linear-gradient(135deg, #f7faf4 0%, var(--ex402elc-green-soft) 100%);
    border-color: #c7d5bc;
}

.ex402elc-library-card.is-example .ex402elc-card-label {
    color: var(--ex402elc-green);
}

.ex402elc-example-notice {
    margin-bottom: 12px;
    padding: 10px 12px;
    color: #455047;
    background: #fff;
    border: 1px solid #d8e2d0;
    border-left: 4px solid var(--ex402elc-green);
    border-radius: 9px;
    font-size: 12px;
}

.ex402elc-library-card small {
    display: block;
    margin-top: 7px;
    color: var(--ex402elc-muted);
    font-size: 11px;
}

.ex402elc-library-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.ex402elc-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.ex402elc-chip {
    display: inline-flex;
    padding: 4px 7px;
    color: #455047;
    background: #fff;
    border: 1px solid var(--ex402elc-border);
    border-radius: 999px;
    font-size: 10px;
}

.ex402elc-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ex402elc-data-grid article {
    padding: 16px;
    background: var(--ex402elc-panel-alt);
    border: 1px solid var(--ex402elc-border);
    border-radius: 10px;
}

.ex402elc-data-grid article.is-danger {
    background: var(--ex402elc-red-soft);
    border-color: #ecc8c5;
}

.ex402elc-data-grid .ex402elc-button {
    margin-top: 10px;
}

.ex402elc-summary {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    margin-bottom: 0;
    overflow: auto;
    box-shadow: 0 10px 24px rgba(20, 32, 23, .06);
}

.ex402elc-summary-head {
    align-items: center;
}

.ex402elc-summary-head h2 {
    margin-bottom: 0;
}

.ex402elc-summary-warning {
    margin-bottom: 12px;
    padding: 9px 10px;
    color: #7f5210;
    background: var(--ex402elc-yellow-soft);
    border: 1px solid #ead49e;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 750;
}

.ex402elc-metric-grid,
.ex402elc-cost-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ex402elc-metric-grid > div,
.ex402elc-cost-grid > div {
    display: flex;
    flex-direction: column;
    min-height: 80px;
    padding: 11px;
    background: var(--ex402elc-panel-alt);
    border: 1px solid var(--ex402elc-border);
    border-radius: 9px;
}

.ex402elc-metric-grid span,
.ex402elc-cost-grid span {
    color: var(--ex402elc-muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.ex402elc-metric-grid b,
.ex402elc-cost-grid b {
    margin-top: 5px;
    color: var(--ex402elc-text);
    font-size: 17px;
    line-height: 1.1;
}

.ex402elc-metric-grid small,
.ex402elc-cost-grid small {
    margin-top: 4px;
    color: var(--ex402elc-muted);
    font-size: 10px;
}

.ex402elc-cost-grid > .is-total {
    grid-column: 1 / -1;
    min-height: auto;
    background: #29342c;
    border-color: #29342c;
}

.ex402elc-cost-grid > .is-total span,
.ex402elc-cost-grid > .is-total small {
    color: rgba(255,255,255,.7);
}

.ex402elc-cost-grid > .is-total b {
    color: #fff;
    font-size: 21px;
}

.ex402elc-summary-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--ex402elc-border);
}

.ex402elc-circuit-summary {
    margin-top: 8px;
    padding: 11px;
    background: #f7f8f6;
    border: 1px solid var(--ex402elc-border);
    border-left: 4px solid var(--ex402elc-green);
    border-radius: 9px;
}

.ex402elc-circuit-summary.is-near,
.ex402elc-circuit-summary.is-over-planning {
    background: var(--ex402elc-yellow-soft);
    border-left-color: var(--ex402elc-yellow);
}

.ex402elc-circuit-summary.is-over-80,
.ex402elc-circuit-summary.is-over-breaker {
    background: var(--ex402elc-red-soft);
    border-left-color: var(--ex402elc-red);
}

.ex402elc-circuit-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 9px;
}

.ex402elc-circuit-summary-head h3 {
    margin: 0 0 1px;
    font-size: 13px;
}

.ex402elc-circuit-summary-head small,
.ex402elc-circuit-summary > small {
    color: var(--ex402elc-muted);
    font-size: 9px;
}

.ex402elc-circuit-summary-head > span {
    color: var(--ex402elc-green);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
    text-align: right;
}

.ex402elc-circuit-summary.is-near .ex402elc-circuit-summary-head > span,
.ex402elc-circuit-summary.is-over-planning .ex402elc-circuit-summary-head > span {
    color: var(--ex402elc-yellow);
}

.ex402elc-circuit-summary.is-over-80 .ex402elc-circuit-summary-head > span,
.ex402elc-circuit-summary.is-over-breaker .ex402elc-circuit-summary-head > span {
    color: var(--ex402elc-red);
}

.ex402elc-progress {
    height: 7px;
    margin: 8px 0;
    overflow: hidden;
    background: #dfe4df;
    border-radius: 999px;
}

.ex402elc-progress i {
    display: block;
    height: 100%;
    background: var(--ex402elc-green);
    border-radius: inherit;
}

.ex402elc-circuit-summary.is-near .ex402elc-progress i,
.ex402elc-circuit-summary.is-over-planning .ex402elc-progress i {
    background: var(--ex402elc-yellow);
}

.ex402elc-circuit-summary.is-over-80 .ex402elc-progress i,
.ex402elc-circuit-summary.is-over-breaker .ex402elc-progress i {
    background: var(--ex402elc-red);
}

.ex402elc-circuit-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin-bottom: 6px;
}

.ex402elc-circuit-metrics span {
    color: var(--ex402elc-muted);
    font-size: 9px;
}

.ex402elc-circuit-metrics b {
    color: var(--ex402elc-text);
}

.ex402elc-summary-details {
    margin-top: 14px;
    border-top: 1px solid var(--ex402elc-border);
}

.ex402elc-summary-details summary {
    padding: 12px 0 5px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.ex402elc-summary-details ol {
    margin: 7px 0 0;
    padding-left: 20px;
}

.ex402elc-summary-details li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 4px 0;
    color: var(--ex402elc-muted);
    font-size: 10px;
}

.ex402elc-summary-details li b {
    color: var(--ex402elc-text);
}

.ex402elc-disclaimer {
    margin: 14px 0 0;
    color: var(--ex402elc-muted);
    font-size: 9px;
}

.ex402elc-form-grid {
    display: grid;
    gap: 12px;
}

.ex402elc-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ex402elc-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ex402elc-span-2 {
    grid-column: span 2;
}

.ex402elc-span-3 {
    grid-column: 1 / -1;
}

.ex402elc-editor-subsection {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--ex402elc-border);
}

.ex402elc-modal-backdrop {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 17, 13, .72);
}

.ex402elc-modal {
    width: min(1040px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 26px 80px rgba(0,0,0,.28);
}

.ex402elc-editor-form {
    padding: 22px;
}

.ex402elc-modal-head h2 {
    margin: 2px 0 0;
    font-size: 22px;
}

.ex402elc-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #59625c;
    background: #eef0ee;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

.ex402elc-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ex402elc-border);
}

.ex402elc-toast {
    position: fixed;
    z-index: 1000000;
    right: 24px;
    bottom: 24px;
    max-width: 430px;
    padding: 11px 14px;
    color: #fff;
    background: #29342c;
    border-radius: 9px;
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
    font-size: 12px;
    font-weight: 750;
}

.ex402elc-toast.is-warning {
    background: #7c5311;
}

.ex402elc-footer {
    padding: 14px 22px;
    background: #e9ece8;
    border-top: 1px solid var(--ex402elc-border);
}

.ex402elc-footer p {
    margin: 0;
    color: #535d56;
    font-size: 10px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1220px) {
    .ex402elc-projectbar {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .ex402elc-field-project {
        grid-column: span 2;
    }

    .ex402elc-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .ex402elc-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .ex402elc-shell {
        width: calc(100vw - 20px);
        margin-top: 10px;
        border-radius: 14px;
    }

    .ex402elc-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .ex402elc-layout {
        grid-template-columns: 1fr;
    }

    .ex402elc-summary {
        position: static;
        max-height: none;
        order: 0;
    }

    /* Keep the selected tab's page ahead of the unchanged live summary on narrow screens. */
    .ex402elc-main {
        order: -1;
    }

    .ex402elc-rack-toolbar {
        grid-template-columns: 1fr 160px;
    }

    .ex402elc-toolbar-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .ex402elc-shell {
        width: 100%;
        margin: 0;
        transform: none;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .ex402elc-hero,
    .ex402elc-card,
    .ex402elc-summary,
    .ex402elc-callout,
    .ex402elc-editor-form {
        padding: 16px;
    }

    .ex402elc-projectbar {
        grid-template-columns: 1fr 1fr;
        padding: 14px;
    }

    .ex402elc-field-project {
        grid-column: 1 / -1;
    }

    .ex402elc-layout {
        padding: 12px;
    }

    .ex402elc-card-head,
    .ex402elc-summary-head,
    .ex402elc-modal-head {
        align-items: stretch;
        flex-direction: column;
    }

    .ex402elc-card-head > .ex402elc-button {
        width: 100%;
    }

    .ex402elc-addbar,
    .ex402elc-filterbar,
    .ex402elc-rack-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .ex402elc-addbar select,
    .ex402elc-filterbar .ex402elc-field {
        min-width: 0;
        width: 100%;
    }

    .ex402elc-addbar .ex402elc-button {
        width: 100%;
    }

    .ex402elc-rack-toolbar {
        display: flex;
    }

    .ex402elc-toolbar-actions,
    .ex402elc-library-actions {
        width: 100%;
    }

    .ex402elc-toolbar-actions .ex402elc-button,
    .ex402elc-library-actions .ex402elc-button {
        flex: 1 1 auto;
    }

    .ex402elc-mini-grid,
    .ex402elc-data-grid,
    .ex402elc-form-grid-2,
    .ex402elc-form-grid-3,
    .ex402elc-library-card {
        grid-template-columns: 1fr;
    }

    .ex402elc-span-2,
    .ex402elc-span-3 {
        grid-column: auto;
    }

    .ex402elc-metric-grid,
    .ex402elc-cost-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ex402elc-library-actions {
        justify-content: flex-start;
    }

    .ex402elc-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .ex402elc-modal {
        width: 100%;
        max-height: 94vh;
        border-radius: 14px 14px 0 0;
    }
}

@media (max-width: 480px) {
    .ex402elc-projectbar,
    .ex402elc-metric-grid,
    .ex402elc-cost-grid {
        grid-template-columns: 1fr;
    }

    .ex402elc-cost-grid > .is-total {
        grid-column: auto;
    }

    .ex402elc-circuit-metrics {
        grid-template-columns: 1fr;
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    [data-ex402elc-app],
    [data-ex402elc-app] * {
        visibility: visible !important;
    }

    [data-ex402elc-app] {
        position: absolute;
        inset: 0;
    }

    .ex402elc-shell {
        width: 100%;
        margin: 0;
        transform: none;
        border: 0;
        box-shadow: none;
    }

    .ex402elc-projectbar,
    .ex402elc-tabs,
    .ex402elc-main,
    .ex402elc-footer,
    .ex402elc-save-state,
    .ex402elc-summary-head button,
    .ex402elc-toast,
    .ex402elc-modal-backdrop {
        display: none !important;
    }

    .ex402elc-layout {
        display: block;
        padding: 0;
    }

    .ex402elc-summary {
        position: static;
        max-height: none;
        border: 0;
        box-shadow: none;
    }
}

/* Average-operation selector: percent, hours/day, or photoperiod. */
.ex402elc-operation-control {
    display: grid;
    grid-template-columns: minmax(108px, 1fr) minmax(112px, 1fr);
    gap: 6px;
    align-items: center;
    min-width: 235px;
}

.ex402elc-operation-control .ex402elc-table-select,
.ex402elc-operation-control .ex402elc-table-input,
.ex402elc-operation-control .ex402elc-input-suffix {
    min-width: 0;
    width: 100%;
}

@media (max-width: 760px) {
    .ex402elc-operation-control {
        grid-template-columns: 1fr;
        min-width: 150px;
    }
}

/* Keeper mode: one enclosure, shared calculation engine and project. */
.ex402elc-modes{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}
.ex402elc-modes [aria-pressed="false"]{background:#fff!important;color:#224333!important;border:1px solid #7c9387!important}
.ex402elc-modes [aria-pressed="true"]{outline:3px solid #adc9b5;outline-offset:2px}
.ex402elc-keeper-panel,.ex402elc-keeper-results{background:#fff;border:1px solid #d5ded8;border-radius:14px;padding:22px;margin:20px 0}
.ex402elc-keeper-row{display:grid;grid-template-columns:minmax(130px,2fr) minmax(80px,1fr) minmax(90px,1fr) auto;gap:12px;align-items:end;margin:18px 0}
.ex402elc-keeper-row .ex402elc-field{min-width:0;margin:0}
.ex402elc-keeper input,.ex402elc-keeper select{box-sizing:border-box;width:100%;min-height:44px}
.ex402elc-keeper details summary{cursor:pointer;padding:12px 0;font-weight:600}
.ex402elc-keeper-results dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.ex402elc-keeper-results dt{font-size:14px}.ex402elc-keeper-results dd{font-size:25px;font-weight:700;margin:6px 0;color:#244b38}
@media(max-width:560px){.ex402elc-keeper-row{grid-template-columns:1fr 1fr}.ex402elc-keeper-row>label:first-child{grid-column:1/-1}.ex402elc-keeper-row>button{grid-column:1/-1}.ex402elc-keeper-panel,.ex402elc-keeper-results{padding:14px}}
