/* Form Four sign-in: a floating trading terminal on a pale sky. The form is an ordinary dark card until the scene
   mounts; then its input and button sit over the ones drawn on the monitor (login-scene.mjs places them). */
@font-face { font-family: "Geist"; src: url("/insiders-assets/fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/insiders-assets/fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/insiders-assets/fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/insiders-assets/fonts/geist-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: linear-gradient(180deg, #dfe7ef 0%, #f1f4f8 55%, #ffffff 100%); font: 16px/1.5 "Geist", system-ui, sans-serif; color: #18191b; -webkit-font-smoothing: antialiased; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gate { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; }
#login-scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.gate-form { position: relative; width: min(460px, 100%); padding: 30px; border-radius: 26px; background: #1d2025; color: #fff; box-shadow: 0 30px 80px rgba(40, 50, 70, .25); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .tile { width: 34px; height: 34px; border-radius: 9px; background: #fff; color: #18191b; display: grid; place-items: center; font-weight: 700; font-size: 22px; line-height: 1; }
.brand .tile-img { width: 34px; height: 34px; display: block; flex: none; border-radius: 25%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.brand .word { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.row { margin-top: 26px; display: flex; gap: 10px; }
#password { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; background: #26292f; color: #fff; font: inherit; outline: none; }
#password::placeholder { color: rgba(255, 255, 255, .5); }
#password:focus { border-color: rgba(255, 255, 255, .7); }
.submit { height: 52px; padding: 0 24px; border: 0; border-radius: 100px; background: #fff; color: #18191b; font: 500 16px "Geist", system-ui, sans-serif; cursor: pointer; transition: transform .12s ease; }
.submit:active { transform: scale(.95); }
.error { min-height: 1.5em; margin: 12px 0 0; color: #ff9b80; font-size: 14px; }
/* scene on, wide screens: the card dissolves into the monitor */
.scene-overlay .gate-form { position: static; width: auto; padding: 0; background: none; box-shadow: none; }
.scene-overlay .brand { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the drawn error is on the monitor; the real one also sits below it, large enough to read */
.scene-overlay .error { position: fixed; left: 50%; top: calc(28px + env(safe-area-inset-top)); transform: translateX(-50%); margin: 0; min-height: 0; padding: 12px 20px; border-radius: 100px; background: #1d2025; color: #ffb39e; font-size: 15px; font-weight: 500; box-shadow: 0 16px 40px rgba(40, 50, 70, .2); white-space: nowrap; }
.scene-overlay .error:empty { display: none; }
.scene-overlay .row { margin: 0; }
.scene-overlay #password, .scene-overlay .submit { position: fixed; left: 0; top: 0; transform-origin: 0 0; margin: 0; border: 0; border-radius: 30px; background: transparent; outline: none; -webkit-tap-highlight-color: transparent; }
.scene-overlay #password { width: 820px; height: 108px; padding: 0 48px; font: 400 54px/1 "Geist", system-ui, sans-serif; color: #fff; caret-color: #fff; letter-spacing: .12em; }
.scene-overlay #password::placeholder { color: rgba(255, 255, 255, .5); letter-spacing: 0; font-size: 36px; }
.scene-overlay #password:-webkit-autofill { -webkit-box-shadow: 0 0 0 200px #23262b inset; -webkit-text-fill-color: #fff; caret-color: #fff; }
.scene-overlay .submit { width: 276px; height: 108px; padding: 0; color: transparent; border-radius: 54px; transition: none; }
.scene-overlay .submit:active { transform: none; }
.scene-overlay .submit:focus-visible { box-shadow: 0 0 0 6px rgba(255, 255, 255, .85); }
/* scene on, phones: the terminal floats above and the card sits at the bottom */
.scene-phone .gate { place-items: end center; padding: 0 14px calc(22px + env(safe-area-inset-bottom)); }
.scene-phone .gate-form { width: 100%; max-width: 460px; min-width: 0; padding: 20px; }
.scene-phone .brand { display: none; }
.scene-phone .row { margin-top: 0; }
.scene-phone .error:empty { display: none; }
/* the card rises above a phone's keyboard (login-scene.mjs sets the lift) */
.scene-phone .gate-form { transition: transform .2s ease; }
@media (prefers-reduced-motion: reduce) { .scene-phone .gate-form { transition: none; } }
