/* =============================================================================================================
   SIGN IN / CREATE ACCOUNT — a split card: one still picture on the left, the form on the right.
   Self-contained (the app's style.css is not loaded here). Everything is lg-prefixed.
   Animated parts are written so the END state is the plain style and the animation only supplies the "from"
   state; with reduced motion switched on, or no animation support, the finished picture simply shows.
   ============================================================================================================= */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/Montserrat.woff2) format("woff2"); }
:root {
  --lg-bg: #64617b;
  --lg-bg2: #55526b;
  --lg-card: #2b2737;
  --lg-field: #3a3648;
  --lg-field-hi: #433f54;
  --lg-text: #ffffff;
  --lg-muted: #a8a4b9;
  --lg-faint: #8a869c;
  --lg-line: rgba(255, 255, 255, 0.16);
  --lg-accent: #8a3fd1;
  --lg-accent-hi: #9b57e0;
  --lg-link: #a766ec;
  --lg-bad: #ff8fa3;
  --lg-good: #6ee7b7;
  --lg-font: "Montserrat", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
/* sizes are in rem: a laptop screen gets a slightly smaller page, a big one the full size */
@media (min-width: 1025px) { html { font-size: clamp(12.5px, min(calc(8.23px + 0.4045vw), calc(7.7px + 0.83vh)), 16px); } }
@media (min-width: 761px) and (max-width: 1024px) { html { font-size: 15px; } }
body.lg-body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--lg-text); font-family: var(--lg-font); font-size: 0.9375rem; line-height: 1.5;
  background: var(--lg-card);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; position: relative; overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }

/* ------------------------------------------------------------------ the page: the story fills the left half of the screen, the form the right half */
.lg-page { position: relative; min-height: 100vh; min-height: 100dvh; }
.lg-card { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--lg-card); }

/* ------------------------------------------------------------------ left: one still picture (nothing on it moves) */
.lg-art {
  position: sticky; top: 1rem; align-self: start; margin: 1rem 0 1rem 1rem; height: calc(100vh - 2rem); height: calc(100dvh - 2rem); min-height: 38.75rem; border-radius: 2rem; isolation: isolate; overflow: hidden; color: #fff;
  container-type: size;
  background: #120c1f; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 1.875rem 3.75rem -1.875rem rgba(10, 4, 30, 0.8);
}
.lg-glow { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(62cqw 48cqh at 80% 84%, rgba(138, 63, 209, 0.78), transparent 72%),
  radial-gradient(46cqw 36cqh at 4% 100%, rgba(255, 134, 176, 0.36), transparent 72%),
  radial-gradient(52cqw 34cqh at 100% 0%, rgba(74, 82, 214, 0.5), transparent 72%),
  radial-gradient(40cqw 30cqh at 0% 0%, rgba(138, 63, 209, 0.22), transparent 72%); }
.lg-grid { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 11cqw 11cqw; background-position: 6cqw 3cqw;
  -webkit-mask-image: radial-gradient(75% 62% at 66% 58%, #000 10%, transparent 78%); mask-image: radial-gradient(75% 62% at 66% 58%, #000 10%, transparent 78%); }
.lg-knot { position: absolute; z-index: 1; width: min(104cqw, 64cqh); right: -13cqw; bottom: -9cqh; pointer-events: none; }
.lg-knot img { display: block; width: 100%; height: auto; filter: drop-shadow(0 4cqh 5cqh rgba(8, 2, 34, 0.55)); }
.lg-grain { position: absolute; inset: 0; z-index: 3; opacity: 0.2; mix-blend-mode: overlay; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.lg-art-brand { position: absolute; z-index: 5; top: 1.875rem; left: 2.125rem; display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; border-radius: 0.75rem; transition: opacity 0.25s ease; }
.lg-art-brand:hover { opacity: 0.88; }
.lg-art-brand:focus-visible, .lg-mbrand:focus-visible { outline: 2px solid #fff; outline-offset: 0.25rem; }
.lg-art-brand img { width: auto; height: 2.5rem; }

.lg-copy { position: absolute; z-index: 4; left: 2.125rem; right: 2.125rem; top: clamp(6.5rem, 18cqh, 11.875rem); max-width: 31rem; }
.lg-eyebrow { display: inline-block; margin-bottom: 1.125rem; padding: 0.375rem 0.875rem; border-radius: 62.4375rem; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(0.625rem); backdrop-filter: blur(0.625rem); font-size: 0.7188rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #ead7ff; }
.lg-copy h2 { font-size: clamp(1.875rem, 7.4cqw, 3.125rem); line-height: 1.06; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; }
.lg-copy h2 em { font-style: normal; background: linear-gradient(100deg, #d9b8ff 10%, #ff9cc2 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-copy p { margin-top: 1rem; max-width: 29rem; font-size: 0.9375rem; line-height: 1.65; color: rgba(255, 255, 255, 0.68); }

.lg-chips { position: absolute; z-index: 4; left: 2.125rem; bottom: 2.125rem; display: grid; gap: 0.5625rem; margin: 0; padding: 0; list-style: none; }
.lg-chips li { display: flex; align-items: center; gap: 0.625rem; width: max-content; padding: 0.5625rem 1rem 0.5625rem 0.625rem; border-radius: 62.4375rem; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(0.75rem); backdrop-filter: blur(0.75rem); font-size: 0.8125rem; font-weight: 700; color: rgba(255, 255, 255, 0.92); }
.lg-chips svg { flex: none; box-sizing: content-box; width: 0.875rem; height: 0.875rem; padding: 0.25rem; border-radius: 50%; background: var(--lg-accent); color: #fff; }
@container (max-height: 720px) { .lg-copy p { display: none; } .lg-chips li:nth-child(n+3) { display: none; } }
@container (max-height: 640px) { .lg-chips { display: none; } }
@container (max-width: 520px) { .lg-copy, .lg-chips, .lg-art-brand { left: 26px; } .lg-copy { right: 26px; } .lg-copy p { font-size: 14px; } }
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ right: the form */
.lg-form { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 3rem clamp(1.75rem, 6vw, 6.875rem); min-width: 0; background: radial-gradient(56.25rem 37.5rem at 80% 0%, rgba(138, 63, 209, 0.10), transparent 60%), var(--lg-card); }
.lg-inner { width: 100%; max-width: 27.5rem; container-type: inline-size; }
/* the sign-up heading always sits on one line: it shrinks with the width of the form instead of wrapping */
.lg-form h1.lg-fit { white-space: nowrap; font-size: min(2.5rem, 7.2cqw); }
.lg-mbrand { display: none; }
.lg-skel { height: 22.5rem; border-radius: 1rem; background: linear-gradient(90deg, var(--lg-field) 0%, var(--lg-field-hi) 50%, var(--lg-field) 100%) 0 0 / 200% 100%; animation: lg-shimmer 1.4s linear infinite; opacity: 0.5; }
@keyframes lg-shimmer { to { background-position: -200% 0; } }
/* The page opens with a fade and nothing moves. A sheet in the page's own colour covers it for a moment and fades away (one flat layer: only opacity changes, so the
   computer's graphics chip does it without redrawing anything and it stays smooth on slow machines); the form's parts then fade in one after the other. Leaving is the same
   in reverse (login.js puts the sheet back before it goes to the next page). */
#lgVeil { position: fixed; inset: 0; z-index: 99; background: #2b2737; pointer-events: none; will-change: opacity; animation: lg-veil 0.5s ease-out 0.04s both; }
@keyframes lg-veil { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
#authView > * { animation: lg-fadein 0.45s ease-out both; }
#authView > *:nth-child(2) { animation-delay: 0.06s; }
#authView > *:nth-child(n+3) { animation-delay: 0.12s; }
.lg-foot { animation: lg-fadein 0.45s ease-out 0.18s both; }
@keyframes lg-fadein { from { opacity: 0; } }

.lg-form h1 { font-size: 2.5rem; line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; }
.lg-sub { margin-top: 0.625rem; font-size: 1rem; color: #7f7b92; font-weight: 500; }
.lg-sub b { color: #cfcbdc; font-weight: 600; }
.lg-link { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.1875rem; text-decoration-thickness: 1px; transition: color 0.15s; }
.lg-sub .lg-link { color: #9b97ad; }
.lg-link:hover { color: #fff; }
.lg-link.accent { color: var(--lg-link); text-decoration: underline; }
.lg-link.accent:hover { color: #c295ff; }
.lg-link:focus-visible, .lg-btn:focus-visible, .lg-alt button:focus-visible, .lg-eye:focus-visible { outline: 2px solid #c295ff; outline-offset: 2px; border-radius: 0.375rem; }

#f { margin-top: 1.875rem; display: grid; gap: 0.875rem; }
.lg-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.lg-in { position: relative; }
.lg-in input[type=text], .lg-in input[type=email], .lg-in input[type=password], .lg-in input[type=search] {
  width: 100%; height: 3.125rem; padding: 0 1rem; border-radius: 0.625rem; border: 1px solid transparent; background: var(--lg-field); color: #fff; font-size: 0.9375rem; font-weight: 500; outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s; -webkit-appearance: none; appearance: none;
}
.lg-in input::placeholder { color: #a39fb4; font-weight: 500; }
.lg-in input:hover { background: var(--lg-field-hi); }
.lg-in input:focus { border-color: rgba(255, 255, 255, 0.85); background: var(--lg-field-hi); box-shadow: 0 0 0 0.25rem rgba(167, 102, 236, 0.18); }
.lg-in input:disabled { opacity: 0.6; cursor: not-allowed; }
.lg-in input[type=password] { padding-right: 3rem; }
.lg-in input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 2.5rem var(--lg-field-hi) inset; caret-color: #fff; }
.lg-eye { position: absolute; right: 0.375rem; top: 50%; transform: translateY(-50%); width: 2.375rem; height: 2.375rem; display: grid; place-items: center; border: 0; background: none; color: #a39fb4; cursor: pointer; border-radius: 0.5rem; transition: color 0.15s; }
.lg-eye:hover { color: #fff; }
.lg-aux { display: flex; justify-content: flex-end; margin-top: -0.25rem; font-size: 0.8438rem; }
.lg-aux .lg-link { color: #a39fb4; }
.lg-aux .lg-link:hover { color: #fff; }
.lg-hint { font-size: 0.7813rem; line-height: 1.5; color: var(--lg-faint); margin-top: -0.25rem; }
.lg-center { text-align: center; margin: 1.125rem 0 0; font-size: 0.8438rem; }
.lg-check { display: flex; align-items: center; gap: 0.6875rem; font-size: 0.875rem; color: #e4e1ee; cursor: pointer; user-select: none; }
.lg-check input { appearance: none; -webkit-appearance: none; width: 1.1875rem; height: 1.1875rem; margin: 0; flex: none; border-radius: 0.3125rem; border: 1.5px solid #cfcbdc; background: transparent; display: grid; place-items: center; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.lg-check input:checked { background: var(--lg-accent); border-color: var(--lg-accent); }
.lg-check input:checked::after { content: ""; width: 0.5625rem; height: 0.3125rem; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.lg-check input:focus-visible { outline: 2px solid #c295ff; outline-offset: 2px; }

.lg-btn { width: 100%; height: 3.25rem; margin-top: 0.5rem; border: 0; border-radius: 0.625rem; cursor: pointer; font-size: 0.9688rem; font-weight: 700; letter-spacing: 0.005em; color: #fff;
  background: linear-gradient(180deg, var(--lg-accent-hi), var(--lg-accent)); box-shadow: 0 0.875rem 1.75rem -0.875rem rgba(138, 63, 209, 0.95), 0 1px 0 rgba(255, 255, 255, 0.22) inset; transition: transform 0.15s, filter 0.15s, box-shadow 0.15s; }
.lg-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.lg-btn:active { transform: translateY(0); filter: brightness(0.96); }
.lg-btn:disabled { opacity: 0.65; cursor: progress; transform: none; }

.lg-or { display: flex; align-items: center; gap: 1rem; margin: 1.625rem 0 1.125rem; color: #a39fb4; font-size: 0.875rem; }
.lg-or::before, .lg-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.2); }
.lg-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.lg-alt button { height: 3rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem; border-radius: 0.625rem; border: 1px solid rgba(255, 255, 255, 0.34); background: transparent; color: #f0eef7; font-size: 0.9063rem; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s; white-space: nowrap; }
.lg-alt button:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.lg-alt svg { flex: none; }

.lg-msg { margin-top: 1.25rem; padding: 0.6875rem 0.875rem; border-radius: 0.625rem; font-size: 0.8438rem; line-height: 1.5; border: 1px solid; }
.lg-msg.bad { color: var(--lg-bad); border-color: rgba(255, 143, 163, 0.4); background: rgba(255, 143, 163, 0.1); }
.lg-msg.good { color: var(--lg-good); border-color: rgba(110, 231, 183, 0.4); background: rgba(110, 231, 183, 0.1); }
#msg:empty { display: none; }
#msg + #f, .lg-msg + #f { margin-top: 1.125rem; }
.lg-note { margin-top: 1rem; padding: 0.75rem 0.875rem; border-radius: 0.625rem; font-size: 0.8125rem; line-height: 1.6; color: #c9c5d8; border: 1px dashed rgba(255, 255, 255, 0.26); }
.lg-note[hidden] { display: none; }
.lg-note code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.75rem; padding: 1px 0.375rem; border-radius: 0.375rem; background: rgba(255, 255, 255, 0.1); word-break: break-all; }
.lg-terms { margin-top: -0.25rem; }
.lg-foot { font-size: 0.7813rem; color: rgba(255, 255, 255, 0.62); text-align: center; margin: 0 0.5rem; }

.lg-foot { font-size: 0.7813rem; color: rgba(255, 255, 255, 0.45); text-align: center; margin: 2.25rem 0.5rem 0; }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 1100px) {
  .lg-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lg-form { padding: 2.5rem 2.25rem; }
}
@media (max-width: 880px) {
  .lg-card { grid-template-columns: 1fr; }
  .lg-art { display: none; }
  .lg-form { padding: 2.125rem 1.625rem 2.5rem; align-items: flex-start; }
  .lg-inner { max-width: 28.75rem; margin: 0 auto; }
  .lg-mbrand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.75rem; color: inherit; text-decoration: none; }
  .lg-mbrand img { width: auto; height: 2.125rem; }
  .lg-mbrand b { display: block; font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
  .lg-mbrand b span { opacity: 0.7; font-weight: 600; }
  .lg-mbrand small { display: block; font-size: 0.7813rem; color: var(--lg-muted); line-height: 1.35; margin-top: 2px; }
  .lg-form h1 { font-size: 1.9375rem; }
  .lg-sub { font-size: 0.9375rem; }
}
@media (max-width: 420px) {
  .lg-form { padding: 1.625rem 1.125rem 2.125rem; }
  .lg-form h1 { font-size: 1.75rem; }
  .lg-row2 { grid-template-columns: 1fr; }
  .lg-alt { grid-template-columns: 1fr; gap: 0.625rem; }
  .lg-in input[type=text], .lg-in input[type=email], .lg-in input[type=password] { font-size: 1rem; }
  .lg-or { margin: 1.375rem 0 1rem; }
}
@media (max-height: 640px) and (min-width: 881px) { .lg-form { align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) {
  #authView > *, .lg-foot, #lgVeil { animation: none !important; }
  #lgVeil { display: none; }
  .lg-art *, .lg-art *::before, .lg-art *::after { animation: none !important; transition: none !important; }
}

/* leaving: the same sheet fades back in (see login.js); no page-to-page slide */
#lgVeilOut { position: fixed; inset: 0; z-index: 100; background: #2b2737; opacity: 0; pointer-events: none; will-change: opacity; }

/* the logo comes in a light-page and a dark-page version; this page is dark */
.nu-logo { display: block; }
.nu-logo.on-light { display: none; }
:root[data-theme="dark"] .nu-logo.on-dark { display: block; }
/* very large screens (2560 wide and up): the whole page grows with the screen, so nothing looks small; 1920 x 1080 and below are untouched */
@media (min-width: 1921px) { html { font-size: clamp(16px, min(0.8333vw, 1.48vh), 32px); } }
