/* ========================================================================
   LOOT v7 — global polish layer (loads last)
   Ambient background, grain, selection, scrollbar, focus and type polish.
   Uses only the theme's own variables, so accent changes in the editor
   still flow through. Remove this file's <link> in master.njk to revert.
   ======================================================================== */

/* ambient aurora + fine grid behind everything */
[data-scheme="dark"] body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60rem 30rem at 50% -8rem, rgba(var(--cl-accent), .22), transparent 70%),
    radial-gradient(40rem 24rem at 100% 20%, rgba(139, 92, 246, .10), transparent 70%),
    radial-gradient(40rem 24rem at 0% 45%, rgba(94, 192, 255, .07), transparent 70%);
}
[data-scheme="dark"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70rem 40rem at 50% 0%, #000, transparent 75%);
          mask-image: radial-gradient(70rem 40rem at 50% 0%, #000, transparent 75%);
}

/* glassy sticky header */
[data-scheme="dark"] .sa-header {
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
}

/* type */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2 { letter-spacing: -.035em; text-wrap: balance; }
p { text-wrap: pretty; }

/* selection, focus, scrollbar */
::selection { background: rgba(var(--cl-accent), .45); color: #fff; }
:focus-visible { outline: 2px solid rgb(var(--cl-accent)); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: rgba(var(--cl-accent), .55) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--cl-accent), .45); border-radius: 999px; border: 3px solid rgb(var(--cl-background)); }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--cl-accent), .75); }

/* marquee chips: fade the edges */
.ox-marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* smoother interactive feel everywhere */
a, button { -webkit-tap-highlight-color: transparent; }
img { image-rendering: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
