/* TonIAssistant · "Après l'appel" section. Every selector is scoped under .ac or prefixed ac-.
   Reads the page tokens (--sc-*, --glow) when present, falls back to Palette L otherwise. */

.ac {
  --ac-ink: var(--sc-ink, #0a1020);
  --ac-soft: var(--sc-ink-soft, #4b5670);
  --ac-accent: var(--sc-accent, #2152ff);
  --ac-glow: var(--glow, #62d8ff);
  --ac-bg: var(--sc-canvas, #ffffff);
  --ac-card: #ffffff;
  --ac-surface: var(--sc-surface, #f3f6fd);
  --ac-line: color-mix(in oklab, var(--ac-ink) 10%, transparent);
  --ac-line-strong: color-mix(in oklab, var(--ac-ink) 18%, transparent);
  --ac-accent-soft: color-mix(in oklab, var(--ac-accent) 9%, var(--ac-card));
  --ac-accent-line: color-mix(in oklab, var(--ac-accent) 26%, transparent);
  --ac-ok: #1f9d55;
  --ac-teams: #5b5fc7;
  --ac-shadow: 0 1px 0 var(--ac-line), 0 28px 60px -32px color-mix(in oklab, var(--ac-ink) 40%, transparent);
  --ac-display: var(--sc-font-display, "Bricolage Grotesque", "Geist", system-ui, sans-serif);
  --ac-text: var(--sc-font-text, "Geist", system-ui, -apple-system, "Segoe UI", sans-serif);
  --ac-mono: var(--sc-font-mono, "Geist Mono", ui-monospace, Menlo, monospace);
  --ac-ease: var(--sc-ease-out, cubic-bezier(0.23, 1, 0.32, 1));
  --ac-gutter: var(--sc-gutter, clamp(1.25rem, 5vw, 5.5rem));
  --ac-maxw: var(--sc-maxw, 82rem);
  --ac-t-xs: var(--sc-t-xs, clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem));
  --ac-t-sm: var(--sc-t-sm, clamp(0.875rem, 0.84rem + 0.18vw, 0.95rem));
  --ac-t-base: var(--sc-t-base, clamp(1rem, 0.96rem + 0.22vw, 1.125rem));
  --ac-t-lg: var(--sc-t-lg, clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem));
  --ac-t-2xl: var(--sc-t-2xl, clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem));
  --ac-hh: 40px;            /* one hour in the day view */
  --ac-vis-h: 440px;        /* every row visual is this tall on desktop */

  position: relative;
  background: var(--ac-bg);
  color: var(--ac-ink);
  font-family: var(--ac-text);
  font-size: var(--ac-t-base);
  line-height: 1.55;
  padding-block: clamp(4.5rem, 8vw, 8rem);
  overflow-x: clip;
}
.ac *, .ac *::before, .ac *::after { box-sizing: border-box; }
.ac :where(h2, h3, p, ul, dl, dd) { margin: 0; }
.ac :where(ul) { padding: 0; list-style: none; }
.ac :where(button) { font: inherit; color: inherit; }
.ac :focus-visible { outline: 2px solid var(--ac-accent); outline-offset: 3px; border-radius: 6px; }
.ac .ac-ia { color: var(--ac-accent); }

.ac-wrap { width: 100%; max-width: var(--ac-maxw); margin-inline: auto; padding-inline: var(--ac-gutter); }
.ac-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ac-sr-focus:focus-visible { position: static !important; width: auto; height: auto; margin: 12px 0 0; clip: auto; white-space: normal; overflow: visible;
  padding: 8px 14px; border-radius: 999px; background: var(--ac-surface); border: 0; cursor: pointer; font-size: var(--ac-t-xs); }

/* ---------- head ---------- */
.ac-head { max-width: 46rem; }
.ac-eyebrow, .ac-step { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac-accent); }
.ac-title { margin-top: 14px; font-family: var(--ac-display); font-weight: 500; font-size: var(--ac-t-2xl); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.ac-lede { margin-top: 18px; max-width: 38rem; color: var(--ac-soft); font-size: var(--ac-t-base); text-wrap: pretty; }

/* ---------- rows ---------- */
.ac-row { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: center; margin-top: clamp(3.5rem, 7vw, 6.5rem); }
.ac-row--flip { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
.ac-row--flip .ac-copy { order: 2; }
.ac-copy { max-width: 30rem; }
.ac-row--flip .ac-copy { justify-self: end; width: 100%; }
.ac-h { margin-top: 12px; font-family: var(--ac-display); font-weight: 500; font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.15rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.ac-p { margin-top: 14px; color: var(--ac-soft); text-wrap: pretty; }
.ac-why { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--ac-accent); font-size: var(--ac-t-sm); color: var(--ac-ink); text-wrap: pretty; }
.ac-why b { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac-soft); margin-bottom: 2px; }
.ac-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.ac-tools li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: var(--ac-t-xs); box-shadow: inset 0 0 0 1px var(--ac-line); background: var(--ac-card); }
.ac-tools .ac-tools__plain { box-shadow: none; padding-left: 4px; color: var(--ac-soft); background: none; }
.ac-ico { width: 18px; height: 18px; flex: none; display: block; }
.ac-ico--lg { width: 22px; height: 22px; }
.ac-inl { width: 13px; height: 13px; flex: none; vertical-align: -2px; margin-right: 5px; color: var(--ac-soft); }

/* ---------- visual frame ---------- */
.ac-vis { position: relative; width: 100%; max-width: 32rem; justify-self: start; }
.ac-row:not(.ac-row--flip) .ac-vis { justify-self: end; }
.ac-vis::before { content: ""; position: absolute; inset: 8% -6% -4% -6%; z-index: 0; pointer-events: none; border-radius: 40px;
  background: radial-gradient(60% 55% at 60% 45%, color-mix(in oklab, var(--ac-glow) 22%, transparent), transparent 70%); filter: blur(10px); }
.ac-vis.kv::before { display: none; }  /* no blue haze over the dentist card */
.ac-frame { position: relative; z-index: 1; height: var(--ac-vis-h); display: flex; flex-direction: column; background: var(--ac-card); border-radius: 18px;
  box-shadow: inset 0 0 0 1px var(--ac-line), var(--ac-shadow); overflow: hidden; }
.ac-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--ac-line); min-height: 48px; flex: none; }
.ac-ex { font-size: var(--ac-t-xs); color: var(--ac-soft); white-space: nowrap; }
.ac-ex b { color: var(--ac-ink); font-weight: 500; }
.ac-sync { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ac-soft); }
.ac-sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac-ok); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ac-ok) 18%, transparent); }
.ac-replay { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; padding: 6px 10px; border-radius: 999px;
  font-size: 12px; color: var(--ac-soft); transition: background 160ms, color 160ms; }
.ac-replay svg { width: 13px; height: 13px; }
.ac-replay:hover { background: var(--ac-surface); color: var(--ac-ink); }
.ac-mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ac-accent); color: #fff;
  font: 600 12px/1 var(--ac-display); letter-spacing: -0.01em; }
.ac-mark--sm { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }
.ac-hint { margin-top: 12px; text-align: center; font-size: 12px; color: var(--ac-soft); position: relative; z-index: 1; }
.ac-hint--touch { display: none; }
@media (hover: none) { .ac-hint--hover { display: none; } .ac-hint--touch { display: inline; } }

/* ---------- 01 · one-day calendar ---------- */
.ac-cal { height: auto; }
.ac-days { display: flex; gap: 4px; padding: 6px 14px; border-bottom: 1px solid var(--ac-line); flex: none; }
.ac-day { flex: 1; border: 0; cursor: pointer; padding: 6px 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 500; color: var(--ac-soft);
  transition: background 160ms, color 160ms; }
.ac-day:hover { background: var(--ac-surface); color: var(--ac-ink); }
.ac-day[aria-pressed="true"] { background: var(--ac-accent-soft); color: var(--ac-accent); box-shadow: inset 0 0 0 1px var(--ac-accent-line); }
.ac-grid { position: relative; flex: 1; display: grid; grid-template-columns: 44px 1fr; padding: 8px 14px 0 4px; min-height: 0; }
.ac-hours { position: relative; }
.ac-hours span { position: absolute; right: 8px; top: calc(var(--h) * var(--ac-hh) - 7px); font: 11px/14px var(--ac-text); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ac-soft); }
.ac-col { position: relative; height: calc(9 * var(--ac-hh));
  background: repeating-linear-gradient(to bottom, var(--ac-line) 0 1px, transparent 1px var(--ac-hh)); border-left: 1px solid var(--ac-line); }
.ac-col[hidden] { display: none; }
.ac-closed { position: absolute; left: 0; right: 0; top: calc((var(--s) - 8) * var(--ac-hh)); height: calc((var(--e) - var(--s)) * var(--ac-hh));
  background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--ac-ink) 5%, transparent) 0 6px, transparent 6px 12px); display: grid; place-items: center; }
.ac-closed span { font-size: 11px; color: var(--ac-soft); background: var(--ac-card); padding: 0 6px; border-radius: 4px; }
.ac-ev { position: absolute; left: 4px; right: 0; top: calc((var(--s) - 8) * var(--ac-hh) + 1px); height: calc((var(--e) - var(--s)) * var(--ac-hh) - 3px);
  border-radius: 7px; padding: 3px 9px 0 11px; background: var(--ac-surface); overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.ac-ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ac-line-strong); }
.ac-ev b { font-size: 12px; font-weight: 500; color: var(--ac-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.ac-ev--new { background: var(--ac-accent-soft); box-shadow: inset 0 0 0 1px var(--ac-accent-line); cursor: pointer; padding-top: 0; transform-origin: 0 50%;
  transition: opacity 420ms var(--ac-ease), transform 520ms var(--ac-ease), box-shadow 200ms; }
.ac-ev--new::before { background: var(--ac-accent); }
.ac-ev--new b { color: var(--ac-ink); font-weight: 600; }
.ac-ev--new small { display: flex; align-items: center; gap: 5px; font: 11px/1.15 var(--ac-text); color: var(--ac-accent); white-space: nowrap; overflow: hidden; }
.ac-ev--new small svg { width: 11px; height: 11px; flex: none; }
.ac-ev--new:hover, .ac-ev--new.is-focus { box-shadow: inset 0 0 0 1.5px var(--ac-accent), 0 6px 18px -8px color-mix(in oklab, var(--ac-accent) 60%, transparent); }
.ac-ev--new.is-pop { animation: ac-ring 1100ms var(--ac-ease) 1; }
@keyframes ac-ring { 0% { box-shadow: inset 0 0 0 1px var(--ac-accent-line), 0 0 0 0 color-mix(in oklab, var(--ac-glow) 70%, transparent); }
  100% { box-shadow: inset 0 0 0 1px var(--ac-accent-line), 0 0 0 10px color-mix(in oklab, var(--ac-glow) 0%, transparent); } }
.ac-toast { flex: none; margin: 8px 12px 12px; display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px;
  background: var(--ac-card); box-shadow: inset 0 0 0 1px var(--ac-line), 0 10px 28px -14px color-mix(in oklab, var(--ac-ink) 35%, transparent);
  transition: opacity 360ms var(--ac-ease), transform 460ms var(--ac-ease); }
.ac-toast__txt { display: grid; min-width: 0; font-size: 12px; line-height: 1.35; color: var(--ac-soft); }
.ac-toast__txt small { font-size: 11px; }
.ac-toast__txt b { font-size: 13px; font-weight: 600; color: var(--ac-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-toast__txt > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-how { color: var(--ac-accent); }
.ac-toast.is-swap .ac-toast__txt { animation: ac-swap 380ms var(--ac-ease); }
@keyframes ac-swap { from { opacity: 0; transform: translateY(4px); } }

/* ---------- 02 · CRM card ---------- */
.ac-banner { flex: none; display: flex; align-items: center; gap: 8px; margin: 12px 14px 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 500;
  color: var(--ac-ok); background: color-mix(in oklab, var(--ac-ok) 9%, var(--ac-card)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ac-ok) 22%, transparent);
  transition: opacity 380ms var(--ac-ease), transform 480ms var(--ac-ease); }
.ac-banner svg { width: 15px; height: 15px; }
.ac-person { flex: none; display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; transition: opacity 420ms var(--ac-ease), transform 520ms var(--ac-ease); }
.ac-avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ac-accent-soft); color: var(--ac-accent);
  font: 600 14px/1 var(--ac-display); box-shadow: inset 0 0 0 1px var(--ac-accent-line); }
.ac-avatar--xs { width: 18px; height: 18px; font-size: 10px; display: inline-grid; vertical-align: middle; margin-right: 6px; }
.ac-person__id { display: grid; min-width: 0; }
.ac-person__id b { font-size: 16px; font-weight: 600; }
.ac-person__id small { font-size: 12px; color: var(--ac-soft); }
.ac-status { margin-left: auto; flex: none; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; color: var(--ac-accent); background: var(--ac-accent-soft);
  box-shadow: inset 0 0 0 1px var(--ac-accent-line); transition: opacity 300ms var(--ac-ease), transform 420ms var(--ac-ease); }
.ac-fields { flex: 1; display: grid; align-content: start; margin: 0 14px; border-top: 1px solid var(--ac-line); }
.ac-fields > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; align-items: center; min-height: 41px; padding: 7px 2px; border-bottom: 1px solid var(--ac-line); font-size: 13px; }
.ac-fields > div:last-child { border-bottom: 0; }
.ac-fields dt { color: var(--ac-soft); }
.ac-fields dd { position: relative; color: var(--ac-ink); line-height: 1.35; }
.ac-fields dd::after { content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%; height: 10px; width: 70%; border-radius: 5px; background: var(--ac-surface);
  opacity: 0; transition: opacity 260ms; }
.ac-fields dd { transition: color 360ms var(--ac-ease); }
.ac-ok { color: var(--ac-ok); }
.ac-mono { font-family: var(--ac-mono); font-size: 12.5px; }

/* ---------- 03 · team message ---------- */
.ac-skins { position: relative; z-index: 2; display: inline-flex; padding: 3px; margin-bottom: 12px; border-radius: 999px; background: var(--ac-surface); box-shadow: inset 0 0 0 1px var(--ac-line); }
.ac-skin { display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer; background: none; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ac-soft); transition: background 160ms, color 160ms; }
.ac-skin .ac-ico { width: 16px; height: 16px; }
.ac-skin[aria-pressed="true"] { background: var(--ac-card); color: var(--ac-ink); box-shadow: 0 1px 3px color-mix(in oklab, var(--ac-ink) 18%, transparent); }
.ac-chat { --ac-vis-h: 400px; }
.ac-chan { display: grid; line-height: 1.25; min-width: 0; }
.ac-chan b { font-size: 14px; font-weight: 600; }
.ac-chan small { font-size: 11px; color: var(--ac-soft); }
.ac-feed { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 16px; min-height: 0; overflow: hidden; }
.ac-typing { display: none; align-items: center; gap: 10px; }
.ac-dots { display: inline-flex; gap: 4px; padding: 9px 12px; border-radius: 12px; background: var(--ac-surface); }
.ac-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-soft); animation: ac-dot 1s infinite; }
.ac-dots i:nth-child(2) { animation-delay: .15s; } .ac-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ac-dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.ac-msg { display: flex; gap: 10px; align-items: flex-start; transition: opacity 420ms var(--ac-ease), transform 520ms var(--ac-ease); }
.ac-msg__body { min-width: 0; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.45; }
.ac-msg__meta { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.ac-msg__meta b { font-weight: 600; }
.ac-app { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 5px; border-radius: 4px; background: var(--ac-surface); color: var(--ac-soft); }
.ac-msg__meta time { font-size: 11.5px; color: var(--ac-soft); }
.ac-at { color: var(--ac-accent); background: var(--ac-accent-soft); padding: 0 4px; border-radius: 4px; font-weight: 500; }
.ac-ctx { display: flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 3px solid var(--ac-line-strong); color: var(--ac-soft); font-size: 12.5px; }
.ac-thread { margin-top: 2px; font-size: 12.5px; color: var(--ac-soft); transition: opacity 400ms var(--ac-ease), transform 500ms var(--ac-ease); }
.ac-thread b { color: var(--ac-accent); font-weight: 500; margin-right: 6px; }
.ac-compose { flex: none; margin: 0 14px 14px; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--ac-line-strong); font-size: 13px; color: var(--ac-soft); }
/* Teams skin: same content, Teams-like chrome */
.ac-chat.is-teams .ac-bar { box-shadow: inset 0 3px 0 var(--ac-teams); }
.ac-chat.is-teams .ac-msg__body { background: var(--ac-surface); padding: 10px 12px; border-radius: 4px 12px 12px 12px; }
.ac-chat.is-teams .ac-mark { border-radius: 50%; }
.ac-chat.is-teams .ac-at { color: var(--ac-teams); background: color-mix(in oklab, var(--ac-teams) 10%, var(--ac-card)); }
.ac-chat.is-teams .ac-feed { gap: 12px; }

/* ---------- 04 · open slot ---------- */
.ac-open { margin-top: clamp(3.5rem, 7vw, 6rem); display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 20px; border: 1.5px dashed color-mix(in oklab, var(--ac-accent) 40%, transparent);
  background: color-mix(in oklab, var(--ac-accent) 3%, var(--ac-bg)); }
.ac-plus { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; border: 1.5px dashed var(--ac-accent); color: var(--ac-accent);
  font: 400 30px/1 var(--ac-display); }
.ac-h--sm { font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem); }
.ac-open .ac-p { max-width: 36rem; font-size: var(--ac-t-sm); }
.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ac-chips li { padding: 7px 13px; border-radius: 999px; font-size: var(--ac-t-xs); background: var(--ac-card); box-shadow: inset 0 0 0 1px var(--ac-line); }
.ac-chips .ac-chips__open { color: var(--ac-accent); background: none; box-shadow: none; border: 1.5px dashed var(--ac-accent); padding: 6px 12px; font-weight: 500; }

/* ---------- motion: hidden "before" states, only when JS runs and motion is allowed ---------- */
.ac--anim .ac-ev--new:not(.is-in) { opacity: 0; transform: translateX(-8px) scale(0.97); }
.ac--anim .ac-toast:not(.is-in) { opacity: 0; transform: translateY(8px); }
.ac--anim .ac-banner:not(.is-in) { opacity: 0; transform: translateY(-10px); }
.ac--anim .ac-person:not(.is-in) { opacity: 0; transform: translateY(8px); }
.ac--anim .ac-status:not(.is-in) { opacity: 0; transform: scale(0.85); }
.ac--anim .ac-fields > div:not(.is-in) dd { color: transparent; }
.ac--anim .ac-fields > div:not(.is-in) dd::after { opacity: 1; }
.ac--anim .ac-fields > div:not(.is-in) dd svg { opacity: 0; }
.ac--anim .ac-fields > div.is-in { animation: ac-flash 900ms var(--ac-ease); }
@keyframes ac-flash { 0% { background: color-mix(in oklab, var(--ac-glow) 18%, transparent); } 100% { background: transparent; } }
.ac--anim .ac-msg:not(.is-in) { display: none; }
.ac--anim .ac-msg.is-in { animation: ac-slide 520ms var(--ac-ease); }
@keyframes ac-slide { from { opacity: 0; transform: translateY(12px); } }
.ac--anim .ac-typing.is-in:not(.is-out) { display: flex; animation: ac-slide 300ms var(--ac-ease); }
.ac--anim .ac-thread:not(.is-in) { opacity: 0; transform: translateY(4px); }

@media (prefers-reduced-motion: reduce) {
  .ac *, .ac *::before, .ac *::after { animation: none !important; transition: none !important; }
}

/* ---------- tablet / mobile: text then visual ---------- */
@media (max-width: 960px) {
  .ac-row, .ac-row--flip { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .ac-row--flip .ac-copy { order: 0; justify-self: start; }
  .ac-copy { max-width: 36rem; }
  .ac-vis, .ac-row:not(.ac-row--flip) .ac-vis { justify-self: start; max-width: 34rem; }
  .ac-open { grid-template-columns: auto minmax(0, 1fr); }
  .ac-chips { grid-column: 1 / -1; justify-content: flex-start; }
  .ac-tools--dup { display: none; }
}
@media (max-width: 560px) {
  .ac { --ac-hh: 30px; --ac-vis-h: 412px; }
  .ac-chat { --ac-vis-h: 392px; }
  .ac-row { margin-top: 3.5rem; }
  .ac-bar { padding: 10px 12px; }
  .ac-days { padding: 6px 12px; }
  .ac-fields > div { grid-template-columns: 7.2rem minmax(0, 1fr); gap: 10px; font-size: 12.5px; }
  .ac-person { padding: 14px 14px 10px; }
  .ac-feed { padding: 14px 12px; gap: 14px; }
  .ac-msg__body { font-size: 13px; }
  .ac-open { grid-template-columns: minmax(0, 1fr); }
  .ac-plus { width: 44px; height: 44px; font-size: 26px; border-radius: 12px; }
  .ac-skin, .ac-day { min-height: 40px; }
  .ac-crm { height: auto; }
  .ac-toast__txt > span { white-space: normal; }
  /* 02 · agenda fits one phone screen: shorter hours, tighter text */
  .ac-cal { --ac-hh: 23px; }
  .ac-cal .ac-ev--new small { display: none; }   /* the card under the agenda gives these details */
  .ac-row:has(.ac-cal) { gap: 1.1rem; }
  .ac-row:has(.ac-cal) .ac-p { margin-top: 10px; }
  .ac-row:has(.ac-cal) .ac-tools { margin-top: 14px; }
  .ac .ac-note, .ac .ac-hint { font-size: 0.82rem; }
  .ac-replay { min-height: 40px; }
}

  /* KPI figures and the first row's visual */
  .ac-kpi { margin: 4px 0 8px; font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1.9rem, 1.3rem + 1.7vw, 2.9rem); line-height: 1.08; letter-spacing: -0.035em; max-width: 15ch; text-wrap: balance; color: var(--sc-ink); }
  .ac-kpi b { font-weight: 500; color: var(--sc-accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ac-row .ac-p { font-size: var(--sc-t-lg, 1.15rem); color: var(--sc-ink-soft); max-width: 34ch; }
  .kv-ph--wa { background: #e8f9ee; }
  .ac-note { margin: 28px 0 0; font-size: var(--sc-t-xs); color: var(--sc-ink-soft); }
  .ac-try { margin-top: 6px; display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font: 600 var(--sc-t-sm) var(--sc-font-text); color: var(--sc-accent); cursor: pointer; text-align: left; }
  .ac-try:hover { text-decoration: underline; text-underline-offset: 3px; }
  .ac-try__arrow { width: 92px; height: 46px; flex: none; }
  .kv { display: grid; place-items: center; }
  .kv-card { width: min(420px, 100%); border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 30px 70px -40px rgba(10,16,32,.35); padding: 18px; display: grid; gap: 12px; }
  .kv-head { display: flex; align-items: center; gap: 8px; font-size: var(--sc-t-sm); font-weight: 600; }
  .kv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc-accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--sc-accent) 18%, transparent); }
  .kv-closed { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--sc-ink-soft); padding: 3px 8px; border-radius: 999px; background: var(--sc-surface); }
  .kv-calls { display: grid; gap: 8px; }
  .kv-call { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transform: translateY(8px); }
  .kv.in .kv-call { animation: kvIn .5s var(--sc-ease-out) forwards; animation-delay: var(--d); }
  .kv-ph { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--sc-accent); }
  .kv-ph .ac-ico { width: 16px; height: 16px; }
  .kv-call b { display: block; font-size: var(--sc-t-sm); } .kv-call small { display: block; font-size: 11px; color: var(--sc-ink-soft); }
  .kv-call em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--sc-accent); }
  .kv-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--sc-t-xs); color: var(--sc-ink-soft); padding-top: 4px; border-top: 1px solid var(--line); }
  .kv-foot b { font-size: var(--sc-t-sm); color: var(--sc-ink); }
  @keyframes kvIn { to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { .kv-call { opacity: 1; transform: none; } .kv.in .kv-call { animation: none; } }

  .ac-ctx .ac-inl { margin-right: 0; vertical-align: 0; }
  .ac-tools--wide { flex-wrap: wrap; max-width: 30rem; }



  .ac-fields dd { display: flex; align-items: center; gap: 6px; }
  .ac-fields dd .ac-inl { margin-right: 0; vertical-align: 0; }

/* phones: shorter headings, no step label, one line of icon-only logos */
.k-short { display: none; }
@media (max-width: 860px) {
  #change .ac-step { display: none; }
  #change .k-long { display: none; }
  #change .k-short { display: inline; }
  #change .ac-kpi { font-size: clamp(1.6rem, 7vw, 2rem); margin: 0; }
  #change .k-short { white-space: nowrap; }
  #change .ac-row .ac-p { font-size: 1rem; line-height: 1.5; margin: 0; }
  #change .ac-copy { gap: 10px; }
  #change .ac-head { margin-bottom: 36px; }
  #change .ac-tools { flex-wrap: nowrap; overflow: hidden; gap: 6px; margin-top: 12px; }
  #change .ac-tools li { font-size: 0; gap: 0; padding: 0; width: 36px; height: 36px; justify-content: center; border-radius: 50%; flex: none; }
  #change .ac-tools li .ac-ico { width: 18px; height: 18px; margin: 0; }
  #change .ac-tools .ac-tools__plain { display: none; }
  #change .ac-tools--wide li:nth-child(n+7) { display: none; }
  #change .ac-tools--wide::after { content: "+5"; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 12px; font-weight: 600; color: var(--sc-ink-soft, #4b5670); box-shadow: inset 0 0 0 1px var(--line, #e3e7ef); flex: none; }
  #change .ac-row { gap: 20px; margin: 0; padding: 0; }
  #change .ac-row + .ac-row { margin-top: 48px; }
  #change .ac-tools:has(li:only-child) { display: none; }
}


/* phones (<= 480 px): each step is its own card with a numbered badge, so a reader can follow 1 to 5.
   Smaller type, shorter visuals, tighter spacing. Desktop and tablets are untouched. */
@media (max-width: 480px) {
  #change.ac { padding-block: var(--sc-7); }
  #change .ac-wrap { counter-reset: acstep; }
  #change .ac-head { margin-bottom: 22px; }
  #change .ac-row {
    counter-increment: acstep; position: relative;
    display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px;
    align-items: start; padding: 14px 14px 12px;
    background: var(--ac-card); border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--ac-line);
  }
  #change .ac-row + .ac-row { margin-top: 14px; }
  /* badge in the left column, title and text in the right one, visual full width below, counter bottom right */
  #change .ac-row::before {
    content: counter(acstep); grid-column: 1; grid-row: 1; margin-top: 1px;
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--ac-accent); color: var(--sc-accent-ink, #fff);
    font: 600 14px/1 var(--ac-display); font-variant-numeric: tabular-nums;
  }
  #change .ac-row::after {
    content: counter(acstep) " / 5"; grid-column: 1 / -1; grid-row: 3; justify-self: end;
    font: 500 12px/1 var(--ac-mono); letter-spacing: 0.04em; color: var(--ac-soft);
  }
  #change .ac-row > .ac-copy { grid-column: 2; grid-row: 1; min-width: 0; }
  #change .ac-row > .ac-vis { grid-column: 1 / -1; grid-row: 2; }
  #change .ac-copy { gap: 6px; max-width: none; }
  #change .ac-kpi { font-size: clamp(1.4rem, 6.4vw, 1.65rem); line-height: 1.1; max-width: none; }
  #change .ac-row .ac-p { font-size: 0.9375rem; line-height: 1.45; max-width: none; }
  #change .ac-tools { margin-top: 6px; gap: 5px; }
  #change .ac-tools li, #change .ac-tools--wide::after { width: 32px; height: 32px; }
  #change .ac-tools li .ac-ico { width: 16px; height: 16px; }
  #change .ac-try { font-size: 0.875rem; margin-top: 2px; }
  #change .ac-try__arrow { width: 56px; height: 28px; }
  #change .ac-note { margin-top: 20px; font-size: 0.8125rem; }

  /* the mock UIs sit flat inside the card: a hairline, no second shadow, no glow */
  #change .ac-vis { max-width: none; width: 100%; }
  #change .ac-vis::before { display: none; }
  #change .ac-frame, #change .hub-frame { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--ac-line); }
  #change .ac-bar { min-height: 40px; padding: 8px 12px; }
  #change .ac-hint { margin-top: 8px; }
  #change .ac-chat { --ac-vis-h: 280px; }
  #change .ac-feed { padding: 12px; gap: 10px; }
  #change .hub { --hub-h: 330px; --hub-card-h: 84px; }

  /* 01 · the dentist's Sunday night */
  #change .kv-card { padding: 12px; gap: 8px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--ac-line); }
  #change .kv-calls { gap: 6px; }
  #change .kv-call { padding: 8px 10px; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; }
  #change .kv-ph { width: 30px; height: 30px; }
  #change .kv-head { font-size: 0.875rem; align-items: flex-start; }
  #change .kv-dot { flex: none; margin-top: 6px; }
  #change .kv-closed { flex: none; }
  #change .kv-call b { font-size: 0.875rem; }
  #change .kv-call small, #change .kv-call em, #change .kv-closed { font-size: 12px; }
  #change .kv-foot { font-size: 0.8125rem; }
  #change .kv-foot b { font-size: 0.875rem; }

  /* nothing below 12 px */
  #change .ac-eyebrow, #change small, #change .ac-closed span, #change .ac-hours span, #change .ac-msg__meta time, #change .ac-app,
  #change .ac-avatar--xs, #change .hub-name, #change .hub-core__name { font-size: 12px; }
  #change .ac-avatar--xs { width: 20px; height: 20px; }

  /* 02 · agenda */
  #change .ac-cal { --ac-hh: 21px; }
  #change .ac-toast { margin: 6px 10px 10px; padding: 8px 10px; gap: 10px; }
  #change .ac-days { padding: 4px 10px; }
  #change .ac-day { min-height: 34px; padding: 4px 0; }

  /* 03 · CRM card */
  #change .ac-person { padding: 10px 12px 8px; }
  #change .ac-fields { margin: 0 12px; }
  #change .ac-fields > div { min-height: 32px; padding: 4px 2px; }
}
