/* Page-specific layouts. */

/* Shared: a heading with a link aligned to its right on wide screens */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0 var(--space-l);
  margin-bottom: var(--space-xl);
}

.section-head .section-heading {
  margin-bottom: 0;
}

.section-head__link {
  margin-top: var(--space-s);
}

/* Aside + main column (FAQ teaser, quote) */
.split {
  display: grid;
  gap: var(--space-xl);
}

.split__aside {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--space-m);
}

.split__aside .section-heading {
  margin-bottom: 0;
}

@media (min-width: 64rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-3xl);
  }
}

/* Home: hero ------------------------------------------------------------------ */
.hero {
  display: grid;
  align-items: center;
  /* Fills the screen: 100vh, and on phones the height visible with the browser bar
     showing (svh), so nothing starts hidden behind it. */
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-height) + var(--space-xl)) var(--space-3xl);
}

.hero__inner {
  display: grid;
  justify-items: center;
  gap: var(--space-m);
  text-align: center;
}

.hero__crest {
  width: auto;
  height: clamp(3.75rem, 2.5rem + 4vw, 5.5rem);
  margin-bottom: var(--space-2xs);
  opacity: 0.85;
}

.hero__script {
  color: var(--color-inverse-muted);
  font-family: var(--font-script);
  font-size: max(1.75rem, var(--step-3));
  line-height: 1;
}

.hero__title {
  max-width: 11em;
  font-size: var(--step-6);
  line-height: 1.02;
}

.hero__lead {
  max-width: 38rem;
  color: var(--color-inverse-muted);
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.6;
}

.hero__actions {
  justify-content: center;
  margin-top: var(--space-xs);
}

.hero__address {
  margin-top: var(--space-xs);
  color: var(--color-inverse-muted);
  font-size: var(--step--1);
}

/* Home: trust bar */
.trust .stats {
  text-align: left;
}

/* Home: three pillars as overlapping hairline circles (deck slide 5) ----------- */
.pillars {
  display: grid;
  justify-items: center;
  list-style: none;
}

.pillar {
  display: grid;
  place-content: center;
  gap: var(--space-xs);
  width: min(100%, 20rem);
  aspect-ratio: 1;
  padding: var(--space-xl);
  border: var(--hairline) solid var(--color-line);
  border-radius: 50%;
  text-align: center;
}

.pillar + .pillar {
  margin-top: -2.5rem;
}

.pillar__title {
  font-size: var(--step-2);
}

/* Four lines reserved, so the three titles line up whatever the text length. */
.pillar__text {
  min-height: calc(4 * 1.6em);
  color: var(--color-text-muted);
  font-size: var(--step--1);
  line-height: 1.6;
}

@media (min-width: 64rem) {
  .pillars {
    display: flex;
    justify-content: center;
  }

  .pillar {
    width: 22.5rem;
    padding: var(--space-2xl);
  }

  .pillar + .pillar {
    margin-top: 0;
    margin-left: -2.5rem;
  }
}

/* Home: materials & partners */
.materials__lists {
  display: grid;
  justify-items: start;
  gap: var(--space-l);
}

.materials__label {
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 400;
}

/* Each brand starts with a separator; the list is shifted left and clipped so the
   separator that begins each wrapped line is hidden (none dangles at line ends). */
.brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) 0;
  margin-left: -1.6em;
  clip-path: inset(0 0 0 1.6em);
  list-style: none;
  font-family: var(--font-display);
  font-stretch: var(--font-display-stretch);
  font-size: var(--step-1);
}

.brand-list li::before {
  content: '·' / '';
  display: inline-block;
  width: 1.6em;
  color: var(--color-line);
  text-align: center;
}

/* Reasons ("01 ." list): the column spans are for Home's five-item .reasons list only;
   .reason items also sit in plain grids (About, Commercial). */
/* Five reasons: 1 column, then 2 (the fifth spans the row), then 3 + 2. */
.reasons {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-l) var(--space-xl);
  list-style: none;
}

@media (min-width: 40rem) {
  .reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reasons > .reason:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .reasons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .reasons > .reason {
    grid-column: span 2;
  }

  .reasons > .reason:nth-child(n + 4),
  .reasons > .reason:last-child:nth-child(odd) {
    grid-column: span 3;
  }
}

.reason {
  display: grid;
  align-content: start;
  gap: var(--space-2xs);
  padding-top: var(--space-s);
  border-top: var(--hairline) solid var(--color-line);
}

.reason__number {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.reason__title {
  font-size: var(--step-2);
}

.reason__text {
  color: var(--color-text-muted);
}

/* Light page header (inner pages) ------------------------------------------------ */
.page-hero {
  padding-block: var(--space-xl) var(--space-l);
}

.page-hero .breadcrumbs {
  margin-bottom: var(--space-m);
}

.page-hero .section-heading {
  margin-bottom: 0;
}

/* Services ---------------------------------------------------------------------- */
.service-jump {
  margin-top: var(--space-l);
}

/* Detail hero: text beside the photo on wide screens. */
.service-hero__inner {
  display: grid;
  align-items: center;
  gap: var(--space-xl);
}

@media (min-width: 64rem) {
  .service-hero__inner:not(.service-hero__inner--text) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-3xl);
  }
}

.service-hero__actions {
  align-items: center;
  margin-top: var(--space-l);
}

.service-hero__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.service-hero__media picture,
.service-hero__media img,
.service-hero__media .placeholder {
  width: 100%;
  height: 100%;
}

.service-hero__media img {
  object-fit: cover;
}

/* Overview text and the "at a glance" panel. */
.service-overview {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 64rem) {
  .service-overview {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: var(--space-3xl);
  }
}

.service-overview__title {
  margin-bottom: var(--space-m);
}

.glance {
  padding: var(--space-l);
  background: var(--color-surface);
}

.section--white .glance {
  background: var(--color-bg);
}

.glance__title {
  margin-bottom: var(--space-xs);
}

.glance__row {
  display: grid;
  gap: var(--space-2xs);
  padding-block: var(--space-s);
  border-top: var(--hairline) solid var(--color-line);
}

.glance__row dt {
  color: var(--color-text-muted);
  font-size: var(--step--1);
  font-weight: 500;
}

.glance__row dd {
  display: grid;
  justify-items: start;
  gap: var(--space-2xs);
}

.benefits {
  list-style: none;
}

.benefit {
  display: grid;
  align-content: start;
  gap: var(--space-xs);
  padding-top: var(--space-m);
  border-top: var(--hairline) solid var(--color-line);
}

.benefit__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--space-2xs);
  color: var(--color-text-muted);
}

.benefit__title {
  font-size: var(--step-1);
  font-weight: 400; /* 300 gets thin at this size (as h4) */
}

.benefit__text {
  color: var(--color-text-muted);
}

/* Projects & gallery ------------------------------------------------------------- */
.empty-state {
  display: grid;
  justify-items: start;
  gap: var(--space-s);
  max-width: 40rem;
}

.empty-state__text {
  color: var(--color-text-muted);
  font-size: var(--step-1);
}

.project-hero__layout {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

@media (min-width: 64rem) {
  .project-hero__layout {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    align-items: center;
    gap: var(--space-2xl);
  }
}

.project-hero__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.project-hero__media picture,
.project-hero__media img,
.project-hero__media .placeholder {
  width: 100%;
  height: 100%;
}

.project-hero__media img {
  object-fit: cover;
}

/* Leader-line callouts (deck slide 8): a hairline ending in a small dot points from
   each spec toward the photo. */
.spec-sheet__title {
  margin-bottom: var(--space-s);
  font-size: var(--step-2);
}

.spec-sheet__list {
  display: grid;
  gap: var(--space-m);
}

.spec-sheet__row {
  position: relative;
  display: grid;
  gap: var(--space-3xs);
  padding-left: 3.5rem;
}

.spec-sheet__row::before {
  content: '';
  position: absolute;
  top: 0.65em;
  left: 0.3rem;
  width: 2.5rem;
  border-top: var(--hairline) solid var(--color-border-muted);
}

.spec-sheet__row::after {
  content: '';
  position: absolute;
  top: calc(0.65em - 0.25rem);
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border: var(--hairline) solid var(--color-border-muted);
  border-radius: 50%;
  background: var(--color-bg);
}

.spec-sheet__row dt {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.spec-sheet__row dd {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-stretch: var(--font-display-stretch);
  font-weight: 400;
  line-height: var(--leading-snug);
}

.project-story {
  display: grid;
  align-items: start;
  gap: var(--space-l);
}

.project-story .section-heading {
  margin-bottom: 0;
}

@media (min-width: 64rem) {
  .project-story {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-3xl);
  }
}

.project-story__text {
  font-size: var(--step-1);
}

.project-photos__title {
  margin-bottom: var(--space-l);
}

.project-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-m);
  padding-block: var(--space-xl);
}

.project-pager__link {
  display: grid;
  gap: var(--space-3xs);
  min-height: 44px;
  text-decoration: none;
}

.project-pager__link--next {
  margin-left: auto;
  text-align: right;
  justify-items: end;
}

.project-pager__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-text-muted);
  font-size: var(--step--1);
  font-weight: 500;
}

.project-pager__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-stretch: var(--font-display-stretch);
  font-weight: var(--font-display-weight);
}

.project-pager__link:hover .project-pager__title {
  text-decoration: underline;
  text-decoration-thickness: var(--hairline);
  text-underline-offset: 0.2em;
}

.compare-grid {
  display: grid;
  gap: var(--space-xl) var(--space-l);
  list-style: none;
}

@media (min-width: 64rem) {
  .compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* About, materials, showroom, commercial, FAQ ------------------------------------- */
/* Text beside a photo (about story); text alone when there is no photo yet. */
.media-split {
  display: grid;
  align-items: center;
  gap: var(--space-xl);
}

@media (min-width: 64rem) {
  .media-split:not(.media-split--text) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-3xl);
  }
}

.media-split__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.media-split__media picture,
.media-split__media img,
.media-split__media .placeholder {
  width: 100%;
  height: 100%;
}

.media-split__media img {
  object-fit: cover;
}

.promise .container {
  display: grid;
  justify-items: center;
  gap: var(--space-l);
}

.promise .section-heading {
  margin-bottom: 0;
}

.promise__crest {
  width: auto;
  height: 4rem;
}

/* Materials guide: a swatch beside each material's text. */
.material-list {
  display: grid;
  gap: var(--space-2xl);
}

.material {
  display: grid;
  gap: var(--space-l);
  padding-top: var(--space-l);
  border-top: var(--hairline) solid var(--color-line);
}

@media (min-width: 40rem) {
  .material:not(.material--text) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--space-xl);
  }
}

.material__swatch {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.material__swatch picture,
.material__swatch img,
.material__swatch .placeholder {
  width: 100%;
  height: 100%;
}

.material__swatch img {
  object-fit: cover;
}

.material__text {
  display: grid;
  justify-items: start;
  gap: var(--space-s);
}

.material__title {
  font-size: var(--step-3);
}

.material__summary {
  max-width: var(--measure);
  color: var(--color-text-muted);
  font-size: var(--step-1);
}

/* Comparison table: scrolls sideways inside its own region on narrow screens. */
.table-scroll {
  overflow-x: auto;
  border-top: var(--outline) solid var(--color-border);
}

.materials-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: separate; /* sticky cells keep their borders */
  border-spacing: 0;
  font-size: var(--step--1);
}

.materials-table__caption {
  margin-bottom: var(--space-s);
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

/* The material names stay in view while the other columns scroll past. */
.materials-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 8rem;
  padding-right: var(--space-s);
  border-right: var(--hairline) solid var(--color-line);
  background: var(--color-bg);
}

.materials-table th,
.materials-table td {
  padding: var(--space-s) var(--space-s) var(--space-s) 0;
  border-bottom: var(--hairline) solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.materials-table th:first-child + :is(th, td) {
  padding-left: var(--space-s);
}

.materials-table thead th {
  color: var(--color-text-muted);
  font-weight: 500;
}

.materials-table tbody th {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-stretch: var(--font-display-stretch);
  font-weight: 400;
}

/* Partner brands: text tiles until the logo files arrive. */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
  list-style: none;
}

/* An odd last tile spans the row on two columns, so the grid never ends in a gap. */
.brand-grid__item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (min-width: 40rem) {
  .brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-grid__item:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (min-width: 64rem) {
  .brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 76rem) {
  .brand-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.brand-grid__item {
  display: grid;
  place-items: center;
  min-height: 5rem;
  padding: var(--space-s);
  border: var(--hairline) solid var(--color-line);
  background: var(--color-surface);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-stretch: var(--font-display-stretch);
  text-align: center;
}

/* Showroom: address details beside the map. */
.visit {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 64rem) {
  .visit {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: var(--space-3xl);
  }
}

.visit__title {
  margin-bottom: var(--space-s);
  font-size: var(--step-3);
}

.visit__address {
  font-style: normal;
  line-height: 1.6;
}

.checklist {
  display: grid;
  gap: var(--space-s);
  list-style: none;
}

.checklist__item {
  display: flex;
  gap: var(--space-xs);
  padding-bottom: var(--space-s);
  border-bottom: var(--hairline) solid var(--color-line);
  font-size: var(--step-1);
}

.checklist__icon {
  margin-top: 0.15em;
  color: var(--color-text-muted);
}

.trade {
  display: grid;
  justify-items: start;
  gap: var(--space-l);
}

.trade__text {
  font-size: var(--step-1);
}

/* Contact ---------------------------------------------------------------------- */
/* Form first in the HTML (it's the page's job), details beside it on wide screens. */
.contact__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xl);
}

@media (min-width: 64rem) {
  .contact__layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: var(--space-3xl);
  }
}

.contact-cards {
  display: grid;
  gap: var(--space-l);
  list-style: none;
}

.contact-card {
  display: grid;
  gap: var(--space-2xs);
  padding-top: var(--space-s);
  border-top: var(--hairline) solid var(--color-line);
}

.contact-card__title {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
}

.contact__form-title {
  margin-bottom: var(--space-l);
  font-size: var(--step-3);
}

.map {
  display: grid;
  gap: var(--space-xs);
}

.map__panel {
  display: grid;
  justify-items: start;
  gap: var(--space-s);
  padding: var(--space-m);
  background: var(--color-bg);
}

.map__pin {
  width: 1.75rem;
  height: 1.75rem;
}

.map__address {
  line-height: 1.6;
}

.map__consent {
  display: grid;
  justify-items: start;
  gap: var(--space-xs);
}

.map__notice {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.map__frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  background: var(--color-bg);
}

/* Mobile call bar (contact page): fixed to the bottom on small screens. */
.call-bar {
  position: sticky;
  bottom: var(--consent-height, 0px); /* above the cookie notice while it shows */
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 3.5rem;
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
  font-weight: 500;
  text-decoration: none;
}

@media (min-width: 48rem) {
  .call-bar {
    display: none;
  }
}

/* Keep a focused field or a jumped-to anchor clear of the call bar. */
@media (max-width: 47.99rem) {
  html:has(.call-bar) {
    scroll-padding-bottom: calc(3.5rem + var(--space-s) + var(--consent-height, 0px));
  }
}

/* Thank you ---------------------------------------------------------------------- */
.thank-you {
  padding-block: var(--space-2xl) var(--space-3xl);
}

.thank-you__inner {
  display: grid;
  justify-items: center;
  gap: var(--space-l);
  text-align: center;
}

.thank-you__inner .section-heading {
  margin-bottom: 0;
}

.thank-you__crest {
  width: auto;
  height: 4.5rem;
  opacity: 0.5;
}

.thank-you__steps-title {
  margin-top: var(--space-l);
  font-size: var(--step-2);
}

.thank-you .timeline {
  width: 100%;
  text-align: left;
}

.thank-you__urgent {
  display: grid;
  justify-items: center;
  gap: var(--space-3xs);
}

.thank-you__links {
  justify-content: center;
}

/* Legal ---------------------------------------------------------------------------- */
.legal {
  padding-block: var(--space-xl) var(--space-3xl);
}

.legal__title {
  margin-top: var(--space-m);
  font-size: var(--step-5);
}

.legal__date {
  margin-top: var(--space-xs);
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.legal__intro {
  margin-top: var(--space-l);
}

.legal__toc {
  margin-block: var(--space-xl);
  padding: var(--space-m);
  border-left: var(--outline) solid var(--color-border);
  background: var(--color-surface);
}

.legal__toc-title {
  margin-bottom: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
}

.legal__toc ol {
  display: grid;
  gap: var(--space-3xs);
  padding-left: 1.4rem;
}

.legal__toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.legal__section {
  margin-top: var(--space-xl);
  overflow-wrap: anywhere; /* long emails and URLs wrap at 320px */
}

.legal__section h2 {
  font-size: var(--step-3);
}

.legal__section ul {
  padding-left: 1.4rem;
}

/* Error pages ---------------------------------------------------------------- */
.error-page {
  padding-block: clamp(4rem, 12vw, 8rem);
}

.error-page__inner {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}

.error-page__crest {
  width: auto;
  height: 6rem;
  opacity: 0.35;
}

.error-page__title {
  font-family: var(--font-display);
  font-stretch: var(--font-display-stretch);
  font-weight: var(--font-display-weight);
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.15;
}

.error-page__body {
  max-width: 34rem;
  color: var(--color-text-muted);
}

.error-page__link,
.error-page__phone {
  display: inline-block;
  padding-block: 0.6rem;
}

.error-page__links {
  justify-content: center;
  list-style: none;
}

.error-page__help {
  color: var(--color-text-muted);
}

.error-page__detail {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border: var(--hairline) solid var(--color-line);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  text-align: left;
}

/* Countertop calculator ---------------------------------------------------------- */
/* Choices first; the estimate beside them on wide screens, kept in view while scrolling. */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 64rem) {
  .calc {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-3xl);
  }

  .calc__result {
    position: sticky;
    top: calc(var(--header-height) + var(--space-m));
  }
}

.calc__form {
  display: grid;
  gap: var(--space-l);
}

.calc__title {
  font-size: var(--step-3);
}

.calc-stepper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-2xs);
}

.calc-stepper:not(:has(.calc-stepper__unit)) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.calc-stepper__btn {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: var(--outline) solid var(--color-border-muted);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--step-1);
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease);
}

.calc-stepper__btn:hover {
  border-color: var(--color-border);
  background: var(--color-bg);
}

/* Without the − / + buttons (no JavaScript) the field takes the full row. */
.calc-stepper__btn[hidden] + .calc-stepper__input {
  grid-column: 1 / 3;
}

.calc-stepper__input {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.calc-stepper__unit {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.calc-tier {
  display: grid;
  gap: var(--space-3xs);
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.calc-tier__price s {
  color: var(--color-text-muted);
}

.calc-choice {
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Phones: the total stays in view at the bottom while the choices are filled in. */
.calc__peek {
  position: sticky;
  bottom: var(--consent-height, 0px); /* above the cookie notice while it shows */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--space-xs) var(--gutter);
  padding-bottom: calc(var(--space-xs) + env(safe-area-inset-bottom, 0px));
  border-top: var(--hairline) solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--step--1);
  text-decoration: none;
}

.calc__peek strong {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-stretch: var(--font-display-stretch);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 64rem) {
  .calc__peek {
    display: none;
  }
}

/* A field focused under the bar scrolls up above it (WCAG 2.4.11). */
@media (max-width: 63.99rem) {
  html:has(.calc__peek) {
    scroll-padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px) + var(--consent-height, 0px));
  }
}

.calc-choice__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

/* Yes / No as outlined pills; the native radio stays for keyboard and screen readers. */
.calc-choice__option {
  position: relative;
  display: inline-flex;
}

.calc-choice__option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.calc-choice__option span {
  display: inline-grid;
  place-items: center;
  min-width: 5.5rem;
  min-height: 2.75rem;
  padding-inline: var(--space-m);
  border: var(--outline) solid var(--color-border-muted);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 500;
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.calc-choice__option input:checked + span {
  border-color: var(--color-accent-bg);
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.calc-choice__option input:focus-visible + span {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* High-contrast modes drop backgrounds: mark the chosen pill with the system highlight. */
@media (forced-colors: active) {
  .calc-choice__option input:checked + span {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
}

.calc-island {
  display: grid;
  gap: var(--space-2xs);
  margin-top: var(--space-2xs);
}

.calc__result {
  display: grid;
  gap: var(--space-m);
  padding: var(--space-l);
  border: var(--hairline) solid var(--color-line);
  background: var(--color-bg);
}

.calc__total {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-stretch: var(--font-display-stretch);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.calc__lines {
  display: grid;
  border-top: var(--hairline) solid var(--color-line);
}

.calc__line {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  padding-block: var(--space-xs);
  border-bottom: var(--hairline) solid var(--color-line);
  font-size: var(--step--1);
}

.calc__line dt {
  color: var(--color-text-muted);
}

.calc__line dd {
  flex: none;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.calc__line--total {
  font-size: var(--step-0);
  font-weight: 500;
}

.calc__line--total dt {
  color: var(--color-text);
}

.calc__cta {
  justify-self: start;
}

.calc__notes {
  display: grid;
  gap: var(--space-2xs);
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

/* The estimate carried into the quote form (/contact?estimate=…). */
.quote-estimate {
  display: grid;
  gap: var(--space-xs);
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  border: var(--hairline) solid var(--color-line);
  background: var(--color-bg);
}

.quote-estimate__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-s);
}

.quote-estimate__title {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 500;
}

.quote-estimate__total {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-stretch: var(--font-display-stretch);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}

.quote-estimate__summary {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.quote-form__calculator {
  margin-bottom: var(--space-s);
  color: var(--color-text-muted);
  font-size: var(--step--1);
}
