/* ARI — Ariel's portfolio assistant.
   Light Liquid Glass: the chat lives on the same bright glass canvas as the
   site — white frosted surfaces, hairline borders, soft blue-tinted depth,
   and ONE accent (the system blue) spent only where it works. The AS brand
   mark sits on a glass disc in both the launcher and the header, where the
   dark metallic mark is the contrast against the light plate.
   Anchored to the PHYSICAL bottom-left corner on every direction — the
   widget is a fixed overlay, so logical (RTL-flipping) insets do not apply. */
:root {
  --ari-accent: #335cff;
  --ari-accent-fill: #4258e6;
  --ari-ink: #11131a;
  --ari-soft: rgba(17, 19, 26, .78);
  --ari-muted: rgba(17, 19, 26, .64);
  --ari-line: rgba(15, 23, 42, .10);
  --ari-glass: linear-gradient(180deg, rgba(255, 255, 255, .93), rgba(246, 248, 253, .88));
  --ari-ease: cubic-bezier(.22, 1, .36, 1);
  --ari-ease-story: cubic-bezier(.16, 1, .3, 1);
}

/* ───────────────────────────── launcher — the orb */
.ari-launcher {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1900;
  width: 64px;
  height: 64px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  /* A glass disc, not a black orb: it floats on the light canvas the way an
     Apple control does — hairline, inner highlight, one deep soft shadow —
     and a thin blue rim keeps it findable without a second colour. */
  background: linear-gradient(180deg, #ffffff, #e9eef9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .95),
    0 0 0 1px rgba(51, 92, 255, .22),
    0 22px 44px -16px rgba(30, 48, 100, .5),
    0 6px 16px -10px rgba(30, 48, 100, .4);
  cursor: pointer;
  isolation: isolate;
  transition: transform .28s var(--ari-ease), box-shadow .28s ease;
}
.ari-launcher::before {
  /* Inner plate: the rim is the ring of gradient left showing around it. */
  content: "";
  position: absolute;
  inset: 2.5px;
  z-index: 0;
  border-radius: 50%;
  background:
    radial-gradient(78% 62% at 50% 12%, rgba(255, 255, 255, .98), rgba(255, 255, 255, 0) 62%),
    radial-gradient(66% 70% at 26% 86%, rgba(51, 92, 255, .16), transparent 66%),
    radial-gradient(58% 64% at 84% 78%, rgba(11, 185, 207, .14), transparent 66%),
    linear-gradient(180deg, #ffffff, #eef2fb);
  box-shadow: inset 0 1px 0 #fff;
}
.ari-launcher .ari-digits {
  position: absolute;
  inset: 3px;
  z-index: 0;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  pointer-events: none;
}
.ari-launcher-face {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: opacity .22s ease, transform .3s var(--ari-ease);
}
.ari-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .95),
    0 0 0 1.5px rgba(51, 92, 255, .38),
    0 28px 54px -18px rgba(30, 48, 100, .55);
}
.ari-launcher:active { transform: scale(.94); }
.ari-launcher-bub {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ari-accent-fill);
  border: 2px solid #fff;
  box-shadow: 0 6px 16px -6px rgba(30, 48, 100, .55);
  transition: opacity .2s ease, transform .25s var(--ari-ease);
}
/* One-shot attention nudge — a single gentle lift, never a loop. */
@keyframes ari-nudge {
  0% { transform: none; }
  30% { transform: translateY(-7px) scale(1.04); }
  60% { transform: translateY(0) scale(1); }
  80% { transform: translateY(-3px); }
  100% { transform: none; }
}
.ari-launcher.is-nudge { animation: ari-nudge 1.1s var(--ari-ease-story) 1; }

/* Open state: the face steps back and a ✕ is drawn over the plate. */
.ari-launcher-x { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ari-launcher-x::before,
.ari-launcher-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2.2px;
  border-radius: 2px;
  background: var(--ari-ink);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(.6);
  transition: opacity .2s ease, transform .28s var(--ari-ease);
}
.ari.is-open .ari-launcher-face { opacity: .14; transform: scale(.82); }
.ari.is-open .ari-launcher-bub { opacity: 0; }
.ari.is-open .ari-launcher {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .95),
    0 0 0 1px rgba(51, 92, 255, .22),
    0 18px 36px -16px rgba(30, 48, 100, .45);
}
.ari.is-open .ari-launcher-x::before { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.ari.is-open .ari-launcher-x::after { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(1); }

/* The mobile drawer (z 2000, shown up to 1020px) must never fight the chat
   (z 3000): while the drawer covers the page, the whole widget steps aside —
   same pattern as the drawer-open paint fixes in styles.css. */
body.drawer-open .ari { display: none !important; }

/* ───────────────────────────── scrim (phones) */
.ari-scrim {
  position: fixed;
  inset: 0;
  z-index: 2900;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

/* ───────────────────────────── shell */
.ari-shell[hidden] { display: none !important; }

.ari-shell {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 78px);
  z-index: 3000;
  width: min(438px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 128px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 30px;
  color: var(--ari-ink);
  background:
    radial-gradient(90% 40% at 50% 0%, rgba(51, 92, 255, .05), transparent 70%),
    var(--ari-glass);
  box-shadow:
    inset 0 1px 0 #fff,
    0 48px 110px -38px rgba(30, 48, 100, .5),
    0 18px 44px -30px rgba(30, 48, 100, .38);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  transform-origin: bottom left;
  animation: ari-open .38s var(--ari-ease-story) both;
  font-family: var(--font-sans, Arial, sans-serif);
  isolation: isolate;
}
.ari-shell::before {
  content: "";
  position: absolute;
  inset: 0 22px auto;
  z-index: 4;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--ari-accent), transparent);
  opacity: .55;
  pointer-events: none;
}
.ari-shell[data-busy="true"]::before {
  width: 42%;
  inset-inline: auto;
  opacity: 1;
  animation: ari-working-line 1.45s ease-in-out infinite;
}
@keyframes ari-open {
  from { opacity: 0; transform: translate3d(-8px, 18px, 0) scale(.965); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes ari-working-line {
  0% { inset-inline-start: -24%; opacity: .34; }
  50% { opacity: 1; }
  100% { inset-inline-start: 104%; opacity: .34; }
}

/* Screen-reader mirror: the streaming bubble is aria-hidden, and the final
   answer is announced once here. */
.ari-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ───────────────────────────── header */
.ari-head {
  min-height: 84px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--ari-line);
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .8);
  touch-action: pan-y;
}
.ari-head-id {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  /* A circle, not a squircle: the activity ring below rotates, and only a
     circle stays visually identical through every frame of that rotation. */
  border-radius: 50%;
  background:
    radial-gradient(78% 62% at 50% 12%, rgba(255, 255, 255, .98), rgba(255, 255, 255, 0) 62%),
    radial-gradient(66% 70% at 26% 86%, rgba(51, 92, 255, .16), transparent 66%),
    radial-gradient(58% 64% at 84% 78%, rgba(11, 185, 207, .14), transparent 66%),
    linear-gradient(180deg, #ffffff, #eef2fb);
  border: 1px solid rgba(15, 23, 42, .1);
  box-shadow:
    inset 0 1px 0 #fff,
    0 12px 26px -16px rgba(30, 48, 100, .45);
}
.ari-head-id .ari-digits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}
.ari-head-id img {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
/* State ring: a circular activity ring orbiting the AS disc. It spins while
   ARI reads/thinks and breathes while the answer streams in — driven only by
   the real runtime state on the shell, never decorative-always-on. */
.ari-head-id::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 0deg,
    rgba(51, 92, 255, 0) 8%,
    rgba(51, 92, 255, .95) 34%,
    rgba(11, 185, 207, .9) 52%,
    rgba(51, 92, 255, 0) 78%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.ari-shell[data-state="thinking"] .ari-head-id::after {
  opacity: 1;
  animation: ari-ring-spin 1.15s linear infinite;
}
.ari-shell[data-state="streaming"] .ari-head-id::after {
  opacity: 1;
  background: conic-gradient(from 0deg,
    rgba(51, 92, 255, .55),
    rgba(11, 185, 207, .5),
    rgba(51, 92, 255, .55));
  animation: ari-ring-breathe 1.6s ease-in-out infinite alternate;
}
@keyframes ari-ring-spin { to { transform: rotate(360deg); } }
@keyframes ari-ring-breathe {
  from { transform: scale(.985); opacity: .55; }
  to { transform: scale(1.035); opacity: 1; }
}
.ari-title { min-width: 0; }
.ari-title strong {
  display: block;
  overflow: hidden;
  color: var(--ari-ink);
  font-family: var(--font-display, Arial, sans-serif);
  font-size: 17px;
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ari-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin-top: 6px;
  color: var(--ari-soft);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
}
.ari-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8892ad;
  box-shadow: 0 0 0 4px rgba(136, 146, 173, .14);
}
.ari-status[data-state="ready"] .ari-status-dot { background: #0d9f6e; box-shadow: 0 0 0 4px rgba(13, 159, 110, .14); }
.ari-status[data-state="thinking"] .ari-status-dot,
.ari-status[data-state="streaming"] .ari-status-dot {
  background: var(--ari-accent);
  box-shadow: 0 0 0 4px rgba(51, 92, 255, .15);
  animation: ari-status-pulse 1.2s ease-in-out infinite alternate;
}
.ari-status[data-state="fallback"] .ari-status-dot { background: #c2410c; box-shadow: 0 0 0 4px rgba(194, 65, 12, .13); }
.ari-status[data-state="stopped"] .ari-status-dot { background: #8892ad; }
@keyframes ari-status-pulse {
  from { box-shadow: 0 0 0 3px rgba(51, 92, 255, .12); }
  to { box-shadow: 0 0 0 6px rgba(51, 92, 255, .2); }
}
.ari-head-actions {
  display: flex;
  direction: ltr;
  gap: 6px;
}
.ari-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  color: var(--ari-soft);
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s var(--ari-ease);
}
.ari-close:hover { color: var(--ari-ink); background: #fff; transform: translateY(-1px); }

/* ───────────────────────────── log */
.ari-main {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, .22) transparent;
  padding: 19px 15px 17px;
}
.ari-main::-webkit-scrollbar { width: 6px; }
.ari-main::-webkit-scrollbar-thumb { border-radius: 9px; background: rgba(15, 23, 42, .22); }

.ari-messages {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.ari-message {
  max-width: 92%;
  display: grid;
  gap: 6px;
  padding: 12px 14px 13px;
  border-radius: 20px;
  overflow-wrap: anywhere;
  animation: ari-message-in .38s var(--ari-ease-story) both;
}
@keyframes ari-message-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.985); }
  to { opacity: 1; transform: none; }
}
.ari-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-code, monospace);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ari-message-content {
  color: inherit;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.68;
  unicode-bidi: plaintext;
}
.ari-message-content p { margin: 0; }
.ari-message-content p + p,
.ari-message-content ul + p,
.ari-message-content p + ul { margin-top: 8px; }
.ari-message-content ul {
  margin: 0;
  padding-inline-start: 18px;
  display: grid;
  gap: 4px;
}
.ari-message[data-role="model"] {
  align-self: flex-start;
  border-start-start-radius: 7px;
  color: var(--ari-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 254, .88));
  border: 1px solid rgba(15, 23, 42, .09);
  box-shadow:
    inset 0 1px 0 #fff,
    0 13px 28px -22px rgba(30, 48, 100, .45);
}
.ari-message[data-role="model"] .ari-message-meta { color: var(--ari-muted); }
.ari-message[data-role="user"] {
  align-self: flex-end;
  max-width: 84%;
  border-start-end-radius: 7px;
  color: #fff;
  background: var(--ari-accent-fill);
  box-shadow: 0 16px 30px -19px rgba(66, 88, 230, .55);
}
.ari-message[data-role="user"] .ari-message-meta { color: rgba(255, 255, 255, .92); }
.ari-message[data-role="user"].is-voice .ari-message-content { font-style: italic; opacity: .92; }
.ari-message.is-fallback {
  border-color: rgba(194, 65, 12, .24);
  background: linear-gradient(145deg, rgba(255, 243, 230, .92), rgba(255, 237, 216, .8));
}
.ari-message.is-stopped { opacity: .78; }

/* typewriter caret */
.ari-caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-inline-start: 3px;
  vertical-align: -2px;
  border-radius: 2px;
  background: var(--ari-accent);
  animation: ari-caret 1s steps(2) infinite;
}
@keyframes ari-caret { 50% { opacity: 0; } }

.ari-thinking {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ari-soft);
  font-size: 12.5px;
}
/* The label reads as live work, not a frozen string: a slow light sweep
   crosses the words while ARI is still composing. */
.ari-thinking-copy {
  background: linear-gradient(100deg,
    var(--ari-soft) 20%,
    var(--ari-accent) 42%,
    var(--ari-soft) 64%) 0 0 / 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ari-think-sweep 2.4s linear infinite;
}
@keyframes ari-think-sweep {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}
.ari-thinking-dots {
  display: inline-flex;
  direction: ltr;
  gap: 4px;
}
.ari-thinking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ari-accent);
  animation: ari-thinking-dot .92s ease-in-out infinite alternate;
}
.ari-thinking-dots i:nth-child(2) { animation-delay: .14s; }
.ari-thinking-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes ari-thinking-dot {
  from { opacity: .32; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(-2px); }
}

/* destination button the model can only NAME, never link */
.ari-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--ari-accent-fill);
  box-shadow: 0 12px 24px -12px rgba(66, 88, 230, .55);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .22s var(--ari-ease), box-shadow .22s ease;
}
.ari-go:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(66, 88, 230, .65); }

/* errors */
.ari-err {
  align-self: stretch;
  display: grid;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(194, 65, 12, .28);
  background: linear-gradient(145deg, rgba(255, 243, 230, .95), rgba(255, 237, 216, .85));
  color: #7c3a06;
  font-size: 12.5px;
  line-height: 1.55;
}
.ari-err-act {
  justify-self: start;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(194, 65, 12, .4);
  border-radius: 999px;
  color: #7c3a06;
  background: rgba(255, 255, 255, .7);
  font: 600 12px/1.2 var(--font-sans, Arial, sans-serif);
  cursor: pointer;
}
.ari-err-act:hover { color: #5c2b04; border-color: rgba(194, 65, 12, .6); }

.ari-fallback-note {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid rgba(194, 65, 12, .2);
  color: #8a4a10;
  font-size: 11.5px;
  line-height: 1.5;
}
.ari-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.ari-message-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, .13);
  border-radius: 999px;
  color: var(--ari-soft);
  background: rgba(255, 255, 255, .78);
  font: 600 11.5px/1.2 var(--font-sans, Arial, sans-serif);
  cursor: pointer;
  text-decoration: none;
}
.ari-message-action:hover { color: var(--ari-ink); border-color: rgba(51, 92, 255, .35); }

/* ───────────────────────────── lead card */
.ari-message--lead {
  max-width: 100%;
  align-self: stretch;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.ari-lead {
  display: grid;
  gap: 9px;
  padding: 15px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, .1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(246, 249, 254, .9));
  box-shadow: inset 0 1px 0 #fff, 0 18px 36px -26px rgba(30, 48, 100, .5);
}
.ari-lead-head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ari-ink);
  font-size: 14px;
}
.ari-lead-ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--ari-accent-fill);
  box-shadow: 0 8px 16px -10px rgba(66, 88, 230, .6);
}
.ari-lead-field {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ari-soft);
}
.ari-lead-input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 12px;
  background: #fff;
  color: var(--ari-ink);
  font: 400 15px/1.4 var(--font-sans, Arial, sans-serif);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ari-lead-input:focus {
  border-color: rgba(51, 92, 255, .55);
  box-shadow: 0 0 0 4px rgba(51, 92, 255, .14);
}
.ari-lead-input[aria-invalid="true"] { border-color: #d3402e; }
.ari-lead-row {
  display: grid;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ari-soft);
}
.ari-lead-row p {
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .045);
  color: var(--ari-ink);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ari-lead-err {
  min-height: 0;
  margin: 0;
  color: #b2331f;
  font-size: 12px;
  line-height: 1.4;
}
.ari-lead-err:empty { display: none; }
.ari-lead-send {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--ari-accent-fill);
  box-shadow: 0 14px 26px -15px rgba(66, 88, 230, .6);
  font: 700 14px/1.2 var(--font-sans, Arial, sans-serif);
  cursor: pointer;
  transition: transform .22s var(--ari-ease), box-shadow .22s ease, opacity .22s ease;
}
.ari-lead-send:hover { transform: translateY(-2px); }
.ari-lead-send:disabled { opacity: .55; cursor: default; transform: none; }
.ari-lead-micro {
  margin: 0;
  color: var(--ari-muted);
  font-size: 11px;
  line-height: 1.45;
}
.ari-lead.is-sent {
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 22px 16px;
  outline: none;
}
.ari-lead-check {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #1eab74, #128a5c);
  box-shadow: 0 14px 26px -16px rgba(18, 138, 92, .6);
}
.ari-lead.is-sent strong { font-size: 15px; color: var(--ari-ink); }
.ari-lead.is-sent p { margin: 0; color: var(--ari-soft); font-size: 13px; line-height: 1.55; }

/* ───────────────────────────── suggestions */
.ari-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 15px;
}
.ari-suggestions[hidden] { display: none !important; }
.ari-suggestion {
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid rgba(15, 23, 42, .11);
  border-radius: 15px;
  color: var(--ari-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(248, 250, 254, .72));
  box-shadow: inset 0 1px 0 #fff;
  font: 600 12px/1.35 var(--font-sans, Arial, sans-serif);
  text-align: start;
  cursor: pointer;
  transition: transform .22s var(--ari-ease), color .22s ease, border-color .22s ease, background .22s ease;
}
.ari-suggestion:hover {
  color: var(--ari-ink);
  border-color: rgba(51, 92, 255, .35);
  background: #fff;
  transform: translateY(-2px);
}

/* jump-to-latest pill: reading upward never gets hijacked */
.ari-jump {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 108px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, .13);
  border-radius: 50%;
  color: var(--ari-soft);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 28px -16px rgba(30, 48, 100, .5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity .22s ease, transform .22s var(--ari-ease), visibility .22s;
}
.ari-jump.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.ari-jump:hover { color: var(--ari-ink); }

/* ───────────────────────────── composer */
.ari-compose {
  padding: 11px 11px 10px;
  border-top: 1px solid var(--ari-line);
  background: rgba(255, 255, 255, .6);
  box-shadow: 0 -18px 40px -34px rgba(30, 48, 100, .35);
}
.ari-form {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  align-items: end;
  gap: 8px;
}
.ari-shell.is-rec .ari-form { grid-template-columns: 44px minmax(0, 1fr) 44px 48px; }
.ari-shell.is-tx .ari-form { grid-template-columns: 44px minmax(0, 1fr) 48px; }
.ari-shell.is-rec .ari-input-wrap,
.ari-shell.is-tx .ari-input-wrap { display: none; }
.ari-rec { display: none; }
.ari-shell.is-rec .ari-rec,
.ari-shell.is-tx .ari-rec {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 8px 13px;
  border: 1px solid rgba(211, 64, 46, .35);
  border-radius: 18px;
  background: rgba(255, 236, 232, .8);
}
.ari-reclabel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b2331f;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ari-reclabel i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d3402e;
  animation: ari-rec-dot 1.1s ease-in-out infinite alternate;
}
@keyframes ari-rec-dot { from { opacity: .35; } to { opacity: 1; } }
.ari-shell.is-tx .ari-reclabel i { animation: none; opacity: .5; }
.ari-wave {
  width: 100%;
  height: 22px;
  min-width: 0;
}
.ari-time {
  color: #a03a2a;
  font-family: var(--font-code, monospace);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.ari-cbtn {
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, .13);
  border-radius: 15px;
  color: var(--ari-soft);
  background: rgba(255, 255, 255, .82);
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s var(--ari-ease);
}
.ari-cbtn:hover { color: var(--ari-ink); border-color: rgba(51, 92, 255, .35); transform: translateY(-1px); }
.ari-cbtn:disabled { opacity: .45; cursor: default; transform: none; }
.ari-mic.is-live {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(145deg, #e0483a, #b3341f);
  box-shadow: 0 12px 22px -12px rgba(179, 52, 31, .6);
}
.ari-input-wrap {
  position: relative;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 1px 0 #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.ari-input-wrap:focus-within {
  border-color: rgba(51, 92, 255, .55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(51, 92, 255, .13), inset 0 1px 0 #fff;
}
.ari-input {
  width: 100%;
  min-height: 50px;
  max-height: 124px;
  display: block;
  resize: none;
  overflow-y: auto;
  padding: 13px 14px 12px;
  border: 0;
  border-radius: inherit;
  outline: none;
  color: var(--ari-ink);
  background: transparent;
  font: 400 16px/1.5 var(--font-sans, Arial, sans-serif);
}
.ari-input::placeholder { color: rgba(17, 19, 26, .68); }
.ari-send {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--ari-accent-fill);
  box-shadow: 0 14px 26px -15px rgba(66, 88, 230, .6);
  cursor: pointer;
  transition: transform .22s var(--ari-ease), box-shadow .22s ease, opacity .22s ease, background .25s ease;
}
.ari-send:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -15px rgba(66, 88, 230, .7); }
.ari-send:active { transform: scale(.965); }
.ari-send:disabled { opacity: .5; cursor: default; transform: none; }
.ari-send[data-mode="stop"] {
  background: linear-gradient(180deg, #26272d, #16171b);
  box-shadow: 0 14px 26px -15px rgba(17, 19, 26, .5);
}
.ari-compose-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  padding-inline: 3px;
  color: var(--ari-muted);
  font-size: 10px;
  line-height: 1.35;
}

/* ───────────────────────────── phones */
@media (max-width: 560px) {
  .ari-launcher {
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: 60px;
    height: 60px;
  }
  .ari-launcher-face { width: 30px; height: 30px; }
  .ari.is-open .ari-scrim { opacity: 1; pointer-events: auto; }
  .ari-shell {
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    width: auto;
    height: calc(100dvh - max(12px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    border-radius: 26px;
  }
  .ari-head {
    min-height: 76px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px;
  }
  .ari-head::before {
    /* sheet drag handle */
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .2);
    transform: translateX(-50%);
  }
  .ari-head-id { width: 48px; height: 48px; }
  .ari-head-id img { width: 25px; height: 25px; }
  .ari-title strong { font-size: 15.5px; }
  .ari-status { margin-top: 4px; font-size: 10.5px; }
  .ari-close { width: 38px; height: 38px; border-radius: 13px; }
  .ari-main { padding: 15px 11px 14px; }
  .ari-message { max-width: 94%; }
  .ari-message[data-role="user"] { max-width: 88%; }
  .ari-suggestions { grid-template-columns: 1fr; }
  .ari-suggestion { min-height: 42px; }
  .ari-jump { bottom: 118px; }
  .ari-compose { padding: 9px 9px max(9px, env(safe-area-inset-bottom)); }
  .ari-compose-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 370px) {
  .ari-title strong { font-size: 14.5px; }
  .ari-head-actions { gap: 3px; }
  .ari-close { width: 35px; height: 35px; }
  .ari-form { grid-template-columns: 40px minmax(0, 1fr) 44px; }
  .ari-cbtn { width: 40px; }
}

@media (hover: none) {
  .ari-launcher:hover,
  .ari-suggestion:hover,
  .ari-send:hover,
  .ari-go:hover,
  .ari-lead-send:hover,
  .ari-cbtn:hover,
  .ari-close:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ari-shell,
  .ari-message { animation: none; }
  .ari-shell[data-busy="true"]::before,
  .ari-thinking-dots i,
  .ari-caret,
  .ari-reclabel i,
  .ari-launcher.is-nudge { animation: none; }
  /* Must out-specify `.ari-status[data-state=…] .ari-status-dot` (0,3,0);
     a media query adds no specificity of its own. */
  .ari-status[data-state] .ari-status-dot { animation: none; }
  .ari-thinking-copy {
    animation: none;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--ari-soft);
  }
  .ari-shell[data-state="thinking"] .ari-head-id::after,
  .ari-shell[data-state="streaming"] .ari-head-id::after {
    animation: none;
    opacity: .85;
  }
  .ari-launcher,
  .ari-launcher-face,
  .ari-scrim,
  .ari-jump,
  .ari-suggestion,
  .ari-send,
  .ari-go,
  .ari-lead-send,
  .ari-cbtn,
  .ari-close { transition: none; }
}

@media (forced-colors: active) {
  .ari-launcher,
  .ari-shell,
  .ari-message,
  .ari-input-wrap,
  .ari-suggestion,
  .ari-lead,
  .ari-lead-input,
  .ari-go,
  .ari-err,
  .ari-message-action { border: 1px solid CanvasText; box-shadow: none; }
  .ari-head-id::after { display: none; }
}

/* The launcher keeps a dual focus ring — dark backing plus light outline —
   because the orb itself stays dark on the light canvas. Everything else in
   the shell now sits on light glass, where the site-wide blue ring reads. */
.ari-launcher:focus-visible {
  outline: 3px solid #94b2ff;
  outline-offset: 3px;
  box-shadow:
    0 0 0 3px rgba(9, 14, 34, .85),
    0 22px 44px -18px rgba(3, 7, 20, .8);
}
