@font-face {
  font-family: "Medeo Sans";
  src: url("./assets/medeo-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --pine: #142d2c;
  --pine-dark: #102524;
  --pine-muted: #ccd9d2;
  --gold: #ffd56b;
  --gold-hover: #ffcb47;
  --paper: #f8f7f1;
  --white: #fff;
  --ink: #1b2b27;
  --muted: #505e55;
  --line: #d3d8cf;
  --focus: #417654;
  --font: "Medeo Sans", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.5 var(--font); }
h1, h2, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .21em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:target { scroll-margin-top: 21px; }
::selection { color: var(--pine-dark); background: var(--gold); }
.frame { width: min(calc(100% - 112px), 1280px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 14px; color: var(--pine-dark); background: var(--gold); }
.skip-link:focus { transform: none; }
.site-header { color: var(--white); background: var(--pine); border-bottom: 1px solid #42605b; }
.header-inner { position: relative; min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { --logo-width: 190px; position: relative; display: inline-flex; width: 184px; height: 39px; align-items: center; justify-content: center; overflow: hidden; vertical-align: top; }
.site-header .wordmark { --logo-width: clamp(195px, calc(100vw - 656px), 212px); width: clamp(184px, calc(100vw - 662px), 206px); height: 44px; }
.wordmark img { flex: none; width: var(--logo-width); height: auto; max-width: none; }
.wordmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--logo-width);
  aspect-ratio: 3;
  transform: translate(-50%, -50%);
  background: url("./logo.png") center / contain no-repeat;
  filter: brightness(0) invert(1);
  clip-path: inset(0 46.4% 0 0);
  pointer-events: none;
}
.site-header nav { display: flex; align-items: center; gap: clamp(15px, 2.7vw, 39px); }
.site-header nav a { display: inline-flex; min-height: 44px; align-items: center; font-size: .9rem; font-weight: 550; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.site-header .nav-primary { color: var(--gold); }
.site-header :focus-visible { outline-color: var(--gold); }
.menu-toggle { display: none; }

.finder { position: relative; isolation: isolate; color: var(--white); background: var(--pine); padding-block: clamp(48px, 6.2vw, 90px) clamp(34px, 4.6vw, 66px); }
.finder::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 33%;
  pointer-events: none;
  opacity: .47;
  background: linear-gradient(90deg, var(--pine), #142d2c50 58%, #142d2c28),
    url("./assets/roofline.webp") center 29% / cover no-repeat;
}
.hero-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .75fr); gap: clamp(28px, 6vw, 88px); align-items: end; margin-bottom: 32px; }
.hero-heading { container-type: inline-size; }
.hero-intro h1 { font-size: clamp(3.35rem, 6.6vw, 6rem); line-height: .97; letter-spacing: -.033em; word-spacing: .017em; font-weight: 675; }
.hero-subtitle { margin-top: 14px; color: #ebf1eb; font-size: clamp(1.125rem, 6.4cqi, 3.125rem); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; white-space: nowrap; }
.hero-explanation { padding-bottom: 3px; }
.hero-explanation p { max-width: 31ch; color: #ebf1eb; font-size: clamp(1rem, 1.45vw, 1.21rem); line-height: 1.46; }
.hero-explanation a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); font-size: .9rem; font-weight: 600; }
.hero-explanation a:focus-visible, .finder-meta :focus-visible, .search-receipt :focus-visible { outline-color: var(--gold); }

.finder-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid #f0ece1;
  border-radius: 12px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 8px 24px #10252426;
}
.picker {
  position: relative;
  min-width: 0;
  padding: 7px 12px 5px;
  border: 1px solid #dde0d7;
  border-radius: 7px;
  background: #f8f8f4;
}
.picker:focus-within { border-color: #906226; background: #fffdf6; }
.picker:has(input[aria-invalid="true"]) { border-color: #a83a28; }
.picker label { display: block; color: #4a574d; font-size: .75rem; font-weight: 650; line-height: 1.25; }
.picker input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.04rem;
}
.picker input:focus-visible { outline: 0; }
.picker input::placeholder { color: #5e685f; opacity: 1; }
.work-field { display: flex; align-items: center; }
.work-toggle {
  position: relative;
  flex: 0 0 36px;
  align-self: stretch;
  margin-right: -4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.work-toggle:hover { background: #eeeae0; }
.work-toggle:focus-visible { outline-color: #906226; outline-offset: -2px; }
.work-toggle::after {
  content: "";
  position: absolute;
  top: 48%;
  left: 14px;
  width: 8px;
  height: 8px;
  border: solid var(--muted);
  border-width: 0 1.8px 1.8px 0;
  transform: translateY(-65%) rotate(45deg);
}
.work-toggle[aria-expanded="true"]::after { transform: translateY(-15%) rotate(225deg); }
.find-button { display: flex; align-items: center; justify-content: space-between; gap: clamp(14px, 2.8vw, 41px); min-height: 62px; padding: 0 clamp(15px, 2.5vw, 34px); border: 0; border-radius: 7px; background: var(--gold); color: var(--pine-dark); font-weight: 700; font-size: 1rem; white-space: nowrap; }
.find-button:hover { background: var(--gold-hover); }
.find-button:focus-visible { outline-color: #906226; outline-offset: 2px; }
.find-button span { width: 16px; height: 1.5px; background: currentColor; position: relative; }
.find-button span::after { content: ""; position: absolute; width: 7px; height: 7px; right: 0; top: 50%; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: translateY(-50%) rotate(45deg); }
.search-error { grid-column: 1 / -1; padding: 1px 6px 3px; color: #a03322; font-size: .88rem; font-weight: 650; }

.picker-panel {
  position: absolute;
  z-index: 3;
  top: calc(100% + 7px);
  right: -1px;
  left: -1px;
  max-height: min(270px, 39vh);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid #c7cdc3;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 12px 24px #10252435;
}
.options li { display: block; min-height: 42px; padding: 9px 10px; border-radius: 4px; font-size: .91rem; cursor: pointer; }
.options li:hover, .options li[aria-selected="true"] { background: #f6efde; }

.finder-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 18px; margin-top: 14px; color: var(--pine-muted); font-size: .8rem; }
.quick-services { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.quick-label { margin-right: 4px; font-weight: 620; }
.quick-services button {
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid #6b827a;
  border-radius: 999px;
  background: #122b29e6;
  color: var(--white);
  font-size: .79rem;
}
.quick-services button:hover, .quick-services button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.search-receipt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 19px; margin-top: 11px; padding-block: 10px 0; border-top: 1px solid #42605b; color: var(--white); font-size: .88rem; overflow-wrap: anywhere; }
.search-receipt a, .noscript a { color: var(--gold); }
.noscript { margin-top: 10px; color: var(--pine-muted); font-size: .88rem; }

.services, .locations-section > .frame, .guide-inner { padding-block: clamp(46px, 5.55vw, 80px); }
.section-intro { display: flex; justify-content: space-between; align-items: end; gap: 14px 32px; margin-bottom: 25px; }
.section-intro h2, .guide h2 { font-size: clamp(2.24rem, 4vw, 3.7rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 680; }
.section-intro p { max-width: 39ch; color: var(--muted); }
.task-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.task {
  display: grid;
  grid-template: "photo" auto "title" auto "description" 1fr "action" auto / minmax(0, 1fr);
  gap: 7px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
}
.task-photo {
  grid-area: photo;
  align-self: start;
  width: 100%;
  aspect-ratio: 1.6;
  border-radius: 4px;
  object-fit: cover;
  background: #ecebe3;
}
.task:hover { border-color: #62806c; background: #f0f4eb; }
.task strong { grid-area: title; font-size: 1.1rem; font-weight: 680; line-height: 1.23; letter-spacing: -.017em; }
.task span { grid-area: description; color: #48564d; font-size: .89rem; }
.task .task-action { grid-area: action; align-self: end; padding-top: 4px; color: #285c43; text-decoration: underline; text-underline-offset: .2em; font-weight: 630; }

@media (min-width: 1150px) {
  .task { grid-template: "title photo" auto "description photo" 1fr "action action" auto / minmax(0, 1fr) 37%; }
  .task-photo { aspect-ratio: 4 / 5; }
}
@media (forced-colors: active) {
  .task { grid-template: "title" auto "description" 1fr "action" auto / minmax(0, 1fr); }
  .task-photo { display: none; }
}

.locations-section { border-top: 1px solid var(--line); background: #eeeee5; }
.state-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.state-card { min-width: 0; padding: 12px 12px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.state-card h3 { display: flex; align-items: center; min-height: 26px; gap: 7px; margin: 0 0 4px; font-size: .98rem; font-weight: 660; line-height: 1.2; }
.state-card img { flex: 0 0 30px; width: 30px; height: 21px; object-fit: contain; }
.city-list { margin: 0; padding: 0; list-style: none; }
.state-card .city-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 5px; }
.state-card .city-list li:nth-child(2) { grid-column: 1; }
.state-card .city-list li:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.city-list a { display: inline-flex; align-items: center; min-height: 34px; padding: 3px 0; color: #285c43; font-size: .83rem; line-height: 1.3; text-align: left; text-decoration: underline; text-underline-offset: .19em; }
.city-list a:hover { color: var(--pine-dark); text-decoration-thickness: 2px; }
.city-list .all-cities { padding-inline: 6px; font-weight: 670; }

.city-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 30px);
  padding: 19px;
  border: 1px solid #aebbb1;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 42px #10252440;
}
.city-dialog::backdrop { background: #102524a3; }
.city-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.city-dialog h2 { font-size: 1.4rem; line-height: 1.2; }
.close-dialog { min-height: 35px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); font-size: .81rem; }
.city-dialog label { display: block; font-size: .82rem; font-weight: 640; }
.city-dialog input { width: 100%; min-height: 43px; margin-top: 4px; padding: 7px 9px; border: 1px solid #a9b6ab; border-radius: 4px; background: var(--white); }
#city-count { margin: 7px 0 4px; color: var(--muted); font-size: .82rem; }
#state-cities { max-height: min(44vh, 350px); overflow: auto; padding: 2px; }
#state-cities .city-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
#state-cities .city-list button { min-height: 40px; width: 100%; padding: 4px; }

.guide { border-top: 1px solid var(--line); }
.guide-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: stretch; gap: 0; }
.guide-photo { display: flex; position: relative; flex-direction: column; background: var(--pine-dark); color: var(--white); }
.guide-photo picture { display: flex; min-height: 0; flex: 1; }
.guide-photo img { width: 100%; height: auto; max-height: 100%; object-fit: cover; object-position: 49% center; }
.guide figcaption { padding: 8px 10px; color: #e5ede7; font-size: .76rem; }
.guide-content { padding: clamp(20px, 3.65vw, 51px); border: 1px solid var(--line); border-left: 0; background: #f0f1e8; }
.guide h2 { font-size: clamp(2.18rem, 4.05vw, 3.5rem); }
.guide-intro { margin-top: 10px; color: var(--muted); }
.call-questions { counter-reset: call; list-style: none; margin: 18px 0 0; padding: 0; }
.call-questions li { position: relative; min-height: 65px; padding: 10px 0 10px 35px; border-top: 1px solid #c8d1c5; }
.call-questions li::before { counter-increment: call; content: counter(call, decimal-leading-zero); position: absolute; top: 12px; left: 0; color: #365847; font-size: .8rem; font-weight: 650; }
.call-questions h3 { margin: 0; font-size: .99rem; line-height: 1.27; font-weight: 670; }
.call-questions p { margin-top: 3px; color: var(--muted); font-size: .86rem; }

.site-footer { color: var(--white); background: var(--pine-dark); }
.footer-main { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(15px, 6vw, 85px); padding-block: 38px 24px; }
.footer-main h2 { font-size: 1rem; font-weight: 680; }
.footer-main p { max-width: 43ch; margin-top: 9px; color: var(--pine-muted); font-size: .9rem; }
.footer-links { display: flex; gap: 6px 20px; flex-wrap: wrap; padding-block: 8px 17px; border-top: 1px solid #42605b; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; font-size: .84rem; }
.site-footer :focus-visible { outline-color: var(--gold); }

@media (max-width: 1050px) {
  .frame { width: calc(100% - 72px); }
  .hero-intro { gap: 28px; }
}

@media (max-width: 760px) {
  .frame { width: calc(100% - 36px); }
  .header-inner { min-height: 62px; }
  .wordmark { --logo-width: 161px; width: 155px; height: 35px; }
  .site-header .wordmark { --logo-width: 179px; width: 173px; height: 39px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 12px; border: 1px solid #7c9890; border-radius: 2px; background: transparent; color: var(--white); font-size: .87rem; font-weight: 620; }
  .site-header nav { display: none; }
  .site-header nav[data-open] { display: grid; z-index: 5; position: absolute; top: calc(100% + 1px); right: 0; min-width: 190px; gap: 0; padding: 5px 12px; border: 1px solid #7c9890; background: var(--pine); }
  .site-header nav a + a { border-top: 1px solid #42605b; }
  .finder { padding-block: 39px 29px; }
  .finder::before {
    inset: 0;
    opacity: .35;
    background: linear-gradient(180deg, transparent 72%, var(--pine)),
      linear-gradient(110deg, var(--pine), #142d2c30 72%),
      url("./assets/roofline-small.webp") center 22% / cover no-repeat;
  }
  .hero-intro { grid-template-columns: 1fr; gap: 13px; margin-bottom: 19px; }
  .hero-intro h1 { font-size: clamp(2.93rem, 8.1vw, 4.45rem); }
  .hero-explanation p { max-width: 39ch; font-size: .98rem; }
  .hero-explanation a { min-height: 37px; }
  .finder-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker { padding-inline: 9px; }
  .picker input { font-size: .96rem; }
  .find-button { grid-column: 1 / -1; min-height: 49px; padding-inline: 13px; }
  .finder-meta { margin-top: 11px; font-size: .77rem; }
  .quick-services button { min-height: 32px; font-size: .75rem; padding-inline: 8px; }
  .services, .locations-section > .frame, .guide-inner { padding-block: 39px; }
  .section-intro { display: block; margin-bottom: 17px; }
  .section-intro p { margin-top: 9px; }
  .task-grid, .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .task { padding: 9px; }
  .task strong { font-size: 1.01rem; }
  .task span, .city-list a { font-size: .81rem; }
  .state-card { padding: 9px 8px 6px; }
  .state-card h3 { font-size: .89rem; gap: 5px; }
  .state-card img { flex-basis: 25px; width: 25px; height: 18px; }
  .guide-inner { grid-template-columns: 1fr; }
  .guide-content { border-left: 1px solid var(--line); border-top: 0; }
  .guide-photo img { aspect-ratio: 1.73; }
  .footer-main { grid-template-columns: 1fr; }
}

@media (max-width: 365px) {
  .frame { width: calc(100% - 28px); }

}

@media (min-width: 761px) and (max-width: 959px) {
  .state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .hero-intro h1 { font-size: clamp(2.25rem, 11.05vw, 3.45rem); }
  .finder-form { grid-template-columns: 1fr; }
  .picker input { min-height: 35px; }
  .quick-label { flex-basis: 100%; }
}

/* A continuous state-flag ribbon, flush with the finder’s bottom edge. */
.finder { --flag-height:28px; padding-bottom:calc(clamp(34px,4.6vw,66px) + var(--flag-height)); }
.finder-flags { position:absolute; inset:auto 0 0; height:var(--flag-height); line-height:0; }
.finder-flags-viewport { width:100%; height:100%; overflow:hidden; }
.finder-flags-track { display:flex; width:max-content; height:100%; }
.finder-flags-group { display:flex; flex:none; align-items:stretch; height:100%; }
.finder-flags-group img { flex:none; width:auto; height:var(--flag-height); max-width:none; margin-inline-end:calc(var(--flag-height) * var(--flag-aspect,1.5) * .6); object-fit:contain; user-select:none; }
.finder-flags.is-animated .finder-flags-track { animation:finder-flags-scroll 125s linear infinite; will-change:transform; }
.finder-flags.is-paused .finder-flags-track,.finder-flags.is-out-of-view .finder-flags-track { animation-play-state:paused; }
@keyframes finder-flags-scroll { to { transform:translateX(-25%); } }
.finder-flags-toggle { position:absolute; top:50%; right:8px; display:grid; place-items:center; width:24px; height:24px; padding:0; border:1px solid #ffffff45; border-radius:4px; color:#fff; background:#142d2ced; transform:translateY(-50%); opacity:0; transition:opacity .15s; }
.finder-flags-toggle svg { width:15px; height:15px; }
.finder-flags-toggle .flag-play-icon,.finder-flags.is-paused .flag-pause-icon { display:none; }
.finder-flags.is-paused .flag-play-icon { display:block; }
.finder-flags:hover .finder-flags-toggle,.finder-flags:focus-within .finder-flags-toggle,.finder-flags.is-paused .finder-flags-toggle { opacity:1; }
.finder-flags-toggle:focus-visible { outline-color:var(--gold); outline-offset:2px; }
@media (max-width:760px) {
 .finder { --flag-height:22px; padding-bottom:calc(29px + var(--flag-height)); }
 .finder-flags-toggle { top:auto; bottom:0; width:24px; height:24px; right:5px; transform:none; }
}
@media (hover:none) { .finder-flags-toggle { opacity:1; } }
@media (prefers-reduced-motion:reduce) {
 .finder-flags.is-animated .finder-flags-track { animation:none; will-change:auto; }
 .finder-flags-toggle { display:none; transition:none; }
}

/* Gap after each flag is 3/5 of its actual displayed width. */
.finder-flags-group img[width="160"][height="80"] { --flag-aspect:2.0000000000; }
.finder-flags-group img[width="160"][height="84"] { --flag-aspect:1.9047619048; }
.finder-flags-group img[width="160"][height="93"] { --flag-aspect:1.7204301075; }
.finder-flags-group img[width="160"][height="95"] { --flag-aspect:1.6842105263; }
.finder-flags-group img[width="160"][height="96"] { --flag-aspect:1.6666666667; }
.finder-flags-group img[width="160"][height="98"] { --flag-aspect:1.6326530612; }
.finder-flags-group img[width="160"][height="100"] { --flag-aspect:1.6000000000; }
.finder-flags-group img[width="160"][height="104"] { --flag-aspect:1.5384615385; }
.finder-flags-group img[width="160"][height="107"] { --flag-aspect:1.4953271028; }
.finder-flags-group img[width="160"][height="112"] { --flag-aspect:1.4285714286; }
.finder-flags-group img[width="160"][height="113"] { --flag-aspect:1.4159292035; }
.finder-flags-group img[width="160"][height="117"] { --flag-aspect:1.3675213675; }
.finder-flags-group img[width="160"][height="126"] { --flag-aspect:1.2698412698; }
.finder-flags-group img[width="160"][height="141"] { --flag-aspect:1.1347517730; }
