.estimate-feature {
  background: var(--paper);
  color: var(--brown);
  border-bottom: 1px solid rgba(104, 95, 90, .2);
  padding: clamp(90px, 8vw, 145px) 0;
}

.estimate-feature-shell {
  width: min(calc(100% - 96px), 1600px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(430px, .9fr);
  gap: clamp(55px, 7vw, 125px);
  align-items: center;
}

.estimate-feature-copy h2 {
  margin: 0;
  max-width: 14ch;
  color: var(--brown);
  font-size: clamp(3.2rem, 4.35vw, 5.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.065em;
  text-transform: none;
  text-wrap: balance;
}

.estimate-feature-copy h2 em { color: var(--copper); font-style: normal; }

.estimate-feature-copy p {
  max-width: 710px;
  margin: 40px 0 36px;
  color: var(--brown);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.6;
}

.estimate-feature-cta {
  min-height: 64px;
  padding: 18px 30px;
  border: 0;
  border-radius: 8px;
  background: var(--copper);
  color: var(--white);
  font-size: .94rem;
  font-weight: 800;
  transition: background .2s, transform .2s;
}

.estimate-feature-cta:hover { background: var(--brown); transform: translateY(-2px); }

.estimate-document {
  min-height: 505px;
  padding: clamp(32px, 3.6vw, 58px);
  border-radius: 28px;
  background: var(--white);
  color: var(--brown);
  border: 1px solid rgba(104, 95, 90, .16);
  display: flex;
  flex-direction: column;
}

.estimate-document-top img { width: clamp(175px, 17vw, 280px); height: auto; }

.estimate-document-main { margin: auto 0 58px; }

.estimate-document-main h3 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 4vw, 5rem);
  line-height: 1.03;
  letter-spacing: -.07em;
  font-weight: 800;
  text-transform: none;
}

.estimate-document-main p {
  margin: 0;
  color: var(--copper);
  font-size: clamp(2.2rem, 3.3vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.065em;
  font-weight: 800;
}

.estimate-document-main small { display: block; margin-top: 12px; color: var(--brown); font-size: .72rem; }

.estimate-document-action {
  width: 100%;
  min-height: 70px;
  padding: 18px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--copper);
  color: var(--white);
  text-align: left;
  font-size: .96rem;
  font-weight: 800;
  transition: background .2s;
}

.estimate-document-action:hover { background: var(--brown); }
.estimate-document-action svg { width: 22px; height: 22px; flex: none; }

.estimate-dialog {
  width: min(820px, calc(100% - 30px));
  max-height: min(90svh, 1100px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--white);
  color: var(--brown);
  box-shadow: 0 30px 100px rgba(48, 39, 34, .55);
}

.estimate-dialog::backdrop { background: rgba(48, 39, 34, .82); }

.estimate-dialog-head {
  padding: 28px clamp(24px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(104, 95, 90, .2);
}

.estimate-dialog-head img { width: 200px; height: auto; }

.estimate-dialog-close {
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--brown);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
}

.estimate-dialog-close:hover { background: var(--copper); }

.estimate-dialog-body { padding: 36px clamp(24px, 5vw, 48px) 44px; }
.estimate-dialog-label { color: var(--copper); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }

.estimate-dialog h2 {
  margin: 18px 0 16px;
  font-size: clamp(2.6rem, 4.5vw, 4.7rem);
  line-height: 1.03;
  letter-spacing: -.07em;
  font-weight: 800;
  text-transform: none;
}

.estimate-dialog-body > p {
  max-width: 700px;
  margin: 0 0 25px;
  color: var(--brown);
  font-size: .85rem;
  line-height: 1.55;
}

.estimate-dialog-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 22px 0;
  border-top: 2px solid var(--brown);
  border-bottom: 2px solid var(--brown);
}

.estimate-dialog-total span { font-size: .84rem; font-weight: 700; }
.estimate-dialog-total strong { color: var(--copper); font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.05em; white-space: nowrap; }

.estimate-dialog-rates { display: flex; gap: 32px; padding: 19px 0; font-size: .75rem; color: var(--brown); }
.estimate-dialog-rates span { flex: 1; }
.estimate-dialog-rates b { float: right; margin-left: 10px; color: var(--copper); }

.estimate-dialog-section-title { margin: 24px 0 8px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.035em; text-transform: none; }
.estimate-dialog-row { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(104, 95, 90, .2); font-size: .85rem; }
.estimate-dialog-row span b { color: var(--copper); margin-right: 18px; font-size: .7rem; }
.estimate-dialog-row strong { white-space: nowrap; }

.estimate-dialog-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; padding-top: 12px; }
.estimate-dialog-detail-grid dl { margin: 0; }
.estimate-dialog-detail-grid dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(104, 95, 90, .2); font-size: .71rem; line-height: 1.45; }
.estimate-dialog-detail-grid dt { color: var(--brown); }
.estimate-dialog-detail-grid dd { flex: none; margin: 0; font-weight: 700; text-align: right; }
.estimate-dialog-detail-grid .estimate-dialog-subtotal { border-bottom: 0; font-size: .81rem; font-weight: 800; }
.estimate-dialog-detail-grid .estimate-dialog-subtotal dt { color: var(--brown); }
.estimate-dialog-detail-grid .estimate-dialog-subtotal dd { color: var(--copper); }

@media (max-width: 1000px) {
  .estimate-feature-shell { grid-template-columns: 1fr; gap: 50px; }
  .estimate-feature-copy h2 { max-width: 17ch; }
  .estimate-document { width: min(100%, 650px); }
}

@media (max-width: 600px) {
  .estimate-feature { padding: 76px 0 84px; }
  .estimate-feature-shell { width: calc(100% - 34px); gap: 36px; }
  .estimate-feature-copy h2 { max-width: none; font-size: clamp(2.7rem, 9.3vw, 4.4rem); }
  .estimate-feature-copy p { margin: 24px 0 28px; font-size: .88rem; }
  .estimate-feature-cta { width: 100%; min-height: 58px; font-size: .82rem; }
  .estimate-document { min-height: 400px; padding: 26px; border-radius: 20px; }
  .estimate-document-top img { width: 180px; }
  .estimate-document-main { margin-bottom: 40px; }
  .estimate-document-main h3 { font-size: 2.65rem; }
  .estimate-document-main p { font-size: 2.15rem; }
  .estimate-document-action { min-height: 60px; padding: 15px 17px; font-size: .77rem; }
  .estimate-dialog { width: calc(100% - 18px); max-height: 95svh; border-radius: 12px; }
  .estimate-dialog-head { padding: 16px 20px; }
  .estimate-dialog-head img { width: 155px; }
  .estimate-dialog-body { padding: 25px 20px 35px; }
  .estimate-dialog h2 { font-size: 2.45rem; }
  .estimate-dialog-total { align-items: start; flex-direction: column; gap: 5px; }
  .estimate-dialog-rates { flex-direction: column; gap: 8px; }
  .estimate-dialog-detail-grid { grid-template-columns: 1fr; gap: 8px; }
  .estimate-dialog-row { font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .estimate-feature-cta, .estimate-document-action { transition: none; }
}

/* Company proposal: one accessible table, stacked into readable cards on mobile. */
.estimate-dialog {
  width: min(1180px, calc(100% - 32px));
  max-height: 92svh;
  border-radius: var(--radius-card);
  overscroll-behavior: contain;
}
.estimate-dialog .estimate-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: var(--space-4) var(--space-8);
  background: var(--brown);
  color: var(--white);
  border: 0;
}
.estimate-dialog-head img { width: 190px; filter: grayscale(1) invert(1) contrast(3); mix-blend-mode: screen; }
.estimate-dialog-head-caption { margin-left: auto; font-size: var(--type-small); font-weight: var(--weight-medium); }
.estimate-dialog-close { background: rgba(255, 255, 255, .12); }
.estimate-dialog-close:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.estimate-dialog .estimate-dialog-label {
  display: block;
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  letter-spacing: .02em;
  text-transform: none;
}
.estimate-dialog h2 { margin: var(--space-3) 0 var(--space-4); text-wrap: balance; }
.estimate-dialog-body > #estimate-dialog-desc { max-width: 740px; font-size: var(--type-body); margin-bottom: var(--space-6); }
.estimate-proposal-wrap {
  overflow: hidden;
  border: 1px solid rgba(104, 95, 90, .2);
  border-radius: var(--radius-control);
}
.estimate-proposal { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--type-small); line-height: 1.5; }
.estimate-proposal th, .estimate-proposal td { padding: var(--space-4); text-align: left; vertical-align: top; overflow-wrap: break-word; }
.estimate-proposal thead { background: var(--brown); color: var(--white); }
.estimate-proposal thead th { font-weight: var(--weight-medium); }
.estimate-proposal thead th:nth-child(1) { width: 24%; }
.estimate-proposal thead th:nth-child(2) { width: 16%; }
.estimate-proposal thead th:nth-child(3) { width: 24%; }
.estimate-proposal thead th:nth-child(4) { width: 36%; }
.estimate-proposal tbody tr + tr { border-top: 1px solid rgba(104, 95, 90, .2); }
.estimate-proposal tbody th { font-weight: var(--weight-heading); }
.estimate-proposal th small { display: block; margin-top: var(--space-1); font-size: var(--type-caption); font-weight: var(--weight-regular); }
.estimate-proposal .estimate-proposal-amount { font-weight: var(--weight-heading); white-space: nowrap; font-variant-numeric: tabular-nums; }
.estimate-mobile-label { display: none; }
.estimate-dialog .estimate-dialog-total {
  margin-top: var(--space-6);
  padding: var(--space-6);
  border: 0;
  border-radius: var(--radius-control);
  background: var(--paper);
  align-items: center;
}
.estimate-dialog-total span { font-size: var(--type-body); }
.estimate-dialog-total small { display: block; margin-top: var(--space-1); font-size: var(--type-caption); font-weight: var(--weight-regular); }
.estimate-dialog-total strong { font-size: var(--type-modal); font-weight: var(--weight-heading); font-variant-numeric: tabular-nums; }
.estimate-dialog-body > .estimate-proposal-note { max-width: none; margin: var(--space-4) 0 0; font-size: var(--type-caption); line-height: 1.6; }
@media (max-width: 760px) {
  .estimate-dialog { width: calc(100% - 24px); max-height: 94svh; }
  .estimate-dialog .estimate-dialog-head { padding: var(--space-4) var(--space-6); }
  .estimate-dialog-head img { width: 160px; }
  .estimate-dialog-head-caption { display: none; }
  .estimate-dialog-close { margin-left: auto; }
  .estimate-dialog .estimate-dialog-body { padding: var(--space-6); }
  .estimate-proposal-wrap { border: 0; border-radius: 0; overflow: visible; }
  .estimate-proposal, .estimate-proposal tbody { display: block; }
  .estimate-proposal thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .estimate-proposal tbody tr { display: grid; gap: var(--space-4); padding: var(--space-6); border: 1px solid rgba(104, 95, 90, .2); border-radius: var(--radius-control); }
  .estimate-proposal tbody tr + tr { margin-top: var(--space-4); }
  .estimate-proposal th, .estimate-proposal td { display: block; width: auto; padding: 0; font-size: var(--type-body); }
  .estimate-proposal .estimate-proposal-amount { margin-top: calc(-1 * var(--space-2)); color: var(--copper); font-size: 22px; }
  .estimate-mobile-label { display: block; margin-bottom: var(--space-1); font-size: var(--type-caption); font-weight: var(--weight-medium); }
  .estimate-dialog .estimate-dialog-total { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}
@media (max-width: 380px) {
  .estimate-dialog .estimate-dialog-body, .estimate-dialog .estimate-dialog-head { padding: var(--space-4); }
  .estimate-proposal tbody tr { padding: var(--space-4); }
}
