/* The website for users (login, register, account …): a header, the page's content and a footer with the version, all
   filled in by WebAccountEndpoints.ServePageAsync. */
:root {
    --text: #33231A;
    --muted: #6b5a4e;
    --faint: #8a7a6d;
    --line: #eee3d6;
    --field: #c9bfb2;
    --accent: #0E8A93;
    --accent-dark: #0a6d74;
    --page: #FAF6EE;
    --card: #fff;
    --error: #C6453B;
    --success: #1e7a34;
    --width: 1100px;
}

* { box-sizing: border-box; }
/* Labels and buttons are display: block, which would beat the hidden attribute. */
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: system-ui, sans-serif; line-height: 1.45;
       color: var(--text); background: var(--page); }
a { color: var(--accent); }

/* Header and footer span the window; their content lines up with the page's. */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .inner, .site-footer .inner { width: min(var(--width), 100% - 2rem); margin: 0 auto; }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-size: 1.2rem; font-weight: 700; color: var(--text); text-decoration: none; }
.brand-mark { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
              font-size: 1rem; }
.site-nav { display: flex; gap: 1.2rem; font-size: 0.95rem; }
.site-nav a { text-decoration: none; white-space: nowrap; }
.site-nav a:hover { text-decoration: underline; }
.site-footer { padding: 1.5rem 0; text-align: center; font-size: 0.85rem; color: var(--faint); border-top: 1px solid var(--line); }

main { flex: 1; width: min(var(--width), 100% - 2rem); margin: 0 auto; padding: 3rem 0; }

/* A page of one task (confirm, reset, passkey …): one card in the middle. */
main.single { display: flex; justify-content: center; align-items: flex-start; }
main.single .card { width: min(560px, 100%); }

/* Login and register: what Schnecksi is beside the form. */
main.split { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 4rem; align-items: start; align-content: start; }
.intro { padding-top: 1rem; }
.intro h1 { font-size: 2.3rem; line-height: 1.15; margin: 0 0 1rem; }
.intro p { font-size: 1.1rem; color: var(--muted); max-width: 34rem; }
.intro ul { padding-left: 1.2rem; color: var(--muted); }
.intro li { margin-bottom: 0.4rem; }

.card { background: var(--card); border-radius: 14px; padding: 2rem; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1); }
.card h1 { margin: 0 0 1.2rem; font-size: 1.5rem; }
h2 { margin: 0 0 0.8rem; font-size: 1.15rem; }

label { display: block; margin-bottom: 0.9rem; }
input, select, textarea { display: block; width: 100%; margin-top: 0.25rem; padding: 0.6rem 0.7rem; font: inherit; border: 1px solid var(--field);
                          border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
button { width: 100%; padding: 0.7rem; font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.5; cursor: default; }
.secondary { color: var(--accent); background: none; border: 1px solid var(--accent); margin-top: 0.5rem; }
.secondary:hover { background: #e9f5f5; }

.error { color: var(--error); }
.success { color: var(--success); }
.hint { font-size: 0.88rem; color: var(--muted); }
/* "or" between the password form and the passkey button. */
.or { display: flex; align-items: center; gap: 0.8rem; margin: 1.2rem 0 0.4rem; color: var(--faint); font-size: 0.9rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.or + .secondary { margin-top: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 1.2rem; font-size: 0.95rem; }
.field-row { display: flex; gap: 0.8rem; }
.field-row label { flex: 1; min-width: 0; }

/* The account page: a title row, then its sections as cards side by side. */
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.top h1 { margin: 0; font-size: 2rem; }
.top form button { width: auto; padding: 0.45rem 1.1rem; }
.sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; align-items: start; }
.sections .card button[type=submit] { width: auto; padding: 0.6rem 1.4rem; }
.current { margin: 0 0 0.9rem; }
.current b { word-break: break-all; }

@media (max-width: 820px) {
    main { padding: 1.5rem 0; }
    main.split { grid-template-columns: 1fr; gap: 1.5rem; }
    .intro { padding-top: 0; }
    .intro h1 { font-size: 1.7rem; }
    .intro p { font-size: 1rem; }
    .intro ul { display: none; }
    .sections { grid-template-columns: 1fr; }
    .card { padding: 1.4rem; }
    .site-nav { gap: 0.9rem; font-size: 0.9rem; }
}
@media (max-width: 480px) {
    .site-nav a[href="/register"] { display: none; }
}
.card .card-title { margin: 0 0 1.2rem; font-size: 1.5rem; }
