.roofing-module {
  --roofing-bg: #070d13;
  --roofing-panel: rgba(12, 22, 32, 0.88);
  --roofing-panel-strong: #0c1722;
  --roofing-line: #294157;
  --roofing-line-soft: rgba(91, 121, 145, 0.28);
  --roofing-text: #f4f7fa;
  --roofing-muted: #9eacba;
  --roofing-orange: #ff7416;
  --roofing-orange-light: #ff9a4d;
  min-height: 100%;
  padding: 18px 20px 44px;
  color: var(--roofing-text);
  background: var(--roofing-bg);
  font: 14px/1.45 Inter, "Segoe UI", Arial, sans-serif;
}

html:has(.roofing-module),
body:has(.roofing-module),
body:has(.roofing-module) #app,
body:has(.roofing-module) .app.premium-app,
body:has(.roofing-module) .premium-app > main,
body:has(.roofing-module) .premium-app > main > section.content {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

.roofing-module *,
.roofing-module *::before,
.roofing-module *::after {
  box-sizing: border-box;
}

.roofing-module button,
.roofing-module input,
.roofing-module select,
.roofing-module textarea {
  font: inherit;
}

.roofing-module button:focus-visible,
.roofing-module input:focus-visible,
.roofing-module select:focus-visible,
.roofing-module textarea:focus-visible,
.roofing-module [tabindex="-1"]:focus-visible {
  outline: 2px solid var(--roofing-orange);
  outline-offset: 3px;
}

.roofing-live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.roofing-landing {
  width: min(1360px, 100%);
  margin: 0 auto;
  animation: roofing-enter 180ms ease-out both;
}

.roofing-module-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 18px 20px;
  border: 1px solid var(--roofing-line);
  border-left: 3px solid var(--roofing-orange);
  border-radius: 10px;
  background: var(--roofing-panel);
}

.roofing-module-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--roofing-orange);
  border-radius: 50%;
  color: var(--roofing-orange);
  background: rgba(255, 116, 22, 0.06);
}

.roofing-module-mark svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

.roofing-module-header p,
.roofing-directory-heading p,
.roofing-coatings-bridge-bar small {
  margin: 0 0 3px;
  color: var(--roofing-orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.roofing-module-header h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.roofing-module-header div > span {
  display: block;
  margin-top: 5px;
  color: var(--roofing-muted);
}

.roofing-start-button,
.roofing-coatings-bridge-bar > button,
.roofing-module-unavailable button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--roofing-orange-light);
  border-radius: 7px;
  background: var(--roofing-orange);
  color: #11171d;
  font-weight: 900;
  cursor: pointer;
}

.roofing-start-button svg,
.roofing-coatings-bridge-bar > button svg {
  width: 18px;
  height: 18px;
}

.roofing-start-button:hover {
  background: var(--roofing-orange-light);
}

.roofing-service-directory {
  margin-top: 22px;
}

.roofing-directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--roofing-line-soft);
}

.roofing-directory-heading h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.roofing-directory-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--roofing-muted);
  font-size: 12px;
}

.roofing-directory-heading > span b {
  color: var(--roofing-text);
}

.roofing-directory-heading > span i {
  width: 1px;
  height: 14px;
  margin: 0 3px;
  background: var(--roofing-line);
}

.roofing-service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
}

.roofing-service-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 13px;
  min-height: 186px;
  padding: 18px 2px 17px;
  border-bottom: 1px solid var(--roofing-line-soft);
  animation: roofing-row-enter 220ms ease-out both;
  animation-delay: calc(var(--roofing-row-index) * 24ms);
}

.roofing-service-row.is-available {
  border-bottom-color: rgba(255, 116, 22, 0.72);
}

.roofing-service-icon {
  display: grid;
  place-items: center;
  align-self: start;
  width: 44px;
  height: 44px;
  border: 1px solid var(--roofing-line);
  border-radius: 9px;
  color: #b5c1cc;
  background: rgba(10, 21, 31, 0.76);
}

.roofing-service-row.is-available .roofing-service-icon {
  border-color: var(--roofing-orange);
  color: var(--roofing-orange);
  background: rgba(255, 116, 22, 0.06);
}

.roofing-service-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.roofing-service-copy > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.roofing-service-copy h3 {
  margin: 1px 0 0;
  font-size: 17px;
  line-height: 1.25;
}

.roofing-service-copy p {
  max-width: 34ch;
  margin: 8px 0 0;
  color: var(--roofing-muted);
  font-size: 13px;
}

.roofing-service-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--roofing-line);
  border-radius: 999px;
  color: var(--roofing-muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.roofing-service-status.available {
  border-color: rgba(255, 116, 22, 0.75);
  color: var(--roofing-orange-light);
}

.roofing-service-row > button {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 12px;
  border: 1px solid #3a5369;
  border-radius: 7px;
  background: #101c28;
  color: var(--roofing-text);
  font-weight: 850;
  text-align: left;
}

.roofing-service-row > button svg {
  width: 17px;
  height: 17px;
  transition: transform 140ms ease;
}

.roofing-service-row.is-available > button {
  border-color: var(--roofing-orange);
  color: var(--roofing-orange-light);
  cursor: pointer;
}

.roofing-service-row.is-available > button:hover {
  background: rgba(255, 116, 22, 0.08);
}

.roofing-service-row.is-available > button:hover svg {
  transform: translateX(3px);
}

.roofing-service-row > button:disabled {
  border-color: rgba(58, 83, 105, 0.46);
  color: #748493;
  background: rgba(16, 28, 40, 0.4);
  cursor: not-allowed;
}

.roofing-module-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--roofing-muted);
  font-size: 12px;
}

.roofing-module-footnote svg {
  width: 16px;
  height: 16px;
  color: var(--roofing-orange);
}

.roofing-coatings-bridge {
  width: 100%;
  /* A retained transform makes fixed customer dialogs position against this
     tall bridge instead of the phone viewport. Keep the estimator shell
     transform-free so its customer picker remains centered on every screen. */
  animation: none;
}

.roofing-coatings-bridge-bar {
  position: sticky;
  z-index: 21;
  top: 74px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  margin: -18px -20px 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--roofing-line);
  background: rgba(7, 13, 19, 0.97);
}

.roofing-coatings-bridge-bar > button {
  min-height: 40px;
  border-color: #3a5369;
  background: #101c28;
  color: var(--roofing-text);
}

.roofing-coatings-bridge-bar > button:hover {
  border-color: var(--roofing-orange);
}

.roofing-coatings-bridge-bar > div {
  min-width: 0;
}

.roofing-coatings-bridge-bar small,
.roofing-coatings-bridge-bar strong {
  display: block;
}

.roofing-coatings-bridge-bar strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roofing-coatings-engine-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8fd5a8;
  font-size: 12px;
  font-weight: 800;
}

.roofing-coatings-engine-status svg {
  width: 17px;
  height: 17px;
}

.roofing-coatings-legacy {
  margin: 0 -20px -44px;
}

@media (min-width: 1181px) {
  .roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page > .hgc-rc-layout > aside {
    position: static !important;
    top: auto !important;
  }
}

.roofing-coatings-legacy .hgc-service-library-grid {
  grid-template-columns: minmax(260px, 460px) !important;
}

.roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}

.roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > button {
  width: 100% !important;
  min-height: 44px !important;
}

.roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > label {
  width: 100% !important;
}

.roofing-coatings-legacy .hgc-service-library-card:not(:has([data-hgc-toggle-service="roof_coatings"])) ,
.roofing-coatings-legacy .hgc-work-service-rail nav > button:not([data-hgc-toggle-service="roof_coatings"]),
.roofing-coatings-legacy [data-hgc-open-service]:not([data-hgc-open-service="roof_coatings"]),
.roofing-coatings-legacy [data-hgc-add-item]:not([data-hgc-add-item="roof_coatings"]) {
  display: none !important;
}

.roofing-coatings-unavailable,
.roofing-module-unavailable {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 760px;
  margin: 24px auto;
  padding: 20px;
  border: 1px solid var(--roofing-line);
  border-left: 3px solid var(--roofing-orange);
  border-radius: 8px;
  background: var(--roofing-panel);
}

.roofing-coatings-unavailable > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--roofing-orange);
  border-radius: 50%;
  color: var(--roofing-orange);
}

.roofing-coatings-unavailable p,
.roofing-module-unavailable p {
  margin: 3px 0 0;
  color: var(--roofing-muted);
}

@keyframes roofing-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes roofing-row-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .roofing-service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roofing-module-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .roofing-start-button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .roofing-module {
    padding: 10px 10px 32px;
  }

  .roofing-module-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 16px;
  }

  .roofing-module-mark {
    width: 44px;
    height: 44px;
  }

  .roofing-start-button {
    width: 100%;
  }

  .roofing-directory-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .roofing-service-list {
    grid-template-columns: 1fr;
  }

  .roofing-service-row {
    min-height: 0;
  }

  .roofing-service-copy > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .roofing-service-copy p {
    max-width: none;
  }

  .roofing-coatings-bridge-bar {
    position: sticky;
    z-index: 40;
    top: 65px;
    grid-template-columns: auto minmax(0, 1fr);
    margin: -10px -10px 0;
    padding: 9px 10px;
  }

  .roofing-coatings-bridge-bar > button {
    grid-column: auto;
    justify-self: start;
    min-height: 44px;
  }

  .roofing-coatings-engine-status {
    display: none;
  }

  .roofing-coatings-legacy {
    margin: 0 -10px -32px;
  }

  .roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-roof .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > button {
    width: 100% !important;
    min-height: 44px !important;
  }

  .roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > label {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .roofing-coatings-legacy .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item input {
    width: 100% !important;
  }
}

@media (max-width: 430px) {
  .roofing-service-row {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 10px;
  }

  .roofing-service-icon {
    width: 40px;
    height: 40px;
  }

  .roofing-service-row > button {
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .roofing-landing,
  .roofing-coatings-bridge,
  .roofing-service-row {
    animation: none;
  }

  .roofing-service-row > button svg {
    transition: none;
  }
}
