/* ==========================================================================
   site.css — "Pure light": the design system of סגני (the personal assistant).
   Shared by every page. Each area adds its own file, linked by ui.page():
     public.css (landing, sign-in, phone verification) · app.css (the customer's /my) · admin.css (owner pages).
   Mobile first (390px), excellent at 1280px. RTL: use logical properties (inline-start = right).
   Readability: body 17px, secondary text >= 14px, mock-UI text >= 12px; the grey second line of a
   heading (.soft) only at display sizes (>= 24px). On a computer the customer's and the owner's pages are denser
   (section 21): body 15px, secondary text >= 13px.
   Light for old PCs: no backdrop blur, no blur stacks. Decorative loops stop after a few runs.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Color */
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-sunken: #f1f3f6;
  --surface: #ffffff;
  --ink: #0b0d12;
  --ink-2: #2c323d;
  --muted: #5d6471;          /* 5.9:1 on white */
  --soft: #848c9a;           /* 3.4:1: ONLY for display text >= 24px */
  --line: #e8eaef;
  --line-strong: #d6dae2;
  --control: #8a92a1;        /* borders of inputs and checkboxes: 3:1 on white */
  --control-hover: #5d6471;
  --accent: #1f5bff;         /* 5.3:1 with white text */
  --accent-hover: #1449e6;
  --accent-ink: #1645d1;     /* accent text on white or on --accent-soft */
  --accent-soft: #eef3ff;
  --accent-tint: #d9e4ff;
  --danger: #e5373b;
  --danger-ink: #b8211f;
  --danger-soft: #fff0ef;
  --success: #16a34a;
  --success-ink: #0f7a3a;
  --success-soft: #eaf8ef;
  --warning: #d97706;
  --warning-ink: #9a5a00;
  --warning-soft: #fff5e1;

  /* Type */
  --font-sans: "Noto Sans Hebrew", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-tech: "IBM Plex Sans Hebrew", "Noto Sans Hebrew", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-mock: .75rem;         /* 12px: text inside illustrations (phone mock, step art) only */
  --fs-xs: .875rem;          /* 14px: smallest real text (meta, badges, captions) */
  --fs-sm: .9375rem;         /* 15px: help text, secondary lines */
  --fs-base: 1rem;           /* 16px: inputs, buttons */
  --fs-md: 1.0625rem;        /* 17px: body */
  --fs-lg: 1.1875rem;        /* 19px: lead */
  --fs-h3: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-h1: clamp(2rem, 1.55rem + 1.9vw, 2.875rem);
  --fs-h2: clamp(2.125rem, 1.5rem + 2.6vw, 3.375rem);
  --fs-display: clamp(3rem, 1.55rem + 6.2vw, 6.75rem);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-full: 999px;

  /* Shadow: a hairline ring plus soft layered depth */
  --ring: 0 0 0 1px rgba(15, 23, 42, .07);
  --shadow-1: 0 0 0 1px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-2: 0 0 0 1px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04), 0 8px 20px -8px rgba(15, 23, 42, .12);
  --shadow-3: 0 0 0 1px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .04), 0 18px 36px -14px rgba(15, 23, 42, .18), 0 50px 100px -30px rgba(15, 23, 42, .20);
  --shadow-accent: 0 1px 2px rgba(22, 69, 209, .35), 0 10px 24px -10px rgba(31, 91, 255, .75);
  --focus-ring: 0 0 0 4px rgba(31, 91, 255, .2);

  /* Space */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 136px;
  --gutter: 16px;
  --maxw: 1160px;
  --header-h: 64px;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
/* A link to a field ("לתיקון", #OWNER_NAME) scrolls so that the label above it stays visible too */
input, select, textarea { scroll-margin-top: 40px; }
/* The admin header is two rows on phones and tablets (brand + tools, then the tabs) */
@media (max-width: 899px) { html:has(> body.area-admin) { scroll-padding-top: 132px; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-md); line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: hidden;
}
body > main { flex: 1 0 auto; }
.area-app, .area-admin { background: var(--bg-subtle); }
h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; }
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; text-wrap: balance; }
h2 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.015em; line-height: 1.35; }
h4 { font-size: var(--fs-md); font-weight: 700; line-height: 1.4; }
p + p { margin-top: .75em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }
::selection { background: var(--accent-tint); }

/* Text links are underlined so they never depend on colour alone. Components (.btn, nav, .chip, .brand) opt out. */
a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(22, 69, 209, .35); }
a:hover { text-decoration-color: currentColor; }

/* Focus: an outline (not a box-shadow), so it survives forced-colors mode */
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
/* The title of a page reached in place gets the focus (site.js), for the next Tab and for screen readers: no ring */
h1[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; }

/* ---------- 3. Layout helpers ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.container.mid { --maxw: 960px; }
.container.narrow { --maxw: 640px; }
.page { padding-block: var(--s-5) var(--s-8); }
@media (min-width: 1024px) { .page { padding-top: var(--s-6); } }
.section { padding-block: 80px; position: relative; }
@media (min-width: 1024px) { .section { padding-block: 120px; } }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s-4); }
.grid > .card { margin-bottom: 0; }
.grid-2 { display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.spacer { flex: 1; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 599px) { .collapse-sm { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } }
.skip-link { position: absolute; inset-inline-start: 16px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }

/* Numbers, phone numbers and dialing codes never break and never flip */
.ltr { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.ltr-wrap { direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }   /* long LTR text: e-mails, URLs (never numbers) */
input.ltr, textarea.ltr { text-align: right; }
.num { font-family: var(--font-tech); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
@media (min-width: 720px) { .nowrap-wide { white-space: nowrap; } }   /* keeps a phrase together where it fits (a heading's first sentence) */
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- 4. Typography ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-tech); font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); letter-spacing: .01em; }
.eyebrow .icon { width: 16px; height: 16px; }
.display { font-size: var(--fs-display); font-weight: 800; letter-spacing: -.04em; line-height: 1; text-wrap: balance; }
.display .line { display: block; }
.display .accent, .title .accent { color: var(--accent); }
.title { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.032em; line-height: 1.06; text-wrap: balance; }
/* The grey second line of a heading. Only inside display-size headings (.display, .title, .page-head h1) */
.display .soft, .title .soft, .page-head h1 .soft { color: var(--soft); display: block; }
.lead { font-size: clamp(1.125rem, 1rem + .55vw, 1.375rem); line-height: 1.6; color: var(--muted); max-width: 46ch; text-wrap: balance; }
.lead strong { color: var(--ink); font-weight: 600; }
.sub { color: var(--muted); font-size: var(--fs-md); margin: 6px 0 var(--s-5); }
.section-title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; margin: var(--s-7) 0 var(--s-4); }
.help { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.help + .help { margin-top: 6px; }
.small { font-size: var(--fs-xs); }
.error-text { color: var(--danger-ink); font-weight: 600; font-size: var(--fs-sm); }
.error-text:empty { display: none; }

/* ---------- 5. Icons ---------- */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
.icon.ok { color: var(--success); }
.icon.warn { color: var(--warning); }
.icon.bad { color: var(--danger); }
.icon.accent { color: var(--accent); }
.tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.tile .icon { width: 20px; height: 20px; }
.tile.danger { background: var(--danger-soft); color: var(--danger); }
.tile.ok { background: var(--success-soft); color: var(--success-ink); }
.tile.warn { background: var(--warning-soft); color: var(--warning-ink); }
.tile.ink { background: var(--ink); color: #fff; }
.brand-mark { width: 30px; height: 30px; flex: none; }

/* ---------- 6. Header (all areas) ---------- */
/* A page loaded as usual (another part of the site): a quick, quiet cross-fade instead of a white flash (in browsers
   that can), and the parts that are the same on every page (the header; in the customer's site also the side column and
   the menu at the bottom) stay in place. Most moves are in place (site.js), and they change the page at once, with no
   cross-fade, like tabs in one page. Not with "reduce motion" (below). */
@view-transition { navigation: auto; }
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .15s; }
.site-header { view-transition-name: site-header; }
/* Moving in place (site.js): a thin line at the top while the next page takes more than a moment, and a short message
   when a form could not be sent (at the top too, where a phone's keyboard does not hide it) */
.nav-progress { position: fixed; top: 0; inset-inline: 0; z-index: 300; height: 3px; background: var(--accent); pointer-events: none;
  transform-origin: right center; transform: scaleX(0); opacity: 0; }
.nav-progress.is-on { opacity: 1; transform: scaleX(.9); transition: transform 8s cubic-bezier(.05, .75, .2, 1); }
.nav-progress.is-done { opacity: 0; transform: scaleX(1); transition: transform .2s ease-out, opacity .25s .15s; }
.nav-notice { position: fixed; z-index: 300; inset-inline: 16px; top: calc(12px + env(safe-area-inset-top)); max-width: 440px;
  margin-inline: auto; padding: 12px 16px; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-weight: 600;
  text-align: center; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid rgba(15, 23, 42, .07); }
.site-header .bar { min-height: var(--header-h); display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-5); }
@media (max-width: 399px) { .site-header .bar { column-gap: 12px; } }
@media (max-width: 359px) { .site-header .brand-tag { display: none; } }
@media (max-width: 899px) { .area-admin .site-header .bar { padding-top: 8px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; white-space: nowrap; color: var(--ink); text-decoration: none; border-radius: 8px; }
.brand .brand-mark { filter: drop-shadow(0 2px 4px rgba(31, 91, 255, .28)); }
.brand-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-full); background: var(--bg-sunken); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; line-height: 1; }
.header-end { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s-2); }
.header-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: var(--r-full); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s; }
.header-link:hover { background: var(--bg-sunken); color: var(--ink); }
.header-link .icon { width: 18px; height: 18px; }

/* Public: page anchors, shown from 1024px (the CTA button stays visible on phones) */
.site-nav { display: none; align-items: center; gap: 2px; margin-inline-start: auto; }
.site-nav a { padding: 8px 14px; border-radius: var(--r-full); color: var(--muted); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; transition: color .2s, background-color .2s; }
.site-nav a:hover { color: var(--ink); background: var(--bg-sunken); }
.site-nav + .header-end { margin-inline-start: 0; }
@media (min-width: 1024px) { .site-nav { display: flex; } }

/* Admin: a segmented nav. Phones: its own full-width row under the brand. Desktop: inline. */
.app-nav { order: 3; flex-basis: 100%; display: flex; gap: 2px; padding: 4px; margin-bottom: 10px; border-radius: var(--r-full); background: var(--bg-sunken); }
.app-nav a { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: var(--r-full);
  color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s; }
.app-nav a .icon { width: 17px; height: 17px; }
.app-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.app-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.app-nav .nav-short { display: none; }
@media (max-width: 559px) {   /* four items in one row: the short names, and no icons under 480px */
  .app-nav .nav-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .app-nav .nav-short { display: inline; }
}
@media (max-width: 479px) { .app-nav a { padding: 0 8px; } .app-nav a .icon { display: none; } }
@media (min-width: 900px) {
  .app-nav { order: 0; flex-basis: auto; margin-bottom: 0; }
  .app-nav a { flex: none; padding: 0 16px; }
}

/* Customer: who is signed in */
.user { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.user-name { display: none; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 600px) { .user-name { display: inline; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 1rem; line-height: 1; background: var(--accent-soft); color: var(--accent-ink); }
.avatar .icon { width: 20px; height: 20px; }
.avatar.urgent { background: var(--danger-soft); color: var(--danger-ink); }
.avatar.out { background: var(--accent); color: #fff; }   /* a call the assistant made */
.avatar.sm { width: 32px; height: 32px; font-size: .875rem; }
.user .avatar { width: 32px; height: 32px; font-size: .875rem; background: linear-gradient(160deg, #3d74ff, #1645d1); color: #fff; box-shadow: 0 2px 6px -2px rgba(31, 91, 255, .5); }

/* ---------- 7. Footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg); padding-block: var(--s-6) var(--s-7); font-size: var(--fs-xs); color: var(--muted); }
.area-app .site-footer, .area-admin .site-footer { background: transparent; }
.footer-row { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-row .brand { font-size: .95rem; }
.footer-row .brand-mark { width: 24px; height: 24px; }
.footer-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.site-footer a { color: var(--ink-2); text-decoration-color: var(--line-strong); }
.site-footer a:hover { color: var(--accent-ink); }
.footer-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }
.footer-link .icon { width: 16px; height: 16px; }
.footer-contact { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.footer-contact > .icon { width: 16px; height: 16px; color: var(--accent); }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 720px) {
  .footer-row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
  .footer-end { margin-inline-start: auto; }
}

/* ---------- 8. Page head (title area of app and admin pages) ---------- */
.page-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-5); }
.page-head h1 { margin-top: 4px; overflow-wrap: anywhere; }   /* a customer's name may be one long token (an e-mail): it wraps, the page never scrolls sideways */
.page-head .sub { margin: 8px 0 0; max-width: 62ch; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
@media (min-width: 1024px) {
  .page-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-bottom: var(--s-6); }
}
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); text-decoration: none; }
/* Text links that are tap targets on their own line: at least 44px tall (an older audience) */
.footer-nav a, .admin-link { display: inline-flex; align-items: center; min-height: 44px; }
.back-link .icon { width: 16px; height: 16px; }
.back-link:hover { text-decoration: underline; }

/* A heading over a block of a page (messages, settings): <div class="block-head"><h2>…</h2><span class="count">…</span></div> */
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--s-4); }
.block-head h2 { font-size: 1.5rem; letter-spacing: -.025em; }
.block-head .count { font-family: var(--font-tech); font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.block-head.stacked { display: grid; gap: 6px; margin-bottom: var(--s-5); }
.block-head.stacked p { max-width: 62ch; font-size: var(--fs-base); color: var(--muted); }


/* ---------- 9. Buttons ---------- */
.btn { --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 6px 22px; max-width: 100%;
  border-radius: var(--r-full); border: 0; font: inherit; font-size: var(--fs-base); font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
  background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), var(--shadow-accent);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease), color .2s var(--ease); }
.btn:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn .icon { width: 18px; height: 18px; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(-4px); }
.btn.secondary { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.btn.secondary:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-2); }
.btn.quiet { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.quiet:hover { background: var(--bg-sunken); color: var(--ink); transform: none; }
.btn.danger { background: var(--danger-ink); color: #fff; box-shadow: 0 1px 2px rgba(184, 33, 31, .3); }
.btn.danger:hover { background: #9a1a18; }
.btn.danger-quiet { background: #fff; color: var(--danger-ink); box-shadow: 0 0 0 1px rgba(184, 33, 31, .35); }
.btn.danger-quiet:hover { background: var(--danger-soft); color: var(--danger-ink); }
.btn.sm, .btn.small { --h: 44px; padding: 4px 16px; font-size: var(--fs-sm); }
.btn.lg { --h: 56px; padding: 8px 30px; font-size: var(--fs-md); }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
/* A button whose form is on its way (site.js): a spinner in place of its icon, and it is not pressed again */
.btn.is-busy { opacity: .92; cursor: progress; pointer-events: none; }
.btn.is-busy > .icon { display: none; }
.btn-spin { display: inline-block; flex: none; width: 1.15em; height: 1.15em; border-radius: 50%; border: 2.4px solid currentColor;
  border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: var(--s-3); font-weight: 600; font-size: var(--fs-sm); }
.row-actions a { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 10. Forms ---------- */
.field { display: grid; gap: 8px; margin: 0 0 22px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > .label, fieldset.field > legend { font-weight: 600; font-size: var(--fs-base); color: var(--ink); line-height: 1.4; }
.field .optional { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
fieldset.field { border: 0; padding: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 8px; float: none; }
fieldset.field > legend + * { margin-top: 0; }

input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=url], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; margin: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--control); background: #fff; color: var(--ink);
  font: inherit; font-size: var(--fs-base); line-height: 1.45; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: var(--control-hover); }
input:focus, select:focus, textarea:focus { outline: 2px solid transparent; border-color: var(--accent); box-shadow: var(--focus-ring); }
input[readonly], textarea[readonly] { background: var(--bg-subtle); color: var(--ink-2); }
input[type=number] { max-width: 160px; }
input::placeholder, textarea::placeholder { color: #697080; opacity: 1; }   /* 4.96:1 on white, 4.67:1 on --bg-subtle */
input.ltr, input[type=tel] { direction: ltr; text-align: right; font-family: var(--font-tech); letter-spacing: .02em; }
textarea { min-height: 128px; resize: vertical; line-height: 1.6; }
select { appearance: none; -webkit-appearance: none; padding-inline-end: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6471' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: left 14px center; }
[aria-invalid="true"] { border-color: var(--danger-ink) !important; background-color: #fffafa; }
[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(229, 55, 59, .18); }
.field-error { display: flex; align-items: flex-start; gap: 8px; color: var(--danger-ink); font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; }
.field-error .icon { width: 18px; height: 18px; margin-top: 2px; }
.ta-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.counter { flex: none; font-family: var(--font-tech); font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.counter.is-near { color: var(--warning-ink); font-weight: 600; }

/* Radio "choice cards": <fieldset class="field"><legend>…</legend><div class="choices"><label class="choice"><input type="radio" …><span><b>title</b><small>detail</small></span></label>… */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.choices.stacked { grid-template-columns: 1fr; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer;
  font-weight: 600; font-size: var(--fs-base); line-height: 1.4; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.choice:hover { border-color: var(--control); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.choice b { display: block; font-weight: 600; }
.choice small { display: block; margin-top: 2px; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
input[type=radio] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 50%; border: 1.5px solid var(--control-hover); background: #fff; cursor: pointer;
  transition: border-width .2s var(--ease), border-color .2s; }
input[type=radio]:checked { border: 6px solid var(--accent); }
input[type=radio]:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* Checkbox row: <label class="check"><input type="checkbox" …><span>text</span></label> */
.check { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; cursor: pointer; line-height: 1.45; }
input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; border: 1.5px solid var(--control-hover); background: #fff center / 16px no-repeat; cursor: pointer;
  transition: background-color .15s, border-color .15s; }
input[type=checkbox]:checked { background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6.5 9.5 17 4 11.5'/%3E%3C/svg%3E"); }
input[type=checkbox]:indeterminate { background-color: var(--accent); border-color: var(--accent);   /* some of a list chosen */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
input[type=checkbox]:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* A read-only value with a copy button (admin URLs) */
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field input { flex: 1; min-width: 0; font-size: var(--fs-sm); }

/* Two columns from 900px (fields side by side, or a field and its explanation) */
.split { display: grid; gap: 22px; }
.split > * { min-width: 0; }
.split > .field { margin-bottom: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
  .split > .help { align-self: end; padding-bottom: 13px; }   /* a short note beside a field: level with its input */
}

/* "צור קשר": the form (a public page, or inside the customer's pages), and what is shown once it was sent */
.contact-us-head { margin-bottom: var(--s-5); }
.contact-us-head h1 { font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem); letter-spacing: -.03em; }
.contact-us-head .lead { margin-top: var(--s-2); }
.contact-us-lead { margin: 0 0 var(--s-4); color: var(--ink-2); line-height: 1.6; }
.contact-us-form { padding: 24px 20px; }
.contact-us-form .split { margin-bottom: 8px; }
.contact-us-form .reach-help { margin: 0 0 22px; }
.contact-us-form textarea { min-height: 150px; }
.contact-us-done { display: grid; justify-items: center; gap: 10px; padding: 36px 20px; text-align: center; }
.contact-us-done > .icon { width: 44px; height: 44px; color: var(--success-ink); }
.contact-us-done h2 { margin: 0; font-size: 1.375rem; }
.contact-us-done p { margin: 0 0 6px; color: var(--ink-2); line-height: 1.6; }
.contact-us-other { margin: 0; text-align: center; font-size: var(--fs-sm); color: var(--muted); line-height: 1.7; }
@media (min-width: 600px) { .contact-us-form { padding: 32px; } }
/* A field that people never see (it is off the screen, and hidden from screen readers and Tab): only robots fill it in,
   and then the message is not sent */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* An indented group of fields that belongs to the one above */
.sub-field { border-inline-start: 3px solid var(--accent-tint); padding-inline-start: 14px; }

/* The save button at the end of a settings form (/my, admin settings and customer) */
.savebar { display: flex; flex-direction: column; align-items: stretch; margin-top: var(--s-4); }
.savebar .btn { --h: 56px; font-size: var(--fs-md); }
.savebar .btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }
@media (min-width: 600px) {
  .savebar { flex-direction: row; align-items: center; }
  .savebar .btn { min-width: 240px; padding-inline: 36px; }
}
/* Phones and tablets (where admin settings has no side index with its own save button): a panel that sticks to the
   bottom of the screen while its form is in view. Still a plain submit button. */
@media (max-width: 1099px) {
  .savebar { position: sticky; bottom: 0; z-index: 20; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-radius: var(--r-lg);
    background: linear-gradient(180deg, #f5f8ff, #fff); box-shadow: 0 0 0 1px var(--accent-tint), var(--shadow-2); }
  html:has(.savebar) { scroll-padding-bottom: 96px; }   /* a field reached with Tab is not hidden under it */
}

/* Live "how callers will hear the greeting" preview, under the name fields */
.preview { padding: 14px 16px; border-radius: var(--r-md); background: linear-gradient(180deg, #f5f8ff, #fff); box-shadow: inset 0 0 0 1px var(--accent-tint); }
.preview-label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.preview-label .icon { width: 16px; height: 16px; color: var(--accent); }
.preview .bubble { max-width: 100%; }
.preview-note { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); }

/* ---------- 11. Cards ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: var(--s-5) 20px; margin-bottom: var(--s-4); min-width: 0; }
.card > h2 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.015em; margin: 0 0 var(--s-4); }
.card.flat { box-shadow: var(--shadow-1); }
.card.subtle { background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--line); }
.card.accent { box-shadow: 0 0 0 1.5px var(--accent), 0 2px 4px rgba(15, 23, 42, .04), 0 24px 48px -20px rgba(31, 91, 255, .35); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s-5); }
.card-head > div { min-width: 0; }
.card-head h2, .card-head h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.35; }
.card-head p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; margin-top: 2px; }
.card-head .end { margin-inline-start: auto; }
@media (min-width: 720px) { .card { padding: 28px; } }
.set-grid { display: grid; gap: var(--s-3); }
.set-grid > .card { margin-bottom: 0; }
@media (min-width: 900px) { .set-grid { grid-template-columns: 1fr 1fr; align-items: start; } .set-grid > .wide { grid-column: 1 / -1; } }

/* Floating cards (illustrations): white, deep shadow, no blur */
.float { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-3); text-align: start; }

/* Key/value list: <dl class="kv"><dt>…</dt><dd>…</dd>…</dl> */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); font-size: var(--fs-sm); }
.kv dt, .kv dd { padding: 9px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); padding-inline-end: 16px; white-space: nowrap; }
.kv dd { font-weight: 500; text-align: end; min-width: 0; }

/* ---------- 12. Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: var(--s-3); margin-bottom: var(--s-5); }
.stat { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 20px; display: grid; align-content: start; min-width: 0; }
.stat .label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.stat .label .icon { width: 16px; height: 16px; color: var(--accent); }
.stat .value { font-family: var(--font-tech); font-size: clamp(1.5rem, 7vw, 2.25rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums;
  overflow-wrap: normal; white-space: nowrap; unicode-bidi: isolate; }   /* a number never breaks in the middle */
.stat .value.sm { font-size: 1.25rem; letter-spacing: -.01em; }
.stat .hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; line-height: 1.45; }
@media (min-width: 1024px) { .stat { padding: 24px; } .stat .value { font-size: 2.75rem; } .stat .value.sm { font-size: 1.375rem; } }

/* ---------- 13. Badges, dots, chips, code pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 11px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; line-height: 1.2; white-space: nowrap;
  background: var(--bg-sunken); color: var(--ink-2); }
.badge .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.badge.urgent, .badge.bad { background: var(--danger-soft); color: var(--danger-ink); }
.badge.live, .badge.ok { background: var(--success-soft); color: var(--success-ink); }
.badge.info, .badge.transfer, .badge.out { background: var(--accent-soft); color: var(--accent-ink); }
.badge.pending, .badge.warn { background: var(--warning-soft); color: var(--warning-ink); }
.badge.away { background: #f0eefc; color: #4b3fb0; }   /* a call outside the answering hours (hours.py) */
.badge.solid { background: var(--accent); color: #fff; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; position: relative; }
.dot.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 2s var(--ease) 6; }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
/* A call that goes on (ui.live_badge): three small bars that move like a voice */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: none; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: 50% 100%; transform: scaleY(.7); }
.eq i:nth-child(2) { transform: scaleY(1); }
.eq i:nth-child(3) { transform: scaleY(.5); }
@media (prefers-reduced-motion: no-preference) {
  .eq i { animation: eq .9s ease-in-out infinite alternate; }
  .eq i:nth-child(2) { animation-delay: -.3s; }
  .eq i:nth-child(3) { animation-delay: -.6s; }
  .icon.ring { transform-origin: 50% 55%; animation: ring-phone 1.4s ease-in-out infinite; }
}
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@keyframes ring-phone { 0%, 45%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(-14deg); } 16%, 32% { transform: rotate(14deg); } }

/* Filter chips (links): <div class="chips"><a class="chip active" href="…">…</a> */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-4); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 16px; border-radius: var(--r-full); background: #fff; box-shadow: var(--shadow-1);
  color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; transition: background-color .2s, color .2s, box-shadow .2s; }
.chip:hover { color: var(--ink); box-shadow: var(--shadow-2); }
.chip.active, .chip[aria-current] { background: var(--ink); color: #fff; box-shadow: none; }

/* Dialing codes and other tech strings: LTR, never wraps */
.code, code.line { font-family: var(--font-tech); font-weight: 600; font-size: .95em; color: var(--ink); background: var(--bg-sunken); padding: 1px 8px; border-radius: 6px;
  direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
code { font-family: var(--font-tech); }
pre { margin: 8px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--line);
  font: 500 .875rem/1.6 var(--font-mono); direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }

/* Forwarding codes: <ul class="codes"><li class="code-row">…<code>**61*…#</code>…<button class="copy-btn" data-copy hidden>… */
.codes { display: grid; gap: 8px; margin-top: var(--s-4); }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-subtle); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05); }
.code-row > div { min-width: 0; }
.code-row .lbl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); font-weight: 500; line-height: 1.4; }
.code-row .lbl .badge { min-height: 24px; padding: 0 9px; }
.code-row code { display: block; margin-top: 3px; font-family: var(--font-tech); font-weight: 600; font-size: 1.125rem; letter-spacing: .035em; direction: ltr; unicode-bidi: isolate; text-align: right; white-space: nowrap; color: var(--ink); user-select: all; }
.code-row.recommended { background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent-tint); }
.code-row.cancel code { color: var(--danger-ink); }
.copy-btn { margin-inline-start: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-full); border: 0; background: #fff; box-shadow: var(--shadow-1);
  font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); cursor: pointer; transition: color .2s, box-shadow .2s, transform .2s var(--ease); }
.copy-btn .icon { width: 16px; height: 16px; }
.copy-btn:hover { color: var(--accent-ink); box-shadow: var(--shadow-2); }
.copy-btn:active { transform: scale(.96); }
.copy-btn.is-done { color: var(--success-ink); }
/* Narrow phones: icon-only copy buttons (each one has an aria-label, so the hidden label is safe) and a smaller code */
@media (max-width: 399px) {
  .copy-btn .copy-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .copy-btn { width: 44px; padding: 0; justify-content: center; }
  .code-row code { font-size: clamp(1rem, 4.6vw, 1.125rem); letter-spacing: .01em; }
}

/* ---------- 14. Banners (ok / warn / bad / info), always with an icon ---------- */
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; margin-bottom: var(--s-4); border-radius: var(--r-md); font-size: var(--fs-base); font-weight: 500; line-height: 1.55;
  background: var(--bg-sunken); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06); }
.banner > .icon { width: 20px; height: 20px; margin-top: 2px; stroke-width: 2; }
.banner-body { min-width: 0; flex: 1; }
.banner-body b { display: block; font-weight: 700; }
.banner-body ul { margin-top: 4px; padding-inline-start: 18px; list-style: disc; }
.banner-body a { color: inherit; text-decoration-color: currentColor; }
.banner.ok { background: var(--success-soft); color: var(--success-ink); box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .2); }
.banner.warn { background: var(--warning-soft); color: var(--warning-ink); box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .22); }
.banner.bad { background: var(--danger-soft); color: var(--danger-ink); box-shadow: inset 0 0 0 1px rgba(229, 55, 59, .25); }
.banner.info { background: var(--accent-soft); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--accent-tint); }
.banner.info > .icon { color: var(--accent); }

/* A softer inline hint */
.tip { display: flex; gap: 10px; margin-top: var(--s-4); padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; }
.tip > .icon { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }

/* ---------- 15. Lists ---------- */
/* Numbered instructions: <ol class="steps"><li>…</li></ol> */
.steps { counter-reset: step; display: grid; gap: 14px; margin-top: var(--s-3); }
.steps > li { counter-increment: step; position: relative; padding-inline-start: 40px; line-height: 1.6; }
.steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-tech); font-weight: 600; font-size: var(--fs-xs); }
/* System status: <ul class="status-list"><li><svg class="icon ok">…</svg><span>…</span></li> */
.status-list > li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.status-list > li:last-child { border-bottom: 0; }
.status-list > li > .icon { margin-top: 3px; }
/* Simple rows inside a card (customers list and the like) */
.rows > li { padding: 16px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows > li:last-child { padding-bottom: 0; }

/* ---------- 16. details / summary ---------- */
summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: var(--fs-sm); color: var(--accent-ink); border-radius: 8px; }
summary::-webkit-details-marker { display: none; }
details:not(.plain) > summary::after { content: ""; width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231645d1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat; }
details[open]:not(.plain) > summary::after { transform: rotate(180deg); }
summary:hover { color: var(--accent); }
details.box { border-top: 1px solid var(--line); margin-top: var(--s-3); }

/* ---------- 17. Messages (a call written up as a message) and chat bubbles ----------
   Shared by the customer's /my and the owner's calls page (admin adds its facts panel in admin.css). */
.msgs { display: grid; gap: var(--s-3); }
.day-head { display: flex; align-items: center; gap: 12px; margin: var(--s-5) 0 2px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.day-head::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.msgs > .day-head:first-child { margin-top: 0; }
.msg { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 20px 20px 6px; min-width: 0; transition: box-shadow .3s var(--ease); }
.msg[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.msg.urgent { box-shadow: 0 0 0 1px rgba(229, 55, 59, .28), 0 1px 2px rgba(15, 23, 42, .04), 0 8px 20px -8px rgba(229, 55, 59, .2); }
.msg:target { box-shadow: 0 0 0 2px var(--danger), 0 8px 20px -8px rgba(229, 55, 59, .25); }
.msg-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av who time" "badges badges badges"; align-items: center; column-gap: 12px; }
.msg-head .avatar { grid-area: av; width: 42px; height: 42px; font-size: 1.0625rem; }
.msg-head .avatar .icon { width: 20px; height: 20px; }
.msg-head .who { grid-area: who; min-width: 0; }
.msg-head .who b { display: block; font-size: var(--fs-md); font-weight: 700; letter-spacing: -.01em; line-height: 1.35; overflow-wrap: break-word; }
.msg-head .who .ltr, .msg-head .who a { display: inline-block; font-family: var(--font-tech); font-size: var(--fs-xs); color: var(--muted); }
.msg-head .who a { color: var(--accent-ink); }
.msg-head time, .msg-head .when { grid-area: time; align-self: start; padding-top: 2px; font-family: var(--font-tech); font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.msg-head .badges { grid-area: badges; margin-top: var(--s-3); }
.msg-head .badges:empty { display: none; }
.msg-head .badge { min-height: 28px; }
.msg-sum { margin-top: var(--s-3); font-size: var(--fs-md); line-height: 1.6; color: var(--ink); }
/* A long URL or unbroken string in an AI summary wraps anywhere; numbers are .ltr/.nowrap and never break */
.msg-sum, .fields dd, .bubble { overflow-wrap: anywhere; }
.msg-sum.empty-sum { color: var(--muted); }
/* An outbound call: what the customer asked the assistant to say */
.msg-request { margin-top: var(--s-3); font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.msg-request .lbl { font-weight: 600; color: var(--muted); }
/* The structured message: label above value under 480px (long names and requests get the full width),
   label/value rows up to 720px, tiles that fill each row from 720px (.wide rows span the width) */
.fields { display: grid; gap: 1px; margin-top: 8px; border-radius: var(--r-md); overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.fields > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 10px 14px; background: var(--bg-subtle); min-width: 0; }
.fields dt { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.fields dd { font-size: var(--fs-base); font-weight: 600; line-height: 1.5; min-width: 0; }
.fields dd.yes { color: var(--danger-ink); }
.fields dd.no { color: var(--success-ink); }
.fields dd .ltr, .fields dd a { font-family: var(--font-tech); }
.fields dd a { font-weight: 600; }
@media (max-width: 479px) { .fields > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
@media (min-width: 720px) {
  .fields { display: flex; flex-wrap: wrap; }
  .fields > div { flex: 1 1 140px; grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .fields > .wide { flex-basis: 100%; }
}
.msg-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: var(--s-4); padding: 12px 0 14px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }
.msg-foot .icon { width: 16px; height: 16px; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
/* The transcript under a message: <details class="transcript plain"><summary><span class="toggle">…</span>…</summary> */
.transcript { margin-top: var(--s-3); border-top: 1px solid var(--line); }
.transcript > summary { justify-content: space-between; gap: 12px; min-height: 54px; color: var(--muted); font-weight: 500; }
.transcript > summary:hover { color: var(--muted); }
.transcript .meta-item { font-size: var(--fs-xs); color: var(--muted); }
.transcript .chat { padding: 4px 0 var(--s-4); }
.transcript .chat .bubble { max-width: 84%; }
.toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; margin-inline-start: -12px; padding: 0 12px; border-radius: var(--r-full); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 600; transition: background-color .2s; }
.toggle .icon { width: 17px; height: 17px; }
.toggle .chev { transition: transform .3s var(--ease); }
summary:hover .toggle { background: var(--accent-soft); }
details[open] > summary .toggle .chev { transform: rotate(180deg); }
@media (min-width: 1024px) {
  .msg { padding: 28px 28px 8px; }
  .msg-head { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "av who badges time"; }
  .msg-head .badges { margin-top: 0; justify-content: flex-end; }
  .msg-head time, .msg-head .when { align-self: center; padding: 0; }
}

/* Chat bubbles: <div class="chat"><p class="bubble assistant"><span class="who">העוזרת</span>…</p><p class="bubble caller">… */
.chat { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 86%; margin: 0; padding: 9px 14px 10px; border-radius: 18px; font-size: var(--fs-base); line-height: 1.55; color: var(--ink); }
.bubble .who { display: block; margin-bottom: 1px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.bubble.assistant { align-self: flex-start; background: var(--accent-soft); border-start-start-radius: 6px; }
.bubble.assistant .who { color: var(--accent-ink); }
.bubble.caller { align-self: flex-end; background: var(--bg-sunken); border-start-end-radius: 6px; }
.chat-note { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 12px; border-radius: var(--r-full); background: var(--bg-sunken); color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.chat-note .ltr { font-family: var(--font-tech); }
.chat-note.transfer { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.chat-note.transfer.failed { background: var(--warning-soft); color: var(--warning-ink); }
.chat-note .icon { width: 15px; height: 15px; }

/* The owner's call cards (admin) */
.call-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.call-head .who { font-weight: 700; font-size: var(--fs-md); }
.call-head .when { color: var(--muted); font-size: var(--fs-xs); margin-inline-start: auto; white-space: nowrap; }
.summary { margin: var(--s-3) 0 var(--s-2); font-size: var(--fs-md); line-height: 1.6; }
.message { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; margin: 8px 0; line-height: 1.55; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: var(--s-2); color: var(--muted); font-size: var(--fs-xs); }

/* ---------- 17b. Outgoing calls and contacts: the customer's forms (/my/outgoing/new, /my/contacts) ---------- */
.new-call { margin-bottom: 0; }
.new-call-form .field, .contact-form .field { margin-bottom: 18px; }
.new-call-form textarea { min-height: 88px; }
.help.center { text-align: center; margin-top: 10px; }
input[type=date], input[type=time] { width: 100%; min-height: 48px; margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--control); background: #fff;
  color: var(--ink); font: inherit; font-size: var(--fs-base); direction: ltr; text-align: right; }
input[type=date]:focus, input[type=time]:focus { outline: 2px solid transparent; border-color: var(--accent); box-shadow: var(--focus-ring); }
/* Who: contacts as small chips to pick, then a name and a number for each person ("עוד אדם" adds a row, site.js).
   The labels show on the first row only (the rows under it are the same columns). */
.who-field { display: grid; gap: 12px; }
.who-sub { margin-bottom: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.pick-search { min-height: 40px; margin-bottom: 8px; padding: 8px 12px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 172px; overflow-y: auto; }
.pick-chips > li[hidden] { display: none; }
.pick-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--r-full);
  background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: background-color .15s, box-shadow .15s, color .15s; }
.pick-chip:hover { box-shadow: inset 0 0 0 1px var(--control); }
.pick-chip input[type=checkbox] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: inherit; opacity: 0; cursor: pointer; }
.pick-chip:has(input:checked) { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pick-chip:has(input:checked)::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6.5 9.5 17 4 11.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6.5 9.5 17 4 11.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.pick-chip:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.pick-chip:has(input:disabled) { color: var(--muted); text-decoration: line-through; cursor: not-allowed; }
.pick-chip:has(input:disabled) input { cursor: not-allowed; }
.who-rows { display: grid; gap: 8px; }
.person-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.person-row .field { margin: 0; gap: 6px; }
.person-row label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.person-row label .optional { font-size: var(--fs-xs); }
.person-row input { min-height: 44px; padding: 9px 12px; }
.person-row + .person-row label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.who-field > .field-error { margin-top: -4px; }
.btn.add-person { justify-self: start; margin-top: -2px; color: var(--accent-ink); font-weight: 600; }
.btn.add-person:hover { color: var(--accent-hover); }
/* When: a small two-part switch; the date and time show only for "another time" (browsers without :has show them always) */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; max-width: 340px; padding: 3px; border-radius: var(--r-full);
  background: var(--bg-sunken); }
.segmented label { position: relative; display: flex; }
.segmented input[type=radio] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: inherit; opacity: 0; cursor: pointer; }
.segmented span { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 38px; padding: 0 16px; border-radius: var(--r-full); color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: 600; transition: background-color .15s, color .15s, box-shadow .15s; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 0 0 1px rgba(15, 23, 42, .06); }
.segmented input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.when-at { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.when-at .field { margin: 0; gap: 4px; }
.when-at label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.when-field:has(input[value="now"]:checked) .when-at { display: none; }
.when-field .help { margin-top: 8px; }
.new-call-send { display: grid; gap: 8px; margin-top: 4px; text-align: center; }
/* "מתקדם" (details.advanced): what most requests do without, closed until opened. In it two groups, each a fieldset:
   what to find out from everyone (.ask-more, "קבלת נתונים"), and what to press at a switchboard (.dial-more) */
.advanced { margin: -4px 0 16px; }
.advanced > summary { min-height: 40px; font-size: var(--fs-sm); }
.advanced-body { display: grid; gap: 22px; padding: 6px 0 4px; }
.advanced fieldset { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.advanced legend { padding: 0; margin-bottom: 2px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.advanced legend .optional { font-weight: 500; color: var(--muted); }
.advanced fieldset > .help { margin: 0; }
/* What to find out from everyone (.ask-more). A row a question: what to ask and what kind of answer, and the choices
   under them for "אחת מכמה" (site.js shows them only then). The labels show on the first row only, as in the people's
   rows */
.ask-rows { display: grid; gap: 8px; }
.ask-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9.5em); gap: 6px 8px; }
.new-call-form .ask-row .field { margin: 0; gap: 6px; }
.ask-row label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.ask-row input, .ask-row select { min-height: 44px; padding: 9px 12px; }
.ask-row .ask-options { grid-column: 1 / -1; }
.ask-row + .ask-row :is(.ask-q, .ask-kind) label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.ask-preset, .btn.add-ask { justify-self: start; color: var(--accent-ink); font-weight: 600; }
.btn.ask-preset:hover, .btn.add-ask:hover { color: var(--accent-hover); }
/* What to press when they answer, at a switchboard (.dial-more): one short field, and (with Gemini) letting the
   assistant pick in the menu. On the request's page it shows under what was asked (.cv-keys) */
.dial-more .field { margin: 0; }
.dial-more .field > label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.dial-more input[type=tel] { max-width: 14em; }
.dial-more .check { font-size: var(--fs-sm); font-weight: 500; }
.dial-more .check .optional { color: var(--muted); }
.cv-keys { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--muted); }
/* The answers of a request (ui_site._answers_card): the counts, and a table with a row a person (the name leads to their
   call below). Yes and no as small colored tags */
.answers-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.answers-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.answers-tools .btn { --h: 36px; padding: 2px 12px; }
.answers-sum { display: grid; gap: 2px; margin: 8px 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.answers-sum .q { font-weight: 500; color: var(--muted); }
.answers-scroll { overflow-x: auto; margin-top: 10px; }
.answers { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.answers th, .answers td { padding: 8px 0 8px 14px; text-align: start; vertical-align: top; border-top: 1px solid var(--line); }
.answers thead th { border-top: 0; padding-top: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.answers tbody th { font-weight: 700; white-space: nowrap; }
.answers tbody th a { color: inherit; text-decoration: none; }
.answers tbody th a:hover { text-decoration: underline; }
.ans { display: inline-block; padding: 1px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.ans.yes { background: var(--success-soft); color: var(--success-ink); }
.ans.no { background: var(--danger-soft); color: var(--danger-ink); }
.ans.unsure { background: var(--bg-sunken); color: var(--ink-2); }
.ans-none, .ans-state { color: var(--muted); }
.answers-list { display: grid; gap: 4px; margin: 0 0 8px; }
.answers-list > div { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.answers-list dt { color: var(--muted); }
.answers-list dd { margin: 0; font-weight: 700; }
@media (forced-colors: active) { .ans { border: 1px solid CanvasText; } }

/* A request: a row for each person called */
.person .badge { white-space: normal; }
.inline-form { display: inline-flex; }
.people { margin-top: var(--s-3); border-top: 1px solid var(--line); }
.person { padding: 12px 0; border-bottom: 1px solid var(--line); }
.person[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.person:last-child { border-bottom: 0; }
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.person-head .who { flex: 1 1 140px; min-width: 0; }
.person-head .who b { margin-inline-end: 8px; font-weight: 700; overflow-wrap: anywhere; }
.person-head .who .ltr { font-family: var(--font-tech); font-size: var(--fs-xs); color: var(--muted); }
.person .msg-sum { margin-top: 6px; font-size: var(--fs-base); }
.person .transcript { margin-top: 6px; border-top: 0; }
.person .btn.quiet { --h: 36px; padding: 2px 12px; }
.opt-out { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--warning-ink); }
.opt-out .icon { width: 17px; height: 17px; margin-top: 2px; flex: none; }


/* ---------- 17c. The recording of a call (ui.recording_player) ----------
   Without JS: a label and the browser's player. With site.js: ours (.player, left to right like every media player):
   the play button, the waves of the recording (the played part in color; a click jumps there), the time, the speed
   and a download. */
.recording { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 4px; }
.rec-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.rec-label .icon { width: 17px; height: 17px; color: var(--accent); }
.rec-label .num { font-weight: 500; color: var(--muted); }
.recording audio { flex: 1 1 240px; min-width: 0; max-width: 460px; height: 40px; }
.recording.is-ready { display: block; }
.recording.is-ready > .rec-label, .recording.is-ready > audio { display: none; }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; max-width: 520px; padding: 10px 14px 8px 10px;
  border-radius: 18px; background: #fff; box-shadow: var(--shadow-1); }
.player[hidden] { display: none; }
.pl-play { flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); cursor: pointer; transition: background-color .2s, transform .15s var(--ease); }
.pl-play:hover { background: var(--accent-hover); }
.pl-play:active { transform: scale(.94); }
.pl-play:focus-visible { box-shadow: var(--focus-ring), var(--shadow-accent); }
.pl-play .icon { width: 22px; height: 22px; }
.pl-play .pl-i-play { margin-left: 2px; }
.pl-i-pause, .pl-spin, .is-playing .pl-i-play { display: none; }
.is-playing .pl-i-pause { display: block; }
.is-loading .pl-play .icon { display: none; }
.is-loading .pl-spin { display: block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #fff; border-right-color: transparent;
  animation: spin .7s linear infinite; }
.pl-main { flex: 1 1 160px; min-width: 0; }
.pl-track { position: relative; height: 38px; border-radius: 6px; }
.pl-wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 2px; pointer-events: none; }
.pl-wave i { flex: 1 1 0; min-width: 2px; max-width: 4px; height: 100%; border-radius: 2px; background: var(--accent-tint);
  transform: scaleY(var(--v, .14)); transition: transform .6s var(--ease); }
.pl-done { clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); }
.pl-done i { background: var(--accent); }
.pl-seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pl-track:has(.pl-seek:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
@supports not selector(:has(a)) { .pl-track:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; } }
.pl-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.pl-time { font: 500 var(--fs-xs)/1 var(--font-tech); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-now { color: var(--ink-2); }
.pl-tools { display: inline-flex; align-items: center; gap: 8px; }
.pl-speed { min-width: 48px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-full); background: var(--bg-sunken);
  color: var(--ink-2); font: 700 var(--fs-xs)/1 var(--font-tech); cursor: pointer; transition: background-color .2s, color .2s; }
.pl-speed:hover { background: var(--accent-soft); color: var(--accent-ink); }
.pl-get { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.pl-get:hover { background: var(--bg-sunken); color: var(--ink); }
.pl-get .icon { width: 18px; height: 18px; }
.pl-speed:focus-visible, .pl-get:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-error { flex-basis: 100%; margin: 4px 0 0; font-size: var(--fs-xs); color: var(--danger-ink); direction: rtl; }
@media (forced-colors: active) {
  .pl-play { border: 2px solid ButtonText; }
  .pl-wave i { forced-color-adjust: none; background: GrayText; }
  .pl-done i { background: Highlight; }
}

/* ---------- 17d. A call that goes on (ui.live_panel): who speaks now ----------
   The assistant (the brand mark) on the start side and the other party on the end side, like the bubbles of a
   transcript; between them waves that move while someone speaks (blue: the assistant, green: the other party), and
   the speaker's mark glows. site.js sets .lc-stage[data-speaking] (assistant / caller / idle / ending / over) every second. */
.live-call { padding: 18px 16px 16px; border-radius: var(--r-lg); background: linear-gradient(180deg, var(--accent-soft), #fff 78%); box-shadow: var(--shadow-1); }
.lc-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; max-width: 440px; margin-inline: auto; }
.lc-party { display: grid; justify-items: center; gap: 6px; min-width: 64px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted);
  text-align: center; transition: color .3s; }
.lc-face { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; }
.lc-face::after { content: ""; position: absolute; inset: -5px; border-radius: inherit; border: 2.5px solid var(--glow); opacity: 0; transition: opacity .3s; }
.lc-assistant .lc-face { border-radius: 30%; --glow: var(--accent); }
.lc-mark { display: block; width: 56px; height: 56px; filter: drop-shadow(0 4px 10px rgba(31, 91, 255, .28)); }
.lc-caller .lc-face { background: #fff; box-shadow: var(--shadow-1); color: var(--ink-2); font-size: 1.375rem; font-weight: 700; --glow: var(--success); }
.lc-caller .lc-face .icon { width: 26px; height: 26px; }
.lc-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 56px; min-width: 0; overflow: hidden; }
.lc-wave i { flex: 0 0 5px; height: 100%; border-radius: 3px; background: var(--line-strong); transform: scaleY(.12);
  transition: transform .35s var(--ease), background-color .35s; }
.lc-wave i:nth-child(1) { --a: .3; --w: 0s; --r: -.98s; }
.lc-wave i:nth-child(2) { --a: .46; --w: -.07s; --r: -.91s; }
.lc-wave i:nth-child(3) { --a: .62; --w: -.14s; --r: -.84s; }
.lc-wave i:nth-child(4) { --a: .5; --w: -.21s; --r: -.77s; }
.lc-wave i:nth-child(5) { --a: .78; --w: -.28s; --r: -.7s; }
.lc-wave i:nth-child(6) { --a: .92; --w: -.35s; --r: -.63s; }
.lc-wave i:nth-child(7) { --a: .7; --w: -.42s; --r: -.56s; }
.lc-wave i:nth-child(8) { --a: 1; --w: -.49s; --r: -.49s; }
.lc-wave i:nth-child(9) { --a: .74; --w: -.56s; --r: -.42s; }
.lc-wave i:nth-child(10) { --a: .9; --w: -.63s; --r: -.35s; }
.lc-wave i:nth-child(11) { --a: .64; --w: -.7s; --r: -.28s; }
.lc-wave i:nth-child(12) { --a: .8; --w: -.77s; --r: -.21s; }
.lc-wave i:nth-child(13) { --a: .52; --w: -.84s; --r: -.14s; }
.lc-wave i:nth-child(14) { --a: .4; --w: -.91s; --r: -.07s; }
.lc-wave i:nth-child(15) { --a: .26; --w: -.98s; --r: 0s; }
[data-speaking="assistant"] .lc-wave i { background: linear-gradient(180deg, #6f95ff, var(--accent)); transform: scaleY(var(--a)); }
[data-speaking="caller"] .lc-wave i { background: linear-gradient(180deg, #4ade80, var(--success)); transform: scaleY(var(--a)); }
[data-speaking="idle"] .lc-wave i { background: var(--accent-tint); transform: scaleY(.16); }
[data-speaking="ending"] .lc-wave i, [data-speaking="over"] .lc-wave i { transform: scaleY(.08); }
[data-speaking="assistant"] .lc-assistant, [data-speaking="caller"] .lc-caller { color: var(--ink); }
[data-speaking="assistant"] .lc-assistant .lc-face::after, [data-speaking="caller"] .lc-caller .lc-face::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  /* the waves go from the one who speaks to the other one */
  [data-speaking="assistant"] .lc-wave i { animation: lc-talk 1s ease-in-out var(--r) infinite; }
  [data-speaking="caller"] .lc-wave i { animation: lc-talk 1s ease-in-out var(--w) infinite; }
  [data-speaking="idle"] .lc-wave i, [data-speaking=""] .lc-wave i { animation: lc-idle 2.8s ease-in-out var(--w) infinite; }
  [data-speaking="assistant"] .lc-assistant .lc-face::after,
  [data-speaking="caller"] .lc-caller .lc-face::after { animation: lc-glow 1.3s var(--ease) infinite; }
}
@keyframes lc-talk { 0%, 100% { transform: scaleY(calc(var(--a) * .22)); } 50% { transform: scaleY(var(--a)); } }
@keyframes lc-idle { 0%, 100% { transform: scaleY(.1); } 50% { transform: scaleY(.24); } }
@keyframes lc-glow { 0% { transform: scale(.94); opacity: .9; } 100% { transform: scale(1.32); opacity: 0; } }
.lc-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: var(--fs-sm); font-weight: 700;
  color: var(--accent-ink); text-align: center; }
.lc-status .dot { color: var(--success); }
.lc-stage[data-speaking="caller"] + .lc-status { color: var(--success-ink); }
.lc-stage:is([data-speaking="ending"], [data-speaking="over"]) + .lc-status { color: var(--muted); }
.lc-stage:is([data-speaking="ending"], [data-speaking="over"]) + .lc-status .dot { display: none; }
.lc-lines { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); gap: 6px; }
.lc-lines[hidden] { display: none; }
.lc-lines .bubble { max-width: 92%; padding: 7px 12px 8px; font-size: var(--fs-sm); }
.live-call.compact { margin: 12px 0 6px; padding: 12px 12px 10px; }
.live-call.compact .lc-face, .live-call.compact .lc-mark { width: 40px; height: 40px; }
.live-call.compact .lc-caller .lc-face { font-size: 1.0625rem; }
.live-call.compact .lc-party { min-width: 48px; }
.live-call.compact .lc-name { display: none; }
.live-call.compact .lc-wave { height: 40px; gap: 3px; }
.live-call.compact .lc-wave i { flex-basis: 4px; }
.live-call.compact .lc-status { margin-top: 8px; }
/* Listening to the call (button[data-listen], site.js): a pill under the line that says who speaks. Headphones and
   "האזנה לשיחה"; while it connects a spinner; while the call is heard it is blue, with bars that move */
.lc-listen { display: grid; justify-items: center; gap: 6px; margin-top: 12px; }
.lc-listen[hidden] { display: none; }
.lc-listen-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 6px 18px;
  border: 0; border-radius: var(--r-full); background: #fff; color: var(--accent-ink); font: inherit; font-size: var(--fs-sm);
  font-weight: 700; line-height: 1.25; cursor: pointer; box-shadow: 0 0 0 1px var(--accent-tint), var(--shadow-1);
  transition: background-color .2s, color .2s, box-shadow .2s; }
.lc-listen-btn:hover { background: var(--accent-soft); }
.lc-listen-btn .icon { width: 18px; height: 18px; }
.lc-listen-btn .eq, .lc-listen-btn .btn-spin { display: none; }
.lc-listen-btn.is-wait { color: var(--ink-2); cursor: progress; }
.lc-listen-btn.is-wait .icon, .lc-listen-btn.is-on .icon { display: none; }
.lc-listen-btn.is-wait .btn-spin { display: inline-block; width: 16px; height: 16px; border-width: 2px; }
.lc-listen-btn.is-on { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(31, 91, 255, .3); }
.lc-listen-btn.is-on:hover { background: var(--accent-hover); }
.lc-listen-btn.is-on .eq { display: inline-flex; }
.lc-listen-note { margin: 0; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.lc-listen-note[hidden] { display: none; }
.live-call.compact .lc-listen { margin-top: 8px; }
.live-call.compact .lc-listen-btn { min-height: 36px; padding: 4px 14px; }
/* An instruction to the assistant (form[data-tell], site.js): a field and "שליחה", ready-made ones under them, and a note */
.lc-tell { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lc-tell[hidden] { display: none; }
.lc-tell-label { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); }
.lc-tell-row { display: flex; align-items: center; gap: 8px; }
.lc-tell-row input { flex: 1; min-width: 0; min-height: 44px; padding: 9px 16px; border-radius: var(--r-full); }
.lc-tell-row .btn { flex: none; }
.lc-tell-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-tell-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px; border: 0; border-radius: var(--r-full);
  background: #fff; color: var(--ink-2); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-strong); transition: background-color .2s, color .2s; }
.lc-tell-chip:hover { background: var(--accent-soft); color: var(--accent-ink); }
.lc-tell-chip.is-busy { cursor: progress; pointer-events: none; }
.lc-tell-note { margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--success-ink); }
.lc-tell-note.is-error { color: var(--danger-ink); }
.lc-tell-note[hidden] { display: none; }
@media (forced-colors: active) {
  .lc-tell-chip { border: 1px solid ButtonText; }
  .lc-listen-btn { border: 1px solid ButtonText; }
  .lc-listen-btn.is-on { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* A status line (settings page, the forwarding card) */
.state { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: var(--fs-sm); font-weight: 500; line-height: 1.55; }
.state > .icon { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.state.ok { background: var(--success-soft); color: var(--success-ink); }
.state.warn { background: var(--warning-soft); color: var(--warning-ink); }
.state.info { background: var(--bg-sunken); color: var(--ink-2); }
.state b { font-weight: 700; }
.state .code, .state code.line { font-size: .95em; }
/* Which number the people called see (/my/settings/caller) */
.caller-card { margin-bottom: var(--s-5); }
.caller-card .card-head { margin-bottom: var(--s-3); }
.caller-card .card-head p { font-size: var(--fs-base); color: var(--ink-2); }
.caller-form .field { margin: 0; }
.caller-wait { margin-bottom: var(--s-4); padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-soft); line-height: 1.6; }
.caller-code { margin: 6px 0 10px; }
.caller-code .code { font-size: 1.5rem; letter-spacing: .12em; padding: 4px 14px; background: #fff; }
.caller-free { margin-bottom: 12px; }

/* ---------- 18. Empty states ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty-art { display: block; width: 112px; height: 112px; margin: 0 auto 16px; }
.empty :is(h2, h3) { color: var(--ink); font-size: var(--fs-h3); }
.empty p { max-width: 38ch; margin: 6px auto 0; font-size: var(--fs-base); }
.empty .actions { justify-content: center; margin-top: var(--s-4); }

/* ---------- 19. Sign-in / verification layout (a centred card) ---------- */
.auth { min-height: calc(100vh - var(--header-h) - 1px); display: grid; place-items: center; padding: var(--s-6) var(--gutter) var(--s-8); }
.area-bare .auth { min-height: 100vh; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand { margin-bottom: var(--s-5); }
.auth-card h1 { font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); }

/* Google's button container */
.signin { display: grid; justify-items: center; gap: 12px; }
.g_id_signin { min-height: 44px; }

/* ---------- 20. Motion and forced colours ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (forced-colors: active) {
  .badge, .chip, .banner, .code-row, .card, .msg, .stat, .choice, .pick-chip, .segmented span { border: 1px solid CanvasText; }
  .choice:has(input:checked) { outline: 3px solid Highlight; }
  .pick-chip:has(input:checked), .segmented input:checked + span { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  /* The current tab and the selected chip are marked by colour only: keep that mark in high contrast */
  .app-nav a[aria-current="page"], .chip.active, .chip[aria-current] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .progress .pnum { border: 1.5px solid CanvasText; }
  .progress li.current .pnum { border-width: 3px; }
  .progress li::before { background: CanvasText; }
}

/* "צור קשר" in a corner of the screen, on the public pages and the customer's pages (ui.page): always in sight, but
   quiet (a light chip, not a call to action). On a phone, the customer's pages have their menu at the bottom, so it
   sits above it. */
.contact-fab { position: fixed; z-index: 40; inset-inline-end: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: inline-flex;
  align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 12px; border-radius: var(--r-full); background: rgba(255, 255, 255, .96);
  color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-2);
  transition: color .2s var(--ease), box-shadow .2s var(--ease); }
.contact-fab:hover { color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent-tint), 0 8px 20px -8px rgba(15, 23, 42, .18); }
.contact-fab .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
body.my-app .contact-fab { bottom: calc(80px + env(safe-area-inset-bottom)); }
/* room under the end of the page, so the button never stays over its last lines */
body.area-public:has(.contact-fab) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
body.my-app:has(.contact-fab) #main { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
/* and a field or button reached with Tab is not hidden under it */
html:has(.contact-fab) { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
@media (max-width: 1023px) {
  html:has(body.my-app .contact-fab) { scroll-padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) {
  .contact-fab { inset-inline-end: 24px; bottom: 24px; }
  body.my-app .contact-fab { bottom: 24px; }
  body.area-public:has(.contact-fab) { padding-bottom: 72px; }
  body.my-app:has(.contact-fab) #main { padding-bottom: 80px; }
}
@media (forced-colors: active) { .contact-fab { border: 1px solid CanvasText; } }
@media print { .contact-fab { display: none; } }

/* ---------- 21. On a computer: the customer's pages and the owner's pages denser ----------
   A wide screen and a mouse, so there is no finger to make room for: smaller text (the root size, so every size in rem
   follows) and tighter buttons, fields and cards, so that more fits without scrolling. :where() keeps each rule exactly
   as specific as the one it replaces, so a size that a component sets for itself (here or in app.css, admin.css) still
   wins. Phones, tablets and touch screens keep the sizes above, and so do the public pages. More in app.css, admin.css. */
@media (min-width: 1024px) and (pointer: fine) {
  html:has(> body:is(.area-app, .area-admin)) { font-size: 87.5%; }   /* 14px instead of 16px: body text 15px */
  :where(.area-app, .area-admin) { --fs-xs: .9286rem; }               /* the smallest text stays 13px */
  :where(.area-app, .area-admin) .btn { --h: 40px; padding: 4px 18px; }
  :where(.area-app, .area-admin) .btn.sm, :where(.area-app, .area-admin) .btn.small { --h: 34px; padding: 2px 12px; }
  :where(.area-app, .area-admin) .btn.lg, :where(.area-app, .area-admin) .savebar .btn { --h: 46px; }
  :where(.area-app, .area-admin) :is(input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password],
    input[type=url], input[type=search], input[type=date], input[type=time], input:not([type]), select) { min-height: 40px; padding-block: 7px; }
  :where(.area-app, .area-admin) textarea { min-height: 96px; padding-block: 8px; }
  :where(.area-app, .area-admin) .field { gap: 6px; margin-bottom: 14px; }
  :where(.area-app, .area-admin) .choice { padding: 10px 12px; }
  :where(.area-app, .area-admin) .card { padding: 16px 20px; margin-bottom: 12px; }
  :where(.area-app, .area-admin) .back-link { min-height: 32px; }
  :where(.area-app, .area-admin) .chip { min-height: 36px; padding: 2px 14px; }
  :where(.area-app, .area-admin) .banner { padding: 10px 14px; margin-bottom: 12px; }
}
