/* ================================================================
   ELEV v4 — Intelligence Interface
   "Something never experienced before."
   ================================================================ */

:root {
  --void:        #000000;
  --deep:        #060504;
  --panel:       #0C0A08;
  --border:      rgba(255,255,255,0.055);
  --border-gold: rgba(201,168,76,0.2);
  --gold:        #C9A84C;
  --gold-hi:     #E8D080;
  --gold-lo:     rgba(201,168,76,0.07);
  --ink:         #EDE8DF;
  --ink-2:       #AFA99E;
  --ink-3:       rgba(239,232,219,0.35);
  --ink-4:       rgba(239,232,219,0.12);
  --serif:       'Cormorant Garamond', Georgia, serif;
  --sans:        'Inter', system-ui, sans-serif;
  --mono:        'JetBrains Mono', 'Courier New', monospace;
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  /* prevent iOS rubber-band on body, scroll happens inside #feed */
  overscroll-behavior: none;
}

/* ════════════════════════════════════════
   BACKGROUNDS
   ════════════════════════════════════════ */
#bgCanvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.noise-overlay {
  position: fixed; inset: -200px; z-index: 1; pointer-events: none;
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noiseShift 14s steps(8) infinite;
}
@keyframes noiseShift {
  0%,100%{ transform:translate(0,0) }
  12.5%  { transform:translate(-7%,-9%) }
  25%    { transform:translate(5%,-15%) }
  37.5%  { transform:translate(-10%,7%) }
  50%    { transform:translate(9%,5%) }
  62.5%  { transform:translate(-5%,12%) }
  75%    { transform:translate(13%,-3%) }
  87.5%  { transform:translate(-3%,16%) }
}
.radial-breath {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 120vmax; height: 120vmax;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(201,168,76,0.032) 0%, transparent 55%);
  animation: breathe 9s ease-in-out infinite;
  z-index: 1; pointer-events: none;
}
@keyframes breathe {
  0%,100%{ opacity:.6; transform:translate(-50%,-50%) scale(1) }
  50%    { opacity:1;  transform:translate(-50%,-50%) scale(1.14) }
}

/* ════════════════════════════════════════
   MOUSE GLOW
   ════════════════════════════════════════ */
#mouseGlow {
  position: fixed;
  top: 0; left: 0;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(201,168,76,0.11) 0%,
    rgba(201,168,76,0.04) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: 3;
  will-change: transform;
  mix-blend-mode: screen;
}

/* ════════════════════════════════════════
   PAGE BORDER LIGHT
   ════════════════════════════════════════ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  border: 1px solid rgba(201,168,76,0.0);
  box-shadow:
    inset 0 0 0 1px rgba(201,168,76,0.13),
    inset 0 0 40px rgba(201,168,76,0.04),
    inset 0 1px 0 rgba(201,168,76,0.22),
    inset 0 -1px 0 rgba(201,168,76,0.22),
    inset 1px 0 0 rgba(201,168,76,0.12),
    inset -1px 0 0 rgba(201,168,76,0.12);
  animation: borderPulse 6s ease-in-out infinite;
}
@keyframes borderPulse {
  0%,100% { opacity: .7 }
  50%     { opacity: 1  }
}

/* ════════════════════════════════════════
   INCOMING OVERLAY
   ════════════════════════════════════════ */
#incomingOverlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
#incomingOverlay.fire { animation: incFade .88s var(--ease) forwards; }
@keyframes incFade {
  0%{ opacity:0 } 18%{ opacity:1 } 72%{ opacity:1 } 100%{ opacity:0 }
}
.inc-top-line, .inc-bottom-line {
  height: 1px; width: 0;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.5), transparent);
}
#incomingOverlay.fire .inc-top-line  { animation: incLine .42s var(--ease) .06s forwards; }
#incomingOverlay.fire .inc-bottom-line { animation: incLine .42s var(--ease) .14s forwards; }
@keyframes incLine { to{ width: min(600px,88vw) } }
.inc-body {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 44px;
}
.inc-lbl {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .32em; color: rgba(201,168,76,.65);
}
.inc-dots { display: flex; gap: 5px; }
.inc-dots span {
  display: block; width: 3px; height: 3px;
  border-radius: 50%; background: rgba(201,168,76,.5);
  animation: incDot .6s ease infinite;
}
.inc-dots span:nth-child(2){ animation-delay:.15s }
.inc-dots span:nth-child(3){ animation-delay:.3s }
@keyframes incDot {
  0%,100%{ transform:scale(.6); opacity:.4 }
  50%    { transform:scale(1.2); opacity:1 }
}

/* ════════════════════════════════════════
   APP SHELL
   ════════════════════════════════════════ */
#app {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  height: 100vh;
  height: 100dvh; /* dynamic viewport height — fixes iOS address bar issue */
  max-width: 1120px; margin: 0 auto;
}

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
#header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 52px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.hd-left { display: flex; align-items: center; gap: 26px; }
.hd-logo {
  font-family: var(--serif); font-size: 22px; font-weight: 400;
  letter-spacing: .3em; color: var(--gold);
  display: flex; align-items: center; gap: 2px;
}
.hd-logo em { color: rgba(201,168,76,.3); font-style: normal; font-size: 16px; }
.hd-sep { width: 1px; height: 28px; background: linear-gradient(to bottom, transparent, var(--border), transparent); }
.hd-tagline {
  font-family: var(--serif); font-style: italic;
  font-size: 17px; font-weight: 300;
  color: var(--ink-3); letter-spacing: .04em;
}
.hd-right { display: flex; align-items: center; gap: 26px; }
.live-badge {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 18px 7px 30px;
  border: 1px solid rgba(201,168,76,.12);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .22em; color: rgba(201,168,76,.6);
}
.live-dot {
  position: absolute; left: 16px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); animation: livePulse 1.8s ease infinite;
}
.live-ring {
  position: absolute; left: 16px; top: 50%;
  transform: translate(-50%,-50%);
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(201,168,76,.2);
  animation: liveRing 1.8s ease infinite;
}
@keyframes livePulse { 0%,100%{ opacity:1 } 50%{ opacity:.4 } }
@keyframes liveRing {
  0%  { transform:translate(-50%,-50%) scale(.5); opacity:.8 }
  100%{ transform:translate(-50%,-50%) scale(1.8); opacity:0 }
}
.hd-site {
  font-size: 14px; color: var(--ink-3); text-decoration: none;
  letter-spacing: .04em; transition: color .2s;
}
.hd-site:hover { color: var(--gold); }
.btn-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(201,168,76,.55); background: transparent;
  color: rgba(201,168,76,.8); text-decoration: none;
  font-family: var(--sans); font-size: 9px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  transition: all .2s; overflow: hidden; position: relative;
  white-space: nowrap;
}
.btn-cta::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gold); transform: scaleX(0);
  transform-origin: left; transition: transform .25s var(--ease); z-index: 0;
}
.btn-cta:hover::before{ transform: scaleX(1) }
.btn-cta:hover{ color: var(--void) }
.btn-cta span, .btn-cta svg { position: relative; z-index: 1; }

/* ════════════════════════════════════════
   FEED
   ════════════════════════════════════════ */
#feed {
  flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
}
#feed::-webkit-scrollbar{ width:2px }
#feed::-webkit-scrollbar-thumb{ background:rgba(201,168,76,.15) }

/* ════════════════════════════════════════
   WELCOME — POSITIONED LAYOUT
   ════════════════════════════════════════ */
#welcome {
  display: flex; flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 0 44px 44px;
}

/* Upper zone — takes exactly 44vh so input falls at ~50-58% mark */
.wc-upper {
  width: 100%; max-width: 860px;
  min-height: 44vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 32px;
  text-align: center;
}

/* Logo */
.wc-logo-zone {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 160px; height: 160px; margin-bottom: 14px;
}
.wc-reticle {
  position: absolute; inset: 0;
  opacity: 0; animation: reticleSpin 100s linear .9s forwards;
}
@keyframes reticleSpin {
  0%  { opacity:0; transform:rotate(0deg) }
  5%  { opacity:1 }
  100%{ opacity:1; transform:rotate(360deg) }
}
.wc-logo {
  font-family: var(--serif); font-size: 72px; font-weight: 300;
  letter-spacing: .28em; padding-right: .28em;
  color: var(--gold); line-height: 1;
  position: relative; z-index: 1;
  opacity: 0; animation: logoIn 1.3s var(--ease) .3s forwards;
}
@keyframes logoIn {
  from{ opacity:0; filter:blur(18px); letter-spacing:.5em }
  to  { opacity:1; filter:blur(0);    letter-spacing:.28em }
}
.wc-tagline {
  font-family: var(--serif); font-style: italic;
  font-size: 26px; font-weight: 300;
  color: var(--ink-2); letter-spacing: .05em;
  margin-bottom: 10px;
  opacity: 0; animation: riseIn .8s var(--ease) 1.1s forwards;
}
.wc-desc {
  font-size: 15px; font-weight: 300;
  color: var(--ink-3); line-height: 1.8;
  margin-bottom: 30px;
  opacity: 0; animation: riseIn .8s var(--ease) 1.3s forwards;
}

/* Market strip */
.wc-strip {
  width: 100%;
  opacity: 0; animation: riseIn .6s var(--ease) 1.55s forwards;
}
.wcs-bar-top, .wcs-bar-bot { height: 1px; background: var(--border-gold); }
.wcs-track-wrap {
  overflow: hidden; padding: 7px 0; position: relative;
}
.wcs-track-wrap::before,
.wcs-track-wrap::after {
  content:''; position:absolute; top:0; bottom:0; width:70px; z-index:2;
}
.wcs-track-wrap::before{ left:0; background:linear-gradient(to right,var(--void),transparent) }
.wcs-track-wrap::after { right:0; background:linear-gradient(to left,var(--void),transparent) }
.wcs-track {
  display: inline-flex; align-items: center;
  white-space: nowrap; gap: 0;
  animation: tickScroll 42s linear infinite;
}
@keyframes tickScroll { from{ transform:translateX(0) } to{ transform:translateX(-50%) } }
.wci {
  font-family: var(--mono); font-size: 12.5px;
  letter-spacing: .06em; color: rgba(255,255,255,.22);
  padding: 0 22px;
}
.wci b { font-weight: 500; color: rgba(255,255,255,.32); }
.wci em.u { font-style: normal; color: rgba(201,168,76,.62); }
.wcs { color: rgba(201,168,76,.2); font-size: 16px; }

/* ════════════════════════════════════════
   SHARED INPUT COMPONENT
   (lives in welcome, moves to console)
   ════════════════════════════════════════ */
.wc-input-zone {
  width: 100%; max-width: 860px;
  margin-bottom: 24px;
  opacity: 0; animation: riseIn .7s var(--ease) 1.75s forwards;
}

/* Location pill */
.loc-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; margin-bottom: 12px;
  border: 1px solid rgba(201,168,76,.12);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .16em; color: rgba(201,168,76,.5);
  animation: riseIn .4s var(--ease) forwards;
}
.loc-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); opacity: .7;
  animation: livePulse 2s ease infinite;
}

/* The actual input component */
#inputComponent {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.018);
  transition: border-color .2s, box-shadow .2s;
}
#inputComponent:focus-within {
  border-color: rgba(201,168,76,.3);
  box-shadow: 0 0 0 1px rgba(201,168,76,.06), 0 4px 24px rgba(0,0,0,.4);
}
.inp-top {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px 7px;
  border-bottom: 1px solid var(--border);
  background: rgba(201,168,76,.02);
}
.inp-status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); opacity: .7;
  animation: livePulse 2s ease infinite;
}
#statusLbl {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .22em; color: rgba(201,168,76,.4);
  text-transform: uppercase;
}
.inp-row {
  display: flex; align-items: flex-end; gap: 12px;
  padding: 14px 18px;
}
.inp-glyph {
  color: rgba(201,168,76,.45); font-size: 15px;
  flex-shrink: 0; margin-bottom: 2px;
}
.inp-field {
  flex: 1; position: relative;
}
/* Animated placeholder overlay */
.inp-overlay {
  position: absolute; top: 0; left: 0; right: 0;
  pointer-events: none;
  display: flex; align-items: flex-start;
  padding-top: 1px;
  font-family: var(--sans); font-size: 16px; font-weight: 300;
  color: rgba(255,255,255,.18); line-height: 1.5;
  white-space: nowrap; overflow: hidden;
  user-select: none;
}
.inp-overlay.hidden { display: none; }
.ov-cursor {
  color: rgba(201,168,76,.45); font-weight: 300;
  animation: cursorBlink .8s step-end infinite; margin-left: 1px;
}
@keyframes cursorBlink { 50%{ opacity:0 } }
#input {
  width: 100%; background: transparent; border: none; outline: none;
  resize: none; color: var(--ink);
  font-family: var(--sans); font-size: 16px; font-weight: 300;
  line-height: 1.5; max-height: 130px; overflow-y: auto;
  caret-color: var(--gold);
}
#input::-webkit-scrollbar{ width:2px }
#input::-webkit-scrollbar-thumb{ background:var(--border) }
#sendBtn {
  flex-shrink: 0; width: 42px; height: 42px;
  background: var(--gold); border: none;
  color: var(--void); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s; margin-bottom: 1px;
}
#sendBtn:hover{ background:var(--gold-hi); transform:scale(1.06) }
#sendBtn:disabled{ opacity:.28; cursor:not-allowed; transform:none }

/* ════════════════════════════════════════
   WELCOME COMMAND CHIPS
   ════════════════════════════════════════ */
.wc-commands {
  width: 100%; max-width: 860px;
  opacity: 0; animation: riseIn .7s var(--ease) 2.0s forwards;
}
.wc-cmd-label {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .22em; color: rgba(255,255,255,.18);
  text-transform: uppercase;
}
.wc-cmd-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.wc-cmd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
/* Command chip */
.cmd {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-family: var(--sans); font-size: 15px; font-weight: 300;
  cursor: pointer; text-align: left; position: relative; overflow: hidden;
  transition: border-color .2s, color .2s;
}
.cmd::before {
  content: ''; position: absolute;
  top: 0; left: 0; bottom: 0; width: 2px;
  background: var(--gold); opacity: 0; transition: opacity .2s;
}
.cmd::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--gold-lo) 0%, transparent 55%);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.cmd:hover{ border-color: var(--border-gold); color: var(--ink) }
.cmd:hover::before{ opacity: 1 }
.cmd:hover::after { transform: scaleX(1) }
.cmd-icon {
  font-size: 12px; color: rgba(201,168,76,.35); flex-shrink: 0;
  position: relative; z-index: 1; transition: color .2s;
}
.cmd:hover .cmd-icon { color: var(--gold); }
.cmd-text { flex: 1; position: relative; z-index: 1; }
.cmd-arrow {
  font-size: 13px; color: rgba(201,168,76,.2);
  position: relative; z-index: 1;
  transition: transform .2s, color .2s;
}
.cmd:hover .cmd-arrow{ transform: translateX(4px); color: var(--gold); }
.cmd-farsi .cmd-text { font-family: var(--serif); font-size: 17px; }
/* Full-width chip */
.cmd.cmd-wide { grid-column: 1 / -1; }

/* ════════════════════════════════════════
   CONSOLE (FIXED BOTTOM — AFTER 1ST MSG)
   ════════════════════════════════════════ */
#console {
  display: none; /* shown by JS on first message */
  flex-shrink: 0;
  padding: 18px 44px 24px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  animation: consoleUp .5s var(--ease) forwards;
}
@keyframes consoleUp {
  from{ transform:translateY(12px); opacity:0 }
  to  { transform:translateY(0); opacity:1 }
}
.cns-footer {
  margin-top: 10px;
  font-family: var(--mono); font-size: 11px;
  color: rgba(255,255,255,.13); text-align: center; letter-spacing: .04em;
}
.cns-footer a{ color: rgba(201,168,76,.35); text-decoration:none }
.cns-footer a:hover{ color: var(--gold) }
/* When inputComponent is inside console, add side padding */
#console #inputComponent {
  margin: 0;
}

/* ════════════════════════════════════════
   TRANSMISSIONS
   ════════════════════════════════════════ */
#transmissions { padding: 0 44px; }

.transmission {
  position: relative;
  padding: 34px 28px 34px 24px;
  border-left: 1px solid rgba(201,168,76,.1);
  margin: 6px 0;
  animation: txIn .45s var(--ease) forwards;
}
@keyframes txIn {
  from{ opacity:0; transform:translateY(10px) }
  to  { opacity:1; transform:translateY(0) }
}
.tx-scan {
  position: absolute; top:0; left:0; right:0; height:1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(201,168,76,.22) 65%, transparent 100%);
  transform-origin: left; animation: scanReveal .55s var(--ease) forwards;
}
@keyframes scanReveal { from{ transform:scaleX(0) } to{ transform:scaleX(1) } }
.tx-glow {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(201,168,76,.04) 0%, transparent 40%);
  pointer-events: none; animation: txGlowFade 4s ease-out forwards;
}
@keyframes txGlowFade { 0%{ opacity:1 } 100%{ opacity:0 } }
.tx-bracket {
  position: absolute; top:-1px; left:-1px;
  width:10px; height:10px;
  border-top:1px solid rgba(201,168,76,.5);
  border-left:1px solid rgba(201,168,76,.5);
  pointer-events:none;
}
.transmission::after {
  content:''; position:absolute; bottom:0; right:0;
  width:8px; height:8px;
  border-bottom:1px solid rgba(201,168,76,.1);
  border-right:1px solid rgba(201,168,76,.1);
}
.tx-header {
  display:flex; align-items:center; gap:12px; margin-bottom:18px;
}
.tx-header-name {
  font-family:var(--mono); font-size:11px; font-weight:400;
  letter-spacing:.25em; color:var(--gold); text-transform:uppercase;
}
.tx-header-divider{ color:rgba(201,168,76,.2); font-size:14px }
.tx-header-num {
  font-family:var(--mono); font-size:11px; letter-spacing:.18em;
  color:rgba(201,168,76,.3);
}
.tx-header-time {
  margin-left:auto; font-family:var(--mono); font-size:11px;
  color:var(--ink-4); letter-spacing:.1em; font-variant-numeric:tabular-nums;
}
.tx-body {
  font-family:var(--serif); font-size:17px; font-weight:300;
  line-height:1.82; color:var(--ink); position:relative;
}
.tx-body.streaming::after {
  content:''; position:absolute; top:0; bottom:0; width:100px;
  background:linear-gradient(90deg,transparent,rgba(201,168,76,.06),transparent);
  pointer-events:none; animation:shimmerSweep 1.8s linear infinite;
  mix-blend-mode:screen;
}
@keyframes shimmerSweep { from{ left:-100px } to{ left:100% } }
.tx-body p{ margin-bottom:14px }
.tx-body p:last-child{ margin-bottom:0 }
.tx-body strong{ font-weight:600; color:#fff }
.tx-body em{ font-style:italic; color:var(--ink-2) }
.tx-body a{ color:var(--gold); text-decoration:none; border-bottom:1px solid rgba(201,168,76,.22); transition:all .2s }
.tx-body a:hover{ color:var(--gold-hi); border-bottom-color:var(--gold) }
.tx-body ul, .tx-body ol{ padding-left:22px; margin:10px 0 }
.tx-body li{ margin-bottom:6px }
.stream-cursor {
  display:inline-block; width:2px; height:.88em;
  background:var(--gold); vertical-align:text-bottom;
  margin-left:2px; animation:cursorBlink .65s step-end infinite;
}
.tx-extras{ margin-top:4px }
.tx-user {
  display:flex; justify-content:flex-end;
  padding:16px 0 8px;
}
.tx-user-inner {
  display:flex; flex-direction:column; align-items:flex-end;
  gap:5px; max-width:60%;
}
.tx-user-meta {
  font-family:var(--mono); font-size:10px;
  letter-spacing:.14em; color:rgba(201,168,76,.3);
}
.tx-user-text {
  font-size:16px; font-weight:300;
  color:var(--ink-2); text-align:right; line-height:1.6;
}

/* ════════════════════════════════════════
   MARKET CARD
   ════════════════════════════════════════ */
.market-card {
  position:relative; margin-top:22px;
  border:1px solid rgba(201,168,76,.18);
  overflow:hidden; max-width:500px;
  animation:cardIn .5s var(--ease) .1s both;
  background:var(--panel);
}
@keyframes cardIn {
  from{ opacity:0; transform:translateY(8px) }
  to  { opacity:1; transform:translateY(0) }
}
.market-card::before {
  content:''; position:absolute; top:-1px; left:-1px;
  width:12px; height:12px;
  border-top:1px solid var(--gold); border-left:1px solid var(--gold); z-index:2;
}
.mc-scanner {
  position:absolute; top:0; left:0; right:0; height:40%;
  background:linear-gradient(to bottom,transparent,rgba(201,168,76,.04),rgba(201,168,76,.07),rgba(201,168,76,.04),transparent);
  pointer-events:none; animation:mcScan 5s ease-in-out 1s infinite; z-index:1;
}
@keyframes mcScan {
  0%  { top:-40%; opacity:0 }
  10% { opacity:1 }
  80% { opacity:.5 }
  100%{ top:100%; opacity:0 }
}
.mc-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:11px 16px; border-bottom:1px solid rgba(201,168,76,.1);
  background:rgba(201,168,76,.04);
}
.mc-area-name { font-family:var(--mono); font-size:9.5px; letter-spacing:.2em; color:var(--gold); text-transform:uppercase; }
.mc-intel-badge { font-family:var(--mono); font-size:8px; letter-spacing:.18em; color:var(--ink-3); text-transform:uppercase; }
.mc-body{ padding:14px 16px; position:relative; z-index:1 }
.mc-stat {
  display:flex; align-items:baseline; justify-content:space-between;
  padding:6px 0; border-bottom:1px solid rgba(255,255,255,.035);
}
.mc-stat:last-of-type{ border-bottom:none }
.mc-key{ font-family:var(--mono); font-size:8.5px; letter-spacing:.14em; color:var(--ink-3); text-transform:uppercase }
.mc-val{ font-family:var(--serif); font-size:18px; font-weight:400; color:var(--ink); display:flex; align-items:center; gap:8px }
.mc-badge-pos{ font-family:var(--mono); font-size:10px; color:var(--gold) }
.mc-badge-neg{ font-family:var(--mono); font-size:10px; color:#888 }
.mc-heat{ padding:12px 0 6px }
.mc-heat-row{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:7px }
.mc-heat-lbl{ font-family:var(--mono); font-size:8.5px; letter-spacing:.14em; color:var(--ink-3); text-transform:uppercase }
.mc-heat-val{ font-family:var(--serif); font-size:18px; color:var(--gold) }
.mc-heat-bar{ height:3px; background:rgba(255,255,255,.06); overflow:hidden }
.mc-heat-fill{
  height:100%; width:0%;
  background:linear-gradient(90deg,var(--gold) 0%,var(--gold-hi) 100%);
  box-shadow:0 0 8px rgba(201,168,76,.4);
  transition:width 1.4s var(--ease);
}
.mc-spark{ margin-top:12px; padding-top:10px; border-top:1px solid rgba(255,255,255,.04) }
.mc-spark-header{ display:flex; justify-content:space-between; margin-bottom:6px }
.mc-spark-lbl{ font-family:var(--mono); font-size:8px; letter-spacing:.12em; color:var(--ink-3) }
.mc-spark-lbl:last-child{ color:var(--gold) }
.mc-spark svg{ display:block; width:100% }
.mc-foot{
  padding:7px 16px; border-top:1px solid var(--border);
  font-family:var(--mono); font-size:8.5px; color:rgba(255,255,255,.15); letter-spacing:.06em;
}

/* ════════════════════════════════════════
   LEAD FORM
   ════════════════════════════════════════ */
.lead-card {
  position:relative; margin-top:22px; max-width:500px;
  border:1px solid rgba(201,168,76,.22); padding:28px 28px 28px 32px;
  background:rgba(201,168,76,.02); animation:cardIn .6s var(--ease) .15s both;
}
.lead-card::before {
  content:''; position:absolute; top:0; left:0;
  width:2px; height:100%;
  background:linear-gradient(to bottom,var(--gold),rgba(201,168,76,.15));
}
.lc-corner-tl { position:absolute; top:-1px; left:-1px; width:10px; height:10px; border-top:1px solid var(--gold); border-left:1px solid var(--gold); }
.lc-corner-br { position:absolute; bottom:-1px; right:-1px; width:10px; height:10px; border-bottom:1px solid rgba(201,168,76,.25); border-right:1px solid rgba(201,168,76,.25); }
.lc-prompt { font-family:var(--serif); font-style:italic; font-size:21px; font-weight:300; color:var(--ink); line-height:1.55; margin-bottom:24px; }
.lc-field{ margin-bottom:20px }
.lc-label{ display:block; font-family:var(--mono); font-size:8.5px; letter-spacing:.2em; color:var(--ink-3); text-transform:uppercase; margin-bottom:8px; }
.lc-input { width:100%; background:transparent; border:none; border-bottom:1px solid rgba(255,255,255,.12); color:var(--ink); font-family:var(--sans); font-size:15px; font-weight:300; padding:8px 0; caret-color:var(--gold); outline:none; transition:border-color .2s; }
.lc-input::placeholder{ color:rgba(255,255,255,.12) }
.lc-input:focus{ border-bottom-color:var(--gold) }
.lc-submit {
  display:inline-flex; align-items:center; gap:10px;
  margin-top:22px; padding:11px 26px;
  background:transparent; border:1px solid var(--gold);
  color:var(--gold); cursor:pointer;
  font-family:var(--mono); font-size:9.5px; font-weight:400;
  letter-spacing:.2em; text-transform:uppercase; transition:all .2s;
  position:relative; overflow:hidden;
}
.lc-submit::before{ content:''; position:absolute; inset:0; background:var(--gold); transform:scaleX(0); transform-origin:left; transition:transform .25s var(--ease); z-index:0; }
.lc-submit:hover::before{ transform:scaleX(1) }
.lc-submit:hover{ color:var(--void) }
.lc-submit span, .lc-submit svg{ position:relative; z-index:1 }
.lc-submit svg{ transition:transform .2s }
.lc-submit:hover svg{ transform:translateX(4px) }
.lead-confirmed {
  margin-top:18px; padding:14px 18px 14px 20px;
  border-left:2px solid var(--gold); background:rgba(201,168,76,.03);
  font-family:var(--serif); font-style:italic;
  font-size:17px; color:var(--ink-2);
  animation:riseIn .4s var(--ease) forwards;
}

/* ════════════════════════════════════════
   TYPING + CTA
   ════════════════════════════════════════ */
.typing-block {
  padding:24px 0 16px 20px;
  display:flex; align-items:center; gap:12px;
  border-left:1px solid rgba(201,168,76,.08);
}
.typing-id{ font-family:var(--mono); font-size:8.5px; letter-spacing:.22em; color:rgba(201,168,76,.4); text-transform:uppercase; }
.typing-dots{ display:flex; gap:5px; align-items:center; }
.typing-dot{ width:4px; height:4px; border-radius:50%; background:rgba(201,168,76,.5); animation:dotBounce 1.2s ease infinite; }
.typing-dot:nth-child(2){ animation-delay:.18s }
.typing-dot:nth-child(3){ animation-delay:.36s }
@keyframes dotBounce {
  0%,80%,100%{ transform:translateY(0); opacity:.3 }
  40%{ transform:translateY(-4px); opacity:1 }
}
.cta-book {
  display:inline-flex; align-items:center; gap:9px;
  margin-top:18px; padding:11px 22px;
  border:1px solid rgba(201,168,76,.22); color:rgba(201,168,76,.7);
  text-decoration:none; font-family:var(--mono); font-size:9px;
  letter-spacing:.18em; text-transform:uppercase;
  transition:all .2s; background:transparent;
}
.cta-book:hover{ border-color:var(--gold); color:var(--gold); background:var(--gold-lo); }

/* ════════════════════════════════════════
   SIGNATURE
   ════════════════════════════════════════ */
#signature {
  position: fixed;
  bottom: 16px; right: 22px;
  font-family: var(--mono); font-size: 9px;
  font-weight: 400; letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(201,168,76,.22);
  pointer-events: none; z-index: 9999;
  user-select: none;
  text-rendering: geometricPrecision;
}
#signature span {
  color: rgba(201,168,76,.45);
  font-weight: 500;
}

/* ════════════════════════════════════════
   TOAST
   ════════════════════════════════════════ */
#toast {
  position:fixed; bottom:90px; left:50%;
  transform:translateX(-50%) translateY(12px);
  display:flex; align-items:center; gap:8px;
  padding:9px 20px; background:var(--panel);
  border:1px solid var(--gold); color:var(--gold-hi);
  font-family:var(--mono); font-size:11px; letter-spacing:.06em;
  opacity:0; pointer-events:none; transition:all .3s var(--ease);
  white-space:nowrap; z-index:300;
}
#toast.show{ opacity:1; transform:translateX(-50%) translateY(0) }

/* ════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════ */
@keyframes riseIn {
  from{ opacity:0; transform:translateY(12px) }
  to  { opacity:1; transform:translateY(0) }
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
/* ════════════════════════════════════════
   RESPONSIVE — TABLET
   ════════════════════════════════════════ */
@media (max-width: 768px) {
  #header { padding: 16px 24px; }
  .hd-sep { display: none; }
  .hd-tagline { display: none; }
  .hd-site { display: none; }
  .hd-right { gap: 14px; }
  .live-badge { padding: 6px 14px 6px 26px; font-size: 10px; }

  #welcome { padding: 0 24px 32px; }
  .wc-upper { min-height: 38vh; padding-bottom: 24px; }
  .wc-logo { font-size: 60px; }
  .wc-tagline { font-size: 22px; }
  .wc-desc { font-size: 14px; }

  .wc-cmd-grid { grid-template-columns: 1fr 1fr; }
  .market-card, .lead-card { max-width: 100%; }

  #transmissions { padding-left: 24px; padding-right: 24px; }
  #console { padding: 12px 24px 14px; }
}

/* ════════════════════════════════════════
   RESPONSIVE — MOBILE
   ════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Header */
  #header { padding: 11px 16px; gap: 8px; }
  .hd-logo { font-size: 17px; letter-spacing: .22em; }
  .hd-logo em { font-size: 13px; }
  .hd-sep, .hd-tagline, .hd-site { display: none; }
  .hd-right { gap: 10px; }
  .live-badge { padding: 5px 12px 5px 24px; font-size: 9px; letter-spacing: .14em; }
  .live-dot { left: 12px; }
  .live-ring { left: 12px; }
  .btn-cta { padding: 6px 11px; font-size: 8px; letter-spacing: .08em; }
  .btn-cta svg { display: none; }

  /* Welcome — tighten vertical space so chips fit without scrolling */
  #welcome { padding: 0 16px 20px; }
  .wc-upper {
    min-height: unset;       /* remove forced height — let content size naturally */
    padding-bottom: 16px;
  }
  .wc-logo-zone { width: 100px; height: 100px; margin-bottom: 8px; }
  .wc-logo { font-size: 44px; letter-spacing: .2em; }
  .wc-tagline { font-size: 17px; margin-bottom: 6px; }
  .wc-desc { font-size: 12.5px; line-height: 1.65; margin-bottom: 14px; }
  .wc-strip { display: none; }

  /* Input zone */
  .wc-input-zone { margin-bottom: 14px; }
  .inp-top { padding: 8px 14px 6px; }
  .inp-row { padding: 11px 14px; gap: 10px; }
  #input { font-size: 15px; }
  .inp-overlay { font-size: 15px; }
  #sendBtn { width: 38px; height: 38px; }

  /* Command chips — always visible, 2 col */
  .wc-commands { width: 100%; }
  .wc-cmd-label { font-size: 9px; gap: 8px; margin-bottom: 10px; }
  .wc-cmd-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cmd { font-size: 12.5px; padding: 12px 12px; }

  /* Transmissions */
  #transmissions { padding-left: 16px; padding-right: 16px; }
  .tx-body { font-size: 15px; line-height: 1.75; }
  .tx-header { margin-bottom: 10px; }
  .market-card, .lead-card { max-width: 100%; }
  .mc-grid { grid-template-columns: 1fr 1fr; }

  /* Console */
  #console { padding: 10px 16px 12px; }
  .cns-footer { font-size: 10px; }

  /* Charts */
  .chart-wrap { height: 200px !important; }
}

/* ════════════════════════════════════════
   RESPONSIVE — VERY SMALL (iPhone SE etc)
   ════════════════════════════════════════ */
@media (max-width: 360px) {
  .wc-logo { font-size: 40px; }
  .wc-tagline { font-size: 16px; }
  .wc-cmd-grid { grid-template-columns: 1fr; }
  .btn-cta { padding: 6px 10px; font-size: 8px; }
}

/* ── RA SIGNATURE ── */
#ra-sig {
  position: fixed;
  bottom: 18px;
  right: 22px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .12em;
  color: rgba(181,137,42,.35);
  pointer-events: none;
  z-index: 9999;
  transition: color .3s;
}
#ra-sig em {
  font-style: italic;
  color: rgba(201,168,76,.5);
  letter-spacing: .06em;
}
#ra-sig:hover {
  color: rgba(181,137,42,.7);
}
