/* LawyerNow evidence demo — identity: warm paper, ink, evidence blue. */
:root {
  --paper: #FBFAF6;
  --surface: #FFFFFF;
  --ink: #15171A;
  --ink-2: #3D4148;
  --muted: #666A72;
  --line: #E9E5DC;
  --line-strong: #D9D4C8;
  --tint: #F3F0E9;
  --green: #1F4FD8;
  --green-soft: #E8EEFD;
  --marker: #A9C4FF;
  --amber: #8A5A00;
  --amber-soft: #FFF3D1;
  --blue: #4A4F5A;
  --blue-soft: #EEEDE8;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(21, 23, 26, .04), 0 8px 28px rgba(21, 23, 26, .06);
  --serif: "Frank Ruhl Libre", "David", "Times New Roman", serif;
  --sans: "IBM Plex Sans Hebrew", "Heebo", "Arial Hebrew", system-ui, sans-serif;
  --col: 760px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── Top bar ─────────────────────────────────────────── */
.top {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; text-decoration: none; color: var(--ink); direction: ltr; }
.wordmark { font-family: "Sora", var(--sans); font-weight: 600; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.brand img { height: 30px; width: auto; display: block; }
.steps { grid-column: 2; }
.top-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }
.pill {
  font-size: 12px; font-weight: 500; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 99px;
  background: var(--tint); color: var(--ink-2); border: 1px solid var(--line);
}
.ghost {
  background: none; border: 1px solid transparent; border-radius: 99px;
  padding: 5px 12px; font-size: 14px; color: var(--ink-2);
  transition: background .15s, border-color .15s;
}
.ghost:hover { background: var(--tint); border-color: var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
}

.steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
}
.steps li { display: flex; align-items: center; gap: 6px; transition: color .3s; white-space: nowrap; }
.steps li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-strong); transition: background .3s, box-shadow .3s;
}
.steps li + li { margin-inline-start: 6px; }
.steps li.done { color: var(--ink-2); }
.steps li.done::before { background: var(--green); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { background: #2F6BFF; box-shadow: 0 0 0 4px rgba(47, 107, 255, .22); }

/* ── Landing ─────────────────────────────────────────── */
.landing {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 20px 18px;
}
.landing-inner {
  flex: 1; width: 100%; max-width: 720px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-block: 24px 40px;
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-mark { margin-bottom: 18px; }
.stat-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 5px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.stat-pill .dot { background: #2F6BFF; }
h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(34px, 6.2vw, 58px); line-height: 1.14; letter-spacing: -.01em;
  margin: 0 0 18px; text-wrap: balance;
}
h1 mark {
  color: inherit; padding: 0 .12em; margin: 0 -.06em;
  background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
  background-size: 0% 100%; background-repeat: no-repeat; background-position: right;
  animation: highlight .9s .55s cubic-bezier(.3, .7, .2, 1) forwards;
}
.lede { color: var(--ink-2); font-size: clamp(16px, 2.2vw, 19px); max-width: 34em; margin: 0 0 34px; text-wrap: pretty; }

.composer {
  width: 100%;
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  padding: 8px 8px 8px 8px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: var(--ink); box-shadow: 0 1px 2px rgba(21,23,26,.04), 0 12px 36px rgba(21,23,26,.09); }
.composer textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: none;
  padding: 9px 12px; max-height: 190px; line-height: 1.55;
}
.composer textarea::placeholder { color: #7B7F87; }
.composer.hero { border-radius: 30px; padding: 10px; }
.composer.hero textarea { font-size: 18px; padding: 12px 16px; min-height: 52px; }
.send, .attach {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: grid; place-items: center; transition: background .15s, transform .15s, opacity .15s;
}
.send { background: var(--ink); color: #fff; }
.send:hover:not(:disabled) { transform: translateY(-1px); }
.send:disabled { background: var(--line-strong); cursor: default; }
.attach { background: none; color: var(--ink-2); }
.attach:hover { background: var(--tint); }
.composer.hero .send { width: 46px; height: 46px; }

.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.starters button, .chips button {
  background: transparent; border: 1px solid var(--line-strong); border-radius: 99px;
  padding: 7px 14px; font-size: 14px; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
}
.starters button:hover, .chips button:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.fineprint { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }
.fineprint a { color: inherit; }
.landing-inner .fineprint { margin-top: 16px; }
.details-form .field input { width: 100%; }
.details-form .err { margin: 0 0 8px; }
.link { color: #1F4FD8; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.link:hover { color: #163BA8; }
.site-foot { flex: none; text-align: center; font-size: 12.5px; color: var(--muted); padding-top: 8px; }
.site-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 4px; }
.site-foot a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.site-foot a:hover { color: #1F4FD8; text-decoration: underline; }
.site-foot p { margin: 0; }

/* ── Chat ────────────────────────────────────────────── */
.chat { flex: 1; min-height: 0; overflow-y: auto; overflow-anchor: none; padding: 8px 20px 24px; }
.thread { max-width: var(--col); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.msg { display: flex; gap: 12px; animation: rise .35s ease both; }
/* The page is right-to-left: the user's messages sit on the right, the AI's on the left. */
.msg.user { justify-content: flex-start; }
.msg.ai { flex-direction: row-reverse; }
.msg.user .bubble {
  background: var(--tint); border-radius: 22px 22px 6px 22px;
  padding: 10px 16px; max-width: min(86%, 560px);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.ai .who {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; margin-top: 2px;
}
.msg.ai .who img { width: 18px; height: 18px; }
.msg.ai + .msg.ai .who { visibility: hidden; }
.msg.ai + .msg.ai { margin-top: -6px; }
.msg.ai .body { flex: 0 1 auto; max-width: 88%; min-width: 0; padding-top: 3px; overflow-wrap: anywhere; }
/* Cards (summary, upload, forms) keep the full width; only plain text hugs the left. */
.msg.ai:not([data-kind="text"]) .body { flex: 1 1 auto; max-width: none; }
.msg.ai .body strong { font-weight: 600; }

.typing { display: inline-flex; gap: 4px; padding: 9px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

/* file chips */
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.file {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 7px 10px 7px 12px; max-width: 100%; font-size: 14px;
}
.file .ext {
  flex: none; font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 6px; border-radius: 6px; background: var(--ink); color: #fff; direction: ltr;
}
.file .ext.k-image, .file .ext.k-video { background: var(--blue); }
.file .ext.k-whatsapp { background: var(--green); }
.file .ext.k-audio { background: #6B4A8A; }
.file .ext.k-sheet { background: #2F6B3A; }
.file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; direction: ltr; unicode-bidi: plaintext; }
.file .size { color: var(--muted); font-size: 12px; white-space: nowrap; }
.file .x { border: 0; background: none; color: var(--muted); padding: 0 2px; font-size: 16px; line-height: 1; }
.file .x:hover { color: var(--ink); }
.file.loading::after {
  content: ""; position: absolute; inset-block-end: 0; inset-inline-start: 0; height: 2px; width: 100%;
  background: var(--green); transform-origin: right; animation: load .9s ease-out forwards;
}
.msg.user .files { background: none; }
.msg.user.has-files .bubble { background: none; padding: 0; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card.inactive { box-shadow: none; }
.card-title { font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 500; line-height: 1.5;
  padding: 1px 8px; border-radius: 99px; white-space: nowrap;
}
.tag.user { background: var(--blue-soft); color: var(--blue); }
.tag.fact { background: var(--green-soft); color: var(--green); }
.tag.missing { background: var(--amber-soft); color: var(--amber); }
.tag.demo { background: var(--tint); color: var(--ink-2); border: 1px solid var(--line); }

.rows { margin: 0; display: grid; gap: 0; }
.rows > div { display: grid; grid-template-columns: 108px 1fr auto; gap: 12px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.rows > div:first-child { border-top: 0; padding-top: 0; }
.rows dt { color: var(--muted); font-size: 14px; }
.rows dd { margin: 0; overflow-wrap: anywhere; }

.btn {
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  border-radius: 99px; padding: 8px 18px; font-weight: 500; font-size: 15px;
  transition: transform .15s, opacity .15s, background .15s;
}
a.btn { text-decoration: none; display: inline-block; text-align: center; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.quiet { background: none; color: var(--ink); border-color: var(--line-strong); }
.btn.quiet:hover:not(:disabled) { border-color: var(--ink); }
.btn.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* upload */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  width: 100%; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: var(--paper);
  padding: 26px 16px; transition: border-color .2s, background .2s, transform .2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--green); background: var(--green-soft); }
.dropzone.over { transform: scale(1.01); }
.dropzone svg { color: var(--green); margin-bottom: 4px; }
.dropzone strong { font-weight: 600; }
.dropzone span { font-size: 13px; color: var(--muted); }
.recs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.recs li { display: flex; gap: 9px; align-items: baseline; }
.recs li::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--line-strong); transform: translateY(2px); }
.recs li.got::before { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 2px #fff; }
.recs li.got { color: var(--muted); }
details.howto { margin-top: 12px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.howto summary { cursor: pointer; color: var(--green); font-weight: 500; }
details.howto ol { margin: 8px 0 0; padding-inline-start: 20px; color: var(--ink-2); }
.card .files { margin-top: 14px; }

/* email */
.providers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.provider {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 13px; font-weight: 500; transition: border-color .15s, transform .15s;
}
.provider:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-1px); }
.provider:disabled { opacity: .45; cursor: default; }
.provider .glyph { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; direction: ltr; }
.provider .glyph.gmail { background: #D9483B; }
.provider .glyph.outlook { background: #1C6BC0; }
.state-line { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.dot.off { background: var(--line-strong); }
.dot.wait { background: #E0A100; animation: blink 1.6s infinite; }
.card .state-line + .state-line { margin-top: 8px; }

.mails { list-style: none; margin: 0; padding: 0; }
.mails li { border-top: 1px solid var(--line); }
.mails li:first-child { border-top: 0; }
.mails label { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 10px 0; cursor: pointer; align-items: start; }
.mails input { width: 17px; height: 17px; margin-top: 4px; accent-color: var(--green); }
.mails .subj { font-weight: 500; }
.mails .meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* lawyers */
.lawyers { display: grid; gap: 10px; }
.lawyer {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.lawyer:hover { border-color: var(--line-strong); }
.lawyer.picked { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.lawyer.dim { opacity: .5; }
.portrait {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(21,23,26,.08);
}
.lawyer h4 { margin: 0; font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lawyer .spec { color: var(--green); font-size: 14px; font-weight: 500; }
.lawyer p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.lawyer .why { font-size: 13px; color: var(--muted); margin-top: 4px; }
.lawyer .loc { font-size: 13px; color: var(--muted); }

/* progress */
.progress-bar { height: 4px; border-radius: 4px; background: var(--tint); overflow: hidden; margin-bottom: 14px; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 4px; transition: width 1.2s cubic-bezier(.3,.7,.2,1); }
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stages li { display: flex; align-items: center; gap: 11px; color: var(--muted); transition: color .3s; }
.stages .ring { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: all .3s; }
.stages li.run { color: var(--ink); }
.stages li.run .ring { border-color: var(--green); border-top-color: transparent; animation: spin .8s linear infinite; }
.stages li.ok { color: var(--ink-2); }
.stages li.ok .ring { background: var(--green); border-color: var(--green); }
.stages li.ok .ring::after { content: ""; width: 8px; height: 4px; border: solid #fff; border-width: 0 0 1.8px 1.8px; transform: rotate(-45deg) translate(1px, -1px); }

/* ── Dock ────────────────────────────────────────────── */
.dock { flex: none; padding: 0 20px calc(12px + env(safe-area-inset-bottom)); }
.dock > * { max-width: var(--col); margin-inline: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; min-height: 0; }
.chips button { background: var(--surface); animation: rise .3s ease both; }
.dock.busy .chips { visibility: hidden; }

/* ── Drop overlay / modal / toast ───────────────────── */
.drop-overlay {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  background: rgba(251, 250, 246, .88); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.drop-overlay.on { opacity: 1; }
.drop-overlay div { display: grid; gap: 4px; text-align: center; padding: 44px 64px; border: 2px dashed var(--green); border-radius: 26px; background: var(--surface); }
.drop-overlay strong { font-family: var(--serif); font-size: 28px; }
.drop-overlay span { color: var(--muted); }

.scrim {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: rgba(21, 23, 26, .32); backdrop-filter: blur(6px);
  animation: fade .2s ease both;
}
.modal {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: 24px; padding: 28px;
  box-shadow: 0 24px 80px rgba(21,23,26,.22); animation: pop .3s cubic-bezier(.2,.8,.2,1) both;
  max-height: calc(100dvh - 40px); overflow-y: auto;
}
.modal h2 { font-family: var(--serif); font-size: 26px; line-height: 1.2; margin: 14px 0 6px; }
.modal > p { color: var(--ink-2); margin: 0 0 18px; font-size: 15px; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field span { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.field input {
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 13px; background: var(--paper); outline: 0;
  transition: border-color .15s, background .15s;
}
.field input:focus { border-color: var(--ink); background: #fff; }
.field input.bad { border-color: #B3402F; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); margin: 4px 0 16px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--green); flex: none; }
.err { color: #B3402F; font-size: 13.5px; min-height: 20px; margin: -6px 0 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 12px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.quote { background: var(--tint); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--ink-2); margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.perms { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.perms li { display: flex; gap: 10px; align-items: baseline; }
.perms li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); transform: translateY(-1px); }
.perms li.no::before { background: var(--line-strong); }

.toasts { position: fixed; inset-block-start: 70px; inset-inline: 0; z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  background: var(--ink); color: #fff; border-radius: 14px; padding: 11px 16px; font-size: 14px; max-width: 460px;
  box-shadow: 0 12px 40px rgba(21,23,26,.25); animation: pop .35s cubic-bezier(.2,.8,.2,1) both;
  display: flex; gap: 10px; align-items: flex-start; transition: opacity .4s, transform .4s;
}
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast b { color: #A9C4FF; font-weight: 600; white-space: nowrap; }

/* ── Case preview panel ─────────────────────────────── */
.case-panel {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 45;
  width: min(640px, 100vw); background: var(--surface); border-inline-start: 1px solid var(--line);
  box-shadow: 0 0 80px rgba(21,23,26,.16); overflow-y: auto;
  animation: slide .4s cubic-bezier(.2,.8,.2,1) both;
}
.case-head { position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); z-index: 1; }
.case-head .close { border: 0; background: var(--tint); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1; }
.case-body { padding: 26px 28px 60px; }
.case-body h2 { font-family: var(--serif); font-size: 30px; line-height: 1.2; margin: 0 0 6px; }
.case-meta { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--ink-2); align-items: center; }
.case-body h3 { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--muted); margin: 34px 0 12px; display: flex; align-items: center; gap: 10px; }
.case-body h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.claim { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.claim:first-of-type { border-top: 0; }
.claim .k { font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.claim > .tag { align-self: start; }
.claim .v { overflow-wrap: anywhere; white-space: pre-wrap; }
.claim .refs { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.ref { display: inline-block; direction: rtl; font-size: 12px; font-weight: 600; padding: 0 6px; border-radius: 6px; background: var(--tint); color: var(--ink-2); margin-inline-end: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 5px; width: 1.5px; background: var(--line-strong); }
.timeline li { position: relative; padding-inline-start: 26px; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.timeline .when { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.index { width: 100%; border-collapse: collapse; font-size: 14px; }
.index th { text-align: start; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line-strong); }
.index td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.index td.fn { direction: ltr; unicode-bidi: plaintext; text-align: start; }
.missing-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.missing-list li { display: flex; gap: 10px; align-items: baseline; }
.empty { color: var(--muted); font-size: 14.5px; }

/* ── Motion ──────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes slide { from { transform: translateX(-40px); opacity: 0; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); opacity: 0; } }
@keyframes highlight { to { background-size: 100% 100%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  h1 mark { background-size: 100% 100%; }
}

/* ── Small screens ───────────────────────────────────── */
@media (max-width: 720px) {
  .top { padding: 12px 16px; grid-template-columns: auto 1fr; }
  .steps { display: none; }
  .brand img { height: 26px; }
  .landing { padding-inline: 16px; }
  .chat { padding-inline: 16px; }
  .dock { padding-inline: 12px; }
  .msg.ai .who { display: none; }
  .rows > div { grid-template-columns: 1fr auto; }
  .rows dt { grid-column: 1 / -1; margin-bottom: -8px; }
  .lawyer { grid-template-columns: auto 1fr; }
  .lawyer .btn { grid-column: 1 / -1; }
  .providers { grid-template-columns: 1fr; }
  .case-body, .case-head { padding-inline: 18px; }
  .index th:nth-child(4), .index td:nth-child(4) { display: none; }
  #newChat { padding-inline: 6px; }
}

/* ── Packages ────────────────────────────────────────── */
.modal.wide { max-width: 860px; }
.modal.wide > h2, .modal.wide > p { text-align: center; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 14px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; text-align: start; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 20px 16px 16px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.plan:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.plan.popular { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.plan-flag { position: absolute; top: -11px; inset-inline-start: 16px; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; }
.plan-name { font-weight: 600; color: var(--ink-2); }
.plan-count { font-size: 15px; color: var(--ink-2); }
.plan-count b { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--ink); margin-inline-end: 4px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-block: 1px solid var(--line); }
.plan-price b { font-size: 22px; font-weight: 600; }
.plan-price span { font-size: 12.5px; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); flex: 1; }
.plan li { display: flex; gap: 8px; align-items: baseline; }
.plan li::before { content: ""; flex: none; width: 9px; height: 5px; border: solid var(--green); border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-3px); }
.plan .btn { text-align: center; margin-top: 6px; pointer-events: none; }
.rows.pay > div { grid-template-columns: 1fr auto; }
.rows.pay { margin: 14px 0; }
.state-line.wrap { flex-wrap: wrap; overflow-wrap: anywhere; row-gap: 2px; }
.ghost { white-space: nowrap; }

/* ── Phone polish ────────────────────────────────────── */
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .top { gap: 8px; padding: 10px 14px; }
  .top-actions { gap: 6px; grid-column: 2; }
  #newChat { font-size: 13px; padding: 4px 8px; }
  .avatar { width: 28px; height: 28px; font-size: 13px; }
  .landing-inner { padding-block: 12px 24px; }
  .hero-mark { width: 38px; height: 38px; margin-bottom: 14px; }
  .lede { margin-bottom: 24px; }
  .composer.hero textarea { font-size: 16px; padding: 10px 12px; min-height: 46px; }
  .composer textarea { font-size: 16px; } /* 16px stops iOS from zooming in on focus */
  .field input, .support-form textarea { font-size: 16px; }
  .starters { gap: 6px; }
  .starters button, .chips button { font-size: 13.5px; padding: 6px 12px; }
  .site-foot nav { gap: 2px 14px; }
  .thread { gap: 14px; }
  .msg.user .bubble { max-width: 92%; }
  .card { padding: 14px; border-radius: 16px; }
  .dropzone { padding: 20px 12px; }
  .actions .btn { flex: 1 1 auto; }
  .file .name { max-width: 150px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding-inline: 12px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; }
  .dock .fineprint { font-size: 11px; }
  .scrim { padding: 10px; align-items: end; }
  .modal { padding: 22px 18px; border-radius: 22px; max-height: calc(100dvh - 20px); }
  .modal h2 { font-size: 23px; }
  .plans { grid-template-columns: 1fr; gap: 14px; }
  .plan { padding: 16px 14px 14px; }
  .plan ul { display: none; }
  .plan-count b { font-size: 32px; }
  .plan { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; row-gap: 4px; }
  .plan-name { grid-column: 1; }
  .plan-count { grid-column: 1; }
  .plan-price { grid-column: 2; grid-row: 1 / span 2; border: 0; padding: 0; flex-direction: column; align-items: flex-end; gap: 0; }
  .plan .btn { grid-column: 1 / -1; }
  .toasts { inset-block-start: 58px; }
  .case-body h2 { font-size: 25px; }
  .legend { font-size: 12px; }
}
@media (max-width: 380px) {
  .wordmark { font-size: 19px; }
  .support-btn .live { display: none; }
  h1 { font-size: 31px; }
}

/* lawyers: join the network */
.join-btn { display: inline-flex; align-items: center; gap: 8px; margin: 22px auto 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 99px; padding: 9px 18px; font-size: 14.5px; color: var(--ink-2); transition: border-color .15s, transform .15s; }
.join-btn:hover { border-color: var(--green); transform: translateY(-1px); }
.join-btn b { color: var(--green); font-weight: 600; }
.join-btn i { font-style: normal; color: var(--green); }
.modal.join { position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal .x-close { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--tint); font-size: 18px; line-height: 1; }
.modal.join .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal.join .field input { width: 100%; }
.areas { border: 0; padding: 0; margin: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.areas legend { font-size: 13.5px; color: var(--ink-2); font-weight: 500; padding: 0; margin-bottom: 8px; }
.areas label { position: relative; cursor: pointer; }
.areas input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.areas span { display: block; border: 1px solid var(--line-strong); border-radius: 99px; padding: 6px 13px; font-size: 14px; background: var(--surface); }
.areas input:checked + span { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 500; }
.areas input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.modal .err { color: #B3402F; font-size: 14px; margin: 0 0 10px; min-height: 0; }
.perks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); }
.perks li { display: flex; gap: 8px; align-items: baseline; }
.perks li::before { content: ""; flex: none; width: 9px; height: 5px; border: solid var(--green); border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-3px); }
@media (max-width: 720px) { .modal.join .two { grid-template-columns: 1fr; gap: 0; } .join-btn { font-size: 14px; padding: 9px 14px; } }

/* Progress bar under the header: how far the person is from a sent case. */
.progress { flex: none; padding: 0 22px 10px; }
.progress[hidden] { display: none; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.progress-head #progressLabel { font-weight: 600; color: var(--ink); }
.progress-track { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; border-radius: 99px; background: #2F6BFF; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.progress.complete .progress-track i { background: var(--green); }
@media (max-width: 640px) { .progress { padding: 0 16px 8px; } }
@media (prefers-reduced-motion: reduce) { .progress-track i { transition: none; } }

/* ── App feel ──────────────────────────────────────────
   The page never scrolls as a whole. The header, the progress bar and the message box stay put; the conversation scrolls between them. */
html { overscroll-behavior: none; }
body { position: fixed; inset: 0; width: 100%; height: var(--app-h, 100dvh); overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
.chat, .landing { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.top { padding-top: calc(14px + env(safe-area-inset-top)); position: relative; z-index: 5; }
body[data-view="chat"] .top { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body[data-view="chat"] .progress { position: relative; z-index: 5; background: var(--paper); box-shadow: 0 10px 14px -12px rgba(21, 23, 26, .22); }
/* The message box floats over the end of the conversation, which fades out under it. */
.dock { position: relative; z-index: 5; }
.dock::before { content: ""; position: absolute; inset-inline: 0; bottom: 100%; height: 22px; background: linear-gradient(to top, var(--paper), transparent); pointer-events: none; }
.progress.complete .progress-track i { background: #1FA463; }
@media (max-width: 720px) {
  .top { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 8px; }
  .dock .fineprint { font-size: 11px; line-height: 1.4; margin-top: 6px; }
  .chat { padding-top: 12px; padding-bottom: 28px; }
}

/* The short path: one story box, one phone field, one button. Everything else is optional and comes after sending. */
.quick { width: 100%; max-width: 560px; display: grid; gap: 12px; text-align: start; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 24px; padding: 18px; box-shadow: 0 1px 2px rgba(21,23,26,.04), 0 12px 36px rgba(21,23,26,.07); }
.quick-field { display: grid; gap: 6px; }
.quick-field > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.quick textarea, .quick input { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; outline: none; }
.quick textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.quick input[type="tel"] { text-align: right; }
.quick textarea:focus, .quick input:focus { border-color: var(--ink); }
.quick .bad { border-color: #C0392B; }
.quick .err { margin: 0; min-height: 0; font-size: 14px; color: #C0392B; }
.quick .err:empty { display: none; }
.quick-send { font-size: 18px; padding: 15px 18px; border-radius: 14px; }
.quick .fineprint { margin: 0; }
.mail-opt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mail-opt input { flex: 1 1 200px; font: inherit; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; }

/* Raaya is the face of the site: she waves hello on the landing page and speaks in every message. */
.raaya-brand { direction: rtl; gap: 9px; }
.raaya-brand img { border-radius: 50%; object-fit: cover; border: 1.5px solid var(--line-strong); }
.raaya-name { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: 0; }
.raaya-hello { display: flex; flex-direction: column; align-items: center; gap: 0; margin-bottom: 18px; width: 100%; max-width: 560px; }
.raaya-video { width: clamp(150px, 36vw, 230px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: #E9D9C4; border: 4px solid #fff; box-shadow: 0 2px 4px rgba(21,23,26,.08), 0 16px 40px rgba(31,79,216,.18); position: relative; z-index: 1; }
.raaya-bubble { position: relative; margin-top: -14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; padding: 24px 20px 16px; text-align: center; box-shadow: 0 1px 2px rgba(21,23,26,.04); }
.raaya-bubble h1 { font-size: clamp(24px, 5.2vw, 34px); margin: 0 0 6px; }
.raaya-bubble p { margin: 0; font-size: clamp(16px, 2.4vw, 19px); color: var(--ink-2); text-wrap: pretty; }
.raaya-bubble mark { color: inherit; padding: 0 .12em; background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); }
.quick-send { background: #1F4FD8; border-color: #1F4FD8; }
.landing-inner .stat-pill { margin: 18px 0 0; }
.landing-inner { justify-content: flex-start; padding-block: 18px 32px; }
.msg.ai .who.raaya { background: none; border: 0; padding: 0; }
.msg.ai .who.raaya img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick select { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; outline: none; }
.quick select:focus { border-color: var(--ink); }
@media (max-width: 520px) { .quick-row { grid-template-columns: 1fr; } }
