/* Insulation sizing shares the calculator's cards, controls, icons and ambient panel. */
.sizing-workspace { font-size: 13px; }
.sizing-heading { margin-bottom: 26px; }
.sizing-heading h1 { margin: 7px 0 9px; font-size: 34px; letter-spacing: -.035em; }
.sizing-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.sizing-configuration { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; margin-bottom: 26px; }
.sizing-solution-fields { border: 0; padding: 22px; margin: 0; min-width: 0; }
.sizing-geometry { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.sizing-geometry .geometry-icon { width: 58px; height: 58px; flex-shrink: 0; }
.sizing-geometry label { width: min(300px, 100%); }
.sizing-inputs { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(220px, 1.6fr); gap: 18px; }
.sizing-selection-missing select, .sizing-selection-missing .focus-select-trigger { border-color: #d98b8b; background: #fff7f7; }
@keyframes sizing-selection-fade {
    0%, 100% { border-color: #d98b8b; background-color: #fff7f7; }
    50% { border-color: #e9baba; background-color: #fffdfd; }
}
@media (prefers-reduced-motion: no-preference) {
    .sizing-selection-missing select:enabled:not(:focus),
    .sizing-selection-missing .focus-select-trigger:enabled:not(:focus) { animation: sizing-selection-fade 3.6s ease-in-out infinite; }
}
.sizing-common-settings { border-top: 1px solid var(--line); padding: 16px 22px; background: #fafafa; }
.sizing-common-settings > summary { font-weight: 700; cursor: pointer; }
.sizing-common-settings > summary span { display: inline-block; margin-left: 12px; font-weight: 400; color: var(--muted); font-size: 11px; }
.sizing-workspace .sizing-ambient { grid-template-columns: 1fr 1fr; gap: 18px 14px; border-radius: 18px; }
.sizing-ambient .ambient-heading { grid-column: 1 / -1; margin-bottom: 4px; }
.sizing-ambient select { font-size: 12px; }
.sizing-toolbar { align-items: center; }
.sizing-toolbar h2 span { color: var(--muted); font-size: 15px; font-weight: 400; margin-left: 8px; }
.sizing-actions, .sizing-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sizing-actions { flex-wrap: wrap; }
.sizing-auto-status { color: var(--muted); font-size: 12px; }
.sizing-table-scroll { overflow-x: auto; }
.sizing-table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sizing-table { width: 100%; min-width: 1040px; border-collapse: collapse; text-align: left; }
.sizing-table th { padding: 16px 18px; background: #fafafa; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.sizing-table td { padding: 18px; border-bottom: 1px solid #e5e5e5; vertical-align: middle; }
.sizing-size-row td:first-child { width: 23%; }
.sizing-size-row td:nth-child(2), .sizing-size-row td:nth-child(3) { width: 15%; }
.sizing-size-row td:nth-child(4), .sizing-size-row td:nth-child(5) { width: 14%; }
.sizing-table tr:last-child td { border-bottom: none; }
.sizing-size-row > td:first-child > label { max-width: 220px; }
.sizing-dimensions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sizing-value { display: block; font-size: 25px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sizing-value small { font-size: 12px; color: var(--muted); font-weight: 400; }
.sizing-performance-value { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sizing-performance-value small { font-size: 12px; color: var(--muted); font-weight: 400; }
.sizing-cell-note { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sizing-row-actions { display: flex; gap: 12px; align-items: center; }
.sizing-row-actions .button { white-space: nowrap; }
.sizing-remove { border: 0; background: none; font-size: 24px; color: var(--muted); padding: 2px; }
.sizing-remove:hover { color: var(--danger); }
.sizing-workspace button:disabled { opacity: .5; cursor: not-allowed; }
.sizing-error { color: var(--danger); line-height: 1.5; font-size: 12px; }
.sizing-settings-container { border: 0; padding: 20px 0 0; margin: 0; min-width: 0; }
.sizing-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sizing-settings-grid fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: white; }
.sizing-settings-grid legend { padding: 0 5px; font-size: 12px; font-weight: 600; }
.sizing-workspace .settings-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sizing-settings-section { margin-top: 14px; padding: 14px; border: 1px solid var(--line); background: white; border-radius: 12px; }
.sizing-workspace summary { cursor: pointer; font-size: 12px; }
.sizing-workspace summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sizing-help { color: var(--muted); font-size: 12px; line-height: 1.6; }
.sizing-existing-layer { display: grid; grid-template-columns: minmax(140px, 1fr) 140px 100px auto; gap: 10px; align-items: end; margin: 12px 0; }
.sizing-footer { padding: 16px 0; color: var(--muted); font-size: 11px; }
.sizing-notice { display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 18px; border: 1px solid #e8b4b4; border-radius: 12px; background: #fff5f5; }
.sizing-empty { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.sizing-scroll-hint { display: none; color: var(--muted); font-size: 11px; }
@media(max-width: 1100px) {
    .sizing-scroll-hint { display: block; }
    .sizing-configuration { grid-template-columns: 1fr; }
    .sizing-workspace .sizing-ambient { grid-template-columns: repeat(4, 1fr); }
    .sizing-settings-grid { grid-template-columns: 1fr; }
}
@media(max-width: 850px) {
    .sizing-scroll-hint { display: block; }
    .sizing-workspace .sizing-ambient { grid-template-columns: 1fr 1fr; }
    .sizing-toolbar, .sizing-footer { flex-direction: column; align-items: flex-start; }
}
@media(max-width: 550px) {
    .sizing-inputs { grid-template-columns: 1fr; }
    .sizing-existing-layer { grid-template-columns: 1fr; }
    .sizing-common-settings > summary span { display: block; margin: 8px 0 0; }
    .sizing-heading h1 { font-size: 30px; }
}
:root {
    color-scheme: light;
    --ink: #252525;
    --muted: #6c757d;
    --line: #d8d8d8;
    --paper: #ffffff;
    --canvas: #f0f0f0;
    --oconsoft-red: #e41515;
    --oconsoft-red-darker: #d40505;
    --oconsoft-red-darkest: #c40303;
    --accent: var(--oconsoft-red);
    --selection: #f7f7f7;
    --danger: #c40303;
    --shadow: 0 14px 36px rgba(37, 37, 37, .08);
    font-family: "DM Sans", system-ui, sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.app-shell { min-height: 100vh; }
.app-header {
    height: 76px;
    padding: 0 clamp(22px, 4vw, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong, h1, h2, h3 { font-family: "Manrope", sans-serif; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); }
.brand-mark span { width: 18px; height: 18px; border: 4px solid var(--accent); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--ink); }
.account-menu { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 13px; }
.text-button { padding: 0; border: 0; background: none; color: var(--oconsoft-red); font-weight: 700; text-decoration: none; }
.app-main { width: min(1640px, calc(100% - clamp(28px, 6vw, 96px))); margin: 0 auto; padding: 42px 0 110px; }

.page-heading { display: grid; grid-template-columns: 1fr minmax(620px, 780px); gap: 32px; align-items: center; margin-bottom: 38px; }
.page-heading h1 { max-width: 720px; margin: 6px 0 14px; font-size: clamp(34px, 4.2vw, 66px); line-height: .98; letter-spacing: -.055em; }
.page-heading > div:first-child > p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: 16px; }
.eyebrow { margin: 0; color: var(--oconsoft-red); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.ambient-card { display: grid; grid-template-columns: 1.1fr .9fr .8fr 1.6fr; gap: 14px; align-items: end; padding: 22px; background: var(--ink); color: white; border-radius: 18px; box-shadow: var(--shadow); }
.ambient-heading { display: flex; align-items: center; gap: 12px; }
.ambient-heading div { display: grid; }
.ambient-heading small { margin-top: 3px; color: #bfc3c7; font-size: 11px; }
.weather-mark { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--accent); font-size: 20px; }
label { display: grid; gap: 7px; min-width: 0; }
label > span:first-child, .product-summary > span, .result-cell > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ambient-card label > span:first-child { color: #bfc3c7; }
input, select { width: 100%; min-width: 0; height: 40px; padding: 0 11px; border: 1px solid #d8d8d8; border-radius: 8px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus { border-color: var(--oconsoft-red); box-shadow: 0 0 0 3px rgba(228,21,21,.14); }
.input-with-unit { display: flex; align-items: center; min-width: 0; border: 1px solid #d8d8d8; border-radius: 8px; background: white; overflow: hidden; }
.input-with-unit:focus-within { border-color: var(--oconsoft-red); box-shadow: 0 0 0 3px rgba(228,21,21,.14); }
.input-with-unit input { border: 0; border-radius: 0; box-shadow: none; }
.input-with-unit small { padding-right: 10px; color: var(--muted); font-size: 11px; white-space: nowrap; }

.solutions-section { min-width: 0; }
.solutions-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 24px 0 18px; border-top: 1px solid var(--line); }
.solutions-toolbar h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.035em; }
.add-buttons { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.button { min-height: 40px; padding: 0 15px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 700; text-decoration: none; }
.button-primary { color: white; border-color: var(--oconsoft-red); background: var(--oconsoft-red); }
.button-primary:hover { background: var(--oconsoft-red-darker); }
.button-primary:active { background: var(--oconsoft-red-darkest); }
.button-secondary { color: var(--ink); background: white; }
.button-secondary:hover { border-color: #bfc3c7; background: #f7f7f7; }
.add-solution-button { min-height: 44px; gap: 10px; padding: 0 12px; color: var(--ink); background: var(--paper); white-space: nowrap; }
.add-solution-button:hover { border-color: #aeb3b7; background: #fafafa; box-shadow: 0 2px 6px rgba(37,37,37,.06); }
.add-solution-button:active { background: #ededed; box-shadow: none; }
.add-solution-button:focus-visible { outline: 2px solid var(--oconsoft-red); outline-offset: 3px; }
.add-solution-plus { margin-left: 4px; color: var(--muted); font-size: 20px; font-weight: 400; line-height: 1; }
.add-buttons .geometry-icon { width: 22px; height: 22px; flex-shrink: 0; }

.solution-column-headings, .solution-row { display: grid; grid-template-columns: 30px 50px minmax(280px, 1fr) minmax(300px, 1.3fr) minmax(300px, 1.1fr) 32px; column-gap: 15px; }
.solution-column-headings { padding: 0 19px 9px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.solutions-list { display: grid; gap: 12px; }
.solution-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 5px 20px rgba(37,37,37,.035); }
.solution-row { min-height: 112px; padding: 16px 18px; align-items: start; }
.expand-button { width: 30px; height: 30px; padding: 0; border: 0; color: var(--muted); background: none; font-size: 27px; }
.expand-button svg { display: block; width: 16px; height: 16px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.expand-button[aria-expanded=true] svg { transform: rotate(90deg); }
.geometry-cell { padding-top: 21px; display: grid; grid-template-columns: 40px; gap: 8px; align-items: center; min-width: 0; }
.geometry-icon { display: block; width: 40px; height: 40px; object-fit: contain; }
.geometry-select { height: 40px; padding: 0 7px; border-color: transparent; font-size: 12px; font-weight: 700; background: #f0f0f0; }
.dimensions-cell { display: grid; grid-template-columns: repeat(2, minmax(78px, 1fr)); gap: 7px; }
.dimensions-cell label:only-of-type { grid-column: 1 / -1; }
.dimensions-cell label > span:first-child { font-size: 9px; }
.dimension-summary { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; }
.solution-row label > span:first-child { height: 14px; min-height: 14px; line-height: 14px; }
.product-summary, .result-cell { display: grid; gap: 5px; min-width: 0; }
.product-summary strong, .result-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.product-summary small, .result-cell small { color: var(--muted); font-size: 10px; }
.result-cell strong { font-family: "Manrope"; font-size: 18px; letter-spacing: -.035em; }
.icon-button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 20px; line-height: 1; }
.icon-button.danger { color: var(--danger); }
.icon-button:disabled { cursor: not-allowed; opacity: .35; }

.layers-panel { padding: 20px 22px 22px 65px; border-top: 1px solid var(--line); background: #f7f7f7; }
.layers-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.layers-heading h3 { margin: 4px 0 0; font-size: 16px; }
.layer-row { display: grid; grid-template-columns: 28px minmax(130px,.65fr) minmax(250px,2.4fr) 34px; gap: 12px; align-items: end; padding: 13px 0; border-top: 1px solid var(--line); }
.layer-index { align-self: center; color: var(--oconsoft-red); font-family: "Manrope"; font-weight: 700; }
.conductivity input { min-width: 80px; }
.api-notice { margin: 0 0 12px; padding: 10px 13px; color: #5a4a1d; border: 1px solid #eadb9f; border-radius: 8px; background: #fff9df; font-size: 11px; }

.cumulative-bar { position: fixed; right: clamp(14px, 3vw, 48px); bottom: 22px; z-index: 15; min-width: min(500px, calc(100vw - 28px)); padding: 16px 19px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: white; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(37,37,37,.96); box-shadow: 0 18px 46px rgba(37,37,37,.28); backdrop-filter: blur(14px); }
.cumulative-bar > div { display: flex; align-items: center; gap: 12px; }
.cumulative-bar > div > div { display: grid; }
.cumulative-bar small { color: #bfc3c7; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.cumulative-bar > div strong { font-size: 12px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(228,21,21,.12); }
.cumulative-value { font-family: "Manrope"; font-size: 25px; letter-spacing: -.04em; }
.cumulative-value small { font-family: "DM Sans"; font-size: 11px; }
.empty-state { padding: 70px 24px; text-align: center; border: 1px dashed #cccccc; border-radius: 14px; background: rgba(255,255,255,.55); }
.empty-state h1, .empty-state h2 { margin: 7px auto 22px; }

.loading-screen { min-height: 55vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.loading-mark { display: flex; align-items: end; gap: 4px; height: 28px; }
.loading-mark span { width: 7px; height: 12px; border-radius: 5px; background: var(--oconsoft-red); animation: load 1s ease-in-out infinite alternate; }
.loading-mark span:nth-child(2) { height: 24px; animation-delay: .18s; }
.loading-mark span:nth-child(3) { height: 17px; animation-delay: .36s; }
@keyframes load { to { height: 7px; opacity: .4; } }

#blazor-error-ui { display: none; position: fixed; inset: auto 16px 16px; z-index: 100; padding: 13px 16px; color: white; background: var(--danger); border-radius: 9px; }
#blazor-error-ui .reload { margin-left: 10px; }
#blazor-error-ui .dismiss { float: right; margin-left: 14px; color: white; border: 0; background: none; }

@media (max-width: 1180px) {
    .page-heading { grid-template-columns: 1fr; gap: 28px; }
    .ambient-card { max-width: 700px; }

}

@media (max-width: 760px) {
    .app-header { height: 66px; padding: 0 18px; }
    .account-menu > span { display: none; }
    .app-main { width: calc(100% - 24px); padding-top: 28px; }
    .page-heading h1 { font-size: 40px; }
    .ambient-card { grid-template-columns: 1fr 1fr; }
    .ambient-heading { grid-column: 1 / -1; }
    .solutions-toolbar { align-items: stretch; flex-direction: column; }
    .add-buttons { justify-content: flex-start; }
    .layers-panel { padding: 18px; }
    .layer-row { grid-template-columns: 25px 1fr 32px; }
    .layer-row label { grid-column: 2; }
    .layer-row .icon-button { grid-column: 3; grid-row: 1; }
    .cumulative-bar { left: 14px; right: 14px; bottom: 14px; min-width: 0; }
}

.medium-cell { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(110px, 1fr); gap: 7px; min-width: 0; }
.solution-card > .result-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 22px; border-top: 1px solid var(--line); }
.solution-card > .result-cell small { overflow-wrap: anywhere; }
.layer-row label > strong { display: flex; align-items: center; min-height: 40px; font-size: 14px; }

.solution-table-scroll { overflow-x: auto; padding-bottom: 6px; }
.solution-table { min-width: 1100px; }
.solution-row > .expand-button, .solution-row > .remove-solution { margin-top: 25px; }

.wind-direction-help { grid-column: 1 / -1; color: #bfc3c7; font-size: 11px; line-height: 1.5; }

.view-menu { display: flex; align-items: center; gap: 4px; margin-right: auto; margin-left: 32px; }
.view-menu-link { padding: 10px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.view-menu-link:hover { background: var(--canvas); color: var(--ink); }
.view-menu-link.active { background: var(--selection); color: var(--oconsoft-red-darker); }
.view-menu-link:focus-visible { outline: 2px solid var(--oconsoft-red); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
    .app-header { height: auto; min-height: 66px; flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
    .view-menu { order: 3; width: 100%; margin: 0; }
}

.product-search-status { font-size: 11px; color: var(--muted); line-height: 1.5; }
.layer-row { align-items: start; }
.layer-row > .icon-button { margin-top: 22px; }


.focus-select { min-width: 0; }
.focus-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; height: 40px; padding: 0 11px; text-align: left; border: 1px solid #d8d8d8; border-radius: 8px; color: var(--ink); background: white; }
.focus-select-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-select-trigger:focus { outline: none; border-color: var(--oconsoft-red); box-shadow: 0 0 0 3px rgba(228,21,21,.14); }
.focus-select-trigger:disabled { cursor: not-allowed; color: var(--muted); background: #f0f0f0; }
.focus-select-arrow { display: block; flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); transition: transform .15s ease; }
.focus-select-trigger[aria-expanded=true] .focus-select-arrow { transform: rotate(180deg); }
.focus-select-options { position: fixed; inset: auto; z-index: 100; margin: 0; padding: 4px; list-style: none; overflow-y: auto; border: 1px solid #cccccc; border-radius: 8px; color: var(--ink); background: white; box-shadow: var(--shadow); }
.focus-select-options li { padding: 9px 10px; font-size: 13px; line-height: 1.45; white-space: normal; border-radius: 4px; cursor: pointer; overflow-wrap: anywhere; }
.focus-select-options li.active, .focus-select-options li:hover { background: var(--selection); }
.focus-select-options li[aria-selected=true] { font-weight: 700; }
.focus-select-options li.focus-select-status { color: var(--muted); cursor: default; background: transparent; }


.round-dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rectangular-dimensions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.solution-row > .solution-settings-button { margin-top: 25px; }
.solution-settings-button svg { width: 20px; height: 20px; fill: currentColor; vertical-align: middle; }
.solution-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.solution-settings-heading h3 { margin: 4px 0 0; font-size: 18px; }
.solution-settings-delete { margin-top: 4px; color: var(--danger); background: #fff5f3; border-color: #e9cfcb; }
.extra-layers-empty { margin: 0; font-size: 12px; color: var(--muted); }

.solution-settings-dialog { width: min(960px, calc(100vw - 32px)); height: min(680px, calc(100dvh - 40px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; box-shadow: 0 24px 90px rgba(37,37,37,.28); }
.solution-settings-dialog[open] { display: flex; flex-direction: column; }
.solution-settings-dialog::backdrop { background: rgba(0,0,0,.42); }
.solution-settings-dialog .solution-settings-heading { padding: 24px 28px; border-bottom: 1px solid var(--line); flex: none; }
.solution-settings-heading h2 { margin: 5px 0 0; font-size: 24px; }
.solution-settings-body { display: grid; grid-template-columns: 210px minmax(0,1fr); flex: 1; min-height: 0; }
.solution-settings-tabs { padding: 20px 12px; background: #f7f7f7; border-right: 1px solid var(--line); }
.solution-settings-tabs button { display: block; width: 100%; padding: 13px 12px; margin-bottom: 4px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; }
.solution-settings-tabs button[aria-selected=true] { background: var(--selection); color: var(--oconsoft-red-darker); }
.solution-settings-tabs button:focus-visible { outline: 2px solid var(--oconsoft-red); outline-offset: -2px; }
.solution-settings-panel { min-width: 0; overflow-y: auto; padding: 28px; }
.solution-settings-panel h3 { margin: 0 0 12px; font-size: 20px; }
.settings-help { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; margin: 22px 0; }
.settings-toggle { display: flex; align-items: center; gap: 12px; margin: 24px 0; padding: 16px; border-radius: 8px; background: #f7f7f7; }
.settings-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--oconsoft-red); flex: none; }
.settings-toggle > span { font-size: 14px; text-transform: none; letter-spacing: normal; }
.settings-layer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.solution-settings-panel .layer-row { grid-template-columns: 24px minmax(110px,.55fr) minmax(160px,1fr) 32px; gap: 10px; }
.settings-result { display: flex; justify-content: space-between; padding: 18px; background: var(--selection); border-radius: 8px; }
.solution-settings-footer { display: flex; align-items: center; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--line); flex: none; }
.settings-save-status { margin-right: auto; max-width: 480px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.solution-settings-footer .solution-settings-delete { margin: 0; }
@media (max-width: 700px) {
    .solution-settings-dialog { width: calc(100vw - 16px); height: calc(100dvh - 24px); }
    .solution-settings-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
    .solution-settings-tabs { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
    .solution-settings-tabs button { width: auto; flex: none; margin: 0; white-space: nowrap; padding: 10px; }
    .solution-settings-panel { padding: 20px; }
    .settings-fields { grid-template-columns: 1fr; }
    .solution-settings-dialog .solution-settings-heading, .solution-settings-footer { padding: 16px; }
    .solution-settings-footer { flex-wrap: wrap; }
    .settings-save-status { width: 100%; max-width: none; }
    .solution-settings-panel .layer-row { grid-template-columns: 24px minmax(0,1fr) 32px; }
    .solution-settings-panel .layer-row label { grid-column: 2; }
}

.support-settings-fields { min-width: 0; padding: 0; margin: 0; border: 0; }
.support-settings-fields:disabled { opacity: .6; }

.solution-settings-tabs { overflow-y: auto; }
.calculation-result-group h4 { margin: 24px 0 12px; font-size: 15px; }
.calculation-result-values { margin: 0; }
.calculation-result-values > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(100px,.7fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.calculation-result-values dt { color: var(--muted); }
.calculation-result-values dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.calculation-result-notes { padding-left: 20px; font-size: 13px; line-height: 1.7; }
.calculation-error { color: var(--danger); font-size: 14px; line-height: 1.6; }

.calculation-result-highlights { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.calculation-result-highlights > div { display: grid; gap: 8px; padding: 16px; background: #f7f7f7; border: 1px solid var(--line); border-radius: 8px; }
.calculation-result-highlights span { font-size: 12px; color: var(--muted); }
.calculation-result-highlights strong { font-size: 18px; }
@media (max-width: 500px) { .calculation-result-highlights { grid-template-columns: 1fr; } }

.wind-direction-preview { margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f7f7f7; }
.wind-preview-heading { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: 12px; color: var(--muted); }
.wind-preview-heading strong { color: var(--oconsoft-red-darker); }
.wind-direction-diagram { display: block; width: 100%; height: 210px; }
.wind-solution-body { fill: #e0e0e0; stroke: #8c8c8c; stroke-width: 1.5; }
.wind-solution-end, .wind-duct-end { fill: #c7c7c7; stroke: #8c8c8c; stroke-width: 1.5; }
.wind-solution-inner { fill: #ffffff; stroke: #8c8c8c; stroke-width: 1; }
.wind-duct-top { fill: #eeeeee; stroke: #8c8c8c; stroke-width: 1.5; }
.wind-pipe-highlight { fill: none; stroke: #ffffff; stroke-width: 2; }
.wind-reference-axis path { fill: none; stroke: #999999; stroke-dasharray: 3 4; }
.wind-gravity-arrow { stroke: #999999; stroke-width: 1.5; fill: none; }
.wind-svg-label, .wind-still-label { font-size: 10px; fill: #6c757d; }
.wind-stream { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-dasharray: 10 7; animation: wind-flow var(--wind-duration,1.5s) linear infinite; }
.wind-direction-preview figcaption { display: grid; gap: 5px; padding: 14px 18px; border-top: 1px solid var(--line); }
.wind-direction-preview figcaption strong { font-size: 13px; color: var(--oconsoft-red-darker); }
.wind-direction-preview figcaption span { font-size: 11px; line-height: 1.6; color: var(--muted); }
@keyframes wind-flow { to { stroke-dashoffset: -34; } }
@media (prefers-reduced-motion: reduce) { .wind-stream { animation: none; } }
