.school-housing-shell {
	container: school-editor / inline-size;
	display: block;
	height: 100%;
	min-height: 0;
	border: 0;
	border-radius: 0;
	background: var(--surface);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 10px;
	font-weight: 400;
	line-height: 1.3;
	overflow: auto;
	--school-summary-background: color-mix(in srgb, var(--theme) 12%, var(--surface));
}

.school-panel { min-width: 0; padding: 11px 16px 28px; }

.school-housing-shell h2,
.school-housing-shell h3,
.school-housing-shell h4 { font-family: inherit; }
.school-hero { min-height: 65px; margin-bottom: 40px; }
.school-building-name { display: flex; align-items: center; gap: 6px; min-height: 22px; color: var(--theme); font-size: 14px; font-weight: 700; line-height: 22px; }
.school-building-name .school-name-input { width: min(260px, 55%); font-size: inherit; font-weight: inherit; }
.school-building-name > span { flex: 0 0 auto; white-space: nowrap; }
.school-housing-shell .school-building-name .school-name-input { width: min(260px, 55%); min-width: 0; flex: 0 1 260px; font-size: 14px; }
.school-hero h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 22px; }
.school-hero h2 output { font-family: "Roboto Mono", Consolas, monospace; }
.school-system-voltage { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--text-muted); font-size: 12px; line-height: 22px; }
.school-system-voltage > span:last-child { font-family: "Roboto Mono", Consolas, monospace; }
.school-overview { margin-bottom: 20px; }
.school-overview-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 23px; margin-bottom: 19px; }
.school-overview-heading h3,
.school-breakdown > h3 { margin: 0; color: var(--theme); font-size: 14px; line-height: 20px; font-weight: 700; }
.school-area-badge { display: inline-flex; align-items: center; min-height: 23px; transform: translateY(2px); }
.school-area-badge img { display: block; }
.school-area-badge > span { padding: 4px 7px; border: 1px solid var(--theme); color: var(--theme-strong); background: var(--surface-hover); font-size: 10px; font-weight: 700; }
.school-overview-grid { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr) 118px; align-items: start; gap: 30px; }
.school-table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 7.38px; scrollbar-width: thin; overscroll-behavior-inline: contain; }
.school-table { width: 100%; min-width: 600px; table-layout: fixed; border-collapse: collapse; color: var(--text-muted); font-size: 10px; }
.school-table th,
.school-table td { height: 20px; min-height: 20px; padding: 0 5px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); vertical-align: middle; text-align: left; font-size: inherit; line-height: 1.2; }
.school-table thead th { position: static; height: 20px; padding: 0 8px; background: var(--theme); color: var(--on-primary, #fff); font-size: 10.667px; line-height: 12.8px; }
.school-table thead th:first-child { padding-inline: 5px; }
.school-table thead th,
.school-feeder-configuration h4,
.school-feeder-result h4,
.school-results .dwelling-breakdown h4,
.school-results .dwelling-feeder-calculation h4 { font-weight: 600; letter-spacing: .48px; text-transform: uppercase; }
.school-table thead small { display: block; font-size: 10px; font-weight: 400; line-height: 10px; text-transform: none; letter-spacing: 0; }
.school-table thead .school-number { white-space: normal; }
.school-table thead :is(.school-power-heading, .school-factor-heading, .school-quantity-heading) { text-align: center; }
.school-table tbody tr > td,
.school-table tbody tr > th { background: var(--surface); }
.school-table tbody tr:hover > td { background: var(--surface-hover); }
.school-table tfoot td { padding-inline: 8px; background: var(--school-summary-background); color: var(--text-muted); font-weight: 700; text-align: right; text-transform: uppercase; letter-spacing: .03em; }
.school-table tfoot .school-number output { font-size: 12px; }
.school-table output { font-variant-numeric: tabular-nums; }
.school-table .school-number { padding-inline: 8px; text-align: right; white-space: nowrap; }
.school-table .school-symbol { padding-inline: 0; text-align: center; }
.school-table td:has(> input.school-number-input) { padding-inline: 0; }
.school-housing-shell .school-table td > input.school-number-input { display: block; padding-inline: 7px; }
.school-basic-table .school-table tbody td:nth-child(2),
.school-basic-table .school-table tbody td:nth-child(3),
.school-climate-table .school-table tbody td:nth-child(3) { padding-inline: 8px; }
.school-basic-table .school-table tbody td:has(> input.school-number-input),
.school-climate-table .school-table tbody td:has(> input.school-number-input) { padding-inline: 0; }
.school-name-column { width: 42%; }
.school-load-power { width: 17%; }
.school-symbol-col { width: 3%; }
.school-load-factor { width: 18%; }
.school-load-result { width: 17%; }
.school-overview-breakdown .school-table { min-width: 0; }
.school-overview-breakdown .school-table .school-name-column { width: 33%; }
.school-overview-breakdown .school-table .school-load-power { width: 21%; }
.school-overview-breakdown .school-table .school-symbol-col { width: 2%; }
.school-overview-breakdown .school-table .school-load-factor { width: 20%; }
.school-overview-breakdown .school-table .school-load-result { width: 22%; }
.school-overview-breakdown .school-table thead th { height: 35px; font-size: 10px; line-height: 12px; }
.school-overview-breakdown .school-table tbody td { padding-inline: 3px; }
.school-overview-breakdown .school-table tbody td:first-child { padding-inline: 5px; }
.school-overview-breakdown .school-table .school-symbol { padding-inline: 0; }
.school-overview-breakdown .school-table tbody td:nth-child(4) { text-align: center; }
.school-feeder-configuration { overflow: hidden; border: 1px solid var(--line); border-radius: 7.38px; background: var(--school-summary-background); }
.school-feeder-configuration h4 { display: flex; align-items: center; margin: 0; min-height: 20px; padding: 0 5px; color: var(--on-primary, #fff); background: var(--theme); font-size: 10.667px; line-height: 13px; white-space: normal; }
.school-feeder-configuration dl { margin: 0; }
.school-feeder-configuration dl > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; padding: 0 8px 0 5px; border-bottom: 1px solid var(--line); }
.school-feeder-configuration dt { color: var(--text-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.school-feeder-configuration dd { margin: 0; color: var(--text); font: 700 10.667px "Roboto Mono", Consolas, monospace; letter-spacing: .04em; white-space: nowrap; }
.school-feeder-configuration p { margin: 0; padding: 0 5px; color: var(--text-muted); font-size: 10px; line-height: 20px; }
.school-feeder-result { overflow: hidden; border: 1px solid color-mix(in srgb, var(--theme) 20%, var(--surface)); border-radius: 7.38px; text-align: center; }
.school-feeder-result h4 { display: grid; align-items: center; min-height: 39px; margin: 0; padding: 4px 5px; border-bottom: 1px solid var(--theme-border); color: var(--theme); font-size: 12.5px; line-height: 16px; }
.school-feeder-result h4 { border-bottom-color: color-mix(in srgb, var(--theme) 20%, var(--surface)); }
.school-feeder-result strong { display: grid; align-items: center; min-height: 40px; padding: 4px; color: var(--text); font-size: 17px; line-height: 22px; font-weight: 800; }
.school-overview-grid > [data-school-state="small-overview"] { min-width: 0; }
.school-housing-shell[data-school-building-size="large"] .school-hero { margin-bottom: 2.5px; }
.school-housing-shell[data-school-building-size="large"] .school-overview-heading { margin-bottom: 13.5px; }
.school-housing-shell[data-school-building-size="large"] .school-overview { margin-bottom: 10px; }
.school-overview-grid.is-large-building {
	grid-template-columns: minmax(0, .61fr) minmax(0, 1fr);
	grid-template-areas: "calculation demand" "feeder result";
	gap: 10px 6px;
}
.school-load-calculation { grid-area: calculation; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7.38px; }
.school-load-calculation h4 { display: flex; align-items: center; min-height: 19.4px; margin: 0; padding: 0 5px; background: var(--theme); color: var(--on-primary, #fff); font-size: 10.347px; line-height: 13px; font-weight: 600; text-transform: uppercase; }
.school-load-calculation dl { margin: 0; }
.school-load-calculation dl > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 19.4px; padding: 2px 5px; border-bottom: 1px solid var(--line); }
.school-load-calculation dl > div:first-child,
.school-load-calculation dl > div:last-child { background: var(--school-summary-background); }
.school-load-calculation dl > div:last-child { border-bottom: 0; }
.school-load-calculation dt { min-width: 0; color: var(--text-muted); font-size: 9.7px; }
.school-load-calculation dd { flex-shrink: 0; margin: 0; color: var(--text); font: 700 9.7px "Roboto Mono", Consolas, monospace; white-space: nowrap; }
.school-area-demand { grid-area: demand; min-width: 0; }
.school-area-demand .school-table { min-width: 0; font-size: 9.7px; }
.school-area-demand .school-table thead th { height: 35px; padding-inline: 3px; font-size: 9.7px; line-height: 11px; text-align: center; letter-spacing: 0; }
.school-area-demand .school-table thead th:first-child { padding-inline: 5px; text-align: left; }
.school-area-demand .school-table thead .school-number { text-align: right; }
.school-area-demand .school-table tbody th { padding-inline: 5px; font-weight: 400; }
.school-area-demand .school-table tbody td { padding-inline: 2px; text-align: center; }
.school-area-demand .school-table tbody .school-number { padding-inline: 8px; text-align: right; }
.school-area-demand .school-table .school-symbol { padding-inline: 0; }
.school-area-demand .school-symbol-col { width: 1%; }
.school-area-demand-name { width: 23%; }
.school-area-demand-density { width: 24%; }
.school-area-demand-area { width: 12%; }
.school-area-demand-factor { width: 16%; }
.school-area-demand-result { width: 22%; }
.school-overview-grid.is-large-building .school-feeder-configuration { grid-area: feeder; }
.school-overview-grid.is-large-building .school-feeder-result { grid-area: result; width: 141.6px; margin-left: 5px; }
.school-overview-grid.is-large-building .school-feeder-result h4 { min-height: 48px; font-size: 15px; line-height: 19px; letter-spacing: 0; }
.school-overview-grid.is-large-building .school-feeder-result strong { min-height: 48px; font-size: 20.4px; }
.school-table .school-heating-total td { background: var(--school-summary-background); color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.school-table .school-heating-total .school-number output { font-size: 12px; }
.school-breakdown > h3 { margin-bottom: 4px; }
.school-load-section { margin: 12px 6px 0; }
.school-load-section:first-of-type { margin-top: 4px; }
.school-load-section > h4 { margin: 0 0 7px 6px; color: var(--theme); font-size: 14px; line-height: 20px; font-weight: 400; }
.school-load-section .school-table-wrap + .school-table-wrap { margin-top: 10px; }
.school-basic-table .school-table thead th { height: 25px; padding-block: 0; line-height: 10px; }
.school-basic-table .school-table thead th:last-child small { display: inline; margin-inline-start: .3em; }
.school-housing-shell input.school-number-input,
.school-housing-shell input.school-name-input { width: 100%; max-width: 100%; height: 18px; min-height: 18px; padding: 0 5px; border: 1px solid color-mix(in srgb, var(--theme) 12%, transparent); border-radius: 0; background: color-mix(in srgb, var(--theme) 3%, var(--surface)); color: var(--theme); font-family: inherit; font-size: inherit; font-weight: inherit; line-height: 16px; box-shadow: none; }
.school-housing-shell input.school-number-input { appearance: textfield; -moz-appearance: textfield; }
.school-housing-shell input.school-number-input::-webkit-inner-spin-button,
.school-housing-shell input.school-number-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.school-housing-shell :is(input, button) { scroll-margin-bottom: 110px; }
.school-housing-shell input.school-name-input { border-color: transparent; background: transparent; }
.school-housing-shell input.school-name-input:hover { border-color: var(--line-strong); }
.school-factor-control { display: grid; grid-template-columns: 48px max-content; align-items: center; justify-content: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.school-factor-control input.school-number-input,
.school-factor-value { width: 48px; min-width: 0; height: 18px; padding: 0 2px; border: 1px solid transparent; background: transparent; color: var(--text-muted); line-height: 16px; text-align: right; }
.school-factor-control input.school-number-input:disabled { opacity: 1; }
.school-load-name { display: flex; align-items: center; gap: 3px; width: 100%; }
.school-load-name > input { flex: 1; min-width: 0; }
.school-load-name > input.school-name-input { padding-inline: 0; border-width: 0; }
.school-load-name > input.school-name-input:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.school-remove { display: inline-flex; flex: 0 0 14px; align-items: center; justify-content: center; width: 14px; height: 16px; min-height: 16px; padding: 0; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.school-remove .app-icon { width: 10px; height: 10px; }
.school-table .school-add-row > td { height: 20px; padding-inline: 5px; background: var(--surface); text-align: left; font-weight: 400; text-transform: none; letter-spacing: 0; }
.school-add-load { display: flex; align-items: center; gap: 12px; width: fit-content; min-height: 16px; padding: 0; border: 0; background: transparent; color: var(--text-muted); font: inherit; line-height: 16px; text-align: left; cursor: pointer; }
.school-add-load:hover { color: var(--theme); }
.school-add-icon { position: relative; display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; }
.school-add-icon img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.school-table .school-tier-label { text-align: right; }
.school-table .school-category { color: var(--theme); font-size: 10px; font-weight: 400; text-transform: uppercase; }
.school-table .school-climate-gap td { height: 20px; }
.school-table .school-basic-rate > span { display: inline-block; width: 33%; text-align: center; }
.school-table .school-area-rule { text-align: center; font-weight: 700; color: var(--text); }
.school-table .school-interlock-cell { text-align: left; text-transform: none; letter-spacing: 0; font-weight: 400; }
.school-checkbox { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: var(--text-muted); font-size: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; cursor: pointer; }
.school-checkbox-control { position: relative; display: inline-grid; flex: 0 0 10px; width: 10px; height: 10px; }
.school-checkbox-control > img { position: absolute; inset: 0; }
.school-checkbox-control > input { position: absolute; inset: 0; width: 10px; height: 10px; min-width: 0; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: inherit; }
.school-checkbox-control > input:checked { opacity: 1; accent-color: var(--theme); }
.school-checkbox-control:focus-within { outline: 2px solid var(--theme); outline-offset: 2px; }
.school-checkbox:has(input:disabled) { opacity: .6; cursor: default; }
.school-area-warning { margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--danger); border-radius: 4px; color: var(--danger); font-size: 11px; }
.school-housing-shell [hidden] { display: none !important; }
.school-empty-loads { color: var(--text-muted); }
.school-results { margin-top: 24px; font-size: 12px; }
.school-results .dwelling-results-grid { font-size: 12px; }
.school-results .dwelling-results-grid output { font: inherit; }

@container school-editor (max-width: 700px) {
	.school-panel { padding-inline: 12px; }
	.school-overview-grid { grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); gap: 12px; }
	.school-feeder-result { grid-column: 2; width: 118px; justify-self: end; }
	.school-hero { margin-bottom: 26px; }
	.school-overview-grid.is-large-building { grid-template-columns: minmax(0, 1fr); grid-template-areas: "calculation" "demand" "feeder" "result"; gap: 12px; }
	.school-overview-grid.is-large-building .school-feeder-result { margin-left: 0; justify-self: start; }
}

@container school-editor (max-width: 480px) {
	.school-panel { padding-inline: 10px; }
	.school-load-section { margin-inline: 0; }
	.school-overview-grid { grid-template-columns: minmax(0, 1fr); }
	.school-feeder-result { grid-column: 1; justify-self: start; }
	.school-system-voltage { flex-wrap: wrap; }
	.school-overview-breakdown .school-table { font-size: 11px; }
	.school-overview-breakdown .school-table th { font-size: 10px; }
}

@media (max-width: 1100px), (pointer: coarse) {
	.school-housing-shell { height: auto; overflow: visible; }
	.school-housing-shell input.school-number-input,
	.school-housing-shell input.school-name-input { min-height: 32px; height: 32px; font-size: 12px; }
	.school-factor-control { font-size: 12px; }
	.school-housing-shell .school-table { min-width: 680px; }
	.school-housing-shell .school-overview-breakdown .school-table { min-width: 0; }
	.school-housing-shell .school-area-demand .school-table { min-width: 460px; }
	.school-add-load { min-height: 32px; font-size: 12px; }
	.school-remove { min-height: 32px; width: 24px; flex-basis: 24px; }
	.school-checkbox { min-height: 32px; }
}

.building-feeder-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: 12px; }
.building-feeder-options > label:last-child { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.building-feeder-options .school-checkbox > input { accent-color: var(--theme); }

.occupancy-overview .school-table { min-width: 0; }
.occupancy-overview .school-table tbody th { padding-inline: 5px; text-align: left; font-weight: 400; overflow-wrap: anywhere; }
.occupancy-area-tabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 3px; padding-inline: 5px; }
.occupancy-area-tabs > button { min-width: 0; max-width: 100%; padding: 7px 16px; border: 1px solid var(--line); border-radius: 3px 3px 0 0; background: var(--surface-muted, var(--surface)); color: var(--text-muted); font: inherit; text-transform: uppercase; overflow-wrap: anywhere; cursor: pointer; }
.occupancy-area-tabs > button[aria-pressed="true"] { background: var(--surface); color: var(--theme); border-bottom-color: var(--surface); font-weight: 700; box-shadow: 0 -1px 4px var(--line); }
.occupancy-area-tabs > .school-add-load { padding: 7px 10px; }
.occupancy-area-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; padding: 8px 12px 12px; border: 1px solid var(--line); border-radius: 10px; }
.occupancy-area-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 8px 20px; min-width: 0; }
.occupancy-area-fields > label { display: grid; align-content: start; gap: 6px; min-width: 0; }
.occupancy-area-fields :is(input, .app-select, .app-select-control) { min-width: 0; width: 100%; max-width: 100%; }
.occupancy-area-fields input { min-height: 24px; border: 1px solid var(--theme-border); border-radius: 4px; }
.occupancy-area-fields input.school-name-input { min-height: 24px; padding-inline: 7px; border: 1px solid var(--theme-border); border-radius: 4px; }
.occupancy-area-pair { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.occupancy-area-pair > span { grid-column: 1 / -1; }
.occupancy-area-pair > label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.occupancy-area-pair > label > input { width: 70px; min-width: 40px; }
.occupancy-area-pair > label > span { min-width: 0; }
.occupancy-area-table { align-self: start; }
.occupancy-area-table .school-table { min-width: 330px; }
.occupancy-area-table .school-table thead th { white-space: normal; overflow-wrap: anywhere; }
.occupancy-area-table .school-table tbody th { padding-inline: 5px; text-align: left; font-weight: 400; }
.occupancy-area-table .school-table td:not(.school-number) { text-align: center; }
.occupancy-remove-area { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 5px; width: auto; }
@container school-editor (max-width: 640px) {
	.occupancy-area-card { grid-template-columns: minmax(0, 1fr); }
}
