/* Vono AI — reset, RTL base, typography, focus. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; height: 100%; }
/* Complete height chain so the chat screen can own an internal scroller. */
#vono-root { height: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  direction: rtl;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Subtle lilac page glow behind everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 82% 8%, rgba(231,214,255,.55), transparent 70%),
    radial-gradient(55% 45% at 12% 92%, rgba(255,183,167,.30), transparent 72%),
    var(--bg-tint);
  pointer-events: none;
}

img, svg, video, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4 { line-height: var(--lh-snug); font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { color: var(--ink-soft); }

/* Keep the Latin product name LTR inside RTL */
.ltr, [dir="ltr"] { direction: ltr; unicode-bidi: isolate; }

/* Focus visibility */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus);
  border-radius: var(--r-xs);
}
.btn:focus-visible, .chip:focus-visible, [role="button"]:focus-visible { border-radius: var(--r-pill); }

.skip-link {
  position: fixed; inset-inline-start: 16px; top: -100px; z-index: 200;
  background: var(--surface); color: var(--ink); padding: 10px 16px;
  border-radius: var(--r-pill); box-shadow: var(--sh-md); transition: top var(--t-base) var(--ease-out);
}
.skip-link:focus { top: 16px; }

.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;
}

::selection { background: rgba(243,77,184,.22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(123,92,255,.25); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(123,92,255,.4); border-radius: 999px; background-clip: padding-box; }

/* Arabic numerals / equations remain readable */
.num, .equation { font-feature-settings: "tnum" 1; direction: ltr; unicode-bidi: isolate; }
