/* Sign-in, sign-up and password reset pages */
:root {
  --a-bg: #07080b; --a-panel: #0d0f14; --a-card: #111318; --a-line: #23262f; --a-line-2: #2e323d;
  --a-fg: #f4f5f7; --a-muted: #8b90a0; --a-faint: #5b6070;
  --a-accent: #22c55e; --a-accent-ink: #04130a; --a-purple: #a855f7; --a-up: #22c55e; --a-down: #ef4444;
  --a-err-bg: rgba(239, 68, 68, .1); --a-err: #fca5a5; --a-ok-bg: rgba(34, 197, 94, .1); --a-ok: #86efac;
  color-scheme: dark;
}
html[data-mode="light"] {
  --a-bg: #f6f7f9; --a-panel: #ffffff; --a-card: #ffffff; --a-line: #e3e5ea; --a-line-2: #d3d6de;
  --a-fg: #0b0c10; --a-muted: #5d6272; --a-faint: #9096a5;
  --a-accent: #16a34a; --a-accent-ink: #ffffff; --a-up: #16a34a; --a-down: #dc2626;
  --a-err-bg: #fef2f2; --a-err: #b91c1c; --a-ok-bg: #f0fdf4; --a-ok: #15803d;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--a-bg); color: var(--a-fg); -webkit-font-smoothing: antialiased;
  display: flex; min-height: 100vh;
}
a { color: inherit; }

.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); width: 100%; min-height: 100vh; }

/* left: what the product is, with a small live-looking chart */
.auth-intro {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 36px 56px; border-right: 1px solid var(--a-line);
  background:
    radial-gradient(1200px 600px at -10% -20%, color-mix(in srgb, var(--a-purple) 12%, transparent), transparent 60%),
    radial-gradient(900px 500px at 110% 120%, color-mix(in srgb, var(--a-accent) 10%, transparent), transparent 60%),
    var(--a-panel);
}
.auth-intro::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--a-line) 1px, transparent 1px), linear-gradient(90deg, var(--a-line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.auth-intro > * { position: relative; }
.auth-brand { display: inline-block; width: fit-content; }
.auth-brand img { height: 34px; display: block; }
.auth-brand .on-light { display: none; }
html[data-mode="light"] .auth-brand .on-dark { display: none; }
html[data-mode="light"] .auth-brand .on-light { display: block; }
.auth-pitch h1 { font-size: clamp(28px, 2.8vw, 40px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; max-width: 14em; }
.auth-pitch h1 em { font-style: normal; color: var(--a-accent); }
.auth-pitch p { margin-top: 14px; color: var(--a-muted); font-size: 16px; line-height: 1.55; max-width: 34em; }
.auth-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 640px; }
.auth-feature { padding: 14px; border: 1px solid var(--a-line); border-radius: 12px; background: color-mix(in srgb, var(--a-card) 70%, transparent); backdrop-filter: blur(6px); }
.auth-feature b { display: block; font-size: 13px; margin-bottom: 4px; }
.auth-feature span { display: block; font-size: 12px; color: var(--a-muted); line-height: 1.45; }
.auth-feature i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }

.auth-preview { border: 1px solid var(--a-line); border-radius: 14px; background: var(--a-card); overflow: hidden; max-width: 640px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.auth-preview-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--a-line); font-size: 12px; color: var(--a-muted); }
.auth-preview-head b { color: var(--a-fg); font-weight: 700; }
.auth-preview-head .up { color: var(--a-up); font-weight: 600; }
.auth-preview-head .grow { flex: 1; }
.auth-preview-head .pill { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--a-line-2); font-size: 11px; }
.auth-preview canvas { display: block; width: 100%; height: clamp(140px, 22vh, 220px); }
.auth-preview-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--a-line); }
.auth-preview-stats div { padding: 10px 14px; border-right: 1px solid var(--a-line); }
.auth-preview-stats div:last-child { border-right: 0; }
.auth-preview-stats small { display: block; font-size: 11px; color: var(--a-faint); }
.auth-preview-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.auth-preview-stats .pos { color: var(--a-up); }
.auth-preview-stats .neg { color: var(--a-down); }
.auth-legal { font-size: 12px; color: var(--a-faint); }
/* the three flagship screens (real screenshots), one at a time */
.auth-show { display: grid; gap: 14px; max-width: 760px; }
.auth-show-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.auth-show-tabs button { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; padding: 11px 12px; border: 1px solid var(--a-line); border-radius: 12px; background: color-mix(in srgb, var(--a-card) 70%, transparent); color: var(--a-fg); font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
.auth-show-tabs button:hover { border-color: var(--a-line-2); }
.auth-show-tabs button.is-on { border-color: color-mix(in srgb, var(--a-accent) 60%, transparent); background: color-mix(in srgb, var(--a-accent) 8%, var(--a-card)); }
.auth-show-tabs b { display: block; font-size: 13px; margin-bottom: 4px; }
.auth-show-tabs span { display: block; font-size: 12px; color: var(--a-muted); line-height: 1.45; }
.auth-show-tabs i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-bottom: 6px; }
.auth-show-frame { position: relative; height: clamp(200px, calc(100vh - 560px), 440px); border: 1px solid var(--a-line); border-radius: 14px; overflow: hidden; background: #0b0d10; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.auth-show-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; opacity: 0; transition: opacity .5s ease; }
.auth-show-frame img.is-on { opacity: 1; }
.auth-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.auth-chips span { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--a-line-2); color: var(--a-muted); }

/* right: the form */
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; position: relative; }
.auth-mode { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--a-line); background: var(--a-card); color: var(--a-muted); cursor: pointer; display: grid; place-items: center; }
.auth-mode:hover { color: var(--a-fg); border-color: var(--a-line-2); }
.auth-mode svg { width: 16px; height: 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .auth-brand { display: none; margin-bottom: 28px; }
.auth-card h2 { font-size: 24px; letter-spacing: -0.01em; }
.auth-card .sub { color: var(--a-muted); font-size: 14px; margin-top: 6px; line-height: 1.5; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--a-line); border-radius: 12px; background: var(--a-card); margin: 24px 0 20px; position: relative; }
.auth-tabs button { position: relative; z-index: 1; padding: 9px 0; border: 0; background: none; color: var(--a-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px; transition: color .15s; }
.auth-tabs button[aria-selected="true"] { color: var(--a-fg); }
.auth-tabs .glider { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 8px; background: color-mix(in srgb, var(--a-fg) 9%, transparent); border: 1px solid var(--a-line-2); transition: transform .22s cubic-bezier(.3, .7, .2, 1); }
.auth-tabs[data-mode="signup"] .glider { transform: translateX(100%); }

.field { margin-bottom: 14px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.field label a { font-weight: 500; color: var(--a-muted); text-decoration: none; font-size: 12px; }
.field label a:hover { color: var(--a-fg); }
.input { position: relative; }
.input input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--a-line-2); background: var(--a-card);
  color: var(--a-fg); font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input input::placeholder { color: var(--a-faint); }
.input input:focus { border-color: var(--a-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-accent) 22%, transparent); }
.input input[aria-invalid="true"] { border-color: var(--a-down); }
.input .peek { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--a-faint); cursor: pointer; display: grid; place-items: center; }
.input .peek:hover { color: var(--a-fg); background: color-mix(in srgb, var(--a-fg) 6%, transparent); }
.input .peek svg { width: 17px; height: 17px; }
.input input.has-peek { padding-right: 44px; }
.hint { font-size: 12px; color: var(--a-faint); margin-top: 6px; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.meter i { height: 3px; border-radius: 2px; background: var(--a-line-2); transition: background .2s; }
.meter[data-score="1"] i:nth-child(-n+1) { background: var(--a-down); }
.meter[data-score="2"] i:nth-child(-n+2) { background: #f59e0b; }
.meter[data-score="3"] i:nth-child(-n+3) { background: #84cc16; }
.meter[data-score="4"] i { background: var(--a-up); }

.btn {
  width: 100%; height: 46px; margin-top: 6px; border: 0; border-radius: 10px; background: var(--a-accent); color: var(--a-accent-ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: filter .15s, transform .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn .bars { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.btn .bars i { width: 3px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: 50% 100%; animation: a-candle 1s ease-in-out infinite; }
.btn .bars i:nth-child(2) { animation-delay: .12s; } .btn .bars i:nth-child(3) { animation-delay: .24s; } .btn .bars i:nth-child(4) { animation-delay: .36s; }
.btn.is-busy .bars { display: inline-flex; }
@keyframes a-candle { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

.note { display: none; padding: 11px 13px; border-radius: 10px; font-size: 13px; line-height: 1.45; margin-bottom: 14px; }
.note.is-err { display: block; background: var(--a-err-bg); color: var(--a-err); border: 1px solid color-mix(in srgb, var(--a-down) 35%, transparent); }
.note.is-ok { display: block; background: var(--a-ok-bg); color: var(--a-ok); border: 1px solid color-mix(in srgb, var(--a-up) 35%, transparent); }
.auth-foot { margin-top: 22px; text-align: center; font-size: 13px; color: var(--a-muted); }
.auth-foot a { color: var(--a-fg); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-terms { margin-top: 16px; font-size: 12px; color: var(--a-faint); text-align: center; line-height: 1.5; }
.panel[hidden] { display: none; }
.panel { animation: a-in .2s ease-out; }
@keyframes a-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-intro { display: none; }
  .auth-card .auth-brand { display: block; }
}
@media (max-width: 1200px) and (min-width: 961px) { .auth-intro { padding: 36px 40px; } .auth-features { grid-template-columns: 1fr; } .auth-show-tabs span { display: none; } }
@media (prefers-reduced-motion: reduce) { .btn .bars i, .panel, .auth-tabs .glider { animation: none; transition: none; } }
/* sign-ups closed until launch */
.signup-closed { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--a-line); border-radius: 12px; background: var(--a-card); }
.signup-closed[hidden] { display: none; }
.signup-closed b { font-size: 16px; }
.signup-closed p { color: var(--a-muted); font-size: 13.5px; line-height: 1.55; }
.signup-closed .btn { text-decoration: none; margin-top: 4px; }
.field[hidden], .auth-terms[hidden], .btn[hidden] { display: none !important; }

/* waiting for the emailed login link */
.auth-wait { margin-top: 18px; }
.auth-wait-t { font-size: 16px; font-weight: 600; margin: 0; }
.auth-wait .sub b { color: var(--a-fg, inherit); }
.auth-wait .btn { margin-top: 16px; }
.auth-wait .auth-foot { margin-top: 14px; }
