* { box-sizing: border-box; }
body { margin: 0; background: #050605; color: #f4f1e9; font-family: Inter, system-ui, sans-serif; }
:root { --entry-header-height: 56px; }
.entry-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: var(--entry-header-height);
  padding-inline: clamp(14px, 2vw, 24px);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  background: #000;
}
.entry-header .admin-wordmark {
  grid-area: 1 / 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d4af37;
  font: 750 14px Inter, system-ui, sans-serif;
  letter-spacing: 1px;
  white-space: nowrap;
}
.entry-header .admin-wordmark > span {
  background: linear-gradient(135deg, #d4af37, #f59e0b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.entry-header .qcuebit-logo { width: 35px; height: 35px; overflow: visible; flex-shrink: 0; }
.entry-header .eye-glow { fill: #00d4ff; filter: drop-shadow(0 0 1.5px #00d4ff); }
.entry-header > [data-qcuebit-window-controls] { grid-area: 1 / 3; justify-self: end; }
@media (prefers-reduced-motion: no-preference) {
  .entry-header .eye-glow { animation: entry-eye 4s ease-in-out infinite; }
  @keyframes entry-eye {
    0%, 100% { fill: #00d4ff; opacity: .8; }
    50% { fill: #e2fbff; opacity: 1; }
  }
}
@media (min-width: 761px) and (max-width: 1023px) {
  .entry-header .qcuebit-logo { width: 41px; height: 41px; }
}
@media (max-width: 760px) {
  .entry-header .admin-wordmark { font-size: 12px; gap: 8px; }
}
main { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); min-height: calc(100vh - var(--entry-header-height)); min-height: calc(100svh - var(--entry-header-height)); }
section { display: grid; place-items: center; padding: 46px 24px; }
.register { background: #060605; border-right: 1px solid #292822; }
.login { background: #0a0c0b; }
.desktop-login { grid-template-columns: 1fr; }
.public-entry > section {
  align-content: start;
  padding: clamp(3rem, 12svh, 9rem) clamp(1.5rem, 5vw, 7rem) clamp(2rem, 6svh, 4rem);
}
.public-entry .content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: left;
}
.public-entry :is(h1, h2) { font-size: clamp(3rem, 5.45vw, 7.5rem); }
.public-entry :is(h1, h2) em { display: block; }
.public-entry .entry-message, .desktop-downloads h3 {
  margin: 0;
  color: #d6d4cc;
  font: 500 clamp(1.05rem, 1.35vw, 1.55rem)/1.45 Inter, system-ui, sans-serif;
  letter-spacing: -.02em;
}
.public-entry .entry-message, .desktop-downloads { margin-top: clamp(1.6rem, 5svh, 3.5rem); }
.public-entry .entry-message { min-height: 0; }
.public-entry .signup-subtitle {
  margin: .55rem 0 0;
  min-height: 0;
  color: #d4b572;
  font: italic 400 clamp(1.15rem, 1.8vw, 2rem)/1.3 Georgia, serif;
}
.desktop-downloads { width: 100%; }
.desktop-downloads h3 { margin-bottom: 1rem; }
.desktop-downloads .platform-download, .mac-downloads { min-height: clamp(50px, 6.6svh, 68px); display: flex; align-items: center; gap: .7rem; padding: 6px 4px; border-top: 1px solid #302e28; color: #e0dfd8; font-size: .93rem; text-decoration: none; }
.desktop-downloads small, .mac-downloads a { font-size: .79rem; color: #c4baa7; }
.desktop-downloads small, .mac-downloads a:first-of-type { margin-left: auto; }
.mac-downloads { border-bottom: 1px solid #302e28; }
.mac-downloads a { padding: .45rem .5rem; text-underline-offset: .2em; }
.desktop-downloads .platform-logo { width: 25px; height: 25px; flex: 0 0 25px; fill: currentColor; }
.desktop-downloads .logo-windows { color: #69b8ea; }
.desktop-downloads .logo-linux { color: #e6d4a6; }
.desktop-downloads .logo-apple { color: #dfdfdd; }
.desktop-downloads a svg:not(.platform-logo) { color: #baae8f; }
.desktop-downloads a:hover { color: #f7d795; background: #13120f; }
.public-entry .action { min-height: 48px; margin-top: 1.6rem; padding: .65rem 1.2rem; border-radius: .6rem; }
.register .join-action { background: #e0c58d; color: #19150f; }
.login .web-login-action { background: #aac4b7; color: #101914; }
.guest-chart-entry + .desktop-downloads { margin-top: clamp(1.25rem, 3svh, 2rem); }
.content { width: 100%; display: grid; justify-items: center; text-align: center; }
h1,h2 { font-size: clamp(2.35rem,4.8vw,5rem); line-height: 1.05; font-weight: 500; letter-spacing: -.065em; margin: 0; }
em { font-family: Georgia, serif; font-weight: 400; color: #d4b572; }
.login em { color: #a6bdb2; }
p { color: #b3b3ab; line-height: 1.5; margin: 14px 0 30px; max-width: 34ch; min-height: 3em; }
strong { color: #eceae4; font-weight: 500; }
.qr { width: clamp(174px,18vw,232px); aspect-ratio: 1; background: white; display: grid; place-items: center; overflow: hidden; border-radius: 14px; }
.qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
[hidden] { display: none !important; }
#placeholder { color: #545e58; font-size: .9rem; }
.action,.pair-state { margin-top: 22px; min-height: 52px; display: flex; align-items: center; justify-content: center; }
.action { gap: 16px; color: #e2c688; font-weight: 600; text-decoration: none; }
.action:hover,.action:focus-visible { text-decoration: underline; }
.pair-state { flex-direction: column; gap: 4px; color: #b2beb6; font-size: .9rem; }
#pairing { color: #e8f1ea; letter-spacing: .15em; font: 600 1rem ui-monospace,monospace; }
button { font: inherit; color: #dfebe3; background: #242d27; border: 1px solid #556259; border-radius: 8px; padding: 8px 14px; cursor:pointer; }
:focus-visible { outline: 2px solid #ddc58f; outline-offset: 5px; }
@media(max-width:680px) {
  main { grid-template-columns: 1fr; }
  section { padding: 30px 16px; }
  .public-entry > section { padding: clamp(1.5rem, 5svh, 3rem) clamp(1.25rem, 6vw, 2.5rem); }
  .public-entry :is(h1, h2) { font-size: clamp(2.5rem, 7.2vw, 3rem); }
  .public-entry :is(h1, h2) em { display: inline; }
  .public-entry .entry-message, .desktop-downloads { margin-top: 1rem; }
  .public-entry .action { margin-top: 1rem; }
  .desktop-downloads h3 { margin-bottom: .6rem; }
  .register { border-right: 0; border-bottom: 1px solid #302c23; }
  p { margin: 8px 0 16px; min-height: 0; }
  .qr { width: 156px; }
  .action,.pair-state { min-height: 36px; margin-top: 10px; }
}

#enlarge-login { margin-top: 8px; border: 0; background: transparent; color: #c7d2ca; text-decoration: underline; text-underline-offset: .2em; }
body.login-focus main { grid-template-columns: 1fr; }
body.login-focus .register { display: none; }
body.login-focus .login-code { width: min(78vw, 48svh, 440px); }
.login details { margin:14px auto 0; }
.login summary { color:#dfebe3; cursor:pointer; }
.login details p { min-height:0; margin:12px 0 6px; }
#manual-code { display:block; color:#e8f1ea; font:600 1.25rem ui-monospace,monospace; letter-spacing:.1em; user-select:all; }

/* The remembered browser opens straight onto its owner's PIN screen. */
.lock-screen {
  background: #000;
  color: #f9f8fc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.lock-screen header {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  background: transparent;
  border: 0;
}
main.pin-unlock {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(65px, 9svh) 20px max(16px, env(safe-area-inset-bottom));
  grid-template: auto 1fr auto / minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  background: #000 url('/app/static/support/wallpaper.svg') repeat center / 176px 176px;
}
.lock-clock { font-size: clamp(1.05rem, 2.4vw, 1.55rem); font-weight: 560; text-shadow: 0 2px 20px #21233c48; }
.lock-clock time {
  display: block; font-size: clamp(4.5rem, min(14vw, 19svh), 10rem);
  line-height: 1; font-weight: 650; letter-spacing: -.065em; font-variant-numeric: tabular-nums;
}
.lock-module { align-self: center; width: min(23rem, 100%); display: grid; gap: 12px; }
#pin-unlock { width: 100%; display: grid; justify-items: center; }
.lock-avatar {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 88px; aspect-ratio: 1; border-radius: 50%; border: 1px solid #ffffff73;
  background: linear-gradient(145deg, #656565, #282828 90%);
  box-shadow: 0 5px 20px #11162745; font-size: 1.85rem; font-weight: 550;
}
.lock-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#pin-unlock h1 {
  margin: 12px 0 15px; max-width: 100%; overflow-wrap: anywhere;
  font-size: 1.4rem; letter-spacing: -.025em; font-weight: 600; text-shadow: 0 1px 8px #17162a66;
}
.lock-entry {
  display: flex; align-items: center; width: min(14.4rem, 100%); border-radius: 30px;
  background: #171717e6; border: 1px solid #ffffff68;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.lock-entry:focus-within { outline: 2px solid #eeecffba; outline-offset: 2px; }
#browser-pin {
  flex: 1; min-width: 0; min-height: 44px; padding: 11px 17px; text-align: center; background: transparent; border: 0; outline: 0;
  font: inherit; font-size: 1rem; color: white;
}
#browser-pin::placeholder { color: #f1edf4; }
#unlock-status { min-height: 2.5em; padding-top: 10px; font-size: .84rem; text-shadow: 0 1px 4px #16172c; }
#unlock-status:empty { display: none; }
#forget-browser { background: transparent; border: 0; color: #fff; font-size: .84rem; min-height: 44px; text-shadow: 0 1px 4px #15182c; }
#forget-browser:hover { text-decoration: underline; }
@media (max-height: 520px) {
  main.pin-unlock { padding-block: 12px; gap: 5px; }
  .lock-clock { font-size: .875rem; }
  .lock-clock time { font-size: 2.5rem; }
  .lock-avatar { width: 52px; font-size: 1.3rem; }
  #pin-unlock h1 { margin: 6px 0 8px; font-size: 1.1rem; }
}
@media (max-height: 520px) {
  .lock-screen .entry-header { position: relative; }
  main.pin-unlock { min-height: calc(100svh - var(--entry-header-height)); }
}
.lock-notices {
  width: 100%; display: grid; gap: 7px;
}
.lock-notice {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 11px;
  padding: 8px 17px 8px 11px; text-align: start; border-radius: 999px;
  border: 1px solid #ffffff20; background: linear-gradient(110deg, #212123f5, #141416f5);
  box-shadow: 0 3px 12px #0005;
}
.lock-notice .website-message-icon { border-radius: 50%; width: 30px; height: 30px; }
.lock-notice .website-message-icon svg { width: 24px; height: 24px; }
.lock-notice strong, .lock-notice small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lock-notice strong { color: #f1f1f3; font-size: .84rem; font-weight: 550; line-height: 1.3; }
.lock-notice small { color: #b9b9c0; font-size: .77rem; line-height: 1.3; }
@media (prefers-reduced-motion: no-preference) {
  .lock-notice.is-new { animation: lock-arrival .28s ease-out; }
  @keyframes lock-arrival { from { opacity: 0; transform: translateY(-7px); } }
}
@media (max-height: 400px) {
  main.pin-unlock { padding-block: 6px; gap: 2px; }
  .lock-module { gap: 6px; }
  .lock-avatar { width: 40px; }
  .lock-clock time { font-size: 2rem; }
  #unlock-status:not(:empty) { min-height: 0; padding-top: 4px; }
}

@media (max-height: 520px) {
  .lock-notices { gap: 4px; }
  .lock-notice { grid-template-columns: 20px minmax(0, 1fr); gap: 7px; padding: 3px 12px; }
  .lock-notice .website-message-icon, .lock-notice .website-message-icon svg { width: 20px; height: 20px; }
  .lock-notice > span:last-child { display: flex; align-items: baseline; gap: 7px; }
  .lock-notice strong { flex-shrink: 0; max-width: 48%; }
}
@media (max-height: 400px) {
  #pin-unlock { grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 4px 8px; }
  #pin-unlock .lock-avatar { justify-self: end; width: 32px; }
  #pin-unlock h1 { justify-self: start; margin: 0; }
  #pin-unlock .lock-entry, #unlock-status { grid-column: 1 / -1; }
  #pin-unlock .lock-entry { width: min(14.4rem, 75vw); }
}

@media (min-width:681px) and (max-height:700px) {
  .login, .register { padding-block: 1.25rem; }
  .login .content > p { margin: .5rem 0 1rem; min-height: 0; }
  .login .pair-state { min-height: 2rem; margin-top: .7rem; }
}

.public-entry .register {
  --hero-bg:#14110e; --hero-grid:#241f18; --hero-ink:#d9d2c5; --hero-accent:#b8c77e; --hero-muted:#b6aea1;
  --hero-up:#b8c77e; --hero-down:#c77e7e; --hero-fast:#d9d2c5; --hero-mid:#b8c77e; --hero-slow:#caa77e; --hero-long:#c77e7e;
  --hero-button:#e0c58d;
  isolation:isolate; background:var(--hero-bg);
}
.register[data-hero-theme="Midnight Cyan"] {
  --hero-bg:#070b16; --hero-grid:#18223b; --hero-ink:#eaf1ff; --hero-accent:#3ad8ff; --hero-muted:#a8b8d2;
  --hero-up:#34e89e; --hero-down:#ff4d7d; --hero-fast:#7bcfff; --hero-mid:#dfb66c; --hero-slow:#b7a2ef; --hero-long:#eaf1ff; --hero-button:#3ad8ff;
}
.register[data-hero-theme="Sandstorm"] {
  --hero-bg:#0d0d0d; --hero-grid:transparent; --hero-ink:#d4d1c9; --hero-accent:#ff9800; --hero-muted:#b6ac9b;
  --hero-up:#ff9800; --hero-down:#fff; --hero-up-wick:#bfc2cb; --hero-down-wick:#bfc2cb;
  --hero-fast:#d4d1c9; --hero-mid:#efad5b; --hero-slow:#9bb9c4; --hero-long:#c395ac; --hero-button:#ff9800;
}
.join-chart-art, .public-entry .register::before {
  position:absolute; inset:0; width:100%; height:100%; pointer-events:none;
}
.join-chart-art { z-index:-2; }
.public-entry .register::before {
  content:""; z-index:-1;
  background:linear-gradient(140deg,var(--hero-bg),transparent 85%);
}
.public-entry .register .join-action { background:var(--hero-button); color:var(--hero-bg);
}
.public-entry .register .join-subtitle {
  margin: .55em 0 0;
  min-height: 0;
  color: var(--hero-accent);
  font-family: inherit;
  font-size: clamp(1.1rem,1.55vw,1.75rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -.015em;
}
@media(max-width:680px) {
  .public-entry .register { min-height: clamp(245px,39svh,360px); }
}

.public-entry .register {
  grid-template-rows: 1fr auto;
  align-content: stretch;
  align-items: start;
  row-gap: clamp(3rem, 12svh, 9rem);
}
.public-entry .register h1 { color: var(--hero-ink); }

.public-entry .register { position: relative; }
.join-chart-caption {
  justify-self: start; color: var(--hero-muted); font-size: .75rem;
}
.public-entry .register { --marker-space: clamp(85px,6.3vw,116px); transition: background-color .65s ease-in-out; }
.join-chart-art { width: calc(100% - var(--marker-space)); }
.public-entry .register :is(h1,.join-subtitle,.join-action,.join-chart-caption,.join-trade-marker,.join-trade-marker span) {
  transition: color .65s ease-in-out, background-color .65s ease-in-out, border-color .65s ease-in-out;
}
.join-trade-marker {
  position:absolute; left:calc(100% - var(--marker-space)); right:6px; top:var(--trade-y);
  transform:translateY(-50%); display:grid; gap:1px; padding-left:7px;
  border-left:1px solid currentColor; color:var(--hero-accent); font-variant-numeric:tabular-nums;
}
.join-trade-marker[hidden] { display:none; }
.join-trade-marker::before {
  content:""; position:absolute; right:100%; top:50%; width:5px; border-top:1px solid currentColor;
}
.join-trade-marker[data-loss="true"] { color:var(--hero-down); }
.join-trade-marker span { color:var(--hero-muted); font-size:.65rem; }
.join-trade-marker strong { color:inherit; white-space:nowrap; font-size:clamp(.74rem,.94vw,1rem); line-height:1.2; }
@media(prefers-reduced-motion:reduce) {
  .public-entry .register, .public-entry .register * { transition:none; }
}

body.chart-signin,.chart-signin .desktop-login,.chart-signin .login {background:var(--qc-bg,#0d0d0d);color:var(--qc-ink,#eee8dc)}
.chart-signin .entry-header {background:var(--qc-surface,#141414);border-color:var(--qc-edge,#37332d)}
.chart-signin .desktop-login .content {box-sizing:border-box;max-width:440px;padding:clamp(18px,4vw,34px);border-radius:18px;background:var(--qc-surface,#141414);border:1px solid var(--qc-edge,#37332d)}
.chart-signin .login :is(h1,h1 em,summary) {color:var(--qc-ink,#eee8dc)}
.chart-signin .login :is(p,.pair-state) {color:var(--qc-muted,#abaaa2)}
.chart-signin .login .content>button {background:var(--qc-accent,#dbbd81);color:var(--qc-action-ink,#19160f);border:0}

.guest-chart-entry{display:block;width:fit-content;margin-top:.75rem;color:inherit;text-underline-offset:3px}

.login-create-account {display:inline-flex;align-items:center;gap:.4rem;min-height:44px;margin-top:.5rem;color:var(--qc-ink,#eee8dc);font-weight:600;text-underline-offset:.2em}
