/* ==========================================================================
   przm design system
   terminal-grade: hairlines, corner ticks, dense type, no frosted glass
   ========================================================================== */

:root {
  --bg:        #04060a;
  --panel:     #080b11;
  --panel-2:   #0a0e15;
  --raise:     #0d1219;
  --hair:      rgba(255,255,255,0.085);
  --hair-2:    rgba(255,255,255,0.045);
  --grid:      rgba(255,255,255,0.028);

  --ink:       #d7dfe9;
  --ink-hi:    #ffffff;
  --mid:       #8d9aab;
  --dim:       #5b6878;
  --faint:     #3b4553;

  --long:      #2fe3a8;
  --short:     #ff5545;
  --amber:     #ffb648;
  --blue:      #4da3ff;
  --violet:    #9b8cff;

  --bar:       44px;
  --rail:      340px;
  --r:         4px;
  --edge:      18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-weight: 300; font-size: 12px; line-height: 1.55;
  letter-spacing: 0.015em; font-variant-numeric: tabular-nums;
  padding-top: env(safe-area-inset-top, 0px);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: rgba(47,227,168,0.25); }

/* thin scrollbars, terminal style */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 0; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- background field ---------- */
canvas.field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4,6,10,0.92) 0%, rgba(4,6,10,0.55) 26%, rgba(4,6,10,0.72) 70%, rgba(4,6,10,0.96) 100%),
    radial-gradient(120vw 70vh at 50% 0%, rgba(47,227,168,0.05), transparent 60%);
}
.stage { position: relative; z-index: 2; }

/* ---------- micro type ---------- */
.lbl { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.lbl-hi { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mid); }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--long); } .down { color: var(--short); }
.muted { color: var(--dim); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 40; height: var(--bar);
  display: flex; align-items: center; gap: 14px; padding: 0 var(--edge);
  background: rgba(6,8,13,0.92); border-bottom: 1px solid var(--hair);
}
.bar .brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink-hi); }
.bar .brand svg { display: block; }
.bar .wordmark { font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; }
.bar .div { width: 1px; height: 16px; background: var(--hair); }
.bar .mod { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mid); }
.bar .spacer { flex: 1; }
.bar .tick { display: inline-flex; align-items: baseline; gap: 8px; font-size: 11px; }
.bar .tick .s { color: var(--mid); letter-spacing: 0.12em; }
.bar .tick .p { color: var(--ink-hi); transition: color .4s ease; }
.bar .tick .p.f-up { color: var(--long); } .bar .tick .p.f-down { color: var(--short); }

.kbtn {
  font: inherit; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--mid); background: transparent; border: 1px solid var(--hair);
  padding: 6px 10px; border-radius: var(--r); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.kbtn:hover { color: var(--ink-hi); border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.03); }
.kbtn kbd { font: inherit; font-size: 9px; color: var(--faint); border: 1px solid var(--hair); border-radius: 2px; padding: 1px 4px; }
.kbtn.on { color: var(--ink-hi); border-color: rgba(47,227,168,0.45); }

.pip { width: 5px; height: 5px; border-radius: 50%; background: var(--long); box-shadow: 0 0 8px var(--long); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .28 } }

/* ---------- panels ---------- */
.panel {
  position: relative; background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--hair); border-radius: var(--r);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 7px; height: 7px; pointer-events: none;
  border-color: rgba(255,255,255,0.22); border-style: solid; border-width: 0;
}
.panel::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.panel::after { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }
.panel > .head {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px;
  border-bottom: 1px solid var(--hair-2);
}
.panel > .head .spacer { flex: 1; }
.panel > .body { padding: 14px 12px; }

.gridlines {
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* ---------- controls ---------- */
.seg { display: inline-flex; border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; }
.seg button {
  font: inherit; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
  background: transparent; border: 0; border-right: 1px solid var(--hair-2); padding: 6px 10px; cursor: pointer;
  transition: color .16s ease, background .16s ease;
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { color: var(--ink-hi); background: rgba(255,255,255,0.055); }
.seg button:hover { color: var(--ink-hi); }

.chip {
  font: inherit; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  background: transparent; border: 1px solid var(--hair); border-radius: var(--r);
  padding: 5px 9px; cursor: pointer; transition: color .16s ease, border-color .16s ease;
}
.chip i { width: 5px; height: 5px; border: 1px solid currentColor; }
.chip[aria-pressed="true"] { color: var(--ink-hi); }
.chip[aria-pressed="true"] i { background: currentColor; }
.chip:hover { border-color: rgba(255,255,255,0.22); }

input.fld, select.fld {
  font: inherit; font-size: 11px; color: var(--ink-hi); background: var(--raise);
  border: 1px solid var(--hair); border-radius: var(--r); padding: 7px 10px; outline: none;
}
input.fld:focus, select.fld:focus { border-color: rgba(47,227,168,0.5); }
input.fld::placeholder { color: var(--faint); }

.btn {
  font: inherit; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-hi);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r);
  padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 9px;
  transition: border-color .2s ease, background .2s ease;
}
.btn:hover { border-color: var(--long); background: rgba(47,227,168,0.07); }
.btn.quiet { color: var(--mid); border-color: var(--hair); background: transparent; }
.btn.quiet:hover { color: var(--ink-hi); border-color: rgba(255,255,255,0.25); background: transparent; }

.tag { font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; padding: 3px 6px; border: 1px solid; border-radius: 2px; }
.tag.live { color: var(--long); border-color: rgba(47,227,168,0.4); }
.tag.soon { color: var(--dim); border-color: var(--hair); }
.tag.call { color: var(--long); border-color: rgba(47,227,168,0.35); }
.tag.put  { color: var(--short); border-color: rgba(255,85,69,0.35); }

/* ---------- launcher drawer ---------- */
.veil { position: fixed; inset: 0; z-index: 60; background: rgba(2,3,6,0.72); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.veil.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); z-index: 61;
  background: var(--panel); border-left: 1px solid var(--hair);
  transform: translateX(102%); transition: transform .32s cubic-bezier(.2,.75,.2,1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer .dhead { height: var(--bar); display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--hair); }
.drawer .dbody { flex: 1; overflow-y: auto; padding: 8px 0 30px; }
.drawer .group { padding: 16px 14px 6px; }
.mrow {
  width: 100%; display: grid; grid-template-columns: 22px 1fr auto; gap: 11px; align-items: center;
  padding: 9px 14px; background: transparent; border: 0; border-left: 2px solid transparent;
  font: inherit; font-size: 11px; color: var(--ink); text-align: left; cursor: pointer; text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.mrow:hover { background: rgba(255,255,255,0.035); border-left-color: var(--long); }
.mrow.here { background: rgba(47,227,168,0.06); border-left-color: var(--long); }
.mrow svg { display: block; color: var(--mid); }
.mrow .sub { display: block; font-size: 9px; color: var(--faint); letter-spacing: 0.06em; }

/* ---------- command palette ---------- */
.pal { position: fixed; inset: 0; z-index: 70; display: none; padding-top: 14vh; justify-content: center; background: rgba(2,3,6,0.7); }
.pal.on { display: flex; }
.palbox { width: min(560px, 92vw); height: max-content; background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; }
.palbox input {
  width: 100%; font: inherit; font-size: 13px; color: var(--ink-hi); background: transparent;
  border: 0; border-bottom: 1px solid var(--hair); padding: 15px 16px; outline: none;
}
.palbox .res { max-height: 46vh; overflow-y: auto; }
.pres {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  background: transparent; border: 0; font: inherit; font-size: 11px; color: var(--ink); text-align: left; cursor: pointer;
}
.pres[aria-selected="true"] { background: rgba(255,255,255,0.055); }
.pres .k { font-size: 9px; color: var(--faint); letter-spacing: 0.16em; margin-left: auto; text-transform: uppercase; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px); z-index: 80;
  background: var(--raise); border: 1px solid rgba(47,227,168,0.4); border-radius: var(--r);
  padding: 10px 16px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-hi);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- data table ---------- */
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th {
  font-weight: 400; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim);
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--hair); position: sticky; top: 0; background: var(--panel);
}
table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--hair-2); font-size: 11px; white-space: nowrap; }
table.tbl tr.hot td { background: rgba(47,227,168,0.05); }
table.tbl tr.hot.put td { background: rgba(255,85,69,0.05); }
table.tbl tbody tr:hover td { background: rgba(255,255,255,0.04); }
table.tbl .r { text-align: right; }

.meter { margin-bottom: 14px; }
.meter .t { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); }
.meter .track { height: 2px; background: rgba(255,255,255,0.08); position: relative; margin: 8px 0 6px; }
.meter .track i { position: absolute; top: 0; bottom: 0; transition: width .9s cubic-bezier(.2,.75,.2,1); }
.meter .n { font-size: 9px; color: var(--faint); }

@media (max-width: 900px) {
  :root { --edge: 12px; }
  .bar { gap: 10px; }
  .hide-sm { display: none !important; }
}

/* ==========================================================================
   neon module icons
   ========================================================================== */
.ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; position: relative; }
.ico svg { position: relative; z-index: 1; color: var(--ic); filter: drop-shadow(0 0 5px var(--ic)); }
.ico svg [stroke] { stroke: var(--ic); }
.ico::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: radial-gradient(circle, var(--ic), transparent 68%);
  opacity: 0.16; animation: icoPulse 3.4s ease-in-out infinite;
}
.mrow:nth-child(odd) .ico::after { animation-delay: .7s; }
.mrow:nth-child(3n) .ico::after { animation-delay: 1.4s; }
@keyframes icoPulse { 0%,100% { opacity: .1; transform: scale(.86) } 50% { opacity: .34; transform: scale(1.1) } }
.mrow:hover .ico svg { filter: drop-shadow(0 0 9px var(--ic)); }
.card .ico, .mod .ico { width: 22px; height: 22px; }

/* ==========================================================================
   prism cursor
   ========================================================================== */
.prismcur {
  position: fixed; top: 0; left: 0; width: 24px; height: 24px; z-index: 95;
  pointer-events: none; mix-blend-mode: screen; opacity: .55;
  transition: opacity .3s ease, filter .3s ease;
}
.prismcur svg { width: 100%; height: 100%; display: block; }
.prismcur.hot { opacity: 1; filter: drop-shadow(0 0 10px rgba(47,227,168,0.75)); }
@media (pointer: coarse) { .prismcur { display: none; } }

/* ==========================================================================
   nyse style ticker
   ========================================================================== */
.tkwrap { position: relative; overflow: hidden; border-bottom: 1px solid var(--hair); background: rgba(3,5,9,0.72); height: 30px; }
.tkwrap::before, .tkwrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 2; pointer-events: none;
}
.tkwrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.tkwrap::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.tkroll { display: inline-flex; gap: 26px; white-space: nowrap; padding: 0 20px; height: 30px; align-items: center; animation: roll 62s linear infinite; }
@keyframes roll { to { transform: translateX(-50%); } }
.tkwrap:hover .tkroll { animation-play-state: paused; }
.tk { display: inline-flex; align-items: baseline; gap: 8px; font-size: 10px; letter-spacing: 0.06em; transition: background .5s ease; padding: 2px 4px; }
.tk b { font-weight: 400; color: var(--ink-hi); letter-spacing: 0.16em; text-transform: uppercase; }
.tk span { color: var(--mid); }
.tk i { font-style: normal; font-size: 9px; }
.tk.flash { background: rgba(255,255,255,0.07); }

/* ==========================================================================
   delta panel + layout menu
   ========================================================================== */
.deltawrap { flex: none; border-top: 1px solid var(--hair); position: relative; height: 92px; }
.deltawrap .dhead2 { position: absolute; z-index: 3; top: 6px; left: 12px; display: flex; gap: 14px; align-items: center; pointer-events: none; }
.leg { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.leg i { width: 10px; height: 2px; display: inline-block; }
#delta { position: absolute; inset: 0; }
@media (max-width: 900px) { .deltawrap { height: 80px; } }

.pop { position: absolute; right: var(--edge); top: calc(var(--bar) + 44px); z-index: 45; width: 218px; display: none; }
.pop.on { display: block; }
.pop .body { padding: 8px 0; }
.pop label { display: flex; align-items: center; gap: 9px; padding: 7px 12px; font-size: 11px; color: var(--ink); cursor: pointer; }
.pop label:hover { background: rgba(255,255,255,0.04); }
.pop input { accent-color: #2fe3a8; }

/* ==========================================================================
   bias readout: ring + spectrum
   ========================================================================== */
.biaswrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring .arc { transition: stroke-dasharray 1.1s cubic-bezier(.2,.75,.2,1); filter: drop-shadow(0 0 6px rgba(47,227,168,0.55)); }
.ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ring .mid b { font-weight: 200; font-size: 26px; line-height: 1; }
.ring .mid b i { font-style: normal; font-size: 12px; color: var(--dim); }
.ring .mid span { font-size: 8px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); }
.biasside { flex: 1; min-width: 190px; }
.verdictline { font-weight: 200; font-size: 22px; line-height: 1.2; }
.spectrum { position: relative; height: 6px; margin: 14px 0 8px; border-radius: 1px;
  background: linear-gradient(90deg, #ff5545 0%, #ff7a4d 22%, #ffb648 40%, #d8e26a 52%, #2fe3a8 72%, #38f0c2 100%);
  opacity: 0.88; }
.spectrum .mark { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.9);
  transition: left 1.1s cubic-bezier(.2,.75,.2,1); }
.spectrumkey { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }
.biasnote { margin-top: 12px; font-size: 11px; color: var(--mid); line-height: 1.7; }

/* ==========================================================================
   the reveal: noise collapsing into one line
   ========================================================================== */
.reveal-stage { position: relative; min-height: 300px; overflow: hidden; }
.noisegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px 12px; padding: 16px 14px; transition: filter .5s ease; }
.noisegrid .nr { font-size: 10px; color: rgba(255,255,255,0.22); white-space: nowrap; transition: opacity .55s ease, transform .75s cubic-bezier(.4,0,.2,1), color .4s ease; }
.noisegrid .nr.keep { color: var(--ink); }
.revealed .noisegrid .nr { opacity: 0; transform: translate3d(var(--dx,0), var(--dy,0), 0) scale(.85); }
.revealed .noisegrid .nr.keep { opacity: .6; transform: none; }
.answer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  opacity: 0; transform: scale(.96); pointer-events: none; transition: opacity .6s ease .45s, transform .6s ease .45s; text-align: center; padding: 0 16px; }
.revealed .answer { opacity: 1; transform: none; }
.answer .big { font-weight: 200; font-size: clamp(22px, 3.4vw, 36px); }
.answer .sm { font-size: 11px; color: var(--mid); max-width: 42ch; line-height: 1.75; }
.collapse {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4;
  font: inherit; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-hi);
  background: rgba(8,11,17,0.9); border: 1px solid rgba(47,227,168,0.45); border-radius: var(--r); padding: 10px 18px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px; transition: opacity .3s ease, box-shadow .3s ease;
}
.collapse:hover { box-shadow: 0 0 26px rgba(47,227,168,0.24); }
.collapse::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--long); box-shadow: 0 0 9px var(--long); animation: pulse 2s ease-in-out infinite; }
.revealed .collapse { opacity: 0; pointer-events: none; }
.again { position: absolute; right: 12px; bottom: 12px; z-index: 5; opacity: 0; transition: opacity .4s ease .7s; }
.revealed .again { opacity: 1; }

/* ==========================================================================
   pricing builder
   ========================================================================== */
.builder { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 12px; margin-top: 26px; }
.builder .opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--hair-2); cursor: pointer; }
.builder .opt:hover { background: rgba(255,255,255,0.03); }
.builder .opt input { accent-color: #2fe3a8; }
.builder .opt .n { font-size: 11px; }
.builder .opt .d { font-size: 10px; color: var(--dim); }
.builder .opt .spacer { flex: 1; }
.builder .opt .p { font-size: 10px; color: var(--mid); }
.total { position: sticky; top: calc(var(--bar) + 12px); }
.total .amt { font-weight: 200; font-size: 40px; line-height: 1; margin-top: 10px; }
.total .per { font-size: 10px; color: var(--dim); letter-spacing: 0.18em; text-transform: uppercase; }
.total ul { list-style: none; margin: 14px 0 0; padding: 0; }
.total li { display: flex; justify-content: space-between; font-size: 10px; color: var(--mid); padding: 4px 0; border-bottom: 1px solid var(--hair-2); }
@media (max-width: 860px) { .builder { grid-template-columns: 1fr; } .total { position: static; } }

/* ==========================================================================
   the mark, quietly alive
   ========================================================================== */
.pmark { overflow: visible; }
.pmark .p-out { stroke-dasharray: 36; stroke-dashoffset: 0; animation: markDraw 9s ease-in-out infinite; }
.pmark .p-ray { transform-origin: 8px 8px; animation: rayPulse 4.2s ease-in-out infinite; filter: drop-shadow(0 0 3px rgba(47,227,168,0.8)); }
.pmark .p-orbit { transform-origin: 8px 8px; animation: markSpin 16s linear infinite; opacity: .45; }
.pmark .p-split { transform-origin: 8px 8px; animation: splitFade 4.2s ease-in-out infinite; }
@keyframes markDraw { 0%, 62% { stroke-dashoffset: 0; } 78% { stroke-dashoffset: 36; } 100% { stroke-dashoffset: 72; } }
@keyframes rayPulse { 0%, 100% { transform: scaleX(.5); opacity: .55; } 45% { transform: scaleX(1); opacity: 1; } }
@keyframes markSpin { to { transform: rotate(360deg); } }
@keyframes splitFade { 0%, 100% { opacity: .18 } 50% { opacity: .55 } }
.brand:hover .pmark .p-orbit { animation-duration: 3.4s; opacity: .8; }
.brand:hover .pmark .p-ray { animation-duration: 1.2s; }
@media (prefers-reduced-motion: reduce) { .pmark * { animation: none !important; } }

/* ==========================================================================
   page + panel motion, site wide
   ========================================================================== */
body.booting .stage { opacity: 0; transform: translateY(8px); }
.stage { transition: opacity .55s cubic-bezier(.2,.75,.2,1), transform .55s cubic-bezier(.2,.75,.2,1); }
.bar { animation: slideDown .5s cubic-bezier(.2,.75,.2,1) both; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } }

.panel { transition: border-color .25s ease, transform .25s cubic-bezier(.2,.75,.2,1), box-shadow .25s ease; }
.panel::before, .panel::after { transition: border-color .25s ease, width .25s ease, height .25s ease; }
.panel:hover::before, .panel:hover::after { width: 11px; height: 11px; border-color: rgba(47,227,168,0.55); }

.btn, .kbtn, .chip, .quietlink { transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .25s ease; }
.btn:active, .kbtn:active, .chip:active { transform: translateY(1px); }
.seg button { position: relative; }
.seg button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 3px; height: 1px; background: var(--long);
  box-shadow: 0 0 8px var(--long); animation: growIn .3s ease both;
}
@keyframes growIn { from { transform: scaleX(0); } }

.block, .card, .mod, .meter { animation: blockIn .5s cubic-bezier(.2,.75,.2,1) both; }
.block:nth-child(2) { animation-delay: .05s } .block:nth-child(3) { animation-delay: .1s }
.block:nth-child(4) { animation-delay: .15s } .block:nth-child(5) { animation-delay: .2s }
@keyframes blockIn { from { opacity: 0; transform: translateY(10px); } }
.grid .card:nth-child(2n) { animation-delay: .06s } .grid .card:nth-child(3n) { animation-delay: .12s }
.grid .card:nth-child(4n) { animation-delay: .18s }

.tblwrap tr, table.tbl tbody tr { transition: background .2s ease; }
.ev, .lead { transition: background .2s ease, padding-left .2s ease; }
.ev:hover { padding-left: 4px; }
@media (prefers-reduced-motion: reduce) {
  .stage, .bar, .block, .card, .mod, .meter { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   the collapse, mobile safe
   ========================================================================== */
.reveal-stage { min-height: clamp(300px, 44vh, 360px); }
.noisegrid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.noisegrid .nr { transition: opacity .5s ease, transform .85s cubic-bezier(.45,0,.15,1), color .35s ease, filter .4s ease; }
.revealed .noisegrid .nr { opacity: 0; transform: translate3d(var(--dx,0), var(--dy,0), 0) scale(.6); filter: blur(2px); }
.revealed .noisegrid .nr.keep { opacity: .55; transform: none; filter: none; }
.scanline {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px; z-index: 3; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--long), transparent);
  box-shadow: 0 0 22px rgba(47,227,168,0.8);
}
.revealed .scanline { animation: scan .85s cubic-bezier(.4,0,.2,1) .25s both; }
@keyframes scan { 0% { opacity: 0; transform: scaleX(.2) } 30% { opacity: 1; transform: scaleX(1) } 100% { opacity: 0; transform: scaleX(1) } }
@media (max-width: 700px) {
  .reveal-stage { min-height: clamp(330px, 56vh, 420px); }
  .noisegrid { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 12px 10px; gap: 2px 8px; }
  .noisegrid .nr { font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
  .answer { padding: 0 10px; }
  .answer .sm { font-size: 10px; }
  .collapse { bottom: 10px; font-size: 8px; padding: 9px 14px; }
}

/* ==========================================================================
   the mark, quietly alive
   ========================================================================== */
.prizm-mark { overflow: visible; }
.prizm-mark .dia { transform-origin: 8px 8px; animation: markTurn 16s ease-in-out infinite; }
.prizm-mark .split { opacity: .32; animation: markSplit 4.6s ease-in-out infinite; }
.prizm-mark .ray-in { opacity: .5; stroke-dasharray: 8; stroke-dashoffset: 8; animation: markIn 4.6s ease-in-out infinite; }
.prizm-mark .ray { opacity: 0; stroke-dasharray: 9; stroke-dashoffset: 9; }
.prizm-mark .r1 { animation: markOut 4.6s ease-in-out infinite .55s; }
.prizm-mark .r2 { animation: markOut 4.6s ease-in-out infinite .68s; }
.prizm-mark .r3 { animation: markOut 4.6s ease-in-out infinite .81s; }
@keyframes markTurn { 0%, 68% { transform: rotate(0deg) } 88%, 100% { transform: rotate(90deg) } }
@keyframes markSplit { 0%, 40% { opacity: .18 } 55% { opacity: .75 } 80%, 100% { opacity: .18 } }
@keyframes markIn { 0%, 12% { stroke-dashoffset: 8; opacity: .18 } 34%, 52% { stroke-dashoffset: 0; opacity: .7 } 74%, 100% { stroke-dashoffset: -8; opacity: 0 } }
@keyframes markOut { 0%, 10% { stroke-dashoffset: 9; opacity: 0 } 36% { opacity: .95 } 62% { stroke-dashoffset: 0; opacity: .8 } 88%, 100% { stroke-dashoffset: -9; opacity: 0 } }
.brand:hover .prizm-mark .dia, .mark:hover .prizm-mark .dia { animation-duration: 5s; }
@media (prefers-reduced-motion: reduce) { .prizm-mark * { animation: none !important; opacity: .7 !important; stroke-dashoffset: 0 !important; } }

/* ==========================================================================
   site wide motion
   ========================================================================== */
body { opacity: 1; transition: opacity .22s ease; }
body.leaving { opacity: 0; }
body:not(.booted):not(.nomotion) .panel,
body:not(.booted):not(.nomotion) .block { opacity: 0; transform: translateY(10px); }
body.booted .panel, body.booted .block {
  animation: riseIn .6s cubic-bezier(.2,.75,.2,1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes riseIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.drawer.on .mrow { animation: slideIn .42s cubic-bezier(.2,.75,.2,1) both; animation-delay: calc(var(--i, 0) * 26ms); }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px) } to { opacity: 1; transform: none } }
.pal.on .pres { animation: riseIn .3s ease both; animation-delay: calc(var(--i, 0) * 18ms); }

.btn, .kbtn, .chip, .mod, .card, .quietlink, .mrow, .ev, .pin { transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease, box-shadow .25s ease; }
.btn:active, .kbtn:active, .chip:active { transform: translateY(1px) scale(.985); }
.card:hover, .mod:hover { transform: translateY(-2px); }
table.tbl tbody tr { transition: background .2s ease; }
@media (prefers-reduced-motion: reduce) {
  body.booted .panel, body.booted .block, .drawer.on .mrow, .pal.on .pres { animation: none; opacity: 1; transform: none; }
}

/* ==========================================================================
   the collapse, animated
   ========================================================================== */
.reveal-stage { min-height: 320px; }
.noisegrid .nr { transition: opacity .5s ease, transform .85s cubic-bezier(.35,0,.15,1), color .4s ease; }
.revealed .noisegrid { pointer-events: none; }
.scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(47,227,168,0.9), transparent);
  box-shadow: 0 0 22px rgba(47,227,168,0.5);
}
.revealed .scanline { animation: scan 1s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes scan { 0% { opacity: 0; transform: translateY(0) } 12% { opacity: 1 } 88% { opacity: 1 } 100% { opacity: 0; transform: translateY(320px) } }
.answer { background: radial-gradient(60% 60% at 50% 50%, rgba(6,9,14,0.86), rgba(6,9,14,0.4) 70%, transparent); }
.answer .sm { transition: opacity .5s ease .9s, transform .5s ease .9s; opacity: 0; transform: translateY(8px); }
.revealed .answer .sm { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .reveal-stage { min-height: 400px; }
  .noisegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; padding: 12px 10px; }
  .noisegrid .nr { font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
  .biaswrap { flex-direction: column; align-items: center; gap: 14px; text-align: center; }
  .biasside { min-width: 0; width: 100%; }
  .verdictline { font-size: 19px; }
  .answer { padding: 0 12px; }
  .answer .big { font-size: 22px; }
}
.prizm-mark .orbit { transform-origin: 8px 8px; animation: markOrbit 22s linear infinite; }
@keyframes markOrbit { to { transform: rotate(360deg) } }

/* ==========================================================================
   the readout: attitude indicator
   ========================================================================== */
.readout { display: flex; align-items: center; gap: 18px; }
.readout .att { width: 176px; height: 110px; flex: none; overflow: visible; }
.readout .att .grid line { stroke: rgba(255,255,255,0.12); stroke-width: 1; }
.readout .att .tl { font: 8px "IBM Plex Mono", monospace; letter-spacing: 0.2em; text-transform: uppercase; }
.readout .att .tl.up { fill: rgba(47,227,168,0.7); } .readout .att .tl.down { fill: rgba(255,85,69,0.7); }
.readout .needle { transition: transform 1.3s cubic-bezier(.2,.8,.2,1); }
.readout .needle line { stroke-width: 1.6; filter: drop-shadow(0 0 5px currentColor); }
.readout .rside { flex: 1; min-width: 0; }
.readout .verdictline { font-weight: 200; font-size: 22px; line-height: 1.2; }
.split2 { display: flex; height: 3px; gap: 3px; margin: 14px 0 7px; }
.split2 span { transition: flex-basis 1.2s cubic-bezier(.2,.8,.2,1); }
.split2 .b { background: var(--long); box-shadow: 0 0 8px rgba(47,227,168,0.5); }
.split2 .s { background: var(--short); box-shadow: 0 0 8px rgba(255,85,69,0.4); }
.splitkey { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }
@media (max-width: 760px) {
  .readout { flex-direction: column; align-items: stretch; gap: 10px; }
  .readout .att { width: 100%; max-width: 240px; height: auto; align-self: center; }
  .readout .verdictline { font-size: 19px; text-align: center; }
  .readout .biasnote { text-align: center; }
}

/* ==========================================================================
   iphone: inputs under 16px trigger a zoom on focus
   ========================================================================== */
@media (max-width: 900px) {
  input.fld, select.fld, .palbox input, form input, input[type="password"], input[type="text"] { font-size: 16px !important; }
}

/* the kept prints, shown cleanly after the collapse */
.kept { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; max-width: 520px; }
.kept span { font-size: 9px; letter-spacing: 0.06em; padding: 4px 7px; border-radius: 2px; border: 1px solid; white-space: nowrap; }
.kept .c { color: var(--long); border-color: rgba(47,227,168,0.3); }
.kept .p { color: var(--short); border-color: rgba(255,85,69,0.3); }
.revealed .noisegrid .nr.keep { opacity: 0; transform: translate3d(0, -10px, 0) scale(.9); }
.answer { gap: 14px; justify-content: center; }
.answer .sm { font-size: 10px; color: var(--dim); }
@media (max-width: 760px) {
  .reveal-stage { min-height: 460px; }
  .answer { justify-content: flex-start; padding-top: 22px; }
  .kept span { font-size: 8px; }
}

/* ==========================================================================
   interaction layer
   ========================================================================== */
/* the light that follows the pointer */
.panel { background:
  radial-gradient(280px circle at var(--mx, -400px) var(--my, -400px), rgba(47,227,168,0.065), transparent 62%),
  linear-gradient(180deg, var(--panel), var(--panel-2)); }
.block, .mod, .card { background-image: radial-gradient(260px circle at var(--mx, -400px) var(--my, -400px), rgba(77,163,255,0.05), transparent 62%); }
.panel:hover { border-color: rgba(255,255,255,0.15); }

/* a spectrum hairline wakes up under a panel header on hover */
.panel > .head { position: relative; }
.panel > .head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, #2fe3a8, #4da3ff, #9b8cff, #ffb648, #ff5545, transparent);
  background-size: 200% 100%; transition: opacity .4s ease;
}
.panel:hover > .head::after { opacity: .75; animation: specSlide 3.2s linear infinite; }
@keyframes specSlide { from { background-position: 0% 0 } to { background-position: 200% 0 } }

/* presses: ripple + a little pop */
.btn, .kbtn, .chip, .seg button, .mtabs button, .pin, .collapse, .tk { position: relative; overflow: hidden; }
.rip { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); opacity: .55;
  background: radial-gradient(circle, var(--rc, #2fe3a8) 0%, transparent 62%); animation: rip .65s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.pop { animation: popIn .34s cubic-bezier(.3,1.6,.4,1); }
@keyframes popIn { 0% { transform: scale(1) } 40% { transform: scale(1.07) } 100% { transform: scale(1) } }
.btn.mag { transition: transform .12s ease-out, border-color .2s ease, box-shadow .25s ease; }

/* chips glow in their own color when on */
.chip[aria-pressed="true"] { box-shadow: 0 0 14px -6px currentColor; }
.seg button[aria-pressed="true"] { box-shadow: inset 0 -1px 0 var(--long); }

/* the drawer takes each module's color */
.mrow:hover { border-left-color: var(--ic, var(--long)); }
.mrow.here { border-left-color: var(--ic, var(--long)); background: color-mix(in srgb, var(--ic, #2fe3a8) 9%, transparent); }

/* section numbers get their own color */
.k-red::before, .k-green::before, .k-blue::before, .k-amber::before, .k-violet::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 9px; vertical-align: 1px;
  animation: pulse 2.6s ease-in-out infinite;
}
.k-red::before { background: var(--short); box-shadow: 0 0 9px var(--short); }
.k-green::before { background: var(--long); box-shadow: 0 0 9px var(--long); }
.k-blue::before { background: var(--blue); box-shadow: 0 0 9px var(--blue); }
.k-amber::before { background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.k-violet::before { background: var(--violet); box-shadow: 0 0 9px var(--violet); }

/* headline words arrive one at a time */
.words .w { display: inline-block; opacity: 0; transform: translateY(10px); filter: blur(4px);
  animation: wordIn .7s cubic-bezier(.2,.75,.2,1) forwards; animation-delay: calc(var(--w, 0) * 55ms + 120ms); }
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  .rip, .pop, .panel:hover > .head::after, .words .w { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}
.collapse.spec { animation: specRing2 3.6s linear infinite; }
@keyframes specRing2 {
  0%,100% { border-color: rgba(47,227,168,.6); box-shadow: 0 0 22px rgba(47,227,168,.2) }
  33% { border-color: rgba(77,163,255,.6); box-shadow: 0 0 22px rgba(77,163,255,.2) }
  66% { border-color: rgba(155,140,255,.6); box-shadow: 0 0 22px rgba(155,140,255,.2) }
}

/* ==========================================================================
   fixes after checking real phone screenshots
   ========================================================================== */
/* the interaction layer must not undo absolutely placed controls */
.reveal-stage .collapse, .reveal-stage .again { position: absolute; }

/* control strips never squash their buttons; they scroll or wrap instead */
.strip > *, .filters > *, .btctl > * { flex: none; }

@media (max-width: 900px) {
  input.fld { padding: 6px 10px; line-height: 1.2; height: 34px; }
  .symform input.sym { width: 78px !important; }
  .strip, .filters { flex-wrap: wrap; row-gap: 8px; overflow-x: visible; }
  .strip .spacer, .filters .spacer { display: none; }
  .chip { padding: 6px 9px; }
  .seg button { padding: 7px 10px; }
}
@media (max-width: 900px) {
  .symform input.sym, .filters input.fld { height: 34px !important; padding: 4px 8px !important; }
  .symform .kbtn { height: 34px; }
}
