:root {
    /* Tells the browser your site natively supports light and dark themes */
    color-scheme: light dark;
}
body {
    padding: 0;
    margin: 0;

    color: CanvasText;
    background-color: oklch(from Canvas calc(l * 0.92 + 0.04) c h);

    font-family: system-ui;
    font-size: 14px;
}

p, ul {
    margin: 0 0 1rem;
}

a, .button-link {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    text-decoration: underline;
    cursor: pointer;
    color: LinkText;
    box-shadow: none;
    line-height: 1.5rem;
}
a:hover, .button-link:hover {
    color: HighlightText;
}
a:active, .button-link:active {
    color: ActiveText;
}
a:visited, .button-link:visited {
    color: VisitedText;
}

button, input, .notice, .alert {
    padding: 10px 12px;
    font-size: 100%;
}

button {
    box-shadow: 0 0 3px ButtonFace;
    border: 1px solid ButtonFace;
    border-radius: 6px;
    background-color: ButtonFace;
    color: ButtonText;
    cursor: pointer;
}
input {
    box-shadow: 0 0 3px ButtonFace inset;
    border: 1px solid ButtonFace;
    border-radius: 6px;
    background-color: Field;
    color: FieldText;
}
code, mark {
    color: MarkText;
    background: Mark;
    padding-left: .25rem;
    padding-right: .25rem;
}

nav {
    padding: 1rem;
    margin: 0 0 2rem;

    text-align: center;
    box-shadow: 0 0 3px ButtonFace;
    border-bottom: 1px solid ButtonFace;
    background: Canvas;

    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
}

nav > * {
    margin: 0 1rem;
}

nav .active {
    text-decoration: none;
    color: CanvasText;
}

main {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 2rem 1rem;
    box-sizing: border-box;

    border-radius: 6px;
    box-shadow: 0 0 3px ButtonFace;
    border: 1px solid ButtonFace;

    background: Canvas;
}
@media screen and (max-width: 600px) {
    main {
        border-radius: 0;
        border-left-width: 0;
        border-right-width: 0;
    }
}

main h1 {
    font-size: 16px;
    text-align: center;
    padding: 1rem;
    margin: 0 -2rem 2rem;
    border-bottom: 1px solid ButtonFace;
}

main form {
    padding: 0;
    margin: 0 0 1rem;
}

main form > *:not(:has(button)) {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}
main form *:has(button) {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
    margin-top: 1.5rem;
}
main form *:has(input[type="checkbox"]) {
    display: block;
}

main form label {
    margin-bottom: .5rem;
}

main form input {
    width: 100%;
    margin-bottom: .5rem;
}
main form input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
}

.invalid {
    color: ActiveText;
}

.passkey-methods {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}
.passkey-methods label {
    margin: 0;
    display: inline-flex;
    align-items: center;
}
.passkey-methods input[type="radio"] {
    width: auto;
    margin: 0 .5rem 0 0;
}
.alert {
    margin-bottom: 1rem;
    color: ActiveText;
    background-color: oklch(from ActiveText l c h / 5%);
    border-left: 4px solid ActiveText;
}
.notice {
    margin-bottom: 1rem;
    color: HighlightText;
    background-color: oklch(from Highlight l c h / 5%);
    border-left: 4px solid Highlight;
}

.focus {
    text-align: center;
    margin-bottom: 2rem;
}

.row {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.row > * {
    line-height: 2rem;
    margin: 0;
}

.row form {
    margin: 0;
}
.row form button {
    padding: 6px;
}
.row form div {
    margin: 0;
}