.kara-analytics {
  position: fixed;
  z-index: 40; /* under the header (50) and its open menu: 23 Nov 2026 audit DEV-04 */
  inset: auto 1rem 1rem auto;
  display: grid;
  justify-items: end;
  gap: .5rem;
  max-width: calc(100vw - 2rem);
  color: #173b3b;
  font: 650 .875rem/1.5 'Manrope', system-ui, sans-serif;
}
.kara-analytics button {
  appearance: none;
  background: #fffdfc;
  color: #173b3b;
  border: 1px solid #b7c5bf;
  border-radius: 2rem;
  padding: .58rem .9rem;
  font: inherit;
  cursor: pointer;
}
.kara-analytics button:hover { background: #e4ece7; }
.kara-analytics__toggle { grid-row: 2; box-shadow: 0 3px 12px #173b3b1a; }
.kara-analytics__panel {
  grid-row: 1;
  width: min(21rem, 100%);
  background: #fffdfc;
  padding: .95rem 1rem;
  border: 1px solid #ded7c8;
  border-radius: .25rem;
  box-shadow: 0 6px 22px #173b3b24;
}
.kara-analytics__panel[hidden] { display: none; }
.kara-analytics__panel p { margin: .25rem 0 .65rem; font-weight: 500; }
.kara-analytics__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.kara-analytics button:focus-visible, .kara-analytics a:focus-visible { outline: 2px solid #94534d; outline-offset: 3px; }
/* Phones (25 Nov 2026 audit, DEV-03): a short bar across the bottom instead of a tall box over the first screen's buy
   buttons. The text sits beside the two buttons, and the pill hides while the bar is open (the buttons and Escape close it). */
@media (max-width: 600px) {
  .kara-analytics { inset: auto .5rem .5rem .5rem; justify-items: stretch; max-width: none; }
  .kara-analytics__toggle { justify-self: end; }
  .kara-analytics__toggle[aria-expanded="true"] { display: none; }
  .kara-analytics__panel { width: 100%; padding: .55rem .7rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .1rem .6rem; }
  .kara-analytics__panel strong { grid-column: 1; font-size: .8rem; line-height: 1.3; }
  .kara-analytics__panel p { grid-column: 1; margin: 0; font-size: .78rem; line-height: 1.35; }
  .kara-analytics__actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; flex-wrap: nowrap; gap: .35rem; }
  .kara-analytics__actions button { min-height: 44px; padding: .4rem .75rem; white-space: nowrap; }
}
