html.contact-is-open { overflow: hidden; }
html.contact-is-open body {
  position: fixed;
  top: var(--contact-scroll-top, 0);
  left: var(--contact-scroll-left, 0);
  right: 0;
  width: 100%;
  overflow: hidden;
}
.contact-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .76); }
.contact-dialog:not([open]) { display: none; }
.contact-dialog {
  position: fixed;
  inset: 0;
  width: min(680px, calc(100% - 40px));
  height: fit-content;
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #000;
  background: var(--paper, #f9f6ef);
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
  font: inherit;
  line-height: 1.45;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
.contact-dialog::backdrop { background: rgba(0, 0, 0, .76); }
.contact-dialog[data-fallback] { z-index: 80; }
.contact-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 10px 32px;
  background: var(--paper, #f9f6ef);
  border-bottom: 1px solid rgba(0, 0, 0, .16);
}
.contact-dialog-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.contact-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 0 6px 12px;
  color: #000;
  background: none;
  border: 0;
  font-size: 14px;
}
.contact-dialog-close svg { width: 20px; height: 20px; }
.contact-dialog-content { padding: 30px 32px 28px; }
.contact-dialog-title { margin: 0; font-size: clamp(28px, 4vw, 38px); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; }
.contact-dialog-intro { margin: 13px 0 27px; color: #53514c; font-size: 14px; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-field { min-width: 0; }
.contact-field-wide { grid-column: 1 / -1; }
.contact-field > label, .contact-budget-heading label, .contact-service-group legend { display: block; margin-bottom: 8px; color: #000; font-size: .9375rem; font-weight: 700; line-height: 1.4; }
.contact-optional, .contact-requirement { color: #57554f; font-size: .8125rem; font-weight: 400; }
.contact-requirement { display: inline-block; margin-left: .25rem; }
.contact-field-hint + textarea { margin-top: 8px; }
.contact-service-group { margin: 0; padding: 0; border: 0; }
.contact-service-group legend { padding: 0; }
.contact-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.contact-options label {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; margin: 0; padding: 8px 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: .9375rem; line-height: 1.35;
  --selection-bg: Highlight;
  --selection-text: HighlightText;
}
.contact-option-icon { flex: none; width: 1rem; height: 1rem; margin-inline-start: auto; }
.contact-options .contact-option-text { overflow-wrap: anywhere; }
.contact-options input {
  color-scheme: dark;
  accent-color: var(--paper);
  flex: none; width: 17px; height: 17px; margin: 0;
}
.contact-options label:has(input:checked) { box-shadow: inset 0 0 0 2px currentColor; }
.contact-options label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) {
  .contact-options label:hover { color: var(--paper); background: #272727; }
}
@media (forced-colors: active) {
  .contact-options label { border: 3px solid ButtonText; }
  .contact-options label:has(input:checked) { border: 3px double Highlight; }
  .contact-options label:has(input:focus-visible) { outline-color: Highlight; }
}
@media (max-width: 420px) {
  .contact-options label { gap: 8px; padding: 8px; }
}
@media (max-width: 350px) {
  .contact-options { grid-template-columns: minmax(0, 1fr); }
}
.contact-budget-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; }
.contact-budget-heading label { margin: 0; }
.contact-budget-heading output { color: #36342e; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.contact-field:has(input[type="range"][data-selected="true"]) .contact-budget-heading output { font-weight: 700; }
.contact-field input[type="range"] { display: block; width: 100%; height: 44px; margin: 0; padding: 0; accent-color: var(--ink, #000); cursor: pointer; }
.contact-field input[type="range"]:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (forced-colors: none) {
  .contact-field input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    --budget-track: linear-gradient(to right, var(--ink) var(--budget-progress, 0%), #79766d var(--budget-progress, 0%));
  }
  .contact-field input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: var(--budget-track);
  }
  .contact-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    margin-top: -9px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 1px var(--ink);
  }
  .contact-field input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--budget-track);
  }
  .contact-field input[type="range"]::-moz-range-thumb {
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 1px var(--ink);
  }
}
.contact-error-summary {
  margin: 0 0 24px; padding: 14px 18px; border-left: 3px solid #000; background: #efece4;
}
.contact-error-summary:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.contact-error-summary h3 { margin: 0; font-size: 1rem; }
.contact-error-summary ul { margin: 6px 0 0; padding-left: 20px; }
.contact-error-summary a, .contact-fallback a { text-decoration: underline; text-underline-offset: 3px; }
.contact-error-summary a { display: inline-block; padding-block: 3px; font-size: .875rem; }
.contact-fallback { margin-top: 18px; font-size: .875rem; }
.contact-success strong { overflow-wrap: anywhere; }
.contact-field input:not([type="radio"], [type="range"]), .contact-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 13px;
  color: #000;
  background: rgba(255, 255, 255, .38);
  border: 1px solid #858176;
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-appearance: none;
  appearance: none;
}
.contact-field textarea { min-height: 124px; resize: vertical; }
.contact-field input:not([type="radio"], [type="range"])::placeholder, .contact-field textarea::placeholder { color: #77736b; opacity: 1; }
.contact-field input:not([type="radio"], [type="range"]):focus, .contact-field textarea:focus { border-color: #000; outline: 2px solid #000; outline-offset: 2px; }
.contact-field input:not([type="radio"], [type="range"])[aria-invalid="true"], .contact-field textarea[aria-invalid="true"] { border-color: #000; box-shadow: inset 0 0 0 1px #000; }
.contact-field input:not([type="radio"], [type="range"]):disabled, .contact-field textarea:disabled { color: #37352f; background: #efece4; opacity: 1; -webkit-text-fill-color: #37352f; }
.contact-field-hint, .contact-field-error { margin: 7px 0 0; font-size: .875rem; line-height: 1.45; }
.contact-field-hint { color: #62605a; }
.contact-field-error { color: #000; font-weight: 700; }
.contact-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
.contact-feedback { margin: 22px 0 0; padding: 13px 15px; border-left: 2px solid #000; background: #efece4; color: #000; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.contact-submit, .contact-success-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 54px;
  margin-top: 25px;
  padding: 16px 20px;
  border: 1px solid #000;
  background: #000;
  color: var(--paper, #f9f6ef);
  font-size: 15px;
  line-height: 1.4;
}
.contact-submit:hover:not(:disabled), .contact-success-close:hover { background: #272727; }
.contact-submit:disabled { cursor: wait; }
.contact-submit-arrow { transition: transform .2s ease; }
.contact-submit:hover:not(:disabled) .contact-submit-arrow { transform: translate(2px, -2px); }
.contact-pending-mark { width: 18px; height: 18px; flex-shrink: 0; border: 1px solid rgba(249, 246, 239, .4); border-top-color: var(--paper, #f9f6ef); border-radius: 50%; animation: contact-spin .8s linear infinite; }
@keyframes contact-spin { to { transform: rotate(360deg); } }
.contact-privacy-note { margin: 18px 0; color: #62605a; font-size: 12px; line-height: 1.5; }
.contact-privacy-note a { text-decoration: underline; text-underline-offset: 3px; }
.contact-success > p { margin: 18px 0 0; max-width: 45ch; font-size: 17px; line-height: 1.5; }
.contact-success .contact-reference { margin-top: 22px; color: #62605a; font-size: 12px; overflow-wrap: anywhere; }
.contact-success-close { justify-content: center; margin-top: 28px; }
.contact-new-message { display: block; min-height: 44px; margin: 8px auto 0; padding: 8px 12px; border: 0; background: none; color: #000; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.contact-dialog button:focus-visible, .contact-dialog a:focus-visible, .contact-dialog [tabindex="-1"]:focus-visible { outline: 2px solid #000; outline-offset: 4px; }
.contact-dialog #contact-dialog-title:focus { outline: none; }
.contact-dialog .contact-submit:focus-visible, .contact-dialog .contact-success-close:focus-visible { outline-color: #000; }
@media (max-width: 620px) {
  .contact-dialog { width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .contact-dialog-header { padding: 8px 22px; min-height: 61px; }
  .contact-dialog-content { padding: 25px 22px 23px; }
  .contact-dialog-title { max-width: 15ch; font-size: clamp(28px, 8vw, 35px); }
  .contact-dialog-intro { margin-bottom: 24px; }
  .contact-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .contact-field input:not([type="radio"], [type="range"]), .contact-field textarea { font-size: 16px; }
  .contact-field textarea { min-height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-pending-mark { animation: none; }
  .contact-submit-arrow { transition: none; }
}

.contact-case:not([hidden]) { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 16px; border-block: 1px solid #c7c3bb; padding: 10px 0; }
.contact-case > span { grid-column: 1; color: #55534e; font-size: 12px; }
.contact-case strong { grid-column: 1; font-size: 15px; }
.contact-case button { grid-column: 2; grid-row: 1/span 2; min-height: 44px; padding: 0 5px; color: #474540; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }

.contact-details { border-block: 1px solid rgba(0,0,0,.2); }
.contact-details summary {
  display: flex; align-items: center; gap: 6px;
  min-height: 46px; padding: 8px 0; list-style: none; cursor: pointer;
  font-size: 14px; font-weight: 700;
}
.contact-details summary::-webkit-details-marker { display: none; }
.contact-details summary::after {
  content: ""; width: 9px; height: 9px; margin-left: auto; margin-right: 4px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.contact-details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.contact-details summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.quote-page { width: min(100%, 728px); margin: clamp(24px,5vw,72px) auto; }
.quote-page .contact-dialog-content { padding: 0 var(--page-gutter); }
.quote-page .contact-dialog-title { max-width: none; font-size: clamp(38px,6vw,66px); line-height: 1; }
.quote-page .contact-dialog-intro { max-width: 54ch; font-size: 16px; line-height: 1.5; }
.quote-shell .site-footer { border-top: 1px solid rgba(0,0,0,.2); }
@media (max-width: 620px) {
  .contact-field textarea { min-height: 92px; }
  .quote-page { margin-block: 32px 48px; }
}

.contact-brief-field { padding: 6px 0 16px; }
.quote-page noscript a { text-decoration: underline; text-underline-offset: 3px; }

.contact-column, .contact-actions { display: contents; }
.contact-column-title, .contact-budget-scale { display: none; }

@media (min-width: 1024px) {
  .contact-dialog:has(#contact-form-panel:not([hidden])),
  .quote-page:has(#contact-form-panel:not([hidden])) {
    width: min(1346px, calc(100% - 64px));
  }
  .quote-page .contact-dialog-content { padding-inline: 32px; }
  #contact-form-panel .contact-dialog-title { font-size: clamp(38px, 3.3vw, 48px); }
  .contact-dialog-intro, .quote-page .contact-dialog-intro {
    max-width: none; font-size: 16px; margin: 12px 0 32px;
  }
  .contact-intro-detail { display: none; }
  .contact-fields {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 0;
  }
  .contact-column {
    display: flex; flex-direction: column; gap: 20px; min-width: 0;
    padding-inline: clamp(16px, 1.7vw, 28px);
  }
  .contact-column:first-of-type { padding-inline-start: 0; }
  .contact-column + .contact-column { border-inline-start: 1px solid #cbc7bc; }
  .contact-column:has(.contact-details) { padding-inline-end: 0; }
  .contact-column-title {
    display: block; margin: 0 0 4px; font-size: 13px; font-weight: 500;
    line-height: 1.4; letter-spacing: .08em; text-transform: uppercase;
  }
  .contact-column-title::after {
    content: ""; display: block; width: 36px; margin-top: 12px; border-bottom: 2px solid var(--ink);
  }
  .contact-options label {
    padding: 8px 10px; gap: 8px; color: var(--ink); background: #fefdf9; border-color: #aaa69b;
  }
  .contact-options input { color-scheme: light; accent-color: var(--ink); }
  .contact-option-icon { display: none; }
  .contact-options label:has(input:checked) {
    color: var(--paper); background: var(--ink); border-color: var(--ink); box-shadow: none;
  }
  .contact-options input:checked { color-scheme: dark; accent-color: var(--paper); }
  .contact-options label:hover { border-color: var(--ink); }
  .contact-budget-scale { display: flex; justify-content: space-between; gap: 8px; color: #57554f; font-size: 12px; }
  .contact-field textarea { min-height: 144px; }
  .contact-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    border-top: 1px solid #c7c3bb; margin-top: 28px; padding-top: 16px;
  }
  .contact-actions .contact-privacy-note { margin: 0; }
  .contact-actions .contact-submit { width: auto; min-width: 270px; margin: 0; }
}
