@font-face {
    font-family: Montserrat;
    src: url('montserrat-regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: Montserrat;
    src: url('montserrat-semibold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
:root {
    color-scheme: light;
    --ink: #24211e;
    --muted: #635549;
    --line: #e4ddd5;
    --page: #faf8f5;
    --accent: #942b25;
    --accent-deep: #79231e;
    --light: #f1e9df;
    --white: #fff;
    --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 14px/1.6 Montserrat, Arial, sans-serif; }
a { color: var(--accent-deep); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.wrap { width: min(1124px, calc(100% - 56px)); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav a { font-size: 13px; font-weight: 600; }
.site-nav .brand img { display: block; width: clamp(120px, 16vw, 170px); height: auto; }
.page-head { padding: 46px 0 30px; display: flex; justify-content: space-between; align-items: end; gap: 12px 28px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 5.5vw, 40px); letter-spacing: -.035em; line-height: 1.18; }
.page-head h1 span { color: var(--accent); }
.page-head p { margin: 12px 0 0; color: var(--muted); max-width: 630px; }
.page-head > a { flex-shrink: 0; font-size: 14px; padding-bottom: 1px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 317px); align-items: start; gap: 20px; }
.calculator, .results { display: grid; gap: 16px; min-width: 0; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 26px); min-width: 0; box-shadow: 0 6px 30px #3d2b1910; }
h2 { margin: 0 0 14px; line-height: 1.24; font-size: clamp(20px, 3vw, 23px); letter-spacing: -.023em; }
h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.32; }
p { margin: 0 0 10px; }
.panel > :last-child, .help:last-child { margin-bottom: 0; }
.help { color: var(--muted); font-size: 13px; line-height: 1.55; margin-block: 9px 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0 12px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-top: 13px; }
.catalog-fields { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.catalog-fields label:not(:first-child) { margin-top: 8px; }
.catalog-fields .help { margin: 0; }
.fields label { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 0; font-size: 13px; font-weight: 650; }
.fields input:not([type="checkbox"]), select { width: 100%; min-height: 46px; border: 1px solid #807064; background: var(--white); color: var(--ink); border-radius: 7px; padding: 7px 9px; font-size: 16px; font-weight: 400; }
select { padding-right: 5px; }
::placeholder { color: var(--muted); font-size: .85em; }
.zone { border: 1px solid var(--line); background: var(--page); border-radius: 10px; padding: 2px 13px 12px; margin-bottom: 12px; }
.zone legend { color: var(--accent-deep); padding: 0 6px; font-size: 14px; font-weight: 750; }
.zone .zone-top { margin-top: 4px; }
.zone-layout-options { margin-top: 12px; }
.zone-layout-options summary { color: var(--accent-deep); cursor: pointer; font-weight: 600; }
.text-button { background: transparent; padding: 5px 0; border: 0; color: var(--accent-deep); text-decoration: underline; text-underline-offset: .18em; font-size: 13px; }
.remove-zone { margin-top: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: 8px 12px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 700; }
.button-primary { background: var(--accent); color: white; padding: 10px 18px; width: 100%; box-shadow: 0 4px 12px #932c2621; }
.button-primary:hover { background: var(--accent-deep); }
.button-light { background: var(--white); color: var(--accent-deep); border-color: #a68f7c; }
.button-light:hover { border-color: var(--accent); }
.button:disabled { opacity: .55; cursor: wait; }
.error, .notes { color: #763c22; }
.error { margin: 9px 0 0; }
.summary { position: sticky; top: 16px; background: linear-gradient(145deg, #faf7f2, #f0e9df); }
.calculate-bar { margin-bottom: 16px; }
.metrics { margin: 10px 0 14px; }
.metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 5px 14px; border-bottom: 1px solid var(--line); padding: 11px 0; }
.metrics dt { color: var(--muted); font-size: 13px; }
.metrics dd { margin: 0; text-align: right; font-size: 18px; font-weight: 760; font-variant-numeric: tabular-nums; }
.details-link { display: block; font-weight: 650; font-size: 14px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.report-actions .button { min-height: 36px; font-size: 12px; padding-inline: 8px; }
.results { margin: 24px 0 44px; scroll-margin-top: 14px; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 790px; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 7px; }
th { background: var(--light); font-weight: 650; }
.notes { background: #fdf4e9; border: 1px solid #efddc9; border-radius: 8px; margin: 12px 0 0; padding: 9px 12px 9px 29px; font-size: 14px; }
.notes li + li { margin-top: 4px; }
.filters { margin: 12px 0; }
.fields .checkbox { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 43px; align-self: end; }
.checkbox input { accent-color: var(--accent); width: 17px; height: 17px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)); gap: 8px; margin-top: 8px; }
.product { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 11px; overflow-wrap: anywhere; }
.product p { margin: 5px 0 0; font-size: 13px; }
.product .status { font-weight: 680; color: var(--accent-deep); }
.product-choice { min-height: 36px; font-size: 13px; margin-top: 10px; }
.product-choice[aria-pressed="true"] { background: var(--light); border-color: var(--accent); }
.selection-table { min-width: 0; table-layout: fixed; overflow-wrap: anywhere; }
.selection-table tbody th { background: transparent; }
.selection-table th:first-child { width: 50%; }
.export-selection { margin-top: 15px; }
.floor-layouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.floor-layout { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.floor-layout > div { overflow: auto; }
.floor-layout-diagram { display: block; max-width: 640px; width: 100%; min-width: 435px; height: auto; margin-inline: auto; }
@media (max-width: 860px) {
    .workspace { grid-template-columns: minmax(0, 1fr); }
    .summary { position: static; }
    .page-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 540px) {
    .wrap { width: calc(100% - 24px); }
    .page-head { padding: 24px 0 19px; }
    .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .catalog-fields > .help { grid-column: 1 / -1; }
    .fields label:has(select), .fields label:has([data-field="name"]), .fields .checkbox { grid-column: span 2; }
    .metrics dd { font-size: 16px; }
}
