/* DMV Launch chrome (2026-11-24, Eliezer: "nowhere near enough chrome on my website"). Pair with /ui/chrome.js.

   Three layers, cheapest first:
   1. .crx        chrome TEXT in plain CSS: a banded metal gradient clipped to the letters, one full band per line, with a
                  highlight that sweeps across. Every browser, no script. /ui/chrome.js wraps the first line of each heading
                  in <x-cr class="crx"> by itself, so no markup changes are needed.
   2. .crx.on     the same letters as real liquid metal (WebGL), painted over the CSS version when the device can do it.
   3. .cr-fill / .cr-ring / .cr-line   chrome surfaces: a solid chrome pill, a chrome outline, a chrome hairline.

   On a light background the text uses the dark (gunmetal) gradient and stays CSS only. */
:root{
  --cr-metal:linear-gradient(180deg,#fff 0%,#fff 20%,#e3e8ee 36%,#b1b9c4 46%,#737c88 50.5%,#bcc3cd 56%,#eaeef2 70%,#fff 86%,#fff 100%);
  --cr-soft:linear-gradient(180deg,#fff 0%,#e9edf2 36%,#aab2be 56%,#dfe4ea 70%,#fff 100%);
  --cr-gun:linear-gradient(180deg,#59616c 0%,#343a42 22%,#111316 48%,#000 51%,#3a4049 57%,#22262b 78%,#4b535d 100%);
  --cr-sheen:linear-gradient(100deg,rgba(255,255,255,0) 43%,rgba(255,255,255,.96) 50%,rgba(255,255,255,0) 57%);
  --cr-pill:linear-gradient(180deg,#fff 0%,#eef1f5 34%,#b4bcc7 50%,#d5dbe2 64%,#f6f8fa 100%);
  --cr-edge:linear-gradient(140deg,#fff 0%,#9aa3af 22%,#30353c 40%,#c9d0d8 56%,#5d6570 74%,#f3f5f8 100%);
  --cr-ease:cubic-bezier(.22,.8,.24,1);
}
.crx{display:block;position:relative;font-weight:inherit;font-style:inherit;color:transparent;
  background-image:var(--cr-sheen),var(--cr-metal);background-size:320% 100%,100% 1em;background-size:320% 100%,100% 1lh;
  background-repeat:no-repeat,repeat-y;background-position:170% 0,0 0;-webkit-background-clip:text;background-clip:text;
  animation:cr-sweep 9s cubic-bezier(.45,0,.2,1) infinite}
/* the chrome words share their line with what follows (an accent word): stay inline so the heading does not move */
.crx.inl{display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.crx.dark{background-image:linear-gradient(100deg,rgba(255,255,255,0) 43%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 57%),var(--cr-gun)}
/* an accent word that used to be brand blue, or one word of a heading built word by word. Same metal, but the element keeps
   its own display and animation: only its paint changes. !important because page rules like "h1 em{color:blue}" outrank a class. */
.cra{color:transparent!important;background-image:var(--cr-sheen),var(--cr-metal);background-size:320% 100%,100% 1em;background-size:320% 100%,100% 1lh;
  background-repeat:no-repeat,repeat-y;background-position:170% 0,0 50%;-webkit-background-clip:text;background-clip:text;
  -webkit-box-decoration-break:clone;box-decoration-break:clone}
.cra.dark{background-image:linear-gradient(100deg,rgba(255,255,255,0) 43%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 57%),var(--cr-gun)}
@keyframes cr-sweep{0%,58%{background-position:170% 0,0 0}100%{background-position:-70% 0,0 0}}
.crx ::selection,.crx::selection{color:#000;background:#dfe4ea}
/* the liquid layer: a canvas exactly over the letters, a little larger than the text box so tails are not cut */
.crx-c{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .8s var(--cr-ease)}
.crx-c canvas{display:block}
.crx.on .crx-c{opacity:.5}

/* solid chrome (primary buttons): dark text on polished metal, a top light and a bottom shade, a sheen that crosses on hover */
.cr-fill{position:relative;overflow:hidden;isolation:isolate;background:var(--cr-pill);color:#07080a;
  box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 rgba(0,0,0,.4),0 0 0 1px rgba(255,255,255,.22),0 12px 34px -12px rgba(140,170,255,.55)}
.cr-fill::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(100deg,rgba(255,255,255,0) 35%,rgba(255,255,255,.9) 50%,rgba(255,255,255,0) 65%);
  background-size:260% 100%;background-position:160% 0;transition:background-position .9s var(--cr-ease);pointer-events:none}
@media (hover:hover){.cr-fill:hover::after{background-position:-60% 0}}
/* a brand-blue pill that /ui/chrome.js turned into chrome: it has to win over the page's own button colours */
.cr-auto{background:var(--cr-pill)!important;color:#07080a!important;border-color:transparent!important}
.cr-auto.dark{background:linear-gradient(180deg,#5a626d 0%,#2a2f36 40%,#08090b 52%,#343a42 62%,#1b1e23 100%)!important;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -1px 0 rgba(0,0,0,.6),0 12px 30px -14px rgba(0,0,0,.6)}
/* chrome outline (secondary buttons, frames): the edge is the metal, the inside stays dark */
.cr-ring{border:1.5px solid transparent;background:linear-gradient(#111215,#08090b) padding-box,var(--cr-edge) border-box;color:#f5f5f7}
/* chrome hairline between sections */
.cr-line{position:relative}
.cr-line::before{content:"";position:absolute;left:50%;top:0;width:min(1240px,100% - 32px);height:1px;transform:translateX(-50%);pointer-events:none;
  background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.14) 12%,rgba(255,255,255,.75) 50%,rgba(255,255,255,.14) 88%,rgba(255,255,255,0))}
@media (prefers-reduced-motion:reduce){.crx{animation:none}.cr-fill::after{transition:none}}
@media (forced-colors:active){.crx{color:CanvasText;background:none}.crx-c{display:none}}
