/* BProud Market Terminal — follows SmartMag tokens (--c-main #8900f2, Reddit Sans) and its light/dark switch */

/* ---------- tokens: light (site default) ---------- */
.bpt, .bpt-hero, .bpt-home {
  --bpt-bg: #f4f2f9;
  --bpt-card: #ffffff;
  --bpt-card-2: #f3f0f8;
  --bpt-line: rgba(26, 16, 48, .09);
  --bpt-text: #231d31;
  --bpt-strong: #0f0b18;
  --bpt-muted: #6c6580;
  --bpt-main: var(--c-main, #8900f2);
  --bpt-main-l: #7a00d9;
  --bpt-up: #0b9e6a;
  --bpt-down: #df3149;
  --bpt-glow: rgba(137, 0, 242, .10);
  --bpt-tape-bg: #ffffff;
  --bpt-overlay: rgba(255, 255, 255, .7);
  --bpt-shadow: 0 1px 2px rgba(26, 16, 48, .04), 0 4px 18px rgba(26, 16, 48, .05);
  --bpt-r: 12px;
}
/* ---------- tokens: dark ---------- */
html.s-dark .bpt, html.s-dark .bpt-hero, html.s-dark .bpt-home {
  --bpt-bg: #0c0a14;
  --bpt-card: #15121f;
  --bpt-card-2: #1c1829;
  --bpt-line: rgba(255, 255, 255, .08);
  --bpt-text: #eeeaf6;
  --bpt-strong: #ffffff;
  --bpt-muted: #9a93ad;
  --bpt-main-l: #b36bff;
  --bpt-up: #16c784;
  --bpt-down: #f0475a;
  --bpt-glow: rgba(137, 0, 242, .22);
  --bpt-tape-bg: rgba(0, 0, 0, .35);
  --bpt-overlay: rgba(21, 18, 31, .6);
  --bpt-shadow: none;
}

.bpt {
  background: radial-gradient(1200px 500px at 85% -10%, var(--bpt-glow), transparent 60%), var(--bpt-bg);
  color: var(--bpt-text);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  padding-bottom: 28px;
  overflow: hidden;
  transition: background-color .25s, color .25s;
}
.bpt *, .bpt *::before, .bpt *::after, .bpt-hero *, .bpt-ad, .bpt-ad * { box-sizing: border-box; }
.bpt-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.bpt button { font: inherit; cursor: pointer; }
.bpt a { color: inherit; }

/* ticker tape */
.bpt-bar { padding: 0; background: var(--bpt-tape-bg); }
.bpt-tape { border-bottom: 1px solid var(--bpt-line); background: var(--bpt-tape-bg); overflow: hidden; white-space: nowrap; }
.bpt-tape-track { display: inline-flex; gap: 28px; padding: 9px 0; animation: bpt-scroll 90s linear infinite; will-change: transform; }
.bpt-tape:hover .bpt-tape-track { animation-play-state: paused; }
.bpt-tape-item { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; color: var(--bpt-text); }
.bpt-tape-item img { width: 16px; height: 16px; border-radius: 50%; }
.bpt-tape-item b { font-weight: 600; color: var(--bpt-strong); }
.bpt-tape-item .p { color: var(--bpt-muted); }
@keyframes bpt-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .bpt-tape-track { animation: none; } }

/* heading */
.bpt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 28px 0 18px; flex-wrap: wrap; }
.bpt-eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--bpt-main-l); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bpt-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16c784; box-shadow: 0 0 0 0 rgba(22, 199, 132, .6); animation: bpt-pulse 2s infinite; }
@keyframes bpt-pulse { 70% { box-shadow: 0 0 0 8px rgba(22, 199, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 199, 132, 0); } }
.bpt-title { margin: 0; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; font-weight: 700; color: var(--bpt-strong); }
.bpt-updated { margin: 0; font-size: 13px; color: var(--bpt-muted); }

/* KPI strip */
.bpt-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.bpt-kpi { background: var(--bpt-card); border: 1px solid var(--bpt-line); border-radius: var(--bpt-r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; box-shadow: var(--bpt-shadow); }
.bpt-kpi-l { font-size: 12px; color: var(--bpt-muted); }
.bpt-kpi-v { font-size: 21px; font-weight: 700; color: var(--bpt-strong); line-height: 1.2; white-space: nowrap; }
.bpt-kpi-s { font-size: 12px; color: var(--bpt-muted); min-height: 16px; }
.bpt-fng-bar { position: relative; height: 5px; border-radius: 3px; margin-top: 6px; background: linear-gradient(90deg, #f0475a, #f5b400 50%, #16c784); }
.bpt-fng-bar i { position: absolute; top: -4px; width: 3px; height: 13px; border-radius: 2px; background: var(--bpt-strong); box-shadow: 0 0 0 2px var(--bpt-card); left: 50%; transition: left .6s; }

/* cards + grid */
.bpt-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.bpt-grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.bpt-card { background: var(--bpt-card); border: 1px solid var(--bpt-line); border-radius: var(--bpt-r); padding: 16px; min-width: 0; margin-bottom: 16px; box-shadow: var(--bpt-shadow); }
.bpt-grid > .bpt-card { margin-bottom: 0; }
.bpt-card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bpt-h { margin: 0; font-size: 16px; font-weight: 700; color: var(--bpt-strong); }
.bpt-h small { font-weight: 400; font-size: 12px; color: var(--bpt-muted); margin-left: 6px; }
.bpt-h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--bpt-muted); text-transform: uppercase; letter-spacing: .06em; }

/* segmented control + chips */
.bpt-seg { display: inline-flex; background: var(--bpt-card-2); border: 1px solid var(--bpt-line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.bpt-seg button { background: none; border: 0; color: var(--bpt-muted); padding: 6px 11px; border-radius: 6px; font-size: 13px; font-weight: 600; line-height: 1; }
.bpt-seg-sm button { padding: 5px 9px; font-size: 12px; }
.bpt-seg button:hover { color: var(--bpt-strong); }
.bpt-seg button.on { background: var(--bpt-main); color: #fff; }
.bpt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bpt-chips button { background: transparent; border: 1px solid var(--bpt-line); color: var(--bpt-muted); padding: 4px 10px; border-radius: 99px; font-size: 12px; }
.bpt-chips button.on, .bpt-chips button:hover { border-color: var(--bpt-main-l); color: var(--bpt-strong); }
.bpt-chips button.on { background: rgba(137, 0, 242, .14); }

/* chart */
.bpt-chart-h { align-items: flex-start; }
.bpt-sym { display: flex; flex-direction: column; gap: 10px; }
.bpt-quote { font-size: 24px; font-weight: 700; color: var(--bpt-strong); }
.bpt-quote span { font-size: 14px; font-weight: 600; margin-left: 6px; }
.bpt-ind { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--bpt-muted); margin-bottom: 6px; align-items: center; }
.bpt-ind label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; margin: 0; }
.bpt-ind input { accent-color: var(--bpt-main); margin: 0; }
.bpt-ind i { width: 10px; height: 2px; background: var(--c); display: inline-block; }
.bpt-legend { margin-left: auto; color: var(--bpt-text); font-size: 12px; }
.bpt-legend b { color: var(--bpt-strong); }
.bpt-chart { height: 380px; position: relative; }
.bpt-rsi { height: 110px; border-top: 1px solid var(--bpt-line); }
.bpt-rsi[hidden] { display: none; }
.bpt-loading::after { content: "Loading…"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--bpt-muted); background: var(--bpt-overlay); z-index: 5; }

/* movers + derivatives */
.bpt-mv-list { list-style: none; margin: 0; padding: 0; }
.bpt-mv-list li { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--bpt-line); font-size: 13px; margin: 0; }
.bpt-mv-list li:last-child { border-bottom: 0; }
.bpt-mv-list img { width: 22px; height: 22px; border-radius: 50%; }
.bpt-mv-list b { color: var(--bpt-strong); }
.bpt-mv-list .n { color: var(--bpt-muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpt-derivs { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bpt-deriv { background: var(--bpt-card-2); border-radius: 9px; padding: 10px; font-size: 12px; color: var(--bpt-muted); }
.bpt-deriv b { display: block; color: var(--bpt-strong); font-size: 14px; margin-bottom: 2px; }

/* heatmap */
.bpt-heatmap { position: relative; height: 420px; border-radius: 8px; overflow: hidden; }
.bpt-tile { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; border: 1px solid var(--bpt-card); overflow: hidden; text-decoration: none; transition: filter .15s; padding: 2px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.bpt a.bpt-tile { color: #fff; }
.bpt-tile:hover { filter: brightness(1.12); z-index: 2; }
.bpt-tile b { font-weight: 700; line-height: 1.1; }
.bpt-tile span { opacity: .92; line-height: 1.2; }

/* table */
.bpt-table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.bpt-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; border: 0; }
.bpt-table th { color: var(--bpt-muted); font-weight: 500; text-align: right; padding: 8px 8px; border: 0; border-bottom: 1px solid var(--bpt-line); white-space: nowrap; background: none; font-size: 12px; }
.bpt-table td { text-align: right; padding: 9px 8px; border: 0; border-bottom: 1px solid var(--bpt-line); white-space: nowrap; background: none; color: var(--bpt-text); }
.bpt-table th:nth-child(-n+2), .bpt-table td:nth-child(-n+2) { text-align: left; }
.bpt-table td:first-child { color: var(--bpt-muted); width: 28px; }
.bpt-table tr:hover td { background: var(--bpt-card-2); }
.bpt-coin img { width: 20px; height: 20px; border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.bpt-coin b { color: var(--bpt-strong); font-weight: 600; }
.bpt-coin span { color: var(--bpt-muted); font-size: 12px; margin-left: 4px; }
.bpt-spark { display: block; margin-left: auto; }

/* macro */
.bpt-macro { list-style: none; margin: 0; padding: 0; }
.bpt-macro li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bpt-line); font-size: 13px; margin: 0; }
.bpt-macro li span:first-child { color: var(--bpt-muted); }
.bpt-macro li b { color: var(--bpt-strong); font-weight: 600; margin-right: 8px; }
.bpt-curve { height: 150px; }
.bpt-curve svg { width: 100%; height: 100%; overflow: visible; }
.bpt-curve-note { font-size: 11px; color: var(--bpt-muted); margin-top: 2px; }
.bpt-curve-note b { color: var(--bpt-strong); }

/* news */
.bpt-news { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow-y: auto; scrollbar-width: thin; }
.bpt-news li { padding: 11px 0; border-bottom: 1px solid var(--bpt-line); margin: 0; }
.bpt-news a { text-decoration: none; color: var(--bpt-text); font-weight: 500; font-size: 14.5px; line-height: 1.4; display: block; }
.bpt-news a:hover { color: var(--bpt-main-l); }
.bpt-news-m { display: block; font-size: 12px; color: var(--bpt-muted); margin-top: 3px; }
.bpt-news-m em { font-style: normal; color: var(--bpt-main-l); margin-left: 6px; }
.bpt-news .fresh a::before { content: "NEW"; font-size: 10px; font-weight: 700; color: #fff; background: var(--bpt-main); border-radius: 4px; padding: 2px 5px; margin-right: 8px; vertical-align: 2px; }

/* calendar */
.bpt-next { background: linear-gradient(135deg, rgba(137, 0, 242, .22), rgba(137, 0, 242, .05)); border: 1px solid rgba(137, 0, 242, .3); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-size: 13px; }
.bpt-next:empty { display: none; }
.bpt-next b { display: block; color: var(--bpt-strong); font-size: 15px; margin: 2px 0; }
.bpt-next .cd { font-size: 20px; font-weight: 700; color: var(--bpt-strong); }
.bpt-cal { list-style: none; margin: 10px 0 0; padding: 0; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.bpt-cal li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--bpt-line); font-size: 13px; margin: 0; }
.bpt-cal li.past { opacity: .5; }
.bpt-cal .d { color: var(--bpt-muted); font-size: 12px; line-height: 1.3; }
.bpt-cal .t { color: var(--bpt-strong); font-weight: 500; }
.bpt-cal .t::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #f5b400; vertical-align: 1px; }
.bpt-cal .High .t::before { background: var(--bpt-down); }
.bpt-cal .fp { color: var(--bpt-muted); font-size: 12px; }
.bpt-cal .day { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--bpt-main-l); padding: 10px 0 2px; border: 0; }

.bpt-up { color: var(--bpt-up); }
.bpt-down { color: var(--bpt-down); }
.bpt-flat { color: var(--bpt-muted); }
.bpt-foot { font-size: 12px; color: var(--bpt-muted); margin: 8px 0 0; }

/* ---------- hero: top stories ---------- */
.bpt-hero { background: var(--bpt-bg); padding: 26px 0 8px; font-family: inherit; }
html.s-dark .bpt-hero { background: var(--bpt-bg); }
.bpt-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bpt-hero-head .bpt-sec-title { margin: 0; color: var(--bpt-strong); }
.bpt-hero-note { font-size: 12px; color: var(--bpt-muted); display: inline-flex; align-items: center; gap: 8px; }
.bpt-hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.bpt-hero a { text-decoration: none; color: inherit; }
.bpt-hero-main { position: relative; display: block; border-radius: 14px; overflow: hidden; min-height: 420px; background: linear-gradient(135deg, #1c1829, #8900f2); }
.bpt-hero-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bpt-hero-main:hover img { transform: scale(1.03); }
.bpt-hero-ov { position: absolute; inset: auto 0 0 0; padding: 90px 24px 22px; background: linear-gradient(transparent, rgba(8, 5, 16, .55) 35%, rgba(8, 5, 16, .92)); color: #fff; display: flex; flex-direction: column; gap: 8px; }
.bpt-hero-title { font-size: clamp(20px, 2.3vw, 30px); line-height: 1.2; font-weight: 700; color: #fff; }
.bpt-hero-ex { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .8); }
.bpt-hero-m { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.bpt-hero-src { background: var(--bpt-main); color: #fff; font-weight: 700; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; }
.bpt-hero-m time { opacity: .85; }
.bpt-hero-side { display: grid; grid-template-rows: repeat(4, 1fr); gap: 12px; }
.bpt-hero-item { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; background: var(--bpt-card); border: 1px solid var(--bpt-line); border-radius: 12px; padding: 10px; box-shadow: var(--bpt-shadow); transition: border-color .2s; min-width: 0; }
.bpt-hero-item:hover { border-color: var(--bpt-main-l); }
.bpt-hero-thumb { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #1c1829, #8900f2); }
.bpt-hero-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bpt-hero-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bpt-hero-body strong { font-size: 14.5px; line-height: 1.35; color: var(--bpt-strong); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bpt-hero-item:hover strong { color: var(--bpt-main-l); }
.bpt-hero-item .bpt-hero-m time { color: var(--bpt-muted); opacity: 1; }
.bpt-hero-item .bpt-hero-src { background: rgba(137, 0, 242, .12); color: var(--bpt-main-l); }
.bpt-hero-noimg { position: absolute; inset: 0; }

/* latest posts */
.bpt-posts-wrap { padding-top: 28px; padding-bottom: 20px; }
.bpt-posts { margin-bottom: 36px; }
.bpt-sec-title { font-size: 22px; font-weight: 700; margin: 0 0 16px; padding-left: 12px; border-left: 4px solid var(--c-main, #8900f2); }
.bpt-post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.bpt-post { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; }
.bpt-post-img { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #1c1829, #8900f2); display: block; }
.bpt-post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.bpt-post:hover .bpt-post-img img { transform: scale(1.04); }
.bpt-post-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-main, #8900f2); }
.bpt-post-t { display: block; font-size: 16px; line-height: 1.35; margin: 4px 0; color: var(--c-headings, #000); }
html.s-dark .bpt-post-t { color: #fff; }
.bpt-post:hover .bpt-post-t { color: var(--c-main, #8900f2); }
.bpt-post-m { font-size: 12px; color: var(--c-post-meta, #777); }

/* responsive */
@media (max-width: 1080px) {
  .bpt-kpis { grid-template-columns: repeat(3, 1fr); }
  .bpt-grid-main { grid-template-columns: 1fr; }
  .bpt-post-grid { grid-template-columns: repeat(2, 1fr); }
  .bpt-hero-grid { grid-template-columns: 1fr; }
  .bpt-hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
}
@media (max-width: 640px) {
  .bpt-wrap { padding: 0 14px; }
  .bpt-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bpt-kpi { padding: 12px; }
  .bpt-kpi-v { font-size: 18px; }
  .bpt-chart { height: 300px; }
  .bpt-heatmap { height: 460px; }
  .bpt-hide-sm { display: none; }
  .bpt-legend { display: none; }
  .bpt-post-grid { grid-template-columns: 1fr; }
  .bpt-seg button { padding: 6px 8px; }
  .bpt-hero-main { min-height: 340px; }
  .bpt-hero-ov { padding: 70px 16px 16px; }
  .bpt-hero-ex { display: none; }
  .bpt-hero-side { grid-template-columns: 1fr; }
  .bpt-hero-item { grid-template-columns: 104px 1fr; }
  .bpt-hero-note { display: none; }
}
@media (max-width: 420px) { .bpt-hide-xs { display: none; } }
