.dwd-estimator {
  --dwd-ink: var(--wp--preset--color--contrast, #17202a);
  --dwd-muted: #5f6872;
  --dwd-line: rgba(23, 32, 42, .16);
  --dwd-surface: #ffffff;
  --dwd-soft: #f5f7f8;
  --dwd-accent: var(--wp--preset--color--primary, #245a68);
  width: min(100%, 980px);
  margin: 1.25rem auto;
  color: var(--dwd-ink);
  font: inherit;
}
.dwd-estimator *, .dwd-estimator *::before, .dwd-estimator *::after { box-sizing: border-box; }
.dwd-estimator [hidden] { display: none !important; }
.dwd-estimator__header { max-width: 720px; margin-bottom: 1.25rem; }
.dwd-estimator__eyebrow { display: block; margin-bottom: .45rem; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dwd-accent); }
.dwd-estimator__header h2 { margin: 0 0 .6rem; font-size: clamp(1.9rem, 8vw, 3.4rem); line-height: 1.06; }
.dwd-estimator__header p { margin: 0; color: var(--dwd-muted); font-size: 1rem; line-height: 1.55; }
.dwd-estimator__mode { display: grid; grid-template-columns: 1fr; gap: .85rem; }
.dwd-estimator__mode-button { appearance: none; width: 100%; min-height: 112px; border: 1px solid var(--dwd-line); background: var(--dwd-surface); border-radius: 16px; padding: 1.15rem; text-align: left; color: inherit; cursor: pointer; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.dwd-estimator__mode-button:hover { border-color: var(--dwd-accent); box-shadow: 0 12px 30px rgba(15, 23, 42, .09); }
.dwd-estimator__mode-button:focus-visible, .dwd-estimator button:focus-visible, .dwd-estimator select:focus-visible, .dwd-estimator input:focus-visible { outline: 3px solid color-mix(in srgb, var(--dwd-accent) 28%, transparent); outline-offset: 2px; border-color: var(--dwd-accent); }
.dwd-estimator__mode-button strong { display: block; margin-bottom: .4rem; font-size: 1.1rem; line-height: 1.3; }
.dwd-estimator__mode-button span { display: block; color: var(--dwd-muted); line-height: 1.45; }
.dwd-estimator__form { display: grid; gap: .9rem; scroll-margin-top: 1rem; }
.dwd-estimator__progress { display: grid; gap: .45rem; color: var(--dwd-muted); font-size: .9rem; font-weight: 650; }
.dwd-estimator__progress progress { width: 100%; height: 9px; accent-color: var(--dwd-accent); }
.dwd-estimator__section { scroll-margin-top: 1rem; border: 1px solid var(--dwd-line); border-radius: 16px; background: var(--dwd-surface); padding: 1rem; box-shadow: 0 7px 24px rgba(15, 23, 42, .04); }
.dwd-estimator__section h3 { margin: 0 0 1rem; font-size: 1.25rem; line-height: 1.25; }
.dwd-estimator__section h3:focus { outline: none; }
.dwd-estimator__grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.dwd-estimator__field { display: grid; gap: .5rem; align-content: start; }
.dwd-estimator__field label { font-weight: 650; line-height: 1.4; }
.dwd-estimator select, .dwd-estimator input[type="number"], .dwd-estimator input[type="email"] { width: 100%; min-height: 52px; border: 1px solid var(--dwd-line); border-radius: 10px; background: #fff; color: var(--dwd-ink); padding: .75rem .8rem; font: inherit; font-size: 16px; line-height: 1.25; }
.dwd-estimator__contact { background: var(--dwd-soft); }
.dwd-estimator__consent { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1rem; line-height: 1.5; cursor: pointer; }
.dwd-estimator__consent input { width: 22px; height: 22px; margin: .1rem 0 0; flex: 0 0 auto; accent-color: var(--dwd-accent); }
.dwd-estimator__consent a { color: var(--dwd-accent); text-underline-offset: 2px; }
.dwd-estimator__fineprint { margin: .85rem 0 0; color: var(--dwd-muted); font-size: .86rem; line-height: 1.5; }
.dwd-estimator__actions { display: grid; grid-template-columns: 1fr; gap: .65rem; }
.dwd-estimator__submit, .dwd-estimator__secondary { width: 100%; min-height: 50px; padding: .78rem 1rem; border-radius: 10px; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.dwd-estimator__submit { border: 1px solid var(--dwd-accent); background: var(--dwd-accent); color: #fff; }
.dwd-estimator__secondary { border: 1px solid var(--dwd-line); background: #fff; color: var(--dwd-ink); }
.dwd-estimator__submit:disabled { opacity: .6; cursor: wait; }
.dwd-estimator__error { margin: 0; padding: .85rem 1rem; border: 1px solid rgba(138, 32, 32, .2); border-radius: 10px; background: #fff2f2; color: #8a2020; line-height: 1.45; }
.dwd-estimator__honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px,1px,1px,1px) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

@media (min-width: 720px) {
  .dwd-estimator { margin: 2rem auto; }
  .dwd-estimator__mode { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .dwd-estimator__mode-button { padding: 1.4rem; }
  .dwd-estimator__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dwd-estimator__section { padding: 1.35rem; }
  .dwd-estimator__actions { grid-template-columns: auto minmax(160px, 220px); justify-content: space-between; align-items: center; }
  .dwd-estimator__secondary { width: auto; min-width: 130px; }
  .dwd-estimator__submit { width: auto; min-width: 180px; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .dwd-estimator__mode-button { transition: none; }
  .dwd-estimator * { scroll-behavior: auto !important; }
}


body.dwd-estimator-modal-open { overflow: hidden; }
.dwd-estimator__modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 18px; }
.dwd-estimator__modal[hidden] { display: none !important; }
.dwd-estimator__modal-backdrop { position: absolute; inset: 0; background: rgba(9, 38, 110, .68); backdrop-filter: blur(4px); }
.dwd-estimator__result-card { position: relative; z-index: 1; width: min(100%, 700px); max-height: calc(100vh - 36px); overflow: auto; background: #fff; border-radius: 20px; padding: 26px; box-shadow: 0 30px 90px rgba(9, 38, 110, .28); border: 1px solid rgba(9, 38, 110, .12); }
.dwd-estimator__result-card:focus { outline: none; }
.dwd-estimator__modal-close { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--dwd-line); background: #fff; color: var(--dwd-ink); font-size: 29px; line-height: 1; cursor: pointer; }
.dwd-estimator__result-brand { margin: 0 58px 18px 0; min-height: 44px; display: flex; align-items: center; }
.dwd-estimator__result-brand img { display: block; width: min(100%, 270px); height: auto; max-height: 72px; object-fit: contain; object-position: left center; }
.dwd-estimator__result-card h2 { margin: .25rem 0 1.1rem; font-size: clamp(1.8rem, 7vw, 2.7rem); line-height: 1.08; color: #23282f; }
.dwd-estimator__result-meta { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
.dwd-estimator__result-meta > div { padding: 11px 13px; border-radius: 10px; background: #f6f8fb; border: 1px solid #e1e6ed; }
.dwd-estimator__result-meta span, .dwd-estimator__result-price > span { display: block; margin-bottom: 4px; color: #667085; font-size: .75rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.dwd-estimator__result-meta strong { color: #23282f; font-size: .95rem; overflow-wrap: normal; word-break: normal; }
.dwd-estimator__result-prices { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dwd-estimator__result-price { padding: 18px; border-radius: 14px; background: #eef5ff; border: 1px solid #cbdcff; }
.dwd-estimator__result-price strong { color: #09266e; font-weight: 850; }
.dwd-estimator__price-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .18em; row-gap: .08em; line-height: 1; }
.dwd-estimator__price-amount { display: inline-block; white-space: nowrap; font-size: clamp(1.9rem, 8vw, 3.35rem); letter-spacing: -.035em; }
.dwd-estimator__price-period { display: inline-block; white-space: nowrap; font-size: clamp(.9rem, 3.2vw, 1.15rem); line-height: 1.1; letter-spacing: 0; }
.dwd-estimator__spam-notice { margin-top: 18px; padding: 16px 17px; border-radius: 12px; background: #fff8df; border: 1px solid #ecd47c; color: #5f4a00; line-height: 1.5; }
.dwd-estimator__spam-notice strong { display: block; margin-bottom: 5px; color: #5b4300; font-size: 1rem; }
.dwd-estimator__spam-notice span { display: block; font-size: .92rem; }
.dwd-estimator__spam-notice--warning { background: #fff2f2; border-color: rgba(138,32,32,.3); color: #7a2424; }
.dwd-estimator__spam-notice--warning strong { color: #7a2424; }
.dwd-estimator__result-note { margin: 16px 0 0; color: #667085; font-size: .9rem; line-height: 1.55; }
.dwd-estimator__result-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 20px; }
.dwd-estimator__result-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (min-width: 620px) {
  .dwd-estimator__result-meta { grid-template-columns: 1.35fr .85fr; }
  .dwd-estimator__result-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dwd-estimator__result-actions { grid-template-columns: 1fr 1fr; }
  .dwd-estimator__result-actions .dwd-estimator__secondary,
  .dwd-estimator__result-actions .dwd-estimator__submit { width: 100%; min-width: 0; }
}

/* The Print / Save as PDF button prints a dedicated document created in JavaScript.
   Keeping the live page out of print layout prevents blank pages from the surrounding site. */


@media (max-width: 420px) {
  .dwd-estimator__modal { padding: 10px; }
  .dwd-estimator__result-card { max-height: calc(100vh - 20px); padding: 20px 16px; border-radius: 16px; }
  .dwd-estimator__modal-close { top: 9px; right: 9px; width: 38px; height: 38px; font-size: 26px; }
  .dwd-estimator__result-brand { margin-right: 48px; margin-bottom: 14px; }
  .dwd-estimator__result-brand img { width: min(100%, 230px); max-height: 62px; }
  .dwd-estimator__result-price { padding: 15px; }
}
