/* Shared by /login/, /signup/, /reset/ and /admin/: brand tokens, header, footer, form controls and the sign-in shell.
   Colors and fonts come from the media kit. The signed-in admin adds admin.css on top. */
:root {
  --bg: #0B0F14; --raised: #0F141B; --panel: #151E29; --panel2: #1B2633; --field: #0D131A; --line: #293746; --line2: #5A6F86;
  --text: #E6EDF3; --text2: #B4C0CE; --muted: #95A3B4; --amber: #F7A531; --amber-hi: #FFB850; --on-amber: #15100A; --link: #F7A531; --soft: rgba(247,165,49,.13); --soft-line: rgba(247,165,49,.38);
  --green: #2FD08A; --red: #FF8A8A; --warn: #F2C94C; --hover: rgba(255,255,255,.035); --head: rgba(11,15,20,.86); --shadow: 0 24px 60px -24px rgba(0,0,0,.75);
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace; --hh: 68px; --gut: clamp(16px, 3vw, 32px); color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4F6F9; --raised: #EDF0F4; --panel: #FFFFFF; --panel2: #F1F4F7; --field: #F7F9FB; --line: #DCE2E8; --line2: #8794A3;
  --text: #101B28; --text2: #3C4857; --muted: #526071; --link: #8A4E00; --soft: rgba(247,165,49,.17); --soft-line: rgba(196,120,10,.5);
  --green: #066B44; --red: #B91C1C; --warn: #7A5200; --hover: rgba(11,15,20,.03); --head: rgba(255,255,255,.9); --shadow: 0 24px 50px -28px rgba(16,24,40,.3); color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--link); text-underline-offset: 3px; } svg { flex: none; } [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: var(--on-amber); padding: 10px 14px; border-radius: 8px; font-weight: 700; } .skip:focus { top: 12px; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.boot { padding: 60px 20px; text-align: center; color: var(--muted); margin: auto; }

/* header */
.top { min-height: var(--hh); display: flex; align-items: center; gap: 12px; padding: 10px var(--gut); background: var(--head); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; } .brand img { display: block; }
.tag { font: 700 11px/1 var(--mono); letter-spacing: .06em; color: var(--link); background: var(--soft); border: 1px solid var(--soft-line); border-radius: 99px; padding: 6px 10px; }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text2); text-decoration: none; font-weight: 600; font-size: 14px; } .top-link:hover { background: var(--hover); color: var(--text); }
.theme { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.theme button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 11px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 13px var(--font); cursor: pointer; transition: color .15s, background-color .15s; } .theme svg { width: 18px; height: 18px; }
.theme button:hover { color: var(--text); } .theme button[aria-checked="true"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 14px var(--gut); display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13.5px; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; } .foot a { color: var(--text2); text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; } .foot a:hover { color: var(--link); text-decoration: underline; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font: 600 14px var(--font); padding: 8px 15px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; text-decoration: none; transition: transform .15s, background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); } .btn:active { transform: translateY(1px); } .btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--on-amber); font-weight: 700; } .btn-primary:hover { background: var(--amber-hi); border-color: var(--amber-hi); }
input, select, textarea { font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; min-width: 0; } input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--amber); flex: none; margin: 0; } ::placeholder { color: var(--muted); opacity: 1; }

/* sign-in shell */
.auth { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(20px, 3.4vh, 40px) var(--gut); display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 468px); gap: clamp(32px, 6vw, 88px); align-items: center; }
.auth-main { order: 2; width: 100%; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 2.6vw, 34px); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(1.65rem, 2.3vw, 2rem); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 6px; text-wrap: balance; } .auth-card h1:focus { outline: none; }
.auth-card .lead { margin: 0 0 20px; color: var(--text2); } .auth-card p { text-wrap: pretty; }
.auth-form { display: grid; gap: 15px; }
.auth-form .fld { display: grid; gap: 6px; min-width: 0; } .auth-form .fld > label, .type-pick legend { font-weight: 600; font-size: 14px; }
.auth-form .fld input:not([type="checkbox"]) { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.auth-form .fld input:not([type="checkbox"]):focus { outline: 2px solid transparent; border-color: var(--link); box-shadow: 0 0 0 3px var(--soft); }
.auth-form .fld input[aria-invalid="true"] { border-color: var(--red); } .auth-form .fld input[aria-invalid="true"]:not([type="checkbox"]):focus { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 20%, transparent); }
.auth-form .fld input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 40px var(--field) inset; caret-color: var(--text); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; } .error { color: var(--red); font-size: 13.5px; font-weight: 500; line-height: 1.4; } .error:empty { display: none; }
.rule { display: flex; align-items: flex-start; gap: 7px; } .rule::before { content: ""; width: 14px; height: 14px; margin-top: 2px; flex: none; border: 1.5px solid currentColor; border-radius: 50%; } .rule.met { color: var(--green); }
.rule.met::before { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 2.5px var(--panel); }
.pw-wrap { position: relative; } .auth-form .pw-wrap input:not([type="checkbox"]) { padding-right: 78px; }
.pw-show { position: absolute; right: 2px; top: 2px; height: 44px; min-width: 66px; border: 0; background: none; color: var(--link); font: 600 14px var(--font); cursor: pointer; border-radius: 10px; } .pw-show:hover { text-decoration: underline; text-underline-offset: 3px; }
.quiet { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; font-weight: 600; font-size: 14px; text-decoration: none; } .quiet:hover { text-decoration: underline; } .quiet.end { justify-self: end; }
.auth-card .btn { width: 100%; min-height: 50px; font-size: 16px; border-radius: 12px; } .auth-card .btn:not(.btn-primary) { background: transparent; }
.btn .spin { display: none; } [aria-busy="true"] .btn-primary .spin { display: block; width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; } @keyframes spin { to { transform: rotate(1turn); } }
.form-status:empty { display: none; } .form-status { padding: 12px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; border: 1px solid var(--line2); background: var(--panel2); }
.form-status.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
.form-status.err { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
.auth-alt { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); } .auth-alt p { margin: 0; color: var(--text2); font-size: 14.5px; }
.auth-foot { margin: 14px 0 0; color: var(--muted); font-size: 14px; } .auth-foot a, .auth-alt p a, .lead a { font-weight: 600; } .lead a { display: inline-block; }
.auth-form .fld > .check { display: flex; gap: 11px; font-weight: 400; align-items: center; min-height: 44px; font-size: 14.5px; cursor: pointer; } .check a { padding: 4px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.type-pick { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; } .type-pick legend { padding: 0; margin-bottom: 7px; }
.type-pick label { position: relative; cursor: pointer; } .type-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.type-pick span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 10px; align-content: center; height: 100%; min-height: 66px; padding: 11px 13px; border: 1px solid var(--line2); border-radius: 12px; background: var(--field); transition: border-color .15s, background-color .15s; }
.type-pick svg { grid-row: 1 / 3; align-self: center; color: var(--muted); } .type-pick strong { line-height: 1.3; } .type-pick small { color: var(--text2); font-size: 13px; line-height: 1.35; }
.type-pick label:hover span { border-color: var(--muted); } .type-pick input:checked + span { border-color: var(--link); background: var(--soft); box-shadow: inset 0 0 0 1px var(--link); } .type-pick input:checked + span svg { color: var(--link); } .type-pick input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.note { margin: 0; padding: 11px 13px; border-radius: 12px; background: var(--panel2); color: var(--text2); font-size: 14px; }

/* brand panel: always dark, like the logo artwork */
.auth-art { order: 1; align-self: stretch; max-height: 760px; min-height: 560px; margin: auto 0; width: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: clamp(26px, 3vw, 42px); border-radius: 24px; border: 1px solid #1D2A37; background: #050B11 linear-gradient(200deg, #0A1620, #050B11 60%); color: #E6EDF3; }
.auth-art img { display: block; width: min(100%, 320px); height: auto; aspect-ratio: 1; margin: -6px auto; -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 99%); mask: radial-gradient(closest-side, #000 72%, transparent 99%); }
.auth-art h2 { font-size: clamp(1.5rem, 2.35vw, 2.15rem); line-height: 1.14; letter-spacing: -.028em; margin: 0 0 14px; max-width: 18ch; text-wrap: balance; }
.auth-art p, .auth-art li { margin: 0; color: #B9C6D3; font-size: 15px; } .auth-art p { max-width: 46ch; }
.auth-art ul, .auth-art ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; } .auth-art li { display: flex; gap: 11px; align-items: flex-start; } .auth-art li svg { width: 18px; height: 18px; margin-top: 2px; color: #2FD08A; }
.auth-art ol { counter-reset: s; } .auth-art ol li::before { counter-increment: s; content: counter(s); flex: none; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; background: rgba(247,165,49,.16); color: #F7A531; font: 700 12px var(--mono); }
.back-sm { display: none; }

@media (max-width: 1080px) { .auth { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(400px, 440px); } .auth-art img { width: min(100%, 260px); } }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); align-items: start; padding-block: 24px 32px; } .auth-art { display: none; } .auth-main { max-width: 480px; margin: 0 auto; } }
@media (min-width: 620px) and (max-width: 900px) and (min-height: 760px) { .auth { align-items: center; } }
@media (max-width: 900px) { .theme button { min-width: 44px; min-height: 44px; padding: 0 10px; } .theme button span { display: none; } .foot a { min-height: 44px; } }
@media (max-width: 560px) {
  .top { gap: 8px; } .brand { font-size: 1.08rem; gap: 8px; } .brand img { width: 34px; height: 34px; } .top-link { display: none; } .auth { padding-top: 8px; }
  .back-sm { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text2); font-weight: 600; font-size: 14px; text-decoration: none; } .back-sm svg, .top-link .flip { width: 17px; height: 17px; }
  .auth-card { border-radius: 18px; } .foot { justify-content: center; text-align: center; }
}
.flip { transform: scaleX(-1); }
@media (max-width: 350px) { .auth-card { padding: 20px 16px; } .type-pick span { grid-template-columns: minmax(0, 1fr); padding: 10px 11px; } .type-pick svg { display: none; } .top:has(.tag) .brand b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
