/* Glass: quiet depth on top of future.css and wall.css. Everything here
   is edges and grain; no layout moves. Loaded before phone.css (which
   stays last). Retired 26 Sep 2026: the breathing ground light, the
   specular sweep on primary buttons and the bloom on headings. */

:root {
  --g-hair: rgba(var(--kit-rim-rgb), 0.34);
  --g-hair-soft: rgba(var(--kit-rim-rgb), 0.10);
  --g-sheen: rgba(255, 255, 255, 0.045);
  --g-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---- the panels: a gradient hairline that catches light, a specular sheen,
        a whisper of grain, and depth in two shadows ---- */
.login-card, .tile, .chart-card, .gov-card, .compare-col, .settings-section, .media-item, .geometry-figure,
.ev-card, .ev-section, .audit-drawer, .model-menu, .user-menu, .info-popover, .models-menu,
.prompt-input, .prompt-box, .composer {
  position: relative;
  isolation: isolate;
  border-color: transparent !important;
  background-clip: padding-box;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 30px 80px -30px rgba(2, 8, 30, 0.85) !important;
}
/* gradient hairline: brightest where the light hits (top-left), fading to the edition rim */
.login-card::before, .tile::before, .chart-card::before, .gov-card::before, .compare-col::before, .settings-section::before,
.media-item::before, .geometry-figure::before, .ev-card::before, .ev-section::before, .model-menu::before, .user-menu::before,
.info-popover::before, .models-menu::before,
.prompt-input::before, .prompt-box::before, .composer::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.20), var(--g-hair) 30%, var(--g-hair-soft) 60%, rgba(var(--kit-rim-rgb), 0.16) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
/* specular sheen and grain */
.login-card::after, .tile::after, .chart-card::after, .gov-card::after, .compare-col::after, .settings-section::after,
.media-item::after, .geometry-figure::after, .ev-card::after, .ev-section::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, var(--g-sheen) 0%, transparent 28%, transparent 70%, rgba(255, 255, 255, 0.04) 100%),
    var(--g-noise);
  background-size: auto, 160px 160px;
  mix-blend-mode: soft-light;
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}
/* the wall's own ::after is its grid; keep it (the login view is not a panel) */

/* ---- headings: no bloom; ink on glass reads by itself ---- */
h1, h2, .room-title, .tile-value, .ev-fact-value, .brand-word {
  text-shadow: none;
}

/* ---- primary actions: no sweep, no shimmer ---- */
.btn-primary::after, .send-btn::after, .opening-enter-btn::after { content: none; }

/* ---- inputs: glass with a lit hairline on focus ---- */
.field-input:focus, .prompt-input:focus-within, textarea:focus, input:focus {
  box-shadow: 0 0 0 1px rgba(var(--kit-rim-rgb), 0.55) !important;
}

@media (prefers-reduced-transparency: reduce) {
  .login-card::after, .tile::after, .chart-card::after, .gov-card::after { display: none; }
}
