:root {
    color-scheme: light;
    --ink: #17243a;
    --muted: #657187;
    --line: #dfe4ec;
    --surface: #ffffff;
    --canvas: #f4f6fa;
    --brand: #ef7d23;
    --brand-dark: #c85d0b;
    --success: #178359;
    --success-soft: #e8f6f0;
    --warning: #a75c00;
    --warning-soft: #fff4dd;
    --danger: #bd3a3a;
    --danger-soft: #feeeee;
    --shadow: 0 24px 70px rgba(27, 39, 65, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--canvas);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 12%, rgba(239, 125, 35, 0.12), transparent 28rem),
        radial-gradient(circle at 92% 88%, rgba(40, 73, 130, 0.09), transparent 30rem),
        var(--canvas);
}

a {
    color: #315f9b;
    text-underline-offset: 0.18em;
}

button,
input {
    font: inherit;
}

.site-shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0;
}

.brand {
    display: inline-flex;
}

.brand img {
    display: block;
    width: 171px;
    height: auto;
}

.site-header__label {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 650;
    letter-spacing: 0.025em;
}

.site-main {
    display: grid;
    align-items: center;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.action-card {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: clamp(28px, 6vw, 56px);
    border: 1px solid rgba(210, 217, 229, 0.82);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.action-card--welcome {
    text-align: center;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.action-card--welcome h1 {
    margin-inline: auto;
}

p {
    line-height: 1.65;
}

.lead {
    max-width: 55ch;
    margin: 20px 0 30px;
    color: var(--muted);
    font-size: 1.08rem;
}

.action-card--welcome .lead {
    margin-inline: auto;
}

.muted {
    color: var(--muted);
}

form {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label {
    font-size: 0.92rem;
    font-weight: 700;
}

.text-input {
    width: 100%;
    min-height: 50px;
    padding: 11px 14px;
    border: 1px solid #c8d0dc;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--ink);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.text-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(239, 125, 35, 0.15);
}

.validation-message {
    color: var(--danger);
    font-size: 0.86rem;
    font-weight: 600;
}

.primary-button,
.danger-button {
    min-height: 50px;
    width: fit-content;
    margin-top: 4px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-weight: 750;
    cursor: pointer;
    transition: transform 120ms ease, filter 120ms ease;
}

.primary-button {
    background: var(--brand);
}

.danger-button {
    background: var(--danger);
}

.primary-button:hover:not(:disabled),
.danger-button:hover:not(:disabled) {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

.primary-button:focus-visible,
.danger-button:focus-visible {
    outline: 3px solid rgba(49, 95, 155, 0.32);
    outline-offset: 3px;
}

.primary-button:disabled,
.danger-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.notice {
    padding: 15px 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    line-height: 1.55;
}

.notice--neutral {
    border-color: #d6dfed;
    background: #f1f5fb;
    color: #38516f;
}

.notice--warning {
    border-color: #f4d49f;
    background: var(--warning-soft);
    color: #764000;
}

.notice--error {
    border-color: #f2bcbc;
    background: var(--danger-soft);
    color: #8f2929;
}

.status-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
}

.status-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #eef2f8;
    color: #4d6483;
    font-size: 1.45rem;
    font-weight: 800;
}

.status-panel--success .status-icon {
    background: var(--success-soft);
    color: var(--success);
}

.status-panel--warning .status-icon {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-panel--error .status-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-copy {
    margin-top: 20px;
    color: var(--muted);
}

.status-copy p {
    margin: 8px 0;
}

.spinner {
    width: 23px;
    height: 23px;
    border: 3px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 22px 20px 28px;
    color: var(--muted);
    font-size: 0.88rem;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 18px;
    bottom: 18px;
    left: 18px;
    padding: 16px 48px 16px 18px;
    border-radius: 12px;
    background: var(--danger-soft);
    box-shadow: var(--shadow);
    color: #7a2929;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.4rem;
    cursor: pointer;
}

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

@media (max-width: 600px) {
    .site-header {
        width: min(100% - 28px, 1120px);
        padding: 18px 0;
    }

    .brand img {
        width: 145px;
    }

    .site-header__label {
        display: none;
    }

    .site-main {
        align-items: start;
        width: min(100% - 24px, 1120px);
        padding: 22px 0 46px;
    }

    .action-card {
        padding: 28px 22px;
        border-radius: 18px;
    }

    .status-panel {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .status-icon {
        width: 46px;
        height: 46px;
    }

    .primary-button,
    .danger-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
