* {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 2rem 1rem;
}
.account-card {
    max-width: 38rem;
    margin: 2rem auto;
    background: #fff;
    padding: clamp(1.25rem, 4vw, 3rem);
    border: 1px solid var(--border);
    border-radius: 1rem;
}
.brand {
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
}
h1 {
    color: var(--primary-dark);
    font-size: 1.7rem;
    line-height: 1.25;
}
label {
    display: block;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
}
input,
textarea,
select {
    width: 100%;
    min-height: 2.75rem;
    font: inherit;
    font-weight: 400;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--control-border);
    border-radius: var(--radius-control);
}
textarea {
    resize: vertical;
}
button:disabled {
    background: var(--surface);
    color: var(--muted);
    cursor: not-allowed;
}
canvas {
    display: block;
    max-width: 100%;
    margin: 1rem auto;
}
section + section {
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}
button {
    min-height: 2.75rem;
    font: inherit;
    font-weight: 600;
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    border: 0;
    border-radius: var(--radius-action);
    color: white;
    background: var(--primary);
    cursor: pointer;
}
a {
    color: var(--primary-dark);
}
button:hover:not(:disabled) {
    background: var(--primary-dark);
}
/* Ein drehender Ring begleitet Kontoanfragen; der Text erklärt den Wartezustand. */
.account-submit-spinner:not([hidden]) {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.5rem;
    vertical-align: -0.1em;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: account-submit-spin 0.8s linear infinite;
}

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

/* Bei reduzierter Bewegung bleibt der Ring ruhig; die Statusmeldung bleibt sichtbar. */
@media (prefers-reduced-motion: reduce) {
    .account-submit-spinner:not([hidden]) {
        animation: none;
    }
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-top: 1.5rem;
}
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}
.validation {
    color: var(--error);
}
.validation-summary-valid {
    display: none;
}

.preserve-lines {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
input[type='checkbox'],
input[type='radio'] {
    width: 1.25rem;
    min-height: 1.25rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.history-table {
    overflow-x: auto;
    margin: 1rem 0;
}
.history-table table {
    border-collapse: collapse;
    width: 100%;
    font-size: 1rem;
}
.history-table th,
.history-table td {
    border: 1px solid var(--border);
    padding: 0.65rem;
    text-align: left;
    vertical-align: top;
}
.history-table th {
    background: var(--surface);
}
fieldset {
    border: 1px solid var(--border);
    padding: 1rem;
    margin-top: 1rem;
}
.exam-notice {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 1rem;
    background: #7d2030;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    border: 0.25rem solid #f1c14b;
}
.material-card {
    max-width: 70rem;
}
[data-exam-theme='Navy'] .exam-notice,
.exam-notice[data-exam-theme='Navy'] {
    background: #17395f;
}
.material-source {
    overflow-x: auto;
    padding: 1rem;
    background: var(--surface);
    font:
        1rem/1.6 Consolas,
        monospace;
}
.material-image {
    display: block;
    max-width: 100%;
    height: auto;
}
