:root {
    color-scheme: light;
    --bg: #f4f5f2;
    --surface: #ffffff;
    --text: #1d2321;
    --muted: #5b6662;
    --border: #d5dad6;
    --accent: #00796b;
    --accent-text: #ffffff;
    --notice-bg: #fff6dd;
    --notice-border: #e8c766;
    --error: #b3261e;
    --error-bg: #fdecea;
    --focus: #1a73e8;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #121614;
        --surface: #1b211e;
        --text: #e5ebe8;
        --muted: #9aa7a1;
        --border: #34403b;
        --accent: #3fbfaa;
        --accent-text: #0b1311;
        --notice-bg: #2a2512;
        --notice-border: #7d6a2a;
        --error: #f2908a;
        --error-bg: #3a1b19;
        --focus: #8ab4f8;
    }
}

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

html,
body {
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
    max-width: 44rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

a {
    color: var(--accent);
}

h1 {
    margin: 0 0 1rem;
    font-size: 2rem;
    line-height: 1.2;
}

h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

section {
    margin: 1.75rem 0;
}

ul {
    padding-left: 1.25rem;
}

li + li {
    margin-top: 0.4rem;
}

.eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lead {
    font-size: 1.1rem;
}

.notice {
    padding: 1rem 1.25rem;
    border: 1px solid var(--notice-border);
    border-radius: 10px;
    background: var(--notice-bg);
}

.notice ul {
    margin: 0;
}

.card {
    margin: 1.75rem 0;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.field {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

label.check {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-top: 0.5rem;
    font-weight: 400;
}

label.check input {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0.2rem 0 0;
    accent-color: var(--accent);
}

input[type="text"],
input[type="date"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

input[readonly] {
    opacity: 0.5;
}

input:focus-visible,
button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

input[aria-invalid="true"],
select[aria-invalid="true"] + .ts-wrapper .ts-control {
    border-color: var(--error);
}

.hint {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.error {
    margin: 0.3rem 0 0;
    color: var(--error);
    font-size: 0.9rem;
}

.error.banner {
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--error-bg);
    font-size: 1rem;
}

button {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.registration-id {
    margin: 0.5rem 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--bg);
    font: 600 1.6rem/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    text-align: center;
    overflow-wrap: anywhere;
}

.summary {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 1.25rem 0 0;
}

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

.summary dd {
    margin: 0;
    overflow-wrap: anywhere;
}

footer {
    margin-top: 2.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.fi {
    border-radius: 2px;
}

.ts-wrapper .ts-control,
.ts-wrapper.single .ts-control,
.ts-wrapper.single.input-active .ts-control,
.ts-dropdown {
    border-color: var(--border);
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.ts-wrapper .ts-control {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    box-shadow: none;
}

.ts-wrapper.single .ts-control {
    background-image: none;
}

.ts-wrapper .ts-control input {
    color: var(--text);
    font: inherit;
}

.ts-wrapper .ts-control input::placeholder {
    color: var(--muted);
}

.ts-wrapper.focus .ts-control {
    border-color: var(--focus);
}

.ts-dropdown {
    border-radius: 0 0 8px 8px;
}

.ts-dropdown .option {
    padding: 0.45rem 0.75rem;
}

.ts-dropdown .active {
    background: var(--accent);
    color: var(--accent-text);
}

.ts-dropdown .no-results {
    padding: 0.45rem 0.75rem;
    color: var(--muted);
}

altcha-widget {
    --altcha-color-base: var(--bg);
    --altcha-color-base-content: var(--text);
    --altcha-color-primary: var(--accent);
    --altcha-color-primary-content: var(--accent-text);
    --altcha-border-color: var(--border);
    --altcha-border-radius: 8px;
    --altcha-max-width: 100%;
}

@media (max-width: 30rem) {
    .summary {
        grid-template-columns: 1fr;
    }

    .summary dd {
        margin-bottom: 0.5rem;
    }
}
