:root {
    color-scheme: light;
    font-family: "Bahnschrift", "Aptos", "Segoe UI", sans-serif;
    --ink: #182029;
    --muted: #495a67;
    --paper: #edf0eb;
    --surface: #ffffff;
    --edge: #c4cdc8;
    --accent: #ccf04a;
    --dark: #131c24;
    --danger: #9c2424;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; }
a { color: #20564c; text-underline-offset: .2em; }
a:hover { color: #123c32; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #2a639f;
    outline-offset: 3px;
}

.shell { width: min(100% - 2.5rem, 76rem); margin-inline: auto; }
.site-header, .site-footer { color: #f2f4ee; background: var(--dark); }
.site-header { border-bottom: 4px solid var(--accent); }
.site-nav, .footer-content {
    display: flex;
    min-height: 4.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
}
.site-header a, .site-footer a { color: inherit; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.nav-links, .actions { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.2rem; font-weight: 650; white-space: nowrap; }
.brand strong { color: var(--accent); }
.brand-mark {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    background: var(--accent);
    color: var(--dark);
    border: 1px solid var(--accent);
    border-radius: .22rem;
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: .91rem;
    letter-spacing: -.08em;
}

.site-main { min-height: 68vh; padding-block: clamp(2rem, 6vw, 5rem); }
.site-footer { padding-block: .8rem; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 2; background: var(--surface); padding: 1rem; }
.skip-link:focus { top: .5rem; }
h1, h2, h3 { margin: 0; color: inherit; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.25rem, 6vw, 4.6rem); max-width: 20ch; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p { margin: 0; }
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); max-width: 65ch; }
.muted, small { color: var(--muted); }
.stack { display: grid; gap: 1rem; align-content: start; }
.stack + .stack, .panel + .panel, section + section { margin-top: 1.5rem; }
.narrow { max-width: 49rem; }
.panel { background: var(--surface); border: 1px solid var(--edge); border-radius: .45rem; padding: clamp(1.15rem, 3vw, 2rem); }
.panel > h1, .panel > h2, .panel > h3 { margin-bottom: .6rem; }
.panel > form, .panel > details { margin-top: 1.2rem; }
.grid, .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
    gap: 1rem;
}
.grid > .panel { margin-top: 0; }
.hero:not(.panel) { padding-block: clamp(1rem, 4vw, 2rem); }
.hero .actions { margin-block: .5rem; }

button, input, select, textarea { font: inherit; }
.button, button:not(.link-button), input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    width: fit-content;
    padding: .55rem 1rem;
    border: 1px solid var(--ink);
    border-radius: .28rem;
    background: var(--accent);
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}
.button:hover, button:not(.link-button):hover { background: #bce039; color: var(--ink); }
.button.secondary, button.secondary:not(.link-button) { background: var(--surface); }
button:disabled { cursor: not-allowed; opacity: .65; }
label { display: grid; gap: .3rem; font-weight: 600; }
label:has(input[type="checkbox"]), label:has(input[type="radio"]) { display: flex; align-items: baseline; gap: .65rem; }
input:not([type="checkbox"], [type="radio"], [type="submit"], [type="hidden"]), select, textarea {
    width: 100%;
    min-height: 2.75rem;
    padding: .45rem .65rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #84958e;
    border-radius: .22rem;
}
textarea { min-height: 6rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: #285649; }
fieldset, .notice { padding: 1rem; border: 1px solid var(--edge); border-radius: .3rem; }
fieldset { min-width: 0; }
.notice { background: #f9fbe9; }
.validation-summary-errors, .field-validation-error { color: var(--danger); }
.validation-summary-errors ul { padding-left: 1.5rem; }
summary { cursor: pointer; }
code { background: #e3e8e2; padding: .12rem .3rem; border-radius: .2rem; overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; padding: 0; list-style: none; gap: .45rem; }
dt { font-weight: 650; }
dd { margin: 0 0 .7rem; }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: start; padding: .65rem; border-bottom: 1px solid var(--edge); vertical-align: top; }
.table-scroll { overflow-x: auto; }

@media (max-width: 38rem) {
    .shell { width: min(100% - 1.5rem, 76rem); }
    .site-nav, .footer-content { padding-block: .75rem; min-height: auto; }
    .nav-links { gap: .65rem 1rem; }
    .site-main { padding-block: 1.7rem; }
}
