/* ============================================================
   PUPRIME — trading-bridge.css (page-specific components)
   Dark-first trading hub: panels, matrix, ticker, mocks, tables
   ============================================================ */

/* ---------- RISK BANNER ---------- */
#risk-banner { background: var(--bg-panel); border-bottom: 1px solid var(--border); color: #f4f6f9; }
#risk-banner * { color: inherit; }
.risk-banner-inner { max-width: var(--maxw); margin-inline: auto; padding: 8px var(--space-4); font-size: .76rem; color: var(--text-muted); text-align: center; line-height: 1.5; }
.risk-banner-inner strong { color: var(--bear); }

/* ---------- HERO (broadcast / editorial / generic) ---------- */
.hero { position: relative; padding-block: var(--space-8) var(--space-7); background: radial-gradient(1000px 500px at 80% -10%, rgba(59,130,246,.16), transparent 60%), radial-gradient(800px 400px at 0% 120%, rgba(0,197,130,.12), transparent 55%); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; gap: var(--space-6); align-items: center; }
.hero h1 { margin-bottom: var(--space-4); }
.hero .lead { font-size: 1.15rem; max-width: 600px; margin-bottom: var(--space-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-top: var(--space-6); }
.hero-stat .val { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); display: block; }
.hero-stat .lbl { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
@media (min-width: 780px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }

/* ---------- DUAL TICKER / MARQUEE ---------- */
.ticker-viewport { overflow: hidden; background: var(--bg-panel); border-block: 1px solid var(--border); }
.ticker-marquee { display: flex; width: max-content; }
.ticker-track { display: flex; align-items: center; gap: var(--space-5); padding: 10px var(--space-3); white-space: nowrap; animation: ticker-scroll 38s linear infinite; }
.ticker-track.reverse { animation-direction: reverse; }
.ticker-viewport:hover .ticker-track,
.ticker-viewport:focus-within .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: var(--space-2); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ticker-item .sym { color: var(--text); font-weight: 600; }
.ticker-item .px { color: var(--text-muted); font-family: var(--font-mono); }
.ticker-item .chg { font-family: var(--font-mono); font-weight: 600; }
.ticker-item .chg.up { color: var(--bull); }
.ticker-item .chg.down { color: var(--bear); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- PANELS / BENTO ---------- */
.panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.panel-2 { background: var(--bg-panel-2); }
.bento { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.bento .panel h3 { margin-bottom: var(--space-2); }
.bento .panel p { font-size: .92rem; }
.bento .panel .panel-icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--bg-elevate); display: grid; place-items: center; margin-bottom: var(--space-3); color: var(--accent-system); font-size: 1.3rem; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 780px) { .bento { grid-template-columns: repeat(3, 1fr); } .bento .span-2 { grid-column: span 2; } }

/* ---------- COMPARISON MATRIX / DENSE TABLES ---------- */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.matrix, table.data-table { min-width: 560px; }
table.matrix th, table.matrix td, table.data-table th, table.data-table td { padding: 14px var(--space-4); text-align: left; border-bottom: 1px solid var(--border-soft); font-size: .9rem; }
table.matrix thead th, table.data-table thead th { background: var(--bg-panel-2); color: var(--text); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; position: sticky; top: 0; }
table.matrix td.num, table.data-table td.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); color: var(--text); }
table.matrix tbody tr:hover, table.data-table tbody tr:hover { background: var(--bg-panel); }
table.matrix .highlight-col { background: rgba(59,130,246,.08); color: var(--text); }
.cell-yes { color: var(--bull); font-weight: 700; }
.cell-no { color: var(--bear); font-weight: 700; }

/* ---------- ACCOUNT COMPARE TEASER ---------- */
.account-cards { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.account-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); position: relative; }
.account-card.featured { border-color: var(--cta); }
.account-card .tag { position: absolute; top: -10px; right: var(--space-4); background: var(--cta); color: var(--cta-ink); font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.account-card h3 { margin-bottom: var(--space-1); }
.account-card .price { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-block: var(--space-2); }
.account-card ul { display: flex; flex-direction: column; gap: var(--space-2); margin-block: var(--space-4); }
.account-card ul li { font-size: .9rem; color: var(--text-muted); padding-left: 22px; position: relative; }
.account-card ul li::before { content: '\2713'; position: absolute; left: 0; color: var(--bull); font-weight: 700; }
@media (min-width: 780px) { .account-cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- TABS ---------- */
.tab-list { display: flex; flex-wrap: wrap; gap: var(--space-2); border-bottom: 1px solid var(--border); margin-bottom: var(--space-5); }
.tab-btn { padding: 12px 18px; font-weight: 600; font-size: .92rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s ease, border-color .15s ease; }
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active { color: var(--text); border-bottom-color: var(--cta); }
.tab-panel { display: none; animation: fade-in .3s ease; }
.tab-panel.is-active { display: block; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- SEG CONTROL ---------- */
.seg-control { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-elevate); border: 1px solid var(--border); border-radius: 999px; margin-bottom: var(--space-5); }
.seg-btn { padding: 8px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--text-muted); transition: background .15s ease, color .15s ease; }
.seg-btn.is-active { background: var(--accent-system); color: #fff; }
.seg-panel { display: none; }
.seg-panel.is-active { display: block; }

/* ---------- TERMINAL / BROWSER MOCKS ---------- */
.mock-frame { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.mock-bar { display: flex; align-items: center; gap: var(--space-2); padding: 10px var(--space-4); background: var(--bg-panel-2); border-bottom: 1px solid var(--border); }
.mock-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.mock-dot.r { background: var(--bear); } .mock-dot.y { background: var(--cta); } .mock-dot.g { background: var(--bull); }
.mock-url { flex: 1; margin-left: var(--space-3); background: var(--bg-base); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; font-size: .8rem; color: var(--text-muted); font-family: var(--font-mono); }
.mock-body { padding: var(--space-4); display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
.mock-chart { height: 220px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(0,197,130,.12), transparent), var(--bg-base); border: 1px solid var(--border-soft); position: relative; overflow: hidden; }
.mock-chart::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.03) 38px 39px), repeating-linear-gradient(0deg, transparent 0 30px, rgba(255,255,255,.03) 30px 31px); }
.mock-watchlist { display: flex; flex-direction: column; gap: 6px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--bg-base); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); font-size: .82rem; font-variant-numeric: tabular-nums; }
.mock-row .up { color: var(--bull); font-family: var(--font-mono); }
.mock-row .down { color: var(--bear); font-family: var(--font-mono); }
@media (min-width: 780px) { .mock-body { grid-template-columns: 2fr 1fr; } }

/* ---------- STEPS ---------- */
.steps { display: grid; gap: var(--space-4); counter-reset: step; grid-template-columns: 1fr; }
.step { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-system); color: #fff; font-weight: 700; margin-bottom: var(--space-3); }
.step h4 { margin-bottom: var(--space-2); }
.step p { font-size: .9rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 780px) { .steps.steps-4 { grid-template-columns: repeat(4, 1fr); } .steps.steps-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- TIMELINE ---------- */
.timeline { display: flex; flex-direction: column; gap: var(--space-5); border-left: 2px solid var(--border); padding-left: var(--space-5); margin-left: var(--space-2); }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: calc(-1 * var(--space-5) - 6px); top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--cta); border: 3px solid var(--bg-base); }
.timeline-item .year { font-family: var(--font-mono); color: var(--accent-system); font-weight: 700; font-size: .9rem; }
.timeline-item h4 { margin: 4px 0; }
.timeline-item p { font-size: .92rem; }

/* ---------- VALUES GRID ---------- */
.values-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 780px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.value-card .icon { font-size: 1.6rem; margin-bottom: var(--space-2); }

/* ---------- METHOD CARDS ---------- */
.method-cards { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .method-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 780px) { .method-cards { grid-template-columns: repeat(3, 1fr); } }
.method-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.method-card .badge { align-self: flex-start; font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--bg-elevate); color: var(--text-muted); font-weight: 600; }
.method-card .badge.instant { background: rgba(0,197,130,.15); color: var(--bull); }

/* ---------- ACCORDIONS (generic / faq / checklist) ---------- */
.accordion-item, .faq-item, .checklist-item, .expand-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--space-3); overflow: hidden; }
.accordion-trigger { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; text-align: left; padding: 16px var(--space-4); font-weight: 600; font-size: .98rem; color: var(--text); }
.accordion-trigger::after { content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--accent-system); line-height: 1; transition: transform .25s ease; }
.accordion-item.open .accordion-trigger::after,
.faq-item.open .faq-trigger::after,
.checklist-item.open .checklist-trigger::after { content: '\2212'; }
.accordion-body, .faq-body, .checklist-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.accordion-body > *, .faq-body > *, .checklist-body > * { padding: 0 var(--space-4) var(--space-4); }
.accordion-body p, .faq-body p, .checklist-body p { font-size: .92rem; }
.checklist-trigger { display: flex; align-items: center; gap: var(--space-3); }
.checklist-trigger .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bull); display: grid; place-items: center; color: var(--bull); font-size: .8rem; flex-shrink: 0; }

/* ---------- EXPAND CARDS ---------- */
.expand-card .expand-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 16px var(--space-4); font-weight: 600; color: var(--text); }
.expand-card .expand-trigger::after { content: '\203A'; font-size: 1.4rem; color: var(--accent-system); transition: transform .25s ease; }
.expand-card.open .expand-trigger::after { transform: rotate(90deg); }
.expand-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.expand-card.open .expand-body { max-height: 600px; }
.expand-body > * { padding: 0 var(--space-4) var(--space-4); }

/* ---------- CTA DOCK / OFFICIAL CTA / DUAL CTA ---------- */
.cta-band { background: linear-gradient(135deg, var(--bg-panel-2), var(--bg-panel)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-7) var(--space-5); text-align: center; }
.cta-band h2 { margin-bottom: var(--space-3); }
.cta-band p { max-width: 560px; margin: 0 auto var(--space-5); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.guide-dock { position: sticky; bottom: 0; z-index: 40; background: var(--bg-panel); border-top: 1px solid var(--border); }
.guide-dock-inner { max-width: var(--maxw); margin-inline: auto; padding: var(--space-3) var(--space-4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.guide-dock-inner p { color: var(--text); font-weight: 600; font-size: .95rem; }

/* ---------- DARK CALLOUT BLOCKS ---------- */
.callout { background: #141820; border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); color: #f4f6f9; }
.callout * { color: inherit; }
.callout .callout-title { font-weight: 700; margin-bottom: var(--space-2); color: #f4f6f9; }
.callout p { color: var(--text-muted); }
.callout.warn { border-left: 3px solid var(--cta); }
.callout.info { border-left: 3px solid var(--accent-system); }

/* ---------- CONTACT / SUPPORT ROUTING ---------- */
.info-cards { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .info-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 780px) { .info-cards { grid-template-columns: repeat(3, 1fr); } }
.info-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); text-align: center; }
.info-card .ic { font-size: 1.8rem; margin-bottom: var(--space-2); }
.info-card a { color: var(--accent-system); font-weight: 600; }

/* ---------- TOC ---------- */
.toc { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.toc ol { list-style: decimal inside; display: flex; flex-direction: column; gap: var(--space-2); }
.toc a { color: var(--text-muted); font-size: .92rem; }
.toc a:hover { color: var(--accent-system); }

/* ---------- LEGAL / PROSE BODY ---------- */
.prose { max-width: 760px; }
.prose h3 { margin-top: var(--space-6); margin-bottom: var(--space-3); }
.prose p, .prose li { color: var(--text-muted); margin-bottom: var(--space-3); }
.prose ul { list-style: disc inside; margin-bottom: var(--space-3); }

/* ---------- SUMMARY PILLS ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block: var(--space-4); }
.pill { font-size: .82rem; padding: 6px 14px; border-radius: 999px; background: var(--bg-elevate); border: 1px solid var(--border); color: var(--text-muted); }
