:root {
  --bg: #05080b;
  --panel: #0b1117;
  --panel-2: #0f171f;
  --panel-3: #121d26;
  --line: #1c2b36;
  --line-soft: rgba(255,255,255,.07);
  --text: #eef6f2;
  --muted: #94a8af;
  --faint: #60737c;
  --pex: #005866;
  --pex-bright: #0c7d8d;
  --pex-2: #90b7bc;
  --cyan: #7dd3fc;
  --green: #17c783;
  --red: #f15f5f;
  --amber: #eebc52;
  --shadow: 0 28px 90px rgba(0,0,0,.48);
}
* { box-sizing: border-box; }
body.pex-page {
  min-height: 100vh;
  margin: 0;
  padding-bottom: 54px;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(0,88,102,.26), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(125,211,252,.08), transparent 25%),
    linear-gradient(180deg, #070a0e 0%, #030507 100%);
}
body.pex-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.42), transparent 70%);
}
.entry-transition {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(0,88,102,.45), transparent 32%),
    rgba(3,5,8,.96);
  animation: entryFade 1.65s cubic-bezier(.16,1,.3,1) both;
}
.entry-transition img {
  width: min(540px, 76vw);
  filter: drop-shadow(0 34px 90px rgba(127,167,172,.42));
  animation: entryLogo 1.65s cubic-bezier(.16,1,.3,1) both;
}
body.skip-entry .entry-transition { display: none; }
@keyframes entryFade { 0%{opacity:1} 70%{opacity:1} 100%{opacity:0;visibility:hidden} }
@keyframes entryLogo { 0%{opacity:0;transform:translateY(26px) scale(.72)} 32%{opacity:1;transform:translateY(0) scale(1.04)} 70%{opacity:1;transform:scale(.98)} 100%{opacity:0;transform:translateY(-14px) scale(1.16)} }
.exchange-shell {
  position: relative;
  z-index: 1;
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 16px 18px 38px;
}
.exchange-header {
  min-height: 92px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 320px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  position: sticky;
  top: 10px;
  z-index: 30;
  border: 1px solid rgba(127,167,172,.22);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10,15,20,.94), rgba(7,11,15,.86));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.backtest-link {
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #d9e7e4;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #081017;
  border-radius: 16px;
  font-weight: 900;
  transition: .18s ease;
}
.backtest-link:hover { transform: translateY(-1px); border-color: rgba(127,167,172,.5); color: #fff; }
.exchange-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}
.brand-mark-mini {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #10222d, #0a3c45);
  border: 1px solid rgba(127,167,172,.34);
  color: #caf0f0;
  font-size: 20px;
}
.brand-word { font-weight: 950; font-size: clamp(22px, 2vw, 32px); letter-spacing: -.04em; color: #fff; }
.brand-cross { color: var(--pex-2); font-weight: 950; font-size: 28px; }
.pex-brand-logo { height: 68px; max-width: 250px; object-fit: contain; filter: drop-shadow(0 14px 26px rgba(127,167,172,.18)); }
.market-state {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #081018;
}
.market-state span:nth-child(2) { font-weight: 950; color: #fff; }
.market-state small { color: var(--muted); font-size: 12px; }
.state-pulse { width: 9px; height: 9px; border-radius: 999px; background: var(--red); box-shadow: 0 0 0 6px rgba(241,95,95,.12); }
.market-state.open .state-pulse { background: var(--green); box-shadow: 0 0 0 6px rgba(23,199,131,.12); animation: pulse 1.3s infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.35)} }
.pex-hero {
  margin: 14px 0;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(127,167,172,.18);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(0,88,102,.28), rgba(10,16,22,.72) 44%, rgba(8,12,17,.96)),
    #0b1117;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.hero-kicker { color: var(--pex-2); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; font-weight: 950; }
.pex-hero h1 { margin: 6px 0 0; max-width: 820px; color: #fff; font-size: clamp(24px, 2.4vw, 38px); line-height: 1.06; letter-spacing: -.05em; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hero-badges span { padding: 9px 11px; border: 1px solid rgba(127,167,172,.24); border-radius: 999px; color: #dcebe8; background: rgba(5,10,14,.54); font-size: 12px; font-weight: 900; }
.market-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.metric-card { background: linear-gradient(180deg, #0b1218, #070b10); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; min-height: 88px; }
.metric-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .11em; }
.metric-card strong { display: block; margin-top: 9px; color: #fff; font-size: 21px; letter-spacing: -.02em; }
.metric-card p { margin: 6px 0 0; color: var(--faint); font-size: 12px; line-height: 1.35; }
.view-tabs { display: flex; gap: 10px; margin: 10px 0 14px; }
.view-tab { border: 1px solid var(--line); background: #0b1117; color: #a4b5bd; border-radius: 16px; padding: 12px 18px; font-weight: 950; cursor: pointer; transition: .18s; display: flex; align-items: center; gap: 9px; }
.view-tab.active { background: linear-gradient(135deg, rgba(0,88,102,.58), rgba(127,167,172,.16)); color: #fff; border-color: rgba(127,167,172,.45); box-shadow: 0 15px 35px rgba(0,88,102,.18); }
.view-tab:hover { color: #fff; transform: translateY(-1px); }
.view-panel { display: none; animation: panelIn .22s ease both; }
.view-panel.active { display: block; }
@keyframes panelIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.panel-grid { display: grid; gap: 14px; }
.historical-grid-clean { grid-template-columns: minmax(0, 1fr) 430px; }
.secondary-grid { grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); margin-top: 14px; }
.live-grid-clean { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 14px; }
.exchange-card { background: linear-gradient(180deg, rgba(14,22,29,.98), rgba(7,11,16,.98)); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.card-titlebar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.card-titlebar.compact { min-height: 64px; }
.label { display: inline-flex; align-items: center; gap: 8px; color: var(--pex-2); font-size: 11px; font-weight: 950; text-transform: uppercase; letter-spacing: .12em; }
.card-titlebar h2 { margin: 5px 0 0; color: #fff; font-size: 18px; line-height: 1; }
.small-action, .refresh-btn, .sort-btn { height: 40px; border: 1px solid var(--line); border-radius: 13px; background: #081018; color: #dce8e6; font-weight: 950; cursor: pointer; padding: 0 13px; }
.small-action:hover, .refresh-btn:hover, .sort-btn:hover { border-color: rgba(127,167,172,.5); color: #fff; }
.pex-input { height: 40px; border: 1px solid var(--line); border-radius: 13px; background: #071017; color: #eef6f2; padding: 0 12px; outline: none; font-weight: 750; min-width: 0; }
.pex-input:focus { border-color: rgba(127,167,172,.58); box-shadow: 0 0 0 4px rgba(127,167,172,.08); }
.rank-controls, .live-tools { display: flex; gap: 9px; align-items: center; }
.rank-controls { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.chart-box { height: 380px; padding: 16px; }
.market-history-box { height: 420px; }
.ranking-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; max-height: 540px; overflow: auto; }
.rank-row { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 1px solid transparent; background: #081018; color: var(--text); border-radius: 14px; padding: 10px; cursor: pointer; transition: .16s; }
.rank-row:hover, .rank-row.active { background: #101a22; border-color: rgba(127,167,172,.32); transform: translateX(2px); }
.rank-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; background: #101923; color: var(--pex-2); font-size: 12px; font-weight: 950; }
.rank-main { min-width: 0; }
.rank-main strong { display: block; color: #fff !important; font-size: 14px; }
.rank-main span { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.rank-value { font-weight: 950; font-size: 13px; color: #dce7e5; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.neutral { color: var(--muted) !important; }
.symbols-card, .events-card { min-height: 320px; }
.symbols-table-wrap, .events-table-wrap, .trade-tape-table-wrap { overflow: auto; max-height: 430px; }
.events-table-wrap { max-height: 430px; }
.pex-data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pex-data-table th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; background: #0b141b; border-bottom: 1px solid var(--line); color: #8fa3ad; text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.pex-data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); color: #e7efec; vertical-align: middle; }
.pex-data-table tr { cursor: pointer; transition: .14s; }
.pex-data-table tbody tr:hover { background: rgba(127,167,172,.08); }
.pex-data-table .num { text-align: right; white-space: nowrap; }
.symbol-mini strong { display: block; color: #fff; font-size: 14px; }
.symbol-mini span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grade-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; padding: 6px 9px; border-radius: 999px; background: rgba(127,167,172,.09); border: 1px solid rgba(127,167,172,.18); color: var(--pex-2); font-weight: 950; font-size: 12px; }
.event-desc { color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketwatch-wrap { overflow: auto; max-height: 626px; }
.market-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.market-table th { position: sticky; top: 0; z-index: 1; background: #0b141b; color: #8fa3ad; text-align: right; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 12px; border-bottom: 1px solid var(--line); }
.market-table th:first-child { text-align: left; }
.market-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); text-align: right; color: #e7efec; white-space: nowrap; }
.market-table td:first-child { text-align: left; }
.market-table tbody tr { cursor: pointer; transition: .14s; }
.market-table tbody tr:hover, .market-table tbody tr.active { background: rgba(127,167,172,.08); }
.symbol-cell strong { display: block; color: #fff; }
.symbol-cell span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.live-label span { width: 8px; height: 8px; background: var(--green); border-radius: 999px; box-shadow: 0 0 0 6px rgba(24,196,126,.12); animation: pulse 1.25s infinite; }
.live-rank-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line-soft); }
.live-rank-tabs button { height: 38px; border: 1px solid var(--line); border-radius: 12px; background: #081018; color: var(--muted); font-weight: 950; cursor: pointer; }
.live-rank-tabs button.active { background: rgba(0,88,102,.38); color: #fff; border-color: rgba(127,167,172,.4); }
.trades-card { margin-top: 14px; }
.trade-tape-table-wrap { max-height: 310px; }
.trade-flash { display: inline-flex; width: 7px; height: 7px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 5px rgba(23,199,131,.12); animation: pulse 1.2s infinite; }
.bottom-ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 46px; background: linear-gradient(90deg, #030608, #061018 50%, #030608); border-top: 1px solid rgba(127,167,172,.22); overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 0; white-space: nowrap; animation: tickerMove 42s linear infinite; }
.bottom-ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-right: 1px solid var(--line-soft); font-weight: 900; font-size: 13px; color: #dce7e5; cursor: pointer; user-select: none; }
.ticker-item:hover { background: rgba(127,167,172,.1); }
.ticker-item strong { color: #fff; }
.ticker-item .price { color: #b8c8c6; }
.ticker-item.up .move { color: var(--green); }
.ticker-item.down .move { color: var(--red); }
.ticker-item.flat .move { color: var(--muted); }
@keyframes tickerMove { from{transform:translateX(0)} to{transform:translateX(-50%)} }
.pex-impact-footer { margin-top: 18px; padding: 22px; border: 1px solid rgba(127,167,172,.22); border-radius: 28px; background: linear-gradient(135deg, rgba(0,88,102,.28), rgba(8,12,17,.96) 48%, rgba(127,167,172,.08)); box-shadow: var(--shadow); }
.impact-brand { display: flex; align-items: center; gap: 18px; }
.impact-brand img { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 20px 36px rgba(127,167,172,.22)); }
.impact-brand span { display: block; color: var(--pex-2); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 950; }
.impact-brand h2 { margin: 6px 0 0; color: #fff; font-size: clamp(24px, 3vw, 42px); letter-spacing: -.05em; line-height: 1.06; }
.pex-impact-footer p { max-width: 1080px; margin: 14px 0 0; color: #bdd0d0; line-height: 1.65; font-weight: 650; }
.impact-pills { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.impact-pills span { padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(127,167,172,.24); background: rgba(2,6,9,.36); color: #e8f4f2; font-size: 12px; font-weight: 900; }
.symbol-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.symbol-modal.open { display: block; }
.symbol-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.68); backdrop-filter: blur(10px); }
.symbol-modal-card { position: relative; width: min(1280px, calc(100vw - 36px)); height: min(820px, calc(100vh - 36px)); margin: 18px auto; background: linear-gradient(180deg, #0e151d, #070b10); border: 1px solid rgba(127,167,172,.35); border-radius: 26px; box-shadow: 0 40px 120px rgba(0,0,0,.66); overflow: hidden; animation: modalIn .18s ease both; }
@keyframes modalIn { from{opacity:0;transform:translateY(18px) scale(.985)} to{opacity:1;transform:none} }
.modal-header { height: 86px; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-header h1 { margin: 5px 0 0; font-size: 26px; color: #fff; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.modal-close { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: #081018; color: #fff; cursor: pointer; font-size: 18px; }
.modal-body { height: calc(100% - 86px); display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 0; }
.modal-chart-area { padding: 18px; border-right: 1px solid var(--line); display: grid; grid-template-rows: 38px 1fr 210px; gap: 14px; min-width: 0; }
.chart-topline { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; letter-spacing: .1em; }
.chart-pills { display: flex; gap: 8px; }
.chart-pills span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #dce8e6; background: #081018; text-transform: none; letter-spacing: 0; }
.modal-line-chart, .modal-volume-chart { background: #071017; border: 1px solid var(--line); border-radius: 18px; padding: 12px; min-height: 0; }
.modal-summary { padding: 18px; overflow: auto; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-item { background: #081018; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.summary-item span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.summary-item strong { display: block; color: #fff; margin-top: 8px; font-size: 18px; }
.insight-box { margin-top: 12px; background: #081018; border: 1px solid var(--line); border-radius: 16px; padding: 13px; }
.insight-box strong { color: #fff; }
.insight-box p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-events { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.modal-events:empty { display: none; }
.event-card { background: #081018; border: 1px solid var(--line); border-radius: 14px; padding: 11px; }
.event-card strong { color: #fff; font-size: 13px; }
.event-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.refresh-btn.is-loading i { animation: spin .8s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }
.flash-row { animation: flashRow .7s ease; }
@keyframes flashRow { 0%{background:rgba(24,196,126,.2)} 100%{background:transparent} }
@media (max-width: 1080px) {
  .exchange-header { grid-template-columns: 1fr; gap: 10px; height: auto; }
  .exchange-brand { justify-content: flex-start; }
  .market-state { justify-content: flex-start; }
  .market-strip { grid-template-columns: 1fr 1fr; }
  .pex-hero { flex-direction: column; align-items: flex-start; }
  .hero-badges { justify-content: flex-start; }
  .historical-grid-clean, .secondary-grid, .live-grid-clean, .modal-body { grid-template-columns: 1fr; }
  .modal-chart-area { border-right: 0; border-bottom: 1px solid var(--line); }
  .symbol-modal-card { height: calc(100vh - 24px); margin: 12px auto; }
  .modal-body { overflow: auto; }
  .modal-chart-area { min-height: 640px; }
  .live-tools, .card-titlebar { flex-wrap: wrap; }
  .pex-brand-logo { height: 58px; max-width: 210px; }
}
@media (max-width: 680px) {
  .exchange-shell { padding: 10px; }
  .market-strip { grid-template-columns: 1fr; }
  .view-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .market-table, .pex-data-table { font-size: 12px; }
  .market-table th:nth-child(4), .market-table td:nth-child(4), .market-table th:nth-child(7), .market-table td:nth-child(7), .market-table th:nth-child(8), .market-table td:nth-child(8) { display: none; }
  .pex-data-table th:nth-child(4), .pex-data-table td:nth-child(4) { display: none; }
  .summary-grid { grid-template-columns: 1fr; }
  .modal-chart-area { grid-template-rows: 46px 360px 190px; }
  .symbol-modal-card { width: calc(100vw - 16px); }
  .backtest-link { justify-content: flex-start; }
  .pex-brand-logo { height: 48px; max-width: 170px; }
  .brand-word { font-size: 22px; }
  .impact-brand { align-items: flex-start; }
}

/* --- Iteration cleanup: compact exchange layout, less database-card feel --- */
.exchange-shell { padding-top: 12px; }
.exchange-header {
  grid-template-columns: 180px minmax(0, 1fr) 250px;
  min-height: 104px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0,88,102,.22), transparent 42%),
    linear-gradient(180deg, rgba(8,13,18,.96), rgba(5,8,12,.91));
}
.exchange-brand { gap: 16px; }
.brand-mark-mini { width: 54px; height: 54px; border-radius: 18px; }
.brand-word { font-size: clamp(27px, 2.5vw, 40px); }
.brand-cross { font-size: 34px; }
.pex-brand-logo { height: 82px; max-width: 330px; }
.market-state { min-height: 62px; border-radius: 20px; }
.market-state span:nth-child(2) { font-size: 16px; }
.market-state small { max-width: 145px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.market-strip {
  display: block;
  margin: 12px 0 10px;
}
.market-livebar {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: auto;
  padding: 10px 14px;
  border: 1px solid rgba(127,167,172,.18);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(0,88,102,.18), transparent 26%),
    rgba(6,12,17,.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  color: #d8e6e3;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.market-livebar strong { color: #fff; letter-spacing: .06em; }
.market-livebar span:not(.live-dot), .market-livebar em {
  padding: 6px 10px;
  border: 1px solid rgba(127,167,172,.14);
  border-radius: 999px;
  background: rgba(5,10,14,.42);
  color: #c3d2d0;
  font-style: normal;
}
.market-livebar.is-open .live-dot { background: var(--green); box-shadow: 0 0 0 6px rgba(23,199,131,.12); }
.market-livebar.is-closed .live-dot { background: var(--red); box-shadow: 0 0 0 6px rgba(241,95,95,.12); }
.live-dot { display:inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 6px rgba(23,199,131,.12); animation: pulse 1.2s infinite; }

.pex-hero.compact-hero {
  margin: 10px 0 12px;
  min-height: 76px;
  padding: 14px 18px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(0,88,102,.22), rgba(7,11,16,.88) 52%, rgba(6,9,13,.95));
  box-shadow: 0 16px 54px rgba(0,0,0,.22);
}
.compact-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(22px, 1.9vw, 31px);
  line-height: 1.05;
  max-width: 760px;
}
.compact-hero .hero-badges span {
  padding: 8px 11px;
  font-size: 11px;
}
.view-tabs { margin-top: 12px; }
.view-tab { border-radius: 999px; padding: 11px 16px; }
.exchange-card {
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(12,18,24,.96), rgba(5,8,12,.99));
  box-shadow: 0 20px 58px rgba(0,0,0,.38);
}
.card-titlebar { min-height: 66px; }
.icon-sort {
  width: 42px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.market-table tbody tr:nth-child(-n+3), .trade-tape-table-wrap tbody tr.fresh-trade {
  background: linear-gradient(90deg, rgba(23,199,131,.08), transparent 55%);
}
.trade-tape-table-wrap {
  max-height: 350px;
  overflow: auto;
}
.pex-data-table th, .market-table th {
  background: rgba(7,14,20,.98);
}
.pex-data-table tbody tr:hover, .market-table tbody tr:hover {
  background: rgba(0,88,102,.16);
}
.data-note {
  margin: 16px 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid rgba(127,167,172,.16);
  border-radius: 18px;
  background: rgba(5,10,14,.56);
  color: #b9c9c8;
  font-size: 12px;
}
.data-note span {
  color: var(--pex-2);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
}
.data-note p {
  margin: 0;
  flex: 1 1 520px;
  line-height: 1.45;
}
.data-note strong {
  color: #fff;
  font-weight: 950;
}
.pex-impact-footer { display: none !important; }
@media (max-width: 1080px) {
  .exchange-header { grid-template-columns: 1fr; }
  .exchange-brand { justify-content: center; }
  .pex-brand-logo { height: 74px; max-width: 300px; }
  .market-state { justify-content: center; }
}
@media (max-width: 680px) {
  .exchange-brand { gap: 10px; }
  .brand-mark-mini { display: none; }
  .brand-cross { font-size: 24px; }
  .pex-brand-logo { height: 56px; max-width: 220px; }
  .compact-hero { align-items: flex-start; }
  .compact-hero .hero-badges { justify-content: flex-start; }
}

/* --- PEX polish v3: cleaner exchange identity, less database feel --- */
body.pex-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(0,88,102,.34), transparent 29%),
    radial-gradient(circle at 88% 2%, rgba(144,183,188,.16), transparent 25%),
    linear-gradient(180deg, #05080b 0%, #020405 100%);
}
body.pex-page::before {
  opacity: .36;
  background-size: 120px 120px;
}
.exchange-shell {
  width: min(1580px, 100%);
  padding: 14px 20px 44px;
}
.exchange-header {
  grid-template-columns: 190px minmax(0, 1fr) 230px !important;
  min-height: 124px !important;
  padding: 16px 20px !important;
  border-radius: 30px !important;
  border-color: rgba(144,183,188,.30) !important;
  background:
    linear-gradient(120deg, rgba(0,88,102,.28), rgba(4,9,13,.94) 35%, rgba(2,5,8,.92)),
    #05090d !important;
  box-shadow: 0 32px 110px rgba(0,0,0,.56), inset 0 1px 0 rgba(255,255,255,.045) !important;
}
.exchange-brand {
  gap: 22px !important;
}
.brand-mark-mini {
  width: 66px !important;
  height: 66px !important;
  border-radius: 22px !important;
  font-size: 25px !important;
  background: linear-gradient(135deg, #102c35, #061519) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 18px 50px rgba(0,88,102,.18);
}
.brand-word {
  font-size: clamp(32px, 3vw, 50px) !important;
  letter-spacing: -.065em !important;
}
.brand-cross {
  font-size: 42px !important;
  color: #9ec9cf !important;
}
.pex-brand-logo {
  height: 112px !important;
  max-width: 430px !important;
  filter: drop-shadow(0 18px 42px rgba(144,183,188,.22)) !important;
}
.backtest-link {
  height: 54px !important;
  border-radius: 18px !important;
  background: rgba(3,8,12,.72) !important;
}
.market-state {
  min-height: 66px !important;
  justify-content: center !important;
  background: rgba(3,8,12,.72) !important;
}
.market-state span:nth-child(2) { text-transform: uppercase; letter-spacing: .08em; }
.market-state small { text-align: right; }
.market-strip { display: block !important; margin: 16px 0 14px !important; }
.market-livebar { display: none !important; }
.market-signal-board {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 10px;
}
.signal-card {
  position: relative;
  min-height: 82px;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid rgba(144,183,188,.16);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(10,20,27,.86), rgba(3,7,11,.82)),
    rgba(4,8,12,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.signal-card::after {
  content: "";
  position: absolute;
  inset: auto -22% -80% 18%;
  height: 120px;
  background: radial-gradient(circle, rgba(0,88,102,.30), transparent 70%);
  pointer-events: none;
}
.signal-card.primary {
  border-color: rgba(144,183,188,.30);
  background:
    linear-gradient(135deg, rgba(0,88,102,.36), rgba(5,10,15,.88) 54%),
    rgba(5,10,14,.95);
}
.signal-card small {
  display: block;
  color: #91b9c0;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
  font-weight: 950;
}
.signal-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: clamp(17px, 1.4vw, 23px);
  letter-spacing: -.03em;
}
.signal-card em {
  display: block;
  margin-top: 5px;
  color: #7d929a;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}
.signal-dot {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 7px rgba(241,95,95,.12);
}
.market-signal-board.is-open .signal-dot {
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(23,199,131,.13);
  animation: pulse 1.2s infinite;
}
.view-tabs {
  margin: 8px 0 16px !important;
  padding: 6px;
  width: max-content;
  border: 1px solid rgba(144,183,188,.16);
  border-radius: 999px;
  background: rgba(3,7,11,.72);
}
.view-tab {
  border: 0 !important;
  background: transparent !important;
  border-radius: 999px !important;
  padding: 12px 18px !important;
}
.view-tab.active {
  background: linear-gradient(135deg, rgba(0,88,102,.82), rgba(144,183,188,.19)) !important;
  box-shadow: 0 12px 32px rgba(0,88,102,.22) !important;
}
.exchange-card {
  border-color: rgba(144,183,188,.17) !important;
  background:
    linear-gradient(180deg, rgba(11,19,25,.94), rgba(3,7,11,.98)) !important;
  box-shadow: 0 26px 80px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.card-titlebar {
  background: linear-gradient(90deg, rgba(0,88,102,.13), transparent 44%);
}
.pex-data-table th, .market-table th {
  background: rgba(3,9,14,.98) !important;
  color: #96bbc1 !important;
  letter-spacing: .08em;
  font-size: 10px !important;
}
.pex-data-table tbody tr, .market-table tbody tr {
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.pex-data-table tbody tr:hover, .market-table tbody tr:hover {
  background: rgba(0,88,102,.20) !important;
  box-shadow: inset 3px 0 0 #90b7bc;
}
.market-table tbody tr:nth-child(-n+4) {
  background: linear-gradient(90deg, rgba(0,88,102,.13), transparent 56%) !important;
}
.live-label span, .trade-flash {
  background: var(--green) !important;
  box-shadow: 0 0 0 5px rgba(23,199,131,.12), 0 0 24px rgba(23,199,131,.36) !important;
}
.rank-row {
  background: linear-gradient(135deg, rgba(8,17,23,.94), rgba(3,7,11,.92)) !important;
  border-color: rgba(144,183,188,.09) !important;
}
.rank-row:hover, .rank-row.active {
  background: linear-gradient(135deg, rgba(0,88,102,.24), rgba(8,17,23,.96)) !important;
}
.sort-btn.icon-sort {
  font-size: 23px !important;
  background: rgba(3,8,12,.78) !important;
}
.data-note {
  margin-top: 18px !important;
  border-radius: 999px !important;
  background: rgba(3,8,12,.54) !important;
  border-color: rgba(144,183,188,.14) !important;
}

/* Entry information modal */
.pex-intro-modal {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: none;
}
.pex-intro-modal.open { display: block; }
.pex-intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(14px);
}
.pex-intro-card {
  position: relative;
  width: min(920px, calc(100vw - 34px));
  margin: min(12vh, 110px) auto 0;
  overflow: hidden;
  border: 1px solid rgba(144,183,188,.35);
  border-radius: 34px;
  padding: 30px;
  background:
    radial-gradient(circle at 12% 0%, rgba(0,88,102,.50), transparent 34%),
    linear-gradient(145deg, rgba(9,17,23,.98), rgba(2,5,8,.98));
  box-shadow: 0 42px 130px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.06);
  animation: pexIntroIn .32s cubic-bezier(.16,1,.3,1) both;
}
.pex-intro-card::before {
  content: "";
  position: absolute;
  left: -18%;
  top: 0;
  width: 46%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  transform: skewX(-16deg);
  animation: introSweep 3.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pexIntroIn { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes introSweep { 0%, 42% { transform: translateX(-70%) skewX(-16deg); opacity: 0; } 55% { opacity: .75; } 86%, 100% { transform: translateX(260%) skewX(-16deg); opacity: 0; } }
.pex-intro-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(144,183,188,.20);
  background: rgba(3,8,12,.72);
  color: #fff;
  cursor: pointer;
}
.intro-logo-line {
  display: flex;
  align-items: center;
  gap: 18px;
}
.intro-logo-line img { height: 96px; max-width: 360px; object-fit: contain; filter: drop-shadow(0 16px 40px rgba(144,183,188,.18)); }
.intro-logo-line span { color: #9ec9cf; font-size: 36px; font-weight: 950; }
.intro-logo-line strong { color: #fff; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.06em; }
.intro-kicker {
  margin: 22px 0 0;
  color: #9ec9cf;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .20em;
  font-weight: 950;
}
.pex-intro-card h1 {
  margin: 10px 0 0;
  max-width: 820px;
  color: #fff;
  font-size: clamp(34px, 5vw, 70px);
  line-height: .95;
  letter-spacing: -.075em;
}
.intro-big-words {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.intro-big-words span {
  padding: 12px 15px;
  border-radius: 999px;
  border: 1px solid rgba(144,183,188,.26);
  background: rgba(0,88,102,.18);
  color: #eaffff;
  font-size: clamp(15px, 1.6vw, 22px);
  font-weight: 950;
  letter-spacing: -.02em;
}
.intro-text {
  margin: 20px 0 0;
  max-width: 820px;
  color: #bdd0d0;
  line-height: 1.65;
  font-weight: 650;
}
.intro-continue {
  margin-top: 24px;
  height: 52px;
  padding: 0 22px;
  border-radius: 17px;
  border: 1px solid rgba(144,183,188,.36);
  background: linear-gradient(135deg, #005866, #0b7a89);
  color: white;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(0,88,102,.30);
}
.intro-continue:hover { transform: translateY(-1px); }
@media (max-width: 1120px) {
  .exchange-header { grid-template-columns: 1fr !important; }
  .exchange-brand { justify-content: center !important; }
  .pex-brand-logo { height: 92px !important; }
  .market-signal-board { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .exchange-shell { padding: 10px 10px 42px; }
  .exchange-header { min-height: auto !important; }
  .brand-word { font-size: 28px !important; }
  .pex-brand-logo { height: 62px !important; max-width: 250px !important; }
  .market-signal-board { grid-template-columns: 1fr; }
  .view-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .intro-logo-line { flex-wrap: wrap; }
  .intro-logo-line img { height: 74px; }
  .pex-intro-card { padding: 24px 18px; border-radius: 26px; }
}

/* --- FINAL PEX pass: cleaner, non-fixed, Arabic intro, less database feel --- */
body.modal-open { overflow: hidden !important; }
.exchange-header {
  position: relative !important;
  top: auto !important;
  min-height: 116px !important;
  grid-template-columns: 185px minmax(0, 1fr) 220px !important;
}
.brand-word {
  font-size: clamp(29px, 2.65vw, 46px) !important;
}
.pex-brand-logo {
  height: 116px !important;
  max-width: 450px !important;
}
.market-strip {
  margin: 12px 0 14px !important;
}
.market-signal-board {
  grid-template-columns: 1.1fr .72fr .9fr .78fr .78fr !important;
  gap: 8px !important;
  padding: 8px;
  border: 1px solid rgba(144,183,188,.16);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(0,88,102,.14), rgba(4,9,13,.86) 42%, rgba(3,6,9,.92)),
    rgba(2,6,9,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 18px 54px rgba(0,0,0,.22);
}
.signal-card {
  min-height: 58px !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  border-color: rgba(144,183,188,.10) !important;
  background: rgba(3,8,12,.54) !important;
  box-shadow: none !important;
}
.signal-card::after { display: none !important; }
.signal-card.primary { background: rgba(0,88,102,.22) !important; }
.signal-card small { font-size: 9px !important; letter-spacing: .13em !important; }
.signal-card strong { margin-top: 5px !important; font-size: clamp(13px, 1vw, 17px) !important; }
.signal-card em { margin-top: 3px !important; font-size: 10px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signal-dot { right: 11px !important; top: 11px !important; width: 8px !important; height: 8px !important; }

.exchange-card {
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 10% 0%, rgba(0,88,102,.12), transparent 34%),
    linear-gradient(180deg, rgba(10,18,24,.94), rgba(2,6,10,.98)) !important;
}
.card-titlebar {
  min-height: 64px !important;
  background: linear-gradient(90deg, rgba(144,183,188,.08), transparent 52%) !important;
}
.card-titlebar h2 { font-size: 17px !important; letter-spacing: -.02em; }
.chart-box { height: 340px !important; padding: 10px 12px 14px !important; }
.market-history-box { height: 360px !important; }
.chart-box canvas, .modal-line-chart canvas, .modal-volume-chart canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
.market-history-box canvas { min-height: 320px !important; }

/* Useful Arabic intro modal */
.pex-intro-card {
  width: min(1040px, calc(100vw - 34px)) !important;
  min-height: 560px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  grid-template-areas:
    "logo kicker"
    "logo title"
    "logo words"
    "logo text"
    "logo proof"
    "logo button";
  column-gap: 34px;
  align-items: center;
  direction: rtl;
  font-family: 'Noto Kufi Arabic', Inter, system-ui, sans-serif !important;
  padding: 34px 38px !important;
}
.pex-intro-card::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 34px;
  bottom: 34px;
  width: 36%;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 38%, rgba(144,183,188,.19), transparent 48%),
    linear-gradient(180deg, rgba(0,88,102,.22), rgba(3,7,11,.20));
  border: 1px solid rgba(144,183,188,.12);
  pointer-events: none;
}
.pex-intro-close { z-index: 3; }
.intro-logo-line {
  grid-area: logo;
  position: relative;
  z-index: 1;
  flex-direction: column;
  justify-content: center;
  gap: 12px !important;
  direction: ltr;
}
.intro-logo-line img { height: 190px !important; max-width: 390px !important; }
.intro-logo-line span { font-size: 46px !important; line-height: 1; }
.intro-logo-line strong { font-size: clamp(34px, 4.4vw, 58px) !important; }
.intro-kicker {
  grid-area: kicker;
  margin: 0 !important;
  color: #9ed3d8 !important;
  font-size: 13px !important;
  letter-spacing: .06em !important;
  text-transform: none !important;
}
.pex-intro-card h1 {
  grid-area: title;
  margin: 10px 0 0 !important;
  max-width: none !important;
  font-size: clamp(34px, 4.4vw, 64px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.055em !important;
  text-align: right;
}
.intro-big-words {
  grid-area: words;
  margin-top: 18px !important;
  justify-content: flex-start;
}
.intro-big-words span {
  font-size: clamp(17px, 1.65vw, 24px) !important;
  padding: 11px 14px !important;
  background: linear-gradient(135deg, rgba(0,88,102,.36), rgba(144,183,188,.12)) !important;
}
.intro-text {
  grid-area: text;
  max-width: none !important;
  margin-top: 18px !important;
  font-size: 16px !important;
  line-height: 1.9 !important;
  color: #d6e7e6 !important;
  text-align: right;
  font-weight: 700 !important;
}
.intro-proof-grid {
  grid-area: proof;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.intro-proof-grid div {
  padding: 12px 12px;
  border: 1px solid rgba(144,183,188,.18);
  border-radius: 18px;
  background: rgba(2,7,11,.56);
}
.intro-proof-grid span {
  display: block;
  color: #92b8bf;
  font-size: 11px;
  font-weight: 900;
}
.intro-proof-grid strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
}
.intro-continue {
  grid-area: button;
  justify-self: start;
  min-width: 190px;
  font-family: 'Noto Kufi Arabic', Inter, system-ui, sans-serif !important;
  font-size: 15px !important;
  margin-top: 22px !important;
}

/* Modal scroll lock polish */
.symbol-modal-card { max-height: calc(100vh - 34px); }
.symbol-modal.open, .pex-intro-modal.open { overscroll-behavior: contain; }

/* Mobile adjustments */
@media (max-width: 1120px) {
  .market-signal-board { grid-template-columns: 1fr 1fr !important; }
  .historical-mini { grid-column: span 2; }
  .pex-intro-card { grid-template-columns: 1fr; grid-template-areas: "logo" "kicker" "title" "words" "text" "proof" "button"; min-height: 0; }
  .pex-intro-card::after { display:none; }
  .intro-logo-line { flex-direction: row; justify-content: flex-start; }
  .intro-logo-line img { height: 112px !important; }
}
@media (max-width: 700px) {
  .exchange-header { grid-template-columns: 1fr !important; }
  .brand-word { font-size: 26px !important; }
  .pex-brand-logo { height: 74px !important; }
  .market-signal-board { grid-template-columns: 1fr !important; }
  .historical-mini { grid-column: auto; }
  .intro-proof-grid { grid-template-columns: 1fr; }
}

/* ===== Final PEX UI hard polish: minimal modal + cleaner live terminal ===== */
body.pex-page.modal-open {
  overflow: hidden !important;
}

.entry-transition {
  background: radial-gradient(circle at 50% 44%, rgba(0,88,102,.42), transparent 36%), #020609 !important;
  animation: entryFade 1.12s cubic-bezier(.16,1,.3,1) both !important;
}
.entry-transition img {
  width: min(460px, 68vw) !important;
  animation: entryLogoFinal 1.12s cubic-bezier(.16,1,.3,1) both !important;
  filter: drop-shadow(0 30px 80px rgba(144,183,188,.38)) !important;
}
@keyframes entryLogoFinal {
  0% { opacity: 0; transform: scale(.86); }
  34% { opacity: 1; transform: scale(1.04); }
  74% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.10); }
}

.exchange-header {
  position: relative !important;
  top: auto !important;
  grid-template-columns: 185px minmax(0, 1fr) 230px !important;
  min-height: 114px !important;
  padding: 14px 18px !important;
}
.brand-word {
  font-size: clamp(29px, 2.55vw, 43px) !important;
}
.pex-brand-logo {
  height: 106px !important;
  max-width: 400px !important;
}
.brand-cross { font-size: 38px !important; }

.market-strip { display: block !important; margin: 12px 0 14px !important; }
.market-signal-board, .market-livebar { display: none !important; }
.market-live-strip {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 9px 10px;
  border: 1px solid rgba(144,183,188,.15);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(0,88,102,.20), rgba(3,8,12,.88) 36%, rgba(3,8,12,.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 15px 45px rgba(0,0,0,.25);
  white-space: nowrap;
}
.market-live-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(144,183,188,.13);
  color: #c7d8d7;
  background: rgba(2,7,11,.42);
  font-size: 12px;
  font-weight: 850;
}
.market-live-strip .strip-status {
  color: #fff;
  font-weight: 950;
  letter-spacing: .02em;
}
.market-live-strip .strip-status i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(241,95,95,.12);
}
.market-live-strip.is-open .strip-status i {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(23,199,131,.13);
  animation: pulse 1.2s infinite;
}
.market-live-strip .strip-history { color: #8da2a8; }

.pex-intro-modal {
  z-index: 8800 !important;
}
.pex-intro-backdrop {
  background: rgba(0,0,0,.70) !important;
  backdrop-filter: blur(16px) saturate(1.1) !important;
}
.pex-intro-card {
  direction: rtl !important;
  font-family: 'Noto Kufi Arabic', Inter, system-ui, sans-serif !important;
  width: min(680px, calc(100vw - 34px)) !important;
  min-height: 0 !important;
  display: block !important;
  margin: min(13vh, 110px) auto 0 !important;
  padding: 26px 28px 28px !important;
  border-radius: 28px !important;
  border: 1px solid rgba(144,183,188,.30) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(0,88,102,.36), transparent 46%),
    linear-gradient(180deg, rgba(10,18,24,.98), rgba(2,6,9,.985)) !important;
  box-shadow: 0 38px 130px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.055) !important;
  overflow: hidden !important;
}
.pex-intro-card::before,
.pex-intro-card::after {
  display: none !important;
}
.pex-intro-close {
  right: auto !important;
  left: 16px !important;
  top: 16px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 13px !important;
  background: rgba(2,7,11,.74) !important;
  z-index: 3 !important;
}
.intro-brand-row {
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}
.intro-brand-row img {
  height: 90px;
  max-width: 250px;
  object-fit: contain;
  filter: drop-shadow(0 16px 35px rgba(144,183,188,.20));
}
.intro-brand-row span {
  color: #9ec9cf;
  font-size: 25px;
  font-weight: 950;
}
.intro-brand-row strong {
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: -.06em;
}
.pex-intro-card h1 {
  margin: 14px 0 0 !important;
  max-width: none !important;
  text-align: center !important;
  color: #fff !important;
  font-size: clamp(33px, 5vw, 54px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.055em !important;
}
.intro-subtitle {
  margin: 10px auto 0;
  max-width: 560px;
  color: #b8cdce;
  text-align: center;
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.8;
  font-weight: 750;
}
.intro-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 22px;
}
.intro-focus-grid div {
  min-height: 92px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(144,183,188,.16);
  background: linear-gradient(180deg, rgba(0,88,102,.16), rgba(3,8,12,.62));
}
.intro-focus-grid b {
  display: block;
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 950;
}
.intro-focus-grid span {
  display: block;
  margin-top: 8px;
  color: #9ab1b6;
  font-size: 11px;
  line-height: 1.7;
  font-weight: 850;
}
.intro-continue {
  display: block !important;
  width: min(270px, 100%) !important;
  height: 50px !important;
  margin: 24px auto 0 !important;
  border-radius: 16px !important;
  font-family: 'Noto Kufi Arabic', Inter, system-ui, sans-serif !important;
  font-size: 15px !important;
}
/* Hide old intro pieces if any cached HTML remains */
.intro-logo-line, .intro-kicker, .intro-big-words, .intro-text, .intro-proof-grid { display: none !important; }

.exchange-card {
  border-radius: 22px !important;
}
.chart-box {
  height: 370px !important;
  padding: 8px 12px 12px !important;
}
.market-history-box {
  height: 390px !important;
}
.chart-box canvas,
.market-history-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

@media (max-width: 1120px) {
  .exchange-header { grid-template-columns: 1fr !important; }
  .exchange-brand { justify-content: center !important; }
  .pex-brand-logo { height: 84px !important; }
  .intro-focus-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .pex-intro-card { padding: 22px 18px 24px !important; margin-top: 72px !important; }
  .intro-brand-row { flex-wrap: wrap; gap: 8px; }
  .intro-brand-row img { height: 66px; }
  .intro-brand-row strong { font-size: 28px; }
  .pex-intro-card h1 { font-size: 34px !important; }
  .intro-subtitle { font-size: 13px; }
  .market-live-strip span { font-size: 11px; }
}

/* ===== Marko final PEX presentation polish ===== */
body.pex-page {
  padding-bottom: 64px !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(0,88,102,.28), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(144,183,188,.10), transparent 28%),
    linear-gradient(180deg, #03070a 0%, #071017 48%, #030608 100%) !important;
}

.entry-transition {
  background:
    radial-gradient(circle at 50% 50%, rgba(0,88,102,.50), transparent 34%),
    radial-gradient(circle at 50% 54%, rgba(144,183,188,.20), transparent 52%),
    #020609 !important;
  animation: entryFadeRefined 1.48s cubic-bezier(.16,1,.3,1) both !important;
}
.entry-transition::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(144,183,188,.12), transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 90px);
  opacity: .65;
  animation: entryGridSweep 1.48s ease both;
}
.entry-transition img {
  width: min(520px, 72vw) !important;
  animation: entryLogoRefined 1.48s cubic-bezier(.16,1,.3,1) both !important;
  filter: drop-shadow(0 36px 100px rgba(144,183,188,.48)) !important;
}
@keyframes entryFadeRefined {
  0% { opacity: 1; }
  72% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes entryLogoRefined {
  0% { opacity: 0; transform: scale(.82) rotate(-1deg); }
  28% { opacity: 1; transform: scale(1.04) rotate(0deg); }
  63% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.13); }
}
@keyframes entryGridSweep {
  0% { transform: translateX(-8%); opacity: 0; }
  36% { opacity: .8; }
  100% { transform: translateX(8%); opacity: 0; }
}

.exchange-shell { max-width: 1400px !important; }
.exchange-header {
  position: relative !important;
  top: auto !important;
  min-height: 118px !important;
  grid-template-columns: 180px minmax(0, 1fr) 238px !important;
  border-color: rgba(144,183,188,.18) !important;
  background:
    linear-gradient(135deg, rgba(0,88,102,.18), rgba(3,8,12,.94) 42%, rgba(5,12,17,.86)),
    radial-gradient(circle at 50% 0%, rgba(144,183,188,.08), transparent 48%) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.05) !important;
}
.exchange-brand { gap: 18px !important; }
.brand-word {
  font-size: clamp(28px, 2.35vw, 39px) !important;
  letter-spacing: -.065em !important;
}
.pex-brand-logo {
  height: 126px !important;
  max-width: 440px !important;
  filter: drop-shadow(0 18px 45px rgba(144,183,188,.22)) !important;
}
.brand-cross { font-size: 36px !important; color: #bfe2e2 !important; }
.brand-mark-mini { display: none !important; }
.backtest-link,
.market-state {
  border-color: rgba(144,183,188,.19) !important;
  background: rgba(2,7,10,.56) !important;
}

.market-live-strip {
  min-height: 58px !important;
  padding: 10px 12px !important;
  gap: 12px !important;
  border-color: rgba(144,183,188,.20) !important;
  background:
    linear-gradient(90deg, rgba(0,88,102,.26), rgba(4,11,16,.86) 36%, rgba(6,15,21,.82)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 92px) !important;
}
.market-live-strip span {
  min-height: 36px !important;
  padding: 7px 13px !important;
  font-size: 12.5px !important;
  letter-spacing: .01em;
}
.market-live-strip .strip-status {
  font-size: 13px !important;
  text-transform: uppercase;
}

.view-tabs {
  background: rgba(2,8,12,.42) !important;
  border-color: rgba(144,183,188,.16) !important;
  border-radius: 18px !important;
  padding: 6px !important;
}
.view-tab {
  border-radius: 13px !important;
  letter-spacing: .01em !important;
}
.view-tab.active {
  background: linear-gradient(135deg, rgba(0,88,102,.92), rgba(18,139,153,.76)) !important;
  box-shadow: 0 14px 38px rgba(0,88,102,.22) !important;
}

.exchange-card {
  border-color: rgba(144,183,188,.16) !important;
  background:
    linear-gradient(180deg, rgba(12,20,27,.88), rgba(6,12,17,.92)),
    radial-gradient(circle at 0% 0%, rgba(0,88,102,.14), transparent 34%) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.card-titlebar { border-bottom-color: rgba(144,183,188,.10) !important; }
.card-titlebar h2 { color: #fff !important; letter-spacing: -.025em !important; }
.label { color: #94cbd0 !important; }

.chart-box { height: 330px !important; padding: 4px 10px 10px !important; }
.market-history-box { height: 340px !important; }
.chart-box canvas,
.market-history-box canvas { width: 100% !important; height: 100% !important; }

.pex-data-table th,
.market-table th {
  background: rgba(8,18,24,.96) !important;
  color: #9fc0c5 !important;
}
.pex-data-table tr:hover td,
.market-table tr:hover td {
  background: rgba(0,88,102,.10) !important;
}
.rank-row { background: rgba(5,12,17,.62) !important; border-color: rgba(144,183,188,.13) !important; }
.rank-row:hover { background: rgba(0,88,102,.18) !important; }
.rank-main strong { color: #fff !important; }

.bottom-ticker {
  height: 58px !important;
  background:
    linear-gradient(90deg, #020508, #07141b 46%, #020508),
    repeating-linear-gradient(90deg, rgba(144,183,188,.08) 0 1px, transparent 1px 84px) !important;
  border-top-color: rgba(144,183,188,.28) !important;
  box-shadow: 0 -16px 45px rgba(0,0,0,.35) !important;
}
.ticker-track { animation-duration: 48s !important; }
.ticker-item {
  min-height: 58px !important;
  padding: 12px 18px !important;
  gap: 10px !important;
  font-size: 15px !important;
  border-right-color: rgba(144,183,188,.12) !important;
}
.ticker-item strong { font-size: 15px !important; letter-spacing: .03em; }
.ticker-item .price { font-size: 14px !important; }
.ticker-item .move { font-size: 14px !important; }
.ticker-item:hover { background: rgba(0,88,102,.24) !important; }

.pex-intro-card {
  direction: rtl !important;
  width: min(760px, calc(100vw - 34px)) !important;
  padding: 30px 32px 30px !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(0,88,102,.46), transparent 42%),
    radial-gradient(circle at 86% 24%, rgba(144,183,188,.16), transparent 34%),
    linear-gradient(145deg, rgba(11,21,28,.98), rgba(2,6,9,.99) 58%, rgba(5,14,19,.98)) !important;
  border: 1px solid rgba(144,183,188,.34) !important;
  box-shadow: 0 40px 140px rgba(0,0,0,.74), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
.pex-intro-card::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 14px;
  pointer-events: none;
  border-radius: 23px;
  border: 1px solid rgba(144,183,188,.08);
  background: linear-gradient(90deg, transparent, rgba(144,183,188,.07), transparent);
  mask: linear-gradient(#000, transparent 58%);
}
.intro-brand-row {
  min-height: 112px;
  gap: 18px !important;
  justify-content: center !important;
  margin-top: 0 !important;
}
.intro-brand-row img {
  height: 118px !important;
  max-width: 310px !important;
  object-fit: contain !important;
}
.intro-brand-row span {
  font-size: 32px !important;
  color: #c9ecea !important;
}
.intro-brand-row strong {
  font-size: clamp(36px, 5vw, 56px) !important;
  letter-spacing: -.07em !important;
}
.pex-intro-card h1 {
  margin-top: 8px !important;
  font-size: clamp(34px, 5vw, 54px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.045em !important;
}
.intro-subtitle {
  max-width: 620px !important;
  margin-top: 10px !important;
  color: #d5e5e4 !important;
  font-size: clamp(14px, 1.7vw, 17px) !important;
  line-height: 1.9 !important;
}
.intro-focus-grid {
  gap: 12px !important;
  margin-top: 24px !important;
}
.intro-focus-grid div {
  min-height: 106px !important;
  border-radius: 20px !important;
  padding: 16px 14px !important;
  background: linear-gradient(180deg, rgba(0,88,102,.24), rgba(5,12,17,.74)) !important;
  border-color: rgba(144,183,188,.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.intro-focus-grid b {
  font-size: 17px !important;
  color: #ffffff !important;
}
.intro-focus-grid span {
  font-size: 12px !important;
  line-height: 1.75 !important;
  color: #bdd2d2 !important;
}
.intro-continue {
  height: 54px !important;
  width: min(310px, 100%) !important;
  margin-top: 26px !important;
  border-radius: 17px !important;
  background: linear-gradient(135deg, #00788a, #11a0ad) !important;
  box-shadow: 0 18px 42px rgba(0,88,102,.30) !important;
  font-size: 16px !important;
}
.intro-continue:hover { transform: translateY(-2px) !important; filter: brightness(1.08); }

.data-note {
  direction: rtl;
  text-align: right;
  border-color: rgba(144,183,188,.15) !important;
  background: linear-gradient(135deg, rgba(0,88,102,.18), rgba(4,10,14,.76)) !important;
  border-radius: 18px !important;
}
.data-note span { color: #9fd4d7 !important; }
.data-note p { color: #c1d1d1 !important; }
.data-note strong { color: #fff !important; }

@media (max-width: 900px) {
  .exchange-header { grid-template-columns: 1fr !important; }
  .exchange-brand { justify-content: center !important; }
  .pex-brand-logo { height: 92px !important; }
  .brand-word { font-size: 30px !important; }
  .intro-brand-row { flex-wrap: wrap !important; }
  .intro-brand-row img { height: 86px !important; }
  .intro-focus-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  body.pex-page { padding-bottom: 60px !important; }
  .pex-intro-card { padding: 24px 18px 24px !important; }
  .pex-intro-card h1 { font-size: 32px !important; }
  .intro-brand-row strong { font-size: 32px !important; }
  .ticker-item { font-size: 13px !important; padding: 10px 13px !important; }
}

/* ===== Final PEX presentation micro-fixes ===== */
.entry-transition {
  background:
    radial-gradient(circle at 50% 50%, rgba(0,88,102,.34), transparent 34%),
    radial-gradient(circle at 50% 54%, rgba(144,183,188,.10), transparent 54%),
    #020609 !important;
  animation: entryFadeRefinedFinal 1.95s cubic-bezier(.16,1,.3,1) both !important;
}
.entry-transition::before {
  opacity: .28 !important;
  animation-duration: 1.95s !important;
}
.entry-transition img {
  width: min(540px, 72vw) !important;
  filter: drop-shadow(0 22px 58px rgba(144,183,188,.26)) !important;
  animation: entryLogoRefinedFinal 1.95s cubic-bezier(.16,1,.3,1) both !important;
}
@keyframes entryFadeRefinedFinal {
  0% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes entryLogoRefinedFinal {
  0% { opacity: 0; transform: scale(.84); }
  24% { opacity: 1; transform: scale(1.035); }
  70% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.09); }
}

.historical-grid-clean {
  align-items: start !important;
}
.wide-card {
  min-height: 0 !important;
  height: auto !important;
}
.chart-box {
  height: 410px !important;
  padding: 10px 14px 16px !important;
}
.market-history-box {
  height: 430px !important;
}
.chart-box canvas,
.market-history-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.bottom-ticker {
  height: 62px !important;
}
.ticker-item {
  min-height: 62px !important;
  padding: 13px 20px !important;
  font-size: 15.5px !important;
}
.ticker-item strong { font-size: 16px !important; }
.ticker-item .price,
.ticker-item .move { font-size: 14.5px !important; }
body.pex-page { padding-bottom: 68px !important; }

.pex-intro-card {
  width: min(920px, calc(100vw - 44px)) !important;
  padding: 38px 42px 36px !important;
  border-radius: 32px !important;
  text-align: center !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(0,88,102,.40), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(144,183,188,.11), transparent 34%),
    linear-gradient(145deg, rgba(10,20,27,.98), rgba(2,6,9,.99) 60%, rgba(5,13,18,.98)) !important;
}
.pex-intro-card::before {
  opacity: .65 !important;
}
.clean-brand-row,
.intro-brand-row {
  min-height: 150px !important;
  gap: 26px !important;
  justify-content: center !important;
  align-items: center !important;
  direction: ltr !important;
}
.intro-brand-row img {
  height: 150px !important;
  max-width: 420px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 18px 42px rgba(144,183,188,.16)) !important;
}
.intro-brand-row span {
  font-size: 34px !important;
  color: #bfe0e2 !important;
  opacity: .96;
}
.intro-brand-row strong {
  font-size: clamp(42px, 5.2vw, 68px) !important;
  color: #fff !important;
  letter-spacing: -.075em !important;
  white-space: nowrap;
}
.pex-intro-card h1 {
  margin: 8px 0 0 !important;
  font-size: clamp(44px, 6.2vw, 76px) !important;
  line-height: .95 !important;
  letter-spacing: -.045em !important;
  color: #fff !important;
}
.intro-subtitle {
  max-width: 760px !important;
  margin: 16px auto 0 !important;
  font-size: clamp(16px, 1.75vw, 20px) !important;
  line-height: 1.75 !important;
  color: #d8e8e7 !important;
  font-family: 'Noto Kufi Arabic', Inter, sans-serif !important;
  font-weight: 800 !important;
}
.intro-focus-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-top: 28px !important;
  direction: rtl !important;
}
.intro-focus-grid div {
  min-height: 118px !important;
  padding: 18px 16px !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(0,88,102,.28), rgba(6,13,18,.78)) !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}
.intro-focus-grid b {
  font-size: 20px !important;
  font-family: 'Noto Kufi Arabic', Inter, sans-serif !important;
  line-height: 1.3 !important;
}
.intro-focus-grid span {
  margin-top: 8px !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: #c4d7d7 !important;
  font-family: 'Noto Kufi Arabic', Inter, sans-serif !important;
  font-weight: 700 !important;
}
.intro-continue {
  height: 58px !important;
  width: min(360px, 100%) !important;
  margin-top: 30px !important;
  font-size: 17px !important;
  font-family: 'Noto Kufi Arabic', Inter, sans-serif !important;
  font-weight: 900 !important;
}
.pex-intro-close {
  top: 18px !important;
  left: 18px !important;
  right: auto !important;
}

@media (max-width: 760px) {
  .pex-intro-card { width: min(96vw, 620px) !important; padding: 26px 18px 24px !important; }
  .clean-brand-row, .intro-brand-row { min-height: 110px !important; gap: 12px !important; flex-wrap: wrap !important; }
  .intro-brand-row img { height: 92px !important; max-width: 240px !important; }
  .intro-brand-row strong { font-size: 34px !important; }
  .pex-intro-card h1 { font-size: 42px !important; }
  .intro-subtitle { font-size: 14px !important; }
  .intro-focus-grid { grid-template-columns: 1fr !important; }
  .chart-box, .market-history-box { height: 330px !important; }
}


/* ===== User final micro-patch: compact ticker, intro title removal, equal cards ===== */
body.pex-page { padding-bottom: 56px !important; }
.bottom-ticker {
  height: 50px !important;
  min-height: 50px !important;
}
.ticker-item {
  min-height: 50px !important;
  padding: 10px 16px !important;
  gap: 9px !important;
  font-size: 14px !important;
}
.ticker-item strong { font-size: 14.5px !important; }
.ticker-item .price,
.ticker-item .move { font-size: 13.5px !important; }
.historical-grid-clean {
  align-items: stretch !important;
}
.historical-grid-clean > .exchange-card {
  height: 100% !important;
}
.ranking-panel {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}
.ranking-panel .ranking-list {
  flex: 1 1 auto !important;
  max-height: none !important;
  min-height: 0 !important;
}
.pex-intro-card .intro-subtitle {
  margin-top: 4px !important;
}

@media (max-width: 560px) {
  body.pex-page { padding-bottom: 52px !important; }
  .bottom-ticker { height: 48px !important; min-height: 48px !important; }
  .ticker-item { min-height: 48px !important; padding: 9px 13px !important; font-size: 13px !important; }
}

/* ===== Final correction: keep Market History normal, match leaderboard height, add modal breathing room ===== */
.historical-grid-clean {
  align-items: start !important;
}
.historical-grid-clean > .exchange-card {
  height: auto !important;
  min-height: 0 !important;
}
.wide-card {
  height: auto !important;
  min-height: 0 !important;
}
.market-history-box {
  height: 430px !important;
}
.ranking-panel {
  height: 501px !important;
  min-height: 501px !important;
  max-height: 501px !important;
  display: flex !important;
  flex-direction: column !important;
}
.ranking-panel .ranking-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
}
.pex-intro-card {
  padding: 46px 48px 42px !important;
}
.intro-brand-row.clean-brand-row,
.clean-brand-row {
  margin-bottom: 16px !important;
}
.intro-subtitle {
  margin: 22px auto 0 !important;
  padding: 0 18px !important;
  line-height: 2 !important;
}
.intro-focus-grid {
  margin-top: 34px !important;
  gap: 18px !important;
}
.intro-continue {
  margin-top: 34px !important;
}

@media (max-width: 980px) {
  .ranking-panel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  .ranking-panel .ranking-list {
    max-height: 430px !important;
  }
}
