:root {
    color-scheme: dark;
    --background: #111111;
    --surface: #1b1b1b;
    --field: #242424;
    --border: #626262;
    --text: #f5f5f5;
    --muted: #b8b8b8;
    --orange: #ff8a26;
    font: 1rem/1.5 system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100svh;
    padding: 32px 16px;
    background: radial-gradient(ellipse at top, #303030, var(--background) 70%);
}
main {
    width: min(100%, 460px);
    margin: 24px auto;
    padding: clamp(20px, 5vw, 36px);
    background: var(--surface);
    border: 1px solid #414141;
    border-top: 3px solid var(--orange);
    border-radius: 20px;
    box-shadow: 0 20px 60px #00000040;
}
.brand { display: inline-flex; min-height: 44px; align-items: center; border-radius: 6px; }
.brand img { display: block; max-width: 100%; height: auto; }
nav {
    display: flex;
    gap: 4px;
    margin: 28px 0;
    padding: 4px;
    background: var(--background);
    border: 1px solid #414141;
    border-radius: 12px;
}
a { color: var(--orange); text-underline-offset: 4px; overflow-wrap: anywhere; }
nav a {
    flex: 1;
    padding: 10px 12px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
}
nav a[aria-current] { background: #303030; border-color: var(--border); color: var(--orange); }
h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 6vw, 2.2rem); line-height: 1.2; letter-spacing: -.035em; }
#intro { margin: 0 0 24px; color: var(--muted); }
form, label { display: grid; gap: 8px; }
label { font-weight: 600; }
form { gap: 20px; margin: 20px 0 12px; }
input, button {
    font: inherit;
    min-height: 50px;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
input { background: var(--field); color: var(--text); font-weight: 400; }
input:autofill { box-shadow: inset 0 0 0 1000px var(--field); -webkit-text-fill-color: var(--text); }
button { background: var(--orange); color: #171717; border-color: var(--orange); font-weight: 750; cursor: pointer; }
button:disabled { background: #454545; border-color: var(--border); color: #c6c6c6; cursor: not-allowed; }
a, button { touch-action: manipulation; }
a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
#status { padding: 12px 14px; background: #292929; border-left: 3px solid var(--orange); border-radius: 4px; overflow-wrap: anywhere; }
#status:empty { display: none; }
#status a { display: inline-block; padding: 10px 0; min-height: 44px; }
#mfa-form p { margin: 0; color: var(--muted); font-weight: 400; }
#social { display: grid; justify-items: center; gap: 12px; margin: 20px 0; }
#social:empty { display: none; }
#social button { background: var(--field); color: var(--text); border-color: var(--border); }
.account-footer { margin-top: 12px; text-align: center; }
.account-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; }
.account-footer p { margin: 12px 0 0; padding-top: 20px; border-top: 1px solid #414141; color: var(--muted); font-size: .875rem; }
#bot-check { max-width: 100%; min-width: 0; overflow: auto; }
[hidden] { display: none !important; }
@media (hover: hover) {
    nav a:hover { background: #292929; color: var(--text); }
    button:not(:disabled):hover { background: #ffa04d; }
    #social button:hover { background: #363636; }
    .account-footer a:hover { color: #ffb475; }
}
@media (max-width: 480px) {
    body { padding: 16px 12px; }
    main { margin: 0 auto; border-radius: 16px; }
}
@media (max-height: 500px) {
    body { padding: 12px; }
    main { margin: 0 auto; }
    nav { margin: 16px 0; }
}

#setup-step { margin: 28px 0 12px; color: var(--orange); font-size: .75rem; font-weight: 700; letter-spacing: .12em; }
body[data-completing="true"] h1 { font-size: clamp(1.65rem, 6vw, 2rem); }
.field-help, .field-error { margin: -12px 0 0; font-size: .875rem; font-weight: 400; }
.field-help { color: var(--muted); }
.field-error { color: #ffb5a6; }
input[aria-invalid="true"] { border-color: #ffb5a6; }
