.letter-decoder-preview {
    padding: 46px 0 52px;
    background: #fff;
}

.letter-decoder-panel {
    width: min(100%, 980px);
    display: block;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(16, 40, 68, .1);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(16, 40, 68, .13);
    transition: box-shadow .2s ease, transform .2s ease;
}

.letter-decoder-panel:hover {
    box-shadow: 0 22px 54px rgba(16, 40, 68, .18);
    transform: translateY(-2px);
}

.letter-decoder-panel img {
    width: 100%;
    height: auto;
}

.letter-decoder-content {
    width: min(100%, 980px);
    margin: 28px auto 0;
}

.letter-decoder-intro {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
}

.letter-decoder-intro .eyebrow {
    margin-bottom: 8px;
}

.letter-decoder-intro h2 {
    margin-bottom: 10px;
    font-size: clamp(30px, 3.5vw, 42px);
}

.letter-decoder-intro p {
    margin-bottom: 0;
    font-size: 17px;
}

.letter-decoder-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.letter-decoder-step {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--border, #e4e7ec);
    border-radius: 13px;
    background: var(--surface, #f8fafc);
}

.letter-decoder-step__icon,
.decoder-stage__number,
.decoder-booking__icon {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red, #d92d20);
    color: #fff;
}

.letter-decoder-step__icon {
    width: 44px;
    height: 44px;
    font-size: 21px;
}

.letter-decoder-step__number {
    display: block;
    margin-bottom: 2px;
    color: var(--red-dark, #b42318);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.letter-decoder-step h3 {
    margin-bottom: 7px;
    font-size: 18px;
}

.letter-decoder-step p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
}

.decoder-disclosure {
    margin-top: 22px;
}

.decoder-disclosure__summary {
    width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 13px 22px;
    border-radius: 8px;
    background: var(--red, #d92d20);
    box-shadow: 0 12px 26px rgba(217, 45, 32, .18);
    color: #fff;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.decoder-disclosure__summary::-webkit-details-marker {
    display: none;
}

.decoder-disclosure__summary:hover,
.decoder-disclosure__summary:focus-visible {
    background: var(--red-dark, #b42318);
}

.decoder-disclosure__summary:focus-visible {
    outline: 3px solid rgba(217, 45, 32, .25);
    outline-offset: 3px;
}

.decoder-disclosure__summary i {
    transition: transform .2s ease;
}

.decoder-disclosure[open] .decoder-disclosure__summary i {
    transform: rotate(180deg);
}

.decoder-app {
    position: relative;
    margin-top: 14px;
    padding: clamp(20px, 4vw, 36px);
    overflow: hidden;
    border: 1px solid var(--border, #e4e7ec);
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #f7f9fc 100%);
    box-shadow: 0 14px 36px rgba(16, 24, 40, .08);
}

.decoder-app [hidden] {
    display: none !important;
}

.decoder-stage {
    min-width: 0;
}

.decoder-stage__heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.decoder-stage__heading .decoder-stage__number {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: #fff;
    font-size: 16px;
    line-height: 38px;
    text-align: center;
}

.decoder-stage__heading h3 {
    margin: 0 0 5px;
    color: var(--navy, #101828);
    font-size: clamp(23px, 3vw, 31px);
}

.decoder-stage__heading h3[tabindex="-1"]:focus {
    outline: none;
}

.decoder-stage__heading p {
    margin: 0;
}

.decoder-form {
    display: grid;
    gap: 17px;
}

.decoder-upload {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 28px 20px;
    border: 2px dashed #9aa9bd;
    border-radius: 14px;
    background: #fff;
    color: var(--navy, #101828);
    text-align: center;
    cursor: pointer;
}

.decoder-upload:hover,
.decoder-upload:focus-within {
    border-color: var(--red, #d92d20);
    background: var(--red-light, #fff1f0);
}

.decoder-upload i {
    color: var(--red, #d92d20);
    font-size: 34px;
}

.decoder-upload input {
    width: min(100%, 430px);
    margin-top: 9px;
    color: var(--text, #475467);
}

.decoder-help,
.decoder-disclaimer p,
.decoder-booking__note {
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
}

.decoder-help {
    margin: -7px 0 0;
    text-align: center;
}

.decoder-honeypot {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.decoder-consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border-radius: 10px;
    background: var(--surface-blue, #eaf1f8);
    color: var(--navy, #101828);
    font-size: 14px;
    line-height: 1.5;
}

.decoder-consent input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 2px;
}

.decoder-disclaimer {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 4px solid var(--amber, #f79009);
    border-radius: 0 10px 10px 0;
    background: #fffaeb;
}

.decoder-disclaimer p {
    margin: 0;
}

.decoder-disclaimer p + p {
    margin-top: 6px;
}

.decoder-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid #fda29b;
    border-radius: 10px;
    background: #fef3f2;
    color: #912018;
    font-weight: 700;
}

.decoder-alert:focus {
    outline: 3px solid rgba(217, 45, 32, .25);
    outline-offset: 2px;
}

.decoder-status {
    min-height: 1.5em;
    margin-bottom: 6px;
    color: var(--red-dark, #b42318);
    font-size: 13px;
    font-weight: 700;
}

.decoder-status--visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.decoder-processing {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 190px;
    padding: 24px;
}

.decoder-processing h3 {
    margin-bottom: 8px;
}

.decoder-processing p {
    margin: 0;
}

.decoder-spinner {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 5px solid #e4e7ec;
    border-top-color: var(--red, #d92d20);
    border-radius: 50%;
    animation: decoder-spin .8s linear infinite;
}

@keyframes decoder-spin {
    to { transform: rotate(360deg); }
}

.decoder-explanation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin: 0 0 20px;
}

.decoder-explanation__continue {
    margin-top: 18px;
}

.decoder-result {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border, #e4e7ec);
    border-radius: 12px;
    background: #fff;
}

.decoder-result--wide {
    grid-column: 1 / -1;
}

.decoder-result dt {
    margin-bottom: 8px;
    color: var(--navy, #101828);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.decoder-result dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text, #475467);
}

.decoder-result dd > span,
.decoder-result dd > strong {
    display: block;
}

.decoder-result dd > strong + span,
.decoder-urgency + span {
    margin-top: 7px;
}

.decoder-result .decoder-result__meta {
    margin-top: 6px;
    color: #667085;
    font-size: 12px;
}

.decoder-result ul {
    margin: 0;
    padding-left: 19px;
}

.decoder-result li + li {
    margin-top: 5px;
}

.decoder-urgency {
    width: fit-content;
    margin-bottom: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.decoder-urgency--high,
.decoder-urgency--critical {
    background: #fee4e2;
    color: #b42318;
}

.decoder-urgency--medium {
    background: #fef0c7;
    color: #b54708;
}

.decoder-consultations {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.decoder-consultation {
    position: relative;
    min-width: 0;
    padding: 22px;
    border: 2px solid var(--border, #e4e7ec);
    border-radius: 14px;
    background: #fff;
    color: var(--text, #475467);
    text-align: left;
    cursor: pointer;
}

.decoder-consultation:hover,
.decoder-consultation:focus-visible,
.decoder-consultation[aria-pressed="true"] {
    border-color: var(--red, #d92d20);
    box-shadow: 0 10px 24px rgba(217, 45, 32, .1);
}

.decoder-consultation strong,
.decoder-consultation span,
.decoder-consultation small {
    display: block;
}

.decoder-consultation strong {
    padding-right: 38px;
    color: var(--navy, #101828);
    font-size: 18px;
}

.decoder-consultation span:not(.decoder-consultation__check) {
    margin: 9px 0;
    color: var(--red-dark, #b42318);
    font-weight: 800;
}

.decoder-consultation__check {
    position: absolute;
    top: 17px;
    right: 17px;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2f4f7;
    color: transparent;
}

.decoder-consultation[aria-pressed="true"] .decoder-consultation__check {
    background: var(--red, #d92d20);
    color: #fff;
}

.decoder-panel {
    width: min(100%, 700px);
    margin: 0 auto;
    padding: clamp(18px, 4vw, 30px);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .1);
}

.decoder-form--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.decoder-field {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: var(--navy, #101828);
    font-size: 14px;
    font-weight: 700;
}

.decoder-field--wide {
    grid-column: 1 / -1;
}

.decoder-field small {
    color: #667085;
    font-weight: 400;
}

.decoder-field input {
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #98a2b3;
    border-radius: 9px;
    background: #fff;
    color: var(--navy, #101828);
    font: inherit;
    font-weight: 400;
}

.decoder-field input:focus {
    border-color: var(--red, #d92d20);
    outline: 3px solid rgba(217, 45, 32, .14);
}

.decoder-verification {
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    align-items: end;
}

.decoder-resend {
    margin-top: 15px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--red-dark, #b42318);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.decoder-booking {
    padding: 22px;
    text-align: center;
}

.decoder-booking__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 15px;
    background: #067647;
    font-size: 30px;
}

.decoder-booking h3 {
    margin-bottom: 8px;
    font-size: clamp(26px, 4vw, 34px);
}

.decoder-booking p {
    max-width: 620px;
    margin: 0 auto 20px;
}

.decoder-booking__note {
    margin-top: 12px !important;
}

.decoder-noscript {
    margin: 18px 0 0;
    padding: 14px;
    border-radius: 10px;
    background: #fef3f2;
}

.letter-decoder-independence {
    margin: 18px 0 0;
    color: #667085;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.letter-decoder-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: 24px;
    border-radius: 14px;
    background: #071d49;
    color: #fff;
}

.letter-decoder-action p {
    max-width: 680px;
    margin: 0;
    color: #fff;
}

.letter-decoder-action .button {
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    .letter-decoder-steps,
    .decoder-explanation-grid,
    .decoder-consultations {
        grid-template-columns: 1fr;
    }

    .decoder-result--wide {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .letter-decoder-action {
        align-items: stretch;
        flex-direction: column;
    }

    .letter-decoder-preview {
        padding: 30px 0 36px;
    }

    .letter-decoder-panel {
        position: relative;
        aspect-ratio: 4 / 3;
        border-radius: 13px;
    }

    .letter-decoder-panel img {
        width: auto;
        max-width: none;
        height: 100%;
    }

    .letter-decoder-content {
        margin-top: 22px;
    }

    .letter-decoder-intro {
        text-align: left;
    }

    .letter-decoder-step,
    .decoder-app {
        padding: 17px;
    }

    .decoder-form--grid,
    .decoder-verification {
        grid-template-columns: 1fr;
    }

    .decoder-field--wide {
        grid-column: auto;
    }

    .decoder-processing {
        align-items: flex-start;
        flex-direction: column;
    }

    .decoder-form .button,
    .decoder-booking .button,
    .decoder-disclosure__summary {
        width: 100%;
    }
}

@media (max-width: 390px) {
    .decoder-app,
    .decoder-panel,
    .decoder-result,
    .decoder-consultation {
        max-width: 100%;
        min-width: 0;
    }

    .decoder-stage__heading {
        gap: 10px;
    }

    .decoder-upload {
        padding-inline: 12px;
    }

    .decoder-upload input {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .letter-decoder-panel,
    .decoder-consultation {
        transition: none;
    }

    .decoder-spinner {
        animation: none;
    }
}
