:root {
  --navy: #10243a;
  --ink: #192d40;
  --muted: #526471;
  --paper: #f5f3ee;
  --red: #a9362e;
  --line: #dce0df;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
input, button, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid #c15c48; outline-offset: 3px; }
.wrap { max-width: 1112px; margin-inline: auto; padding-inline: 32px; }
.skip-link { position: absolute; left: 16px; top: -70px; padding: 12px; background: white; z-index: 1; }
.skip-link:focus { top: 12px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand strong { display: block; font-size: 16px; }
.brand small { display: block; font-size: 10px; letter-spacing: .12em; color: var(--muted); margin-top: 4px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 42px;
  background: var(--navy);
  border-radius: 9px;
  flex: none;
}
.brand-mark svg {
  width: 30px;
  fill: none;
  stroke: white;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-nav { display: flex; align-items: center; gap: 5px 14px; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 5px 8px; font-size: 14px; font-weight: 650; text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--red); text-decoration: underline; text-underline-offset: 6px; }
.result-actions { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-top: 16px; }
.result-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.hero.work-hero { padding-block: 28px 16px; }
.work-hero h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); }
.work-galleries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}
.work-galleries .work-gallery { margin: 0; overflow: hidden; }
.work-gallery figure { margin: 0; background: var(--navy); }
.work-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}
.work-gallery figcaption {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 6px 12px;
  background: white;
  text-align: center;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}
.work-gallery-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.work-gallery-controls .outline-button { padding-inline: 9px; }
.work-gallery-playback { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.work-gallery-playback button { min-width: 64px; }
.work-gallery-controls [data-gallery-direction="-1"] { justify-self: start; }
.work-gallery-controls [data-gallery-direction="1"] { justify-self: end; }
@media (max-width: 620px) {
  .work-galleries { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .work-gallery img { animation: work-photo-appear 280ms ease-out; }
}
@keyframes work-photo-appear {
  from { opacity: .6; }
}
.past-work-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.past-work-links .outline-button { display: inline-flex; align-items: center; text-decoration: none; }
.work-sponsorship { margin: 16px 0; text-align: center; }
.work-sponsorship-photos { display: flex; justify-content: center; gap: clamp(6px, 1.5vw, 12px); }
.work-sponsorship-photos img {
  display: block;
  width: auto;
  height: min(34vw, 285px);
  min-width: 0;
  object-fit: contain;
  border-radius: 8px;
}
.quote-summary { padding: 15px; border-radius: 8px; background: var(--paper); overflow-wrap: anywhere; }
.quote-summary h2 { margin: 0; font-size: 20px; }
.quote-summary p:last-of-type { margin-bottom: 0; }
@media (max-width: 540px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 3px; padding-block: 14px 3px; }
  .site-nav { margin-left: -8px; }
}
.hero, .estimator { max-width: 740px; margin-inline: auto; }
.hero { padding-block: 38px 22px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .12em; color: var(--red); margin: 0 0 10px; }
h1 { font-size: clamp(32px, 5vw, 57px); line-height: 1.06; letter-spacing: -.045em; margin: 0 0 12px; }
.hero > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.5; margin: 0; }
.estimator { scroll-margin-top: 16px; }
.result-card { border-radius: 18px; padding: 26px; }
.result-card h2 { font-size: 22px; letter-spacing: -.025em; }
.estimate-editor {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
}
.editor-fields { display: grid; gap: 16px; padding: 16px; }
.field-label, .estimate-editor legend { display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px; }
.text-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #c8d1d4;
  border-radius: 8px;
  padding: 10px 13px;
  background: white;
  color: var(--navy);
  font-size: 16px;
}
.field-help, .field-error { font-size: 13px; line-height: 1.5; margin: 9px 0 0; }
.field-help { color: var(--muted); }
.field-error { color: var(--red); }
.estimate-editor fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: flex; gap: 6px; }
.choices label { position: relative; flex: 1; min-width: 0; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices span {
  display: grid;
  place-items: center;
  padding: 8px 4px;
  min-height: 44px;
  border: 1px solid #c8d1d4;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.choices input:checked + span { background: var(--navy); color: white; border-color: var(--navy); }
.choices input:focus-visible + span { outline: 3px solid #c15c48; outline-offset: 2px; }

.result-card { background: var(--navy); color: white; margin-bottom: 12px; }
.result-card h2 { margin: 0 0 6px; }
.primary-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 13px 16px;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.primary-button { justify-content: center; }
.primary-button:hover { background: #8f2c25; }
.call-note { color: #d7e2e8; font-size: 13px; line-height: 1.55; margin: 9px 0 0; }
.installation-details {
  margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; line-height: 1.5;
}
.result-card .installation-details { border-color: #d7e2e84d; }
.installation-details :is(h2, h3) { margin: 0 0 6px; font-size: 16px; }
.installation-details ul { margin: 0; padding-left: 18px; }
.installation-details li + li { margin-top: 6px; }
.primary-button:disabled { opacity: .65; cursor: wait; }
#map-title, #consult-title { margin: 0; font-size: 22px; }
.property-map { position: relative; aspect-ratio: 720 / 500; overflow: hidden; border-radius: 8px; background: var(--navy); }
.property-map.is-selecting { cursor: crosshair; }
.property-map.is-pannable { touch-action: none; }
.property-map.is-panning { cursor: grabbing; }
.property-map img, .property-map svg { display: block; width: 100%; height: 100%; }
.property-map img { transform-origin: 0 0; user-select: none; }
.property-map svg { position: absolute; inset: 0; pointer-events: none; }
.map-pan-hint {
  display: none;
  position: absolute;
  bottom: 8px;
  right: 8px;
  max-width: calc(100% - 16px);
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--navy);
  color: white;
  font-size: 12px;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .property-map.is-pannable:not(.is-panning):hover .map-pan-hint { display: block; }
}
.trace-examples, .estimate-editor .extra-roof-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.trace-examples summary { font-weight: 700; cursor: pointer; }
.trace-example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 12px; }
.trace-example-grid figure { margin: 0; }
.trace-example-grid img { display: block; width: 100%; height: auto; border-radius: 6px; }
.trace-example-grid figcaption { font-size: .875rem; margin-top: 5px; }
.extra-roof-card { display: grid; min-width: 0; gap: 8px; }
.extra-roof-buttons { display: flex; gap: 8px 16px; flex-wrap: wrap; }
.extra-roof-outline { fill: #3cbbd14a; stroke: #a9f0fb; stroke-width: 3; fill-rule: evenodd; vector-effect: non-scaling-stroke; }
.consult-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.trace-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trace-tools .primary-button { margin-left: auto; }
.trace-tools button:disabled { opacity: .5; cursor: default; }
.trace-line { fill: none; stroke: #ffe1a2; stroke-width: 3; vector-effect: non-scaling-stroke; }
.trace-guide { fill: none; stroke: white; stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.trace-fill { fill: #f4b34740; }
.trace-handle { fill: transparent; stroke: transparent; stroke-width: 12; vector-effect: non-scaling-stroke; pointer-events: all; touch-action: none; cursor: grab; }
.outline-button {
  justify-self: start; min-height: 44px; padding: 8px 14px; border: 1px solid var(--red);
  border-radius: 8px; background: white; color: var(--red); font-weight: 700; cursor: pointer;
}
.outline-button:hover { background: #a9362e0b; }
.trace-point { fill: #fff3c7; stroke: #522c08; stroke-width: 2; vector-effect: non-scaling-stroke; }
.roof-area { color: var(--ink); font-weight: 650; }
.roof-outline { stroke-width: 2; vector-effect: non-scaling-stroke; fill: #f4b34770; stroke: #ffe1a2; fill-rule: evenodd; }
.address-point { fill: #a9362e; stroke: white; stroke-width: 2; pointer-events: none; }
.confirmation { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; }
.text-button { border: 0; background: transparent; color: var(--red); min-height: 44px; cursor: pointer; text-align: left; text-decoration: underline; }
.estimate-details {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #d7e2e84d;
  font-size: 13px; line-height: 1.5; color: #d7e2e8;
}
.estimate-details h3 { margin: 0 0 4px; font-size: 15px; color: white; }
.estimate-details p { margin: 0 0 6px; }
.estimate-details ul { margin: 0; padding-left: 20px; }
.estimate-details li + li { margin-top: 4px; }
.estimate-options { border: 0; padding: 0; margin: 14px 0 16px; }
.estimate-options legend { margin-bottom: 6px; font-size: 13px; color: #d7e2e8; }
.estimate-options .choices input:checked + span { background: white; color: var(--navy); border-color: white; }
.financing-option { border-top: 0; margin-top: 0; padding-top: 0; }
.financing-preview { margin: 12px 0; padding: 12px; border: 1px solid #d7e2e84d; border-radius: 8px; }
.financing-preview h4 { margin: 0; color: white; font-size: 15px; }
.financing-preview dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 8px 0; }
.financing-preview dt { font-weight: 650; }
.financing-preview dd { margin: 0; color: white; font-size: 16px; }
.map-price { font-size: clamp(23px, 5vw, 34px); font-weight: 750; margin: 8px 0; }
#lookup-consult { margin-bottom: 12px; }
.address-matches, .form-fields { display: grid; gap: 12px; }
.address-option {
  text-align: left; min-height: 44px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.address-option:hover { border-color: var(--red); }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.two-fields > label { margin-bottom: 0; }
.two-fields .text-input { margin-top: 6px; }
.choices span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #fff7; }
.swatch.black { background: #292a2c; }
.swatch.grey { background: #747b82; }
.swatch.brown { background: #7d5643; }
.project-notes { resize: vertical; }
#consult-success, #agreement-success { background: #edf6ee; padding: 14px; border-radius: 8px; line-height: 1.5; overflow-wrap: anywhere; }
.consult-inbox { max-width: 740px; margin: 40px auto; }
.consult-record { padding: 16px; }
.consult-record h2, .consult-record p { margin: 0 0 8px; overflow-wrap: anywhere; }
.consult-record p:last-child { margin-bottom: 0; white-space: pre-wrap; }

.more-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-block: 28px; }
.more-options article { border-top: 2px solid var(--line); padding: 16px 6px 8px; }
.more-options h2 { font-size: 18px; line-height: 1.25; margin: 0 0 9px; }
.more-options p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.more-options p.metal-contact { margin-top: 10px; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  border-top: 1px solid var(--line);
  padding-block: 18px 24px;
  font-size: 12px;
}
.site-footer span { color: var(--muted); }

@media (max-width: 740px) {
  .wrap { padding-inline: 19px; }
  .site-header { min-height: 72px; }
  .hero { padding-block: 31px 22px; }
  .result-card { padding: 20px; }
  #lookup-consult { margin-bottom: 12px; }
.address-matches, .form-fields { display: grid; gap: 12px; }
.address-option {
  text-align: left; min-height: 44px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.address-option:hover { border-color: var(--red); }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.two-fields > label { margin-bottom: 0; }
.two-fields .text-input { margin-top: 6px; }
.choices span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #fff7; }
.swatch.black { background: #292a2c; }
.swatch.grey { background: #747b82; }
.swatch.brown { background: #7d5643; }
.project-notes { resize: vertical; }
#consult-success { background: #edf6ee; padding: 14px; border-radius: 8px; line-height: 1.5; }
.consult-inbox { max-width: 740px; margin: 40px auto; }
.consult-record { padding: 16px; }
.consult-record h2, .consult-record p { margin: 0 0 8px; overflow-wrap: anywhere; }
.consult-record p:last-child { margin-bottom: 0; white-space: pre-wrap; }

.more-options { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 540px) {
  .two-fields { grid-template-columns: 1fr; }
  .outline-button { justify-self: stretch; }
}
@media (max-width: 440px) {
  #color-choice .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 370px) {
  .wrap { padding-inline: 14px; }
  .result-card { padding: 16px; }
}
