.dw-calculator,
.dw-portal {
  --dw-ink: #172431;
  --dw-muted: #59646c;
  --dw-line: rgba(23, 36, 49, .16);
  --dw-paper: #f5f0e8;
  --dw-surface: #fff;
  --dw-accent: #dfc6a4;
  --dw-accent-ink: #172431;
  color: var(--dw-ink);
  font: inherit;
  box-sizing: border-box;
}

.dw-calculator *, .dw-calculator *::before, .dw-calculator *::after,
.dw-portal *, .dw-portal *::before, .dw-portal *::after { box-sizing: inherit; }

.dw-calculator {
  display: grid;
  gap: 28px;
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 44px 18px;
}

.dw-calculator__intro { max-width: 660px; }
.dw-eyebrow {
  margin: 0 0 12px;
  color: #52684e;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dw-calculator__intro h2, .dw-portal h1 {
  margin: 0;
  color: var(--dw-ink);
  font-size: clamp(32px, 8.5vw, 64px);
  line-height: .98;
  letter-spacing: -.045em;
}
.dw-calculator__intro > p:last-child {
  margin: 20px 0 0;
  color: var(--dw-muted);
  font-size: 17px;
  line-height: 1.6;
}
.dw-calculator__panel {
  overflow: hidden;
  border: 1px solid var(--dw-line);
  border-radius: 24px;
  background: var(--dw-surface);
  box-shadow: 0 24px 70px rgba(29, 42, 35, .08);
}
.dw-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--dw-line);
}
.dw-progress__bar { flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: #e9ece6; }
.dw-progress__bar > span { display: block; width: 25%; height: 100%; border-radius: inherit; background: var(--dw-ink); transition: width .35s ease; }
.dw-progress__label { color: var(--dw-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dw-form { padding: 28px 20px 22px; }
.dw-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.dw-step.is-active { animation: dw-step-in .32s ease both; }
.dw-step legend { width: 100%; margin: 0; padding: 0; font-size: clamp(24px, 7vw, 38px); font-weight: 720; line-height: 1.08; letter-spacing: -.035em; }
.dw-step__hint { margin: 10px 0 24px; color: var(--dw-muted); line-height: 1.5; }
.dw-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.dw-field { display: grid; gap: 8px; min-width: 0; color: var(--dw-ink); font-size: 14px; font-weight: 680; }
.dw-field small { color: var(--dw-muted); font-weight: 450; }
.dw-field input, .dw-field select, .dw-field textarea {
  display: block;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 14px 15px;
  border: 1px solid var(--dw-line);
  border-radius: 13px;
  outline: 0;
  background: #fbfcf9;
  color: var(--dw-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.dw-field textarea { min-height: 108px; resize: vertical; }
.dw-field input:focus, .dw-field select:focus, .dw-field textarea:focus { border-color: #54644f; background: #fff; box-shadow: 0 0 0 4px rgba(96, 119, 84, .12); }
.dw-field input::placeholder, .dw-field textarea::placeholder { color: #9aa39d; }
.dw-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  border: 1.5px dashed #9aa69c;
  border-radius: 16px;
  background: #f7f9f4;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.dw-upload:hover, .dw-upload:focus-within { border-color: #52684e; background: #f2f7eb; }
.dw-upload.has-file { border-style: solid; border-color: #719650; background: #f2f8e9; }
.dw-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dw-upload__icon { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--dw-ink); color: #fff; font-size: 26px; font-weight: 300; }
.dw-upload > span:last-child { display: grid; min-width: 0; gap: 4px; }
.dw-upload b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.dw-upload small { color: var(--dw-muted); font-size: 12px; font-weight: 450; }
.dw-consent { display: flex; align-items: flex-start; gap: 11px; color: var(--dw-muted); font-size: 13px; font-weight: 460; line-height: 1.45; }
.dw-consent input { flex: 0 0 20px; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--dw-ink); }
.dw-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.dw-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.dw-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid var(--dw-ink);
  border-radius: 999px;
  background: var(--dw-ink);
  color: #fff !important;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none !important;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.dw-button:hover { transform: translateY(-1px); }
.dw-button:focus-visible { outline: 3px solid rgba(88, 118, 69, .3); outline-offset: 3px; }
.dw-button:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.dw-button--ghost { background: transparent; color: var(--dw-ink) !important; }
.dw-button--wide { width: 100%; }
.dw-button.is-loading { color: rgba(255,255,255,.72) !important; }
.dw-form__error { margin-top: 18px; padding: 13px 15px; border-radius: 12px; background: #fff0ed; color: #8d2d1f; font-size: 14px; line-height: 1.45; }
.dw-success { padding: 56px 24px; text-align: center; }
.dw-success:focus { outline: none; }
.dw-success__mark { display: grid; width: 62px; height: 62px; margin: 0 auto 20px; place-items: center; border-radius: 50%; background: var(--dw-accent); color: var(--dw-accent-ink); font-size: 28px; }
.dw-success h3 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.dw-success p { max-width: 510px; margin: 12px auto 0; color: var(--dw-muted); line-height: 1.55; }
.dw-success__reference { font-size: 13px; font-weight: 720; letter-spacing: .04em; }

.dw-portal { min-height: 75vh; padding: 44px 18px 72px; background: var(--dw-paper); }
.dw-portal__shell { width: min(1080px, 100%); margin: 0 auto; }
.dw-payment, .dw-message, .dw-estimate { padding: 28px 20px; border: 1px solid var(--dw-line); border-radius: 24px; background: var(--dw-surface); box-shadow: 0 24px 70px rgba(29,42,35,.08); }
.dw-payment, .dw-message { width: min(660px, 100%); margin: 20px auto; }
.dw-payment__lead, .dw-message > p { color: var(--dw-muted); font-size: 17px; line-height: 1.6; }
.dw-payment__total { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 30px 0 18px; padding: 20px 0; border-block: 1px solid var(--dw-line); }
.dw-payment__total span { color: var(--dw-muted); }
.dw-payment__total strong { font-size: clamp(27px, 8vw, 44px); line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.dw-notice { display: grid; gap: 4px; margin: 18px 0; padding: 14px 16px; border-radius: 13px; background: #f2f7e9; }
.dw-notice span { color: var(--dw-muted); font-size: 13px; }
.dw-payment__form { margin-top: 20px; }
.dw-message .dw-button { margin-top: 12px; }
.dw-estimate__header { display: grid; gap: 22px; }
.dw-estimate__header > div { max-width: 750px; }
.dw-estimate__header p:not(.dw-eyebrow) { color: var(--dw-muted); line-height: 1.6; }
.dw-estimate__meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 28px 0 16px; color: var(--dw-muted); font-size: 13px; }
.dw-table-wrap { overflow-x: auto; border: 1px solid var(--dw-line); border-radius: 15px; -webkit-overflow-scrolling: touch; }
.dw-estimate__table { width: 100%; min-width: 700px; border: 0; border-collapse: collapse; background: #fff; font-size: 14px; }
.dw-estimate__table th, .dw-estimate__table td { padding: 15px; border: 0; border-bottom: 1px solid var(--dw-line); text-align: left; vertical-align: top; }
.dw-estimate__table th { color: var(--dw-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.dw-estimate__table td:first-child { display: grid; gap: 3px; }
.dw-estimate__table td:first-child small { color: #64805c; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.dw-estimate__table td:first-child span { color: var(--dw-muted); font-size: 12px; line-height: 1.4; }
.dw-estimate__table td:nth-child(n+2) { white-space: nowrap; }
.dw-estimate__total { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 18px 0 36px; padding: 22px; border-radius: 15px; background: var(--dw-ink); color: #fff; }
.dw-estimate__total strong { font-size: clamp(26px, 7vw, 42px); line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.dw-estimate__notes { margin-top: 28px; }
.dw-estimate__notes h2 { margin: 0 0 12px; font-size: 21px; letter-spacing: -.025em; }
.dw-estimate__notes ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--dw-muted); line-height: 1.55; }
.dw-estimate__footer { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--dw-line); color: var(--dw-muted); font-size: 12px; line-height: 1.55; }

@keyframes dw-step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (min-width: 720px) {
  .dw-calculator { padding: 80px 28px; gap: 48px; }
  .dw-calculator__panel { border-radius: 32px; }
  .dw-progress { padding: 22px 30px; }
  .dw-form { padding: 42px 38px 32px; }
  .dw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .dw-field--wide { grid-column: 1 / -1; }
  .dw-success { padding: 84px 40px; }
  .dw-payment, .dw-message, .dw-estimate { padding: 48px; border-radius: 30px; }
  .dw-estimate__header { grid-template-columns: 1fr auto; align-items: start; }
  .dw-print-button { margin-top: 6px; }
}

@media (min-width: 1020px) {
  .dw-calculator { grid-template-columns: minmax(260px, .72fr) minmax(600px, 1.28fr); align-items: start; }
  .dw-calculator__intro { position: sticky; top: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .dw-calculator *, .dw-portal * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.dw-calculator [hidden], .dw-portal [hidden] { display:none !important; }
.dw-eyebrow { color:#795a3b; }
.dw-calculator__intro h2,.dw-portal h1 { line-height:1.12; overflow-wrap:break-word; text-wrap:balance; }
.dw-step legend { line-height:1.2; }
.dw-field { line-height:1.45; }
.dw-field input,.dw-field select,.dw-field textarea { background:#fffdf9; }
.dw-field input:focus,.dw-field select:focus,.dw-field textarea:focus { border-color:#967044; box-shadow:0 0 0 3px rgba(150,112,68,.15); }
.dw-field input::placeholder,.dw-field textarea::placeholder { color:#6a737a; }
.dw-upload { position:relative; background:#f7f3ec; border-color:#a79680; }
.dw-upload:hover,.dw-upload:focus-within { background:#f1e8db; border-color:#88603c; }
.dw-upload.has-file { background:#eef1f3; border-color:#627788; }
.dw-upload b { white-space:normal; overflow-wrap:anywhere; line-height:1.4; }
.dw-upload input { left:0; top:0; }
.dw-button { line-height:1.3; text-align:center; white-space:normal; }
.dw-button:focus-visible { outline:3px solid #a78253; }
.dw-notice { background:#f0e8db; color:#42515b; line-height:1.6; }
.dw-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.dw-payment__total,.dw-estimate__total { flex-wrap:wrap; align-items:center; }
.dw-payment__total span,.dw-estimate__total span { max-width:27ch; }
.dw-estimate__total strong { font-size:clamp(1.6rem,4vw,2.3rem); }
.dw-estimate__table td:first-child { display:table-cell; min-width:240px; }
.dw-estimate__table td:first-child > small,.dw-estimate__table td:first-child > b,.dw-estimate__table td:first-child > span { display:block; margin-bottom:5px; }
.dw-estimate__table td:first-child small { color:#795a3b; }
.dw-estimate__table th { letter-spacing:.025em; }
.dw-row-detail { margin-top:12px; font-size:12px; line-height:1.55; }
.dw-row-detail summary { min-height:34px; display:list-item; cursor:pointer; color:#765331; text-decoration:underline; text-underline-offset:3px; }
.dw-row-detail p { color:#59646c; margin:8px 0; }
.dw-table-wrap:focus-visible { outline:3px solid #a78253; outline-offset:4px; }
.dw-example-cta { padding-top:30px; text-align:center; }
@media (max-width:719px) {
 .dw-estimate__table,.dw-estimate__table tbody { display:block; width:100%; min-width:0; }
 .dw-estimate__table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .dw-estimate__table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-bottom:1px solid var(--dw-line); }
 .dw-estimate__table td { display:block; min-width:0; white-space:normal !important; font-size:13px; padding:12px; }
 .dw-estimate__table td:first-child { display:block; min-width:0; grid-column:1/-1; }
 .dw-estimate__table td:not(:first-child)::before { content:attr(data-label); display:block; margin-bottom:5px; color:var(--dw-muted); font-size:11px; }
 .dw-estimate__table td:first-child b { font-size:16px; }
 .dw-portal { padding:32px 14px 56px; }
 .dw-estimate,.dw-payment,.dw-message { padding:24px 16px; }
 .dw-portal h1 { font-size:clamp(1.9rem,8.5vw,3.2rem); }
 .dw-payment__total strong { font-size:2rem; }
 .dw-form__actions .dw-button { flex:1 1 120px; }
}
