/* MATH — a Windows-shaped desk repainted in the poster's own two colours.
   Everything is derived from three values: paper, ink, ink-deep. */
:root {
  --paper:      #e9e7e8;
  --ink:        #2b26f2;
  --ink-deep:   #1a12a8;

  /* chrome, all mixed from the three above */
  --face:       #f3f2f3;   /* window body, a shade above paper */
  --face-hi:    #ffffff;
  --face-lo:    #d6d4dc;
  --line:       #b4b2c6;
  --text:       #16143a;
  --muted:      #5b5878;
  --link:       var(--ink-deep);
  --ok:         #1f7a4d;
  --warn:       #a8451f;

  --font-ui:    "Inter", Tahoma, Verdana, "Segoe UI", sans-serif;
  --font-title: "Inter", "Trebuchet MS", Tahoma, sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Times New Roman", Times, serif;
  --task-h:     34px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow: hidden;
  font-family: var(--font-ui); font-size: 12.5px; line-height: 1.5; color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
code, pre, kbd { font-family: var(--font-mono); font-size: .95em; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px; z-index: 999; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------- boot */
.boot { position: fixed; inset: 0; z-index: 100; background: var(--paper); color: var(--ink-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  cursor: pointer; transition: opacity .5s ease; }
.boot.is-off { opacity: 0; pointer-events: none; }
.boot .logo { text-align: center; }
.boot .logo img { display: block; width: min(300px, 62vw); height: auto; margin: 0 auto; }
.boot .logo small { display: block; font-size: 11px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.boot .prog { width: 190px; height: 8px; border: 1px solid var(--ink); position: relative; overflow: hidden; }
.boot .prog i { position: absolute; top: 1px; bottom: 1px; width: 44px; left: -50px; background: var(--ink);
  animation: boot-prog 1.3s linear infinite; }
.boot-log { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.8; color: var(--muted);
  white-space: pre-wrap; text-align: center; min-height: 3.6em; }
@keyframes boot-prog { to { left: 200px; } }

/* ------------------------------------------------------------- desk */
#wallpaper { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%;
  pointer-events: none; }
.desktop { position: relative; z-index: 1; height: calc(100vh - var(--task-h)); overflow: hidden; }

.topright { position: absolute; z-index: 5; right: 18px; top: 16px; display: flex; gap: 8px; align-items: center; }

/* ------------------------------------------------------------- icons */
.desk-icons { position: absolute; z-index: 3; left: 22px; top: 20px;
  display: grid; grid-template-columns: repeat(2, 96px); gap: 6px 4px; }
.icon { width: 96px; padding: 8px 4px 6px; text-align: center; cursor: default; user-select: none;
  text-decoration: none; color: var(--text); display: block; border: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
  animation: icon-in .45s ease both; }
.desk-icons .icon:nth-child(n) { animation-delay: calc(var(--i, 0) * .045s); }
@keyframes icon-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.icon .ico { display: block; height: 56px; margin: 0 auto 5px; }
.icon .ico svg { display: block; margin: 0 auto; width: 52px; height: 52px; image-rendering: pixelated;
  filter: drop-shadow(1px 2px 0 rgba(26,18,168,.18)); transition: transform .2s cubic-bezier(.34,1.5,.64,1); }
.icon span:last-child { display: inline-block; font-size: 11px; line-height: 1.25; padding: 2px 6px;
  font-family: var(--font-mono); letter-spacing: -.01em;
  background: rgba(233,231,232,.94); box-shadow: 0 0 0 1px rgba(233,231,232,.94); }
.icon:hover { background: rgba(43,38,242,.10); border-color: rgba(43,38,242,.35); }
.icon:hover .ico svg { transform: scale(1.1) rotate(-2deg); }
.icon.is-sel { background: rgba(43,38,242,.20); border-color: var(--ink); }
.icon.is-sel span:last-child { background: var(--ink); color: var(--paper); }
.desk-icons .icon.bin { grid-column: 2; margin-top: 12px; }

/* ------------------------------------------------------------- windows */
.windows { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.win {
  position: absolute; pointer-events: auto; display: flex; flex-direction: column; min-width: 0;
  background: var(--face);
  border: 1px solid var(--ink-deep);
  box-shadow: 2px 2px 0 rgba(26,18,168,.14), 0 10px 26px rgba(22,20,58,.13);
  transition: box-shadow .18s ease;
  animation: win-in .16s ease both;
}
@keyframes win-in { from { opacity: 0; transform: translateY(-6px) scale(.995); } to { opacity: 1; transform: none; } }
.win.is-active { box-shadow: 3px 3px 0 rgba(26,18,168,.24), 0 22px 54px rgba(22,20,58,.24); }
.win.is-closing { opacity: 0; transform: scale(.99); transition: opacity .15s ease, transform .15s ease; }
.win.is-min { display: none; }
.win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100%; }
.win.is-dragging { user-select: none; }

.win-bar { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 10px; height: 28px; flex: 0 0 28px;
  background: linear-gradient(180deg, #8a88ad 0%, #6a6890 100%);
  color: rgba(255,255,255,.82); font-family: var(--font-title); font-size: 12px; font-weight: 600;
  letter-spacing: .005em; cursor: default; transition: background .16s ease, color .16s ease; }
.win.is-active > .win-bar { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%); color: #fff; }
.win-bar > span:first-child { white-space: nowrap; }
.win-bar .stripes { flex: 1; height: 9px; margin: 0 4px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.30) 0 1px, transparent 1px 4px); }
.wb { width: 20px; height: 18px; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.14);
  color: #fff; font: 600 12px/1 var(--font-ui); cursor: pointer; padding: 0; }
.wb:hover { background: rgba(255,255,255,.30); }

.win-body { padding: 14px 16px; overflow: auto; max-height: min(66vh, 560px); }
.win-body.tight { padding: 0; }
.win.dark { background: #14123a; color: #dcdaf6; border-color: #000; }
.win.dark .win-body { background: #14123a; }
.win.dark a { color: #9d99ff; }
.win.dark code { color: #b8b4ff; }

/* ------------------------------------------------------------- typography inside windows */
.eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 8px; }
.h1 { font-family: var(--font-title); font-size: 25px; line-height: 1.15; letter-spacing: -.02em;
  margin: 0 0 10px; font-weight: 700; }
.small { font-size: 12px; margin: 0 0 9px; }
.big { font-family: var(--font-title); font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.math { font-family: var(--font-serif); font-size: 17px; font-style: italic; color: var(--ink-deep); margin: 0 0 10px; }
.quote { font-family: var(--font-serif); font-size: 19px; font-style: italic; line-height: 1.35;
  color: var(--ink-deep); margin: 0 0 12px; }
.thm { border-left: 2px solid var(--ink); padding: 0 0 0 11px; margin: 0 0 12px; }
.qed { font-family: var(--font-serif); }
.hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 250px; gap: 18px; }

.tip { background: rgba(43,38,242,.07); border: 1px solid rgba(43,38,242,.28); padding: 9px 11px;
  font-size: 12px; margin: 0 0 12px; }
.note { padding: 9px 11px; font-size: 12px; border: 1px solid var(--line); margin-top: 10px; }
.note.ok { border-color: rgba(31,122,77,.5); background: rgba(31,122,77,.08); }
.note.warn { border-color: rgba(168,69,31,.5); background: rgba(168,69,31,.08); }

.tag { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; padding: 2px 6px; border: 1px solid currentColor; }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.live { color: var(--ink); }

dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 12px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-family: var(--font-mono); word-break: break-word; }

.btn { font-family: var(--font-ui); font-size: 12px; font-weight: 600; padding: 6px 13px; cursor: pointer;
  background: var(--face); color: var(--ink-deep); border: 1px solid var(--ink-deep);
  box-shadow: 2px 2px 0 rgba(26,18,168,.25); transition: transform .1s ease, box-shadow .1s ease; }
.btn:hover { background: #fff; }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink-deep); }
.btn-primary:hover { background: var(--ink-deep); }
.btn-sm { padding: 4px 9px; font-size: 11px; }
.copy-btn { font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; margin-left: 6px; cursor: pointer;
  background: none; border: 1px solid var(--line); color: var(--muted); }
.copy-btn.is-done { color: var(--ok); border-color: var(--ok); }
.ca { font-family: var(--font-mono); font-size: 11px; word-break: break-all; }

.bar { height: 12px; border: 1px solid var(--ink-deep); background: rgba(255,255,255,.5); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s linear; }
.win.dark .bar { border-color: #5b56d8; background: rgba(255,255,255,.08); }
.win.dark .bar i { background: #6f69ff; }

.lamp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4a4780; margin-right: 6px;
  vertical-align: middle; }
.lamp.on { background: #6f69ff; box-shadow: 0 0 8px #6f69ff; }

.hashrow { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline; font-size: 11.5px; }
.hashrow code { word-break: break-all; }

.stepper { list-style: none; margin: 10px 0 0; padding: 0; font-size: 11.5px; }
.stepper li { padding: 3px 0 3px 20px; position: relative; color: var(--muted); }
.stepper li::before { content: '○'; position: absolute; left: 2px; }
.stepper li.step-active { color: var(--ink); } .stepper li.step-active::before { content: '◐'; }
.stepper li.step-done { color: var(--ok); } .stepper li.step-done::before { content: '●'; }
.stepper li.step-failed { color: var(--warn); } .stepper li.step-failed::before { content: '×'; }

.tabs { display: flex; gap: 2px; padding: 6px 8px 0; background: var(--face-lo); border-bottom: 1px solid var(--line); }
.tab { font: 600 11.5px var(--font-ui); padding: 5px 12px; cursor: pointer; background: transparent;
  border: 1px solid transparent; border-bottom: 0; color: var(--muted); }
.tab.is-on { background: var(--face); border-color: var(--line); color: var(--ink-deep); }

.tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; font-family: var(--font-mono); }
.tbl th { text-align: left; font-family: var(--font-ui); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 6px 10px; border-bottom: 1px solid rgba(180,178,198,.4); }
.tbl-wrap { overflow: auto; }

.plot { width: 100%; height: auto; border: 1px solid var(--line); background: #fff; display: block; }

/* ------------------------------------------------------------- taskbar */
.taskbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: var(--task-h);
  display: flex; align-items: center; gap: 6px; padding: 0 8px 0 0;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%);
  border-top: 1px solid rgba(255,255,255,.25); color: #fff; }
.start { font-family: var(--font-title); font-weight: 700; font-size: 13px; letter-spacing: .01em;
  height: 100%; padding: 0 18px 0 16px; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.14); border: 0; border-right: 1px solid rgba(255,255,255,.25); }
.start:hover { background: rgba(255,255,255,.26); }
.task-list { display: flex; gap: 4px; flex: 1; overflow: hidden; }
.task { font: 500 11.5px var(--font-ui); max-width: 165px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 4px 11px; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); }
.task.is-active { background: rgba(255,255,255,.30); }
.tray { display: flex; gap: 12px; align-items: center; font-family: var(--font-mono); font-size: 11px;
  color: rgba(255,255,255,.86); padding-left: 12px; border-left: 1px solid rgba(255,255,255,.22); }

.start-menu { position: fixed; z-index: 30; left: 0; bottom: var(--task-h); width: 268px;
  background: var(--face); border: 1px solid var(--ink-deep); box-shadow: 3px -3px 0 rgba(26,18,168,.22); }
.start-menu .side { padding: 13px 14px; background: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%); }
.start-menu .side img { display: block; width: 132px; height: auto; }
.start-menu .ico-list { padding: 6px; }
.start-menu a { display: flex; align-items: center; gap: 9px; padding: 6px 9px; text-decoration: none;
  color: var(--text); font-size: 12px; }
.start-menu a:hover { background: var(--ink); color: #fff; }
.start-menu a svg { width: 16px; height: 16px; flex: 0 0 16px; }
.start-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 8px; }

/* ------------------------------------------------------------- mobile */
@media (max-width: 760px) {
  .windows { position: static; }
  .win { position: relative !important; left: auto !important; top: auto !important;
    width: auto !important; margin: 10px; animation: none; }
  .desktop { height: auto; min-height: calc(100vh - var(--task-h)); overflow: auto; padding-bottom: 20px; }
  body { overflow: auto; }
  .desk-icons { position: static; margin: 14px 0 0 14px; grid-template-columns: repeat(3, 90px); }
  .two-col, .grid-2 { grid-template-columns: 1fr; }
  .topright { position: static; padding: 12px 14px 0; justify-content: flex-end; }
  .win-body { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ================================================================ polish */
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.win-body { scrollbar-width: thin; scrollbar-color: rgba(43,38,242,.45) transparent; }
.win-body::-webkit-scrollbar { width: 10px; height: 10px; }
.win-body::-webkit-scrollbar-track { background: transparent; }
.win-body::-webkit-scrollbar-thumb { background: rgba(43,38,242,.35); border: 3px solid transparent;
  background-clip: content-box; }
.win-body::-webkit-scrollbar-thumb:hover { background: rgba(43,38,242,.6); background-clip: content-box; }
.win.dark .win-body { scrollbar-color: rgba(157,153,255,.5) transparent; }

/* ---------------------------------------------------------------- math.exe */
.win-body.prover { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px;
  align-items: start; padding: 20px 22px 22px; }
.plate-fig { margin: 0; }
.plate-img { display: block; width: 340px; height: 424px; image-rendering: pixelated;
  background: var(--ink-deep); border: 1px solid var(--ink-deep);
  box-shadow: 3px 3px 0 rgba(26,18,168,.20); }
.plate-fig figcaption { margin-top: 9px; max-width: 340px; font-size: 11px; line-height: 1.55;
  color: var(--muted); }
.prover-text .quote { font-size: 23px; line-height: 1.28; margin-bottom: 6px; }
.prover-text .math { font-size: 18px; margin-bottom: 12px; }
.prover-text .small { margin-bottom: 10px; }

/* ------------------------------------------------------- the redacted line */
.redact { display: inline-block; margin: 0; font-family: var(--font-mono); font-size: 13px; }
.redact span { display: inline-block; padding: 3px 8px; background: var(--ink-deep); color: transparent;
  cursor: default; transition: background .45s cubic-bezier(.2,.7,.2,1), color .45s ease; }
.redact:hover span, .redact:focus-within span { background: rgba(43,38,242,.10); color: var(--text); }

/* ------------------------------------------------------------ TopSecret.exe
   Two printing plates that fall out of registration, then the image dissolves
   into the pixels it is made of. Everything below is a function of --g, which
   the script eases between 0 and 1, so the motion is reversible mid-flight. */
.icon.secret { position: absolute; z-index: 3; right: 46px; top: 44%; width: 104px;
  --g: 0; --d: 0; --j: 0; --dx1: 0; --dy1: 0; --dx2: 0; --dy2: 0; --tear: 30%; --tear2: 68%;
  border-color: transparent !important; background: none !important; }
.icon.secret { animation-delay: .55s; }
.icon.secret:hover { transform: none; }
.secret .ico { position: relative; width: 52px; height: 52px; margin: 0 auto 8px;
  opacity: calc(1 - var(--d));
  -webkit-mask-image: repeating-linear-gradient(to bottom,
    #000 0, #000 calc(3px * (1 - var(--d))), transparent calc(3px * (1 - var(--d))), transparent 3px);
  mask-image: repeating-linear-gradient(to bottom,
    #000 0, #000 calc(3px * (1 - var(--d))), transparent calc(3px * (1 - var(--d))), transparent 3px);
}
.secret .plate { position: absolute; left: 0; top: 0; width: 52px; height: 52px; }
.secret .plate svg { display: block; width: 52px; height: 52px;
  filter: drop-shadow(1px 2px 0 rgba(26,18,168,.18)); }
.secret .p1 { transform: translate(calc(var(--dx1) * 1px), calc(var(--dy1) * 1px)); }
.secret .p2 { transform: translate(calc(var(--dx2) * -1px), calc(var(--dy2) * -1px));
  mix-blend-mode: multiply; opacity: calc(.32 + var(--j) * .68); }
.secret .ico::before, .secret .ico::after {             /* two clean tears across the plate */
  content: ''; position: absolute; left: -8px; right: -8px; background: var(--paper);
  opacity: calc(var(--j) * .95); pointer-events: none;
}
.secret .ico::before { top: var(--tear);  height: calc(1px + var(--j) * 3px); }
.secret .ico::after  { top: var(--tear2); height: calc(1px + var(--j) * 2px); }
.secret .ghost {                                        /* the crop marks stay behind */
  position: absolute; left: 50%; top: 0; width: 60px; height: 60px; transform: translateX(-50%);
  border: 1px dashed var(--ink); opacity: calc(var(--d) * .5); pointer-events: none;
  transition: opacity .2s linear;
}
.secret .lbl { display: inline-block; font-family: var(--font-mono); font-size: 11px; line-height: 1.25;
  padding: 2px 6px; letter-spacing: -.01em; white-space: pre;
  background: rgba(233,231,232,.94); box-shadow: 0 0 0 1px rgba(233,231,232,.94);
  opacity: calc(1 - var(--g) * .8); }
.icon.secret.is-sel .lbl { background: var(--ink); color: var(--paper); box-shadow: none; }

@media (max-width: 760px) {
  .win-body.prover { grid-template-columns: 1fr; }
  .plate-img { width: 100%; max-width: 340px; height: auto; }
  .icon.secret { position: static; margin: 6px 0 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .secret .ico::before, .secret .ico::after { display: none; }
}


/* ---------------------------------------------------------------- the mark */
.icon .ico img.app { display: block; width: 52px; height: 52px; margin: 0 auto; border-radius: 10px;
  border: 1px solid var(--ink-deep); box-shadow: 1px 2px 0 rgba(26,18,168,.22);
  image-rendering: auto; transition: transform .2s cubic-bezier(.34,1.5,.64,1); }
.icon:hover .ico img.app { transform: scale(1.08) rotate(-2deg); }
.start-menu a img.app { width: 16px; height: 16px; border-radius: 4px; border: 0; box-shadow: none; }
.letterhead { display: block; width: 150px; height: auto; margin: 0 0 14px; }
@media (max-width: 760px) { .letterhead { width: 128px; } }


/* ------------------------------------------------------------ connect.exe */
.wallet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wallet-row { display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  border: 1px solid var(--line); background: var(--face-hi); }
.wallet-row .name { flex: 1; font-weight: 600; font-size: 12.5px; line-height: 1.35; }
.wallet-row .name .muted { font-weight: 400; font-size: 11px; }
.wallet-row.is-on { border-color: var(--ink); background: rgba(43,38,242,.06); }
.wicon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 6px; object-fit: contain;
  background: var(--face-lo); }
.wicon-blank { display: block; background:
  repeating-linear-gradient(45deg, var(--face-lo) 0 4px, var(--face) 4px 8px); }
.wallet-empty { padding: 14px 12px; border: 1px dashed var(--line); text-align: center; }

/* ================================================================== the door
   An ink field with the mark, a six-cell code, and the site's own two moves:
   a registration tear when it refuses, a pixel dissolve when it opens. */
html[data-locked] body { overflow: hidden; }
html[data-locked] .desktop,
html[data-locked] .taskbar,
html[data-locked] .boot,
html[data-locked] #wallpaper { visibility: hidden; }

.gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: var(--ink-deep); color: #fff; cursor: text; --d: 0;
  background-image:
    radial-gradient(120% 80% at 50% 0%, rgba(43,38,242,.85) 0%, rgba(26,18,168,0) 62%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 3px);
  -webkit-mask-image: repeating-linear-gradient(to bottom,
    #000 0, #000 calc(6px * (1 - var(--d))), transparent calc(6px * (1 - var(--d))), transparent 6px);
  mask-image: repeating-linear-gradient(to bottom,
    #000 0, #000 calc(6px * (1 - var(--d))), transparent calc(6px * (1 - var(--d))), transparent 6px);
}
.gate.is-open { opacity: calc(1 - var(--d) * .55); }

.gate-plate { position: relative; width: min(520px, 88vw); padding: 6px 4px; text-align: left;
  animation: gate-in .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes gate-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* crop marks, the same registration language as the wallpaper */
.gate-mark { position: absolute; inset: -26px -22px; pointer-events: none;
  background:
    linear-gradient(#fff,#fff) left top/22px 1px no-repeat,
    linear-gradient(#fff,#fff) left top/1px 22px no-repeat,
    linear-gradient(#fff,#fff) right top/22px 1px no-repeat,
    linear-gradient(#fff,#fff) right top/1px 22px no-repeat,
    linear-gradient(#fff,#fff) left bottom/22px 1px no-repeat,
    linear-gradient(#fff,#fff) left bottom/1px 22px no-repeat,
    linear-gradient(#fff,#fff) right bottom/22px 1px no-repeat,
    linear-gradient(#fff,#fff) right bottom/1px 22px no-repeat;
  opacity: .45; }

.gate-logo { display: block; width: 240px; height: auto; margin: 0 0 26px; }
.gate-head { margin: 0 0 10px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.gate-body { margin: 0 0 26px; font-size: 13px; line-height: 1.62; max-width: 44ch;
  color: rgba(255,255,255,.9); }

.gate-code { position: relative; display: flex; gap: 9px; }
.gate-code .cell { width: 46px; height: 58px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 22px; color: #fff;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.05);
  transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.gate-code .cell.is-on { border-color: rgba(255,255,255,.85); background: rgba(255,255,255,.12); }
.gate-code .cell.is-next { border-color: #fff; box-shadow: inset 0 -2px 0 #fff; }
.gate-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  border: 0; padding: 0; font-size: 16px; cursor: text; }
.gate-input:focus { outline: none; }

.gate-note { margin: 18px 0 0; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.55); }

/* refusal: the plate tears out of registration, then settles */
.gate.is-denied .gate-plate { animation: gate-shake .42s cubic-bezier(.36,.07,.19,.97) both; }
.gate.is-denied .gate-code .cell { border-color: #ff9f7a; background: rgba(255,159,122,.14); }
.gate.is-denied .gate-note { color: #ff9f7a; }
.gate.is-denied .gate-plate::before,
.gate.is-denied .gate-plate::after {
  content: ''; position: absolute; left: -30px; right: -30px; height: 2px;
  background: rgba(255,255,255,.9); animation: gate-tear .42s steps(3) both; }
.gate.is-denied .gate-plate::before { top: 32%; }
.gate.is-denied .gate-plate::after { top: 68%; animation-direction: reverse; }
@keyframes gate-shake {
  0% { transform: translateX(0); } 15% { transform: translateX(-9px); }
  32% { transform: translateX(7px); } 52% { transform: translateX(-5px); }
  74% { transform: translateX(3px); } 100% { transform: translateX(0); } }
@keyframes gate-tear { 0% { transform: translateX(-18px); opacity: .9; }
  100% { transform: translateX(16px); opacity: 0; } }

@media (max-width: 560px) {
  .gate-logo { width: 190px; }
  .gate-code .cell { width: 13vw; max-width: 46px; height: 52px; font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate-plate, .gate.is-denied .gate-plate { animation: none; }
  .gate.is-denied .gate-plate::before, .gate.is-denied .gate-plate::after { display: none; }
}
