/* Fluid pass (loaded last): controls answer the moment they are pressed, the header is a
   translucent layer with a soft edge instead of a hard line, and the scan's detail box grows out
   of the tile that opened it. fluid.js marks the header once content is scrolled beneath it and
   sets the detail box's origin. */

/* Press: every control dips the instant it is pressed (no waiting for the click), then springs
   back a little more slowly when released */
:is(.button,.nav-cta,.gw-close-cta):active{transform:scale(.97);transition-duration:.25s,.25s,.25s,.08s}
.plate-tabs button,.vg-tabs button,.vg-switch{
  transition:background .2s,color .2s,border-color .2s,transform .22s cubic-bezier(.2,.8,.2,1)}
:is(.plate-tabs button,.vg-tabs button,.vg-switch):active{transform:scale(.94);transition-duration:.2s,.2s,.2s,.06s}
/* Accordion questions: the row darkens and the icon dips on press */
.wq summary{-webkit-tap-highlight-color:transparent;transition:color .2s}
.wq summary:active{color:#1b4585}
html[data-theme=dark] .wq summary:active{color:#83b4ff}
.wq-icon{transition:background .25s,transform .22s cubic-bezier(.2,.8,.2,1)}
.wq summary:active .wq-icon{transform:scale(.86);transition-duration:.25s,.06s}
/* A question that is closing shows its plus straight away, not when the answer has finished sliding */
.wq-item[open].wq-shut .wq-icon{background:transparent}
.wq-item[open].wq-shut .wq-icon::before,.wq-item[open].wq-shut .wq-icon::after{background:var(--blue2)}
.wq-item[open].wq-shut .wq-icon::after{transform:rotate(90deg)}
:is(.button,.nav-cta,.gw-close-cta,.plate-tabs button,.vg-tabs button,.vg-switch){-webkit-tap-highlight-color:transparent}

/* Header material: a little more saturation behind the blur, no hard line; a soft shadow edge
   fades in only while content is scrolled beneath it */
.header{-webkit-backdrop-filter:blur(22px) saturate(170%);backdrop-filter:blur(22px) saturate(170%);border-bottom-color:transparent}
.header::after{content:'';position:absolute;left:0;right:0;top:100%;height:14px;pointer-events:none;
  background:linear-gradient(rgba(14,35,70,.09),rgba(14,35,70,0));opacity:0;transition:opacity .3s}
html[data-theme=dark] .header::after{background:linear-gradient(rgba(0,0,0,.35),rgba(0,0,0,0))}
.header.is-under::after{opacity:1}

/* Scan detail box: grows out of its tile (origin set by fluid.js) instead of rising from below */
.plate-tip{transform:scale(.94);transform-origin:var(--tip-ox,0) var(--tip-oy,0);
  transition:opacity .16s,transform .26s cubic-bezier(.2,.8,.2,1)}
.plate-tip.on{transform:none}

@media(prefers-reduced-motion:reduce){
  :is(.button,.nav-cta,.gw-close-cta,.plate-tabs button,.vg-tabs button,.vg-switch,.wq summary):active,
  .wq summary:active .wq-icon{transform:none}
  .plate-tip{transform:none;transition:opacity .16s}
}
/* Reduced transparency: a solid header */
@media(prefers-reduced-transparency:reduce){
  .header{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--bg)}
}
