/* First-paint shell colors (ADR 0010). Linked from index.html / auth.html — not inline. */
html.dark {
  color-scheme: dark;
  background: hsl(225 25% 11%);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: hsl(225 25% 11%);
  color: hsl(0 0% 88%);
}

body {
  min-height: 100dvh;
}

#root {
  min-height: 100dvh;
  background: hsl(225 25% 11%);
}

/* Public SSG: the site page colour per theme (consent-boot.js sets data-site-theme before
   paint; the media query covers no-JavaScript), so neither white nor the app navy flashes. */
html[data-public-ssg="1"],
html[data-public-ssg="1"] body,
html[data-public-ssg="1"] #root {
  background: #eceff5;
}
html[data-public-ssg="1"][data-site-theme="dark"],
html[data-public-ssg="1"][data-site-theme="dark"] body,
html[data-public-ssg="1"][data-site-theme="dark"] #root {
  background: #0b0c13;
}
@media (prefers-color-scheme: dark) {
  html[data-public-ssg="1"]:not([data-site-theme]),
  html[data-public-ssg="1"]:not([data-site-theme]) body,
  html[data-public-ssg="1"]:not([data-site-theme]) #root {
    background: #0b0c13;
  }
}

/* Returning visitors: hide the SSG cookie dialog before React hydrates (consent-boot.js). */
html[data-cookie-consent] [data-cookie-banner] {
  display: none !important;
}

/*
 * First-visit SSG: park the banner at the bottom before marketing.css.
 * In-flow (after the footer) jumping to position:fixed in the viewport is CLS.
 * Geometry owner for unknown consent: this file, not a late Tailwind class.
 */
html:not([data-cookie-consent]) [data-cookie-banner] {
  background-color: #f6f7fb;
  border-top: 1px solid #d3d8e3;
}


html[data-public-ssg="1"]:not([data-cookie-consent]) [data-cookie-banner] {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  box-sizing: border-box;
  background-color: #f6f7fb;
  isolation: isolate;
  overflow: hidden;
}

/* Dark site theme: beats the white first-visit bar above (more specific, later). */
html[data-public-ssg="1"][data-site-theme="dark"]:not([data-cookie-consent]) [data-cookie-banner] {
  background-color: #151823;
  border-top-color: #242839;
  color: #c3c8d4;
}
@media (prefers-color-scheme: dark) {
  html[data-public-ssg="1"]:not([data-site-theme]):not([data-cookie-consent]) [data-cookie-banner] {
    background-color: #151823;
    border-top-color: #242839;
    color: #c3c8d4;
  }
}
