/* DIPSIEGE landing: a trading terminal laid over the vector-CRT canvas.
   Layout: fixed terminal (tape · price-line progress · stage with a horizontal track of 5 stops · live rail · status bar).
   Tokens come from /shared/base.css (APP). Owner: LANDING. */

:root {
  --tape-h: 30px;
  --pb-h: 48px;
  --status-h: 30px;
  --rail-w: 344px;
  --band-h: 300px;
  --cap-h: 64px;
  --stop-pad: 30px;
  --pb-pad: 30px;
  --panel-a: rgba(11, 15, 20, .93);
}
@media (max-width: 1099px) { :root { --rail-w: 0px; } }
@media (max-width: 640px) { :root { --tape-h: 28px; --pb-h: 42px; --status-h: 0px; --stop-pad: 16px; --pb-pad: 18px; --cap-h: 56px; } }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

body.landing { height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
body.landing.has-mbar { padding-bottom: 0; }
.crt { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 0; display: block; max-width: none; touch-action: none; }

/* ── the terminal frame ───────────────────────────────── */
.term {
  position: fixed; z-index: 1; left: 0; right: 0;
  top: calc(var(--nav-h) + var(--banner-h)); bottom: var(--mbar-h);
  display: grid; grid-template-rows: var(--tape-h) var(--pb-h) minmax(0, 1fr) var(--status-h);
  outline: none;
}
.term-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); min-height: 0; }

/* ticker tape */
.tape { display: flex; align-items: stretch; min-width: 0; overflow: hidden; border-bottom: 1px solid var(--line); background: rgba(5, 7, 10, .88); font-size: 12px; }
.tape-k { flex: none; display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--line); color: var(--amber); font-weight: 600; letter-spacing: .12em; font-size: 11px; }
.tape-run { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.tape-inner { display: inline-flex; white-space: nowrap; will-change: transform; animation: ds-tape 46s linear infinite; }
.tape:hover .tape-inner { animation-play-state: paused; }
.tape-item { display: inline-flex; align-items: baseline; gap: 8px; padding: 0 20px; border-right: 1px solid var(--line); }
.tape-item b { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.tape-item .px { color: var(--muted); }
.tape-item .up { color: var(--green); } .tape-item .down { color: var(--red-ink); }
.tape-item .sells { color: var(--dim); font-size: 11px; }
.tape-src { flex: none; display: flex; align-items: center; padding: 0 12px; border-left: 1px solid var(--line); color: var(--dim); font-size: 11px; white-space: nowrap; }
@keyframes ds-tape { to { transform: translateX(-50%); } }

/* price line = progress bar + stop nav */
.pricebar { position: relative; border-bottom: 1px solid var(--line); background: rgba(5, 7, 10, .78); }
.pb-svg { position: absolute; left: var(--pb-pad); top: 3px; width: calc(100% - 2 * var(--pb-pad)); height: 24px; max-width: none; overflow: visible; }
.pb-svg path { fill: none; vector-effect: non-scaling-stroke; stroke-width: 1.6; stroke-linejoin: miter; }
.pb-base { stroke: var(--line-2); }
.pb-red { stroke: var(--red); filter: drop-shadow(0 0 3px rgba(255, 45, 61, .55)); }
.pb-green { stroke: var(--green); filter: drop-shadow(0 0 3px rgba(34, 255, 136, .55)); }
.pb-grid line { stroke: var(--line); vector-effect: non-scaling-stroke; stroke-dasharray: 2 3; }
.pb-head { position: absolute; left: var(--pb-pad); top: 14px; display: flex; align-items: center; gap: 6px; transform: translate(-3.5px, -50%); pointer-events: none; will-change: transform; }
.pb-dot { width: 7px; height: 7px; background: var(--red); box-shadow: 0 0 8px rgba(255, 45, 61, .8); }
.pb-head.up .pb-dot { background: var(--green); box-shadow: 0 0 8px rgba(34, 255, 136, .8); }
.pb-val { font-size: 10.5px; font-weight: 600; color: var(--red-ink); background: rgba(5, 7, 10, .9); padding: 0 3px; }
.pb-head.up .pb-val { color: var(--green); }
.pb-head.flip { flex-direction: row-reverse; transform: translate(calc(-100% + 3.5px), -50%); }
.pb-stops { list-style: none; margin: 0; padding: 0; position: absolute; left: var(--pb-pad); right: var(--pb-pad); bottom: 1px; height: 20px; }
.pb-stops li { position: absolute; left: var(--x); transform: translateX(-50%); }
.pb-stops li:first-child { transform: translateX(-4px); }
.pb-stops li:last-child { transform: translateX(calc(-100% + 4px)); }
.pb-stops button {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 4px; border: 0; border-radius: var(--r); background: transparent; cursor: pointer;
  font: 600 11px/1.2 var(--mono); letter-spacing: .06em; color: var(--muted); white-space: nowrap; text-transform: uppercase;
}
.pb-stops button b { color: var(--dim); font-weight: 600; }
.pb-stops button:hover { color: var(--ink); }
.pb-stops button:hover b { color: var(--ink); }
.pb-stops button[aria-current="step"] { color: var(--ink); }
.pb-stops button[aria-current="step"] b { color: var(--amber); text-shadow: var(--glow-a); }
/* stop names only when they fit: time-only below 1180 px; main.js also measures and sets .compact if any two labels touch */
@media (max-width: 1179px) { .pb-stops button span { display: none; } }
.pricebar.compact .pb-stops button span { display: none; }
.pb-stops button span { overflow: hidden; text-overflow: ellipsis; }

/* ── stage + horizontal track ─────────────────────────── */
.stage { position: relative; min-width: 0; min-height: 0; }
.track {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
}
.track::-webkit-scrollbar { display: none; }
.track.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
@media (pointer: coarse) {
  .track { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .stop { scroll-snap-align: start; scroll-snap-stop: always; }
}
.stop {
  flex: 0 0 100%; width: 100%; height: 100%; min-width: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain;
  display: flex; flex-direction: column; padding: 0 var(--stop-pad) 18px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.band { position: relative; flex: none; height: var(--band-h); pointer-events: none; }
.band-cap { position: absolute; left: 0; top: 12px; display: grid; gap: 3px; pointer-events: auto; }
.band-t { font: 600 12px/1 var(--mono); letter-spacing: .14em; color: var(--green); }
.band-t.r { color: var(--red-ink); } .band-t.a { color: var(--amber); } .band-t.g { color: var(--green); }
.band-cap h2 { font-size: clamp(19px, 2.3vw, 30px); line-height: 1; }
.band-sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.band-word { display: none; }
html.no-gl .band-word {
  display: block; position: absolute; left: 0; right: 0; top: var(--cap-h); bottom: 0; display: grid; place-items: center;
  font: 900 clamp(40px, 11vw, 150px)/1 var(--display); font-stretch: 125%; color: var(--green); text-shadow: var(--glow-g); letter-spacing: .02em;
}
html.no-gl .band-word b { color: var(--red); text-shadow: var(--glow-r); }
html.no-gl .stop:not(:first-child) .band { height: calc(var(--cap-h) + 12px); }

.stage-arrow {
  position: absolute; z-index: 3; top: calc(var(--cap-h) + (var(--band-h) - var(--cap-h)) / 2); transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: rgba(5, 7, 10, .75); color: var(--ink); cursor: pointer; transition: opacity .2s, border-color .12s, color .12s;
}
.stage-arrow svg { width: 16px; height: 16px; }
.stage-arrow:hover { border-color: var(--green); color: var(--green); }
.stage-arrow.prev { left: 6px; } .stage-arrow.next { right: 6px; }
.stage-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .stage-arrow { width: 30px; height: 30px; } .stage-arrow.prev { left: 2px; } .stage-arrow.next { right: 2px; } }

/* ── stop grids + panels ──────────────────────────────── */
.grid { display: grid; gap: 12px; align-content: start; flex: none; }
.term .panel { background: var(--panel-a); }
.panel-b > :last-child { margin-bottom: 0; }
/* colour accents are scoped (.r is also the base table's right-align class) */
.formula span.g, .top5 .g, .p-shards .g { color: var(--green); }
.waves-note .a, .p-shards .a { color: var(--amber); }
.ticks { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 9px; font-size: 13px; line-height: 1.5; }
.ticks li { position: relative; padding-left: 16px; color: var(--muted); }
.ticks li b { color: var(--ink); font-weight: 600; }
.ticks li b.g { color: var(--green); } .ticks li b.a { color: var(--amber); }
.ticks li::before { content: '›'; position: absolute; left: 0; color: var(--green); }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.panel-b .link-row { padding: 12px 0 0; }

/* 00:00 */
.g-open { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr); }
.brief-lead { font: 900 clamp(20px, 1.9vw, 30px)/1.02 var(--display); font-stretch: 125%; text-transform: uppercase; margin: 2px 0 10px; letter-spacing: .005em; }
.brief-lead .r { color: var(--red); text-shadow: var(--glow-r); }
.brief-body { font-size: 13px; color: var(--muted); line-height: 1.6; }
.brief-body b { color: var(--ink); font-weight: 600; } .brief-body b.g { color: var(--green); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.p-launch .ds-countdown.big .c b { font-size: clamp(24px, 2.6vw, 34px); }
.launch-ca { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.launch-ca .ds-ca-addr { font-size: 12px; }

/* 02:00 */
.g-horde { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
.timeline-list { list-style: none; margin: 0; padding: 10px 14px 4px; display: grid; gap: 7px; font-size: 13px; }
.timeline-list li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; color: var(--muted); line-height: 1.45; }
.timeline-list b { color: var(--ink); font-weight: 600; }
.tl-t { color: var(--green); font-weight: 600; font-size: 12px; padding-top: 1px; }
.tl-t.r { color: var(--red-ink); } .tl-t.a { color: var(--amber); } .tl-t.g { color: var(--green); }
.horde-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 14px; }
.bulls { list-style: none; margin: 0; padding: 6px 0; }
.bulls li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.bulls li:last-child { border-bottom: 0; }
.bulls svg { width: 40px; height: 40px; fill: none; stroke: var(--amber); stroke-width: 1.7; stroke-linecap: square; filter: drop-shadow(0 0 4px rgba(255, 181, 71, .35)); }
.bulls b { display: block; font: 900 15px/1.1 var(--display); font-stretch: 125%; text-transform: uppercase; color: var(--ink); }
.bulls span { font-size: 12.5px; color: var(--muted); }
.waves { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.waves li { display: grid; grid-template-columns: 28px 48px 1fr 64px; gap: 8px; align-items: center; font-size: 13px; }
.waves .w { color: var(--dim); font-size: 11px; }
.waves .s { color: var(--ink); font-weight: 600; }
.waves .bar { height: 8px; background: var(--panel-2); border: 1px solid var(--line); position: relative; }
.waves .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); box-shadow: 0 0 8px rgba(255, 45, 61, .45); }
.waves .v { text-align: right; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.waves-note { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* 05:00 */
.g-margin { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.steps { list-style: none; counter-reset: st; margin: 0; padding: 10px 14px 14px; display: grid; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.steps li { counter-increment: st; position: relative; padding-left: 32px; }
.steps li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: 1px; color: var(--amber); font-weight: 600; font-size: 12px; }
.steps b { color: var(--ink); font-weight: 600; }
.hashcheck {
  margin: 0 0 12px; padding: 10px 12px; min-height: 152px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
  font: 400 12px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted);
}
.hashcheck .k { color: var(--dim); }
.hashcheck .v { color: var(--ink); }
.hashcheck .ok { color: var(--green); text-shadow: var(--glow-g); font-weight: 600; }
.hashcheck .am { color: var(--amber); }
.formula { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 2px 0 12px; font-size: 14px; color: var(--ink); }
.formula span { padding: 3px 7px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); }
.formula span.g { border-color: rgba(34, 255, 136, .4); }
.formula i { font-style: normal; color: var(--dim); }

/* 08:00 */
.g-breaker { grid-template-columns: minmax(0, 1fr); }
.p-rules { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.p-rules .panel-h { grid-column: 1 / -1; }
.p-rules .ticks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 22px; }
.p-rules .link-row { padding: 12px 14px; }
@media (max-width: 1100px) { .p-rules { grid-template-columns: 1fr; } .p-rules .ticks { grid-template-columns: 1fr; } .p-rules .link-row { padding: 0 14px 14px; } }
.flow { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.flow li { position: relative; display: grid; align-content: start; gap: 4px; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); min-width: 0; }
.flow li:not(:last-child)::after { content: '→'; position: absolute; right: -18px; top: 26px; color: var(--amber); font-size: 14px; }
.flow li:nth-child(3) { border-color: rgba(255, 45, 61, .45); }
.flow li:last-child { border-color: rgba(34, 255, 136, .4); }
.f-k { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.flow b { font: 900 14px/1.1 var(--display); font-stretch: 125%; text-transform: uppercase; color: var(--ink); }
.f-d { font-size: 12px; color: var(--muted); line-height: 1.45; }
.f-d code { font-size: 11px; }
.f-v { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-2); font-size: 13px; font-weight: 600; color: var(--amber); overflow-wrap: anywhere; }
.f-v small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.f-v.g { color: var(--green); } .f-v.r { color: var(--red-ink); } .f-v.i { color: var(--ink); }

/* 10:00 */
.g-close { grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, 1.1fr); }
.top5 td, .top5 th { padding: 7px 8px; white-space: nowrap; }
.top5 .ch { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
.top5 tbody tr { cursor: pointer; }
.top5 .rank { font-weight: 600; }
.top5 tr.top1 td { color: var(--ink); }
.top5 tr.top1 .sh { color: var(--green); text-shadow: var(--glow-g); }
.top5 .sh { color: var(--amber); font-weight: 600; }
.play-lead { font: 900 clamp(16px, 1.4vw, 20px)/1.1 var(--display); font-stretch: 125%; text-transform: uppercase; margin-bottom: 12px; }
.play-big { width: 100%; min-height: 60px; font-size: 18px; margin-bottom: 10px; }
.play-big svg { width: 20px; height: 20px; }
.p-ca .ds-ca { gap: 8px; }
.p-ca .link-row { padding: 12px 0 0; }
.ca-note { margin: 10px 0 0; }
.close-foot { flex: none; margin-top: 14px; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.legal { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); max-width: 130ch; }
.legal b { color: var(--ink); font-weight: 600; }

/* ── live rail ────────────────────────────────────────── */
.rail { display: grid; grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr); min-height: 0; border-left: 1px solid var(--line); background: rgba(5, 7, 10, .9); }
@media (max-width: 1099px) { .rail { display: none; } }
.rail .panel { border: 0; border-radius: 0; background: transparent; display: flex; flex-direction: column; min-height: 0; }
.rail .book { border-bottom: 1px solid var(--line); }
.book-note { margin: 0; padding: 7px 14px; font-size: 11px; color: var(--dim); border-bottom: 1px solid var(--line); }
.book-head, .book-rows li { display: grid; grid-template-columns: 58px minmax(0, 1fr) 70px 46px 48px; gap: 6px; align-items: baseline; padding: 0 14px; }
.book-head { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding-top: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.book-head .r, .book-rows .r { text-align: right; }
.book-rows { list-style: none; margin: 0; padding: 0; overflow: hidden; flex: 1; min-height: 0; font-size: 12px; }
.book-rows li { position: relative; padding-top: 5px; padding-bottom: 5px; border-bottom: 1px solid var(--line); cursor: pointer; font-variant-numeric: tabular-nums; }
.book-rows li:hover { background: var(--panel-2); }
.book-rows li a { position: absolute; inset: 0; z-index: 1; }
.book-rows li a:focus-visible { outline-offset: -2px; }
.book-rows .t { color: var(--dim); }
.book-rows .w { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-rows .w.guest { color: var(--dim); }
.book-rows .c { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-rows .s { color: var(--muted); }
.book-rows .s.bell { color: var(--green); }
.book-rows .sh { color: var(--amber); font-weight: 600; }
.book-rows li.bid .sh { color: var(--green); }
.book-rows li.fresh { animation: ds-row 1.8s ease-out; }
@keyframes ds-row { from { background: rgba(34, 255, 136, .14); } to { background: transparent; } }
.book-rows li .depth { position: absolute; right: 0; top: 0; bottom: 0; background: rgba(255, 181, 71, .06); pointer-events: none; }
.news-rows { list-style: none; margin: 0; padding: 0; overflow: hidden; flex: 1; min-height: 0; font-size: 12px; }
.news-rows li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 7px 14px; border-bottom: 1px solid var(--line); line-height: 1.45; color: var(--muted); }
.news-rows li .t { color: var(--dim); font-variant-numeric: tabular-nums; }
.news-rows li b { color: var(--ink); font-weight: 600; }
.news-rows li .up { color: var(--green); } .news-rows li .down { color: var(--red-ink); } .news-rows li .am { color: var(--amber); }
.news-rows li.fresh { animation: ds-row 1.8s ease-out; }

/* rail panels moved into stops (≤ 1099px) */
.slot:empty { display: none; }
.slot { margin-top: 12px; flex: none; }
.slot .panel { display: flex; flex-direction: column; }
.slot .book-rows li:nth-child(n + 8), .slot .news-rows li:nth-child(n + 6) { display: none; }

/* ── status bar ───────────────────────────────────────── */
.status {
  display: flex; align-items: center; gap: 16px; min-width: 0; padding: 0 14px; border-top: 1px solid var(--line);
  background: rgba(5, 7, 10, .92); font-size: 11.5px; white-space: nowrap; overflow: hidden; color: var(--muted);
}
.status > * { flex: none; }
.st-mode { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.st-stop b { color: var(--amber); }
.st-stop #st-name { color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.st-keys kbd { font-size: 10px; padding: 0 4px; margin-right: 2px; }
.st-legal { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; color: var(--dim); }
.st-snd { flex: none; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: 600 10.5px/1 var(--mono); letter-spacing: .1em; padding: 4px 7px; border-radius: var(--r); cursor: pointer; }
.st-snd b { color: var(--dim); font-weight: 600; }
.st-snd[aria-pressed="true"] { border-color: var(--green); color: var(--ink); }
.st-snd[aria-pressed="true"] b { color: var(--green); }
@media (max-width: 1280px) { .st-keys { display: none; } }
@media (max-width: 860px) { .st-legal, .st-clock { display: none; } .status { justify-content: space-between; } }
@media (max-width: 640px) { .status { display: none; } }

/* ── responsive stop grids ────────────────────────────── */
@media (max-width: 1360px) {
  .flow { gap: 18px; padding: 12px; }
  .flow li:not(:last-child)::after { right: -15px; }
}
@media (max-width: 1240px) {
  .g-open { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .g-open .p-launch { grid-column: 1 / -1; }
  .g-horde, .g-margin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .g-horde .p-how, .g-margin .p-verify { grid-row: span 2; }
  .g-close { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .g-close .p-top { grid-row: span 2; }
}
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 10px; }
  .flow li { grid-template-columns: 1fr auto; column-gap: 12px; }
  .flow li > * { grid-column: 1; }
  .flow li .f-v { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; padding: 0 0 0 12px; border-top: 0; border-left: 1px dashed var(--line-2); text-align: right; }
  .flow li:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -15px; transform: translateX(-50%); font-size: 12px; }
}
@media (max-width: 760px) {
  .g-open, .g-horde, .g-margin, .g-breaker, .g-close { grid-template-columns: minmax(0, 1fr); }
  .g-horde .p-how, .g-margin .p-verify, .g-close .p-top { grid-row: auto; }
  .g-open .p-launch { grid-column: auto; }
  .hashcheck { min-height: 0; }
  .top5 .hide-sm { display: none; }
}

/* ── the gate ─────────────────────────────────────────── */
.gate { display: none; }
html.gate-on .gate {
  display: grid; position: fixed; inset: 0; z-index: 80; grid-template-rows: auto 1fr auto auto; justify-items: center;
  padding: 16px var(--gutter) calc(18px + env(safe-area-inset-bottom)); pointer-events: none;
}
html.gate-on .term, html.gate-on #nav, html.gate-on .ds-mbar, html.gate-on .ds-preview, html.gate-on .ds-drawer { visibility: hidden; }
.gate > * { pointer-events: auto; }
.gate-top { justify-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 11.5px; letter-spacing: .12em; color: var(--muted); }
.gate-word { font: 900 18px/1 var(--display); font-stretch: 125%; color: var(--ink); letter-spacing: .02em; }
.gate-word b { color: var(--red); font-weight: 900; }
.gate-status { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); }
.gate-btn {
  position: fixed; left: 50%; top: 50%; width: 220px; height: 160px; transform: none; border: 0; padding: 0; margin: 0;
  background: transparent; border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent; color: transparent;
}
.gate-btn:focus-visible { outline: 1px dashed var(--green); outline-offset: 10px; }
.gate-btn-fallback { display: none; }
html.no-gl .gate-btn {
  position: static; align-self: center; width: min(58vw, 240px); height: auto; aspect-ratio: 1; border: 3px solid var(--red); background: #2a0509;
  box-shadow: 0 0 12px rgba(255, 45, 61, .4), inset 0 -10px 0 rgba(0, 0, 0, .35); transition: transform .06s;
}
html.no-gl .gate-btn:active, html.no-gl .gate-btn.down { transform: translateY(6px) scale(.98); box-shadow: 0 0 12px rgba(255, 45, 61, .4); }
html.no-gl .gate-btn-fallback { display: grid; place-items: center; color: #FFE3E6; font: 900 64px/0.9 var(--display); font-stretch: 125%; }
html.no-gl .gate-btn-fallback small { font-size: 22px; }
.gate-under { grid-row: 3; text-align: center; display: grid; gap: 8px; transition: opacity .25s; }
.gate-cta { margin: 0; font: 600 12.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.gate-cta b { color: var(--ink); }
.gate-arrow { display: inline-block; color: var(--red); margin-right: 4px; animation: ds-blink 1.2s steps(1) infinite; }
.gate-keys { margin: 0; font-size: 12px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.gate-skip { background: none; border: 0; padding: 4px 2px; color: var(--muted); font: inherit; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; cursor: pointer; }
.gate-skip:hover { color: var(--ink); }
.gate-foot { grid-row: 4; margin: 14px 0 0; font: 900 clamp(14px, 2vw, 20px)/1.1 var(--display); font-stretch: 125%; text-transform: uppercase; color: var(--dim); letter-spacing: .02em; text-align: center; }
html.gate-opening .gate-under, html.gate-opening .gate-foot, html.gate-opening .gate-top { opacity: 0; transition: opacity .2s; }
.gate-open-msg {
  position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none; z-index: 81;
  font: 900 clamp(34px, 8vw, 96px)/1 var(--display); font-stretch: 125%; color: var(--green); text-shadow: var(--glow-g); letter-spacing: .02em;
  opacity: 0;
}
html.gate-opening .gate-open-msg { opacity: 1; }

/* the terminal powering on after the gate */
html.powering .term { animation: ds-term-on .5s ease-out both; }
@keyframes ds-term-on { from { opacity: 0; } 30% { opacity: .4; } 45% { opacity: .15; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .tape-run { overflow-x: auto; scrollbar-width: none; }
  .tape-inner { animation: none; }
  html.powering .term { animation: none; }
}
.gate-status { white-space: nowrap; }
@media (max-width: 480px) {
  .gate-top { font-size: 10.5px; letter-spacing: .08em; }
  .gate-word { font-size: 15px; }
  .gate-cta { font-size: 11.5px; letter-spacing: .1em; }
}
@media (pointer: coarse) { .gate-keys kbd, .gate-keys .or { display: none; } }
@media (max-width: 640px) {
  .tape-src { display: none; }
  .tape-k { padding: 0 8px; font-size: 10px; letter-spacing: .08em; }
  .tape-item { padding: 0 14px; }
  .tape-item .sells { display: none; }
}
html.no-gl .stage-arrow { top: 30px; }
.hashcheck .r { color: var(--red-ink); }
/* phone sound toggle (the status bar is hidden there) */
.snd-fab { display: none; }
@media (max-width: 640px) {
  .snd-fab {
    display: grid; place-items: center; position: absolute; z-index: 3; right: 10px; top: 12px; width: 34px; height: 34px;
    border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(5, 7, 10, .75); color: var(--muted); cursor: pointer;
  }
  .snd-fab svg { width: 18px; height: 18px; }
  .snd-fab .w { display: none; }
  .snd-fab[aria-pressed="true"] { color: var(--green); border-color: rgba(34, 255, 136, .5); }
  .snd-fab[aria-pressed="true"] .w { display: inline; }
  .snd-fab[aria-pressed="true"] .x { display: none; }
}
/* phones: the stop arrows sit in the caption row (next to the sound button) so the word gets the full band width */
@media (max-width: 640px) {
  .stage-arrow { top: 12px; transform: none; width: 34px; height: 34px; }
  .stage-arrow.prev { left: auto; right: 94px; }
  .stage-arrow.next { right: 52px; }
  .band-cap { right: 134px; }
  .band-cap h2 { font-size: 20px; }
}
@media (max-width: 640px) { .band-sub { font-size: 10px; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.stage-arrow[disabled] { visibility: hidden; transition: none; }
.top5 td.empty { white-space: normal; }
