/* PreStocks trading competition (/leaderboard/). Built on the homepage's own
   components (abstract.css: .ab-hero, .ab-button, .ab-stats, .ab-faq,
   .ab-closing); this file only adds what the homepage has no component for.
   Namespace: .lb-* */
.lb-page {
  --lb-ink-2: #405164;
  --lb-muted: #526374;
  --lb-card: #ffffff;
  --lb-ease: cubic-bezier(.2, .7, .2, 1);
}
.lb { overflow-x: clip; }
.lb :where(h2, h3, p, ol, ul, figure) { margin: 0; }

/* ------------------------------------------------------------------ hero */
/* Title left, Freeport x PreStocks pills right; the pills scale with the title and scale with it (--lb-t). */
.lb-hero__head {
  --lb-t: clamp(44px, 6vw, 96px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: calc(var(--lb-t) * .22) calc(var(--lb-t) * .32); min-width: 0;
}
.lb-hero__head h1 { font-size: var(--lb-t); white-space: nowrap; }
.lb-hero.ab-hero { padding-top: 40px; }
.lb-partners { display: flex; align-items: center; gap: calc(var(--lb-t) * .14); }
.lb-partner {
  display: inline-flex; align-items: center; gap: calc(var(--lb-t) * .11);
  height: calc(var(--lb-t) * .86); padding-inline: calc(var(--lb-t) * .24);
  border-radius: calc(var(--lb-t) * .13);
  background: #e6ebec; color: var(--ab-navy);
  font: 500 calc(var(--lb-t) * .36)/1 var(--ab-sans); letter-spacing: -.02em;
  transition: background .2s;
}
.lb-partner:hover { background: #d8e3e8; }
.lb-partner svg { width: auto; height: calc(var(--lb-t) * .4); flex: none; }
.lb-partner img { display: block; width: auto; height: calc(var(--lb-t) * .4); }
.lb-partners__x { font: 400 calc(var(--lb-t) * .3)/1 var(--ab-sans); color: var(--ab-slate); }
.lb-facts { list-style: none; padding: 0; margin-top: 22px !important; display: grid; gap: 10px; max-width: 620px; }
.lb-facts li { position: relative; padding-left: 26px; font: 500 15px/1.7 var(--ab-body); color: var(--lb-ink-2); }
.lb-facts li::before {
  content: ""; position: absolute; left: 2px; top: .6em; width: 11px; height: 6px;
  border-left: 1.6px solid var(--ab-navy); border-bottom: 1.6px solid var(--ab-navy);
  transform: rotate(-45deg);
}

/* Dot field that resolves into each company's mark (leaderboard-motion.js). */
.lb-morph { height: clamp(280px, 28vw, 380px); }
.lb-morph canvas { display: block; width: 100%; height: calc(100% - 40px); }
.lb-morph__caption {
  display: flex; justify-content: center; align-items: baseline; gap: 10px; height: 40px;
  font: 500 14px/1.4 var(--ab-sans); color: var(--ab-navy);
  transition: opacity .35s var(--lb-ease), transform .35s var(--lb-ease);
}
.lb-morph__caption span { color: var(--ab-slate); font-weight: 400; }
.lb-morph__caption.is-out { opacity: 0; transform: translateY(5px); }

.lb-stats strong { font-variant-numeric: tabular-nums; }
/* Same type for every stat; columns size to their content and share the gaps equally. */
.ab-stats.lb-stats { grid-template-columns: repeat(4, auto); justify-content: space-between; }
.lb-hero .ab-product-copy > p + p { margin-top: 14px; }

/* --------------------------------------------------------------- sections */
.lb-section { padding-top: 72px; }
.lb-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.lb-section-head .ab-actions { margin-top: 0; flex: none; }
.lb-h2 { font: 400 clamp(54px, 5.4vw, 80px)/1.07 var(--ab-serif); letter-spacing: -.025em; color: var(--ab-navy); }
.lb-sub { font: 500 17px/1.8 var(--ab-body); color: var(--lb-ink-2); max-width: 620px; margin-top: 20px !important; }
.lb-note { font: 400 13px/1.6 var(--ab-sans); color: var(--ab-slate); max-width: 420px; text-align: right; }

/* ------------------------------------------------------------- leaderboard */
.lb-table-wrap { background: var(--lb-card); border-radius: 12px; overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lb-table th, .lb-table td { padding: 22px 32px; text-align: left; }
.lb-table th { font: 500 13px/1.3 var(--ab-sans); color: var(--ab-slate); border-bottom: 1px solid var(--ab-rule); white-space: nowrap; }
.lb-table td { font: 500 16px/1.3 var(--ab-sans); color: var(--ab-navy); border-bottom: 1px solid var(--ab-rule); }
.lb-table tbody tr:last-child td { border-bottom: 0; }
.lb-table .is-num { text-align: right; white-space: nowrap; }
.lb-table { table-layout: fixed; }
.lb-col-rank { width: 9%; }
.lb-col-share { width: 37%; }
.lb-table thead th:nth-child(3) { width: 18%; }
.lb-col-wallet { width: 36%; }
/* Volume sits centred between the share bar and the wallet. */
.lb-table th:nth-child(3), .lb-table td:nth-child(3) { text-align: center; }
.lb-rank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; border-radius: 50%; font: 500 15px/1 var(--ab-sans);
}
tr.is-podium .lb-rank { background: var(--ab-navy); color: var(--ab-paper); }
tr.is-podium.is-r2 .lb-rank { background: #34506f; }
tr.is-podium.is-r3 .lb-rank { background: #667f99; }
.lb-wallet { font: 500 14px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.lb-wallet__short { display: none; }
.lb-share { display: flex; align-items: center; gap: 22px; }
.lb-share__bar { flex: 1 1 auto; max-width: 300px; height: 6px; border-radius: 3px; background: var(--ab-soft); overflow: hidden; }
.lb-share__bar i { display: block; height: 100%; border-radius: inherit; background: var(--ab-navy); transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--lb-ease); }
.lb-share__pct { min-width: 3.6em; }
.lb-table tr.is-out td { color: var(--ab-slate); }
.lb-table tr.lb-cutoff td, .lb-table tr.lb-open td {
  padding: 14px 28px; background: #f1f4f6; text-align: center;
  font: 500 13px/1.4 var(--ab-sans); color: var(--ab-slate);
}
.lb-rows-in tr { animation: lb-row .6s var(--lb-ease) both; animation-delay: calc(var(--r, 0) * 30ms); }
@keyframes lb-row { from { opacity: 0; transform: translateY(8px); } }

/* Before the start the board is empty, so the countdown is the content. */
.lb-countdown { padding: 60px 28px 64px !important; text-align: center !important; }
.lb-countdown__label { font: 500 14px/1.4 var(--ab-sans); color: var(--ab-slate); }
.lb-countdown__digits { display: flex; justify-content: center; gap: clamp(14px, 3vw, 40px); margin: 22px 0 24px; }
.lb-countdown__unit { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 2.2em; }
.lb-countdown__unit b { font: 400 clamp(52px, 7vw, 96px)/1 var(--ab-serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ab-navy); }
.lb-countdown__unit span { font: 500 12px/1 var(--ab-sans); color: var(--ab-slate); }
.lb-countdown__note { font: 500 15px/1.7 var(--ab-body); color: var(--lb-ink-2); max-width: 460px; margin: 0 auto !important; }
.lb-empty { text-align: center !important; color: var(--ab-slate) !important; padding: 56px 28px !important; }

/* ------------------------------------------------------------- how it works */
.lb-steps { list-style: none; padding: 0; margin-top: 36px !important; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lb-step { background: var(--lb-card); border-radius: 12px; padding: 28px 28px 32px; }
.lb-step__n { display: block; font: 400 40px/1 var(--ab-serif); color: #a9bdca; margin-bottom: 32px; }
.lb-step h3 { font: 500 18px/1.4 var(--ab-sans); color: var(--ab-navy); }
.lb-step p { margin-top: 8px !important; font: 500 15px/1.75 var(--ab-body); color: var(--lb-muted); }
.lb-example { display: flex; align-items: center; gap: 24px; margin-top: 6px; padding: 22px 28px; border-radius: 12px; background: var(--ab-blue); }
.lb-example__label { flex: none; padding: 8px 12px; border-radius: 6px; background: rgba(12, 35, 64, .08); font: 500 13px/1 var(--ab-sans); }
.lb-example p { font: 500 16px/1.6 var(--ab-body); color: var(--ab-navy); }
.lb-example b { font-family: var(--ab-sans); font-weight: 600; }

/* --------------------------------------------------------------- PreStocks */
.lb-names { display: grid; gap: 6px; }
.lb-name {
  display: grid; align-items: center; column-gap: 28px;
  grid-template-columns: 44px minmax(0, 1fr) 130px 120px auto;
  padding: 18px 24px; border-radius: 12px; background: var(--lb-card);
  transition: box-shadow .3s var(--lb-ease), opacity .8s var(--lb-ease), transform .8s var(--lb-ease);
}
.lb-name:hover { box-shadow: 0 16px 36px -26px rgba(12, 35, 64, .45); }
.lb-name__logo { width: 44px; height: 44px; border-radius: 9px; }
.lb-name__title { font: 500 18px/1.3 var(--ab-sans); letter-spacing: -.01em; color: var(--ab-navy); }
.lb-name__tag { margin-top: 2px !important; font: 500 14px/1.5 var(--ab-body); color: var(--lb-muted); }
.lb-name__fig { display: flex; flex-direction: column; gap: 4px; }
.lb-name__fig b { font: 400 22px/1.1 var(--ab-sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--ab-navy); }
.lb-name__fig span { font: 400 12px/1.3 var(--ab-sans); color: var(--ab-slate); }
.lb-name .ab-actions { margin-top: 0; flex-wrap: nowrap; }
.lb-info {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 3px; padding: 0; vertical-align: -2px;
  border: 1px solid #b9c6cf; border-radius: 50%; background: none; cursor: help;
  font: 600 9px/1 var(--ab-sans); color: var(--ab-slate);
}
.lb-info::before { content: ""; position: absolute; inset: -14px; }
.lb-name__fig .lb-info__tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; z-index: 5; width: 230px;
  padding: 10px 12px; border-radius: 8px; background: var(--ab-navy); color: var(--ab-paper);
  font: 400 12px/1.5 var(--ab-sans); text-align: left; white-space: normal;
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity .18s, transform .18s, visibility .18s;
}
.lb-info:hover .lb-info__tip, .lb-info:focus-visible .lb-info__tip, .lb-info:focus .lb-info__tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* -------------------------------------------------------------------- FAQ */
.lb-faq { padding-block: 72px 120px; max-width: 1320px; }
.lb-faq__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.lb-faq__group { font: 500 18px/1.4 var(--ab-sans); color: var(--ab-navy); margin: 0 0 14px; }
.lb-faq .ab-faq-item a.ab-inline-link { color: var(--ab-navy); text-decoration: underline; text-decoration-color: #a9bdca; text-underline-offset: 3px; }

/* ------------------------------------------------------------- entrances */
.lb-in { animation: lb-rise .9s var(--lb-ease) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
@keyframes lb-rise { from { opacity: 0; transform: translateY(16px); } }
.lb-reveal, [data-reveal-group] > * { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--lb-ease), transform .8s var(--lb-ease), box-shadow .3s var(--lb-ease); }
.lb-reveal.is-in, [data-reveal-group].is-in > * { opacity: 1; transform: none; }
[data-reveal-group].is-in > * { transition-delay: calc(var(--k, 0) * 60ms), calc(var(--k, 0) * 60ms), 0s; }
@media (prefers-reduced-motion: reduce) {
  .lb-reveal, [data-reveal-group] > * { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- responsive */
@media (min-width: 1024px) {
  .lb-hero { grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr); row-gap: 8px; }
  .lb-hero .lb-hero__head { grid-column: 1 / -1; grid-row: 1; }
  .lb-hero .ab-product-copy { grid-row: 2; }
  .lb-hero .ab-product-visual { grid-row: 2; }
}
@media (max-width: 1100px) {
  .lb-name { grid-template-columns: 44px minmax(0, 1fr) 120px 110px; row-gap: 16px; }
  .lb-name .ab-actions { grid-column: 2 / -1; }
}
@media (max-width: 1023px) {
  .lb-hero .ab-product-copy { margin-top: 30px; }
  .lb-morph { height: 300px; margin-top: 40px; }
  .lb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-stats.lb-stats { grid-template-columns: 1fr 1fr; justify-content: stretch; gap: 32px 24px; grid-auto-flow: dense; }
  .lb-stats > :nth-child(2), .lb-stats > :nth-child(4) { grid-column: 1 / -1; }
  .lb-faq__cols { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  .lb-section { padding-top: 56px; }
  .lb-section-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
  .lb-section-head .ab-actions { width: 100%; }
  .lb-note { text-align: left; }
  .lb-h2 { font-size: clamp(38px, 10.5vw, 60px); }
  .lb-sub { font-size: 15px; }
  .lb-table { table-layout: fixed; }
  .lb-col-share { width: auto; }
  .lb-col-wallet { width: auto; }
  .lb-table th:nth-child(3), .lb-table td:nth-child(3) { text-align: right; }
  .lb-table th, .lb-table td { padding: 13px 10px; overflow-wrap: anywhere; }
  .lb-table thead th:nth-child(3) { width: 30%; }
  .lb-table thead th:nth-child(4) { width: 26%; }
  .lb-table td { font-size: 15px; }
  .lb-col-rank { width: 44px; }
  .lb-col-share { width: auto; }
  .lb-share__bar { display: none; }
  .lb-table td.is-num:last-child { white-space: normal; }
  .lb-share__pct { min-width: 0; }
  .lb-wallet { font-size: 13px; }
  .lb-wallet__full { display: none; }
  .lb-wallet__short { display: inline; }
  .lb-info__tip { left: 0; transform: translate(-30%, 4px); }
  .lb-info:hover .lb-info__tip, .lb-info:focus .lb-info__tip { transform: translate(-30%, 0); }
  .lb-table tr.lb-cutoff td, .lb-table tr.lb-open td { padding: 12px 14px; }
  .lb-countdown { padding: 44px 14px 48px !important; }
  .lb-steps { grid-template-columns: 1fr; }
  .lb-step { padding: 22px; }
  .lb-step__n { margin-bottom: 18px; font-size: 34px; }
  .lb-example { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 22px; }
  .lb-name { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; padding: 18px; }
  .lb-name > div:nth-child(2) { grid-column: 2 / -1; }
  .lb-name > .lb-name__fig:nth-child(3) { grid-column: 2; }
  .lb-name > .lb-name__fig:nth-child(4) { grid-column: 3; }
  .lb-name .ab-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .lb-name .ab-button { flex: 1 1 0; }
  .lb-faq { padding-block: 56px 88px; }
}
@media (max-width: 600px) {
  .lb-hero .ab-product-copy { margin-top: 24px; }
  .lb-facts li { font-size: 14px; }
  .lb-morph { height: 240px; margin-top: 36px; }
}
@media (max-width: 380px) {
  .lb-table th, .lb-table td { padding: 12px 10px; }
  .lb-rank { min-width: 28px; height: 28px; font-size: 13px; }
}
