/* TheonesteDev Gold Lab – stream overlay. Fixed 1920x1080 stage, scaled to fit the window. */
:root {
  --ink: #0F1A1C;        /* vault slate-green background */
  --panel: #142227;
  --panel-2: #1A2C32;
  --line: #27393F;
  --text: #ECE6D6;       /* warm paper */
  --muted: #93A5A7;
  --gold: #D9B25F;       /* bullion */
  --gold-soft: rgba(217, 178, 95, .14);
  --up: #4CC59A;         /* jade */
  --down: #E2685A;       /* cinnabar */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #050909; overflow: hidden; }

#stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  display: grid;
  grid-template-rows: 92px 1fr 118px;
  background:
    radial-gradient(1200px 600px at 22% 18%, rgba(217,178,95,.07), transparent 60%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- Header ---------- */
.top {
  display: grid;
  grid-template-columns: 360px 1fr 420px;
  align-items: center;
  gap: 40px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: .2px; }
.brand .mark { width: 48px; height: 32px; }
.brand .lockup { display: flex; flex-direction: column; gap: 6px; line-height: 1; }
.brand .lockup small { font: 600 15px/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }

.sessions { display: grid; gap: 6px; }
.strip { position: relative; height: 48px; background: var(--panel); border-radius: 6px; overflow: hidden; }
.band {
  position: absolute; height: 14px;
  font-size: 12px; line-height: 14px; padding-left: 8px;
  color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden;
  border-radius: 3px; opacity: .45;
}
.band.asia   { top: 2px;  background: #7FA7B0; }
.band.london { top: 17px; background: #B9C59A; }
.band.ny     { top: 32px; background: var(--gold); }
.band.active { opacity: 1; }
.now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); box-shadow: 0 0 0 3px rgba(236,230,214,.12); }
.hours { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.clocks { display: flex; justify-content: flex-end; align-items: center; gap: 28px; }
.clocks > div:not(.demo) { display: grid; text-align: right; }
.clocks span { font-size: 28px; font-weight: 500; }
.clocks small { font-size: 14px; color: var(--muted); }
.demo {
  font-size: 13px; color: var(--gold); border: 1px solid var(--gold);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.demo[hidden] { display: none; }

/* ---------- Main ---------- */
main {
  display: grid;
  grid-template-columns: 1fr 560px;
  gap: 24px;
  padding: 22px 32px;
  min-height: 0;
}

.market { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.quote { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 48px; align-items: end; padding-bottom: 14px; }
.sym { grid-column: 1 / -1; display: flex; gap: 18px; align-items: baseline; font-size: 20px; color: var(--muted); }
.sym strong { color: var(--text); font-size: 24px; font-weight: 600; }
.session-name { color: var(--gold); }
.price-row { display: flex; align-items: baseline; gap: 22px; }
.price {
  font-family: var(--serif); font-weight: 500;
  font-size: 112px; line-height: 1; letter-spacing: -2px;
  color: var(--gold);
  font-variant-numeric: lining-nums tabular-nums;
  transition: color .25s;
}
.price.tick-up { color: #F0D592; }
.price.tick-down { color: #C99A45; }
.chg { font-size: 28px; font-weight: 500; }
.range { display: flex; gap: 36px; margin: 0 0 10px; justify-self: end; }
.range div { display: grid; gap: 2px; }
.range dt { font-size: 15px; color: var(--muted); }
.range dd { margin: 0; font-size: 24px; font-weight: 500; }

.chart-wrap { position: relative; min-height: 0; background: var(--panel); border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
#chart { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Side cards ---------- */
.side { display: grid; grid-template-rows: auto auto 1fr; gap: 14px; min-height: 0; min-width: 0; }
.side > .card { min-width: 0; }
.side > [hidden] { display: none; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 24px; min-height: 0; }
.card h2 { margin: 0 0 14px; font-size: 20px; font-weight: 600; }

/* Active signal */
.signal { border-color: rgba(217,178,95,.45); }
.signal.fresh { animation: fresh 1.8s ease-out 1; }
@keyframes fresh {
  0%   { box-shadow: 0 0 0 0 rgba(217,178,95,.0); background: var(--panel-2); }
  15%  { box-shadow: 0 0 0 6px rgba(217,178,95,.35); }
  100% { box-shadow: 0 0 0 0 rgba(217,178,95,0); background: var(--panel); }
}
.sig-head { display: flex; align-items: center; gap: 14px; }
.dir { font-family: var(--serif); font-size: 44px; font-weight: 600; line-height: 1; }
.dir.buy { color: var(--up); }
.dir.sell { color: var(--down); }
.grade { font-size: 16px; font-weight: 600; color: var(--ink); background: var(--gold); padding: 3px 10px; border-radius: 4px; }
.sig-meta { margin-left: auto; text-align: right; font-size: 15px; color: var(--muted); display: grid; }
.sig-meta b { color: var(--text); font-size: 22px; font-weight: 500; }
.sig-why { margin: 10px 0 14px; font-size: 18px; color: var(--muted); }

.levels { display: grid; gap: 10px; }
.levels.main { grid-template-columns: 1fr 1fr; }
.levels.tps { grid-template-columns: repeat(3, 1fr); margin-top: 10px; }
.lvl { display: grid; gap: 1px; padding: 10px 12px; border-radius: 6px; background: var(--panel-2); }
.lvl .name { font-size: 15px; color: var(--muted); }
.lvl .name i { font-style: normal; color: var(--up); font-weight: 600; margin-left: 4px; }
.lvl .val { font-weight: 600; font-size: 26px; }
.levels.main .lvl .val { font-size: 30px; }
.lvl .dist { color: var(--muted); font-size: 14px; }
.lvl.sl .val { color: var(--down); }
.lvl.tp .val { color: var(--up); }
.lvl.hit { background: rgba(76,197,154,.12); }

.trail-note { margin: 12px 0 0; font-size: 16px; line-height: 1.4; color: var(--muted); }
.ruler { position: relative; margin: 16px 4px 0; height: 46px; }
.ruler .rail { position: absolute; left: 0; right: 0; top: 18px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(226,104,90,.55), rgba(226,104,90,.15) var(--entry, 30%), rgba(76,197,154,.15) var(--entry, 30%), rgba(76,197,154,.55)); }
.ruler .tick { position: absolute; top: 12px; width: 2px; height: 20px; background: var(--text); opacity: .6; transform: translateX(-1px); }
.ruler .tick span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--muted); white-space: nowrap; }
.ruler .dot {
  position: absolute; top: 12px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--ink); transform: translateX(-10px);
  transition: left .25s linear;
}
.pnl { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 18px; color: var(--muted); }
.pnl b { font-size: 30px; font-weight: 600; }

.waiting { display: grid; gap: 10px; padding: 8px 0; }
.waiting .dir { color: var(--muted); font-size: 34px; }
.waiting p { margin: 0; font-size: 18px; color: var(--muted); }

/* Official card extras */
.card h2 small { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.waiting .record { font-size: 16px; }

/* Experimental lanes: cool, dashed cards so they never read as official signals; stacked when several */
.lab-stack { display: grid; gap: 10px; min-width: 0; }
.lab-stack:empty { display: none; }
.lab.compact { padding: 10px 20px; }
.lab.compact h2 { margin-bottom: 4px; font-size: 18px; }
.lab.compact .lab-wait { margin: 0; font-size: 14px; }
.lab.compact .lab-rec, .lab.compact .lab-bt { margin-top: 3px; font-size: 13px; }
.lab { border: 1.5px dashed rgba(143,183,201,.55); background: rgba(143,183,201,.05); padding: 14px 22px 14px; }
.lab h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lab .paper { font-size: 14px; font-weight: 500; color: #8FB7C9; border: 1px solid rgba(143,183,201,.55); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.lab-wait { margin: 0 0 8px; font-size: 16px; line-height: 1.4; color: var(--muted); }
.lab-head { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lab-head .dir { font-size: 32px; }
.lab-why { font-size: 16px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-left { font-size: 16px; color: #8FB7C9; white-space: nowrap; }
.lab-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.lab-levels .lv { display: grid; padding: 7px 10px; border-radius: 6px; background: rgba(143,183,201,.08); }
.lab-levels .lv span { font-size: 13px; color: var(--muted); }
.lab-levels .lv b { font-size: 19px; font-weight: 600; }
.lab-levels .lv.sl b { color: var(--down); }
.lab-levels .lv.tp b { color: var(--up); }
.lab-levels .lv.hit { background: rgba(76,197,154,.14); }
.lab .pnl { margin-top: 6px; font-size: 16px; }
.lab .pnl b { font-size: 24px; }
.lab-rec, .lab-bt { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.lab-rec b { font-weight: 600; }
.lab.fresh { animation: labFresh 1.8s ease-out 1; }
@keyframes labFresh { 0% { box-shadow: 0 0 0 0 rgba(143,183,201,0); } 15% { box-shadow: 0 0 0 6px rgba(143,183,201,.35); } 100% { box-shadow: 0 0 0 0 rgba(143,183,201,0); } }

/* Market radar */
.radar { overflow: hidden; display: grid; grid-template-rows: auto 1fr; padding-bottom: 8px; }
.radar h2 { margin-bottom: 6px; }
.events { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.events li { display: grid; grid-template-columns: 52px 92px 1fr; column-gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); }
.events li:first-child { border-top: 0; }
.events time { font-size: 15px; color: var(--muted); }
.events .tag { font-size: 13px; font-weight: 600; text-align: center; padding: 2px 0; border-radius: 4px; background: var(--panel-2); }
.events .tag.up { color: var(--up); }
.events .tag.down { color: var(--down); }
.events .tag.flat { color: var(--gold); }
.events p { margin: 0; font-size: 16px; line-height: 1.35; }
.events li.empty { display: block; }
.events li.empty p { color: var(--muted); }
.events li.new { animation: rowIn 1.6s ease-out 1; }

/* Today */
.stats { display: grid; grid-template-columns: 0.8fr 1.4fr 1fr 1fr; column-gap: 12px; }
.stats div { display: grid; }
.stats b { font-size: 30px; font-weight: 600; }
.stats span { font-size: 15px; color: var(--muted); white-space: nowrap; }
.stats em { font-style: normal; }
.note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.card.today h2, .card.recent h2 { margin-bottom: 10px; }

/* Recent */
.recent { overflow: hidden; }
.recent table { width: 100%; border-collapse: collapse; font-size: 19px; }
.recent td { padding: 7px 0; border-top: 1px solid var(--line); }
.recent tr:first-child td { border-top: 0; }
.recent td.t { color: var(--muted); width: 72px; }
.recent td.d { width: 70px; font-weight: 600; }
.recent td.o { color: var(--muted); }
.recent td.p { text-align: right; font-weight: 600; }
.recent tr.new td { animation: rowIn 1.2s ease-out 1; }
@keyframes rowIn { from { background: var(--gold-soft); } to { background: transparent; } }

/* ---------- Footer ---------- */
footer { display: grid; grid-template-rows: 50px 1fr; border-top: 1px solid var(--line); }
.ticker { overflow: hidden; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.track { display: flex; gap: 56px; white-space: nowrap; padding-left: 32px; animation: scroll 60s linear infinite; font-size: 19px; }
.track .it b { font-weight: 600; margin: 0 10px; }
.track .it { color: var(--muted); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.bottom { display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.promo { display: flex; align-items: baseline; gap: 18px; font-size: 22px; }
.promo > b { font-family: var(--serif); font-size: 32px; color: var(--gold); font-weight: 600; }
.promo .tg { color: var(--muted); font-size: 19px; }
.promo .tg b { color: var(--text); font-weight: 500; }
.disclaimer { margin: 0; font-size: 15px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
  .signal.fresh, .recent tr.new td, .lab.fresh, .events li.new { animation: none; }
  .ruler .dot, .price { transition: none; }
}
