/* How it works: "Is this how your change runs?" self-check (hwq.js), in the same HUD box as the
   homepage simulation. Loaded after how.css. */
/* this section's intro sits under its heading */
#usual-sequence .section-intro{display:block}
#usual-sequence .section-intro h2{margin-bottom:0}
#usual-sequence .section-intro .intro-side{max-width:62ch;margin:22px 0 0}

/* ---- 0. Self-check in the HUD box ---- */
/* The same box as the homepage simulation: the frame is drawn by hud-frame.js (via hwq.js) on a
   canvas 44px outside the panel. Start screen, then three numbered cards showing the usual way;
   the tabs on the title band change them to Muon's way, a digital scan running down each tile as
   its colour fades and its words crossfade, card after card. The footer band holds the caption. */
.hwq{--p:#1b4585;--band:#1b4585;--panel:#ffffff;position:relative;margin:44px 0 30px;color:var(--text);isolation:isolate}
html[data-theme=dark] .hwq{--p:#5b8fdc;--band:#2b5fae;--panel:#102036}
.hwq-hudframe{position:absolute;left:-44px;top:-44px;z-index:-1;pointer-events:none}
.hwq-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0}
/* title band */
.hwq-top{display:flex;align-items:center;justify-content:space-between;gap:16px;box-sizing:border-box;height:70px;padding:6px 30px 0}
.hwq-kicker{font:400 clamp(14px,1.3vw,18px)/64px 'Audiowide','Manrope',sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#fff}
.hwq-tabs{display:flex;gap:4px;margin-top:14px;padding:3px;border:1px solid rgba(255,255,255,.35)}
.hwq-tabs[hidden]{display:none}
.hwq-tab{padding:0 14px;height:30px;border:0;background:none;cursor:pointer;font:600 14px/30px 'DM Sans',sans-serif;color:rgba(255,255,255,.82);transition:background .2s,color .2s}
.hwq-tab:hover{color:#fff}
.hwq-tab[aria-pressed=true]{background:#fff;color:#1b4585}
.hwq-tab:focus-visible{outline:2px solid #faa61a;outline-offset:2px}
/* body: the start screen sits over the whole box under the title band */
.hwq-body{display:grid;padding:28px 30px 30px}
.hwq-cover{position:absolute;inset:70px 0 0;z-index:2;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:10px 80px;text-align:center;
  transform-origin:50% 50%;transition:transform .6s cubic-bezier(.2,.8,.2,1),opacity .5s ease,visibility 0s}
.hwq-cover[hidden]{display:none}
.hwq.is-started .hwq-cover{opacity:0;visibility:hidden;transform:scale(.3);transition:transform .7s cubic-bezier(.55,0,.75,.2),opacity .55s ease .1s,visibility 0s .7s}
.hwq-cover-title{margin:0;font:400 clamp(26px,1.7vw + 20px,42px)/1.15 'Audiowide','Manrope',sans-serif;letter-spacing:.01em;color:var(--text)}
.hwq-cover-text{max-width:560px;margin:16px auto 0;font-size:var(--t-lead,17px);line-height:1.65;color:var(--muted)}
.hwq-go{display:inline-flex;margin-top:28px;padding:3px;border:1px solid rgba(27,69,133,.45)}
.hwq-start{box-sizing:border-box;display:inline-flex;align-items:center;height:42px;padding:0 40px;border:0;cursor:pointer;background:#1b4585;color:#fff;font:600 15.5px/1 'DM Sans',sans-serif;transition:background .2s}
.hwq-start:hover{background:#2b5fae}
.hwq-start:focus-visible{outline:2px solid #faa61a;outline-offset:3px}
html[data-theme=dark] .hwq-go{border-color:rgba(255,255,255,.4)}
html[data-theme=dark] .hwq-start{background:#fff;color:#1b4585}
.hwq.is-ready:not(.is-started) .hwq-deck{visibility:hidden}

/* the cards: numbered, a triangle in each gap pointing on to the next */
.hwq-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:34px;margin:0;padding:0;list-style:none;
  --arrow:#9aa8ba;--num:#55657c;--num-ring:#8796ab}
.hwq[data-way=muon] .hwq-cards{--arrow:#3a6bb5}
html[data-theme=dark] .hwq-cards{--arrow:#4f6380;--num:#c9d3e0;--num-ring:#7b8da6}
html[data-theme=dark] .hwq[data-way=muon] .hwq-cards{--arrow:#5b8fdc}
.hwq-cards li{position:relative;display:grid}
.hwq-cards li:not(:last-child)::after{content:'';position:absolute;top:50%;right:-23px;width:0;height:0;margin-top:-9px;
  border-left:12px solid var(--arrow);border-top:9px solid transparent;border-bottom:9px solid transparent;transition:border-color .5s ease}
/* With the script, each card shows one face and changes colour and words in place when the way
   changes (hwq.js decodes the words); the other face stays in the card, unseen, only so the card
   can be sized to the longer of the two */
.hwq-card{position:relative;display:grid}
.hwq-face{display:flex;flex-direction:column;box-sizing:border-box;min-height:var(--face-h,0);padding:24px 24px 22px;border-radius:6px;
  transition:background-color .6s ease,color .6s ease;transition-delay:calc(var(--i) * .12s)}
.hwq.is-ready .hwq-face.is-muon{position:absolute;inset:0 0 auto;visibility:hidden;pointer-events:none}
.hwq-num{display:grid;place-items:center;width:30px;height:30px;margin-bottom:14px;box-sizing:border-box;border-radius:50%;border:2px solid var(--num-ring);
  font:700 14px/1 'Manrope',sans-serif;color:var(--num);transition:background-color .6s ease,color .6s ease,border-color .6s ease;transition-delay:inherit}
.page-methodology .hwq-face h4{margin:0;font:700 var(--t-h3,20px)/1.3 'Manrope',sans-serif;letter-spacing:-.02em;transition:color .6s ease;transition-delay:inherit}
.page-methodology .hwq-face h4{min-height:var(--title-h,0)}
/* the title, description and note words fade while they change (hwq.js) */
.page-methodology .hwq-face h4,.page-methodology .hwq-face>p:not(.hwq-note),.hwq-note b,.hwq-note span{transition-property:color,opacity;transition-duration:.6s,.32s;transition-timing-function:ease;transition-delay:calc(var(--i) * .12s),0s}
.hwq-face.is-swapping h4,.hwq-face.is-swapping>p:not(.hwq-note),.hwq-face.is-swapping .hwq-note b,.hwq-face.is-swapping .hwq-note span{opacity:0;transition-delay:0s}
/* the tile's digital scan: fine scan lines flicker on, a band of light runs down the tile, and
   both fade as the new colour settles (transform and opacity only) */
.hwq-face{position:relative;overflow:hidden;isolation:isolate}
.hwq-face::before,.hwq-face::after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0}
.hwq-face::before{background:repeating-linear-gradient(0deg,rgba(159,192,245,.32) 0 1px,transparent 1px 4px)}
.hwq-face::after{inset:0 0 auto;height:45%;background:linear-gradient(180deg,rgba(159,192,245,0),rgba(159,192,245,.55) 55%,rgba(255,255,255,.75) 58%,rgba(159,192,245,0));transform:translateY(-110%)}
.hwq-face.is-scanning::before{animation:hwq-lines .95s steps(12,end) both}
.hwq-face.is-scanning::after{animation:hwq-sweep .85s cubic-bezier(.45,.05,.35,1) both}
@keyframes hwq-lines{0%{opacity:0}12%{opacity:.9}20%{opacity:.4}30%{opacity:.85}75%{opacity:.6}100%{opacity:0}}
@keyframes hwq-sweep{0%{opacity:0;transform:translateY(-110%)}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translateY(250%)}}
.page-methodology .hwq-face p{margin:10px 0 0;font-size:16px;line-height:1.6;transition:color .6s ease,background-color .6s ease;transition-delay:inherit}
.page-methodology .hwq-face>p:not(.hwq-note){margin-bottom:18px}
/* the catch and the change: pinned to the foot of the card, all one height (set by hwq.js) */
.page-methodology .hwq-face .hwq-note{box-sizing:border-box;min-height:var(--note-h,0);margin-top:auto;padding:13px 15px;border-radius:4px;font-size:15.5px;line-height:1.55}
.hwq-note b{font-weight:700;transition:color .6s ease;transition-delay:inherit}
/* the usual way */
.hwq-face{background:#eef2f8}
html[data-theme=dark] .hwq-face{background:#16294a}
.page-methodology .hwq-face h4{color:var(--text)}
.page-methodology .hwq-face p{color:var(--muted)}
.page-methodology .hwq-face .hwq-note{background:#dfe5ee;color:#2c3a4f}
html[data-theme=dark] .page-methodology .hwq-face .hwq-note{background:#22344f;color:#d6deea}
/* Muon's way: the Muon faces without the script, the shown face once switched */
.hwq-face.is-muon,.hwq.is-ready[data-way=muon] .hwq-face.is-usual{background:#3a6bb5}
html[data-theme=dark] .hwq-face.is-muon,html[data-theme=dark] .hwq.is-ready[data-way=muon] .hwq-face.is-usual{background:#2f62b3}
.hwq-face.is-muon .hwq-num,.hwq.is-ready[data-way=muon] .hwq-face.is-usual .hwq-num{border-color:#fff;background:#fff;color:#1b4585}
.page-methodology .hwq-face.is-muon h4,.page-methodology .hwq.is-ready[data-way=muon] .hwq-face.is-usual h4{color:#fff}
.page-methodology .hwq-face.is-muon p,.page-methodology .hwq.is-ready[data-way=muon] .hwq-face.is-usual p{color:#eef3fb}
.page-methodology .hwq-face.is-muon .hwq-note,.page-methodology .hwq.is-ready[data-way=muon] .hwq-face.is-usual .hwq-note,
html[data-theme=dark] .page-methodology .hwq-face.is-muon .hwq-note,html[data-theme=dark] .page-methodology .hwq.is-ready[data-way=muon] .hwq-face.is-usual .hwq-note{background:rgba(8,24,56,.28);color:#fff}
.hwq-face.is-muon .hwq-note b,.hwq.is-ready[data-way=muon] .hwq-face.is-usual .hwq-note b{color:#ffc35a} /* brand yellow, a touch lighter to read on the blue */

/* first view: the usual way's cards arrive one after another */
.hwq.is-started .hwq-cards li{animation:hwq-in .6s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(.4s + var(--i) * .32s)}
.hwq.is-started .hwq-cards li::after{animation:hwq-fade .4s ease both;animation-delay:calc(.75s + var(--i) * .32s)}
@keyframes hwq-in{from{opacity:0;translate:0 22px}to{opacity:1;translate:none}}

/* footer band: the caption of the way on show */
.hwq-foot{display:grid;align-items:center;margin:0 30px;padding:22px 0 30px}
.hwq-foot[hidden]{display:none}
.hwq.is-ready:not(.is-started) .hwq-foot{visibility:hidden}
.hwq.is-started .hwq-foot{animation:hwq-fade .4s ease 1.3s both}
.hwq-cap{grid-area:1/1;display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.6fr);column-gap:36px;align-items:baseline}
.hwq.is-ready .hwq-cap:not(.is-current){visibility:hidden}
.hwq-cap-title{margin:0;font:400 clamp(17px,.44vw + 15.4px,21px)/1.3 'Audiowide','Manrope',sans-serif;letter-spacing:.01em;color:var(--text)}
.hwq-cap-desc{margin:0;font-size:15.5px;line-height:1.6;color:var(--muted)}
@keyframes hwq-fade{from{opacity:0}to{opacity:1}}
/* without the script: both ways show, the usual way's faces then Muon's, flat */
.hwq:not(.is-ready) .hwq-foot,.hwq:not(.is-ready) .hwq-cover{display:none}
.hwq:not(.is-ready) .hwq-face+.hwq-face{margin-top:12px}

@media(max-width:900px){
  .hwq-cards{grid-template-columns:1fr;row-gap:30px}
  .hwq-cards li:not(:last-child)::after{top:auto;right:auto;bottom:-22px;left:50%;margin:0 0 0 -9px;
    border-top:12px solid var(--arrow);border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:0}
  .hwq-cap{grid-template-columns:1fr;row-gap:6px}
  /* on narrow screens the cards stack tall, so the start screen gets a box of its own size and
     the box grows to the cards on Start */
  .hwq.is-ready:not(.is-started) .hwq-deck,.hwq.is-ready:not(.is-started) .hwq-foot{display:none}
  .hwq.is-started .hwq-cover{display:none}
  .hwq-cover{position:static;min-height:300px}
}
@media(max-width:700px){
  .hwq-top{padding:6px 18px 0}
  .hwq-kicker{font-size:12px}
  .hwq-tab{padding:0 10px;font-size:13px}
  .hwq-body{padding:22px 18px 24px}
  .hwq-cover{padding:10px 8px}
  .hwq-foot{margin:0 18px;padding:18px 0 24px}
}
@media(prefers-reduced-motion:reduce){
  .hwq-cover,.hwq.is-started .hwq-cover{transform:none;transition:opacity .2s,visibility 0s .2s}
  .hwq.is-started .hwq-cards li,.hwq.is-started .hwq-cards li::after,.hwq.is-started .hwq-foot{animation:none}
  /* no fading colours: the other way simply takes its place */
  .hwq-face,.hwq-face *,.hwq-cards li::after{transition:none!important}
  .hwq-face.is-scanning::before,.hwq-face.is-scanning::after{animation:none}
}
