/*
 * 400 and 600 are new here. Only 500 and 700 were ever fetched, so every `fontWeight={600}` in the
 * app — panel titles, section headers, the category lists — was being synthesised by the browser
 * from the 500. Faux-bold is what a lot of the "unpolished" feeling actually was.
 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

html,
body {
  padding: 0;
  margin: 0;
  /*
   * Inter, with the system stack as fallback rather than as an override. This used to declare
   * `font-family: "Inter"` and then immediately redeclare the system stack on the next line, so the
   * second won and Inter never applied to anything that did not opt in by hand.
   */
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}

.chakra-ui-light {
  overflow: unset !important;
}

[data-radix-popper-content-wrapper] {
  z-index: 9999 !important;
}

/*
 * Chakra's toast managers also carry inline `pointer-events: none`, so without
 * the :not() this blanket rule pinned every toast to z-index 0 — under modals.
 */
div[style*="pointer-events: none"]:not([id^="chakra-toast-manager"]) {
  z-index: 0 !important;
}

.react-three-fiber-portal {
  z-index: 0 !important;
}

[data-liveblocks-portal] {
  z-index: 9999 !important;
}
a {
  color: inherit;
  text-decoration: none;
}


/*
 * Chat attachment filename tooltips must clear the editor's z=10049 left panel.
 * Chakra pins its tooltip portal POSITIONER to the theme's z-index token (1800),
 * and per-instance zIndex props only reach the inner content — which the
 * positioner's own stacking context then traps. Raise the positioner of exactly
 * these tooltips (tagged in lib/ui/chat/chatWidget.tsx).
 */
.chakra-portal > div:has(> .chat-attachment-tooltip) {
  z-index: 10500 !important;
}

/*
 * Toasts must never be buried: the editor stacks panels up to z-index ~10500
 * (see the chat-attachment tooltip rule above) and modals sit at 1400, while
 * the rendered `chakra-toast-manager-*` region wrappers compute to z-index 0
 * (verified in devtools — this Chakra build does NOT apply its documented
 * `var(--toast-z-index, 5500)` to them), so toasts drew UNDER the share
 * modal's overlay. Pin the managers to the top directly; the variable is set
 * too for any Chakra path that does read it.
 */
:root {
  --toast-z-index: 2147483647;
}
div[id^='chakra-toast-manager'] {
  z-index: 2147483647 !important;
}

