:root {
    color-scheme: light dark;
    --brand-blue: #005d85;
    --brand-green: #00b595;
    --page: #f0f5f5;
    --surface: #fff;
    --field: #f7f9fa;
    --ink: #00364f;
    --muted: #58707c;
    --border: #d6e1e5;
    --link: #005d85;
    --accent-soft: #e4f6f1;
    --focus: #007b68;
    --danger: #b3263a;
    --danger-bg: #fff0f2;
    --success: #14664b;
    --success-bg: #e6f6ef;
    --content-glass: #f7fbfcf2;
    --content-glass-supported: #f7fbfcd9;
    --story-glass: #00364feb;
    --story-glass-supported: #00364f8f;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--surface);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    background: #00364f;
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: .9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; }
body::before {
    z-index: -2;
    inset: -24px;
    background: url("../images/circuiter-running-community.jpg") 54% center / cover no-repeat;
    filter: saturate(.74) hue-rotate(7deg) contrast(1.08) brightness(.82);
    transform: scale(1.025);
}
body::after {
    z-index: -1;
    background:
        radial-gradient(circle at 78% 30%, #00b5952e 0, transparent 34%),
        linear-gradient(112deg, #002f49cc 0%, #005d8570 48%, #00b59542 100%);
}
::selection { background: #00b59540; color: var(--ink); }
a { color: var(--link); text-underline-offset: 4px; }
a:hover { color: var(--focus); }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 10; padding: 12px 20px; background: var(--surface); border-radius: 12px; }
.skip-link:focus { top: 12px; }
.auth-page { position: relative; z-index: 0; width: min(1320px, 100% - 96px); margin-inline: auto; }
.site-header { height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 27px; font-weight: 750; letter-spacing: -1px; text-shadow: 0 2px 18px #00273c80; }
.brand:hover { color: #fff; }
.brand img { border-radius: 50%; box-shadow: 0 8px 24px #00273c5c; }
.brand-dot { color: var(--brand-green); }
.header-label { font-size: .8125rem; color: #efffff; text-shadow: 0 2px 16px #00273c; }
.auth-shell { display: grid; grid-template-columns: .95fr 1.05fr; min-height: 680px; background: #ffffff12; border: 1px solid #ffffff70; border-radius: 32px; overflow: clip; box-shadow: 0 30px 90px -32px #001b2dd9, inset 0 1px 0 #ffffff80; }
.auth-story { position: relative; display: flex; align-items: flex-end; overflow: hidden; padding: 38px; background: linear-gradient(145deg, #00364f42, #005d8512 52%, #00b59528); color: #fff; }
.story-glass {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    padding: 32px;
    border: 1px solid #ffffff5c;
    border-radius: 30px 30px 30px 12px;
    background: var(--story-glass);
    box-shadow: 0 24px 60px -28px #001c2ed9, inset 0 1px 0 #ffffff66, inset 0 -1px 0 #ffffff1f;
}
.story-glass::before, .story-glass::after { content: ""; position: absolute; pointer-events: none; }
.story-glass::before {
    width: 210px;
    aspect-ratio: 1;
    top: -122px;
    right: -72px;
    border-radius: 44% 56% 62% 38% / 56% 42% 58% 44%;
    background: radial-gradient(circle at 32% 28%, #ffffff61, #48dfbd2e 46%, transparent 70%);
    box-shadow: inset 18px 18px 40px #ffffff24;
    animation: glass-drift 12s ease-in-out infinite alternate;
}
.story-glass::after { inset: 0; border-radius: inherit; background: linear-gradient(128deg, #ffffff26, transparent 28%, transparent 72%, #48dfbd1f); }
.story-copy, .story-footer { position: relative; z-index: 1; }
.eyebrow { display: block; font-size: .625rem; font-weight: 750; letter-spacing: 2px; line-height: 1.6; }
.story-copy .eyebrow { color: #bce8e0; display: flex; align-items: center; gap: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #37dbb8; box-shadow: 0 0 0 4px #37dbb817; flex: 0 0 auto; }
.story-copy h2 { margin: 30px 0 22px; font-size: clamp(2.35rem, 3.4vw, 3.25rem); font-weight: 650; letter-spacing: -2.5px; line-height: 1.08; text-shadow: 0 3px 24px #00273c8c; }
.story-copy h2 em { font-style: normal; color: #48dfbd; }
.story-copy p { color: #d4e7ec; font-size: .9375rem; line-height: 1.8; margin: 0; }
.story-footer { display: flex; align-items: center; gap: 12px; margin-top: 42px; color: #d5e9ed; font-size: .75rem; }
.story-rule { width: 24px; height: 2px; background: var(--brand-green); }
.auth-content { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; padding: 48px 56px; background: var(--content-glass); border-left: 1px solid #ffffff70; }
.auth-content::before { content: ""; position: absolute; width: 420px; height: 220px; top: -170px; left: 8%; border-radius: 50%; background: #ffffff80; filter: blur(22px); pointer-events: none; }
.auth-content:focus { outline: none; }
.auth-form { position: relative; z-index: 1; width: 100%; max-width: 420px; animation: arrive .45s ease-out both; }
.content-eyebrow { color: var(--focus); margin-bottom: 20px; }
h1 { font-size: 2rem; line-height: 1.17; letter-spacing: -1px; font-weight: 700; margin: 0 0 14px; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.3px; }
h3 { font-size: 1.375rem; font-weight: 650; letter-spacing: -.4px; margin-bottom: 20px; }
h4 { font-size: 1.125rem; font-weight: 650; }
p { color: var(--muted); margin-bottom: 24px; }
.form-intro { margin-bottom: 30px; }
form { margin-top: 24px; }
.form-label, .form-floating > label { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.form-label { margin-bottom: 8px; }
.form-control, .form-select {
    min-height: 50px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    background-color: var(--field); color: var(--ink); font-size: .9375rem;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-control:hover, .form-select:hover { border-color: var(--muted); }
.form-control:focus, .form-select:focus { border-color: var(--focus); background-color: var(--surface); color: var(--ink); box-shadow: 0 0 0 3px #00b59520; }
.form-control:disabled, .form-control[readonly] { background: var(--page); color: var(--muted); opacity: 1; }
.form-floating > label { background: transparent; }
.form-floating > .form-control:focus ~ label::after, .form-floating > .form-control:not(:placeholder-shown) ~ label::after { background: var(--field); }
input[type="checkbox"] { accent-color: var(--brand-blue); width: 17px; height: 17px; vertical-align: middle; margin-right: 7px; }
.form-check-input:checked { background-color: var(--brand-blue); border-color: var(--brand-blue); }
.form-options { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 22px 0 26px; font-size: .8125rem; }
.remember-option { display: inline-flex; gap: 2px; align-items: center; cursor: pointer; min-height: 32px; }
.form-options a { font-weight: 600; }
.form-text, .text-muted { color: var(--muted) !important; font-size: .75rem; line-height: 1.6; }
.form-text { margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; border-radius: 10px; padding: 12px 20px; font-size: .875rem; font-weight: 650; line-height: 1.5; transition: background-color .18s, box-shadow .18s, transform .18s; white-space: normal; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible, .btn-primary:active { background: #004c6e !important; border-color: #004c6e !important; color: #fff !important; box-shadow: 0 6px 18px #005d8526; }
.btn-primary:disabled { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; opacity: .6; }
.btn-outline-primary, .btn-secondary { color: var(--link); background: transparent; border-color: var(--border); }
.btn-outline-primary:hover, .btn-secondary:hover { color: var(--link); background: var(--accent-soft); border-color: var(--focus); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn-link { color: var(--link); }
.auth-submit { width: 100%; justify-content: space-between; }
.auth-submit span[aria-hidden] { font-size: 20px; line-height: 1; font-weight: 400; }
.account-prompt { margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: .8125rem; text-align: center; }
.account-prompt a { font-weight: 650; }
.secondary-link { margin: 14px 0 0; text-align: center; font-size: .75rem; }
.secondary-link a { color: var(--muted); }
.account-actions { display: grid; gap: 12px; margin-top: 30px; }
.account-identity { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--field); overflow-wrap: anywhere; }
.account-identity span { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.account-identity strong { font-weight: 600; }
.text-danger, .field-validation-error { color: var(--danger) !important; font-size: .8125rem; }
.field-validation-error { display: block; margin-top: 6px; }
.input-validation-error { border-color: var(--danger); }
.validation-summary-valid, .field-validation-valid { display: none; }
.validation-summary-errors { padding: 14px 16px; background: var(--danger-bg); border: 1px solid var(--danger); border-radius: 10px; margin-bottom: 20px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.alert { border-radius: 10px; font-size: .875rem; overflow-wrap: anywhere; }
.alert-success { color: var(--success); background: var(--success-bg); border-color: var(--success); }
.alert-danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }
.alert-warning { color: #775000; background: #fff5d6; border-color: #cfac57; }
hr { border-color: var(--border); opacity: 1; margin: 24px 0; }
/* Identity's built-in recovery/confirmation pages use Bootstrap columns inside this form. */
.auth-shell:not(.auth-shell--manage) .auth-form > .row > [class*="col-"] { width: 100%; }
.auth-shell:not(.auth-shell--manage) .auth-form > h2 { color: var(--muted); font-size: .9375rem; font-weight: 400; line-height: 1.6; letter-spacing: 0; }
.auth-shell:not(.auth-shell--manage) .auth-form > hr { display: none; }
.auth-shell--manage { grid-template-columns: 1fr; min-height: 620px; }
.auth-shell--manage .auth-story { display: none; }
.auth-shell--manage .auth-content { align-items: flex-start; padding: 48px; }
.auth-shell--manage .auth-form { max-width: none; }
.auth-shell--manage .auth-form > div > h2 { color: var(--muted); font-size: 1rem; font-weight: 400; margin-top: 12px; }
.auth-shell--manage .nav-pills { gap: 6px; padding-right: 20px; }
.nav-pills .nav-link { color: var(--muted); border-radius: 10px; padding: 12px 16px; font-size: .875rem; font-weight: 550; }
.nav-pills .nav-link:hover { color: var(--ink); background: var(--field); }
.nav-pills .nav-link.active { color: var(--link); background: var(--accent-soft); font-weight: 650; }
.auth-shell--manage .col-lg-9 { padding-left: 36px; border-left: 1px solid var(--border); }
.auth-shell--manage .col-xl-6 { width: 100%; max-width: 520px; }
.auth-shell--manage form { margin-top: 0; }
.auth-shell--manage .input-group .form-control { min-width: 0; }
.auth-shell--manage .input-group-text { background: var(--accent-soft); color: var(--success); border-color: var(--border); }
.auth-shell--manage .btn { margin-bottom: 6px; }
.auth-form pre, .auth-form code { color: var(--link); overflow-wrap: anywhere; white-space: pre-wrap; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px 2px 28px; color: #e7f7f7; font-size: .6875rem; text-shadow: 0 2px 14px #00273c; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .story-glass { background: var(--story-glass-supported); -webkit-backdrop-filter: blur(22px) saturate(145%); backdrop-filter: blur(22px) saturate(145%); }
    .auth-content { background: var(--content-glass-supported); -webkit-backdrop-filter: blur(28px) saturate(125%); backdrop-filter: blur(28px) saturate(125%); }
}
@keyframes glass-drift { to { transform: translate(-18px, 14px) rotate(10deg) scale(1.06); } }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-color-scheme: dark) {
    :root { --page: #081b26; --surface: #102a38; --field: #0c2432; --ink: #e6f2f5; --muted: #a1b7c3; --border: #2d4754; --link: #6fcee9; --accent-soft: #123f40; --focus: #44d6b5; --danger: #ff9cab; --danger-bg: #412632; --success: #75dfb8; --success-bg: #153e36; --content-glass: #0b2432f5; --content-glass-supported: #0b2432df; --story-glass: #002f49f2; --story-glass-supported: #002f499e; }
    body::before { filter: saturate(.68) hue-rotate(8deg) contrast(1.12) brightness(.62); }
    body::after { background: radial-gradient(circle at 78% 30%, #00b59524 0, transparent 35%), linear-gradient(112deg, #001f31e6, #004b6ca3 50%, #007b726b); }
    .auth-shell { box-shadow: 0 30px 90px -30px #000d, inset 0 1px 0 #ffffff52; }
    .auth-content { border-left-color: #ffffff38; }
    .auth-content::before { background: #3ddfc32b; }
    .btn-primary { background: #0078a4; border-color: #0078a4; }
    .btn-primary:hover, .btn-primary:focus-visible, .btn-primary:active { background: #0082af !important; border-color: #0082af !important; }
    .btn-danger { color: #321321; }
    .alert-warning { color: #f2d58e; background: #403719; border-color: #7b6933; }
    .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
    .form-check-input { background-color: var(--field); border-color: var(--muted); }
    .form-check-input:checked { background-color: var(--brand-blue); }
}
@media (min-width: 1600px) { .auth-page { padding-top: 30px; } }
@media (max-width: 1100px) {
    .auth-page { width: calc(100% - 48px); }
    .auth-story { padding: 28px; }
    .story-glass { padding: 28px; }
    .auth-content { padding: 40px 32px; }
    .story-copy h2 { font-size: 2.55rem; }
    .story-copy .eyebrow { font-size: .5625rem; letter-spacing: 1.2px; }
}
@media (max-width: 991.98px) {
    .auth-shell--manage .auth-content { padding: 28px; }
    .auth-shell--manage .nav-pills { flex-direction: row !important; padding: 0 0 20px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
    .auth-shell--manage .nav-pills .nav-link { padding: 10px 12px; font-size: .8125rem; }
    .auth-shell--manage .col-lg-9 { padding-left: 12px; border-left: 0; }
}
@media (max-width: 800px) {
    .auth-page { max-width: 600px; }
    .site-header { height: 88px; }
    .header-label { display: none; }
    .auth-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 20px; }
    .auth-story { padding: 18px; background: linear-gradient(120deg, #00364f4f, #00b59522); }
    .story-glass { padding: 20px 24px; border-radius: 20px 20px 20px 8px; }
    .story-copy .eyebrow, .story-copy p, .story-footer { display: none; }
    .story-copy h2 { font-size: 1.375rem; letter-spacing: -.5px; margin: 0; }
    .story-copy h2 br { display: none; }
    .auth-content { padding: 36px 28px; border-top: 1px solid #ffffff70; border-left: 0; }
    .content-eyebrow { margin-bottom: 16px; }
    h1 { font-size: 1.75rem; }
}
@media (max-width: 420px) {
    .auth-page { width: calc(100% - 28px); }
    .site-header { height: 76px; }
    .brand { font-size: 24px; }
    .brand img { width: 34px; height: 34px; }
    .auth-content, .auth-shell--manage .auth-content { padding: 30px 20px; }
    .auth-story { padding: 14px; }
    .story-glass { padding: 18px; }
    .story-copy h2 { font-size: 1.25rem; }
    .form-options { gap: 8px; font-size: .75rem; }
    .form-control { font-size: 1rem; }
    .site-footer { font-size: .625rem; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
    body { background: Canvas; }
    body::before, body::after { display: none; }
    .auth-shell, .auth-story, .story-glass, .auth-content { background: Canvas; border-color: CanvasText; }
    .btn, .nav-link.active { border: 1px solid ButtonText; }
}
