/* =====================================================================
   pponzi.css: what p-Ponzi adds on top of the Loxley Partners workstation
   (terminal.css is that build's stylesheet, carried over). Loaded last, so
   where a rule here and a rule there disagree, this one is the p-Ponzi
   decision.
   ===================================================================== */

/* ------------------------------------------------------------------ *
   the room the monitor sits in
 * ------------------------------------------------------------------ */

body {
  background:
    radial-gradient(1100px 720px at 50% 40%, rgba(230, 207, 156, .06), transparent 62%),
    radial-gradient(1400px 420px at 50% 118%, rgba(230, 207, 156, .07), transparent 70%),
    linear-gradient(#0a0908, #040303 70%);
}
/* Loxley dimmed a 3D room behind the screen; here the screen is the page */
#terminal { background: transparent; }

/* ------------------------------------------------------------------ *
   the monitor: a machined housing with a chin
 * ------------------------------------------------------------------ */

.term-frame {
  padding: 13px 13px 44px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 9%),
    linear-gradient(180deg, #c8cac1 0%, #b6b8ae 46%, #a6a89e 100%);
  border: 1px solid #23241f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -2px 0 rgba(0, 0, 0, .22),
    inset 1px 0 0 rgba(255, 255, 255, .35),
    inset -1px 0 0 rgba(0, 0, 0, .18),
    0 2px 0 #6f7168,
    0 30px 80px rgba(0, 0, 0, .78),
    0 0 140px rgba(230, 207, 156, .07);
}
/* Loxley's engraved text line on the bezel gives way to the chin below */
.term-frame::before { content: none; }
/* the scanlines and vignette sit over the glass, wherever the glass now is */
.term-frame::after { inset: 13px 13px 44px; border-radius: 6px; opacity: .5; }

/* the screen is recessed into the housing, with a hairline of light along
   the top edge of the glass */
.term-screen {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #1a1b17, 0 0 0 2px #7d7f76, 0 0 0 3px #d4d6cd, inset 0 1px 0 rgba(255, 255, 255, .06);
  background: #050403;
}

.chin {
  position: absolute; left: 13px; right: 13px; bottom: 0; height: 44px;
  display: flex; align-items: center; gap: 18px; padding: 0 8px;
  pointer-events: none;
}
.chin-logo {
  font: 500 18px/1 var(--serif); letter-spacing: -.005em;
  color: #3a3d35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 -1px 0 rgba(0, 0, 0, .12);
}
.chin-logo b { font-weight: 600; color: #6a5626; }
/* the serial plate, engraved: tiny mono, wide tracking */
.chin-model {
  font: 500 8.5px var(--mono); letter-spacing: .34em; color: #5b5e55;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
/* the LED: off, on (gold, the one lit colour), busy while the self test
   runs, and a pulse each time a row lands on the tape */
.chin-led {
  margin-left: auto; width: 8px; height: 8px; border-radius: 50%;
  background: #35312a; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .5);
  transition: background .3s ease, box-shadow .3s ease;
}
.chin-led.on { background: #e6cf9c; box-shadow: 0 0 9px rgba(230, 207, 156, .9), inset 0 0 2px #fff6dc, 0 1px 0 rgba(255, 255, 255, .5); }
.chin-led.busy { animation: led .32s steps(1) infinite; }
.chin-led.on.pulse { animation: ledpulse .22s ease-out; }
@keyframes led { 50% { background: #4a4336; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .55); } }
@keyframes ledpulse { 0% { background: #fff6dc; box-shadow: 0 0 16px rgba(230, 207, 156, 1), inset 0 0 2px #fff; } }

/* the glass itself: one soft diagonal glare that drifts, above everything, taking no clicks */
.glass {
  position: absolute; inset: 0; z-index: 41; pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .018) 20%, transparent 36%),
    radial-gradient(130% 120% at 50% 46%, transparent 62%, rgba(0, 0, 0, .28) 100%);
  background-size: 110% 110%, 100% 100%;
  animation: glare 9s ease-in-out infinite alternate;
}
@keyframes glare { from { background-position: 0 0, 0 0; } to { background-position: 14px 6px, 0 0; } }

/* ------------------------------------------------------------------ *
   switching on: the tube draws a line, then opens up
 * ------------------------------------------------------------------ */

.crt-power { position: absolute; inset: 0; z-index: 47; pointer-events: none; background: #000; opacity: 0; }
.crt-power.on { opacity: 1; animation: crtfade .22s ease .16s forwards; }
.crt-power.on::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background: #fff6dc;
  box-shadow: 0 0 26px 6px rgba(230, 207, 156, .55), 0 0 3px #fff;
  transform: scaleX(0);
  animation: crtline .38s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes crtline {
  0%   { transform: scaleX(0) scaleY(1); opacity: 1; }
  45%  { transform: scaleX(1) scaleY(1); opacity: 1; }
  100% { transform: scaleX(1) scaleY(240); opacity: 0; }
}
@keyframes crtfade { to { opacity: 0; } }

/* ------------------------------------------------------------------ *
   the self test. The first frame is the page the monitor in the room
   shows (a canvas, the same painter); it dims and the POST types over
   it, big enough to own the top third of the screen, with a scanline
   sweeping while the counts run.
 * ------------------------------------------------------------------ */

.term-boot { padding: 0; background: #050403; color: #e8dcc0; text-shadow: 0 0 6px rgba(230, 207, 156, .3); white-space: normal; }
.term-boot.off { cursor: pointer; }
.term-boot::after { content: none; }
.boot-page { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .45s ease; }
.boot-page.dim { opacity: .16; }
/* the block owns the top-left; a soft scrim under it keeps the page's big
   figure from showing through the count */
.boot-post {
  position: absolute; inset: 0; padding: 44px 56px; overflow: hidden; opacity: 0;
  font: 15px/1.7 var(--mono); white-space: pre; font-variant-numeric: tabular-nums;
  background: radial-gradient(760px 520px at 14% 22%, rgba(5, 4, 3, .92), rgba(5, 4, 3, .55) 55%, transparent 78%);
}
.boot-post.on, .term-boot.off .boot-post { opacity: 1; }
.boot-post .bln { min-height: 1.7em; }
.boot-post .bh { color: #fff6dc; }
.boot-post .bd { color: rgba(232, 220, 192, .55); }
.boot-caret { display: inline-block; font-style: normal; color: var(--accent); margin-left: 1px; animation: tcaret 1.02s steps(1) infinite; }
.boot-sweep {
  position: absolute; left: 0; right: 0; top: -2px; height: 2px; pointer-events: none;
  background: rgba(255, 246, 220, .55); box-shadow: 0 0 12px 2px rgba(230, 207, 156, .35);
  opacity: 0;
}
.boot-sweep.go { animation: bootsweep 1.2s linear 2; }
@keyframes bootsweep { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(calc(770px)); opacity: .7; } }
.term-boot.off .boot-post { color: rgba(232, 220, 192, .9); }

/* ------------------------------------------------------------------ *
   windows
 * ------------------------------------------------------------------ */

.win.opening { animation: winopen .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes winopen { from { opacity: 0; transform: translateY(10px) scale(.982); } }

/* where the figures come from, said in every window header: live is the
   lit colour, the specimen is a warning, a dead feed is red */
.tsub.s-live { color: var(--accent); }
.tsub.s-demo { color: #e0a44a; }
.tsub.s-stale { color: #ff8f73; }

/* the type, retuned for the real faces */
.tbig { font: 400 44px/1.02 var(--serif); letter-spacing: -.022em; }
.tsay, .tnote, .ptn, .trules li { font-family: var(--serif); }
.tsay { font-size: 15px; line-height: 1.5; }
.ptn { font-size: 13.5px; }
.os-wordmark { font-family: var(--serif); font-weight: 300; letter-spacing: -.035em; }

/* ------------------------------------------------------------------ *
   the pot
 * ------------------------------------------------------------------ */

/* one plain sentence off the snapshot, ticking */
.pot-line {
  margin: 0 0 16px; max-width: 54ch;
  font: 400 15px/1.5 var(--serif); color: var(--dim);
}
.pot-line [data-since] { color: var(--ink); font-variant-numeric: tabular-nums; }
.pot-ca {
  display: flex; align-items: baseline; gap: 10px; margin: -6px 0 16px; min-width: 0;
  font: 10px var(--mono); color: var(--faint);
}
.pot-ca > span { letter-spacing: .18em; text-transform: uppercase; font-size: 9px; }
.pot-ca em { font-style: normal; color: var(--dim); }
.pot-ca button { display: flex; align-items: baseline; gap: 8px; min-width: 0; color: var(--ink); padding: 0; }
.pot-ca button i { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pot-ca button b { font-weight: 400; color: var(--accent); border-bottom: 1px solid rgba(230, 207, 156, .4); }
.pot-ca button:hover b { color: #fff; }
.os.compact .tray-ca { display: none; }
.pot-hero .ptv {
  font-size: clamp(42px, 9cqi, 66px); letter-spacing: -.03em;
  text-shadow: 0 0 32px rgba(230, 207, 156, .32);
}
.pot-hero .ptv em { font-size: .3em; letter-spacing: .16em; margin-left: 6px; }
.potchart { margin: 16px 0 2px; }
.potchart svg { display: block; width: 100%; height: 54px; }
.potchart rect { fill: rgba(230, 207, 156, .36); }
.potchart rect.now { fill: var(--accent); filter: drop-shadow(0 0 4px rgba(230, 207, 156, .7)); }
.potchart .base { stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.potchart-l {
  display: flex; justify-content: space-between; gap: 10px; margin-top: 7px;
  font: 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}

/* the pot's figures: three across once the window can take it */
@container program (min-width: 430px) {
  .cells.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* a figure that just changed catches the light for a moment */
.cv.flash, .ptv.flash { animation: flash 1s ease; }
@keyframes flash { 0% { color: #fff6dc; text-shadow: 0 0 16px rgba(255, 227, 154, .95); } }

/* ------------------------------------------------------------------ *
   the levels, the position, the tape
 * ------------------------------------------------------------------ */

.lafter { font-size: 9.5px; color: var(--faint); letter-spacing: .06em; margin-left: 4px; }
.rung.me .lafter { color: rgba(230, 207, 156, .7); }

.pos-look { margin: 10px 0 18px; }
.pos-look button[data-act="connect"] { color: var(--accent); border: 1px solid rgba(230, 207, 156, .35); padding: 7px 10px; }
.pos-look button[data-act="connect"]:hover { color: #fff; border-color: var(--accent); }
.pos-look button[type="submit"] { color: var(--ink); border: 1px solid var(--line); padding: 7px 10px; }

.payroll-notice { margin-top: 22px; }
.payroll-notice .teye { display: block; }
.notice-title { font-family: var(--serif) !important; font-weight: 400 !important; letter-spacing: -.015em; }
.notice-comparison strong { font-family: var(--serif) !important; font-weight: 400 !important; }
.notice-comparison small { color: var(--faint); letter-spacing: .1em; text-transform: uppercase; font-size: 9.5px; }

.tp[data-wallet] { cursor: pointer; }
.tp[data-wallet]:hover { background: rgba(230, 207, 156, .05); }
.tpa a { color: var(--faint); text-decoration: none; margin-left: 6px; }
.tpa a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ *
   the taskbar: the coin address, one click to copy
 * ------------------------------------------------------------------ */

.tray-ca {
  display: flex; align-items: baseline; gap: 5px; white-space: nowrap;
  font: 11px var(--os-ui); color: var(--os-ink); padding: 0 2px; cursor: pointer;
}
.tray-ca b { font-weight: 400; color: var(--os-dim); }
.tray-ca i { font-style: normal; font-family: var(--mono); font-size: 10.5px; }
.tray-ca:disabled { cursor: default; }
.tray-ca:not(:disabled):hover i { text-decoration: underline; }

/* ------------------------------------------------------------------ *
   sizes
 * ------------------------------------------------------------------ */

/* The monitor is drawn at 1240 x 770 and scaled as one piece to the
   screen (--ts, set by app.js from the viewport; --tin is the entrance,
   .99 off and 1 on, or .40 to 1 rising out of the desk in the room,
   world.css). Type under a static transform stays crisp, and the window
   manager converts the pointer, so a 2000px monitor gets 18px figures
   instead of 13. */
.term-frame { transform: scale(calc(var(--ts, 1) * var(--tin, .99))); }
#terminal.in .term-frame { transform: scale(var(--ts, 1)); }
@media (max-width: 719px), (max-height: 460px) {
  .term-frame { padding: 5px 5px 30px; border-radius: 6px; }
  .term-frame::after { inset: 5px 5px 30px; }
  .chin { left: 5px; right: 5px; height: 30px; gap: 10px; }
  .chin-logo { font-size: 14px; }
  .chin-model { display: none; }
  .tbig { font-size: 36px; }
  .boot-post { padding: 22px 18px; font-size: 12px; white-space: pre-wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .win.opening, .tp.fresh, .cv.flash, .ptv.flash, .chin-led.busy, .chin-led.on.pulse, .glass, .boot-caret, .boot-sweep.go { animation: none; }
  .crt-power.on { animation: none; opacity: 0; }
  .crt-power.on::before { animation: none; }
  .boot-page { transition: none; }
}
