:root {
    --navy: #405a84;
    --navy-dark: #304668;
    --blue: #1599cf;
    --blue-dark: #0879aa;
    --blue-soft: #e8f6fb;
    --orange: #ff8519;
    --orange-soft: #fff3e5;
    --lime: #9cc536;
    --lime-soft: #f2f8e4;
    --green: #195c31;
    --green-soft: #e5f4e9;
    --red: #db193c;
    --red-dark: #a8122d;
    --red-soft: #fff0f3;
    --cream: #f7f6f2;
    --white: #ffffff;
    --text: #29313c;
    --muted: #596471;
    --border: #d7dfe7;
    --shadow: 0 18px 50px rgba(48, 70, 104, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color-scheme: light;
}

body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient( circle at top left, rgba(21, 153, 207, 0.16) 0, transparent 30rem ), radial-gradient( circle at bottom right, rgba(156, 197, 54, 0.14) 0, transparent 28rem ), linear-gradient( 145deg, var(--cream), #eef3f7 );
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
}

button,
input {
    font: inherit;
}

.page-shell {
    width: min(100% - 2rem, 820px);
    margin: 0 auto;
    padding: clamp(1.25rem, 5vw, 3.5rem) 0 2rem;
}

.portal-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.25rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-top: 6px solid var(--orange);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

    .portal-card::after {
        position: absolute;
        z-index: 0;
        top: -80px;
        right: -80px;
        width: 190px;
        height: 190px;
        border-radius: 50%;
        background: rgba(156, 197, 54, 0.08);
        content: "";
        pointer-events: none;
    }

    .portal-card > * {
        position: relative;
        z-index: 1;
    }

.portal-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--border);
}

.service-logo {
    display: block;
    flex: 0 0 auto;
    width: clamp(190px, 31%, 240px);
    height: auto;
}

.portal-heading {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 1rem;
    border-left: 5px solid var(--orange);
}

.portal-kicker {
    margin: 0 0 0.3rem;
    color: var(--blue-dark);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    overflow-wrap: break-word;
}

h1 {
    margin: 0;
    color: var(--navy-dark);
    font-size: clamp(1.55rem, 5vw, 2.35rem);
    line-height: 1.15;
}

.portal-heading h1 {
    font-size: clamp(1.65rem, 3.5vw, 2.2rem);
}

h2 {
    margin-top: 0;
    color: var(--navy-dark);
}

.intro {
    margin: 1.75rem 0 1rem;
    font-size: clamp(1.04rem, 2.5vw, 1.16rem);
}

.prompt {
    margin: 1.5rem 0 1rem;
    color: var(--navy-dark);
    font-weight: 700;
}

.option-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.4rem;
}

.action-form {
    margin: 0;
}

.option-button {
    display: flex;
    width: 100%;
    min-height: 108px;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.35rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 5px 15px rgba(48, 70, 104, 0.06);
    transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

    .option-button:hover:not(:disabled) {
        border-color: var(--blue);
        background: var(--blue-soft);
        box-shadow: inset 5px 0 0 var(--orange), 0 9px 22px rgba(48, 70, 104, 0.12);
        transform: translateY(-2px);
    }

    .option-button:focus-visible {
        border-color: var(--blue);
        outline: 4px solid rgba(21, 153, 207, 0.3);
        outline-offset: 3px;
    }

    .option-button:disabled {
        cursor: wait;
        opacity: 0.7;
    }

.option-button-warning:hover:not(:disabled),
.option-button-warning:focus-visible {
    border-color: var(--red);
    background: var(--red-soft);
    box-shadow: inset 5px 0 0 var(--red), 0 9px 22px rgba(168, 18, 45, 0.1);
}

.option-button-content {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.option-button-title {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--navy-dark);
    font-size: 1.08rem;
    font-weight: 750;
}

.option-button-description {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
}

.option-button-arrow {
    flex: 0 0 auto;
    color: var(--blue-dark);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 120ms ease;
}

.option-button:hover:not(:disabled) .option-button-arrow {
    transform: translateX(3px);
}

.option-button-warning .option-button-arrow {
    color: var(--red);
}

.option-button-sending .option-button-arrow {
    visibility: hidden;
}

.success-panel,
.message-panel {
    margin-top: 1.75rem;
    padding: clamp(1.25rem, 4vw, 2rem);
    border-radius: 18px;
}

.success-panel {
    border: 1px solid rgba(25, 92, 49, 0.18);
    background: linear-gradient( 145deg, var(--green-soft), var(--lime-soft) );
    text-align: center;
}

.success-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(25, 92, 49, 0.2);
}

.message-panel-error {
    border: 1px solid rgba(219, 25, 60, 0.25);
    border-left: 5px solid var(--red);
    background: var(--red-soft);
}

.validation-summary {
    display: none;
}

    .validation-summary.validation-summary-errors {
        display: block;
        margin: 1rem 0;
        padding: 0.85rem 1rem;
        border-left: 4px solid var(--red);
        border-radius: 12px;
        background: var(--red-soft);
        color: var(--red-dark);
        font-weight: 650;
    }

        .validation-summary.validation-summary-errors ul {
            margin: 0;
            padding-left: 1.25rem;
        }

.site-footer {
    padding: 0 1rem 2rem;
    color: var(--muted);
    font-size: 0.86rem;
    text-align: center;
}

@media (max-width: 650px) {
    .portal-header {
        gap: 1.25rem;
    }

    .service-logo {
        width: clamp(165px, 30%, 200px);
    }

    .portal-heading h1 {
        font-size: clamp(1.45rem, 4.8vw, 1.9rem);
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: min(100% - 1rem, 820px);
        padding-top: 0.5rem;
    }

    .portal-card {
        border-top-width: 5px;
        border-radius: 18px;
    }

        .portal-card::after {
            top: -100px;
            right: -100px;
        }

    .portal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding-bottom: 1.25rem;
    }

    .service-logo {
        width: min(68%, 250px);
    }

    .portal-heading {
        width: 100%;
        padding-left: 0.75rem;
        border-left-width: 4px;
    }

    .portal-kicker {
        font-size: 0.78rem;
    }

    .portal-heading h1 {
        font-size: clamp(1.5rem, 7vw, 1.9rem);
    }

    .option-button {
        min-height: 100px;
        gap: 0.75rem;
        padding: 1rem;
    }

    .option-button-title {
        font-size: 1rem;
    }

    .option-button-description {
        font-size: 0.9rem;
    }

    .option-button-arrow {
        font-size: 1.7rem;
    }
}
.confirmation-dialog {
    width: min(100% - 2rem, 510px);
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 22px;
    background: var(--white);
    color: var(--text);
    box-shadow: 0 30px 80px rgba(29, 44, 67, 0.3), 0 8px 24px rgba(29, 44, 67, 0.16);
}

    .confirmation-dialog[open] {
        animation: modal-enter 160ms ease-out;
    }

    .confirmation-dialog::backdrop {
        background: rgba(27, 39, 56, 0.58);
        backdrop-filter: blur(4px);
        animation: backdrop-enter 160ms ease-out;
    }

.confirmation-dialog-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.2rem;
    margin: 0;
    padding: clamp(1.4rem, 5vw, 2rem);
    border-top: 6px solid var(--orange);
}

.confirmation-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 1.55rem;
    font-weight: 850;
}

.confirmation-copy {
    min-width: 0;
}

.confirmation-kicker {
    margin: 0 0 0.25rem;
    color: var(--blue-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.confirmation-copy h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.35rem, 4vw, 1.65rem);
    line-height: 1.2;
}

.confirmation-copy p:last-child {
    margin: 0;
    color: var(--muted);
}

.confirmation-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
}

.modal-button {
    min-height: 46px;
    padding: 0.7rem 1.15rem;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

    .modal-button:hover {
        transform: translateY(-1px);
    }

    .modal-button:focus-visible {
        outline: 4px solid rgba(21, 153, 207, 0.3);
        outline-offset: 2px;
    }

.modal-button-primary {
    background: linear-gradient( 135deg, var(--navy), var(--blue-dark) );
    color: var(--white);
    box-shadow: 0 7px 18px rgba(48, 70, 104, 0.2);
}

    .modal-button-primary:hover {
        background: linear-gradient( 135deg, var(--navy-dark), #086c97 );
    }

.modal-button-secondary {
    border-color: var(--border);
    background: var(--white);
    color: var(--navy-dark);
}

    .modal-button-secondary:hover {
        border-color: var(--navy);
        background: var(--blue-soft);
    }

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes backdrop-enter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 520px) {
    .confirmation-dialog-inner {
        grid-template-columns: 1fr;
    }

    .confirmation-icon {
        width: 46px;
        height: 46px;
    }

    .confirmation-actions {
        grid-column: 1;
        flex-direction: column-reverse;
    }

    .modal-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .confirmation-dialog[open],
    .confirmation-dialog::backdrop {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
