/* v22 (../uwagi/uwagi-wlasciciela-v22.md: "na pobierz dmg na stronie powinien byc kod / haslo"). Loaded last. One component, the
   invite-code panel .gate-p: in the dialog #gate (gate.js) over the page, and alone on the Worker's page /os/download (no JS needed).
   One plain panel in the closing's material (the shell, --r-slab corners), its field the closing's old e-mail field (v11 .zk-form:
   --cmd ground, --cmd-line outline, --r-field corners) with the light pill of .zk-go. Only tokens of site.css; the one new value is the
   backdrop's shade. Nothing else on the page changes. */

/* ── 1. the dialog: no frame of its own, the panel is the dialog ── */
.gate{box-sizing:border-box;width:min(440px,100% - 32px);max-width:none;max-height:calc(100% - 32px);margin:auto;padding:0;border:0;background:transparent;color:var(--tx2);overflow:visible}
.gate::backdrop{background:rgba(20,19,18,.46)}
.gate:focus{outline:none}

/* ── 2. the panel ── */
.gate-p{position:relative;display:block;margin:0;padding:34px 32px 28px;border-radius:var(--r-slab);background:var(--shell);color:var(--tx2);box-shadow:0 30px 80px -24px rgba(0,0,0,.5)}
.gate-t{margin:0 44px 0 0;font:500 1.5rem/1.25 var(--sans);letter-spacing:-.014em;color:var(--tx)}
.gate-d{margin:10px 0 0;font:var(--body);color:var(--tx2);text-wrap:pretty}
.gate-l{display:block;margin:26px 0 8px;font:500 .8125rem/1.2 var(--sans);color:var(--tx2)}
.gate-f{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;height:60px;padding:10px 10px 10px 18px;
  border-radius:var(--r-field);background:var(--cmd);box-shadow:inset 0 0 0 1px var(--cmd-line)}
.gate-f:focus-within{box-shadow:inset 0 0 0 1px var(--dim)}
/* 16 px: Safari on a phone does not zoom into the field */
.gate-in{min-width:0;margin:0;padding:8px 0;border:0;border-radius:0;background:transparent;font:400 1rem/1.4 var(--sans);color:var(--tx);caret-color:var(--tx);outline:none;-webkit-appearance:none;appearance:none}
.gate-in:focus-visible{outline:none}
.gate-go{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:0;border-radius:999px;background:var(--tx);color:var(--screen);
  font:500 .9375rem/1 var(--sans);white-space:nowrap;cursor:pointer;transition:background var(--t-ui) ease-out}
.gate-go:hover{background:#fff}
.gate-p[data-gate-busy] .gate-go{opacity:.7;cursor:default}
.gate-p .gate-go:focus-visible{border-radius:999px}
/* the line of the message is kept from the start, so an error moves nothing under it */
.gate-err{min-height:1.5em;margin:10px 0 0;font:var(--small);color:var(--red)}
.gate-more{margin:4px 0 0;font:var(--small);color:var(--tx2);text-wrap:pretty}
.gate-more a{color:var(--tx);text-decoration:underline;text-decoration-color:var(--track);text-decoration-thickness:1px;text-underline-offset:.25em;transition:text-decoration-color var(--t-ui) ease-out}
.gate-more a:hover{text-decoration-color:currentColor}
.gate-x{position:absolute;top:18px;right:18px;display:grid;place-items:center;width:44px;height:44px;border-radius:999px;color:var(--dim);text-decoration:none;cursor:pointer;
  transition:color var(--t-ui) ease-out,background-color var(--t-ui) ease-out}
.gate-x:hover{color:var(--tx);background:rgba(255,255,255,.08)}
.gate-x svg{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.gate-p :focus-visible{outline-color:var(--tx)}
.gate-p .gate-x:focus-visible{border-radius:999px}
/* on a phone the field and the button stand one under the other, the button outside the field (no frame around a frame) */
@media (max-width:640px){
  .gate-p{padding:28px 20px 22px}
  .gate-x{top:12px;right:12px}
  .gate-f,.gate-f:focus-within{grid-template-columns:minmax(0,1fr);gap:12px;height:auto;padding:0;border-radius:0;background:none;box-shadow:none}
  .gate-in{box-sizing:border-box;height:52px;padding:0 16px;border-radius:var(--r-field);background:var(--cmd);box-shadow:inset 0 0 0 1px var(--cmd-line)}
  .gate-in:focus{box-shadow:inset 0 0 0 1px var(--dim)}
  .gate-go{width:100%;height:52px;border-radius:var(--r-field)}
  .gate-p .gate-go:focus-visible{border-radius:var(--r-field)}
}
@media (prefers-reduced-motion:reduce){.gate-go,.gate-x,.gate-more a{transition:none}}

/* ── 3. the Worker's page /os/download (without JS, or a direct visit): the same panel in the middle of the paper ── */
.gate-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:16px}
.gate-main{width:min(440px,100%)}
