/* Prism Welcome — isolated from the authenticated workspace. */
.startup-screen,.auth-gate {
  min-height:100vh;
  min-height:100dvh;
  color:#f6f9ff;
  background:#061329;
  font-family:Arial,Helvetica,sans-serif;
  color-scheme:dark;
}
.startup-screen { display:grid; place-items:center; padding:24px; }
.startup-card { display:grid; justify-items:center; gap:16px; width:min(360px,100%); padding:32px; text-align:center; }
.startup-card img { width:160px; height:42px; object-fit:cover; object-position:center 52%; filter:invert(1); mix-blend-mode:screen; }
.startup-card strong { font-size:1.25rem; }
.startup-card small { color:#b7c8e3; font-size:.875rem; line-height:1.5; }
.startup-spinner { width:26px; height:26px; border:2px solid #314b6d; border-top-color:#8cdcff; border-radius:50%; animation:startup-spin .85s linear infinite; }
@keyframes startup-spin { to { transform:rotate(360deg); } }
.auth-gate { position:relative; display:grid; place-items:center; padding:clamp(16px,3vw,48px); isolation:isolate; }
.auth-gate *, .startup-screen * { box-sizing:border-box; }
.auth-stage { display:grid; grid-template-columns:minmax(0,57fr) minmax(0,43fr); width:min(1120px,100%); min-height:720px; overflow:hidden; border:1px solid #21354f; border-radius:18px; background:#09182e; box-shadow:0 24px 70px #0004; }
.auth-brand-panel { position:relative; min-width:0; overflow:hidden; padding:39px; background:#08172e; }
.auth-ambient { position:absolute; inset:0; overflow:hidden; pointer-events:none; user-select:none; }
#auth-prism-art { position:absolute; width:113%; height:98%; max-width:none; left:-4%; bottom:-14%; object-fit:contain; transform-origin:50% 60%; pointer-events:none; }
.auth-brand-top,.auth-brand-copy { position:relative; z-index:1; }
.auth-brand-logo-frame { display:block; width:138px; height:35px; margin:0; border:0; border-radius:0; box-shadow:none; background:#08172e; }
.auth-brand-logo { display:block; width:138px; height:35px; object-fit:cover; object-position:center 52%; filter:invert(1); mix-blend-mode:screen; }
.auth-brand-copy { margin-top:77px; }
.auth-brand-copy h2 { margin:0; color:#fff; font:700 clamp(2.35rem,4.2vw,3.5rem)/1.03 Arial,Helvetica,sans-serif; letter-spacing:-.045em; }
.auth-brand-copy h2 em { color:#a8dafa; font-style:normal; }
.auth-brand-copy p { max-width:260px; margin:20px 0 0; color:#b7c8e3; font-size:1.0625rem; line-height:1.55; }
.auth-motion-toggle { position:absolute; z-index:2; left:39px; bottom:20px; min-height:44px; padding:8px 12px; border:1px solid #486486; border-radius:6px; color:#d7eaff; background:#09182ee8; font:400 .75rem/1.4 Arial,sans-serif; cursor:pointer; }
.auth-motion-toggle:hover { background:#1c3351; }
.auth-access-panel { display:flex; flex-direction:column; min-width:0; padding:66px 36px 32px; background:#09182e; }
.auth-access-meta { margin-bottom:24px; }
.auth-security-label { color:#afc5e9; font-size:.75rem; font-weight:700; letter-spacing:.15em; }
.auth-card { width:100%; min-width:0; max-width:430px; margin:0 auto; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
.auth-card h1 { margin:0 0 10px; color:#f6f9ff; font:700 clamp(1.875rem,3vw,2.25rem)/1.18 Arial,Helvetica,sans-serif; letter-spacing:-.035em; }
.auth-card > p { margin:0 0 30px; color:#a5bbdf; font-size:1.0625rem; line-height:1.5; }
.auth-card form { display:grid; gap:20px; }
.auth-card label { display:grid; gap:7px; margin:0; color:#e9f1ff; font-size:.875rem; font-weight:600; line-height:1.45; }
.auth-card input { width:100%; min-width:0; min-height:48px; padding:0 13px; border:1px solid #546e92; border-radius:6px; color:#eef5ff; background:#14263e; font:400 1rem/1.4 Arial,Helvetica,sans-serif; box-shadow:none; }
.auth-card input::placeholder { color:#a9bedc; opacity:1; }
.auth-card input:hover { border-color:#8bb6e3; }
.auth-card input:focus { border-color:#9ae6ff; outline:2px solid #9ae6ff; outline-offset:2px; box-shadow:none; }
.auth-card input:autofill { color-scheme:dark; }
.auth-card .password-input-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; }
.auth-card .password-visibility-button { min-width:60px; min-height:48px; padding:0 12px; border:1px solid #546e92; border-radius:6px; color:#8cdbff; background:#14263e; font-size:.875rem; font-weight:600; }
.auth-card .password-visibility-button:hover { border-color:#9ae6ff; background:#213b5b; }
.auth-card .auth-remember-email { display:flex; gap:10px; align-items:center; min-height:44px; cursor:pointer; }
.auth-card .auth-remember-email input { width:18px; min-width:18px; min-height:18px; height:18px; margin:0; padding:0; accent-color:#87d8ff; }
.auth-card .auth-remember-email span { display:grid; gap:3px; }
.auth-card .auth-remember-email strong { color:#e9f1ff; font-size:.8125rem; font-weight:600; }
.auth-card .auth-remember-email small { color:#afc5e9; font-size:.75rem; font-weight:400; }
.auth-card .primary-button { min-height:48px; padding:12px 16px; border:1px solid transparent; border-radius:6px; color:#061b37; background:#8cddff; box-shadow:none; font:700 1rem/1.4 Arial,Helvetica,sans-serif; text-align:left; transition:background-color .18s,box-shadow .18s; }
.auth-card .primary-button:hover { color:#061b37; background:#adebff; box-shadow:0 0 24px #76d4ff20; transform:none; }
.auth-card .primary-button:disabled { cursor:wait; opacity:.65; }
.auth-card .auth-secondary-actions { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 16px; }
.auth-card .text-button { min-height:44px; padding:8px 0; border:0; background:none; color:#8cc8ff; font-size:.875rem; font-weight:600; }
.auth-card .text-button:hover { color:#c3edff; text-decoration:underline; }
#password-mode-button { margin:0 0 20px; }
.auth-card .auth-message { margin-top:16px; padding:12px 0 0; color:#afc5e9; border:0; border-radius:6px; background:none; font-size:.8125rem; line-height:1.5; overflow-wrap:anywhere; }
.auth-card .auth-message.error { padding:12px; color:#ffd5d2; background:#3b202a; border:1px solid #87505b; }
.auth-card .auth-message.success { padding:12px; color:#c2f3e2; background:#113c3b; border:1px solid #427b74; }
.auth-card .code-sent-to { padding:12px; color:#bed6f5; background:#14263e; border:1px solid #546e92; border-radius:6px; font-size:.875rem; line-height:1.5; }
.auth-card .code-sent-to strong { display:block; color:#f1f7ff; overflow-wrap:anywhere; }
.auth-card .verification-code-input { min-height:54px; font-size:1.5rem; letter-spacing:.3em; text-align:center; padding-left:calc(13px + .3em); }
#reset-password-fields { display:grid; gap:18px; }
#reset-password-fields p { margin:0; color:#afc5e9; font-size:.8125rem; line-height:1.5; }
.auth-retry-button { width:100%; min-height:48px; margin-top:16px; padding:10px 14px; color:#d9edff; background:#1b3555; border:1px solid #6588b0; border-radius:6px; }
.auth-access-footer { margin-top:auto; padding-top:24px; color:#afc5e9; font-size:.75rem; }
.auth-access-footer p { margin:20px 0 0; padding-top:20px; border-top:1px solid #2f4460; }
.auth-gate button:focus-visible,.auth-gate a:focus-visible,.startup-screen button:focus-visible { outline:2px solid #9ae6ff; outline-offset:3px; }
/* Public/authenticated surface boundaries also protect expired-session dialogs. */
body[data-app-surface]:not([data-app-surface="app"]) .modal-backdrop,
body[data-app-surface]:not([data-app-surface="app"]) dialog,
body[data-app-surface]:not([data-app-surface="app"]) dialog::backdrop { display:none !important; }
@media screen and (max-width:960px) and (min-width:821px) {
  .auth-brand-panel { padding:30px; }
  .auth-access-panel { padding:54px 26px 30px; }
  .auth-brand-copy h2 { font-size:2.6rem; }
}
@media screen and (max-width:820px) {
  .auth-gate { padding:0; }
  .auth-stage { min-height:100dvh; grid-template-columns:1fr; grid-template-rows:auto 1fr; border:0; border-radius:0; box-shadow:none; }
  .auth-brand-panel { min-height:210px; padding:24px max(24px,calc((100% - 430px)/2)); }
  .auth-brand-copy { margin-top:24px; }
  .auth-brand-copy h2 { font-size:2rem; }
  .auth-brand-copy p { display:none; }
  #auth-prism-art { width:56%; height:320px; left:auto; right:-6%; bottom:-38%; }
  .auth-motion-toggle { left:auto; right:14px; bottom:8px; font-size:.75rem; min-height:44px; }
  .auth-access-panel { padding:30px max(24px,calc((100% - 430px)/2)) 28px; }
  .auth-access-meta { margin-bottom:20px; }
  .auth-card h1 { font-size:1.875rem; }
  .auth-card > p { margin-bottom:25px; }
  .auth-card form { gap:18px; }
  .auth-access-footer { padding-top:4px; }
}
@media screen and (max-width:360px) {
  .auth-brand-panel { padding:22px 20px; }
  .auth-access-panel { padding:28px 20px; }
  .auth-card .auth-secondary-actions { gap:4px 12px; }
  .auth-card .text-button { font-size:.8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .startup-spinner { animation:none !important; }
  .auth-stage,.auth-stage *,.auth-stage *::before,.auth-stage *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
