:root {
    font-family: system-ui, sans-serif;
    color: #153b35;
    background: #faf9f5;
    color-scheme: light;
}

body {
    margin: 0;
    line-height: 1.6;
}

/* One column; the bottom padding keeps the last buttons clear of the fixed status line. */
main {
    max-width: 42rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 6rem;
}

h1 {
    font-size: clamp(2.25rem, 7vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 0.5rem 0;
}

/* FocusOnNavigate in Routes.razor focuses the heading for screen readers; it needs no visible ring. */
h1:focus {
    outline: none;
}

h2 {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

.eyebrow {
    margin: 0;
    font-size: 0.9rem;
    color: #52685f;
}

.notice {
    padding: 0.5rem 0.75rem;
    border-left: 4px solid #c5903f;
    background: #f3ecdf;
}

section {
    padding: 1rem 0;
    border-top: 1px solid #d9d5c7;
}

textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font: inherit;
    color: inherit;
    border: 1px solid #8a9a92;
    border-radius: 0.5rem;
    background: #fff;
    resize: vertical;
}

/* Buttons wrap on a narrow screen; in a "split" row the second button sits on the right. */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.actions.split {
    justify-content: space-between;
}

button {
    padding: 0.5rem 1rem;
    font: inherit;
    color: #19655b;
    border: 1px solid #19655b;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

button:hover {
    background: #e6f0ec;
}

/* Fixed to the bottom of the viewport; its text lines up with the column. */
.status {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    min-height: 3rem;
    margin: 0;
    padding: 0.6rem max(1rem, calc((100% - 42rem) / 2));
    border-top: 1px solid #b9c9c0;
    background: #e8efe9;
}

a {
    color: #19655b;
}

/* The shell: the brand and the account controls above one narrow column, outside the training workspace. */
.app-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    max-width: 42rem;
    margin: 0 auto;
    padding: 0.75rem 1rem 0;
}

.app-bar nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.app-bar .brand {
    font-weight: 600;
    text-decoration: none;
}

/* A long email wraps instead of widening the page on a phone. */
.app-bar nav {
    min-width: 0;
}

.app-bar nav a {
    overflow-wrap: anywhere;
}

.loading {
    color: #52685f;
}

main.account {
    padding-bottom: 2rem;
}

.account-form {
    display: grid;
    gap: 0.4rem;
    max-width: 24rem;
    margin: 1rem 0;
}

.account-form input[type="email"],
.account-form input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font: inherit;
    color: inherit;
    border: 1px solid #8a9a92;
    border-radius: 0.5rem;
    background: #fff;
}

.account-form .checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-form button {
    justify-self: start;
    margin-top: 0.5rem;
}

.account-form input:focus-visible {
    outline: 3px solid #c5903f;
    outline-offset: 2px;
}

.validation-errors,
.validation-message,
.alert-error {
    color: #9b2c2c;
}

.alert {
    padding: 0.5rem 0.75rem;
    border-left: 4px solid currentColor;
}

.alert-success {
    color: #19655b;
    background: #e6f0ec;
}

.alert-error {
    background: #f7e6e4;
}

.hint {
    font-size: 0.9rem;
    color: #52685f;
}

a:focus-visible {
    outline: 3px solid #c5903f;
    outline-offset: 4px;
}

button:focus-visible,
textarea:focus-visible {
    outline: 3px solid #c5903f;
    outline-offset: 2px;
}
