/* Sono intake chat: standalone page, black modern minimal theme (same palette and type as the landing). */
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Display"; src: url("/assets/fonts/Geist-Display-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
:root {
  --bg: #000; --fg: #fff; --muted: #9b9b9b; --line: #1f1f1f; --panel: #0d0d0d; --bot: #161616; --bot-line: #262626;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --r: 20px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: 16px; line-height: 1.42; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { padding: 24px; color: var(--muted); }

.app {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  max-width: 720px; margin: 0 auto;
  background: var(--bg);
}

/* ---------- header ---------- */
.bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.92);
}
.who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; }
.avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #141414; border: 1px solid #2a2a2a; display: grid; place-items: center; }
.avatar svg { width: 25px; height: 25px; overflow: visible; }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-name { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.who-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-pill { flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: #000; background: #e9e9e9; border-radius: 999px; padding: 3px 9px; }
.bar-btn {
  flex: none; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid #2c2c2c; background: rgba(255,255,255,.03); color: #d6d6d6; font-size: 13px; font-weight: 500; cursor: pointer;
}
.bar-btn:hover { color: #fff; border-color: #555; }

.progress { flex: none; padding: 8px 16px 6px; border-bottom: 1px solid var(--line); }
.track { height: 3px; border-radius: 3px; background: #1c1c1c; overflow: hidden; }
.track span { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; transition: width .5s var(--ease); }
.progress-text { margin: 6px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .01em; }

/* ---------- conversation ---------- */
.log {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 16px 12px 20px;
  display: flex; flex-direction: column; gap: 6px;
  outline: none;
}
.log > :first-child { margin-top: auto; }   /* short chats sit at the bottom, like a messenger */
.row { display: flex; animation: pop .28s var(--ease) both; }
.row.bot { justify-content: flex-start; padding-right: 14%; }
.row.me { justify-content: flex-end; padding-left: 18%; }
.row.me + .row.bot, .row.bot + .row.me { margin-top: 8px; }
.bubble {
  max-width: 100%; padding: 10px 14px; border-radius: var(--r);
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px;
}
.bot .bubble { background: var(--bot); border: 1px solid var(--bot-line); border-bottom-left-radius: 6px; color: #f2f2f2; }
.me .bubble { background: #fff; color: #000; border-bottom-right-radius: 6px; font-weight: 500; }
.me.rejected .bubble { background: #2a2a2a; color: #cfcfcf; text-decoration: line-through; text-decoration-color: #777; }
.bot.section .bubble { background: transparent; border-color: #333; display: flex; flex-direction: column; gap: 4px; }
.tag { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #000; background: #fff; border-radius: 999px; padding: 2px 8px; }
.bot.section .bubble > span:last-child { color: var(--muted); font-size: 13.5px; }
.bot.consent .bubble { border-color: #3a3a3a; }
.bot.error .bubble { border-color: #4a4a4a; background: #101010; color: #e6e6e6; }
.bot.note .bubble { background: #0f0f0f; color: #cfcfcf; }
.bot.safety .bubble { background: #fff; color: #000; border-color: #fff; display: flex; flex-direction: column; gap: 8px; font-weight: 500; }
.bot.safety .tag { background: #000; color: #fff; }
.safety-links { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: #000; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 13px 14px; }
.typing .dot { width: 7px; height: 7px; border-radius: 50%; background: #8a8a8a; animation: dots 1.1s infinite ease-in-out; }
.typing .dot:nth-child(2) { animation-delay: .15s; }
.typing .dot:nth-child(3) { animation-delay: .3s; }

.welcome { text-align: center; padding: 4px 12px 14px; margin-bottom: 4px; }
.welcome-mascot { width: 54px; height: 54px; margin: 0 auto 8px; filter: drop-shadow(0 10px 28px rgba(255,255,255,.14)); }
.welcome-mascot svg, .screen-mascot svg { width: 100%; height: 100%; overflow: visible; }
.welcome h1 { margin: 0 0 6px; font-family: "Geist Display", var(--font); font-weight: 800; font-size: 30px; letter-spacing: -.05em; line-height: 1; }
.welcome p { margin: 0 auto; max-width: 32ch; font-size: 15px; color: #e4e4e4; }
.welcome p.muted { margin-top: 6px; }
.muted { color: var(--muted) !important; }
.small { font-size: 13px !important; }
.end-note { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* ---------- composer ---------- */
.composer {
  flex: none; border-top: 1px solid var(--line); background: #000;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 2px 2px 8px; }
.quick:empty { display: none; }
.qr {
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid #3a3a3a; background: #0c0c0c; color: #fff; font-size: 15px; font-weight: 550;
  transition: background .15s, border-color .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.qr:hover { border-color: #777; background: #161616; }
.qr:active { transform: scale(.97); }
.qr.primary { background: #fff; color: #000; border-color: #fff; }
.qr:disabled { opacity: .45; cursor: default; }
.send-row { display: flex; align-items: flex-end; gap: 8px; }
.field { flex: 1; min-width: 0; }
.input {
  display: block; width: 100%; min-height: 44px; max-height: 140px; padding: 11px 16px; resize: none;
  border-radius: 22px; border: 1px solid #2c2c2c; background: #0f0f0f; color: #fff;
  font-size: 16px; line-height: 1.35;   /* 16px: no zoom on iOS */
  color-scheme: dark;
}
.input::placeholder { color: #707070; }
.input:focus { outline: none; border-color: #8a8a8a; }
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid #2c2c2c; background: #0f0f0f; color: #d6d6d6;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.send { background: #fff; color: #000; border-color: #fff; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.send-row .back:only-child { margin-right: auto; }
.input-hint { margin: 6px 4px 0; font-size: 11.5px; color: #6f6f6f; text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- review ---------- */
.review { background: var(--panel); border: 1px solid #262626; border-radius: 22px; padding: 18px 16px 8px; margin-top: 12px; }
.review h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.02em; }
.review > p { margin: 0 0 10px; font-size: 13.5px; }
.review-group { border-top: 1px solid #1e1e1e; padding: 12px 0 6px; }
.review-group h3 { margin: 0 0 6px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.review dl { margin: 0; }
.review-item { padding: 7px 0; border-bottom: 1px solid #161616; }
.review-item:last-child { border-bottom: 0; }
.review dt { font-size: 12.5px; color: var(--muted); }
.review dd { margin: 2px 0 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.review .val { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.review .val.yes { font-weight: 650; }
.link { flex: none; background: none; border: 0; padding: 4px 0; color: #d6d6d6; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #555; font-size: 13.5px; cursor: pointer; }
.link:hover { color: #fff; text-decoration-color: #fff; }
.review-actions { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.review-actions p { margin: 0; text-align: center; }
.review-actions .link { align-self: center; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  border-radius: 22px 22px 22px 8px; border: 0; background: #fff; color: #000; text-decoration: none; cursor: pointer;
  font-size: 17px; font-weight: 650; letter-spacing: -.01em;
  box-shadow: 0 10px 34px -10px rgba(255,255,255,.35);
}
.cta.small { min-height: 44px; font-size: 15px; }
.cta:disabled { opacity: .6; cursor: default; }

/* ---------- waitlist / approved ---------- */
.screen-mode .progress .track span { background: #fff; }
.screen { margin: auto 0; padding: 28px 10px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.screen.enter { animation: pop .5s var(--ease) both; }
.screen-mascot { width: 92px; height: 92px; filter: drop-shadow(0 16px 40px rgba(255,255,255,.16)); animation: float 6s var(--ease) infinite; }
.kicker { margin: 4px 0 0; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.screen h1 { margin: 0; font-family: "Geist Display", var(--font); font-weight: 800; font-size: clamp(34px, 10vw, 48px); line-height: 1; letter-spacing: -.05em; }
.screen p { margin: 0; max-width: 36ch; color: #e4e4e4; }
.screen .lede { font-size: 16.5px; }
.next-steps { list-style: none; counter-reset: s; margin: 6px 0; padding: 0; text-align: left; max-width: 36ch; display: flex; flex-direction: column; gap: 8px; }
.next-steps li { counter-increment: s; position: relative; padding: 10px 14px 10px 44px; background: var(--bot); border: 1px solid var(--bot-line); border-radius: 16px; font-size: 15px; }
.next-steps li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #000; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
.mock-note { font-size: 12.5px !important; color: #000 !important; background: #e9e9e9; border-radius: 10px; padding: 6px 10px; }

/* ---------- desktop ---------- */
@media (min-width: 760px) {
  body { background: radial-gradient(1200px 700px at 50% -10%, #151515, #000 60%); }
  .app { height: calc(100dvh - 48px); margin-top: 24px; border: 1px solid #222; border-radius: 26px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(255,255,255,.12); }
  .bar { padding-top: 14px; }
  .log { padding: 22px 22px 24px; }
  .row.bot { padding-right: 24%; }
  .row.me { padding-left: 24%; }
}

@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dots { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- sign-in step ---------- */
.quick.signin { flex-direction: column; align-items: stretch; gap: 8px; }
.qr.provider { min-height: 50px; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.qr.provider::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.qr.provider-google { background: #fff; color: #000; border-color: #fff; }
.qr.provider-google { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.6 12.2c0-.7-.1-1.4-.2-2H12v3.9h5.4a4.6 4.6 0 0 1-2 3v2.5h3.2c1.9-1.7 3-4.3 3-7.4zM12 22c2.7 0 5-.9 6.6-2.4l-3.2-2.5c-.9.6-2 1-3.4 1-2.6 0-4.8-1.8-5.6-4.1H3.1v2.6A10 10 0 0 0 12 22zM6.4 14a6 6 0 0 1 0-4V7.4H3.1a10 10 0 0 0 0 9zM12 6c1.5 0 2.8.5 3.8 1.5l2.9-2.9A10 10 0 0 0 3.1 7.4L6.4 10C7.2 7.7 9.4 6 12 6z'/%3E%3C/svg%3E"); }
.qr.provider-telegram { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.9 4.3 18.7 19.4c-.2 1.1-.9 1.3-1.8.8l-4.9-3.6-2.4 2.3c-.3.3-.5.5-1 .5l.3-5 9.2-8.3c.4-.4-.1-.6-.6-.2L6.1 13.1l-4.9-1.5c-1.1-.3-1.1-1.1.2-1.6L20.5 2.7c.9-.3 1.7.2 1.4 1.6z'/%3E%3C/svg%3E"); }
.qr.provider-email { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm1 2.4V17h16V7.4l-8 5.2zM5.6 7 12 11.2 18.4 7z'/%3E%3C/svg%3E"); }
.account-note { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 14px; }
.account-note .link { font-size: 13px; }
.screen .link { font-size: 15px; }

/* Mascot beside Sono's messages: shown once, at the end of each run of Sono bubbles (like a messaging app). */
.row.bot { align-items: flex-end; gap: 8px; }
.row.bot::before { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #2a2a2a;
  background: #141414 url('/chat/icons/icon-192.png') center / 26px no-repeat; }
.row.bot:has(+ .row.bot)::before { visibility: hidden; }
.row.bot.wide::before { display: none; }

/* Crisis answer: the site's own 988/911 script on the sent screen (Sono has alerted Luke) */
.crisis-card { width: 100%; max-width: 460px; text-align: left; background: #fff; color: #000; border-radius: 22px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.screen .crisis-card p { margin: 0; max-width: none; color: #000; font-size: 15px; line-height: 1.5; font-weight: 500; }
.crisis-card .tag { align-self: flex-start; background: #000; color: #fff; }
.crisis-card .cta.small { background: #000; color: #fff; align-self: flex-start; }
/* Live Telegram Login Widget (iframe from oauth.telegram.org) */
.tg-widget { display: flex; justify-content: center; min-height: 44px; width: 100%; }

/* ---------- client web chat (client-chat.js; preview only) ---------- */
.client-mode .bar a.bar-btn { display: inline-flex; align-items: center; text-decoration: none; }
.cc-top { text-align: center; padding: 4px 0 10px; }
.cc-top p { margin: 0 auto; max-width: 34ch; }
.cc-day { display: flex; justify-content: center; margin: 10px 0 4px; }
.cc-day span { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; color: var(--muted); background: #0f0f0f; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.cc-msg .bubble { display: flex; flex-direction: column; gap: 3px; }
.cc-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-size: 11px; line-height: 1; font-weight: 500; opacity: .6; }
.cc-tg { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; letter-spacing: .02em; }
.cc-tg::before { content: ""; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.9 4.3 18.7 19.4c-.2 1.1-.9 1.3-1.8.8l-4.9-3.6-2.4 2.3c-.3.3-.5.5-1 .5l.3-5 9.2-8.3c.4-.4-.1-.6-.6-.2L6.1 13.1l-4.9-1.5c-1.1-.3-1.1-1.1.2-1.6L20.5 2.7c.9-.3 1.7.2 1.4 1.6z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.9 4.3 18.7 19.4c-.2 1.1-.9 1.3-1.8.8l-4.9-3.6-2.4 2.3c-.3.3-.5.5-1 .5l.3-5 9.2-8.3c.4-.4-.1-.6-.6-.2L6.1 13.1l-4.9-1.5c-1.1-.3-1.1-1.1.2-1.6L20.5 2.7c.9-.3 1.7.2 1.4 1.6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.cc-fail { font-weight: 650; }
.cc-msg.failed .bubble, .cc-msg.unanswered .bubble { opacity: .7; }
.cc-sys .bubble { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 14px; }
.cc-sys.cc-limit .bubble { border-color: #4a4a4a; border-style: dashed; }
.cc-buttons { justify-content: flex-start; }
.cc-chip { min-height: 40px; }
.cc-note { transition: color .2s; }
.cc-note.cc-empty { color: #bdbdbd; }
.client-composer .input { max-height: 140px; }
.row.cc-panel-row { padding-right: 0; margin: 6px 0 4px; }
.cc-panel { margin: 0; max-width: 520px; }
.cc-panel p { margin: 0; color: #000; font-size: 15px; line-height: 1.5; font-weight: 500; }
.cc-panel p.cc-panel-small { font-size: 13px; color: #444; font-weight: 450; }
.cc-panel .safety-links .chip, .cc-paused .chip { min-height: 40px; padding: 0 16px; }
.cc-panel .cta.small { align-self: stretch; }
.cc-paused { flex: none; margin: 0 auto; width: 100%; max-width: 760px; padding: 10px 16px 12px; background: #101010; border-bottom: 1px solid #2a2a2a;
  font-size: 13.5px; line-height: 1.45; color: #cfcfcf; }
.cc-paused strong { color: #fff; font-weight: 650; }
.cc-paused .cc-paused-links { margin-top: 8px; }
.cc-paused .chip { background: #fff; color: #000; min-height: 34px; padding: 0 14px; }
.cc-who { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cc-luke-msg .bubble { border-color: #3a3a3a; }
.typing-row .cc-slow { align-self: center; margin-left: 8px; font-size: 12.5px; color: var(--muted); }
.cc-blocked .crisis-card { margin-top: 6px; }
.row.bot.cc-msg:has(+ .row.bot.cc-panel-row)::before { visibility: visible; }   /* the bubble before a safety panel keeps its avatar */
.cc-paused .cc-banner-luke { border: 0; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; background: #000; color: #fff; border: 1px solid #444; }
.cc-paused.cc-flash { animation: ccflash .9s var(--ease); }
@keyframes ccflash { 0% { background: #2a2a2a; } 100% { background: #101010; } }
@media (prefers-reduced-motion: reduce) { .cc-paused.cc-flash { animation: none; } }

/* Google (assets/signin.css .gsi-btn: Google's light-theme button with the multicolor G); no mask icon */
.qr.provider-google.gsi-btn { background: #fff; color: #1f1f1f; border: 1px solid #747775; font-family: Roboto, "Google Sans", Arial, sans-serif; font-weight: 500; letter-spacing: .25px; gap: 12px; }
.qr.provider-google.gsi-btn::before { display: none; }
#google-again { width: 100%; max-width: 340px; }
