/* BlackC public pages: the landing page, sign-in and account. Same tokens as the Hub (renderer/hub.css):
   dark by default, light when the browser asks for it. No web fonts, no external requests (the CSP is 'self'). */
:root {
  color-scheme: dark light;
  --bg: #141714;
  --surface: #1a1e1a;
  --surface-2: #212621;
  --surface-3: #2a302a;
  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.16);
  --text: #eaefe9;
  --text-2: #b7beb6;
  --muted: #8d968c;
  --accent: #3fcf7f;
  --accent-ink: #0b120d;
  --accent-soft: rgb(63 207 127 / 0.14);
  --accent-glow: rgb(63 207 127 / 0.10);
  --blue: #6ea2ff;
  --violet: #b18cff;
  --amber: #f5b544;
  --red: #ff6b6b;
  --accent-text: #3fcf7f;
  --shadow: 0 12px 32px rgb(0 0 0 / 0.45);
  --r: 12px;
  --r-sm: 8px;
  --ink: #141714;
  --ink-text: #eaefe9;
  --ink-muted: #8d968c;
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7f5;
    --surface: #ffffff;
    --surface-2: #eef3f0;
    --surface-3: #e2e9e5;
    --border: rgb(16 40 28 / 0.10);
    --border-strong: rgb(16 40 28 / 0.18);
    --text: #16201a;
    --text-2: #3a4a41;
    --muted: #637169;
    --accent: #12854c;
    --accent-ink: #ffffff;
    --accent-soft: rgb(18 133 76 / 0.10);
    --accent-glow: rgb(18 133 76 / 0.08);
    --blue: #2f6fe0;
    --violet: #7c4dd8;
    --amber: #b7791f;
    --red: #b42318;
    --accent-text: #0e6b3d;
    --shadow: 0 12px 32px rgb(16 40 28 / 0.14);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; }
p { margin: 0 0 16px; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
[hidden] { display: none !important; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border-strong); }

/* ---------- buttons ---------- */
button, .btn, a.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; font: inherit; font-weight: 550; line-height: 1.2; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm); cursor: pointer; text-decoration: none; }
button:hover, .btn:hover, a.button:hover { background: var(--surface-2); text-decoration: none; }
button:focus-visible, .btn:focus-visible, a.button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
a:focus-visible:not(.btn):not(.button) { border-radius: 4px; }
button.primary, .btn.primary, a.button.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
button.primary:hover, .btn.primary:hover, a.button.primary:hover { background: var(--accent); filter: brightness(1.08); }
button.primary:focus-visible, .btn.primary:focus-visible, a.button.primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary, a.button.primary { width: 100%; min-height: 44px; }
button.primary.auto, .btn.primary { width: auto; }
.btn.lg { min-height: 46px; padding: 0 22px; font-size: 16px; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.quiet:hover { background: var(--surface-2); }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
button:disabled { opacity: 0.55; cursor: default; filter: none; }
button.link { min-height: 0; padding: 2px 0; border: 0; background: none; color: var(--muted); font-weight: 400; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover { background: none; color: var(--text); }
button.link:focus-visible { border-radius: 4px; }
a.button { margin: 0 0 16px; }

/* ---------- forms ---------- */
label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 550; color: var(--text-2); }
/* "Keep me signed in on this browser" (on a shared computer, untick it) */
label.keep { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; font-weight: 450; cursor: pointer; }
label.keep input { width: auto; margin: 0; }
input, select { display: block; width: 100%; min-height: 44px; margin: 0 0 14px; padding: 9px 12px; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; }
input::placeholder { color: var(--muted); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.code { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: 0.22em; text-align: center; padding-left: 0.22em; min-height: 56px; }
input.mono { font-family: var(--mono); letter-spacing: 0.06em; }
.error { min-height: 20px; margin: 0 0 8px; font-size: 14px; color: var(--red); }
.notice { margin-bottom: 16px; padding: 12px; border: 1px solid var(--accent); border-radius: var(--r-sm); color: var(--accent); }

/* ---------- cards ---------- */
.card { margin-bottom: 16px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.card h1 { margin: 0 0 8px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.card > p.muted { margin-bottom: 20px; font-size: 15px; }
.card form p:last-child, .card > p:last-child { margin-bottom: 0; }
.card > p:has(> button.link) { margin: 18px 0 0; text-align: center; }
.qr { width: 200px; height: 200px; margin: 0 auto 16px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.secret { display: inline-block; font-family: var(--mono); font-size: 14px; color: var(--text); word-break: break-all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 0 0 16px; padding: 14px; list-style: none; font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.codes li { padding: 2px 0; text-align: center; overflow-wrap: anywhere; }
#b-copy { width: 100%; margin-bottom: 4px; }
#s-codes > p:has(> #b-copy) { margin: 0 0 12px; }
dialog { width: min(400px, calc(100vw - 32px)); padding: 24px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; }
dialog::backdrop { background: rgb(0 0 0 / 0.5); }

/* ---------- sign-in: brand panel + card ---------- */
.auth { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.auth-side { display: none; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px 56px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { margin: 0 0 28px; }
.auth-box .card { margin-bottom: 0; }
.auth-foot { margin: 20px 0 0; font-size: 13px; text-align: center; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(380px, 5fr) 6fr; }
  .auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; color: var(--ink-text); background: radial-gradient(70% 55% at 15% 0%, rgb(63 207 127 / 0.16), transparent 70%), var(--ink); border-right: 1px solid rgb(255 255 255 / 0.06); }
  .auth-side .brand { color: var(--ink-text); font-size: 22px; }
  .auth-side .auth-title { max-width: 14ch; margin: 0 0 28px; font-size: 42px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
  .auth-points { display: grid; gap: 16px; padding: 0; list-style: none; }
  .auth-points li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #d3dad2; }
  .auth-points .tick { flex: none; display: grid; place-items: center; width: 26px; height: 26px; color: #3fcf7f; background: rgb(63 207 127 / 0.14); border-radius: 50%; }
  .auth-side .muted { margin: 0; color: var(--ink-muted); font-size: 14px; }
  .auth-main { padding: 48px 32px; }
  .auth-logo, .auth-foot { display: none; }
}
@media (max-width: 520px) { .card { padding: 20px; } }

/* ---------- account ---------- */
.page { max-width: 480px; margin: 0 auto; padding: 32px 16px 56px; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.row.top { margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.page .card h1 { font-size: 22px; overflow-wrap: anywhere; }
.page .card > .muted { margin-bottom: 16px; font-size: 15px; }
.page .card .small { margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; }
.page select { margin-bottom: 16px; }
.page-foot { margin: 20px 0 0; font-size: 13px; text-align: center; }
#ws-pick { margin-top: 20px; }

/* ---------- landing ---------- */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; background: radial-gradient(60% 55% at 78% 0%, var(--accent-glow), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 5px 12px 5px 10px; font-size: 13px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; }
.eyebrow::before { content: ''; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.hero h1 { margin: 0 0 20px; font-size: clamp(34px, 8vw, 54px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.hero .lead { max-width: 34em; margin: 0 0 28px; font-size: 18px; line-height: 1.55; color: var(--text-2); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.invite { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* the call-screen illustration (HTML and CSS only) */
.mock { max-width: 520px; width: 100%; margin: 0 auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; user-select: none; }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border); }
.mock-bar .live { width: 8px; height: 8px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 3px rgb(255 107 107 / 0.18); }
.mock-bar .time { margin-left: auto; font-family: var(--mono); font-weight: 400; color: var(--muted); }
.mock-body { display: grid; gap: 14px; padding: 16px; }
.bubble { max-width: 86%; padding: 10px 14px; font-size: 15px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; }
.bubble .who { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.answer { padding: 14px; background: var(--accent-soft); border: 1px solid rgb(63 207 127 / 0.28); border-radius: 12px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; padding: 3px; width: fit-content; background: var(--surface-2); border-radius: 9px; }
.tab { padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-radius: 6px; }
.tab.on { color: var(--accent-ink); background: var(--accent); }
.facts { display: grid; gap: 8px; padding: 0; list-style: none; font-size: 14px; color: var(--text); }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 8px; background: var(--accent); border-radius: 50%; }
.facts .src { display: block; font-size: 12px; color: var(--muted); }
.mp { padding: 12px 14px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.mp-head { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mp-head .n { letter-spacing: 0; text-transform: none; font-weight: 500; }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.bar { display: grid; gap: 4px; justify-items: center; }
.bar .track { display: block; width: 100%; height: 6px; overflow: hidden; background: var(--surface-3); border-radius: 3px; }
.bar .fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar .fill.full { width: 100%; }
.bar .fill.part { width: 55%; }
.bar .fill.low { width: 25%; }
.bar .fill.none { width: 0; }
.bar b { font-size: 11px; font-weight: 600; color: var(--muted); }

/* sections */
.section { padding: 72px 0; }
.section-head { max-width: 620px; margin: 0 0 36px; }
.section-head h2 { margin: 0 0 10px; font-size: clamp(26px, 5vw, 34px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.section-head p { margin: 0; font-size: 17px; color: var(--text-2); }
.features { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 0; list-style: none; }
.feature { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.feature h3 { margin: 16px 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 15px; color: var(--text-2); }
.tile { display: grid; place-items: center; width: 42px; height: 42px; color: var(--accent); background: var(--accent-soft); border-radius: 11px; }
.tile.blue { color: var(--blue); background: rgb(110 162 255 / 0.14); }
.tile.violet { color: var(--violet); background: rgb(177 140 255 / 0.14); }
.tile.amber { color: var(--amber); background: rgb(245 181 68 / 0.14); }
@media (prefers-color-scheme: light) {
  .tile.blue { background: rgb(47 111 224 / 0.10); }
  .tile.violet { background: rgb(124 77 216 / 0.10); }
  .tile.amber { background: rgb(183 121 31 / 0.12); }
  .answer { border-color: rgb(18 133 76 / 0.25); }
}
.trust { padding: 0 0 72px; }
.trust-list { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 0; padding: 24px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.trust-list li { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--text-2); }
.trust-list .tile { flex: none; width: 38px; height: 38px; border-radius: 10px; }
.site-foot { padding: 28px 0 40px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.site-foot .legal { flex-basis: 100%; margin: 0; font-size: 12px; line-height: 1.5; }
.site-foot a { color: var(--text-2); }

@media (min-width: 640px) {
  .features { grid-template-columns: 1fr 1fr; }
  .trust-list { grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 28px; }
}
@media (min-width: 900px) {
  .wrap { padding: 0 32px; }
  .hero { padding: 88px 0 104px; }
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .section { padding: 96px 0; }
}
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .hero .lead { font-size: 17px; }
  .bars { gap: 4px; }
  .cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- signing in to the desktop app ---------- */
.who { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-size: 15px; }
.who dt { color: var(--muted); }
.who dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.warning { margin: 0 0 16px; padding: 12px; font-size: 14px; color: var(--text-2); border: 1px solid var(--amber); border-radius: var(--r-sm); }
.big-code { margin: 0 0 16px; padding: 14px 8px; font-family: var(--mono); font-size: 32px; font-weight: 650; letter-spacing: 0.16em; text-align: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; user-select: all; }
