/* Homepage (index.html) only. Built on app-tokens.css (bl- tokens); every class here is hp- so the
   kept parts of the page (logo rails, #worldwide, #brokers, footer) render exactly as before. */

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
.hp-nav, .hp-hero, .hp-sec { text-shadow: none; font-family: var(--bl-font); }
.hp-num, .hp-px, .hp-stats b, .hp-ladder, .hp-tape, .hp-rows b, .hp-chg, .hp-box-m { font-variant-numeric: tabular-nums; }

/* Nav: the app's top bar ---------------------------------------------- */
.hp-nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--page) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--bl-line); }
.hp-nav-in { max-width: 1320px; margin: 0 auto; height: 52px; padding: 0 16px; display: flex; align-items: center; gap: 18px; }
.hp-brand { display: inline-flex; align-items: center; gap: 9px; font: 700 15px var(--bl-font); letter-spacing: -.01em; color: var(--bl-ink); }
.hp-brand img { width: 22px; height: 22px; }
.hp-links { flex: 1; justify-content: center; }
.hp-links .bl-tab { font-size: 12.5px; }
.hp-nav-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hp-acct { position: relative; }
.hp-me { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border: 0; border-radius: var(--bl-r-pill); background: var(--bl-wash-6); color: var(--bl-ink); font: 600 12.5px var(--bl-font); cursor: pointer; }
.hp-me:hover { background: var(--bl-wash-9); }
.hp-me img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--bl-card); }
.hp-me[hidden], .hp-pop[hidden], #hpSignin[hidden] { display: none; }
.hp-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 260px; padding: 14px; border-radius: 12px; background: var(--bl-popover); border: 1px solid var(--bl-line-2); box-shadow: var(--bl-shadow-float); animation: bl-rise var(--bl-settle) var(--bl-ease) both; }
.hp-pop.bl-menu { padding: 6px; }
.hp-pop-t { margin: 0 0 12px; font-size: 13px; color: var(--bl-muted); }
.hp-pop-err { margin: 10px 0 0; font-size: 12px; color: var(--bl-danger); }
#hpGsi:empty { display: none; }
.hp-menu-head { display: flex; flex-direction: column; align-items: flex-start !important; justify-content: center; gap: 2px; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--bl-line); height: auto !important; }
.hp-menu-head:hover { background: none !important; }
.hp-menu-head b { font-size: 13px; }
.hp-menu-head span { font-size: 11.5px; color: var(--bl-muted); font-weight: 400; }
.hp-menu button { cursor: pointer; }
#hpMenu button { cursor: pointer; }

/* Hero ---------------------------------------------------------------- */
.hp-hero { max-width: 1320px; margin: 0 auto; padding: 56px 0 48px; }
.hp-hero-copy { max-width: 780px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hp-hero h1 { margin: 14px 0 16px; font: 700 clamp(34px, 4.6vw, 56px)/1.04 var(--bl-font); letter-spacing: -.03em; color: var(--bl-ink); }
.hp-lede { margin: 0 0 24px; max-width: 660px; font-size: 17px; line-height: 1.55; color: var(--bl-muted); }
.hp-install { display: flex; align-items: center; gap: 10px; width: min(100%, 560px); height: 48px; text-align: left; padding: 0 8px 0 16px; border-radius: 12px; background: var(--bl-card); }
.hp-prompt { color: var(--bl-faint); font: 500 13.5px var(--bl-mono); }
.hp-install code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font: 500 13.5px var(--bl-mono); color: var(--bl-ink); }
.hp-install code::-webkit-scrollbar { display: none; }
.hp-copy { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; flex: none; }
.hp-copy svg { width: 14px; height: 14px; }
.hp-copy.done { color: var(--bl-profit); }
.hp-fine { margin: 12px 0 0; font-size: 12.5px; color: var(--bl-faint); }

/* App window with the live widgets ----------------------------------- */
.hp-win { margin-top: 36px; border-radius: 14px; background: var(--bl-frame); box-shadow: 0 0 0 1px var(--line-2), var(--bl-shadow-elevated); overflow: hidden; scroll-margin-top: 72px; }
.hp-win-bar { display: flex; align-items: center; gap: 18px; height: 40px; padding: 0 14px; }
.hp-lights { display: flex; gap: 7px; flex: none; }
.hp-lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--card-2); }
.hp-wtabs { display: flex; gap: 2px; overflow: hidden; white-space: nowrap; }
.hp-wtabs b { padding: 5px 9px; border-radius: 6px; font: 500 11.5px var(--bl-font); color: var(--bl-muted); }
.hp-wtabs b.on { color: var(--bl-ink-btn); background: var(--bl-kb-body) padding-box, var(--bl-kb-edge) border-box; border: 1px solid transparent; box-shadow: var(--bl-kb-shadow); }
.hp-win-body { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 8px; padding: 0 8px; }
.hp-pane { background: var(--bl-page); border-radius: 12px; padding: 14px 14px 10px; min-width: 0; display: flex; flex-direction: column; }
.hp-quote { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hp-sym { display: flex; flex-direction: column; gap: 4px; }
.hp-sym .bl-chip { align-self: flex-start; color: var(--bl-ink); font-weight: 700; }
.hp-sym-sub { font-size: 11px; color: var(--bl-muted); }
.hp-px { font: 780 32px/1 var(--bl-font); letter-spacing: -.02em; color: var(--bl-ink); min-width: 7ch; }
.hp-chg { font-size: 14px; font-weight: 700; color: var(--bl-muted); }
.hp-chg.up { color: var(--bl-profit); } .hp-chg.dn { color: var(--bl-loss); }
.hp-feed { margin-left: auto; }
.hp-feed[data-state="load"] i, .hp-feed[data-state="paused"] i { background: var(--bl-faint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 25%, transparent); }
.hp-feed[data-state="poll"] i { background: var(--bl-ink); box-shadow: 0 0 0 3px color-mix(in srgb,var(--ink) 15%,transparent); }
.hp-feed[data-state="live"] i { animation: hp-pulse 2s ease-in-out infinite; }
@keyframes hp-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb,var(--profit) 8%,transparent); } }
.hp-legend { height: 18px; margin: 10px 0 4px; font: 500 11px var(--bl-mono); color: var(--bl-muted); white-space: nowrap; overflow: hidden; }
.hp-legend b { color: var(--bl-ink); font-weight: 500; margin-right: 10px; }
.hp-canvas { position: relative; flex: 1; min-height: 360px; }
.hp-canvas canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.hp-paused { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: color-mix(in srgb, var(--page) 72%, transparent); font: 600 14px var(--bl-font); color: var(--bl-ink); border-radius: 8px; }
.hp-paused[hidden] { display: none; }
.hp-paused span { font: 500 12px var(--bl-font); color: var(--bl-muted); }
.hp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--bl-line); }
.hp-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-stats span { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bl-muted); }
.hp-stats b { font-size: 13.5px; font-weight: 700; color: var(--bl-ink); white-space: nowrap; }
.hp-rail { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hp-box { background: var(--bl-page); border-radius: 12px; padding: 12px 12px 8px; }
.hp-box-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.hp-box-m { font-size: 11px; color: var(--bl-muted); white-space: nowrap; }
.hp-ladder { display: flex; flex-direction: column; gap: 1px; min-height: 291px; }
.hp-lv { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 16px; align-items: center; padding: 0 6px; font-size: 11.5px; }
.hp-lv i { position: absolute; top: 0; bottom: 0; right: 0; border-radius: 3px; transition: width .25s var(--bl-ease); }
.hp-lv.a i { background: color-mix(in srgb,var(--loss) 16%,transparent); } .hp-lv.b i { background: color-mix(in srgb,var(--profit) 16%,transparent); }
.hp-lv span { position: relative; } .hp-lv span + span { text-align: right; color: var(--bl-muted); }
.hp-lv.a span:first-child { color: var(--bl-loss); } .hp-lv.b span:first-child { color: var(--bl-profit); }
.hp-mid { display: flex; justify-content: space-between; height: 22px; align-items: center; padding: 0 6px; margin: 2px 0; border-block: 1px solid var(--bl-line); font-size: 11.5px; font-weight: 700; color: var(--bl-ink); }
.hp-mid span { color: var(--bl-muted); font-weight: 500; }
.hp-tape { list-style: none; margin: 0; padding: 0; min-height: 224px; display: flex; flex-direction: column; }
.hp-tape li { display: grid; grid-template-columns: 62px 1fr 1fr; height: 16px; align-items: center; padding: 0 6px; font-size: 11.5px; border-radius: 3px; }
.hp-tape li span:first-child { color: var(--bl-faint); }
.hp-tape li span:nth-child(2) { text-align: right; } .hp-tape li span:last-child { text-align: right; color: var(--bl-muted); }
.hp-tape li.b span:nth-child(2) { color: var(--bl-profit); } .hp-tape li.a span:nth-child(2) { color: var(--bl-loss); }
.hp-tape li.big { font-weight: 700; } .hp-tape li.big span:last-child { color: var(--bl-ink); }
.hp-tape li.new { animation: hp-flash .8s var(--bl-ease); }
@keyframes hp-flash { from { background: var(--bl-wash-9); } }
.hp-win-foot { margin: 0; padding: 10px 16px 11px; font-size: 11.5px; color: var(--bl-faint); }

/* Skeletons */
.is-loading { position: relative; }
.hp-canvas.is-loading::after, .hp-ladder.is-loading::after, .hp-tape.is-loading::after, .hp-cot.is-loading::after { content: ''; position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(90deg, transparent 0, color-mix(in srgb,var(--ink) 5%,transparent) 50%, transparent 100%) 0 0 / 200% 100%, repeating-linear-gradient(180deg, color-mix(in srgb,var(--ink) 4%,transparent) 0 14px, transparent 14px 17px); animation: hp-shimmer 1.4s linear infinite; }
.hp-cot.is-loading b { visibility: hidden; }
@keyframes hp-shimmer { to { background-position: -200% 0, 0 0; } }

/* Feature sections ---------------------------------------------------- */
.hp-sec { max-width: 1320px; margin: 0 auto; padding: 72px 0 8px; scroll-margin-top: 52px; }
.hp-head { margin-bottom: 22px; }
.hp-head h2 { margin: 8px 0 0; font: 700 clamp(28px, 3.4vw, 40px)/1.1 var(--bl-font); letter-spacing: -.025em; color: var(--bl-ink); }
.hp-grid { margin-top: 10px; }
.hp-split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.hp-split-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hp-stack { display: flex; flex-direction: column; gap: 10px; }
.hp-list { list-style: none; margin: 0; padding: 4px 0 0; }
.hp-list li { display: flex; flex-direction: column; gap: 3px; padding: 13px 4px; border-top: 1px solid var(--bl-line); }
.hp-list li:first-child { border-top: 0; padding-top: 4px; }
.hp-list b { font-size: 14.5px; font-weight: 600; color: var(--bl-ink); }
.hp-list span { font-size: 13.5px; line-height: 1.5; color: var(--bl-muted); }
.hp-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px 18px; }
.hp-panel-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.hp-mt { margin-top: 6px; }
.hp-num { font: 780 24px/1 var(--bl-font); letter-spacing: -.02em; color: var(--bl-ink); }
.hp-p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.hp-note { margin: auto 0 0; padding-top: 4px; font-size: 12px; line-height: 1.5; color: var(--bl-muted); }
.hp-rows { list-style: none; margin: 0; padding: 0; }
.hp-rows li { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 34px; border-top: 1px solid var(--bl-line); font-size: 13px; color: var(--bl-ink); }
.hp-rows li:first-child { border-top: 0; }
.hp-rows b { font-weight: 700; }
.hp-rows b.up { color: var(--bl-profit); } .hp-rows b.dn { color: var(--bl-loss); }
.hp-rows-2 em { font-style: normal; font-size: 12px; color: var(--bl-muted); text-align: right; }
.hp-rows small { margin-left: 6px; font-size: 11.5px; font-weight: 600; color: var(--bl-muted); }
.hp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-states { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hp-states div { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--bl-wash-6); font-size: 13px; }
.hp-states b { font-weight: 600; }
.hp-states i { width: 8px; height: 8px; border-radius: 50%; background: var(--bl-faint); }
.hp-states i.up { background: var(--bl-profit); } .hp-states i.dn { background: var(--bl-loss); }
.hp-states i.sp { background: linear-gradient(90deg, var(--bl-profit) 50%, var(--bl-loss) 50%); }
.hp-fake-tabs > span { height: 34px; padding: 0 10px; font-size: 13px; color: var(--bl-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; }
.hp-fake-tabs > [aria-current] { color: var(--bl-ink); border-bottom-color: var(--bl-ink); }
.hp-term { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--sunken); font: 500 12px/1.6 var(--bl-mono); color: var(--bl-muted); white-space: pre-wrap; }
.hp-term b { color: var(--bl-ink); }
.hp-rules { margin: 0; padding: 0; list-style: none; counter-reset: r; columns: 2; column-gap: 18px; }
.hp-rules li { counter-increment: r; display: flex; gap: 10px; align-items: center; min-height: 34px; break-inside: avoid; border-top: 1px solid var(--bl-line); font-size: 13px; }
.hp-rules li::before { content: counter(r, decimal-leading-zero); flex: none; width: 20px; font-size: 11px; font-weight: 600; color: var(--bl-faint); font-variant-numeric: tabular-nums; }
.hp-flat { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--bl-muted); }
.hp-static { pointer-events: none; color: var(--bl-danger); }
.hp-demo { background: rgba(5,109,255,.08); }
.hp-demo i { background: #056dff; box-shadow: 0 0 0 3px rgba(5,109,255,.2); }
.hp-quote-l { margin: 0; font-size: 15px; font-weight: 600; color: var(--bl-ink); }

/* Responsive ---------------------------------------------------------- */
@media (max-width: 1180px) { .hp-links .bl-tab:nth-child(n+6) { display: none; } }
@media (max-width: 980px) {
  .hp-links { display: none; }
  .hp-win-body { grid-template-columns: 1fr; }
  .hp-rail { display: grid; grid-template-columns: 1fr 1fr; }
  .hp-split, .hp-split-r { grid-template-columns: 1fr; }
  .bl-grid-3.hp-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .hp-hero { padding: 40px 0 32px; }
  .hp-lede { font-size: 15.5px; }
  .hp-hero h1 { text-wrap: balance; }
  .hp-hero h1 br { display: none; }
  .hp-install code { font-size: 12px; }
  .hp-win { margin-top: 28px; margin-inline: -8px; }
  .hp-wtabs b:not(.on) { display: none; }
  .hp-px { font-size: 26px; }
  .hp-feed { margin-left: 0; }
  .hp-canvas { min-height: 260px; }
  .hp-stats { grid-template-columns: 1fr 1fr; }
  .hp-rail { grid-template-columns: 1fr; }
  .bl-grid-3.hp-grid, .bl-grid-2.hp-grid { grid-template-columns: 1fr; }
  .hp-sec { padding-top: 64px; }
  .hp-rules { columns: 1; }
  .hp-nav-in { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hp-feed i, .hp-tape li.new, .is-loading::after, .hp-pop { animation: none !important; }
}

/* One grid for the whole page: same side edges as the footer (v3.css .foot-in: --pad gutters, 1920 max). */
.hp-nav-in { max-width: 1920px; margin-inline: auto; padding-inline: var(--pad); }
.hp-hero, .hp-sec { max-width: none; }   /* main already applies the --pad gutters */
#markets { padding-top: 40px; }   /* the "Tracks accounts at" label that used this space is gone */
