/* ag-gates · two gates, four ends (04 Authorize, the grained Hawcx-blue field).
   Desktop plan 1232 x 464: call labels x=0-332, lanes x=348-888 (Gate 1 at 528, Gate 2 at 728), outcomes x=920-1232.
   Gate labels y=0-40, lanes at y=104, 196, 288, 380 (92px pitch), ceiling note at the foot of Gate 2 (y=432).
   All ink is white. No outcome colours on the field: outcomes are words, glyphs and lane length.
   Scoped under .aa-gates (and .aa-gates-band / .aa-gates-foot for the section around it).
   The markup is the final frame; .is-live (added by asset.js) rewinds it and JS drives pulses, lane lengths and gate flashes. */
.aa-gates{
  --aa-t1:var(--t1,120ms);--aa-t2:var(--t2,200ms);--aa-t3:var(--t3,320ms);--aa-t4:var(--t4,560ms);
  --aa-draw:var(--ease-draw,cubic-bezier(.45,.05,.25,1));--aa-ease:var(--ease,cubic-bezier(.25,1,.5,1));
  --w85:rgba(255,255,255,.85);--w55:rgba(255,255,255,.55);--w45:rgba(255,255,255,.45);
  /* gate and park positions as fractions of the lane (desktop lane is 540 wide: 180, 380, park 472) */
  --g1:33.3333%;--g2:70.3704%;--gp:87.4074%;
  --ly:46px;   /* lane y inside a row */
  --tkh:12px;  /* gate tick / crossing flash height */
  --tb:0;      /* resting tick opacity (desktop: the full-height gate line carries the gate) */
  position:relative;margin:0;color:#fff;
}
.aa-gates .aa-g-stage{position:relative;height:464px}
/* the lane column, shared by the gate labels, the gate lines and every track */
.aa-gates .aa-g-checks,.aa-gates .aa-g-rules{position:absolute;left:calc(348 / 1232 * 100%);width:calc(540 / 1232 * 100%)}

/* the two checks, set over their gate lines */
.aa-gates .aa-g-checks{top:0;height:40px}
.aa-gates .aa-g-chk{position:absolute;top:0;left:var(--g1);white-space:nowrap}
.aa-gates .aa-g-chk.is-2{left:var(--g2)}
.aa-gates .aa-g-chk dt{font:500 11px/16px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:#fff}
.aa-gates .aa-g-chk dd{margin-top:4px;font-size:14px;line-height:20px;color:var(--w85)}
.aa-gates .aa-g-rules{top:52px;height:374px}
.aa-gates .aa-g-rule{position:absolute;top:0;bottom:0;left:var(--g1);width:1px;background:var(--w45);
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 24px);mask-image:linear-gradient(to bottom,transparent 0,#000 24px)}
.aa-gates .aa-g-rule.is-2{left:var(--g2)}

/* lanes */
.aa-gates .aa-g-lanes{position:absolute;left:0;right:0;top:58px}
.aa-gates .aa-g-lane{position:relative;height:92px}
.aa-gates .aa-g-call{position:absolute;left:0;top:var(--ly);width:calc(332 / 1232 * 100%);translate:0 -50%}
.aa-gates .aa-g-h{display:block;font:400 13px/18px var(--mono);color:#fff}
.aa-gates .aa-g-for{display:block;font-size:13px;line-height:18px;color:var(--w85)}
.aa-gates .aa-g-inj{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-bottom:6px}
.aa-gates .aa-g-tag{flex:none;display:inline-block;height:16px;padding:0 5px;border-radius:4px;box-shadow:inset 0 0 0 1px var(--w45);font:400 10px/16px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--w85)}
.aa-gates .aa-g-q{font:400 11px/16px var(--mono);color:var(--w85);white-space:nowrap}
.aa-gates .aa-g-ty{display:inline-block;vertical-align:top;overflow:hidden;white-space:nowrap;max-width:calc(var(--n,99) * 1ch)}

.aa-gates .aa-g-track{position:absolute;top:0;left:calc(348 / 1232 * 100%);width:calc(540 / 1232 * 100%);height:92px}
.aa-gates .aa-g-track>i,.aa-gates .aa-g-m{position:absolute;display:block}
.aa-gates .aa-g-ln{left:0;top:var(--ly);width:100%;height:1px;background:var(--w55)}
.aa-gates .aa-g-ln:not(.is-d){-webkit-mask-image:linear-gradient(to right,transparent 0,#000 32px);mask-image:linear-gradient(to right,transparent 0,#000 32px)} /* a lane's start fades in on the stroke itself */
.aa-gates [data-lane="2"] .aa-g-ln{width:var(--g2)}
.aa-gates [data-lane="2"] .aa-g-ln.is-d{left:var(--g2);width:calc(100% - var(--g2));background:repeating-linear-gradient(to right,var(--w55) 0 2px,transparent 2px 6px)}
.aa-gates [data-lane="3"] .aa-g-ln{width:var(--g2)}
.aa-gates [data-lane="4"] .aa-g-ln{width:var(--g1)}
.aa-gates .aa-g-tk{left:calc(var(--g1) - .5px);top:calc(var(--ly) + .5px - var(--tkh) / 2);width:1px;height:var(--tkh);background:#fff;opacity:calc(var(--tb) + (1 - var(--tb)) * var(--f,0))}
.aa-gates .aa-g-tk.is-2{left:calc(var(--g2) - .5px)}
.aa-gates .aa-g-term{left:calc(var(--g2) - .75px);top:calc(var(--ly) - 5.5px);width:1.5px;height:12px;background:#fff}
.aa-gates .aa-g-term.is-1{left:calc(var(--g1) - .75px)}
.aa-gates .aa-g-m{left:calc(var(--g1) + 8px);top:calc(var(--ly) - 18px);width:12px;height:12px;overflow:visible}
.aa-gates .aa-g-m.is-2{left:calc(var(--g2) + 8px)}
.aa-gates .aa-g-m path{fill:none;stroke:#fff;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
/* a call: 16 x 1.6 with round caps; at rest only the held call shows, parked in the pause */
.aa-gates .aa-g-p{left:0;top:calc(var(--ly) - .3px);width:16px;height:1.6px;border-radius:.8px;background:#fff;opacity:0}
.aa-gates [data-lane="2"] .aa-g-p{left:calc(var(--gp) - 16px);opacity:1}
/* the credential for one call: a 6px square riding above the pulse (gone in the final frame) */
.aa-gates .aa-g-cred{left:calc(100% - 11px);top:calc(var(--ly) - 10px);width:6px;height:6px;opacity:0}
.aa-gates .aa-g-cred>i{position:absolute;inset:0;background:#fff}

/* notes that ride on the lanes */
.aa-gates .aa-g-cl{position:absolute;right:calc(344 / 1232 * 100%);top:calc(var(--ly) + 10px);display:grid;justify-items:end;text-align:right;font:400 11px/16px var(--mono)}
.aa-gates .aa-g-cl>span:not(.sr-only){grid-area:1/1}
.aa-gates .aa-g-cl b{display:block;font-weight:500;color:#fff}
.aa-gates .aa-g-cl b+span{display:block;color:var(--w85)}
.aa-gates .aa-g-cl-a{opacity:0}
.aa-gates .aa-g-sp{position:absolute;left:calc(756 / 1232 * 100%);bottom:calc(92px - var(--ly) + 6px);max-width:calc(132 / 1232 * 100%);font:400 11px/14px var(--mono);color:var(--w85)}
.aa-gates .aa-g-wait{position:absolute;left:calc(740 / 1232 * 100%);top:calc(var(--ly) + 10px);font-size:13px;line-height:18px;color:var(--w85)}
.aa-gates .aa-g-wait span{display:block;white-space:nowrap}

/* outcomes: the dt sits on its lane's line, the dd under it */
.aa-gates .aa-g-out{position:absolute;left:calc(920 / 1232 * 100%);right:0;top:calc(var(--ly) - 8px)}
.aa-gates .aa-g-out dt{font:500 12px/16px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:#fff}
.aa-gates .aa-g-out dd{margin-top:4px;font-size:14px;line-height:20px;color:var(--w85)}
.aa-gates .aa-g-rp{display:inline;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;cursor:default;border-radius:4px}
.aa-gates .aa-g-rp:focus-visible{outline:2px solid #fff;outline-offset:4px}

/* ceiling note, at the foot of Gate 2 */
.aa-gates .aa-g-ceil{position:absolute;left:calc(728 / 1232 * 100%);right:0;top:190px} /* stage y=432 (lane 3 row starts at 242) */
.aa-gates .aa-g-ceil-h{font:500 11px/16px var(--mono);color:#fff}
.aa-gates .aa-g-ceil ul{margin-top:2px;font:400 11px/16px var(--mono);color:var(--w85)}
.aa-gates .aa-g-ceil li{display:inline;white-space:nowrap}
.aa-gates .aa-g-ceil li:not(:last-child)::after{content:" /"}
.aa-gates .aa-g-never{position:relative;color:#fff}
.aa-gates .aa-g-never::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:1px;background:#fff;transform-origin:0 50%}
.aa-gates .aa-g-demo{position:absolute;left:0;top:432px;font:400 11px/16px var(--mono);color:var(--w85)}

/* ---- live: rewind (no transitions), then each state transitions in ---- */
.aa-gates.is-live .aa-g-rule{clip-path:inset(0 0 100% 0)}
.aa-gates.is-live.is-g0 .aa-g-rule{clip-path:inset(0);transition:clip-path var(--aa-t4) var(--aa-draw)}
.aa-gates.is-live .aa-g-chk{opacity:0}
.aa-gates.is-live .aa-g-chk.is-on{opacity:1;transition:opacity var(--aa-t3) linear}
.aa-gates.is-live .aa-g-h,.aa-gates.is-live .aa-g-for{opacity:0;transform:translateY(6px)}
.aa-gates.is-live .is-lab .aa-g-h,.aa-gates.is-live .is-lab .aa-g-for{opacity:1;transform:none;transition:opacity var(--aa-t3) var(--aa-ease),transform var(--aa-t3) var(--aa-ease)}
.aa-gates.is-live .aa-g-tag{opacity:0}
.aa-gates.is-live .is-tag .aa-g-tag{opacity:1;transition:opacity var(--aa-t2) linear}
.aa-gates.is-live .aa-g-m path{stroke-dasharray:1 1;stroke-dashoffset:1}
.aa-gates.is-live .is-m1 .aa-g-m.is-1 path,.aa-gates.is-live .is-m2 .aa-g-m.is-2 path{stroke-dashoffset:0;transition:stroke-dashoffset var(--aa-t2) var(--aa-draw)}
.aa-gates.is-live .aa-g-term{transform:scaleY(0)}
.aa-gates.is-live .is-term .aa-g-term{transform:none;transition:transform var(--aa-t2) var(--aa-ease)}
.aa-gates.is-live .aa-g-sp,.aa-gates.is-live .aa-g-wait{opacity:0}
.aa-gates.is-live .is-sp .aa-g-sp,.aa-gates.is-live .is-wait .aa-g-wait{opacity:1;transition:opacity var(--aa-t3) linear}
.aa-gates.is-live .aa-g-out{opacity:0;transform:translateY(6px)}
.aa-gates.is-live .is-out .aa-g-out{opacity:1;transform:none;transition:opacity var(--aa-t3) var(--aa-ease),transform var(--aa-t3) var(--aa-ease)}
.aa-gates.is-live .aa-g-cred{opacity:1}
.aa-gates.is-live .aa-g-cred>i{transform:scale(0)}
.aa-gates.is-live .is-cred .aa-g-cred>i{transform:none;transition:transform var(--aa-t2) var(--aa-ease)}
.aa-gates.is-live .is-clB .aa-g-cred{opacity:0;transition:opacity var(--aa-t4) linear}
.aa-gates.is-live .aa-g-cl-b{opacity:0}
.aa-gates.is-live .is-clA .aa-g-cl-a{opacity:1;transition:opacity var(--aa-t2) linear}
.aa-gates.is-live .is-clB .aa-g-cl-a{opacity:0;transition:opacity var(--aa-t3) linear}
.aa-gates.is-live .is-clB .aa-g-cl-b{opacity:1;transition:opacity var(--aa-t3) linear}
.aa-gates.is-live .aa-g-never::after{transform:scaleX(0)}
.aa-gates.is-live .is-never .aa-g-never::after{transform:none;transition:transform var(--aa-t3) var(--aa-draw)}
.aa-gates.is-live .aa-g-p{will-change:transform}
.aa-gates.is-live .aa-g-rp{cursor:pointer}
.aa-gates.is-sim,.aa-gates.is-sim *,.aa-gates.is-sim *::after{transition:none!important}

/* ---- tablet: the injected line may take two lines; notes tighten ---- */
@media (max-width:1100px){
  .aa-gates .aa-g-chk dd{font-size:13px;line-height:18px}
  .aa-gates .aa-g-h{font-size:12px}
  .aa-gates .aa-g-chk.is-1{white-space:normal;width:max-content;max-width:calc(var(--g2) - var(--g1) - 14px)}
  .aa-gates .aa-g-rules{top:64px;height:362px}
  .aa-gates .aa-g-wait{font-size:12px}
  .aa-gates .aa-g-out dd{font-size:13.5px}
}

/* ---- narrow (900 and below): four stacked lane blocks, gates as ticks on each lane, a gate key row on top ---- */
@media (max-width:900px){
  .aa-gates{--g1:calc(150 / 327 * 100%);--g2:calc(240 / 327 * 100%);--gp:calc(290 / 327 * 100%);--ly:22px;--tkh:20px;--tb:.45}
  .aa-gates .aa-g-stage{height:auto;padding-top:36px}
  .aa-gates .aa-g-checks,.aa-gates .aa-g-rules{left:0;right:16px;width:auto}
  .aa-gates .aa-g-checks{height:16px}
  .aa-gates .aa-g-chk,.aa-gates .aa-g-chk.is-1{translate:-50% 0;white-space:nowrap;max-width:none}
  .aa-gates .aa-g-chk dt{font-size:10px;letter-spacing:.04em}
  .aa-gates .aa-g-chk dd{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .aa-gates .aa-g-rules{top:24px;bottom:0;height:auto}
  .aa-gates .aa-g-rule{background:rgba(255,255,255,.14);-webkit-mask-image:none;mask-image:none} /* 14%, not 20%: the continuous lines pass behind text here */
  .aa-gates .aa-g-lanes{position:relative;top:auto;left:auto;right:auto}
  .aa-gates .aa-g-lane{height:auto;padding-bottom:32px}
  .aa-gates .aa-g-lane:last-child{padding-bottom:24px}
  .aa-gates .aa-g-call{position:static;width:auto;translate:none}
  .aa-gates .aa-g-track{position:relative;left:auto;top:auto;width:calc(100% - 16px);height:40px}
  .aa-gates .aa-g-m{left:calc(var(--g1) + 5px);top:calc(var(--ly) - 17px)}
  .aa-gates .aa-g-m.is-2{left:calc(var(--g2) + 5px)}
  .aa-gates .aa-g-cl,.aa-gates .aa-g-wait{position:static;margin:-4px 16px 6px 0;text-align:right}
  .aa-gates .aa-g-cl{justify-items:end}
  .aa-gates .aa-g-wait{font-size:12.5px}
  .aa-gates .aa-g-sp{position:absolute;width:1px;height:1px;max-width:none;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .aa-gates .aa-g-out{position:static;margin-top:4px}
  .aa-gates .aa-g-ceil{position:static;margin-top:18px}
  .aa-gates .aa-g-ceil li{display:block}
  .aa-gates .aa-g-ceil li:not(:last-child)::after{content:none}
  .aa-gates .aa-g-never::after{bottom:-1px}
  .aa-gates .aa-g-demo{position:static}
}

/* very narrow phones: the gate key labels hang outside their lines so they never meet */
@media (max-width:400px){
  .aa-gates .aa-g-chk.is-1{translate:calc(-100% - 6px) 0}
  .aa-gates .aa-g-chk.is-2{translate:6px 0}
}
@media (prefers-reduced-motion:reduce){
  .aa-gates *,.aa-gates *::after{transition:none!important}
}
@media (forced-colors:active){
  .aa-gates .aa-g-p,.aa-gates .aa-g-cred{display:none!important}
  .aa-gates .aa-g-rule,.aa-gates .aa-g-ln,.aa-gates .aa-g-tk,.aa-gates .aa-g-term,.aa-gates .aa-g-never::after{forced-color-adjust:none;background:CanvasText}
  .aa-gates [data-lane="2"] .aa-g-ln.is-d{background:repeating-linear-gradient(to right,CanvasText 0 2px,transparent 2px 6px)}
  .aa-gates .aa-g-m path{stroke:CanvasText}
  .aa-gates .aa-g-tag{box-shadow:none;border:1px solid CanvasText}
}

/* ---- the section around it: the grained Hawcx-blue field, used once on the page, light corner out of frame ---- */
.aa-gates-band{background:var(--field-blue,#0a3cb0);background-color:#0a3cb0;color:#fff} /* crisp: CSS colour field + 1:1 tiled grain (was an upscaled 1100px webp) */
/* narrower screens make the band taller than the width-driven image: size by height instead (anchored bottom-left, so the
   darker left of the field shows and the light corner stays out of frame); never tile */

.aa-gates-band .eyebrow{color:rgba(255,255,255,.85)}
.aa-gates-band .h2{color:#fff}
.aa-gates-band .h2 .dim{color:rgba(255,255,255,.7)}
.aa-gates-band .body{color:rgba(255,255,255,.92)}
.aa-gates-band .tlink{color:#fff}
.aa-gates-band :focus-visible{outline-color:#fff}
/* footer row (section copy, not part of the drawing): pull line in columns 1-6, closing line and link in columns 8-12 */
.aa-gates-foot{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:24px;margin-top:80px;align-items:end;color:#fff}
.aa-gates-foot .aa-gf-pull{grid-column:1 / span 6;font-family:var(--serif);font-weight:300;font-variation-settings:"opsz" 72;font-size:32px;line-height:38px;letter-spacing:-.015em}
.aa-gates-foot .aa-gf-close{grid-column:8 / span 5}
.aa-gates-foot .aa-gf-close p{font-size:16px;line-height:25px;color:rgba(255,255,255,.85)}
.aa-gates-foot .aa-gf-close p b{font-weight:500;color:#fff}
.aa-gates-foot .tlink{margin-top:16px;color:#fff}
@media (max-width:900px){
  .aa-gates-foot{grid-template-columns:1fr;row-gap:28px;margin-top:56px}
  .aa-gates-foot .aa-gf-pull,.aa-gates-foot .aa-gf-close{grid-column:1}
  .aa-gates-foot .aa-gf-pull{font-size:28px;line-height:34px}
}
