:root {
  color-scheme: light;
  --paper: #fafaf8;
  --ink: #0b0b0b;
  --muted: #747470;
  --line: #e7e7e4;
  --violet: #7c3aed;
  font-family: "Helvetica Neue", "Nimbus Sans L", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); text-rendering: optimizeLegibility; }
button, input { font: inherit; }
a { color: inherit; }

.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(480px, .92fr); }
.story { position: relative; min-height: 100%; overflow: hidden; padding: 38px clamp(32px, 5vw, 76px); display: flex; flex-direction: column; background: #0b0b0b; color: white; }
.story::before { position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(135deg, black, transparent 72%); content: ""; }
.story::after { position: absolute; width: 420px; aspect-ratio: 1; right: -210px; bottom: 8%; border: 1px solid rgb(255 255 255 / .1); border-radius: 50%; box-shadow: 0 0 0 72px rgb(255 255 255 / .018), 0 0 0 144px rgb(255 255 255 / .012); content: ""; }
.brand, .story-copy, .operation-map, .story-foot { position: relative; z-index: 1; }
.brand { width: max-content; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 17px; font-weight: 650; letter-spacing: -.04em; }
.brand svg { width: 31px; height: 31px; }
.brand:focus-visible, .switch-copy a:focus-visible { outline: 2px solid #a78bfa; outline-offset: 4px; }
.story-copy { max-width: 720px; margin: auto 0; padding: 64px 0; }
.kicker, .status-line, .story-foot, .operation-map { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .16em; }
.kicker { margin: 0 0 28px; color: rgb(255 255 255 / .34); font-size: 10px; }
.story h1 { max-width: 680px; margin: 0; font-size: clamp(50px, 6.2vw, 94px); font-weight: 500; line-height: .92; letter-spacing: -.075em; text-wrap: balance; }
.lede { max-width: 560px; margin: 30px 0 0; color: rgb(255 255 255 / .48); font-size: 16px; line-height: 1.75; }
.operation-map { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid rgb(255 255 255 / .11); }
.operation-map div { min-width: 0; padding: 16px 14px 16px 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 10px; border-right: 1px solid rgb(255 255 255 / .11); }
.operation-map div + div { padding-left: 14px; }
.operation-map div:last-child { border-right: 0; }
.operation-map span { color: rgb(255 255 255 / .2); font-size: 8px; }
.operation-map strong { color: rgb(255 255 255 / .64); font-size: 8px; font-weight: 500; }
.operation-map i { grid-column: 1 / -1; height: 2px; width: var(--progress, 70%); background: var(--violet); }
.operation-map div:nth-child(2) i { --progress: 48%; opacity: .8; }
.operation-map div:nth-child(3) i { --progress: 62%; opacity: .58; }
.operation-map div:nth-child(4) i { --progress: 36%; opacity: .38; }
.story-foot { margin: 20px 0 0; color: rgb(255 255 255 / .25); font-size: 8px; }

.form-panel { min-width: 0; padding: 44px clamp(28px, 5vw, 80px); display: grid; place-items: center; border-left: 1px solid var(--line); }
.form-wrap { width: min(100%, 540px); }
.status-line { display: flex; align-items: center; gap: 10px; margin: 0; color: #999994; font-size: 9px; }
.status-line span { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px rgb(124 58 237 / .1); }
.status-line b { font-weight: 500; }
.form-panel h2 { margin: 22px 0 0; font-size: clamp(36px, 4vw, 58px); line-height: .98; font-weight: 500; letter-spacing: -.065em; }
.form-intro { margin: 14px 0 40px; color: var(--muted); font-size: 14px; }
form { display: grid; gap: 20px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { min-width: 0; }
label { display: block; margin-bottom: 8px; color: #4f4f4b; font-size: 11px; font-weight: 550; }
input { width: 100%; height: 50px; border: 1px solid #d8d8d4; border-radius: 0; padding: 0 14px; background: white; color: #111; font-size: 15px; outline: 0; transition: border-color 150ms, box-shadow 150ms; }
input:hover { border-color: #b8b8b3; }
input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgb(124 58 237 / .11); }
input:user-invalid { border-color: #b42318; }
.password-field { position: relative; }
.password-field input { padding-right: 68px; }
.password-field button { position: absolute; top: 0; right: 0; height: 50px; min-width: 60px; border: 0; background: transparent; color: #666; font-size: 11px; cursor: pointer; }
.password-field button:focus-visible { outline: 2px solid var(--violet); outline-offset: -4px; }
.hint, .legal { margin: 7px 0 0; color: #9b9b96; font-size: 10px; line-height: 1.6; }
.form-error { margin: 0; border-left: 2px solid #b42318; padding: 10px 12px; background: #fff4f2; color: #912018; font-size: 12px; line-height: 1.5; }
.submit { height: 52px; margin-top: 3px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #111; border-radius: 0; background: #111; color: white; font-size: 13px; font-weight: 550; cursor: pointer; transition: background 150ms, transform 150ms; }
.submit:hover { background: #282828; }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid rgb(124 58 237 / .35); outline-offset: 3px; }
.submit:disabled { cursor: wait; opacity: .65; }
.switch-copy { margin: 24px 0 0; color: #777772; font-size: 12px; }
.switch-copy a { color: #111; font-weight: 600; text-underline-offset: 4px; }
.legal { margin-top: 42px; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .form-panel { order: -1; min-height: 100dvh; padding: 32px clamp(22px, 8vw, 64px); border-left: 0; }
  .story { min-height: 620px; }
}

@media (max-width: 520px) {
  .form-panel { align-items: start; padding: 25px 20px 36px; }
  .form-wrap { padding-top: 16px; }
  .form-panel h2 { font-size: 40px; }
  .form-intro { margin-bottom: 30px; }
  .field-pair { grid-template-columns: 1fr; gap: 20px; }
  form { gap: 18px; }
  input, .password-field button { height: 48px; }
  .story { min-height: 540px; padding: 28px 22px; }
  .story h1 { font-size: 52px; }
  .operation-map { grid-template-columns: 1fr 1fr; }
  .operation-map div:nth-child(2) { border-right: 0; }
  .operation-map div:nth-child(-n + 2) { border-bottom: 1px solid rgb(255 255 255 / .11); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
