:root {
  --ink: #193444;
  --muted: #75838a;
  --teal: #276f68;
  --teal-dark: #205a55;
  --paper: #f7f8f5;
  --line: #e3e8e3;
  --coral: #be7259;
  --radius: 13px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); font-size: 14px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: #d4e9e1; }
:focus-visible { outline: 3px solid #4d9690; outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 10; padding: 14px 20px; border-radius: 7px; background: var(--ink); color: white; opacity: 0; pointer-events: none; }
.skip-link:focus { opacity: 1; pointer-events: auto; }
.site-header { min-height: 93px; padding: 21px max(36px, calc((100vw - 1272px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 15px; min-width: 0; text-decoration: none; }
.brand-symbol { display: block; width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; }
.brand-name { font-size: 25px; font-weight: 740; letter-spacing: -.8px; line-height: 1.1; }
.brand-name > span { display: block; font-size: 10px; font-weight: 500; letter-spacing: 1.65px; text-transform: uppercase; margin-top: 6px; color: #61737d; }
.header-meta { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #657681; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: #50948b; flex: 0 0 6px; }
.header-divider { height: 15px; width: 1px; background: var(--line); margin: 0 10px; }
.standard-tag { font-size: 10px; font-weight: 650; letter-spacing: .7px; color: var(--ink); }
.workspace { max-width: 1272px; margin: 0 auto; padding: 43px 0 55px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 31px; gap: 30px; }
.eyebrow { margin: 0 0 12px; font-size: 9px; line-height: 1.5; font-weight: 700; letter-spacing: 1.9px; color: var(--teal); }
h1 { margin: 0; font-size: clamp(27px, 2.9vw, 36px); line-height: 1.2; font-weight: 630; letter-spacing: -1.35px; }
.page-description { margin: 12px 0 0; line-height: 1.6; font-size: 13px; color: #6b7a80; }
.heading-marker { width: 169px; padding-top: 3px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: #bdc7c5; }
.heading-marker > span { font-size: 29px; letter-spacing: 4px; font-weight: 300; }
.heading-marker > div { height: 1px; background: #d5ded7; flex: 1; }
.heading-marker > small { font-size: 8px; font-weight: 600; letter-spacing: 1.4px; color: #8c9a99; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 362px; align-items: start; gap: 26px; }
#calculator-form { min-width: 0; }
.input-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 25px 29px 28px; margin-bottom: 17px; box-shadow: 0 2px 3px #183b3503; }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 23px; }
.section-number { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; height: 32px; border: 1px solid #dce7e0; border-radius: 9px; background: #f5f8f3; color: var(--teal); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
h2 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.4; letter-spacing: -.3px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.section-icon { margin-left: auto; width: 25px; height: 25px; fill: none; stroke: #a6b8b6; stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 23px; row-gap: 18px; }
.field { min-width: 0; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 11px; line-height: 1.5; font-weight: 600; color: #425963; }
.label-unit { color: #92a09f; font-size: 10px; font-weight: 400; }
.control { width: 100%; min-width: 0; min-height: 44px; padding: 10px 13px; color: var(--ink); background: #fcfdfb; border: 1px solid #dce3dc; border-radius: 7px; transition: background .15s, border-color .15s, box-shadow .15s; }
.control:hover { border-color: #aebfba; }
.control:focus { border-color: #57948a; background: white; box-shadow: 0 0 0 3px #578e8214; outline: none; }
.control:user-invalid { border-color: #bd6c59; }
select.control { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%23748687' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field-hint { font-size: 10px; color: #8a979b; line-height: 1.5; margin: 7px 0 0; }
.field-error { color: #a6523d; font-size: 11px; margin: 7px 0 0; line-height: 1.5; }
.glazing-field { max-width: calc(50% - 12px); margin-bottom: 21px; }
.air-gap-field { max-width: calc(50% - 12px); margin-bottom: 21px; }
.lite-list { display: grid; gap: 18px; }
.lite-card { padding: 20px; margin: 0; border: 1px solid #e1e7e1; border-radius: 9px; background: #f9fbf8; min-width: 0; }
.lite-card legend { max-width: 100%; padding: 0 8px; margin-left: -4px; }
.lite-index { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; color: var(--teal); }
.lite-description { margin-left: 10px; font-size: 10px; color: #84928e; }
.lite-card .control { background-color: white; }
.full-field { grid-column: 1 / -1; max-width: calc(50% - 12px); }
.laminate-build-up { grid-column: 1 / -1; display: flex; align-items: center; gap: 13px; border-top: 1px solid #e2e9e0; padding-top: 16px; margin-top: 2px; }
.laminate-symbol { display: flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 2px 5px; }
.laminate-symbol span { width: 6px; height: 32px; background: #bfd9d2; border: 1px solid #80b2a6; transform: skewY(-15deg); border-radius: 1px; }
.laminate-symbol i { width: 3px; height: 32px; background: #ce9a77; transform: skewY(-15deg); }
.laminate-build-up p { margin: 0; color: #6d827a; font-size: 11px; line-height: 1.6; }
.laminate-build-up strong { margin-right: 8px; font-size: 10px; font-weight: 650; color: #526d60; }
.laminate-build-up .nominal-equivalent { display: block; margin-top: 2px; font-size: 10px; color: #8b9990; }
.configuration-refresh { display: inline-flex; margin-top: 17px; padding: 7px 0; border: 0; background: transparent; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; font-size: 11px; }
.js .configuration-refresh { display: none; }
.calculation-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 23px 0 0; }
.calculation-actions > p { margin: 0; font-size: 11px; line-height: 1.7; color: #87918a; max-width: 240px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 48px; min-width: 215px; padding: 14px 22px; border: 1px solid var(--teal); border-radius: 8px; background: var(--teal); color: white; font-size: 12px; font-weight: 600; box-shadow: 0 4px 8px #1b595619; transition: background .15s, transform .15s; }
.primary-button:hover:enabled { background: var(--teal-dark); }
.primary-button:active:enabled { transform: translateY(1px); }
.button-arrow { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.button-spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #ffffff40; border-top-color: white; animation: spinner 700ms linear infinite; }
.htmx-indicator { display: none; }
.htmx-request.htmx-indicator, .htmx-request .htmx-indicator { display: inline-block; }
.htmx-request .button-arrow { display: none; }
@keyframes spinner { to { transform: rotate(360deg); } }
.review-column { display: grid; gap: 18px; min-width: 0; }
.preview-card { overflow: hidden; padding: 23px 23px 19px; background: #eff4ed; border: 1px solid #dfe7dc; border-radius: var(--radius); }
.preview-heading { display: flex; align-items: center; justify-content: space-between; }
.preview-heading h2 { font-size: 13px; font-weight: 600; }
.preview-heading > span { font-size: 8px; letter-spacing: 1.4px; font-weight: 600; color: #91a191; }
.preview-key { display: flex; justify-content: center; gap: 23px; font-size: 9px; color: #748a7a; margin-top: 8px; }
.preview-key > span { display: flex; align-items: center; gap: 7px; }
.support-key { display: inline-block; width: 11px; height: 3px; background: #2b7066; }
.glass-key { display: inline-block; width: 9px; height: 9px; background: #c7dfd3; border: 1px solid #9fbeae; }
.preview-note { margin: 13px 0 0; color: #98a696; text-align: center; font-size: 9px; }
.results-card { padding: 25px 23px; border: 1px solid #dce5df; border-radius: var(--radius); background: white; box-shadow: 0 2px 3px #183b3503; }
.results-empty { padding: 26px 23px 0; }
.empty-result-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: #f1f6f0; margin-bottom: 20px; }
.empty-result-icon svg { width: 25px; height: 25px; stroke: #6d9583; stroke-width: 1; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.results-empty .eyebrow { font-size: 8px; letter-spacing: 1.3px; margin-bottom: 7px; color: #779588; }
.results-empty h2 { font-size: 19px; font-weight: 600; letter-spacing: -.55px; }
.results-empty > p:not(.eyebrow) { color: #829187; font-size: 11px; line-height: 1.8; margin: 10px 0 22px; max-width: 255px; }
.empty-result-footer { display: flex; align-items: center; gap: 9px; padding: 17px 0; border-top: 1px solid #e5ebe3; color: #95a094; font-size: 9px; }
.empty-result-footer .status-dot { background: #b6c8b5; width: 5px; height: 5px; flex-basis: 5px; }
.workspace-note { display: flex; align-items: flex-start; gap: 9px; padding: 0 4px; color: #98a197; }
.workspace-note svg { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 15px; stroke: #91a392; stroke-width: 1.1; stroke-linecap: round; fill: none; }
.workspace-note p { margin: 0; font-size: 10px; line-height: 1.8; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.results-heading .eyebrow { font-size: 8px; letter-spacing: 1.3px; margin-bottom: 5px; }
.results-heading h2 { font-size: 21px; letter-spacing: -.65px; }
.report-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; background: #edf5ec; }
.report-icon svg { width: 22px; height: 22px; fill: none; stroke: #688f7a; stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; }
.result-summary { padding: 16px; border-radius: 8px; background: #f5f8f2; display: grid; gap: 14px; margin-bottom: 24px; }
.result-summary > div { display: grid; gap: 5px; }
.result-summary span { font-size: 9px; color: #83927c; }
.result-summary strong { font-size: 25px; font-weight: 550; letter-spacing: -.7px; color: #365344; font-variant-numeric: tabular-nums; }
.result-summary small { font-size: 10px; font-weight: 400; letter-spacing: 0; color: #829280; }
.result-summary .dimension-summary { font-size: 14px; letter-spacing: 0; }
.lite-result + .lite-result { margin-top: 23px; padding-top: 20px; border-top: 1px solid #dfe8de; }
.lite-result-heading h3 { margin: 0; font-size: 12px; font-weight: 650; line-height: 1.7; }
.lite-result-heading h3 > span { font-size: 10px; font-weight: 400; color: #82917e; margin-left: 8px; }
.lite-result-heading p { color: #8b9886; font-size: 10px; line-height: 1.5; margin: 2px 0 0; }
.result-build-up { color: #82927b; font-size: 9px; line-height: 1.6; margin: 8px 0 0; }
.duration-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 19px 0 0; padding-bottom: 8px; border-bottom: 1px solid #e8ede5; }
.duration-heading > span:first-child { font-size: 8px; color: #738c7b; font-weight: 650; letter-spacing: .8px; }
.duration-heading > span:last-child { color: #9da99a; font-size: 8px; }
.result-metrics { margin: 0; }
.result-metrics > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf0e9; }
.result-metrics dt { color: #7e8d78; font-size: 10px; }
.result-metrics dd { margin: 0; font-size: 9px; color: #8e9b87; white-space: nowrap; }
.result-metrics dd > strong { font-size: 12px; color: #3f5647; font-weight: 650; font-variant-numeric: tabular-nums; }
.check-badge { display: inline-flex; justify-content: center; align-items: center; min-width: 34px; margin-left: 7px; padding: 3px 5px; border-radius: 4px; font-size: 8px; font-weight: 600; }
.check-pass { background: #e8f2e6; color: #518044; }
.check-fail { background: #f8eae1; color: #b56542; }
.deflection-limit { font-size: 9px; color: #9aa492; margin: 16px 0 20px; }
.result-notices { padding: 12px; background: #faf5e9; border: 1px solid #ebe2cb; border-radius: 7px; color: #9a875d; margin-bottom: 16px; }
.result-notices > summary { font-size: 10px; cursor: pointer; font-weight: 600; line-height: 1.5; }
.result-notices p { font-size: 10px; line-height: 1.7; margin: 10px 0 0; }
.calculation-trace { margin-top: 12px; color: #8a9986; }
.calculation-trace summary { cursor: pointer; font-size: 9px; line-height: 1.6; }
.calculation-trace dl { margin: 10px 0; padding: 10px; background: #f8faf5; border-radius: 5px; }
.calculation-trace dl > div { display: flex; justify-content: space-between; gap: 15px; font-size: 9px; line-height: 1.8; }
.calculation-trace dd { margin: 0; color: #56705b; font-variant-numeric: tabular-nums; }
.calculation-trace > p { margin: 0; font-size: 9px; line-height: 1.6; }
.download-button { display: flex; align-items: center; gap: 9px; width: 100%; justify-content: center; padding: 12px 11px; background: var(--teal); border: 1px solid var(--teal); border-radius: 7px; color: white; font-size: 10px; font-weight: 600; line-height: 1.4; }
.download-button:hover:enabled { background: var(--teal-dark); }
.download-button > svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.download-button > span { padding: 2px 4px; border: 1px solid #ffffff33; border-radius: 3px; font-size: 7px; font-weight: 400; margin-left: auto; }
.results-stale .download-button { cursor: not-allowed; }
.stale-notice { margin: 0 0 17px; background: #faf2e5; padding: 12px; border-radius: 6px; color: #a18255; font-size: 11px; line-height: 1.6; }
.error-card { border-color: #e6c7b6; background: #fffcf8; }
.error-card .eyebrow { color: #ba765a; font-size: 8px; letter-spacing: 1.3px; }
.error-card h2 { font-size: 18px; }
.error-card > p:not(.eyebrow) { font-size: 12px; line-height: 1.7; color: #9b7b63; }
.error-card .error-guidance { margin-bottom: 0; }
.validation-errors { padding-left: 15px; font-size: 11px; line-height: 1.7; color: #9b7b63; }
.validation-errors li + li { margin-top: 8px; }
.validation-errors a { color: #8e5a41; text-underline-offset: 2px; }
.validation-message { padding: 13px 16px; border: 1px solid #e6c7b6; border-radius: 8px; background: #fff8f1; color: #ac6a4d; font-size: 12px; line-height: 1.7; }
.validation-message .errorlist { padding-left: 15px; margin: 0; }
.request-error { margin: 0 0 15px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1272px; margin: 0 auto; padding: 21px 0 27px; border-top: 1px solid #e3e8df; color: #9ca799; font-size: 9px; }
.footer-dot { color: #bbc5b6; margin: 0 9px; }
.site-footer p { margin: 0; font-size: 9px; line-height: 1.7; color: #a1aa98; }

@media (min-width: 1450px) {
  .workspace { padding-top: 48px; }
  .page-heading { margin-bottom: 36px; }
  .calculator-layout { grid-template-columns: minmax(0, 1fr) 383px; gap: 29px; }
  .input-card { padding: 28px 32px 31px; }
  .fields-grid { row-gap: 22px; }
}
@media (max-width: 1344px) {
  .workspace { margin: 0 36px; }
  .site-footer { margin: 0 36px; }
}
@media (max-width: 1020px) {
  .site-header { min-height: 83px; padding: 19px 25px; }
  .workspace { margin: 0 25px; padding-top: 35px; }
  .site-footer { margin: 0 25px; }
  .calculator-layout { grid-template-columns: minmax(0, 1fr) 315px; gap: 20px; }
  .input-card { padding: 23px 22px; }
  .fields-grid { gap: 18px 15px; }
  .lite-card { padding: 17px; }
  .calculation-actions { flex-direction: column-reverse; align-items: stretch; gap: 13px; }
  .calculation-actions > p { max-width: none; text-align: center; }
  .primary-button { width: 100%; justify-content: space-between; }
  .preview-card, .results-card { padding-left: 20px; padding-right: 20px; }
  .heading-marker { display: none; }
}
@media (max-width: 810px) {
  .workspace { max-width: 680px; margin: 0 auto; padding: 31px 22px 40px; }
  .site-header { padding: 19px 22px; }
  .calculator-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .page-heading { margin-bottom: 26px; }
  h1 { font-size: 30px; line-height: 1.25; max-width: 490px; }
  .page-description { max-width: 470px; }
  .review-column { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .workspace-note { grid-column: 1 / -1; max-width: 440px; }
  .preview-card { padding-top: 21px; }
  .panel-illustration { margin-top: 23px; }
  .calculation-actions { flex-direction: row; align-items: center; }
  .primary-button { width: auto; min-width: 230px; }
  .calculation-actions > p { text-align: left; max-width: 260px; }
  .site-footer { margin: 0 22px; }
}
@media (max-width: 550px) {
  .site-header { min-height: 78px; padding: 17px 19px; }
  .brand-symbol { width: 42px; height: 42px; flex-basis: 42px; }
  .brand { gap: 12px; }
  .brand-name { font-size: 22px; }
  .brand-name > span { font-size: 8px; letter-spacing: 1.3px; }
  .header-meta { font-size: 0; gap: 0; }
  .header-meta > .status-dot, .header-divider { display: none; }
  .standard-tag { font-size: 8px; letter-spacing: .35px; }
  .workspace { padding: 28px 15px 34px; }
  .page-heading { padding: 0 4px; margin-bottom: 25px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.4px; margin-bottom: 12px; }
  h1 { font-size: 29px; letter-spacing: -1px; max-width: 330px; }
  .page-description { margin-top: 11px; font-size: 12px; line-height: 1.7; max-width: 330px; }
  .input-card { padding: 22px 19px; border-radius: 11px; margin-bottom: 14px; }
  .section-heading { margin-bottom: 21px; gap: 11px; }
  .section-number { flex-basis: 29px; height: 29px; font-size: 10px; }
  h2 { font-size: 15px; }
  .section-heading p { font-size: 10px; }
  .section-icon { width: 22px; height: 22px; }
  .fields-grid { column-gap: 13px; row-gap: 17px; }
  .field label { font-size: 10px; gap: 4px; }
  .label-unit { font-size: 9px; }
  .control { font-size: 13px; padding: 10px 11px; min-height: 45px; }
  select.control { padding-right: 26px; background-position: right 7px center; }
  .field-hint { font-size: 9px; }
  .glazing-field, .air-gap-field { max-width: none; }
  .lite-card { padding: 17px 14px; }
  .lite-card .fields-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .lite-card .full-field { max-width: none; }
  .lite-card .field label { font-size: 11px; }
  .lite-card .control { font-size: 13px; }
  .laminate-build-up p { font-size: 10px; }
  .laminate-build-up .nominal-equivalent { font-size: 9px; }
  .lite-description { font-size: 9px; margin-left: 6px; }
  .calculation-actions { flex-direction: column-reverse; align-items: stretch; gap: 13px; margin: 21px 4px 0; }
  .primary-button { width: 100%; min-height: 49px; font-size: 12px; }
  .calculation-actions > p { max-width: none; text-align: center; font-size: 10px; }
  .review-column { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .preview-card { display: block; }
  .results-card { padding: 24px; }
  .results-empty { padding-bottom: 0; }
  .results-empty > p:not(.eyebrow) { max-width: 290px; }
  .result-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; padding: 16px 13px; gap: 12px; }
  .result-summary .dimension-summary { font-size: 11px; line-height: 1.5; }
  .result-metrics dd > strong { font-size: 14px; }
  .result-metrics dt { font-size: 11px; }
  .result-metrics dd { font-size: 10px; }
  .check-badge { font-size: 9px; min-width: 37px; }
  .duration-heading > span:first-child { font-size: 8px; }
  .duration-heading > span:last-child { font-size: 9px; }
  .download-button { padding: 14px 12px; font-size: 11px; }
  .workspace-note { padding: 0 9px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 19px; padding-top: 21px; font-size: 9px; }
  .site-footer p { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
  .button-spinner { animation-duration: 1.8s; }
}
