/* Boundary-Aware Policy Learning: the entry screen (gate6.js).
   A computer gets a loading screen with the share of the page's media already fetched and a way to skip; a phone gets a note that the
   page reads best on a computer. Same vocabulary as the page: the cover's dark photograph, mono type, the white button with a black
   offset shadow, and the ownership bar (grey track, white segment, yellow handoff dot) as the progress bar. A large numeral
   over the bar. */

.gate { display: none; }
html.gate-on .gate { display: block; position: fixed; inset: 0; z-index: 1000; color: var(--text); font-family: var(--mono); }
.gate.is-out { opacity: 0; transition: opacity .45s var(--ease); pointer-events: none; }
.g-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(.3); }
.g-shade { position: absolute; inset: 0; background: rgba(20, 20, 20, .22); }
.g-in { position: relative; height: 100%; max-width: var(--wrap); margin: 0 auto; padding: 96px 32px 72px; display: flex; flex-direction: column; justify-content: center; }
/* the words come in after a moment, so that a visit with everything cached never shows them */
.g-in > * { animation: g-show .35s .3s both; }
@keyframes g-show { from { opacity: 0; } to { opacity: 1; } }
.g-brand { display: flex; align-items: center; gap: 10px; font: 700 var(--fs-17)/1.2 var(--mono); color: #fff; }
.g-brand img { width: 22px; height: 22px; }
.g-line { font: 500 var(--fs-17)/1.5 var(--mono); color: #fff; }
.g-line .g-ell::after { content: '…'; }
.g-sub { font: 400 var(--fs-15)/1.5 var(--mono); color: var(--muted); }
.g-mb { font: 500 var(--fs-13)/1.4 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-skip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.g-skip .btn { cursor: pointer; }
.g-note { font: 400 var(--fs-13)/1.45 var(--mono); color: var(--muted); }
.g-slow { font: 400 var(--fs-13)/1.45 var(--mono); color: var(--handoff); }
.g-slow[hidden] { display: none; }
.g-pct { font-variant-numeric: tabular-nums; }

/* the progress bar, drawn as the page's ownership bar: grey track, white loaded part, the yellow handoff dot at its front,
   and a small tick where each part of the page begins */
.g-bar { position: relative; height: 24px; background: var(--agent); border: 1.5px solid var(--agent-edge); border-radius: 4px; }
.g-fill { position: absolute; left: -1.5px; top: -1.5px; bottom: -1.5px; width: 0; background: #fff; border: 1.5px solid var(--policy-edge); border-radius: 4px; }
.g-bar.is-zero .g-fill { visibility: hidden; }
.g-dot { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--handoff); border: 1.5px solid #000; }
.g-tick { position: absolute; top: -10px; width: 1.5px; height: 6px; margin-left: -.75px; background: var(--muted); }
.gate.is-done .g-dot { display: none; }

/* a: one large numeral, the bar under it */
.gate-a .g-in { align-items: flex-start; }
.gate-a .g-pct { margin-top: 30px; font: 800 clamp(84px, min(11vw, 20vh), 176px)/.86 var(--mono); font-stretch: 84%; letter-spacing: -.02em; color: #fff; }
.gate-a .g-pct small { font-size: .42em; font-weight: 700; margin-left: .06em; color: var(--agent); }
.gate-a .g-bar { width: min(640px, 100%); margin-top: 34px; }
.gate-a .g-text { margin-top: 22px; display: grid; gap: 4px; }
.gate-a .g-skip { margin-top: 30px; }

/* the phone note */
.gate-phone .g-in { padding: 40px 24px 36px; justify-content: center; }
.g-ph-t { margin-top: 30px; font: 800 clamp(30px, 8.4vw, 40px)/1.02 var(--mono); font-stretch: 84%; color: #fff; }
.g-ph-b { margin-top: 18px; max-width: 34ch; font: 400 var(--fs-15)/1.55 var(--mono); color: #CFCFCF; }
.gate-phone .g-skip { margin-top: 30px; }
.gate-phone .btn { font-size: var(--fs-15); padding: 9px 16px; }
.btn.g-ghost { background: transparent; color: #fff; border-color: var(--agent-edge); box-shadow: none; }

@media (max-width: 700px) {
  .g-in { padding: 72px 20px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-in > * { animation: none; }
  .gate.is-out { transition: none; }
}
