:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --ink: #0b0b0c;
  --ink-soft: #5d5d63;
  --line: #e6e6e3;
  --accent: #0b0b0c;
  --accent-ink: #ffffff;
  --ok: #12805c;
  --warn: #b4540a;
  --bad: #b3261e;
  --radius: 18px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --bg-soft: #151517;
    --ink: #f4f4f2;
    --ink-soft: #a0a0a8;
    --line: #26262a;
    --accent: #f4f4f2;
    --accent-ink: #0b0b0c;
    --ok: #4cc79a;
    --warn: #f0a35e;
    --bad: #f2867f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---- nav ---- */
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; text-decoration: none; }
.brand span { color: var(--ink-soft); font-weight: 450; }
.nav-right { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 14px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 550; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-soft); opacity: 1; }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }

/* segmented choice: which AI is on the computer */
.seg { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.seg-label { font-size: 14px; color: var(--ink-soft); margin-inline-end: 4px; }
.seg-btn {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer;
}
.seg-btn:hover { background: var(--bg-soft); }
.seg-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---- hero ---- */
.hero { padding: 72px 0 56px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-soft); margin-bottom: 22px; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 650; margin: 0 0 22px; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 640; margin: 0 0 14px; }
h3 { font-size: 18px; letter-spacing: -0.015em; font-weight: 620; margin: 0 0 6px; }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 34em; margin: 0 0 30px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fine { font-size: 13px; color: var(--ink-soft); }

/* ---- chat mock ---- */
.phone { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 28px; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-end-end-radius: 6px; }
.bubble.ella { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-end-start-radius: 6px; }
.bubble .ask-btns { display: flex; gap: 6px; margin-top: 8px; }
.bubble .ask-btns span { flex: 1; text-align: center; padding: 6px 0; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }

/* ---- sections ---- */
section { padding: 64px 0; border-top: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 34px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card.soft { background: var(--bg-soft); border-color: transparent; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.step-n { font: 600 13px var(--mono); color: var(--ink-soft); margin-bottom: 14px; }
.levels { margin-top: 30px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.level { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--line); }
.level:first-child { border-top: 0; }
.level b { font: 600 14px var(--mono); }
.level span { color: var(--ink-soft); font-size: 15px; }
footer { padding: 36px 0 56px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 20px; z-index: 10; }
.modal .card { width: 100%; max-width: 440px; text-align: center; padding: 34px 30px; }
.code { font: 650 46px/1 var(--mono); letter-spacing: .12em; margin: 22px 0 8px; }
.modal ol { text-align: start; color: var(--ink-soft); font-size: 15px; padding-inline-start: 20px; margin: 18px 0 24px; }
.modal li { margin: 6px 0; }
.status { margin-top: 18px; font-size: 14px; color: var(--ink-soft); min-height: 1.5em; }

.mt-l { margin-top: 34px; } .mt-s { margin-top: 14px; } .h-modal { font-size: 26px; }

/* ---- dashboard ---- */
.dash { padding: 28px 0 80px; display: grid; gap: 20px; }
.dash h1 { font-size: 34px; margin: 8px 0 4px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.muted { color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 550; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); }
.pill.ok .dot { background: var(--ok); } .pill.ok { color: var(--ok); }
.pill.warn .dot { background: var(--warn); } .pill.warn { color: var(--warn); }
.pill.bad .dot { background: var(--bad); } .pill.bad { color: var(--bad); }
/* M-171 review MF-2: a bare .dot (e.g. the dashboard "new" indicator next to a plain link)
   has no parent .pill (display:inline-flex) to size it, so it draws 0x0. .dot-new gives it
   its own display/alignment, and an accent colour (not --ink-soft grey) so it actually draws attention. */
.dot-new { display: inline-block; vertical-align: middle; background: var(--warn); margin-inline-start: 4px; }
/* M-171 review MF-2 (point 3): an off-screen label for the dot above, which is aria-hidden. */
.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; }
.copybox { display: flex; gap: 10px; align-items: stretch; margin-top: 14px; }
.copybox code, pre.prompt {
  flex: 1; display: block; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font: 14px/1.5 var(--mono); overflow-wrap: anywhere; white-space: pre-wrap; margin: 0;
}
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); font-size: 14px; color: var(--ink-soft); }
.steps { margin: 16px 0 0; padding-inline-start: 20px; color: var(--ink-soft); font-size: 15px; }
.steps li { margin: 10px 0; }
.steps b { color: var(--ink); font-weight: 600; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin-top: 16px; font-size: 15px; }
.kv dt { color: var(--ink-soft); } .kv dd { margin: 0; }
.channels { display: grid; gap: 10px; margin-top: 16px; }
.channel { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; font-size: 15px; }
.activity { list-style: none; margin: 14px 0 0; padding: 0; font: 13px/1.9 var(--mono); color: var(--ink-soft); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 36px; }
  .grid3, .grid2 { grid-template-columns: 1fr; }
  .level { grid-template-columns: 1fr; gap: 4px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; }
  .copybox { flex-direction: column; }
}

/* ---- auth page ---- */
.auth { display: grid; place-items: start center; padding: 24px 20px 80px; }
.auth-card { width: 100%; max-width: 440px; padding: 36px 32px; }
.auth-title { font-size: 30px; margin: 0 0 6px; }
.auth-card > .muted { margin: 0 0 24px; }
.wide { width: 100%; margin-top: 10px; }
.mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); font: 700 12px var(--mono); }
.or { display: flex; align-items: center; gap: 14px; margin: 22px 0 8px; color: var(--ink-soft); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: block; margin-top: 14px; }
.field span, .field label { display: block; font-size: 13px; font-weight: 550; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; outline: none;
}
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; outline: none; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.auth-error { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--bad); color: var(--bad); font-size: 14px; }
.switch { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
.switch a { color: var(--ink); font-weight: 600; }
#panel-telegram { text-align: center; }
.tg-steps { text-align: start; color: var(--ink-soft); font-size: 15px; padding-inline-start: 20px; margin: 18px 0 8px; }
.tg-steps li { margin: 6px 0; }

/* ---- pricing ---- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; }
.plan { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.plan.current { border-color: var(--ink); }
.plan .price { font-size: 34px; font-weight: 650; letter-spacing: -0.03em; margin: 10px 0 2px; }
.plan .price small { font-size: 14px; font-weight: 450; color: var(--ink-soft); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 20px; font-size: 14px; color: var(--ink-soft); flex: 1; }
.plan li { margin: 7px 0; padding-inline-start: 20px; position: relative; }
.plan li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ink); }
.plan li.no::before { content: "–"; color: var(--ink-soft); }
.plan .btn { width: 100%; }
.meter { height: 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; margin-top: 14px; }
.meter > i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.meter.hot > i { background: var(--warn); }
.meter.full > i { background: var(--bad); }
.w0{width:0}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w50{width:50%}
.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}
@media (max-width: 900px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }

/* ---- naming ---- */
#rest { display: grid; gap: 20px; }
.naming { padding: 34px 30px; }
.name-input {
  flex: 1; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; outline: none;
}
.name-input:focus { border-color: var(--ink); }
#naming-error { color: var(--bad); min-height: 1.4em; }

/* ---- privacy page & account ---- */
.prose { padding: 20px 0 60px; }
.prose h1 { font-size: 44px; margin-bottom: 14px; }
.prose h2 { font-size: 24px; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 16px; }
.prose li { margin: 8px 0; }
.prose b { color: var(--ink); font-weight: 600; }
.prose ul { padding-inline-start: 20px; }
.prose code { font: 14px var(--mono); background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; }
.facts { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.facts th, .facts td { text-align: start; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); }
.facts th { font-size: 13px; color: var(--ink-soft); font-weight: 600; border-top: 0; }
.facts td:first-child { color: var(--ink); width: 46%; text-align: start; }
.facts td:last-child { color: var(--ink-soft); }
.legal { text-align: center; margin-top: 16px; }
/* M-169: the home page's visible cancel/delete-account link (terms §8.3), centered under the main CTA. */
#cancel-account-home { text-align: center; }
.small-input { font-size: 15px; font-weight: 500; height: 44px; }
.btn.danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); opacity: 1; }
#delete-error { color: var(--bad); min-height: 1.4em; }

.disclaimer { margin: 14px 0 0; font-size: 12px; color: var(--ink-soft); opacity: .8; }
.table-scroll { overflow-x: auto; }
.prose h3 { font-size: 18px; margin: 26px 0 8px; }
.prose .facts td, .prose .facts th { font-size: 14px; }
.prose .facts td:first-child { width: 34%; }

/* ---- setup guide ---- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.toc a { font-size: 13px; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); }
.toc a:hover { color: var(--ink); border-color: var(--ink); }
.guide h2 { scroll-margin-top: 20px; padding-top: 8px; }
.guide .levels { margin: 16px 0; }
.guide .facts td:first-child { width: 44%; }
.guide .facts code, .card code { white-space: nowrap; }
.card code { font: 13px var(--mono); background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; }

/* ---- shown on phones only ---- */
.only-phone { display: none; }
@media (max-width: 820px), (pointer: coarse) { .only-phone { display: block; } }
.handoff { border-color: var(--ink); }
.handoff .steps { margin-top: 12px; }

/* ---- M-138: IA groups + language switch + RTL ---- */
.group-h { font-size: 14px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-soft); margin: 30px 0 2px; }
.dash .group-h:first-of-type { margin-top: 4px; }
.group-intro { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; }
.ia-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.ia-nav a { font-size: 13px; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); }
.ia-nav a:hover { color: var(--ink); border-color: var(--ink); }
.onboard-steps { counter-reset: ob; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button { font: inherit; font-size: 13px; font-weight: 600; background: transparent; color: var(--ink-soft); border: 0; padding: 6px 12px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
/* numbers / latin snippets / phone numbers embedded in RTL text */
bdi, .ltr-snippet { unicode-bidi: isolate; }

html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .mirror-rtl { transform: scaleX(-1); }
html[dir="rtl"] .bubble .ask-btns span,
html[dir="rtl"] .prose code,
html[dir="rtl"] code,
html[dir="rtl"] pre.prompt { unicode-bidi: isolate; }
html[dir="rtl"] .modal ol,
html[dir="rtl"] .steps,
html[dir="rtl"] .tg-steps,
html[dir="rtl"] .prose ul { direction: rtl; }

@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: clamp(30px, 9vw, 40px); }
  .plans { grid-template-columns: 1fr; }
  .grid3, .grid2 { grid-template-columns: 1fr; }
}

/* ---- M-138: shared site header/footer (exact markup shared with /features /pricing /help) ---- */
.site-header {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 72px;
}
.site-header .logo { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); }
.site-header nav { display: flex; gap: 18px; align-items: center; flex: 1; justify-content: center; }
.site-header nav a { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
.site-header .lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.site-header .lang button { font: inherit; font-size: 13px; font-weight: 600; background: transparent; color: var(--ink-soft); border: 0; padding: 6px 12px; cursor: pointer; }
.site-header .lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.site-header > a[href="/login"] { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.site-header > a.btn { height: 38px; padding: 0 18px; }
@media (max-width: 760px) { .site-header nav { display: none; } }

.site-footer {
  max-width: 1080px; margin: 0 auto; padding: 36px 24px 56px;
  border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px;
}
.site-footer .footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 22px; }
.site-footer .footer-col h3 { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); margin: 0 0 10px; }
.site-footer .footer-col a { display: block; font-size: 14px; color: var(--ink-soft); text-decoration: none; margin: 6px 0; }
.site-footer .footer-col a:hover { color: var(--ink); }
.site-footer .tagline { margin: 0; font-size: 13px; }
@media (max-width: 700px) { .site-footer .footer-cols { grid-template-columns: 1fr; } }

/* home hero + cta band (no inline styles, for a strict CSP) */
.home-hero-inner { display: grid; grid-template-columns: 1fr; gap: 16px; }
.cta-row-center { justify-content: center; }
.start-steps { padding-inline-start: 0; list-style: none; display: grid; gap: 20px; margin-top: 24px; }

/* checklist (dashboard, top of page) */
.checklist { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.checklist .tick { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); }
.checklist li.on .tick { background: var(--ok); }

/* M-138 deck-B pages (moved out of inline <style>: the site CSP default-src 'self' blocks inline styles) */
/* features */
.features-hero { text-align: center; padding-block: 2.5rem 1.5rem; }
.feature-group { max-width: 760px; margin-inline: auto; padding-block: 1.75rem; border-block-start: 1px solid var(--border, #e3e3e3); }
.feature-group:first-of-type { border-block-start: none; }
.feature-group h2 { display: flex; align-items: center; gap: 0.6rem; }
.tag { font-size: 0.75rem; padding-inline: 0.5rem; padding-block: 0.15rem; border-radius: 999px; background: var(--tag-bg, #eef); }
.feature-group ul { padding-inline-start: 1.25rem; }
.feature-group li { margin-block-end: 0.4rem; }
/* help */
.help-hero { text-align: center; padding-block: 2.5rem 1.5rem; }
.faq-list { max-width: 720px; margin-inline: auto; }
.faq-list details { border-block-end: 1px solid var(--border, #e3e3e3); padding-block: 0.75rem; }
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list p { margin-block-start: 0.5rem; }
/* pricing */
.pricing-hero { text-align: center; padding-block: 2.5rem 1.5rem; }
.pricing-cards { display: flex; flex-wrap: wrap; gap: 1.25rem; max-width: 760px; margin-inline: auto; }
.pricing-card { flex: 1 1 260px; border: 1px solid var(--border, #e3e3e3); border-radius: 12px; padding: 1.25rem; }
.pricing-placeholder { max-width: 760px; margin-inline: auto; padding-block: 1rem; color: var(--muted, #666); }
.pricing-cta { text-align: center; padding-block: 2rem; }
/* privacy-and-control */
.privacy-hero { text-align: center; padding-block: 2.5rem 1.5rem; }
.privacy-section { max-width: 720px; margin-inline: auto; padding-block: 1.5rem; border-block-start: 1px solid var(--border, #e3e3e3); }
.privacy-section:first-of-type { border-block-start: none; }
.privacy-cta { text-align: center; padding-block: 2rem; }
.pricing-plans { max-width: 1080px; margin: 1.5rem auto 0; }

/* ---- M-148: tabbed dashboard ---- */
.dash-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.dash-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 550; }
.dash-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.dash-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.dash-nav a[hidden] { display: none; }
.tab-ico { width: 18px; text-align: center; font-size: 14px; }
.dash-panels { min-width: 0; }
.tab-panel { display: grid; gap: 20px; }
.tab-panel[hidden] { display: none; }
.tab-panel > .group-h:first-child { margin-top: 0; }
.panel-h { font-size: 20px; margin: 0 0 8px; }
.intro p { max-width: 70ch; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; background: var(--bg); }
.stat:hover { border-color: var(--ink-soft); }
.stat[hidden] { display: none; }
.stat-k { font-size: 13px; color: var(--ink-soft); font-weight: 550; }
.stat-v { font-size: 24px; font-weight: 650; line-height: 1.2; }
.stat-s { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.stat .meter { margin-top: 6px; }
.guide-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.guide-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.gs-n { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); font: 600 13px var(--mono); background: var(--bg); }
.guide-steps li.on .gs-n { background: var(--ok); border-color: var(--ok); color: #fff; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 8px; }
/* Checkboxes and radios at a normal size (Amit, M-148): the old `.field input` rule sized
   them like text boxes. */
.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check b { color: var(--ink); }
input[type="checkbox"], input[type="radio"],
.field input[type="checkbox"], .field input[type="radio"] { width: 18px; height: 18px; min-width: 18px; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.voice-row { align-items: center; }
.voice-row input { margin-top: 0; }
@media (max-width: 820px) {
  .dash-layout { grid-template-columns: 1fr; gap: 16px; }
  .dash-nav { top: 0; z-index: 5; flex-direction: row; overflow-x: auto; gap: 4px; padding: 6px; scrollbar-width: none; }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav a { flex: none; padding: 8px 12px; font-size: 14px; white-space: nowrap; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px; }
  .stat-v { font-size: 20px; }
}
.tab-panel { padding: 0; border-top: 0; } /* tabs are <section>s; drop the site-wide section band */
/* "142 / 2,500" must read left-to-right in Hebrew too */
.stat-v.num { direction: ltr; unicode-bidi: isolate; align-self: flex-start; }

/* ---- M-152: my memory ---- */
.mem-edit {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; outline: none; resize: vertical; margin-top: 8px; min-height: 70px;
}
.mem-edit:focus { border-color: var(--ink); }
.chat-mem { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.chat-mem:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.chat-mem h4 { margin: 14px 0 6px; font-size: 14px; }

/* M-159: plain dashboard. One big title + one line per page, readable text, sub-cards, Advanced set apart. */
.dash .page-h { font-size: 30px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.dash .page-lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 18px; }
.dash .tab-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.dash .tab-panel > .page-h, .dash .tab-panel > .page-lead { margin-bottom: 0; }
.dash .card p, .dash .card li, .dash .card label { font-size: 16px; }
.dash .card .fine { font-size: 15px; }
.dash .card h3 { font-size: 20px; margin: 0 0 8px; }
.subcard { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
#calls-month { font-size: 18px; font-weight: 600; margin: 8px 0 4px; }
#calls-month-meter { height: 12px; margin-top: 6px; }
.dash details > summary { cursor: pointer; font-weight: 600; }
.dash-nav a.nav-adv { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; font-size: 14px; font-weight: 500; }
.adv-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 18px 22px; }
.adv-group > summary { list-style: none; display: grid; gap: 2px; }
.adv-group > summary::-webkit-details-marker { display: none; }
.adv-group > summary b { font-size: 19px; }
.adv-group > summary b::after { content: "  ▾"; color: var(--ink-soft); font-size: 14px; }
.adv-group[open] > summary { margin-bottom: 14px; }
.adv-group > .card, .adv-group > .group-h { margin-top: 12px; }

/* ---- M-160: phones and tablets ---- */
.nav-toggle { display: none; }
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check-row input { margin-top: 3px; }
#calls-recent { list-style: none; padding: 0; margin: 8px 0 0; }
#calls-recent li { padding: 12px 0; border-top: 1px solid var(--line); }
#calls-recent li:first-child { border-top: 0; }
.voice-row { flex-wrap: wrap; }
.voice-row .btn { margin-inline-start: auto; }

@media (max-width: 820px) {
  /* the menu folds behind one full-width button that names the current page */
  .nav-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px;
    position: sticky; top: 8px; z-index: 6; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-align: start;
  }
  .nav-toggle-ico { font-size: 20px; line-height: 1; }
  .nav-toggle-sep { color: var(--ink-soft); }
  .nav-toggle[aria-expanded="true"] { border-color: var(--ink); }
  .dash-nav { display: none; position: static; flex-direction: column; overflow: visible; gap: 2px; padding: 8px; margin-top: -8px; }
  .dash-nav.open { display: flex; }
  .dash-nav a { min-height: 48px; padding: 0 14px; font-size: 16px; white-space: normal; }
  .dash-nav a.nav-adv { font-size: 15px; }

  /* tap targets: 44 px or more */
  .btn, .btn.small { min-height: 44px; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .dash details > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; }
  .adv-group > summary { display: grid; align-content: center; }
  .check, .check-row { min-height: 44px; align-items: center; font-size: 16px; }
  .check input[type="checkbox"], .check input[type="radio"], .check-row input[type="checkbox"] { width: 24px; height: 24px; min-width: 24px; margin: 0; }
  .name-input, .small-input, .copybox input { min-height: 48px; width: 100%; font-size: 16px; } /* 16px: no zoom-on-focus on iPhone */
  .copybox { align-items: stretch; }
  .copybox .btn { width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .channel { flex-wrap: wrap; }

  /* text: readable sizes, long words and codes wrap instead of overflowing */
  .dash .card { padding: 20px 18px; }
  .dash .activity { font: 14px/1.6 inherit; font-family: inherit; }
  .dash .activity li { padding: 6px 0; }
  .dash .card, .dash .card * { overflow-wrap: anywhere; }
  .dash pre.prompt { white-space: pre-wrap; word-break: break-all; }
  .dash .page-h { font-size: 26px; }
  .dash .page-lead { font-size: 17px; }

  /* the two "type DELETE" confirmations read as a box of their own */
  #delete-box, #memory-wipe-box, #memory-consent-withdraw-box { margin-top: 14px; padding: 14px; border: 1px solid var(--bad); border-radius: 14px; }
}

@media (max-width: 560px) {
  .site-header { height: auto; min-height: 64px; padding: 8px 16px; gap: 8px; flex-wrap: nowrap; }
  .site-header .logo { font-size: 18px; white-space: nowrap; }
  .site-header #who { display: none; }
  .site-header .lang button { min-height: 44px; min-width: 44px; padding: 0 10px; }
  .site-header #signout { min-height: 44px; white-space: nowrap; padding: 0 12px; }
  .dash { padding-top: 12px; }
  .dash h1 { font-size: 28px; }
  .wrap { padding: 0 14px; }
}
@media (max-width: 820px) {
  /* links that stand alone (not inside a sentence) get a full-size tap area too */
  /* inline-block + padding, not flex: Hebrew wraps Latin words in <bdi>, and flex would eat the spaces between them */
  .dash .card a.fine, .dash .kv dd a, .site-header .logo { display: inline-block; padding: 12px 0; line-height: 20px; }
}
@media (max-width: 820px) {
  .site-header nav a { display: inline-block; padding: 12px 0; line-height: 20px; }
  .site-header .lang button { min-height: 44px; }
  .dash p.fine > a:only-child { display: inline-block; padding: 12px 0; line-height: 20px; }
  .dash .adv-group > summary { display: grid; align-content: center; }
}

/* M-161: one-time notice on Home — line breaks kept, links readable */
#notice-text { white-space: pre-line; overflow-wrap: anywhere; }
.notice-card { border-color: var(--ink); }

/* M-164: legal pages — EN/עברית switch, the "English is binding" note, phones */
.legal-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.legal-lang a { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; padding: 8px 12px; min-height: 36px; display: inline-flex; align-items: center; }
.legal-lang a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.prose .legal-note { margin: 16px 0 8px; padding: 12px 16px; border: 1px solid var(--line); border-inline-start: 4px solid var(--ink); border-radius: 10px; background: var(--bg-soft); }
.prose .legal-note p { margin: 0; color: var(--ink); }
.legal-page .prose { overflow-wrap: anywhere; }
.legal-page .nav-right > a:not(.btn) { padding: 10px 4px; min-height: 40px; display: inline-flex; align-items: center; }
.legal-page .prose .facts { display: block; overflow-x: auto; }
@media (max-width: 520px) {
  .legal-page .nav { height: auto; min-height: 64px; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
  .legal-page .nav-right { gap: 10px; flex-wrap: wrap; }
  .legal-page .prose h1 { font-size: clamp(28px, 8vw, 36px); }
  .legal-page .prose h2 { font-size: 20px; margin-top: 30px; }
}

/* ---- M-191: home page design (Laura 1810 note). Strict CSP: classes only, no inline styles. ---- */
/* Fix 5, v2 (M-191b, Amit 19:21: "black and white, white in different opacities"): no colour accent.
   --hi = the page's ink (white on the dark theme, black on the light one), at set opacities:
   solid for CTAs and marks, 70% for secondary text (AA: 8.5-8.9:1 dark, 7.2-7.6:1 light),
   40% for borders, 10% for fills. 40% and 10% are never used for text. */
:root {
  --hi: var(--ink); --hi-ink: var(--bg);
  --hi-70: color-mix(in srgb, var(--ink) 70%, transparent);
  --hi-40: color-mix(in srgb, var(--ink) 40%, transparent);
  --hi-10: color-mix(in srgb, var(--ink) 10%, transparent);
}

/* Fix 1: the header never makes the page wider than the screen. */
/* review r1: inline-flex only where the logo carries the mark (flex would eat spaces between Hebrew <bdi> runs) */
.site-header .logo:has(.logo-mark) { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.logo-mark { width: 22px; height: 22px; color: var(--hi); flex: none; }
.site-header > a.btn { white-space: nowrap; }
@media (max-width: 560px) {
  /* marketing pages (a CTA link in the header): wrap to a second row instead of overflowing */
  .site-header:has(> a.btn) { flex-wrap: wrap; row-gap: 0; }
  /* home: the hero right below has both buttons, so the header keeps only logo + language */
  body.home .site-header > a[href="/login"], body.home .site-header > a.btn { display: none; }
}

/* hero: copy + the chat demo */
.home-hero { display: block; padding: 56px 0 64px; background: radial-gradient(ellipse 80% 70% at 50% 0%, var(--hi-10), transparent 70%); }
.home-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.home-hero-copy { min-width: 0; }
.home-eyebrow { color: var(--hi-70); border-color: var(--hi-40); margin-bottom: 18px; }
.home-hero-note { margin: 14px 0 0; }
.btn-hi { background: var(--hi); color: var(--hi-ink); }
body.home .cta-row .btn { white-space: nowrap; }

/* Fix 3: the WhatsApp-style demo (static) */
.demo { margin: 0; min-width: 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: 0 24px 60px -32px var(--hi-40); }
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.demo-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--hi); color: var(--hi-ink); display: grid; place-items: center; flex: none; }
.demo-avatar svg { width: 18px; height: 18px; }
.demo-who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.demo-who small { color: var(--ink-soft); font-size: 12px; }
.demo-chat { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.demo-chat .bubble { margin: 0; max-width: 86%; overflow-wrap: anywhere; }
.demo-chat .bubble.me { background: var(--hi-10); color: var(--ink); }
.demo-chat .ask-btns span { color: var(--ink); border-color: var(--hi-40); font-weight: 600; }
.demo-chip { align-self: center; margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.demo-caption { margin: 0; padding: 0 16px 14px; font-size: 13px; color: var(--ink-soft); }

/* Fix 4: how it works, price + privacy, FAQ */
.how-steps { list-style: none; padding: 0; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--hi); color: var(--hi-ink); font-weight: 700; margin-bottom: 14px; }
.home-pp { margin-top: 0; }
.home-pp-card { border-inline-start: 4px solid var(--hi-40); }
.home-pp-card p { margin: 0 0 14px; }
.h-card { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 10px; }
.home-more { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--ink-soft); margin: 10px 0 0; }

/* Fix 6: the footer legal line meets WCAG AA (was ink-soft at 80% opacity, 12px: 4.10:1 on white). */
.disclaimer { opacity: 1; font-size: 13px; }

@media (max-width: 820px) {
  .home-hero { padding: 28px 0 48px; }
  .home-hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 400px) {
  .demo-chat { padding: 12px; }
  body.home .cta-row .btn { flex: 1 1 auto; }
}
/* Dev's (v2): the header CTA is solid --hi on every page, the same as the hero CTAs. */
.site-header > a.btn { background: var(--hi); color: var(--hi-ink); }

/* ---- M-192: the r14 black-and-white system on every page (Amit 19:59) ---- */
/* The deck-B pages (features/help/pricing/privacy-and-control/updates) used three variables that
   were never defined, so they fell back to light-theme colours on the dark theme: a #e3e3e3
   border, a #eef tag fill under white text, #666 text (3.4:1 on #0b0b0c, below AA). */
:root { --border: var(--line); --tag-bg: var(--hi-10); --muted: var(--ink-soft); }

/* the logo mark on every page; the legal pages' own header too */
/* inline, not flex: "Atlas <span>Assistant</span>" must stay one Latin run (flex items reverse in RTL) */
.legal-page .brand span { color: inherit; font-weight: inherit; }
.legal-page .brand .logo-mark { width: 20px; height: 20px; vertical-align: -3px; margin-inline-end: 8px; }

/* page heroes: the same soft --hi-10 glow as the home hero */
.features-hero, .help-hero, .pricing-hero, .privacy-hero {
  background: radial-gradient(ellipse 70% 90% at 50% 0%, var(--hi-10), transparent 70%);
}

/* cards in the home style: --line edge, a 4px --hi-40 side bar on the two pricing cards,
   solid --hi for the current plan, tags as --hi-10 pills with a --hi-40 edge */
.pricing-card { border-radius: var(--radius); background: var(--bg-soft); border-color: transparent; border-inline-start: 4px solid var(--hi-40); padding: 1.5rem; }
.plan { background: var(--bg-soft); border-color: transparent; }
.plan.current { border-color: var(--hi); }
.tag { border: 1px solid var(--hi-40); color: var(--ink); font-weight: 600; }
.feature-group h2 .tag { font-size: 12px; letter-spacing: 0; }
.faq-list summary { padding-block: 0.25rem; }
.faq-list p, .feature-group li, .privacy-section p { color: var(--ink-soft); }

/* /setup: the facts tables made the page 62 px wider than a 390 phone; they now scroll inside */
.guide .facts { display: block; overflow-x: auto; max-width: 100%; }
@media (max-width: 560px) { .guide .facts code { white-space: normal; overflow-wrap: anywhere; } }
/* review r1 SF-1: a ghost button's hover fill (--bg-soft) would vanish on the soft plan card */
.plan .btn.ghost:hover { background: var(--hi-10); }

/* ---- M-195: demos with sound (home) and the short video (/features) ---- */
.demos-sub { color: var(--ink-soft); margin: -4px 0 24px; max-width: 62ch; }
.demo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.demo-replay { margin-inline-start: auto; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--hi-40); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.demo-replay:hover { background: var(--hi-10); }
.demo-replay[hidden] { display: none; }
.demo-chat .bubble.vn { display: flex; align-items: center; gap: 8px; width: 15rem; max-width: 86%; }
.vn-play { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hi); color: var(--hi-ink); }
.vn-play svg { width: 14px; height: 14px; }
.vn-wave { flex: 1 1 auto; min-width: 0; height: 22px; fill: currentColor; opacity: .7; }
.vn-time { flex: none; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.demo-chat .ask-btns span.on { background: var(--hi); color: var(--hi-ink); border-color: var(--hi); }
.call-card { align-self: stretch; margin: 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--hi-40); border-radius: 16px; }
.call-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.call-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hi); }
.call-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.call-lines li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.call-lines li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.call-lines li > b { flex: none; min-width: 3.6em; font-size: 12px; color: var(--ink-soft); }
.call-lines .them > span:last-child { color: var(--ink-soft); }
.call-mark svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--ink); }
.demo-listen { display: flex; flex-direction: column; gap: 6px; padding: 0 16px 12px; }
.demo-listen-label { font-size: 13px; font-weight: 600; }
.demo-listen audio { width: 100%; height: 40px; }
.demos-more { margin: 20px 0 0; }
.only-he, html[lang="he"] .only-en { display: none; }
html[lang="he"] .only-he { display: block; }

/* the reveal: hidden only once demos.js is running, then one step after another */
.demo-anim.js-wait .step { opacity: 0; }
.demo-anim.play .step { animation: demo-in .4s ease-out both; }
.demo-anim.play .s1 { animation-delay: .1s; }
.demo-anim.play .s2 { animation-delay: .6s; }
.demo-anim.play .s3 { animation-delay: 1.6s; }
.demo-anim.play .s4 { animation-delay: 2.6s; }
.demo-anim.play .s5 { animation-delay: 3.4s; }
.demo-anim.play .s6 { animation-delay: 4.2s; }
.demo-anim.play .s7 { animation-delay: 5.4s; }
.demo-anim.play .s8 { animation-delay: 6.2s; }
.demo-anim.play .s9 { animation-delay: 7.2s; }
.demo-anim.play .s10 { animation-delay: 8s; }
.demo-anim.play .s11 { animation-delay: 9s; }
@keyframes demo-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .demo-anim .step { opacity: 1 !important; animation: none !important; transform: none !important; }
}

html:not([lang="he"]) .feature-video video.only-en, html[lang="he"] .feature-video video.only-he { display: block; }
.feature-video video { width: 100%; max-width: 360px; margin-inline: auto; height: auto; border-radius: var(--radius, 16px); border: 1px solid var(--line); background: #000; }
.feature-video .fine { margin-top: 10px; }

@media (max-width: 900px) {
  .demo-pair { grid-template-columns: 1fr; gap: 24px; }
}
