/* Sign up, sign in, connect and join: the server-rendered steps of the
   onboarding, styled like the web app in web/src/styles. Tokens are copied
   from web/src/styles/tokens.css; keep the two in step. */

@font-face { font-family: "Switzer"; src: url("fonts/Switzer-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Erode"; src: url("fonts/Erode-Variable.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --ocean: #0a2333;
  --ocean-800: #16405a;
  --ocean-700: #1e4f6d;
  --ocean-500: #4da2d6;
  --ocean-300: #a0d0ee;
  --coral: #f23030;
  --coral-press: #c81f1f;
  --sky: #d2e7f5;
  --tint-sky: #e6f3fb;

  /* the brand voice, as on the rest of onboarding: Switzer text, Erode titles and wordmark */
  --font-ui: Switzer, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-title: Erode, "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-button: 8px;
  --radius-panel: 12px;
  --radius-card: 14px;
  --radius-pill: 999px;

  /* motion */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-fast: 150ms;
  --dur: 220ms;
  --dur-slow: 300ms;

  /* teammates (consistent everywhere people appear) */
  --person-sam: #2563eb;
  --person-leo: #7c3aed;
  --person-priya: #ea580c;
  --person-other: #2c6d95;

  /* light theme */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --spot-paper: #ffffff;
  --sunk: #f1f3f5;
  --sunk-2: #e9ecef;
  --fg: #0a2333;
  --fg2: #4f5a61;
  --fg3: #6c777d;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236c777d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  --line: rgba(10, 35, 51, 0.1);
  --line-strong: rgba(10, 35, 51, 0.18);
  --ring: rgba(10, 35, 51, 0.08);
  --learn: #f23030;
  --learn-text: #d21f1f;
  --learn-soft: #fdeded;
  --learn-line: #f6c5c5;
  --info: #1e4f6d;
  --info-soft: #e6f3fb;
  --ok: #16704f;
  --ok-soft: #dff3ea;
  --btn: #0a2333;
  --btn-fg: #ffffff;
  --btn-hover: #16405a;
  --term: #0f1a22;
  --term-fg: #e4ecf1;
  --term-dim: #7f919c;
  --term-line: #1d2c37;
  --focus: #0a2333;
  --shadow-card: 0 0 0 1px var(--ring), 0 1px 2px rgba(10, 35, 51, 0.04), 0 2px 8px rgba(10, 35, 51, 0.03);
  --shadow-hover: 0 0 0 1px var(--line-strong), 0 2px 4px rgba(10, 35, 51, 0.05), 0 14px 30px -10px rgba(10, 35, 51, 0.16);
  --shadow-pop: 0 0 0 1px var(--ring), 0 10px 28px rgba(10, 35, 51, 0.12);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10;
    --surface: #111417;
    --spot-paper: var(--surface);
    --sunk: #171b1f;
    --sunk-2: #1e2328;
    --fg: #edf1f4;
    --fg2: #a5afb7;
    --fg3: #828d96;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23828d96' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23828d96' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    --line: rgba(205, 225, 240, 0.09);
    --line-strong: rgba(205, 225, 240, 0.17);
    --ring: rgba(205, 225, 240, 0.08);
    --learn: #f23030;
    --learn-text: #ff6a63;
    --learn-soft: rgba(242, 48, 48, 0.12);
    --learn-line: rgba(242, 48, 48, 0.36);
    --info: #a0d0ee;
    --info-soft: rgba(77, 162, 214, 0.13);
    --ok: #4fd39b;
    --ok-soft: rgba(79, 211, 155, 0.12);
    --btn: #edf1f4;
    --btn-fg: #0b0d10;
    --btn-hover: #d3dce2;
    --term: #080b0e;
    --term-fg: #e4ecf1;
    --term-dim: #6f7f8a;
    --term-line: #182129;
    --focus: #a0d0ee;
    --shadow-card: 0 0 0 1px var(--ring), 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 0 0 1px var(--line-strong), 0 14px 30px -10px rgba(0, 0, 0, 0.65);
    --shadow-pop: 0 0 0 1px var(--ring), 0 10px 28px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d10;
  --surface: #111417;
  --spot-paper: var(--surface);
  --sunk: #171b1f;
  --sunk-2: #1e2328;
  --fg: #edf1f4;
  --fg2: #a5afb7;
  --fg3: #828d96;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23828d96' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  --line: rgba(205, 225, 240, 0.09);
  --line-strong: rgba(205, 225, 240, 0.17);
  --ring: rgba(205, 225, 240, 0.08);
  --learn: #f23030;
  --learn-text: #ff6a63;
  --learn-soft: rgba(242, 48, 48, 0.12);
  --learn-line: rgba(242, 48, 48, 0.36);
  --info: #a0d0ee;
  --info-soft: rgba(77, 162, 214, 0.13);
  --ok: #4fd39b;
  --ok-soft: rgba(79, 211, 155, 0.12);
  --btn: #edf1f4;
  --btn-fg: #0b0d10;
  --btn-hover: #d3dce2;
  --term: #080b0e;
  --term-fg: #e4ecf1;
  --term-dim: #6f7f8a;
  --term-line: #182129;
  --focus: #a0d0ee;
  --shadow-card: 0 0 0 1px var(--ring), 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 0 0 1px var(--line-strong), 0 14px 30px -10px rgba(0, 0, 0, 0.65);
  --shadow-pop: 0 0 0 1px var(--ring), 0 10px 28px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  font: 400 14px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
h1, p { margin: 0; }
a { color: inherit; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 500 18px/1 var(--font-title); letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 20px; height: auto; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--fg2); min-width: 0; }
.who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 4px 6px; border-radius: 6px; font: inherit; color: var(--fg2); cursor: pointer; }
@media (hover: hover) { .linkbtn:hover { background: var(--sunk); color: var(--fg); } }
.stepdots { display: flex; align-items: center; gap: 6px; }
.stepdots i { display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--line-strong); }
.stepdots i.done { background: var(--fg3); }
.stepdots i.on { width: 18px; background: var(--fg); }

/* one centred card */
main { flex: 1; width: 100%; padding: clamp(16px, 5vh, 56px) 16px 48px; display: flex; flex-direction: column; align-items: center; }
.sheet { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 0 24px 24px; display: flex; flex-direction: column; gap: 20px; }
.sheet.plain { padding-top: 28px; }
.art { width: min(200px, 56vw); margin: 0 auto -18px; aspect-ratio: 320 / 300; }
.art img { width: 100%; height: 100%; display: block; margin-top: -6%; }
.art .d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .art .l { display: none; } :root:not([data-theme="light"]) .art .d { display: block; } }
:root[data-theme="dark"] .art .l { display: none; }
:root[data-theme="dark"] .art .d { display: block; }
.head { display: flex; flex-direction: column; gap: 6px; text-align: center; align-items: center; }
h1 { font: 500 26px/1.15 var(--font-title); letter-spacing: -0.02em; text-wrap: balance; }
.lead { color: var(--fg2); font-size: 14px; text-wrap: pretty; }
.note, .helper { color: var(--fg3); font-size: 12.5px; }
.switch { margin-top: 16px; font-size: 13px; color: var(--fg2); text-align: center; }
.switch a { color: var(--fg); font-weight: 500; text-decoration: none; }
.whoami { display: flex; flex-direction: row; justify-content: center; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin-top: 10px; font-size: 13px; color: var(--fg2); }
.whoami b { color: var(--fg); font-weight: 500; overflow-wrap: anywhere; }
.whoami .linkbtn { padding: 2px 6px; margin-left: -2px; font-size: 13px; }
@media (hover: hover) { .switch a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.error { background: var(--learn-soft); color: var(--learn-text); border-radius: 8px; padding: 9px 12px; font-size: 13px; }

/* forms */
form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.lbl { font-size: 13px; font-weight: 500; color: var(--fg); }
.field-hint { font-size: 13px; font-style: italic; color: var(--fg3); }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; height: 40px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--fg);
  background: var(--surface); border: 0; border-radius: var(--radius-button);
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow var(--dur-fast) var(--ease-out);
}
select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
input:focus, select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--focus), 0 0 0 3px var(--ring); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--radius-button); background: var(--btn); color: var(--btn-fg);
  font: 500 14px/1 var(--font-ui); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition-property: scale, background-color; transition-duration: var(--dur-fast); transition-timing-function: var(--ease-out);
}
.btn:active { scale: 0.98; }
@media (hover: hover) { .btn:hover { background: var(--btn-hover); } }
.btn.wide { width: 100%; height: 44px; font-size: 15px; }
.btn.quiet { background: var(--sunk); color: var(--fg); }
.btn.outline { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (hover: hover) { .btn.outline:hover { background: var(--sunk); } }
.or { display: flex; align-items: center; gap: 12px; margin: -6px 0; font-size: 12.5px; color: var(--fg3); }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.forgot { align-self: flex-end; margin-top: -6px; font-size: 13px; color: var(--fg2); text-decoration: none; }
@media (hover: hover) { .forgot:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; } }
.js .js-hide { display: none; }
.switcher { flex-direction: row; align-items: flex-end; gap: 8px; }
.switcher .field { flex: 1; }

/* repos on the laptop */
.repos { display: flex; flex-direction: column; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.repo { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; }
.repo + .repo { border-top: 1px solid var(--line); }
.repo.fixed { cursor: default; }
.repo input { width: 16px; height: 16px; margin: 0; accent-color: var(--fg); flex: none; }
.repo .text { display: flex; flex-direction: column; min-width: 0; }
.repo .name { font-family: var(--font-mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo .count { font-size: 12px; color: var(--fg3); }
.repo .count b { color: var(--learn-text); font-weight: 500; }

/* waiting */
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--fg2); font-size: 13px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--learn); box-shadow: 0 0 0 3px var(--learn-soft); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: lp 1.6s var(--ease-in-out) infinite; }
  @keyframes lp { 50% { box-shadow: 0 0 0 6px transparent; } }
}

/* light or dark: theme.js keeps the choice; the button shows what it switches to */
.top > .stepdots, .top > .who { margin-left: auto; }
.themebtn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--fg3, #6c777d); cursor: pointer; }
.themebtn:hover { background: var(--sunk, rgba(127,127,127,.12)); color: var(--fg, inherit); }
.themebtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.themebtn .moon { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: block; }
:root[data-theme="light"] .themebtn .sun { display: none; }
:root[data-theme="light"] .themebtn .moon { display: block; }

/* a 13-inch laptop: the card and its button stay on one screen */
@media (max-height: 820px) {
  main { padding-bottom: 24px; }
  .art { width: 150px; margin-bottom: -12px; }
  .sheet { gap: 16px; }
  form { gap: 12px; }
}

/* The split sign-in for people coming from Claude: the card on the left, the
   team picture (one memory, everyone's laptops) large on the right. */
.split-page .top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; width: auto; max-width: none; padding: 0 32px; }
main.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100dvh; padding: 0; align-items: stretch; }
.split-l { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 96px 32px 48px; }
.split-l > .sheet { max-width: 400px; gap: 32px; padding-top: 32px; padding-bottom: 28px; }
.split-l form { gap: 22px; }
.split-l .lbl { font-weight: 400; color: var(--fg2); }
.split-l form .btn { margin-top: 10px; }
.split-l form .btn + .btn { margin-top: -10px; }
.split-r { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--sunk); box-shadow: inset 1px 0 0 var(--line); }
.split-r > .brain { position: relative; }
/* The caption sits at the bottom of the panel, the globe centred above it. */
.split-r > .brain { align-self: stretch; }
.split-r .brain-map { margin-block: auto; }
.terrain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse 52% 46% at 50% 48%, transparent 30%, #000 75%); mask-image: radial-gradient(ellipse 52% 46% at 50% 48%, transparent 30%, #000 75%); }
.terrain { opacity: 0.18; object-fit: cover; }
.terrain.d { display: none; }
:root[data-theme="dark"] .terrain.l { display: none; }
:root[data-theme="dark"] .terrain.d { display: block; }
.brain { margin: 0; width: min(100%, 560px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.brain-map { position: relative; width: 100%; aspect-ratio: 1; }
.brain-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.brain-lines .link { fill: none; color: var(--fg3); stroke-width: 0.8; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.brain-lines .trail { fill: none; stroke: var(--coral); stroke-width: 0.65; stroke-linecap: butt; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.brain-lines .dot, .brain-lines .spot { fill: var(--coral); }
.brain-lines .ripple { fill: none; stroke: var(--coral); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.brain-globe { z-index: 0; }
.brain-lines { z-index: 1; color: var(--fg3); }
.brain-globe { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 320 / 300; transform: translate(-50%, -50%); }
.brain-globe img { width: 100%; height: 100%; display: block; }
.brain-globe .d { display: none; }
:root[data-theme="dark"] .brain-globe .l { display: none; }
:root[data-theme="dark"] .brain-globe .d { display: block; }
.bnote { position: absolute; z-index: 2; width: 41%; display: flex; flex-direction: column; gap: 6px; padding: 11px 13px 12px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 1px -0.5px rgb(0 0 0 / 0.06), 0 6px 12px -6px rgb(0 0 0 / 0.12); font-size: 13px; line-height: 1.35; color: var(--fg); }
.bnote.you { box-shadow: 0 0 0 1px var(--fg), 0 6px 12px -6px rgb(0 0 0 / 0.16); }
:root[data-theme="dark"] .bnote.you { box-shadow: 0 0 0 1px var(--fg3), 0 6px 12px -6px rgb(0 0 0 / 0.16); }
.bnote .who { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg3); }
.bnote .who b { font-weight: 500; color: var(--fg2); }
.bnote .who-i { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--fg3); stroke-width: 1.2; }
.bnote .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg3); }
.bnote .tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.bnote.n1 { left: 0; top: 2%; transform: rotate(-1.5deg); }
.bnote.n2 { right: 0; top: 8%; transform: rotate(1.2deg); }
.bnote.n3 { left: 2%; bottom: 8%; transform: rotate(1deg); }
.bnote.n4 { right: 0; bottom: 3%; transform: rotate(-1.2deg); }
.brain figcaption { margin-top: 40px; font-size: 15px; color: var(--fg2); text-align: center; }
@media (prefers-reduced-motion: reduce) { .brain-lines .dot, .brain-lines .ripple { display: none; } .brain-lines .trail { stroke-dashoffset: 0; } }
@media (max-width: 900px) {
  .split-page .top { position: static; width: 100%; }
  main.split { grid-template-columns: 1fr; min-height: 0; }
  .split-l { padding: 24px 16px 48px; }
  .split-r { display: none; }
}


/* A toast: says what just happened, then goes (consent, after joining). */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 50;
  margin: 0; background: var(--fg); color: var(--bg); padding: 9px 14px; border-radius: 9px; font-size: 13px;
  box-shadow: var(--shadow-pop); max-width: calc(100vw - 32px); pointer-events: none;
  animation: toast-in var(--dur) var(--ease-out) both, toast-out 180ms var(--ease-in) 5s both;
}
@keyframes toast-in { from { opacity: 0; translate: -50% 8px; } }
@keyframes toast-out { to { opacity: 0; translate: -50% 4px; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: toast-out 1ms linear 5s both; }
}
