.cr-ai {
  --ai-surface: #142733;
  --ai-deep: #0d1b25;
  --ai-line: #35515b;
  --ai-copy: #edf5f5;
  --ai-muted: #b5c7ca;
  --ai-accent: #55d5c2;
  --ai-shadow: 0 24px 72px #020a10a8, 0 4px 16px #020a1066;
  position: fixed;
  z-index: 1000;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(408px, calc(100vw - 36px));
  font-family: var(--cr-font-sans, "DM Sans", sans-serif);
  color: var(--ai-copy);
}
.cr-ai *, .cr-ai *::before, .cr-ai *::after { box-sizing: border-box; }
.cr-ai [hidden] { display: none !important; }
.cr-ai__launcher {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  border: 1px solid #4a7778;
  border-radius: 5px;
  background: linear-gradient(110deg, #17343b 0%, #10232f 70%);
  color: var(--ai-copy);
  box-shadow: 0 12px 32px #020a1066;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}
.cr-ai__launcher:hover { transform: translateY(-2px); border-color: var(--ai-accent); background: #18343d; color: var(--ai-copy); }
.cr-ai__launcher:active { transform: translateY(0); }
.cr-ai__launcher:focus-visible { outline: 3px solid #a0f1e6; outline-offset: 4px; }
.cr-ai__launcher-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.cr-ai__launcher-copy strong { color: var(--ai-copy); font-size: 14px; letter-spacing: .05px; }
.cr-ai__launcher-copy small { color: #b4c8ca; font-size: 11px; line-height: 1.35; }
.cr-ai__launcher-action {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid #4da89e;
  border-radius: 3px;
  background: #102c33;
  color: #a5f4e8;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.cr-ai__launcher-mark, .cr-ai__mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid #4da89e;
  border-radius: 50%;
  background: #102c33;
}
.cr-ai__launcher-mark::before, .cr-ai__mark::before {
  content: "";
  position: absolute;
  width: 23px;
  height: 23px;
  border: 1px solid #459b94;
  border-radius: 50%;
}
.cr-ai__launcher-mark::after, .cr-ai__mark::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ai-accent);
  box-shadow: 0 -11px 0 -1px var(--ai-accent), 11px 0 0 -1px var(--ai-accent), 0 11px 0 -1px var(--ai-accent), -11px 0 0 -1px var(--ai-accent);
}
.cr-ai__launcher-mark span, .cr-ai__mark span {
  position: absolute;
  z-index: 1;
  width: 1px;
  height: 16px;
  top: 4px;
  left: 19px;
  transform: rotate(42deg);
  transform-origin: bottom;
  background: #74e2d3;
  opacity: .7;
}
.cr-ai__launcher-arrow {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin-right: 3px;
  border-top: 1px solid var(--ai-accent);
  border-right: 1px solid var(--ai-accent);
  transform: rotate(45deg);
}
.cr-ai__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: min(670px, calc(100dvh - 112px - env(safe-area-inset-top)));
  min-height: min(440px, calc(100dvh - 116px));
  overflow: hidden;
  border: 1px solid #3a6268;
  border-radius: 7px;
  background: var(--ai-surface);
  box-shadow: var(--ai-shadow);
  transform-origin: bottom right;
  animation: cr-ai-arrive .2s ease-out both;
}
@keyframes cr-ai-arrive { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.cr-ai__header {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--ai-line);
  background: #10232d;
}
.cr-ai__identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cr-ai__mark { flex-basis: 36px; width: 36px; height: 36px; }
.cr-ai__mark::before { width: 20px; height: 20px; }
.cr-ai__mark span { left: 17px; top: 3px; height: 14px; }
.cr-ai__identity h2 { margin: 1px 0 0; color: var(--ai-copy); font: 400 21px/1.15 var(--cr-font-serif, Georgia, serif); letter-spacing: -.2px; }
.cr-ai__eyebrow { margin: 0; color: var(--ai-accent); font-size: 9px; font-weight: 700; letter-spacing: 1.25px; text-transform: uppercase; }
.cr-ai__header-actions { display: flex; align-items: center; gap: 8px; }
.cr-ai__text-button, .cr-ai__icon-button {
  min-height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: #c0d4d6;
  cursor: pointer;
}
.cr-ai__text-button { min-height: 44px; white-space: nowrap; padding: 7px 8px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.cr-ai__icon-button { display: grid; place-items: center; width: 42px; padding: 0; border-color: #405a62; border-radius: 4px; font: 300 25px/1 var(--cr-font-sans, sans-serif); }
.cr-ai__text-button:hover, .cr-ai__icon-button:hover { color: var(--ai-accent); border-color: #4c8580; background: #17323a; }
.cr-ai__content { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 15px 9px; overflow: hidden; overscroll-behavior: contain; }
.cr-ai__context-summary { min-height: 44px; padding: 10px 0; color: var(--ai-accent); cursor: pointer; font-size: 12px; }
.cr-ai__intro { flex: 0 0 auto; margin: 0 0 8px; color: var(--ai-muted); font-size: 12px; line-height: 1.5; }
.cr-ai__sharing { flex: 0 0 auto; max-height: 190px; overflow-y: auto; margin: 0 0 10px; padding: 10px 11px; border: 1px solid #385860; border-radius: 4px; background: #10232c; }
.cr-ai__section-label { margin: 0 0 7px; color: #83cfc5; font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.cr-ai__check { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 5px 0; color: var(--ai-copy); cursor: pointer; }
.cr-ai__check input { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ai-accent); }
.cr-ai__check span { display: grid; gap: 2px; }
.cr-ai__check strong { font-size: 11px; line-height: 1.4; }
.cr-ai__check small { color: #aebfc3; font-size: 10px; font-weight: 400; line-height: 1.45; }
.cr-ai__report-select-label { display: grid; gap: 5px; margin: 4px 0 8px 27px; color: #c7d8d9; font-size: 10px; font-weight: 600; }
.cr-ai__report-select-label select { width: 100%; min-height: 40px; border: 1px solid #506d74; border-radius: 3px; padding: 7px 9px; background: #0b1b24; color: var(--ai-copy); font: inherit; }
.cr-ai__share-note { margin: 5px 0 0; color: #aabdc1; font-size: 9px; line-height: 1.45; }
.cr-ai__transcript { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 3px 4px 12px 0; scroll-padding-bottom: 12px; scrollbar-color: #49646c transparent; scrollbar-width: thin; }
.cr-ai__welcome { display: flex; gap: 10px; align-items: flex-start; max-width: 290px; margin: 4px 0 12px; }
.cr-ai__welcome-rule { flex: 0 0 2px; min-height: 38px; background: var(--ai-accent); }
.cr-ai__welcome p { margin: 0; color: #c7d8d9; font-size: 12px; line-height: 1.6; }
.cr-ai__message { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 10px 0 14px; animation: cr-ai-message-in .2s ease-out both; }
.cr-ai__message--user { align-items: flex-end; }
.cr-ai__message-label { color: #88cfc5; font-size: 9px; font-weight: 700; letter-spacing: .85px; text-transform: uppercase; }
.cr-ai__message--user .cr-ai__message-label { color: #b8c9ce; }
.cr-ai__message-row { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.cr-ai__avatar { display: grid; flex: 0 0 27px; place-items: center; width: 27px; height: 27px; margin-bottom: 3px; border: 1px solid #438e88; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #174842, #102b34 70%); box-shadow: inset 0 0 0 3px #10232d; color: #9ce8dc; font-size: 8px; font-weight: 800; letter-spacing: -.4px; }
.cr-ai__bubble { max-width: 92%; min-width: 0; padding: 11px 13px; border: 1px solid #38545d; border-radius: 4px 14px 14px 14px; background: linear-gradient(145deg, #142c36, #10232c); color: #e4eeee; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; box-shadow: 0 5px 14px #06121933; }
.cr-ai__bubble > :first-child { margin-top: 0; }
.cr-ai__bubble > :last-child { margin-bottom: 0; }
.cr-ai__bubble p { margin: 0 0 8px; white-space: pre-wrap; }
.cr-ai__bubble h3, .cr-ai__bubble h4 { margin: 12px 0 6px; color: #f0f8f6; font-family: var(--cr-font-serif, Georgia, serif); font-size: 16px; font-weight: 500; line-height: 1.25; }
.cr-ai__bubble h4 { font-size: 14px; }
.cr-ai__bubble ul, .cr-ai__bubble ol { margin: 4px 0 9px; padding-left: 19px; }
.cr-ai__bubble li { margin: 3px 0; padding-left: 2px; }
.cr-ai__bubble li::marker { color: var(--ai-accent); }
.cr-ai__bubble strong { color: #f3fffc; font-weight: 700; }
.cr-ai__bubble em { color: #d8e9e8; }
.cr-ai__bubble code { padding: 1px 4px; border: 1px solid #38545d; border-radius: 3px; background: #0d1c25; color: #a8e8de; font: 12px/1.4 ui-monospace, monospace; }
.cr-ai__bubble a { color: #8fe5d7; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.cr-ai__figure { display: inline; color: #a5eee2; font-variant-numeric: tabular-nums; font-weight: 700; }
.cr-ai__insight-card { margin: 7px 0 9px; padding: 9px 11px; border: 1px solid #347d77; border-left: 3px solid var(--ai-accent); border-radius: 5px; background: linear-gradient(120deg, #153b3d, #112c35); }
.cr-ai__insight-card p { margin: 3px 0 0; color: #f0faf8; }
.cr-ai__insight-label { display: block; color: #8de4d7; font-size: 9px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.cr-ai__message--user .cr-ai__bubble { max-width: 88%; border-color: #347a74; border-radius: 14px 4px 14px 14px; background: linear-gradient(145deg, #1b514a, #17443f); color: #f1fbf9; }
.cr-ai__typing { display: inline-flex; align-items: center; gap: 7px; margin: 3px 0 9px; color: #b6c9cc; font-size: 11px; }
.cr-ai__typing-dots { display: inline-flex; gap: 3px; }
.cr-ai__typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ai-accent); animation: cr-ai-pulse 1.1s ease-in-out infinite; }
.cr-ai__typing-dots i:nth-child(2) { animation-delay: .14s; }
.cr-ai__typing-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes cr-ai-pulse { 0%, 60%, 100% { opacity: .4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes cr-ai-message-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.cr-ai__suggestions, .cr-ai__followups { flex: 0 0 auto; min-width: 0; padding-top: 7px; }
.cr-ai__chips { display: flex; flex-wrap: nowrap; gap: 9px; min-width: 0; max-width: 100%; overflow-x: auto; padding: 1px 2px 7px 0; overscroll-behavior-x: contain; touch-action: pan-x; -webkit-overflow-scrolling: touch; scrollbar-color: #49646c transparent; scrollbar-width: thin; scroll-snap-type: x proximity; }
.cr-ai__chips button {
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: 36px;
  max-width: min(240px, 76vw);
  padding: 7px 10px;
  border: 1px solid #44636a;
  border-radius: 3px;
  background: #172f38;
  color: #d9e9e9;
  font: 500 10px/1.35 var(--cr-font-sans, sans-serif);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  scroll-snap-align: start;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.cr-ai__chips button:hover { transform: translateY(-1px); border-color: var(--ai-accent); background: #1b3a40; color: #f1fbf9; }
.cr-ai__notice, .cr-ai__error { flex: 0 0 auto; margin: 7px 0 0; font-size: 10px; line-height: 1.45; }
.cr-ai__notice { color: #a9c2c5; }
.cr-ai__error { padding: 8px 10px; border-left: 2px solid #e5a98d; background: #342923; color: #ffe0ce; }
.cr-ai__credits { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 9px 10px; border: 1px solid #347d77; border-radius: 4px; background: linear-gradient(120deg, #153b3d, #112c35); }
.cr-ai__credits[hidden], .cr-ai__credits form[hidden] { display: none; }
.cr-ai__credits-copy { display: grid; gap: 3px; min-width: 0; }
.cr-ai__credits-copy strong { color: #e8f8f5; font-size: 11px; }
.cr-ai__credits small { color: #b5cecf; font-size: 9px; line-height: 1.4; }
.cr-ai__credits form { flex: 0 0 auto; display: grid; justify-items: end; gap: 3px; }
.cr-ai__credits button { min-height: 44px; padding: 9px 14px; border: 1px solid #61d6c7; border-radius: 3px; background: #44c2b1; color: #082522; font: 750 13px/1.25 var(--cr-font-sans, sans-serif); cursor: pointer; }
.cr-ai__credits button:disabled { opacity: .65; cursor: wait; }
.cr-ai__options-retry { align-self: flex-start; min-height: 36px; margin: 0 0 8px; padding: 6px 9px; border: 1px solid #54747b; border-radius: 3px; background: #172f38; color: #d9e9e9; font: 600 10px/1.3 var(--cr-font-sans, sans-serif); cursor: pointer; }
.cr-ai__options-retry:hover { border-color: var(--ai-accent); background: #1b3a40; color: #f1fbf9; }
.cr-ai__composer { flex: 0 0 auto; min-width: 0; padding: 10px 16px 12px; border-top: 1px solid var(--ai-line); background: #10232d; }
.cr-ai__composer textarea {
  display: block;
  width: 100%;
  min-height: 54px;
  max-height: 100px;
  resize: none;
  padding: 10px 11px;
  border: 1px solid #45636b;
  border-radius: 3px;
  background: #0c1c25;
  color: var(--ai-copy);
  font: 16px/1.5 var(--cr-font-sans, sans-serif);
}
.cr-ai__composer textarea::placeholder { color: #9eb2b8; opacity: 1; }
.cr-ai__composer textarea:focus-visible, .cr-ai__report-select-label select:focus-visible { outline: 3px solid var(--ai-accent); outline-offset: 2px; border-color: var(--ai-accent); }
.cr-ai__composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 7px; }
.cr-ai__counter { color: #a9bdc1; font-size: 9px; font-variant-numeric: tabular-nums; }
.cr-ai__send {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 8px 12px;
  border: 1px solid #54d2c0;
  border-radius: 3px;
  background: #44c2b1;
  color: #082522;
  font: 700 11px/1.25 var(--cr-font-sans, sans-serif);
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease;
}
.cr-ai__send:hover:not(:disabled) { transform: translateY(-1px); background: #70e1d2; color: #082522; }
.cr-ai__send:disabled { opacity: .55; cursor: wait; }
.cr-ai__send-arrow { font-size: 17px; line-height: 1; }
.cr-ai__footer { display: block; flex: 0 0 auto; padding: 5px 16px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid #2c4650; background: #0e2029; color: #aabdc0; font-size: 9px; line-height: 1.4; }
.cr-ai__disclosure > summary { display: flex; align-items: center; min-height: 32px; color: #b9d1d2; cursor: pointer; font-size: 10px; font-weight: 600; list-style: none; }
.cr-ai__disclosure > summary::-webkit-details-marker { display: none; }
.cr-ai__disclosure > summary::after { content: "+"; margin-left: auto; padding-left: 8px; color: var(--ai-accent); font-size: 15px; }
.cr-ai__disclosure[open] > summary::after { content: "−"; }
.cr-ai__disclosure-content { display: grid; gap: 4px; max-height: min(140px, 28dvh); overflow-y: auto; padding: 2px 0 5px; overscroll-behavior: contain; }
.cr-ai__disclosure-content > * { margin: 0; }
.cr-ai__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cr-ai button:focus-visible, .cr-ai input:focus-visible, .cr-ai select:focus-visible, .cr-ai textarea:focus-visible { outline: 3px solid #8af0df; outline-offset: 3px; }
.cr-ai__bubble { font-size: 14px; }
.cr-ai__check small, .cr-ai__footer, .cr-ai__share-note { font-size: 11px; }
.cr-ai__check strong, .cr-ai__notice, .cr-ai__error, .cr-ai__chips button { font-size: 12px; }

@media (max-width: 600px) {
  .cr-ai {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(100% - 24px, 420px);
    margin-inline: auto;
    left: max(12px, env(safe-area-inset-left));
  }
  .cr-ai__launcher { min-height: 62px; gap: 9px; padding: 9px 11px; }
  .cr-ai__launcher-mark { flex-basis: 36px; width: 36px; height: 36px; }
  .cr-ai__launcher-mark::before { width: 21px; height: 21px; }
  .cr-ai__launcher-mark span { left: 17px; }
  .cr-ai__panel {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(var(--cr-ai-viewport-bottom-gap, 0px) + 8px + env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    height: min(760px, calc(var(--cr-ai-visual-height, 100dvh) - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    min-height: min(520px, calc(var(--cr-ai-visual-height, 100dvh) - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    border-radius: 6px;
    transform-origin: bottom center;
  }
  .cr-ai__content { padding-inline: 13px; }
  .cr-ai__credits { align-items: flex-start; flex-direction: column; }
  .cr-ai__credits form { width: 100%; justify-items: stretch; }
  .cr-ai__credits button { width: 100%; min-height: 46px; font-size: 14px; }
  .cr-ai__credits form small { text-align: center; }
  .cr-ai__composer { padding: 8px 13px 10px; }
  .cr-ai__composer textarea { min-height: 42px; max-height: 88px; padding-block: 8px; overflow-y: hidden; font-size: 16px; }
  .cr-ai__report-select-label select { font-size: 16px; }
  .cr-ai__footer { padding: 3px 13px max(5px, env(safe-area-inset-bottom)); font-size: 9px; }
  .cr-ai__chips { gap: 8px; }
  .cr-ai__chips button { max-width: min(220px, 76vw); min-height: 40px; padding: 8px 10px; line-height: 1.4; }
}
@media (max-width: 360px) {
  .cr-ai__header { padding: 12px; }
  .cr-ai__identity { gap: 8px; }
  .cr-ai__identity h2 { font-size: 19px; }
  .cr-ai__text-button { font-size: 10px; padding-inline: 4px; }
  .cr-ai__chips button { max-width: 76vw; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-ai *, .cr-ai *::before, .cr-ai *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-height: 640px) {
  .cr-ai__panel { min-height: 0; }
  .cr-ai__header { padding-block: 9px; }
  .cr-ai__intro { display: none; }
  .cr-ai__content { padding-top: 7px; }
  .cr-ai__composer { padding-block: 6px; }
  .cr-ai__composer textarea { min-height: 38px; max-height: 72px; }
  .cr-ai__footer { padding-block: 5px; }
}
@media print { .cr-ai { display: none !important; } }
@media (max-width: 600px) {
  .cr-ai__content { overflow-y: auto; }
  .cr-ai__transcript { min-height: 80px; }
  .cr-ai[data-keyboard-open="true"] .cr-ai__intro,
  .cr-ai[data-keyboard-open="true"] .cr-ai__suggestions,
  .cr-ai[data-keyboard-open="true"] .cr-ai__followups { display: none; }
  .cr-ai[data-keyboard-open="true"] .cr-ai__sharing:not([open]) { display: none; }
  .cr-ai[data-keyboard-open="true"] .cr-ai__sharing[open] { max-height: 80px; }
  .cr-ai[data-keyboard-open="true"] .cr-ai__header { padding-block: 8px; }
  .cr-ai[data-keyboard-open="true"] .cr-ai__composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }
  .cr-ai[data-keyboard-open="true"] .cr-ai__composer-bottom { display: contents; }
  .cr-ai[data-keyboard-open="true"] .cr-ai__counter { display: none; }
  .cr-ai[data-keyboard-open="true"] .cr-ai__send { min-width: 68px; padding-inline: 10px; }
}
