:root {
    color-scheme: light;
    --ink: #17212b;
    --muted: #526170;
    --line: #d7e0e8;
    --surface: #ffffff;
    --canvas: #f3f6f9;
    --brand: #145a82;
    --brand-dark: #0c3f5e;
    --danger: #a52b36;
    font-family: "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.55;
}

.site-header {
    background: #102d43;
    color: white;
    padding: 1rem max(1.25rem, calc((100% - 1040px) / 2));
}

.brand {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.brand span {
    display: block;
    color: #d5e5ef;
    font-size: 0.85rem;
    font-weight: 400;
}

.container {
    width: min(100% - 2rem, 1040px);
    margin: 2rem auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 26px rgb(16 45 67 / 6%);
    padding: clamp(1.25rem, 4vw, 2rem);
}

.card.narrow {
    max-width: 620px;
    margin-inline: auto;
}

h1,
h2 {
    line-height: 1.2;
}

h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.65rem, 4vw, 2.2rem);
}

h2 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

p {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 0.35rem;
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.privacy-note,
.notice {
    border-left: 4px solid var(--brand);
    background: #edf6fb;
    color: var(--ink);
    padding: 0.75rem 1rem;
}

.error {
    border-left: 4px solid var(--danger);
    background: #fff0f0;
    color: #76212a;
    padding: 0.75rem 1rem;
}

.form {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.4rem;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
}

.field-help {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 400;
}

input,
textarea {
    width: 100%;
    min-height: 2.8rem;
    border: 1px solid #aebdca;
    border-radius: 6px;
    background: white;
    color: var(--ink);
    font: inherit;
    padding: 0.6rem 0.7rem;
}

textarea {
    min-height: 6rem;
    resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 3px solid #74b6dc;
    outline-offset: 2px;
}

button {
    min-height: 2.8rem;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0.65rem 1rem;
}

button:hover {
    background: var(--brand-dark);
}

button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.button-secondary {
    border: 1px solid var(--line);
    background: #eef2f5;
    color: var(--ink);
}

.button-secondary:hover {
    background: #e1e8ed;
}

.button-danger {
    background: var(--danger);
}

.button-danger:hover {
    background: #7e2029;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.checkbox input {
    width: 1rem;
    min-height: 1rem;
    margin-top: 0.25rem;
}

.secondary-form {
    margin-top: 0.8rem;
}

.section-heading,
.button-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.button-row {
    justify-content: flex-start;
    margin-top: 1.5rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.7rem;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

thead {
    background: #f3f6f9;
}

a {
    color: var(--brand);
}

hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.site-footer {
    width: min(100% - 2rem, 1040px);
    margin: 2rem auto;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 680px) {
    .container {
        margin-top: 1rem;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
