.dw-calculator {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid #d8dee8;
    border-radius: 16px;
    background: #ffffff;
    color: #162033;
    font: inherit;
}

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

.dw-calculator__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #526072;
}

.dw-calculator__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    line-height: 1.2;
}

.dw-calculator__description {
    max-width: 760px;
    margin: 0 0 1.25rem;
    line-height: 1.6;
}

.dw-form {
    display: grid;
    gap: 1rem;
}

.dw-form__required-note {
    margin: 0 0 -0.25rem;
    color: #526072;
    font-size: 0.9rem;
    line-height: 1.4;
}

.dw-form__rows {
    display: grid;
    gap: 1rem;
}

.dw-form__row,
.dw-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: start;
}

.dw-field {
    display: grid;
    grid-template-rows: minmax(2.75rem, auto) 52px auto;
    align-content: start;
    gap: 0.35rem;
    min-width: 0;
}

.dw-field label {
    display: flex;
    align-items: flex-end;
    gap: 0.2rem;
    min-height: 2.75rem;
    margin: 0;
    font-weight: 700;
    line-height: 1.35;
}

.dw-field input,
.dw-field select {
    display: block;
    width: 100%;
    height: 52px;
    min-height: 52px;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #aab6c5;
    border-radius: 10px;
    background: #fff;
    color: #162033;
    font: inherit;
    line-height: 1.2;
}

.dw-field input:focus,
.dw-field select:focus {
    outline: 2px solid #0f766e;
    outline-offset: 1px;
    border-color: #0f766e;
}

.dw-field__help,
.dw-field__warning,
.dw-field__error {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.dw-field__help {
    color: #526072;
}

.dw-field__warning {
    color: #92400e;
    font-weight: 700;
}

.dw-field__error {
    color: #991b1b;
    font-weight: 700;
}

.dw-field--error input,
.dw-field--error select {
    border-color: #991b1b;
}

.dw-required {
    color: #991b1b;
    font-weight: 700;
}

.dw-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.dw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid #0f766e;
    border-radius: 10px;
    background: #0f766e;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.dw-button:hover,
.dw-button:focus {
    background: #115e59;
    border-color: #115e59;
}

.dw-button--secondary {
    margin-top: 1rem;
    background: #fff;
    color: #0f766e;
}

.dw-button--secondary:hover,
.dw-button--secondary:focus {
    background: #ecfdf5;
    color: #115e59;
}

.dw-form__status {
    color: #526072;
    font-weight: 700;
}

.dw-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 700;
}

.dw-result-card {
    margin-top: 1.25rem;
    padding: clamp(1rem, 2vw, 1.25rem);
    border: 1px solid #b7d7d3;
    border-radius: 14px;
    background: #f8fffd;
}

.dw-result-card__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.dw-result-card__summary,
.dw-result-card__assumption,
.dw-result-card__sprint-note {
    margin: 0 0 1rem;
    line-height: 1.6;
}

.dw-result-card__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.dw-result-card__metrics div {
    padding: 0.85rem;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #fff;
}

.dw-result-card__metrics span {
    display: block;
    margin-bottom: 0.25rem;
    color: #526072;
    font-size: 0.9rem;
}

.dw-result-card__metrics strong {
    display: block;
    font-size: 1.1rem;
}

.dw-result-card__notes {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.dw-result-card__reason {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #fff;
}

.dw-result-card__reason h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    line-height: 1.35;
}

.dw-result-card__reason ul {
    margin: 0;
    padding-left: 1.25rem;
}

.dw-result-card__reason li {
    margin: 0.25rem 0;
}

.dw-result-card__sprint-note {
    color: #526072;
    font-size: 0.9rem;
}

.dw-disclaimer-card,
.dw-result-card__disclaimer {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #f8fafc;
    color: #526072;
    font-size: 0.9rem;
    line-height: 1.55;
}

.dw-disclaimer-card h3 {
    margin: 0 0 0.35rem;
    color: #162033;
    font-size: 1rem;
    line-height: 1.35;
}

.dw-disclaimer-card p {
    margin: 0;
}

.dw-result-card__disclaimer {
    margin-bottom: 1rem;
}

.dw-calculator code {
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .dw-form__row,
    .dw-form__grid {
        grid-template-columns: 1fr;
    }

    .dw-field {
        grid-template-rows: auto 52px auto;
    }

    .dw-field label {
        min-height: auto;
        align-items: flex-start;
    }
}

@media print {
    @page {
        size: Letter portrait;
        margin: 12mm;
    }

    html,
    body {
        background: #fff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .dw-calculator,
    .dw-calculator * {
        visibility: visible !important;
    }

    .dw-calculator {
        position: absolute !important;
        inset: 0 auto auto 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        color: #111827 !important;
        box-shadow: none !important;
        font-size: 10pt !important;
        line-height: 1.35 !important;
    }

    .dw-calculator__intro,
    .dw-form,
    .dw-button,
    .dw-error,
    .dw-form__status,
    .dw-disclaimer-card,
    .dw-result-card__sprint-note {
        display: none !important;
    }

    .dw-result-card[hidden],
    .dw-result-card:empty {
        display: none !important;
    }

    .dw-result-card {
        display: block !important;
        width: 100% !important;
        max-width: 184mm !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 10mm !important;
        border: 1.5pt solid #1f2937 !important;
        border-radius: 0 !important;
        background: #fff !important;
        color: #111827 !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        box-shadow: none !important;
    }

    .dw-result-card::before {
        content: "DeductibleWise Deductible Comparison Report";
        display: block;
        margin: 0 0 8pt;
        padding: 0 0 7pt;
        border-bottom: 1pt solid #9ca3af;
        color: #111827;
        font-size: 15pt;
        font-weight: 800;
        line-height: 1.2;
    }

    .dw-result-card__title {
        margin: 0 0 5pt !important;
        color: #111827 !important;
        font-size: 14pt !important;
        line-height: 1.2 !important;
    }

    .dw-result-card__summary,
    .dw-result-card__assumption,
    .dw-result-card__notes,
    .dw-result-card__disclaimer {
        margin: 0 0 7pt !important;
        line-height: 1.35 !important;
    }

    .dw-result-card__metrics {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6pt !important;
        margin: 8pt 0 !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .dw-result-card__metrics div {
        padding: 6pt !important;
        border: 1pt solid #cbd5e1 !important;
        border-radius: 0 !important;
        background: #fff !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .dw-result-card__metrics span {
        margin-bottom: 3pt !important;
        color: #4b5563 !important;
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
    }

    .dw-result-card__metrics strong {
        color: #111827 !important;
        font-size: 11pt !important;
        line-height: 1.2 !important;
    }

    .dw-result-card__reason {
        margin: 0 0 7pt !important;
        padding: 7pt !important;
        border: 1pt solid #cbd5e1 !important;
        border-radius: 0 !important;
        background: #fff !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .dw-result-card__reason h4 {
        margin: 0 0 4pt !important;
        font-size: 10pt !important;
        line-height: 1.2 !important;
    }

    .dw-result-card__reason ul,
    .dw-result-card__notes {
        padding-left: 14pt !important;
    }

    .dw-result-card__reason li,
    .dw-result-card__notes li {
        margin: 2pt 0 !important;
    }

    .dw-result-card__disclaimer {
        padding: 7pt !important;
        border: 1pt solid #cbd5e1 !important;
        border-radius: 0 !important;
        background: #fff !important;
        color: #374151 !important;
        font-size: 8.5pt !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}

.dw-field-info {
    margin: 0.1rem 0 0;
    color: #526072;
    font-size: 0.88rem;
    line-height: 1.45;
}

.dw-field-info summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    cursor: pointer;
    color: #0f766e;
    font-weight: 700;
    list-style: none;
}

.dw-field-info summary::-webkit-details-marker {
    display: none;
}

.dw-field-info summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border: 1px solid #0f766e;
    border-radius: 999px;
    font-size: 0.85rem;
    line-height: 1;
}

.dw-field-info[open] summary::before {
    content: "−";
}

.dw-field-info div {
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #f8fafc;
    color: #374151;
}

.dw-derived-output {
    display: flex;
    align-items: center;
    width: 100%;
    height: 52px;
    min-height: 52px;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #aab6c5;
    border-radius: 10px;
    background: #f8fafc;
    color: #162033;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
}

.dw-mode-section[hidden] {
    display: none !important;
}

.dw-mode-note {
    margin: 0 0 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #f8fafc;
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.5;
}

.dw-mode-note strong {
    display: block;
    margin-bottom: 0.15rem;
    color: #162033;
}

.dw-custom-rate {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.dw-custom-rate[hidden] {
    display: none !important;
}

.dw-custom-rate__label {
    min-height: 0 !important;
    align-items: flex-start !important;
    font-size: 0.9rem;
    font-weight: 700;
}

.dw-result-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.dw-result-card__actions .dw-button--secondary {
    margin-top: 0;
    text-decoration: none;
}

/* Sprint 5 public-page integration styles. Loaded only when a DeductibleWise shortcode appears. */
.dw-page,
.dw-page * {
    box-sizing: border-box;
}

.dw-page {
    color: #162033;
}

.dw-page a {
    text-underline-offset: 0.16em;
}

.dw-section {
    width: 100%;
    margin: clamp(1.5rem, 4vw, 3rem) auto;
    padding: clamp(1.2rem, 3vw, 2rem);
}

.dw-section--hero {
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid #d8dee8;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f5fbfc 100%);
    box-shadow: 0 20px 60px rgba(15, 37, 55, 0.08);
}

.dw-section--calculator,
.dw-section--calculator-mount {
    padding: 0;
}

.dw-section--education,
.dw-section--checklist,
.dw-section--faq,
.dw-section--final-cta,
.dw-section--calculator-hero {
    border: 1px solid #d8dee8;
    border-radius: 20px;
    background: #ffffff;
}

.dw-section--final-cta,
.dw-copy--center {
    text-align: center;
}

.dw-layout-grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.dw-layout-grid--hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.dw-kicker {
    margin: 0 0 0.7rem;
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dw-page-title {
    margin-top: 0;
    margin-bottom: 0.85rem;
    color: #05263f;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
}

.dw-lede {
    max-width: 760px;
    color: #39475a;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.65;
}

.dw-copy--center .dw-lede,
.dw-section--calculator-hero .dw-lede {
    margin-left: auto;
    margin-right: auto;
}

.dw-button-row {
    margin-top: 1.5rem;
}

.dw-gb-button-primary .wp-block-button__link,
.dw-gb-button-secondary .wp-block-button__link {
    min-height: 44px;
    padding: 0.72rem 1.15rem;
    border-radius: 999px;
    font-weight: 800;
}

.dw-gb-button-primary .wp-block-button__link {
    background: #05263f;
    color: #ffffff;
}

.dw-gb-button-primary .wp-block-button__link:hover,
.dw-gb-button-primary .wp-block-button__link:focus {
    background: #0f766e;
}

.dw-gb-button-secondary .wp-block-button__link {
    border-color: #05263f;
    color: #05263f;
}

.dw-sample-card {
    max-width: 360px;
    margin-left: auto;
    padding: clamp(1rem, 2vw, 1.35rem);
    border: 1px solid #d8dee8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 37, 55, 0.12);
}

.dw-sample-card__badge {
    display: inline-flex;
    margin: 0 0 1rem;
    padding: 0.38rem 0.7rem;
    border: 1px solid #b7d7d3;
    border-radius: 999px;
    background: #eefafa;
    color: #0f766e;
    font-size: 0.85rem;
    font-weight: 800;
}

.dw-sample-card__title {
    margin: 0 0 0.75rem;
    color: #05263f;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    line-height: 1.12;
}

.dw-sample-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dw-sample-metrics p {
    margin: 0;
}

.dw-sample-metrics span,
.dw-sample-metrics strong {
    display: block;
}

.dw-sample-metrics span {
    margin-bottom: 0.25rem;
    color: #526072;
    font-size: 0.9rem;
}

.dw-sample-metrics strong {
    color: #05263f;
    font-size: 1.35rem;
}

.dw-trust-grid,
.dw-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.dw-trust-card,
.dw-info-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid #d8dee8;
    border-radius: 14px;
    background: #f8fafc;
}

.dw-trust-card h3,
.dw-info-card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    color: #05263f;
    font-size: 1rem;
}

.dw-trust-card p,
.dw-info-card p {
    margin-bottom: 0;
    color: #39475a;
    line-height: 1.55;
}

.dw-calculator-mount {
    max-width: 1000px;
    margin: 1.25rem auto 0;
}

.dw-calculator-mount .dw-calculator,
.dw-section--calculator-mount .dw-calculator {
    margin-left: auto;
    margin-right: auto;
}

.dw-ad-wrap {
    margin: clamp(1.25rem, 3vw, 2.25rem) auto;
    padding: 0 !important;
}

.dw-ad-slot {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 90px;
    padding: 0.75rem;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.dw-ad-slot--rectangle {
    min-height: 250px;
}

.dw-ad-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dw-disclaimer-text {
    padding: 0.85rem 1rem;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #f8fafc;
    color: #526072;
    font-size: 0.92rem;
}

.dw-section--faq details {
    margin: 0.75rem 0;
    padding: 1rem;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #ffffff;
}

.dw-section--faq summary {
    cursor: pointer;
    color: #05263f;
    font-weight: 800;
}

@media (max-width: 900px) {
    .dw-layout-grid--hero,
    .dw-trust-grid,
    .dw-info-grid {
        grid-template-columns: 1fr;
    }

    .dw-sample-card {
        max-width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .dw-section,
    .dw-section--hero {
        padding: 1rem;
        border-radius: 16px;
    }

    .dw-page-title {
        font-size: 2rem;
    }

    .dw-lede {
        font-size: 1rem;
    }

    .dw-sample-metrics {
        grid-template-columns: 1fr;
    }

    .dw-ad-slot {
        min-height: 70px;
    }

    .dw-ad-slot--rectangle {
        min-height: 250px;
    }
}

/* Sprint 5.1 responsive Gutenberg card-grid hardening.
   Use Group + class dw-info-grid/dw-trust-grid. This also protects the frontend
   if a Gutenberg Group is accidentally converted to Row/Flex. */
.wp-block-group.dw-info-grid,
.wp-block-group.dw-trust-grid,
.wp-block-group.dw-info-grid.is-layout-flex,
.wp-block-group.dw-trust-grid.is-layout-flex,
.dw-info-grid,
.dw-trust-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem !important;
    align-items: stretch;
}

.dw-info-grid > .wp-block-group,
.dw-trust-grid > .wp-block-group,
.dw-info-grid > .dw-info-card,
.dw-trust-grid > .dw-trust-card {
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: 0 !important;
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .wp-block-group.dw-info-grid,
    .wp-block-group.dw-trust-grid,
    .wp-block-group.dw-info-grid.is-layout-flex,
    .wp-block-group.dw-trust-grid.is-layout-flex,
    .dw-info-grid,
    .dw-trust-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Sprint 5.2 theme integration guardrails.
   Loaded only where the DeductibleWise public assets are enqueued.
   Keeps block-theme header/mobile navigation above calculator content and
   prevents the Sprint 5 alignfull page shell from creating footer/viewport overflow. */
.wp-site-blocks > header,
.wp-site-blocks > .wp-block-template-part:first-child,
header.wp-block-template-part {
    position: relative;
    z-index: 10000;
}

.wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.has-modal-open,
.wp-block-navigation__responsive-dialog {
    z-index: 100000 !important;
}

.wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
}

.wp-site-blocks .dw-page.alignfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.dw-page {
    position: relative;
    z-index: 0;
    clear: both;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .dw-page {
        overflow-x: hidden;
    }
}

.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part:last-child,
footer.wp-block-template-part {
    position: relative;
    z-index: 1;
    clear: both;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.wp-site-blocks > footer *,
.wp-site-blocks > .wp-block-template-part:last-child * {
    box-sizing: border-box;
}

/* Sprint 10 — Compact guided step-row button form. */
.dw-calculator {
    width: min(100%, 920px);
    max-width: 920px;
    margin: 1.5rem auto;
    padding: clamp(0.85rem, 2vw, 1.25rem);
}

.dw-calculator__description {
    max-width: 820px;
    margin-bottom: 1rem;
}

.dw-form,
.dw-form__rows,
.dw-mode-section {
    display: grid;
    gap: 0.8rem;
}

.dw-form__required-note {
    margin: 0;
}

.dw-step-row {
    display: grid;
    gap: 0.62rem;
    padding: clamp(0.75rem, 1.8vw, 1rem);
    border: 1px solid #d7e0ea;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.dw-step-row--pending {
    border-color: #d3dbe6;
    background: #f8fafc;
}

.dw-step-row--error {
    border-color: #fca5a5;
    background: #fff7f7;
}

.dw-step-row--action {
    background: #f8fffd;
    border-color: #b7d7d3;
}

.dw-step-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.dw-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.35rem;
    border-radius: 10px;
    background: #e7f3f1;
    color: #075f59;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
}

.dw-step-title {
    margin: 0;
    color: #162033;
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    line-height: 1.25;
}

.dw-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.dw-choice-button {
    flex-grow: 1;
    min-width: 110px;
    min-height: 42px;
    padding: 0.62rem 0.72rem;
    border: 1px solid #aab6c5;
    border-radius: 10px;
    background: #ffffff;
    color: #162033;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dw-choice-button:hover {
    border-color: #64748b;
    background: #f1f5f9;
}

.dw-choice-button:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.dw-choice-button--selected,
.dw-choice-button--selected:hover {
    border-color: #0f766e;
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 118, 110, 0.2);
}

.dw-choice-grid--2 .dw-choice-button {
    flex-basis: calc(50% - 8px);
}

.dw-choice-grid--3 .dw-choice-button {
    flex-basis: calc(33.333% - 8px);
}

.dw-choice-grid--4 .dw-choice-button {
    flex-basis: calc(25% - 8px);
}

.dw-choice-grid--5 .dw-choice-button {
    flex-basis: calc(20% - 8px);
}

.dw-choice-grid--6 .dw-choice-button {
    flex-basis: calc(33.333% - 8px);
}

.dw-inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.dw-inline-fields--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 360px;
}

.dw-step-row .dw-field {
    grid-template-rows: none;
    gap: 0.35rem;
}

.dw-step-row .dw-field label {
    min-height: 0;
    align-items: center;
    font-size: 0.94rem;
}

.dw-step-row .dw-field input {
    height: 48px;
    min-height: 48px;
}

.dw-custom-rate {
    display: grid;
    gap: 0.35rem;
    max-width: 320px;
    margin-top: 0.15rem;
}

.dw-custom-rate__label {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
}

.dw-derived-strip {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #cfe4e1;
    border-radius: 12px;
    background: #f8fffd;
}

.dw-derived-strip > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: baseline;
}

.dw-derived-strip__label {
    color: #526072;
    font-size: 0.9rem;
    font-weight: 800;
}

.dw-derived-output {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #05263f;
    font-weight: 900;
}

.dw-derived-strip p {
    margin: 0;
    color: #526072;
    font-size: 0.9rem;
    line-height: 1.45;
}

.dw-step-help {
    margin: 0;
    color: #526072;
    font-size: 0.9rem;
    line-height: 1.45;
}

.dw-step-help summary {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: #0f766e;
    font-weight: 800;
}

.dw-step-help p {
    max-width: 780px;
    margin: 0.45rem 0 0;
}

.dw-step-row > .dw-field__help,
.dw-step-row > .dw-field__warning,
.dw-step-row > .dw-field__error {
    margin: 0;
}

.dw-step-row > .dw-field__error {
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: #fee2e2;
}

.dw-form__actions {
    margin-top: 0;
}

.dw-calculator__mini-disclaimer {
    margin: 0.9rem 0 0;
    color: #526072;
    font-size: 0.86rem;
    line-height: 1.45;
}

@media (max-width: 820px) {
    .dw-choice-grid--4 .dw-choice-button {
        flex-basis: calc(50% - 8px);
    }

    .dw-choice-grid--5 .dw-choice-button {
        flex-basis: calc(33.333% - 8px);
    }

    .dw-choice-grid--6 .dw-choice-button {
        flex-basis: calc(33.333% - 8px);
    }
}

@media (max-width: 560px) {
    .dw-calculator {
        padding: 0.75rem;
        border-radius: 14px;
    }

    .dw-step-row {
        padding: 0.72rem;
        border-radius: 12px;
    }

    .dw-inline-fields {
        grid-template-columns: 1fr;
    }

    .dw-choice-button {
        min-width: 0;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .dw-choice-grid--2 .dw-choice-button,
    .dw-choice-grid--4 .dw-choice-button,
    .dw-choice-grid--6 .dw-choice-button {
        flex-basis: calc(50% - 8px);
    }

    .dw-choice-grid--5 .dw-choice-button {
        flex-basis: calc(33.333% - 8px);
    }
}

@media (max-width: 380px) {
    .dw-choice-grid--5 .dw-choice-button,
    .dw-choice-grid--3 .dw-choice-button {
        flex-basis: calc(50% - 8px);
    }
}

/* Sprint 10.1 — 4-step wizard UX refinement. */
.dw-form--wizard {
    gap: 0;
}

.dw-wizard-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    min-height: clamp(560px, 72vh, 680px);
}

.dw-wizard-summary {
    display: grid;
    grid-template-rows: minmax(30px, auto) minmax(34px, auto);
    gap: 0.35rem;
    min-height: 76px;
    max-height: 96px;
    overflow: hidden;
    padding: 0.72rem 0.85rem;
    border: 1px solid #cfe4e1;
    border-radius: 14px;
    background: #f8fffd;
}

.dw-wizard-summary__row {
    min-width: 0;
}

.dw-wizard-summary__row--progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.dw-wizard-summary__progress {
    min-width: 0;
    color: #05263f;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.dw-wizard-stepper__item {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0.28rem 0.52rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #526072;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
}

.dw-wizard-stepper__item:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dw-wizard-stepper__item--active {
    border-color: #0f766e;
    background: #0f766e;
    color: #ffffff;
}

.dw-wizard-stepper__item--complete:not(.dw-wizard-stepper__item--active) {
    border-color: #b7d7d3;
    background: #eefafa;
    color: #075f59;
}

.dw-wizard-summary__chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
}

.dw-wizard-summary__prep {
    color: #526072;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}

.dw-summary-chip {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 240px;
    min-height: 28px;
    padding: 0.3rem 0.55rem;
    border: 1px solid #d7e0ea;
    border-radius: 999px;
    background: #ffffff;
    color: #162033;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-wizard-panels {
    min-height: 0;
}

.dw-wizard-panel {
    display: grid;
    gap: 0.72rem;
    min-height: 0;
    max-height: clamp(405px, 52vh, 500px);
    overflow-y: auto;
    padding-right: 0.15rem;
}

.dw-wizard-panel[hidden] {
    display: none !important;
}

.dw-wizard-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0.1rem 0;
}

.dw-wizard-panel__head h3 {
    margin: 0;
    color: #05263f;
    font-size: clamp(1.08rem, 1.8vw, 1.28rem);
    line-height: 1.2;
}

.dw-wizard-panel__eyebrow {
    margin: 0;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dw-wizard-panel .dw-step-row {
    gap: 0.5rem;
    padding: clamp(0.68rem, 1.5vw, 0.88rem);
}

.dw-wizard-panel .dw-step-head {
    gap: 0.55rem;
}

.dw-wizard-panel .dw-step-number {
    min-width: 1.8rem;
    height: 1.8rem;
    border-radius: 9px;
    font-size: 0.82rem;
}

.dw-wizard-panel .dw-step-title {
    font-size: clamp(0.96rem, 1.25vw, 1.05rem);
}

.dw-wizard-panel .dw-step-help,
.dw-wizard-panel .dw-field__help,
.dw-wizard-panel .dw-derived-strip p {
    font-size: 0.86rem;
}

.dw-wizard-panel .dw-choice-button {
    min-height: 40px;
    padding-top: 0.56rem;
    padding-bottom: 0.56rem;
}

.dw-wizard-panel .dw-step-row .dw-field input {
    height: 44px;
    min-height: 44px;
}

.dw-wizard-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.dw-wizard-footer .dw-button {
    min-width: 124px;
}

.dw-wizard-footer .dw-button--secondary {
    margin-top: 0;
}

.dw-review-card {
    display: grid;
    gap: 0.8rem;
    padding: clamp(0.85rem, 2vw, 1rem);
    border: 1px solid #d7e0ea;
    border-radius: 14px;
    background: #ffffff;
}

.dw-review-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.dw-review-card__head h4,
.dw-review-card__head p {
    margin: 0;
}

.dw-review-card__head h4 {
    color: #05263f;
    font-size: 1.05rem;
}

.dw-review-card__head p {
    color: #526072;
    font-size: 0.88rem;
    line-height: 1.35;
}

.dw-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.dw-review-grid__item {
    min-width: 0;
    padding: 0.62rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
}

.dw-review-grid__item span,
.dw-review-grid__item strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-review-grid__item span {
    margin-bottom: 0.16rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.dw-review-grid__item strong {
    color: #162033;
    font-size: 0.92rem;
    font-weight: 900;
}

.dw-review-disclaimer {
    padding: 0.75rem 0.85rem;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    background: #f8fafc;
    color: #526072;
    font-size: 0.88rem;
    line-height: 1.45;
}

@media (max-width: 820px) {
    .dw-wizard-shell {
        min-height: auto;
    }

    .dw-wizard-panel {
        max-height: none;
        overflow: visible;
    }

    .dw-wizard-summary {
        min-height: 76px;
        max-height: none;
    }

    .dw-wizard-summary__row--progress {
        align-items: flex-start;
    }

    .dw-wizard-stepper {
        max-width: 58%;
    }
}

@media (max-width: 560px) {
    .dw-wizard-summary {
        padding: 0.65rem;
    }

    .dw-wizard-summary__row--progress {
        display: flex;
        align-items: center;
    }

    .dw-wizard-stepper {
        justify-content: flex-start;
        max-width: 52%;
    }

    .dw-wizard-summary__prep {
        font-size: 0.84rem;
    }

    .dw-summary-chip {
        max-width: 190px;
    }

    .dw-wizard-panel__head,
    .dw-review-card__head {
        display: grid;
        gap: 0.25rem;
    }

    .dw-review-grid {
        grid-template-columns: 1fr;
    }

    .dw-wizard-footer {
        grid-template-columns: 1fr 1fr;
    }

    .dw-wizard-footer .dw-form__status {
        grid-column: 1 / -1;
        order: -1;
        min-height: 1.2rem;
    }

    .dw-wizard-footer .dw-button {
        width: 100%;
        min-width: 0;
    }
}

/* Sprint 10.1.1 — width, no internal scrollbars, and softer app-like wizard polish. */
.dw-calculator [hidden] {
    display: none !important;
}

.dw-calculator {
    width: min(1000px, calc(100vw - 48px));
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    border-color: #d6e0ea;
    background: #f9fbfd;
    box-shadow: 0 16px 40px rgba(15, 37, 55, 0.07);
}

.dw-calculator-mount,
.dw-section--calculator-mount {
    width: min(1000px, calc(100vw - 48px));
    max-width: 1000px;
}

@media (min-width: 1024px) {
    .dw-calculator {
        margin-left: 50%;
        transform: translateX(-50%);
    }
}

.dw-wizard-shell {
    min-height: clamp(560px, 68vh, 660px);
}

.dw-wizard-summary {
    min-height: 72px;
    max-height: 88px;
    padding: 0.68rem 0.82rem;
    border-color: #d9e6ec;
    background: #fbfdff;
    box-shadow: 0 1px 0 rgba(15, 37, 55, 0.04);
}

.dw-wizard-summary__progress {
    color: #123047;
    font-weight: 700;
    letter-spacing: 0;
}

.dw-wizard-stepper {
    overflow: hidden;
    scrollbar-width: none;
}

.dw-wizard-stepper::-webkit-scrollbar,
.dw-wizard-summary__chips::-webkit-scrollbar {
    display: none;
}

.dw-wizard-stepper__item {
    border-color: #d5e0ea;
    background: #ffffff;
    color: #46566a;
    font-weight: 650;
}

.dw-wizard-stepper__item--active {
    border-color: #0f766e;
    background: #e7f6f4;
    color: #075f59;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.14);
}

.dw-wizard-stepper__item--complete:not(.dw-wizard-stepper__item--active) {
    border-color: #cfddd9;
    background: #f2fbfa;
    color: #2f6f69;
}

.dw-wizard-summary__chips {
    overflow: hidden;
    scrollbar-width: none;
}

.dw-wizard-summary__prep {
    color: #526072;
    font-weight: 500;
}

.dw-summary-chip {
    max-width: 180px;
    min-height: 26px;
    border-color: #d8e2ec;
    background: #ffffff;
    color: #28374a;
    font-weight: 600;
}

.dw-wizard-panel {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.dw-wizard-panel .dw-step-row,
.dw-review-card,
.dw-review-disclaimer,
.dw-result-card {
    border-color: #d7e0ea;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 37, 55, 0.035);
}

.dw-wizard-panel .dw-step-title,
.dw-review-grid__item strong {
    font-weight: 750;
}

.dw-review-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dw-wizard-footer {
    align-items: center;
}

.dw-wizard-footer .dw-button {
    font-weight: 700;
}

.dw-wizard-footer [data-dw-wizard-submit] {
    grid-column: 3;
}

.dw-button {
    border-color: #0f766e;
    background: #0f766e;
    box-shadow: 0 1px 0 rgba(15, 37, 55, 0.06);
}

.dw-button--secondary {
    border-color: #c8d5df;
    background: #ffffff;
    color: #0f5f59;
}

@media (max-width: 1040px) {
    .dw-calculator,
    .dw-calculator-mount,
    .dw-section--calculator-mount {
        width: min(100%, calc(100vw - 32px));
    }
}

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

@media (max-width: 820px) {
    .dw-calculator {
        width: 100%;
        transform: none;
        margin-left: auto;
        margin-right: auto;
    }

    .dw-wizard-stepper {
        max-width: 60%;
    }
}

@media (max-width: 560px) {
    .dw-summary-chip {
        max-width: 132px;
        padding-left: 0.45rem;
        padding-right: 0.45rem;
        font-size: 0.76rem;
    }

    .dw-wizard-summary__progress {
        font-size: 0.84rem;
    }

    .dw-wizard-stepper__item {
        padding-left: 0.38rem;
        padding-right: 0.38rem;
        font-size: 0.72rem;
    }

    .dw-review-grid {
        grid-template-columns: 1fr;
    }

    .dw-wizard-footer [data-dw-wizard-submit] {
        grid-column: auto;
    }
}

/* Sprint 10.1.2 — final width correction: no child-level breakout.
   The page shell owns cross-site width; the calculator fills its centered card. */
body .dw-calculator,
body .dw-calculator-mount .dw-calculator,
body .dw-section--calculator-mount .dw-calculator {
    width: 100% !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
}

body .dw-calculator-mount,
body .dw-section--calculator,
body .dw-section--calculator-mount {
    width: min(1000px, 100%) !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body .dw-page > .wp-block-group.alignwide.dw-section,
body .dw-page > .wp-block-group.alignfull.dw-section,
body .dw-page > .dw-section {
    width: min(1000px, 100%) !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body .dw-page {
    overflow: visible !important;
}

body .dw-wizard-footer [data-dw-wizard-next][hidden],
body .dw-wizard-footer [data-dw-wizard-submit][hidden] {
    display: none !important;
}

body .dw-wizard-summary,
body .dw-summary-chip,
body .dw-wizard-stepper__item {
    font-weight: 500;
}

body .dw-wizard-summary__progress {
    font-weight: 650;
}

/* Sprint 10.1.6 — semantic wizard stepper accessibility patch. */
.dw-wizard-stepper-wrap {
    min-width: 0;
}

.dw-wizard-stepper {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dw-wizard-stepper__item-wrap {
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Sprint 10.1.12 — mobile wizard containment.
   Keeps the wizard summary, stepper, prep text, and cards inside the calculator on
   narrow screens without adding horizontal/vertical internal scrollbars. */
@media (max-width: 781px) {
    body.dw-site-page .dw-calculator,
    body.dw-site-page .dw-calculator-mount,
    body.dw-site-page .dw-section--calculator-mount,
    body.dw-site-page .dw-section--calculator {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.dw-site-page .dw-calculator {
        padding: 1rem !important;
        overflow: visible !important;
    }

    body.dw-site-page .dw-wizard-shell,
    body.dw-site-page .dw-wizard-panel,
    body.dw-site-page .dw-wizard-panel__inner,
    body.dw-site-page .dw-step-card,
    body.dw-site-page .dw-review-card,
    body.dw-site-page .dw-review-grid,
    body.dw-site-page .dw-form__row,
    body.dw-site-page .dw-form__grid,
    body.dw-site-page .dw-option-grid,
    body.dw-site-page .dw-option-row {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.dw-site-page .dw-wizard-summary {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        grid-template-rows: auto auto !important;
    }

    body.dw-site-page .dw-wizard-summary__row,
    body.dw-site-page .dw-wizard-summary__row--progress {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body.dw-site-page .dw-wizard-summary__row--progress {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.45rem !important;
        align-items: start !important;
    }

    body.dw-site-page .dw-wizard-summary__progress {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.25 !important;
    }

    body.dw-site-page .dw-wizard-stepper-wrap,
    body.dw-site-page .dw-wizard-stepper {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    body.dw-site-page .dw-wizard-stepper {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        row-gap: 0.35rem !important;
    }

    body.dw-site-page .dw-wizard-stepper__item {
        max-width: 100% !important;
        white-space: nowrap !important;
    }

    body.dw-site-page .dw-wizard-summary__chips {
        flex-wrap: wrap !important;
        white-space: normal !important;
        overflow: visible !important;
        row-gap: 0.35rem !important;
    }

    body.dw-site-page .dw-wizard-summary__prep {
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    body.dw-site-page .dw-summary-chip {
        max-width: 100% !important;
        white-space: normal !important;
    }
}

@media (max-width: 560px) {
    body.dw-site-page .dw-calculator {
        padding: 0.85rem !important;
        border-radius: 16px !important;
    }

    body.dw-site-page .dw-step-card,
    body.dw-site-page .dw-review-card {
        padding: 0.75rem !important;
    }
}


/* Sprint 11.2 optional anonymous profile context */
.dw-profile-context-card {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #d9e2ea;
    border-radius: 18px;
    background: #f8fbfd;
}

.dw-profile-context-card__head h4 {
    margin: 0 0 0.35rem;
}

.dw-profile-context-card__head p {
    margin: 0 0 0.9rem;
    color: #526171;
}

.dw-profile-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.dw-profile-context-card .dw-field {
    margin: 0;
}

.dw-profile-context-card .dw-field input[type="text"],
.dw-profile-context-card .dw-field select {
    width: 100%;
    min-height: 44px;
    padding: 0.72rem 0.8rem;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    background: #ffffff;
    color: #12263a;
}

.dw-profile-context-card .dw-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

@media (max-width: 720px) {
    .dw-profile-context-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    body.dw-site-page .dw-profile-context-card {
        padding: 0.75rem !important;
    }
}


/* v1.8.1.1 profile validation visibility fix */
.dw-profile-context-card .dw-field--error input[type="text"],
.dw-profile-context-card .dw-field--error select,
.dw-profile-context-card [aria-invalid="true"] {
    border-color: #991b1b !important;
    outline: 2px solid rgba(153, 27, 27, 0.18) !important;
    box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.10) !important;
    background-color: #fff7f7 !important;
}
