@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #000; --card: #0a0a0b; --raised: #111114; --line: #212126; --line-strong: #34343b;
  --ink: #fafafa; --muted: #8e8e99;
  --brand: #0058ff; --brand-hover: #2f78ff; --brand-ink: #fff; --brand-soft: rgba(0,88,255,.14);
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --bad: #f87171; --bad-soft: rgba(248, 113, 113, .12);
  --radius: 14px;
  --shadow: 0 0 0 1px rgba(255,255,255,.02), 0 10px 30px -10px rgba(0,0,0,.8);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: #000; }
body {
  background: var(--bg); color: var(--ink); min-height: 100vh;
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.006em;
}
::selection { background: rgba(0,88,255,.45); }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; font-weight: 650; }
h2 { font-size: 1.25rem; } h3 { font-size: 1rem; }
.wrap { max-width: 920px; margin: 0 auto; padding: 28px 16px 72px; }
.narrow { max-width: 440px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .72);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 22px; width: auto; display: block; }
.brand.lg img { height: 34px; }
.beta { margin-left: 9px; align-self: center; font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1; padding: 4px 7px; border-radius: 99px; color: #6ea4ff; background: rgba(0,88,255,.14); border: 1px solid rgba(0,88,255,.45); }
.brand.lg .beta { font-size: .68rem; padding: 5px 9px; margin-left: 12px; }

/* surfaces */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 60px), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
a.card { transition: border-color .15s, background .15s, transform .15s; }
a.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; left: 50%; top: -120px; width: min(900px, 100vw); height: 420px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(0,88,255,.28), transparent); pointer-events: none;
}

/* forms */
label { display: block; font-weight: 550; font-size: .85rem; margin-bottom: 6px; color: #d4d4dc; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #000; color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #55555f; }
textarea { resize: vertical; min-height: 110px; }
input[type=text]:hover, input[type=email]:hover, input[type=password]:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,88,255,.25); }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
/* on/off switch (use on <input type="checkbox" class="switch">) */
input[type=checkbox].switch {
  -webkit-appearance: none; appearance: none; width: 44px; height: 26px; border-radius: 99px; flex: none; margin: 0;
  background: #23232a; border: 1px solid var(--line-strong); position: relative; cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
input[type=checkbox].switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.6); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1);
}
input[type=checkbox].switch:checked { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 14px -2px rgba(0,88,255,.7); }
input[type=checkbox].switch:checked::after { transform: translateX(18px); }
input[type=checkbox].switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input[type=checkbox].switch, input[type=checkbox].switch::after { transition: none; } }
button:focus-visible, a:focus-visible, .tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--raised); color: var(--ink);
  padding: 9px 15px; border-radius: 10px; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { border-color: var(--line-strong); background: #18181c; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #3f86ff, var(--brand)); border-color: rgba(255,255,255,.18); color: var(--brand-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 18px -6px rgba(0,88,255,.7);
}
.btn.primary:hover { background: linear-gradient(180deg, #5a98ff, var(--brand-hover)); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: rgba(248,113,113,.4); }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.block { width: 100%; padding: 11px 15px; }
.err { color: var(--bad); font-size: .85rem; min-height: 1.2em; }

.badge { display: inline-block; font-size: .68rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: #6ea4ff; border: 1px solid rgba(0,88,255,.25); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(52, 211, 153, .25); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(251, 191, 36, .25); }
.badge.gray { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--line); }
.logo-sm { height: 34px; max-width: 120px; object-fit: contain; border-radius: 6px; }
.urlbox { display: flex; gap: 8px; align-items: center; }
.urlbox input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8rem; color: #c9c9d3; }
.powered { text-align: center; padding: 32px 16px 20px; color: var(--muted); font-size: .8rem; }
.powered a { display: inline-flex; vertical-align: middle; opacity: .75; transition: opacity .15s; }
.powered a:hover { opacity: 1; }
.powered img { height: 16px; width: auto; display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: inline-block; box-shadow: 0 0 0 3px var(--bad-soft); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* Sonner-style toasts: bottom centre, stacked, auto-dismiss */
#toaster {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  width: min(380px, calc(100vw - 24px)); pointer-events: none;
}
.sn {
  pointer-events: auto; width: 100%; display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 13px 14px; border-radius: 14px; background: #0c0c0e; border: 1px solid var(--line-strong); color: var(--ink);
  font-size: .9rem; font-weight: 500; line-height: 1.4; box-shadow: 0 16px 40px -8px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255,255,255,.03);
  animation: sn-in .35s cubic-bezier(.21, 1.02, .73, 1) both;
}
.sn.out { animation: sn-out .22s ease-in both; }
.sn svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.sn.success svg { color: var(--ok); } .sn.error svg { color: var(--bad); } .sn.info svg { color: #6ea4ff; }
.sn .t { flex: 1; overflow-wrap: anywhere; }
.sn .d { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; margin-top: 2px; }
@keyframes sn-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sn-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .sn, .sn.out { animation-duration: .01s; } }

/* signed-in top bar: workspace switcher / user menu */
.navwrap { position: relative; }
.navbtn { gap: 8px; max-width: 260px; }
.navbtn .wsname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.avatar { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3f86ff, #0058ff); flex: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; max-width: 86vw; background: #0c0c0e; border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; box-shadow: 0 18px 44px -8px rgba(0,0,0,.9); z-index: 60; }
.menu .mh { padding: 8px 10px 4px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.menu .mi { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; color: var(--ink); font: inherit; font-size: .9rem; border-radius: 8px; cursor: pointer; }
.menu .mi:hover { background: var(--raised); }
.menu .mi.danger { color: var(--bad); }
.menu .tick { width: 14px; color: var(--brand); font-weight: 700; flex: none; }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.social { display: grid; gap: 10px; }
.social .btn { width: 100%; padding: 10px 14px; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* long-form pages (privacy, terms) */
.doc { max-width: 740px; margin: 0 auto; padding: 36px 20px 72px; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); letter-spacing: -.035em; margin: 0 0 6px; }
.doc .meta { color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.doc h2 { font-size: 1.15rem; margin: 34px 0 8px; letter-spacing: -.015em; }
.doc h3 { font-size: .98rem; margin: 18px 0 4px; color: #e6e6ee; }
.doc p, .doc li { color: #c9c9d3; line-height: 1.7; }
.doc ul { padding-left: 1.2rem; margin: 8px 0; } .doc li { margin: 4px 0; }
.doc a { color: #6ea4ff; }
.doc .note { border: 1px solid var(--line-strong); background: var(--raised); border-radius: 12px; padding: 12px 14px; font-size: .92rem; color: #c9c9d3; margin: 18px 0; }
.legal { text-align: center; color: var(--muted); font-size: .8rem; padding: 4px 16px 24px; }
.legal a { color: var(--muted); text-decoration: none; margin: 0 6px; } .legal a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- two-column auth layout (sign in, reset, invitations) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); min-height: 100vh; }
.split-form { display: flex; flex-direction: column; padding: 26px clamp(20px, 5vw, 64px) 20px; background: #000; }
.split-form .sf-top { display: flex; align-items: center; justify-content: space-between; }
.split-form .sf-main { width: 100%; max-width: 372px; margin: auto; padding: 36px 0; }
.sf-main h1 { font-size: 1.55rem; letter-spacing: -.03em; margin: 0 0 4px; }
.sf-main .lead { color: var(--muted); font-size: .92rem; margin: 0 0 20px; }
.sf-main .stack > * + * { margin-top: 12px; }
.split-form .legal { padding: 0; text-align: left; }

/* compact controls (less bulky than the default form look) */
.compact input[type=text], .compact input[type=email], .compact input[type=password] { padding: 9px 11px; font-size: .92rem; border-radius: 8px; }
.compact label { font-size: .8rem; margin-bottom: 5px; }
.compact .btn { padding: 8px 14px; font-size: .9rem; border-radius: 8px; }
.compact .btn.block { padding: 9px 14px; }
.compact .social { gap: 8px; }
.compact .social .btn { padding: 8px 12px; position: relative; }
.compact .err { min-height: 0; margin: 0; }
.compact .err:empty { display: none; }
.lu { font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6ea4ff; background: rgba(0,88,255,.14); border: 1px solid rgba(0,88,255,.4); border-radius: 99px; padding: 2px 7px; line-height: 1.2; }
.social .btn .lu { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.panel-note { border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; background: var(--raised); font-size: .85rem; color: #d4d4dc; }

/* right-hand brand panel */
.split-art { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px; border-left: 1px solid var(--line);
  background: radial-gradient(800px 520px at 85% 8%, rgba(0,88,255,.38), transparent 62%), radial-gradient(640px 460px at 8% 95%, rgba(0,88,255,.2), transparent 62%), #030306; }
.split-art::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 55% 45%, #000 0%, transparent 72%); mask-image: radial-gradient(circle at 55% 45%, #000 0%, transparent 72%); }
.art-inner { position: relative; width: 100%; max-width: 540px; }
.art-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #6ea4ff; margin-bottom: 14px; }
.art-inner h2 { font-size: clamp(1.7rem, 2.6vw, 2.35rem); letter-spacing: -.035em; line-height: 1.12; margin: 0 0 12px; font-weight: 720; background: linear-gradient(180deg, #fff 40%, #9db8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.art-inner > p { color: #a9a9b8; font-size: 1rem; line-height: 1.6; margin: 0 0 34px; max-width: 440px; }
.mock { position: relative; margin: 0 22px 26px 0; }
.mock-screen { aspect-ratio: 16 / 9; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: radial-gradient(420px 220px at 50% -10%, rgba(0,88,255,.3), transparent 70%), #000;
  box-shadow: 0 34px 90px -24px rgba(0,88,255,.55), inset 0 1px 0 rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6% 8%; }
.mq-label { font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 700; margin-bottom: 10px; }
.mq-text { font-size: clamp(1.05rem, 1.9vw, 1.55rem); font-weight: 750; letter-spacing: -.02em; line-height: 1.2; color: #fff; animation: artIn .9s cubic-bezier(.2,.8,.2,1) .25s both; }
.mq-by { margin-top: 12px; font-size: .86rem; color: rgba(255,255,255,.7); animation: artIn .9s cubic-bezier(.2,.8,.2,1) .5s both; }
.mq-by b { color: #fff; font-weight: 650; }
.chip { position: absolute; display: flex; align-items: center; gap: 9px; background: #0b0b0f; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 10px 13px; font-size: .82rem; font-weight: 550; color: #f1f1f6; box-shadow: 0 18px 40px -10px rgba(0,0,0,.85); animation: floaty 6s ease-in-out infinite; white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.18); flex: none; }
.chip.c1 { left: -22px; bottom: -22px; }
.chip.c2 { right: -18px; top: -16px; animation-delay: -3s; }
.chip.c2 i { background: #3f86ff; box-shadow: 0 0 0 4px rgba(63,134,255,.2); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes artIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chip, .mq-text, .mq-by { animation: none; } }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } .split-art { display: none; } .split-form .sf-main { padding: 28px 0 40px; } }

.split-form .legal.legal-inline a { margin: 0; text-decoration: underline; text-underline-offset: 2px; }
