/*
 * Vito shared cross-platform baseline.
 * This layer is deliberately neutral: it changes browser behavior, not a
 * project's palette, grid, spacing scale, or animation direction.
 */

html {
  /* Stops Android Chrome from autonomously enlarging text after rotation. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;

  /* Reserves the Windows scrollbar track so desktop line lengths do not jump. */
  scrollbar-gutter: stable;
}

body {
  /* Prevents Android glow / iOS scroll chaining from escaping a page surface. */
  overscroll-behavior-y: none;
}

/* Headings are the only shared balancing target; body copy keeps its authored measure. */
:where(h1, h2, h3) {
  text-wrap: balance;
}

/*
 * Components that opt into backdrop blur must also define an opaque or
 * translucent background before adding the blur. On browsers without the
 * feature that background remains the equivalent readable end state.
 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-vito-backdrop] {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
