/* Sign-in screen: product showcase (left) and the sign-in / create account / reset card (right).
   Light and dark follow the app theme (html[data-theme]). */
#auth-screen { position: fixed; inset: 0; z-index: 70; display: flex; overflow: auto; background: #f8fafc; color: #0f172a; font-family: var(--font); }
:root[data-theme="dark"] #auth-screen { background: #070b14; color: #f1f5f9; }
#auth-screen * { box-sizing: border-box; }
#auth-screen svg.i { width: 16px; height: 16px; flex: none; }

/* ---------- left: showcase ---------- */
.au-show { position: relative; width: 55%; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 48px 56px; color: #fff; overflow: hidden; border-right: 1px solid rgba(30, 41, 59, .8);
  background: linear-gradient(135deg, #0b1120 0%, #0f172a 50%, #091322 100%); }
.au-grid, .au-grid2 { position: absolute; inset: 0; pointer-events: none; }
.au-grid { background-size: 32px 32px; background-image: linear-gradient(to right, rgba(148, 163, 184, .06) 1px, transparent 1px), linear-gradient(to bottom, rgba(148, 163, 184, .06) 1px, transparent 1px); }
.au-grid2 { background-size: 128px 128px; background-image: linear-gradient(to right, rgba(16, 185, 129, .07) 1px, transparent 1px), linear-gradient(to bottom, rgba(16, 185, 129, .07) 1px, transparent 1px); }
.au-glow1, .au-glow2 { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.au-glow1 { top: -128px; left: -128px; width: 384px; height: 384px; background: rgba(16, 185, 129, .15); }
.au-glow2 { bottom: 0; right: 0; width: 448px; height: 448px; background: rgba(244, 63, 94, .10); }
.au-show > *:not(.au-grid):not(.au-grid2):not(.au-glow1):not(.au-glow2) { position: relative; z-index: 1; }
.au-brand { display: flex; align-items: center; gap: 14px; }
.au-mark { width: 40px; height: 40px; border-radius: 12px; padding: 1px; background: linear-gradient(135deg, #15803d, #10b981); box-shadow: 0 10px 15px -3px rgba(2, 44, 34, .5); }
.au-mark > div { width: 100%; height: 100%; border-radius: 11px; background: rgba(11, 17, 32, .3); display: flex; align-items: center; justify-content: center; }
.au-mark svg { width: 24px; height: 24px; color: #fff; }
.au-brand b { font-size: 18px; letter-spacing: -.01em; }
.au-brand small { display: block; font-size: 12px; color: #94a3b8; font-weight: 500; }
.au-tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: rgba(16, 185, 129, .15); color: #34d399; border: 1px solid rgba(16, 185, 129, .3); margin-left: 8px; vertical-align: 2px; }
.au-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 99px; background: rgba(30, 41, 59, .8); border: 1px solid rgba(51, 65, 85, .8); font-size: 12px; font-weight: 500; color: #34d399; margin-bottom: 16px; }
.au-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: au-pulse 2s ease-in-out infinite; }
@keyframes au-pulse { 50% { opacity: .4; } }
.au-show h1 { font-size: 36px; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; margin: 0; max-width: 600px; text-wrap: balance; }
.au-show h1 .g { background: linear-gradient(90deg, #34d399, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.au-show h1 .s { color: #cbd5e1; }
.au-lead { margin: 12px 0 24px; font-size: 15px; line-height: 1.6; color: #94a3b8; max-width: 600px; }
.au-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.au-pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid #1e293b; background: rgba(15, 23, 42, .7); color: #94a3b8; transition: all .2s; font-family: inherit; }
.au-pill:hover { color: #e2e8f0; border-color: #334155; filter: none; }
.au-pill.on { background: rgba(16, 185, 129, .15); color: #6ee7b7; border-color: rgba(16, 185, 129, .4); font-weight: 600; }
.au-pill svg { width: 14px; height: 14px; }
/* the active chapter of the demo shows how far it has played */
.au-pill { position: relative; overflow: hidden; }
.au-pill.on::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #34d399; transform-origin: left; transform: scaleX(var(--p, 0)); }
.au-foot { padding-top: 16px; border-top: 1px solid rgba(30, 41, 59, .7); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; font-size: 11px; color: #94a3b8; }
.au-foot b { display: block; font-family: var(--mono); font-size: 14px; color: #fff; }
.au-foot b.g { color: #34d399; }
.au-foot .sep { width: 1px; height: 28px; background: #1e293b; }

/* ---------- right: the card ---------- */
.au-side { width: 45%; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 64px; }
.au-top { display: flex; justify-content: flex-end; }
.au-theme { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; color: #475569; font-size: 12px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); font-family: inherit; }
.au-theme:hover { border-color: rgba(16, 185, 129, .5); filter: none; }
:root[data-theme="dark"] .au-theme { background: #0f172a; border-color: #1e293b; color: #cbd5e1; }
.au-wrap { width: 100%; max-width: 440px; margin: 32px auto; }
.au-card { background: #fff; border: 1px solid rgba(226, 232, 240, .9); border-radius: 16px; padding: 32px;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, .08), 0 4px 16px -4px rgba(15, 23, 42, .04); }
:root[data-theme="dark"] .au-card { background: #0f172a; border-color: rgba(30, 41, 59, .9); box-shadow: 0 25px 60px -15px rgba(0, 0, 0, .65); }
.au-cbrand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.au-cbrand .b { width: 36px; height: 36px; border-radius: 12px; background: #15803d; color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.au-cbrand h2 { margin: 0; font-size: 14px; font-weight: 700; color: #15803d; line-height: 1.25; }
.au-cbrand p { margin: 0; font-size: 12px; color: #64748b; }
:root[data-theme="dark"] .au-cbrand h2 { color: #34d399; }
:root[data-theme="dark"] .au-cbrand p { color: #94a3b8; }
.au-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: #f1f5f9; border: 1px solid rgba(226, 232, 240, .7); margin-bottom: 24px; }
:root[data-theme="dark"] .au-tabs { background: #0f172a; border-color: #1e293b; }
.au-tabs button { padding: 8px; font-size: 12px; font-weight: 500; border-radius: 8px; border: 0; background: transparent; color: #64748b; cursor: pointer; font-family: inherit; }
.au-tabs button:hover { color: #1e293b; filter: none; }
.au-tabs button.on { background: #fff; color: #0f172a; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
:root[data-theme="dark"] .au-tabs button { color: #94a3b8; }
:root[data-theme="dark"] .au-tabs button:hover { color: #e2e8f0; }
:root[data-theme="dark"] .au-tabs button.on { background: #1e293b; color: #fff; }
#auth-form h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: #0f172a; }
:root[data-theme="dark"] #auth-form h3 { color: #fff; }
#auth-form .au-sub { margin: 4px 0 16px; font-size: 12px; color: #64748b; }
:root[data-theme="dark"] #auth-form .au-sub { color: #94a3b8; }
#auth-form label.au-l { display: block; margin-top: 14px; font-size: 12px; font-weight: 600; color: #334155; }
:root[data-theme="dark"] #auth-form label.au-l { color: #cbd5e1; }
.au-lrow { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.au-lrow label.au-l { margin-top: 0 !important; }
.au-field { position: relative; margin-top: 6px; }
.au-field .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; display: flex; }
#auth-form .au-field input { width: 100%; height: auto; padding: 10px 14px 10px 40px; font-size: 14px; border-radius: 12px; background: rgba(248, 250, 252, .7);
  border: 1px solid #cbd5e1; color: #0f172a; font-family: inherit; transition: all .15s; margin: 0; }
#auth-form .au-field input.np { padding-left: 14px; }
#auth-form .au-field input.pw { padding-right: 40px; }
#auth-form .au-field input::placeholder { color: #94a3b8; }
#auth-form .au-field input:focus { outline: none; background: #fff; border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .2); }
:root[data-theme="dark"] #auth-form .au-field input { background: rgba(15, 23, 42, .9); border-color: #334155; color: #fff; }
:root[data-theme="dark"] #auth-form .au-field input:focus { background: #0f172a; }
.au-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 2px; color: #94a3b8; cursor: pointer; display: flex; }
.au-eye:hover { color: #475569; filter: none; background: none; }
.au-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 500; color: #15803d; cursor: pointer; text-decoration: none; }
.au-link:hover { text-decoration: underline; filter: none; background: none; }
:root[data-theme="dark"] .au-link { color: #34d399; }
.au-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 500; color: #64748b; cursor: pointer; }
.au-back:hover { color: #1e293b; filter: none; background: none; }
:root[data-theme="dark"] .au-back:hover { color: #fff; }
#auth-form button.au-go { width: 100%; margin-top: 20px; padding: 12px 16px; border-radius: 12px; border: 0; background: #15803d; color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 4px 6px -1px rgba(6, 78, 59, .15); transition: all .15s; font-family: inherit; }
#auth-form button.au-go:hover { background: #166534; filter: none; }
#auth-form button.au-go:active { transform: scale(.99); }
#auth-form button.au-go:disabled { opacity: .6; cursor: default; }
.au-msg { display: none; margin-bottom: 20px; padding: 14px; border-radius: 12px; border: 1px solid; font-size: 12px; font-weight: 500; align-items: flex-start; gap: 10px; }
.au-msg.on { display: flex; }
.au-msg.ok { background: #ecfdf5; border-color: #a7f3d0; color: #064e3b; }
.au-msg.err { background: #fff1f2; border-color: #fecdd3; color: #881337; }
:root[data-theme="dark"] .au-msg.ok { background: rgba(2, 44, 34, .6); border-color: #065f46; color: #a7f3d0; }
:root[data-theme="dark"] .au-msg.err { background: rgba(76, 5, 25, .5); border-color: #9f1239; color: #fecdd3; }
.au-msg p { margin: 0; flex: 1; }
.au-msg button { background: none; border: 0; padding: 0; color: inherit; opacity: .6; cursor: pointer; display: flex; }
.au-msg button:hover { opacity: 1; filter: none; background: none; }
.au-small { margin: 12px 0 0; font-size: 11px; text-align: center; color: #64748b; }
:root[data-theme="dark"] .au-small { color: #94a3b8; }
.au-badges { margin-top: 24px; text-align: center; font-family: var(--mono); font-size: 11px; color: #64748b; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; align-items: center; }
.au-badges span { display: inline-flex; align-items: center; gap: 4px; }
.au-badges svg { width: 14px; height: 14px; color: #059669; }
:root[data-theme="dark"] .au-badges { color: #94a3b8; }
:root[data-theme="dark"] .au-badges svg { color: #34d399; }
.au-bottom { font-size: 11px; color: #94a3b8; padding-top: 8px; }

/* ---------- narrower screens: the form first, the showcase below ---------- */
@media (max-width: 1100px) {
  .au-show { padding: 40px; }
  .au-side { padding: 24px 32px; }
  .au-show h1 { font-size: 30px; }
}
@media (max-width: 1023px) {
  #auth-screen { flex-direction: column; }
  .au-show, .au-side { width: 100%; min-height: 0; flex-shrink: 0; min-width: 0; max-width: 100vw; }
  .au-show { overflow: hidden; }
  .au-top { justify-content: flex-end; }
  .au-side { order: -1; }
  .au-show { border-right: 0; border-top: 1px solid rgba(30, 41, 59, .8); padding: 32px 24px; }
}
@media (max-width: 560px) {
  .au-card { padding: 24px 20px; }
  .au-wrap { margin: 16px auto; }
  .au-pill { padding: 7px 10px; }
  .au-side { padding: 16px; }
  .au-show h1 { font-size: 24px; }
  .au-foot .sep, .au-foot .wide { display: none; }
}

/* ---------- side by side: the demo player takes the height that is left, so all of it (picture, caption,
   controls) is on screen; on a short window the text above it gets tighter. If even that does not fit, the page
   scrolls: the showcase grows with its content instead of cutting the player off. ---------- */
@media (min-width: 1024px) {
  #auth-screen { align-items: flex-start; }
  .au-mid { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .au-kicker { align-self: flex-start; }
  .au-demo { flex: 1 1 0; min-height: 320px; container-type: size; }
  /* 104px: the caption (two lines) and the control bar under the picture. The picture takes the height left for it
     and the column's width, a little wider than 16:9 at most (2.1 : 1), so it lines up with the text around it. */
  .au-demo .dm-player { width: min(100%, calc((100cqh - 104px) * 2.1)); }
  .au-demo .dm-screen { aspect-ratio: auto; height: min(calc(100cqw * 9 / 16), calc(100cqh - 104px)); }
  .au-demo .dm-player.dm-full .dm-screen { height: auto; aspect-ratio: 16 / 9; }
  /* a size container holds fixed-position children: let go of the player when it goes full screen */
  .au-demo:has(.dm-full) { container-type: normal; }
  .au-demo .dm-player.dm-full { width: auto; }
}
/* The demo is a 768 x 432 app screen drawn to scale: below about 1.15x its small text gets hard to read. So on
   ordinary laptop heights the video comes first: the headline goes on one line and the badge and paragraph above
   the video make way; the footer figures go too when the window is short. */
@media (min-width: 1024px) {
  .au-show { padding-left: 40px; padding-right: 40px; }
}
/* on laptop widths the demo side takes 60%: the sign-in card still has its full 440px */
@media (min-width: 1200px) and (max-width: 1600px) {
  .au-show { width: 60%; }
  .au-side { width: 40%; padding-left: 28px; padding-right: 28px; }
}
@media (min-width: 1024px) and (max-height: 1150px) {
  .au-show { padding-top: 24px; padding-bottom: 22px; gap: 16px; }
  .au-show h1 { font-size: 30px; max-width: none; }
  .au-kicker, .au-lead { display: none; }
  .au-pills { margin: 14px 0 12px; }
  .au-foot { padding-top: 12px; }
}
@media (min-width: 1024px) and (max-height: 860px) {
  .au-show { padding-top: 18px; padding-bottom: 16px; gap: 12px; }
  .au-show h1 { font-size: 26px; }
  .au-foot { display: none; }
  .au-pills { margin: 10px 0 10px; }
}

/* the app's older sign-in form and button styles (msp.css, styles.css) must not show through */
#auth-screen #auth-form { border-radius: 0; padding: 0; box-shadow: none; background: none; border: 0; margin: 0; }
#auth-screen #auth-form .au-eye, #auth-screen #auth-form .au-link, #auth-screen #auth-form .au-back { background: none; border: 0; box-shadow: none; font-weight: 500; }
#auth-screen #auth-form .au-link, #auth-screen #auth-form .au-back { padding: 0; }
#auth-screen #auth-form .au-eye { padding: 2px; }
#auth-screen #auth-form .au-link { color: #15803d; }
:root[data-theme="dark"] #auth-screen #auth-form .au-link { color: #34d399; }
#auth-screen #auth-form .au-back { color: #64748b; }
#auth-screen #auth-form .au-eye { color: #94a3b8; }
