/* Prata – headings (OFL, see ../fonts/OFL-Prata.txt) */
@font-face {
    font-family: 'Prata';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/prata-v22-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Epilogue – body text (OFL, see ../fonts/OFL-Epilogue.txt) */
@font-face {
    font-family: 'Epilogue';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/epilogue-v20-latin-ext-400.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Epilogue';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/epilogue-v20-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Epilogue';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/epilogue-v20-latin-ext-600.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Epilogue';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/epilogue-v20-latin-600.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Epilogue';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/epilogue-v20-latin-ext-700.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Epilogue';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/epilogue-v20-latin-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --brand: #045C94;
    --brand-dark: #034A78;
    --background: #F7F7F7;
    --surface: #FFFFFF;
    --text: #1B1B1B;
    --muted: #6B7280;
    --muted-strong: #5F6368;
    --border: #E3E5E8;
    --input-border: #D1D5DB;
    --error: #D0413A;
    --error-text: #C0392B;
    --warning-background: #FBEEE0;
    --warning-border: #E8C79A;
    --warning-title: #7A4A18;
    --warning-text: #8A5A16;
    --warning-icon: #B8752E;
}

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

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: 'Epilogue', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.4;
}

.site-header,
.page {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-family: 'Prata', Georgia, serif;
    font-size: 18px;
    letter-spacing: 1px;
}

.brand-sub {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 3px;
}

.lang-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.lang-switch button {
    padding: 6px 10px;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--muted-strong);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.lang-switch button[aria-pressed='true'] {
    background: var(--brand);
    color: #FFFFFF;
}

.page {
    padding-top: 20px;
    padding-bottom: 40px;
}

#form-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kicker {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    font-family: 'Prata', Georgia, serif;
    font-weight: 400;
    line-height: 1.25;
}

h1 {
    font-size: 24px;
}

.card {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.summary-title,
.summary-amount {
    font-size: 14px;
    font-weight: 600;
}

.summary-amount {
    white-space: nowrap;
}

.summary-description {
    margin: 6px 0 0;
    color: var(--muted-strong);
    font-size: 12px;
    line-height: 1.5;
}

.summary hr {
    height: 1px;
    margin: 14px 0;
    background: var(--border);
    border: 0;
}

.summary-total {
    color: var(--muted-strong);
    font-size: 13px;
}

.summary-total-amount {
    color: var(--brand);
    font-size: 18px;
    font-weight: 700;
}

.banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--warning-background);
    border: 1px solid var(--warning-border);
    border-radius: 10px;
}

.banner:focus {
    outline: 2px solid var(--warning-icon);
    outline-offset: 2px;
}

.banner-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--warning-icon);
}

.banner-title {
    margin: 0;
    color: var(--warning-title);
    font-size: 13px;
    font-weight: 600;
}

.banner-text {
    margin: 4px 0 0;
    color: var(--warning-text);
    font-size: 12px;
    line-height: 1.5;
}

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 13px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 11px 12px;
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}

input[type='date'] {
    min-height: 46px;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder {
    color: var(--muted);
}

input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(4, 92, 148, 0.2);
}

input[aria-invalid='true'] {
    border-color: var(--error);
}

.field-error {
    margin: 0;
    color: var(--error-text);
    font-size: 12px;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.privacy {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.privacy a {
    color: var(--brand);
    text-decoration: underline;
}

.btn {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 14px;
    background: var(--brand);
    border: 0;
    border-radius: 10px;
    color: #FFFFFF;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.btn:hover {
    background: var(--brand-dark);
}

.btn:focus-visible,
.lang-switch button:focus-visible,
.privacy a:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}

.btn:disabled {
    background: var(--input-border);
    color: var(--muted);
    cursor: not-allowed;
}

.footer-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 60vh;
    text-align: center;
}

.loading h2 {
    max-width: 260px;
    font-family: 'Epilogue', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.loading h2:focus {
    outline: none;
}

.loading p {
    max-width: 260px;
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.spinner {
    animation: spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation-duration: 3s;
    }
}

@media (min-width: 600px) {
    .site-header {
        padding-top: 32px;
    }

    .page {
        padding-top: 32px;
    }
}
