:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #181a1d;
  --panel: #22262b;
  --surface: #292e35;
  --surface-2: #303640;
  --line: #687079;
  --muted: #bfc2c8;
  --text: #f4f3ef;
  --accent: #838eb4;
  --accent-ink: #181a1d;
  --cream: #b8bd99;
  --bad: #ff9696;
  --warn: #e49e53;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--text); background: var(--bg); font-size: 16px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 4px; }
.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(480px, 1fr); }
.auth-intro { position: relative; min-height: 100dvh; padding: clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-right: 1px solid #43494f; background: radial-gradient(ellipse at 70% 65%, #838eb415, transparent 60%); }
.auth-intro::after { position: absolute; right: -120px; bottom: 12%; width: 280px; height: 390px; content: ""; border: 1px solid #838eb433; border-radius: 160px 160px 0 0; box-shadow: 0 0 0 24px #838eb405, 0 0 0 25px #838eb415, 0 0 0 48px #838eb404, 0 0 0 49px #838eb40c; transform: rotate(-12deg); pointer-events: none; }
.auth-intro > * { position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; gap: 16px; width: fit-content; color: var(--text); text-decoration: none; font-size: 20px; font-weight: 600; }
.brand > span:last-child { display: grid; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: var(--bg); background: var(--accent); font-size: 14px; }
.auth-intro h2 { max-width: 650px; margin: 16px 0 24px; font-size: clamp(40px, 4.5vw, 68px); font-weight: 500; line-height: 1.1; letter-spacing: -.04em; }
.auth-intro > div > p:last-child { max-width: 440px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.auth-assurance { max-width: 520px; margin: 0; padding: 24px 0 0; border-top: 1px solid #43494f; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-panel { display: grid; place-items: center; padding: 48px; }
.auth-card, main.card { position: relative; width: min(100%, 480px); padding: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel); }
.auth-card.wide { width: min(100%, 570px); }
.auth-card h1, main.card h1 { margin: 12px 0 16px; font-size: 32px; font-weight: 500; line-height: 1.15; letter-spacing: -.025em; }
.auth-card > p, main.card > p { color: var(--muted); line-height: 1.6; }
.eyebrow { margin: 0; color: var(--cream) !important; font-size: 13px; font-weight: 400; line-height: 1.5; }
.auth-form { display: grid; gap: 24px; margin: 32px 0 16px; }
.auth-form label, .auth-recovery label, main.card label { display: grid; gap: 8px; color: var(--text); font-size: 14px; font-weight: 400; }
.auth-form label small, .optional { color: var(--muted); font-size: 13px; }
.auth-form input, .auth-recovery input, main.card input, main.card select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; color: var(--text); background: var(--bg); }
input::placeholder { color: var(--muted); opacity: .9; }
.auth-form input:hover, .auth-recovery input:hover, main.card input:hover, main.card select:hover { border-color: var(--accent); }
.auth-form input:focus, .auth-recovery input:focus, main.card input:focus, main.card select:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 72px; }
.reveal { position: absolute; right: 2px; top: 2px; min-height: 44px; min-width: 60px; border: 0; border-radius: 6px; padding: 0 8px; color: var(--accent); background: transparent; font-size: 13px; }
.primary, .secondary, .auth-recovery button, main.card button { min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; font-size: 15px; font-weight: 500; }
.primary { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.secondary, .auth-recovery button { width: 100%; color: var(--text); background: transparent; }
button:disabled { cursor: not-allowed; opacity: .6; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.auth-links { display: flex; justify-content: flex-end; font-size: 13px; }
.auth-links a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 16px 0 24px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #43494f; }
.status, #status { min-height: 24px; margin: 16px 0 0; color: var(--accent); line-height: 1.5; overflow-wrap: anywhere; }
.status.error, .error { color: var(--bad); }
.auth-recovery { margin-top: 24px; padding-top: 16px; border-top: 1px solid #43494f; }
.auth-recovery summary { cursor: pointer; color: var(--muted); font-size: 13px; min-height: 44px; padding: 12px 0; }
.auth-recovery[open] { display: grid; gap: 16px; }
.auth-switch { margin: 24px 0 0 !important; padding-top: 16px; border-top: 1px solid #43494f; text-align: center; font-size: 13px; }
.auth-switch a { display: inline-flex; min-height: 44px; align-items: center; }
.fine-print { font-size: 13px; }
.notice { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.notice p { margin: 4px 0 0; }
main.card { margin: min(10vh, 80px) auto; }
main.card .brand { margin-bottom: 32px; }
main.card label { margin: 24px 0; }
main.card button { width: 100%; }
#open-activated-core { display: flex; align-items: center; justify-content: center; margin-top: 16px; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { min-height: auto; padding: 24px; gap: 32px; border-right: 0; border-bottom: 1px solid #43494f; }
  .auth-intro::after { display: none; }
  .auth-intro h2 { font-size: 40px; }
  .auth-assurance { display: none; }
  .auth-panel { padding: 32px 16px 48px; }
}
@media (max-width: 480px) {
  .auth-intro > div { display: none; }
  .auth-intro { gap: 0; }
  .auth-panel { align-items: start; }
  .auth-card { padding: 24px; }
  .auth-card h1 { font-size: 28px; }
  main.card { width: calc(100% - 32px); padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.brand .brand-mark { background:transparent; border-radius:0; }
