/* ============================================================
   Just2Trade — Hub Components (trading-bridge.css)
   ============================================================ */

/* ---------- generic panel ---------- */
.panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.panel--elev { background: var(--bg-panel-2); }
.panel * { }
.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color .2s ease, transform .2s ease; }
.card:hover { border-color: var(--cta); }

/* ---------- BREADCRUMB ---------- */
.breadcrumb { padding-block: 1rem; font-size: 0.82rem; color: var(--text-dim); }
.breadcrumb a:hover { color: var(--cta); }
.breadcrumb .sep { margin-inline: 0.4rem; opacity: 0.6; }

/* ---------- QUAD PANEL HERO ---------- */
.quad-hero { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 780px) { .quad-hero { grid-template-columns: 1.4fr 1fr; } }
.quad-hero-lead { display: flex; flex-direction: column; justify-content: center; }
.quad-hero-lead p { margin-top: 1rem; font-size: 1.05rem; max-width: 48ch; }
.quad-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.quad-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(2,1fr); }
.quad-cell { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.quad-cell .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.quad-cell .value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-top: 0.35rem; font-variant-numeric: tabular-nums; }
.quad-cell .delta { font-size: 0.85rem; font-variant-numeric: tabular-nums; margin-top: 0.2rem; }
.quad-cell .delta.up { color: var(--bull); }
.quad-cell .delta.down { color: var(--bear); }

/* ---------- TABS ---------- */
.tab-list { display: flex; flex-wrap: wrap; gap: 0.35rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { padding: 0.7rem 1.1rem; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tab-btn:hover { color: var(--text-on-dark); }
.tab-btn.is-active { color: var(--cta); border-bottom-color: var(--cta); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade-in .3s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- SEG CONTROL ---------- */
.seg-control { display: inline-flex; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem; gap: 0.2rem; }
.seg-btn { padding: 0.5rem 1.1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.seg-btn.is-active { background: var(--cta); color: var(--cta-ink); }
.seg-panel { display: none; margin-top: 1.5rem; }
.seg-panel.is-active { display: block; }

/* ---------- CHIPS (instrument filter / quick links / search) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: 999px; background: var(--bg-panel); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; color: var(--text-muted); transition: border-color .15s ease, color .15s ease; }
.chip:hover, .chip.is-active { border-color: var(--cta); color: var(--cta); }

/* ---------- COMPARISON MATRIX / tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.matrix, .data-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.9rem; }
.matrix th, .matrix td, .data-table th, .data-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
.matrix thead th, .data-table thead th { background: var(--bg-panel-2); color: var(--text-on-dark); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; position: sticky; top: 0; }
.matrix tbody tr:hover, .data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.matrix td.num, .data-table td.num { font-variant-numeric: tabular-nums; text-align: right; }
.matrix .yes { color: var(--bull); font-weight: 700; }
.matrix .no { color: var(--bear); }
.matrix .feature { color: var(--text-on-dark); font-weight: 600; }

/* expandable rows */
.expand-row-trigger { cursor: pointer; }
.expand-row-trigger td::before { }
.expand-detail-row td { background: var(--bg-base); padding: 0; }
.expand-detail-inner { padding: 1rem 1.25rem; color: var(--text-muted); font-size: 0.88rem; }

/* ---------- ACCORDION (generic / faq / checklist / eligibility / collapsible clauses) ---------- */
.accordion-item, .faq-item, .checklist-item, .expand-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
.accordion-trigger, .faq-trigger, .checklist-trigger, .expand-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; text-align: left; font-weight: 600; font-size: 1rem; color: var(--text-on-dark); }
.accordion-trigger::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--cta); transition: transform .2s ease; flex-shrink: 0; }
.accordion-item.open .accordion-trigger::after,
.faq-item.open .faq-trigger.accordion-trigger::after,
.checklist-item.open .checklist-trigger.accordion-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 1.25rem; }
.accordion-body > *:first-child, .faq-body > *:first-child, .checklist-body > *:first-child { padding-top: 0.25rem; }
.accordion-body > *:last-child, .faq-body > *:last-child, .checklist-body > *:last-child { padding-bottom: 1.25rem; }
.accordion-body p, .faq-body p, .checklist-body p { color: var(--text-muted); }

/* checklist tick */
.checklist-trigger .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: inline-grid; place-items: center; flex-shrink: 0; margin-right: 0.6rem; color: var(--bull); }
.checklist-item.open .checklist-trigger .tick { background: var(--bull); border-color: var(--bull); color: var(--cta-ink); }

/* ---------- EXPAND CARDS ---------- */
.expand-trigger::after { content: "\25BC"; font-size: 0.7rem; color: var(--cta); transition: transform .2s ease; flex-shrink: 0; }
.expand-card.open .expand-trigger::after { transform: rotate(180deg); }
.expand-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.expand-card.open .expand-body { max-height: 600px; }
.expand-body-inner { padding: 0 1.25rem 1.25rem; color: var(--text-muted); }

/* ---------- STEPS / RAILS / TIMELINE ---------- */
.step-rail { display: grid; gap: 1rem; counter-reset: step; }
.step { position: relative; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.25rem 3.75rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.25rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--cta); color: var(--cta-ink); font-weight: 800; display: grid; place-items: center; font-family: var(--font-display); }
.step h4 { margin-bottom: 0.3rem; }

.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1.75rem; }
.timeline-item::before { content: ""; position: absolute; left: -1.75rem; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-base); border: 3px solid var(--cta); }
.timeline-item .year { font-family: var(--font-display); font-weight: 700; color: var(--cta); }

/* ---------- STAT BANDS ---------- */
.stat-band { display: grid; gap: 1rem; grid-template-columns: repeat(2,1fr); }
@media (min-width: 780px) { .stat-band { grid-template-columns: repeat(4,1fr); } }
.stat { text-align: center; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1rem; }
.stat .big { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--cta); font-variant-numeric: tabular-nums; }
.stat .cap { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ---------- INFO CARDS / FEATURE GRID / PAYMENT GRID ---------- */
.icon-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.icon-card .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-elev); color: var(--cta); display: grid; place-items: center; font-size: 1.25rem; margin-bottom: 1rem; }
.icon-card h4 { margin-bottom: 0.4rem; }
.pay-cell { display: flex; align-items: center; gap: 0.75rem; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; font-weight: 600; }
.pay-cell .badge { font-size: 0.7rem; color: var(--text-dim); font-weight: 500; }

/* ---------- MOCK FRAMES (screenshot / browser / platform) ---------- */
.mock-frame { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mock-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; 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; background: var(--bg-base); border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.78rem; color: var(--text-dim); }
.mock-body { padding: 1.5rem; min-height: 260px; display: grid; gap: 1rem; grid-template-columns: 2fr 1fr; }
@media (max-width: 639px) { .mock-body { grid-template-columns: 1fr; } }
.mock-chart { background: linear-gradient(180deg, rgba(0,197,130,0.08), transparent); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); min-height: 220px; position: relative; overflow: hidden; }
.mock-chart::after { content: ""; position: absolute; left: 0; right: 0; bottom: 30%; height: 1px; background: var(--bull); opacity: 0.5; }
.mock-side { display: grid; gap: 0.6rem; }
.mock-side .row { display: flex; justify-content: space-between; font-size: 0.82rem; font-variant-numeric: tabular-nums; padding: 0.5rem 0.7rem; background: var(--bg-base); border-radius: var(--radius-sm); }

/* ---------- STICKY SIDE NAV / TOC ---------- */
.layout-toc { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .layout-toc { grid-template-columns: 240px 1fr; } }
.toc-sticky { position: sticky; top: calc(var(--header-h) + 1rem); align-self: start; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.toc-sticky h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 0.75rem; }
.toc-sticky a { display: block; padding: 0.4rem 0; font-size: 0.88rem; color: var(--text-muted); border-left: 2px solid transparent; padding-left: 0.6rem; }
.toc-sticky a:hover, .toc-sticky a.is-active { color: var(--cta); border-left-color: var(--cta); }

/* clause sections / policy body */
.clause { scroll-margin-top: calc(var(--header-h) + 1rem); margin-bottom: 2rem; }
.clause h3 { margin-bottom: 0.6rem; }
.clause p { margin-bottom: 0.75rem; }
.last-updated { font-size: 0.82rem; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.5rem; }

/* ---------- TIER CARDS ---------- */
.tier-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; }
.tier-card.featured { border-color: var(--cta); box-shadow: 0 0 0 1px var(--cta); }
.tier-card .tier-name { font-family: var(--font-display); font-size: 1.3rem; }
.tier-card .tier-price { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 0.5rem 0; color: var(--cta); }
.tier-card ul { margin: 1rem 0; display: grid; gap: 0.6rem; }
.tier-card ul li { padding-left: 1.4rem; position: relative; font-size: 0.9rem; color: var(--text-muted); }
.tier-card ul li::before { content: "\2713"; position: absolute; left: 0; color: var(--bull); font-weight: 700; }
.tier-card .btn { margin-top: auto; }

/* ---------- DUAL CTA ---------- */
.dual-cta { background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 3rem); text-align: center; }
.dual-cta h2 { margin-bottom: 0.75rem; }
.dual-cta p { max-width: 52ch; margin-inline: auto; }
.dual-cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; margin-top: 1.5rem; }

/* ---------- DARK CTA BAND (cta_official) ---------- */
.cta-band { background: #141820; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; color: #f4f6f9; }
.cta-band * { color: inherit; }
.cta-band h2 { color: #f4f6f9; }
.cta-band p { color: #c3cad6; max-width: 50ch; margin: 0.75rem auto 1.5rem; }
.cta-band .btn-primary { color: var(--cta-ink); }

/* ---------- NOTICE / CALLOUT ---------- */
.notice { display: flex; gap: 1rem; background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.3); border-left: 3px solid var(--system); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.notice .ic { color: var(--system); font-size: 1.5rem; flex-shrink: 0; }
.notice.warn { background: rgba(240,185,11,0.08); border-color: rgba(240,185,11,0.3); border-left-color: var(--cta); }
.notice.warn .ic { color: var(--cta); }
.amount-notice { text-align: center; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.amount-notice .amount { font-family: var(--font-display); font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 700; color: var(--cta); font-variant-numeric: tabular-nums; }
.amount-notice .cap { color: var(--text-muted); }

/* ---------- MAP STATIC ---------- */
.map-static { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-panel-2); min-height: 300px; display: grid; place-items: center; position: relative; background-image: linear-gradient(rgba(42,47,56,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(42,47,56,0.5) 1px, transparent 1px); background-size: 40px 40px; }
.map-static .pin { width: 48px; height: 48px; border-radius: 50% 50% 50% 0; background: var(--bear); transform: rotate(-45deg); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }

/* ---------- SESSION / TIMING PANELS ---------- */
.session-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .session-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 780px) { .session-grid { grid-template-columns: repeat(3,1fr); } }
.session-panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.session-panel .name { font-weight: 700; color: var(--text-on-dark); }
.session-panel .time { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 0.88rem; }
.session-panel .status { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; margin-top: 0.5rem; display: inline-block; }
.session-panel .status.open { color: var(--bull); }
.session-panel .status.closed { color: var(--text-dim); }

/* ---------- HOURS TOGGLE (seg) ---------- */
.hours-list { display: grid; gap: 0.5rem; }
.hours-list .row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border-soft); font-size: 0.9rem; }
.hours-list .row .day { color: var(--text-on-dark); font-weight: 600; }
.hours-list .row .hrs { font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* ---------- FORM (contact) ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.field input, .field textarea, .field select { width: 100%; background: var(--bg-base); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; color: var(--text-on-dark); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cta); }

/* ---------- PROMO / brand link ---------- */
.promo-code-box { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--bg-base); border: 1px dashed var(--cta); border-radius: var(--radius); padding: 1.25rem 1.5rem; flex-wrap: wrap; }
.promo-code-box .code { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.08em; color: var(--cta); }
.brand-link-box { text-align: center; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }

/* ---------- cookie table category ---------- */
.cookie-cat { font-weight: 700; color: var(--text-on-dark); }

/* ---------- focus visibility ---------- */
:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
