/* Crypto Islam · v11 identity: "Obsidian & Brass".
   An institutional desk: ink-black surfaces, ivory text, one restrained metal accent, serif titles, mono figures.
   No neon. Colour is information: green and red for direction, brass for the house and for clearance. */
:root {
  --bg: #07090D; --bg1: #0A0D12; --pn: #0E1218; --pn2: #131821; --pn3: #19202B; --ln: #1B222D; --ln2: #29323F; --hl: rgba(201,170,108,.05);
  --tx: #ECE8DF; --tx2: #A5A39C; --tx3: #6B6D70; --ac: #C9AA6C; --ac2: #E3C88F; --ac-ink: #15110A; --acs: rgba(201,170,108,.12);
  --up: #45B48A; --dn: #DB645F; --wa: #D6A548; --cy: #7BA3C6; --pk: #AE8EC4; --ups: rgba(69,180,138,.12); --dns: rgba(219,100,95,.12); --was: rgba(214,165,72,.13);
  --l1: var(--ac); --l2: var(--cy); --l3: var(--up); --l4: var(--pk);
  --fd: 'Instrument Serif', 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --f: 'IBM Plex Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --fm: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace; --fa: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
  --r: 10px; --r2: 14px; --e: cubic-bezier(.2,.8,.2,1); --sh: 0 30px 70px -30px rgba(0,0,0,.85); --row: 38px; --sbw: 252px;
  --brass: linear-gradient(135deg, #F0DBA8 0%, #C9AA6C 38%, #9C7B3F 70%, #D9BE86 100%);
  --lg-plate: #10151C; --lg-crypto: #ECE8DF;
  --terrain-base: #141A23; --terrain-gain: #45B48A; --terrain-loss: #DB645F; --terrain-line: #C9AA6C; --terrain-grid: #29323F;
  color-scheme: dark;
}
:root[data-theme=day] {
  --bg: #EFF0F2; --bg1: #F7F7F8; --pn: #FFFFFF; --pn2: #F5F5F6; --pn3: #ECEDEF; --ln: #E3E4E7; --ln2: #CFD2D7; --hl: rgba(140,106,42,.05);
  --tx: #10141B; --tx2: #4C535E; --tx3: #868C96; --ac: #8E6C2B; --ac2: #6F5320; --ac-ink: #FFFFFF; --acs: rgba(142,108,43,.1);
  --up: #1D8A63; --dn: #C3423D; --wa: #A9781A; --cy: #3F7099; --pk: #7B5B96; --ups: rgba(29,138,99,.1); --dns: rgba(195,66,61,.09); --was: rgba(169,120,26,.11);
  --brass: linear-gradient(135deg, #B08A3E 0%, #8E6C2B 50%, #6F5320 100%);
  --lg-plate: #FFFFFF; --lg-crypto: #1D5C52; --lg-arab-a: #B6952F; --lg-arab-b: #2E9C80;
  --terrain-base: #E4E6EA; --terrain-gain: #1D8A63; --terrain-loss: #C3423D; --terrain-line: #8E6C2B; --terrain-grid: #C4C8CE;
  --sh: 0 24px 60px -30px rgba(20,24,34,.3); color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font: 13.5px/1.5 var(--f); -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--ac2); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
.m { font-family: var(--fm); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); } .dn { color: var(--dn); } .t2 { color: var(--tx2); } .t3 { color: var(--tx3); } .wa { color: var(--wa); } .ac { color: var(--ac2); }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--acs); }
::-webkit-scrollbar { width: 9px; height: 9px; } ::-webkit-scrollbar-thumb { background: var(--ln2); border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; } }
svg.i { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; }
.grow { flex: 1; min-width: 0; }
[hidden] { display: none !important; }

/* ---------- primitives ---------- */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--tx); background: var(--pn2); box-shadow: inset 0 0 0 1px var(--ln2); transition: background .15s, box-shadow .15s, color .15s; white-space: nowrap; }
.b:hover { background: var(--pn3); text-decoration: none; } .b:active { transform: translateY(1px); }
.b.p { background: var(--brass); color: var(--ac-ink); font-weight: 600; box-shadow: 0 8px 24px -12px var(--ac), inset 0 1px 0 rgba(255,255,255,.35); } .b.p:hover { filter: brightness(1.07); }
.b.g { background: transparent; box-shadow: none; color: var(--tx2); } .b.g:hover { color: var(--tx); background: var(--pn2); }
.b.o { background: transparent; box-shadow: inset 0 0 0 1px var(--ac); color: var(--ac2); } .b.o:hover { background: var(--acs); }
.b.on { box-shadow: inset 0 0 0 1px var(--ac); color: var(--ac2); background: var(--acs); }
.b.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.b.lg { height: 44px; padding: 0 22px; font-size: 14.5px; border-radius: 10px; }
.b.ic { width: 34px; padding: 0; } .b.sm.ic { width: 28px; }
.b[disabled] { opacity: .45; cursor: not-allowed; }
.in, select.in, textarea.in { height: 34px; width: 100%; padding: 0 11px; border-radius: 8px; border: 1px solid var(--ln2); background: var(--bg1); color: var(--tx); outline: 0; transition: border-color .15s, box-shadow .15s; }
textarea.in { height: auto; padding: 9px 11px; line-height: 1.5; resize: vertical; font-family: var(--fm); font-size: 12.5px; }
.in:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--acs); }
label.f { display: grid; gap: 6px; font-size: 12px; color: var(--tx2); font-weight: 500; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--ln); }
.seg button { height: 26px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--tx3); white-space: nowrap; }
.seg button:hover { color: var(--tx); } .seg button.on { background: var(--pn3); color: var(--tx); box-shadow: inset 0 0 0 1px var(--ln2); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--pn3); color: var(--tx2); }
.tag.h { background: var(--ups); color: var(--up); } .tag.x { background: var(--dns); color: var(--dn); } .tag.r { background: var(--was); color: var(--wa); } .tag.a { background: var(--acs); color: var(--ac2); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; flex: none; }
.dot.pulse { box-shadow: 0 0 0 0 currentColor; animation: pl 2s infinite; } @keyframes pl { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font: 500 11px var(--fm); color: var(--tx3); box-shadow: inset 0 0 0 1px var(--ln2); background: var(--bg1); }
.fl-u { animation: flu .9s ease-out; } .fl-d { animation: fld .9s ease-out; }
@keyframes flu { from { background: var(--ups); } } @keyframes fld { from { background: var(--dns); } }
.tip { position: fixed; z-index: 200; pointer-events: none; padding: 6px 9px; border-radius: 7px; background: var(--tx); color: var(--bg); font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: var(--sh); }
.empty { display: grid; place-content: center; justify-items: center; gap: 8px; height: 100%; min-height: 120px; padding: 24px; color: var(--tx3); font-size: 13px; text-align: center; }
.empty b { color: var(--tx2); font-weight: 600; }
.skel { background: linear-gradient(90deg, var(--pn2) 0%, var(--pn3) 50%, var(--pn2) 100%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 5px; }
@keyframes sk { to { background-position: -200% 0; } }
.lnk { display: none; }
.stamp { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 4px; font: 600 10.5px var(--fm); letter-spacing: .1em; text-transform: uppercase; color: var(--ac2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 55%, transparent); background: var(--acs); white-space: nowrap; }
.stamp.demo { color: var(--wa); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa) 50%, transparent); background: var(--was); }
.stamp.live { color: var(--up); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up) 45%, transparent); background: var(--ups); }

/* ---------- tables ---------- */
table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tb th { position: sticky; top: 0; z-index: 1; background: var(--pn); text-align: left; font-weight: 500; color: var(--tx3); font-size: 11.5px; padding: 0 12px; height: 34px; border-bottom: 1px solid var(--ln); white-space: nowrap; cursor: pointer; user-select: none; }
.tb th:hover { color: var(--tx); } .tb th.s { color: var(--ac2); } .tb th.s::after { content: ' ↓'; } .tb th.s.asc::after { content: ' ↑'; }
.tb td { padding: 0 12px; height: var(--row); border-bottom: 1px solid color-mix(in srgb, var(--ln) 65%, transparent); white-space: nowrap; }
.tb tbody tr { transition: background .1s; cursor: pointer; } .tb tbody tr:hover { background: var(--hl); } .tb tr.sel { background: var(--acs); } .tb tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--ac); }
.tb .r { text-align: right; } .tb .c { text-align: center; }
.tb.static tbody tr { cursor: default; }
.sym { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.coin { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 10px var(--f); color: #fff; flex: none; filter: saturate(.55) brightness(.92); }
.pb { container-type: inline-size; }
@container (max-width: 620px) { .o1 { display: none; } }
@container (max-width: 430px) { .o2 { display: none; } }

/* ---------- popovers, palette, toasts, modal ---------- */
.ov { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: flex-start; padding: 11vh 16px 16px; animation: fi .15s both; overflow: auto; }
@keyframes fi { from { opacity: 0; } }
.pal { width: min(700px, 96vw); border-radius: var(--r2); background: var(--pn); box-shadow: inset 0 0 0 1px var(--ln2), 0 50px 120px -30px #000; overflow: hidden; animation: pu .2s var(--e) both; }
@keyframes pu { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.pal-in { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border-bottom: 1px solid var(--ln); }
.pal-in input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16.5px; min-width: 0; }
.pal-hint { padding: 9px 18px; font-size: 12px; color: var(--tx3); border-bottom: 1px solid var(--ln); display: flex; gap: 16px; flex-wrap: wrap; }
.pal-hint code { font-family: var(--fm); color: var(--tx2); }
.pal-l { max-height: min(460px, 58vh); overflow: auto; padding: 8px; }
.pal-g { padding: 10px 10px 5px; font-size: 11.5px; color: var(--tx3); font-weight: 500; }
.pal-i { display: flex; align-items: center; gap: 11px; width: 100%; height: 40px; padding: 0 10px; border-radius: 8px; text-align: start; }
.pal-i .k { margin-inline-start: auto; color: var(--tx3); font-size: 12px; } .pal-i svg.i { color: var(--tx3); }
.pal-i.on { background: var(--pn3); box-shadow: inset 0 0 0 1px var(--ln2); }
.mn { position: fixed; z-index: 120; min-width: 230px; max-height: 76vh; overflow: auto; padding: 6px; border-radius: 11px; background: var(--pn); box-shadow: inset 0 0 0 1px var(--ln2), var(--sh); animation: pu .14s var(--e) both; }
.mn button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 7px; font-size: 13px; text-align: start; color: var(--tx); }
.mn button:hover { background: var(--pn3); } .mn button small { margin-inline-start: auto; padding-inline-start: 14px; color: var(--ac2); font-size: 11px; } .mn hr { border: 0; border-top: 1px solid var(--ln); margin: 5px 2px; } .mn .h { padding: 7px 10px 4px; font-size: 11.5px; color: var(--tx3); }
.toasts { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 150; display: grid; gap: 9px; width: min(380px, calc(100vw - 36px)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; padding: 13px 13px 13px 15px; border-radius: 11px; background: var(--pn); box-shadow: inset 0 0 0 1px var(--ln2), var(--sh); animation: tin .3s var(--e) both; font-size: 13px; }
@keyframes tin { from { opacity: 0; transform: translateX(18px); } }
.toast b { display: block; } .toast p { margin: 2px 0 0; color: var(--tx2); white-space: pre-line; }
.toast .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--acs); color: var(--ac2); }
.toast.up .ic { background: var(--ups); color: var(--up); } .toast.dn .ic { background: var(--dns); color: var(--dn); }
.mdl { width: min(480px, 96vw); border-radius: var(--r2); background: var(--pn); box-shadow: inset 0 0 0 1px var(--ln2), 0 50px 120px -30px #000; padding: 26px; animation: pu .2s var(--e) both; display: grid; gap: 16px; }
.mdl.wide { width: min(760px, 96vw); }
.mdl h3 { font: 400 26px/1.1 var(--fd); letter-spacing: -.01em; } .mdl p { color: var(--tx2); }

/* ---------- chat (AI analyst) ---------- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-l { flex: 1; overflow: auto; padding: 18px; display: grid; gap: 12px; align-content: start; }
.msg { max-width: min(92%, 760px); padding: 11px 14px; border-radius: 13px; line-height: 1.6; font-size: 13.5px; white-space: pre-wrap; }
.msg.me { justify-self: end; background: var(--acs); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 40%, transparent); border-end-end-radius: 4px; }
.msg.ai { background: var(--pn2); box-shadow: inset 0 0 0 1px var(--ln); border-end-start-radius: 4px; }
.chat-f { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--ln); }
.sug { display: flex; flex-wrap: wrap; gap: 7px; } .sug button { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12.5px; color: var(--tx2); box-shadow: inset 0 0 0 1px var(--ln2); } .sug button:hover { color: var(--tx); background: var(--pn2); }
.typing span { display: inline-block; width: 5px; height: 5px; margin: 0 2px; border-radius: 50%; background: var(--tx3); animation: ty 1s infinite; } .typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ty { 50% { transform: translateY(-4px); opacity: .5; } }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 0; font-size: 13px; } .kv > * { padding: 8px 0; border-bottom: 1px solid var(--ln); } .kv > :nth-child(odd) { color: var(--tx3); } .kv > :nth-child(even) { text-align: end; font-family: var(--fm); }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.sec { padding: 16px; border-bottom: 1px solid var(--ln); } .sec:last-child { border-bottom: 0; } .sec h4 { margin: 0 0 10px; font-size: 12.5px; color: var(--tx2); font-weight: 600; }

/* ================= frame ================= */
.app { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.app.mini { --sbw: 68px; }
.sb { display: flex; flex-direction: column; min-height: 0; background: var(--bg1); border-inline-end: 1px solid var(--ln); position: relative; z-index: 20; }
.sb::after { content: ''; position: absolute; inset-block: 0; inset-inline-end: -1px; width: 1px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--ac) 50%, transparent) 18%, transparent 46%); pointer-events: none; }
.sb-brand { display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 18px; flex: none; color: var(--tx); }
.sb-brand:hover { text-decoration: none; }
.sb-brand .wm { display: grid; line-height: 1.1; white-space: nowrap; overflow: hidden; }
.sb-brand .wm b { font: 400 22px var(--fd); letter-spacing: .01em; }
.sb-brand .wm span { font: 600 9.5px var(--fm); letter-spacing: .3em; color: var(--ac2); text-transform: uppercase; }
.sb-nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; scrollbar-width: none; } .sb-nav::-webkit-scrollbar { display: none; }
.sb-g { padding: 16px 10px 6px; font: 500 10px var(--fm); letter-spacing: .18em; text-transform: uppercase; color: var(--tx3); white-space: nowrap; overflow: hidden; }
.sb-i { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--tx2); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: color .15s, background .15s; }
.sb-i:hover { color: var(--tx); background: var(--pn2); text-decoration: none; }
.sb-i svg.i { color: var(--tx3); transition: color .15s; }
.sb-i.on { color: var(--tx); background: linear-gradient(90deg, var(--acs), transparent 85%); }
.sb-i.on svg.i { color: var(--ac2); }
.sb-i.on::before { content: ''; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--brass); }
.sb-i .bd { margin-inline-start: auto; font: 500 10.5px var(--fm); color: var(--tx3); padding: 1px 6px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--ln2); }
.sb-i .bd:empty { display: none; }
.sb-i .bd.hot { color: var(--ac2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 50%, transparent); }
.sb-i .lk { margin-inline-start: auto; color: var(--tx3); opacity: .7; }
.sb-foot { flex: none; padding: 12px; border-top: 1px solid var(--ln); display: grid; gap: 10px; }
.mem { display: grid; gap: 8px; padding: 13px; border-radius: 11px; background: linear-gradient(160deg, var(--pn2), var(--pn)); box-shadow: inset 0 0 0 1px var(--ln2); position: relative; overflow: hidden; }
.mem::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--brass); }
.mem .lv { font: 400 19px var(--fd); letter-spacing: .05em; } .mem .ex { font-size: 11.5px; color: var(--tx3); }
.sb-st { display: flex; align-items: center; gap: 8px; font: 11px var(--fm); color: var(--tx3); padding: 0 4px; white-space: nowrap; }
.app.mini .sb-brand { padding: 0; justify-content: center; } .app.mini .sb-brand .wm, .app.mini .sb-g, .app.mini .sb-i > span, .app.mini .sb-i .bd, .app.mini .sb-i .lk, .app.mini .mem, .app.mini .sb-st span { display: none; }
.app.mini .sb-i { justify-content: center; padding: 0; } .app.mini .sb-g { display: block; height: 1px; padding: 0; margin: 10px 8px; background: var(--ln); }

.mainw { display: grid; grid-template-rows: 60px 32px minmax(0, 1fr); min-width: 0; min-height: 0; }
.tbar { display: flex; align-items: center; gap: 12px; padding: 0 22px 0 14px; border-bottom: 1px solid var(--ln); background: color-mix(in srgb, var(--bg1) 88%, transparent); min-width: 0; }
.tbar h1 { font: 400 25px/1 var(--fd); letter-spacing: .005em; white-space: nowrap; }
.tbar .doc { font: 10.5px var(--fm); letter-spacing: .14em; color: var(--tx3); text-transform: uppercase; white-space: nowrap; padding-inline-start: 12px; border-inline-start: 1px solid var(--ln2); }
.cmd { flex: 0 1 380px; margin-inline-start: auto; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 9px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--ln2); color: var(--tx3); cursor: text; transition: box-shadow .15s; min-width: 0; }
.cmd:hover { box-shadow: inset 0 0 0 1px var(--tx3); } .cmd span { flex: 1; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-r { display: flex; align-items: center; gap: 6px; flex: none; }
.tb-r .b.ic { position: relative; }
.badge-n { position: absolute; top: 3px; inset-inline-end: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ac); color: var(--ac-ink); font: 600 10px/16px var(--fm); text-align: center; }
.clocks { display: flex; gap: 14px; font: 11px var(--fm); color: var(--tx3); white-space: nowrap; } .clocks b { color: var(--tx2); font-weight: 500; }
.tape { position: relative; overflow: hidden; border-bottom: 1px solid var(--ln); background: var(--bg1); font: 12px var(--fm); }
.tape-in { display: flex; gap: 0; height: 100%; align-items: center; width: max-content; animation: tape 90s linear infinite; }
.tape:hover .tape-in { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }
.tape button { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 16px; border-inline-end: 1px solid var(--ln); white-space: nowrap; color: var(--tx2); }
.tape button:hover { background: var(--pn2); } .tape button b { color: var(--tx); font-weight: 500; }
.view { min-height: 0; overflow: auto; position: relative; background: radial-gradient(1100px 520px at 85% -12%, rgba(201,170,108,.05), transparent 62%), var(--bg); }
:root[data-theme=day] .view { background: var(--bg); }
.pg { padding: 22px; display: grid; gap: 16px; align-content: start; min-height: 100%; animation: pgin .28s var(--e) both; }
.pg.fit { height: 100%; grid-template-rows: auto minmax(0, 1fr); }
@keyframes pgin { from { opacity: 0; transform: translateY(6px); } }
.pg-h { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding-bottom: 14px; position: relative; }
.pg-h::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, var(--ac) 0, color-mix(in srgb, var(--ac) 25%, transparent) 140px, var(--ln) 320px); }
.pg-h h2 { font: 400 34px/1.05 var(--fd); letter-spacing: -.005em; }
.pg-h p { color: var(--tx2); max-width: 74ch; margin-top: 6px; font-size: 13.5px; }
.pg-h .acts { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* grid + cards */
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: span 12; }
.cd { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: var(--r2); background: linear-gradient(180deg, color-mix(in srgb, var(--pn) 100%, transparent), var(--pn)); box-shadow: inset 0 0 0 1px var(--ln), inset 0 1px 0 rgba(255,255,255,.025); overflow: hidden; position: relative; }
.cd-h { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 14px 8px 16px; border-bottom: 1px solid var(--ln); flex: none; flex-wrap: wrap; }
.cd-t { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.cd-t::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--brass); }
.cd-s { color: var(--tx3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cd-b { flex: 1; min-height: 0; position: relative; overflow: auto; }
.cd-b.pad { padding: 16px; }
.kpi { padding: 16px 18px; display: grid; gap: 4px; align-content: start; }
.kpi .l { font-size: 12px; color: var(--tx3); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.kpi .v { font: 500 26px/1.15 var(--fm); letter-spacing: -.03em; white-space: nowrap; }
.kpi .v.serif { font: 400 34px/1.05 var(--fd); letter-spacing: 0; }
.kpi .d { font-size: 12px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpis > .kpi + .kpi { border-inline-start: 1px solid var(--ln); }
.bar { height: 6px; border-radius: 3px; background: var(--ln2); overflow: hidden; display: flex; } .bar > i { display: block; height: 100%; background: var(--ac); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--pn3); color: var(--tx2); }
.pill.act { background: var(--acs); color: var(--ac2); } .pill.win { background: var(--ups); color: var(--up); } .pill.loss { background: var(--dns); color: var(--dn); } .pill.wait { background: var(--pn3); color: var(--tx2); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--ln); overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; height: 40px; font-size: 13.5px; font-weight: 500; color: var(--tx3); white-space: nowrap; }
.tabs button:hover { color: var(--tx); } .tabs button.on { color: var(--tx); } .tabs button.on::after { content: ''; position: absolute; inset: auto 0 -1px 0; height: 2px; background: var(--brass); }
.tabs button .n { margin-inline-start: 7px; font: 11px var(--fm); color: var(--tx3); }

/* clearance (locked) */
.lockc { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 34px 24px; text-align: center; height: 100%; min-height: 220px; background: repeating-linear-gradient(135deg, transparent 0 13px, color-mix(in srgb, var(--ln) 45%, transparent) 13px 14px); }
.lockc .seal { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--ac2); box-shadow: inset 0 0 0 1px var(--ac), 0 0 0 5px var(--acs); background: var(--pn); }
.lockc .seal svg.i { width: 22px; height: 22px; }
.lockc h3 { font: 400 25px/1.1 var(--fd); } .lockc p { color: var(--tx2); max-width: 46ch; }
.lock-pg { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.blur-prev { position: relative; } .blur-prev > .pv { filter: blur(7px) saturate(.6); opacity: .55; pointer-events: none; user-select: none; }
.blur-prev > .lockc { position: absolute; inset: 0; background: color-mix(in srgb, var(--pn) 55%, transparent); }

/* ---------- chart ---------- */
.chart { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--pn); }
.chart:fullscreen { padding: 0; }
.chart-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--ln); flex: none; overflow-x: auto; scrollbar-width: none; } .chart-bar::-webkit-scrollbar { display: none; } .chart-bar > * { flex: none; } .chart-bar > .grow { flex: 1; }
.chart-sym { display: inline-flex; align-items: baseline; gap: 10px; height: 34px; padding: 0 12px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--ln2); background: var(--bg1); }
.chart-sym:hover { box-shadow: inset 0 0 0 1px var(--ac); }
.chart-sym .cs-a { font-weight: 600; font-size: 14px; } .chart-sym .cs-p { font-size: 13.5px; } .chart-sym .cs-c { font-size: 12px; }
.chart-mid { flex: 1; min-height: 0; display: flex; }
.chart-tools { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-inline-end: 1px solid var(--ln); flex: none; }
.chart-tools button { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: var(--tx3); }
.chart-tools button:hover { color: var(--tx); background: var(--pn2); } .chart-tools button.on { color: var(--ac2); background: var(--acs); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 50%, transparent); }
.chart-stage { position: relative; flex: 1; min-width: 0; min-height: 0; }
.chart-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; outline: 0; }
.chart-ovl { position: absolute; inset: 0; pointer-events: none; }
.chart-lg { position: absolute; inset-inline-start: 10px; top: 7px; font-size: 11.5px; pointer-events: none; display: flex; gap: 12px; flex-wrap: wrap; max-width: calc(100% - 100px); }
.chart-lg i { font-style: normal; color: var(--tx3); margin-inline-end: 4px; }
.chart-live { position: absolute; inset-inline-end: 92px; bottom: 34px; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; font-weight: 500; background: var(--pn3); box-shadow: inset 0 0 0 1px var(--ac), var(--sh); color: var(--ac2); }
.pane-h { position: absolute; inset-inline-start: 8px; display: flex; align-items: center; gap: 10px; font-size: 11.5px; pointer-events: auto; }
.pane-h b { font-weight: 500; color: var(--tx2); } .pane-h .pv { color: var(--tx2); }
.pane-x { color: var(--tx3); opacity: 0; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; } .pane-h:hover .pane-x { opacity: 1; } .pane-x:hover { background: var(--pn3); color: var(--tx); }
.sub-req { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 4px; font: 600 10px var(--fm); letter-spacing: .08em; text-transform: uppercase; color: var(--ac2); background: var(--pn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 55%, transparent); }
.sub-req:hover { background: var(--acs); }
.chart.compact .chart-lg { top: 6px; }

/* ---------- phone ---------- */
.mtabs, .sb-x, .burger { display: none; }
@media (max-width: 1180px) { .clocks, .tbar .doc { display: none; } .s3 { grid-column: span 6; } .s4, .s5, .s7, .s8, .s9 { grid-column: span 12; } .s6 { grid-column: span 12; } .s2 { grid-column: span 4; } }
@media (max-width: 860px) {
  .app, .app.mini { grid-template-columns: minmax(0, 1fr); --sbw: 280px; }
  .sb { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; transform: translateX(-102%); transition: transform .25s var(--e); box-shadow: var(--sh); }
  :root[dir=rtl] .sb { transform: translateX(102%); }
  .app.nav .sb { transform: none; } .app.nav::after { content: ''; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.55); }
  .burger { display: inline-flex; }
  .mainw { grid-template-rows: 54px 30px minmax(0, 1fr) 58px; }
  .tbar { padding: 0 10px; gap: 8px; } .tbar h1 { font-size: 21px; overflow: hidden; text-overflow: ellipsis; }
  .tb-r .stamp, .tb-r .pubsite, .tb-r .pubsite + .b.g.ic { display: none; } .tbar h1 { flex: 1; min-width: 0; }
  .cmd { flex: 0 0 36px; padding: 0; justify-content: center; margin-inline-start: auto; } .cmd span, .cmd kbd { display: none; }
  .pg { padding: 14px 12px; gap: 12px; } .pg.fit { height: auto; } .pg-h h2 { font-size: 28px; }
  .s2, .s3 { grid-column: span 6; } .g12 { gap: 10px; }
  .mtabs { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--ln); background: var(--bg1); padding-bottom: env(safe-area-inset-bottom); }
  .mtabs button { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 10.5px; color: var(--tx3); } .mtabs button.on { color: var(--ac2); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis > .kpi { border-inline-start: 0 !important; border-bottom: 1px solid var(--ln); } .kpis > .kpi:nth-child(even) { border-inline-start: 1px solid var(--ln) !important; }
  .kpi .v { font-size: 21px; } .kpi .v.serif { font-size: 27px; }
  .chart-tools { display: none; } .chart-bar .hide-m { display: none; }
  .toasts { bottom: 70px; }
}

.inside { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--ln); }
.inside > div { display: flex; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--ln); border-inline-end: 1px solid var(--ln); font-size: 13.5px; color: var(--tx2); align-items: flex-start; } .inside svg.i { color: var(--ac2); margin-top: 2px; }
.lock-pg > .cd { display: flex; flex-direction: column; } .lock-pg .lockc { flex: 1; min-height: 340px; }
@media (max-width: 860px) { .an-top > p, .an-top > div:first-child { display: none; } }

/* ---------- leaving for the public site ---------- */
.sb-out { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--tx2); box-shadow: inset 0 0 0 1px var(--ln2); white-space: nowrap; }
.sb-out:hover { color: var(--tx); box-shadow: inset 0 0 0 1px var(--ac); text-decoration: none; } .sb-out span { flex: 1; } .sb-out svg.i { color: var(--ac2); }
.app.mini .sb-out { justify-content: center; padding: 0; } .app.mini .sb-out span, .app.mini .sb-out svg.sm { display: none; }
.pubsite svg.i { color: var(--ac2); }
/* ---------- the door: members only ---------- */
.gate { min-height: 100vh; min-height: 100dvh; height: 100vh; overflow: auto; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(900px 520px at 78% 18%, rgba(201,170,108,.10), transparent 65%), radial-gradient(700px 500px at 8% 90%, rgba(69,180,138,.06), transparent 70%), var(--bg); }
.gate-top { display: flex; align-items: center; gap: 14px; padding: 18px 32px; }
.gate-brand { display: flex; align-items: center; gap: 12px; color: var(--tx); } .gate-brand:hover { text-decoration: none; }
.gate-brand span { display: grid; line-height: 1.1; } .gate-brand b { font: 400 22px var(--fd); } .gate-brand small { font: 600 9.5px var(--fm); letter-spacing: .3em; color: var(--ac2); text-transform: uppercase; }
.gate-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 440px); gap: 56px; align-items: center; width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 24px 0 40px; }
.gate-in h1 { font: 400 clamp(36px, 4.6vw, 62px)/1.02 var(--fd); letter-spacing: -.01em; margin: 18px 0 14px; max-width: 14ch; text-wrap: balance; }
.gate-in .lede { color: var(--tx2); font-size: 15.5px; max-width: 54ch; }
.gate-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 30px; border-top: 1px solid var(--ln); }
.gate-list > div { display: flex; gap: 12px; padding: 16px 14px 16px 0; border-bottom: 1px solid var(--ln); align-items: flex-start; }
.gate-list .seal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ac2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 55%, transparent); flex: none; }
.gate-list b { display: block; font-size: 13.5px; font-weight: 600; } .gate-list span { color: var(--tx3); font-size: 12px; line-height: 1.4; display: block; }
.gate-card { position: relative; display: grid; gap: 14px; justify-items: stretch; padding: 34px 30px 26px; border-radius: 18px; background: linear-gradient(180deg, var(--pn2), var(--pn)); box-shadow: inset 0 0 0 1px var(--ln2), 0 50px 120px -40px #000; }
.gate-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: 18px 18px 0 0; background: var(--brass); }
.gate-card > svg { justify-self: center; margin: 2px 0 6px; }
.gate-card h2 { font: 400 30px/1.1 var(--fd); text-align: center; } .gate-card > p { color: var(--tx2); text-align: center; font-size: 13.5px; }
.gate-code { display: flex; gap: 8px; } .gate-code .in { height: 46px; font-size: 15px; letter-spacing: .08em; text-align: center; } .gate-code .b { height: 46px; }
.gate-or { display: flex; align-items: center; gap: 12px; color: var(--tx3); font-size: 12px; margin-top: 6px; } .gate-or::before, .gate-or::after { content: ''; flex: 1; height: 1px; background: var(--ln2); }
.gate-foot { padding: 16px 32px 22px; color: var(--tx3); font-size: 12px; text-align: center; }
@media (max-width: 960px) { .gate-main { grid-template-columns: minmax(0, 1fr); gap: 28px; width: calc(100% - 32px); } .gate-card { order: -1; } .gate-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gate-top { padding: 14px 16px; } .gate-top .b { font-size: 12px; padding: 0 10px; } }
@media (max-width: 520px) { .gate-list { grid-template-columns: minmax(0, 1fr); } .gate-top .b svg + * { display: none; } }
