:root {
  --ink: #151515; --paper: #f7f6f2; --surface: #fff; --line: #d8d7d1;
  --muted: #686863; --signal: #ff5a36; --found: #086b51; --focus: #2457ff;
}
:root[data-theme="dark"] {
  --ink: #f5f2ea; --paper: #0f1110; --surface: #191b19; --line: #343732;
  --muted: #a8ada6; --signal: #ff7252; --found: #68d5ad; --focus: #8facff;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: "Aptos", "Segoe UI Variable", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.login-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(420px, .92fr) minmax(460px, 1.08fr); }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: max(38px, env(safe-area-inset-top)) clamp(34px, 5vw, 78px) max(48px, env(safe-area-inset-bottom)); color: #fff; background: #151515; }
.login-story::after { content: ""; position: absolute; width: min(38vw, 520px); aspect-ratio: 1; border: clamp(54px, 7vw, 100px) solid var(--signal); border-radius: 50%; right: -32%; top: -15%; opacity: .95; }
.login-brand, .mobile-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-weight: 780; letter-spacing: -.025em; }
.brand-mark { width: 19px; height: 19px; border: 3px solid currentColor; border-top-color: var(--signal); transform: rotate(45deg); }
.story-copy { position: relative; z-index: 1; max-width: 640px; }
.story-kicker { color: #bcbcb6; margin: 0 0 14px; }
.story-copy h1 { max-width: 650px; margin: 0; font-size: clamp(3.5rem, 7vw, 7.2rem); line-height: .88; letter-spacing: -.075em; }
.story-copy > p:last-child { max-width: 520px; color: #d7d6d0; font-size: 1.12rem; line-height: 1.55; margin: 30px 0 0; }
.story-card { position: relative; z-index: 1; max-width: 520px; display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 16px; color: #151515; background: #f7f6f2; }
.story-icon { width: 48px; height: 48px; display: grid; place-items: center; background: #dceee7; color: #086b51; font-size: 1.7rem; }
.story-card small { display: block; margin-top: 4px; color: #686863; }
.story-card b { padding: 7px 10px; color: #fff; background: #086b51; font-size: .76rem; }
.login-panel { position: relative; display: grid; place-items: center; padding: max(64px, env(safe-area-inset-top)) clamp(24px, 7vw, 110px) max(46px, env(safe-area-inset-bottom)); background: var(--paper); }
.theme-toggle { position: absolute; top: max(22px, env(safe-area-inset-top)); right: 24px; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); }
.theme-toggle span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .2s, transform .2s; }
.theme-toggle .sun { font-size: 1.4rem; }
.theme-toggle .moon { font-size: .85rem; opacity: 0; transform: scale(.5); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: scale(.5); }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: scale(1); }
.login-form { width: min(100%, 470px); }
.mobile-brand { display: none; }
.login-form header { margin-bottom: 42px; }
.login-form header p { margin: 0 0 10px; color: var(--found); font-weight: 740; }
.login-form h2 { margin: 0; font-size: clamp(2.65rem, 5vw, 4.9rem); line-height: .94; letter-spacing: -.065em; }
.login-form > label { display: grid; gap: 8px; margin: 0 0 21px; color: var(--muted); font-size: .84rem; font-weight: 680; }
.login-form input { width: 100%; min-height: 56px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; color: var(--ink); background: var(--surface); font-size: 1rem; }
.password-field { position: relative; }
.password-field input { padding-right: 92px; }
.password-field button { position: absolute; right: 7px; top: 7px; height: 42px; border: 0; padding: 0 10px; color: var(--found); background: transparent; font-size: .78rem; font-weight: 750; }
.login-error { margin: -4px 0 18px; padding: 12px 14px; border-left: 3px solid var(--signal); color: var(--ink); background: color-mix(in srgb, var(--signal) 12%, var(--surface)); }
.login-submit { width: 100%; min-height: 58px; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 12px; padding: 0 20px; color: #fff; background: #086b51; font-weight: 780; cursor: pointer; }
.login-submit i { font-style: normal; font-size: 1.4rem; }
.login-submit:disabled { opacity: .65; cursor: wait; }
.privacy-note { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .8rem; }
@media (max-width: 780px) {
  .login-layout { display: block; }
  .login-story { display: none; }
  .login-panel { min-height: 100dvh; place-items: start center; padding: max(86px, calc(env(safe-area-inset-top) + 54px)) 22px max(34px, env(safe-area-inset-bottom)); }
  .mobile-brand { display: flex; margin-bottom: clamp(56px, 12vh, 110px); }
  .login-form header { margin-bottom: 34px; }
  .login-form h2 { font-size: clamp(2.75rem, 13vw, 4rem); }
  .login-form input, .login-submit { min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
