/* PonsAnything, shared base. Consumes assets/design-tokens.css (generated from design-tokens.json). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--typography-body);
  font-weight: var(--primitive-font-weight-regular);
  font-size: var(--primitive-font-size-base);
  line-height: 1.45;
  color: var(--color-ink-strong);
  background: var(--color-surface-sky);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--color-accent); color: var(--color-ink-strong); }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: var(--primitive-color-sky-400) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--primitive-color-sky-400); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }

/* type */
.display {
  font-family: var(--typography-display);
  font-weight: var(--primitive-font-weight-black);
  font-stretch: 75%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.9;
  margin: 0;
  text-wrap: balance;
}
.display.xl { font-size: var(--primitive-font-size-display-xl); }
.display.md { font-size: var(--primitive-font-size-display-md); }
.display.sm { font-size: var(--primitive-font-size-display-sm); }
.cream { color: var(--color-ink-on-flat); text-shadow: 0 0.04em 0 var(--color-ink-strong), 0 0.09em 0.02em rgba(14,21,51,.28); }
.punch {
  font-family: var(--typography-display);
  font-weight: var(--primitive-font-weight-black);
  font-stretch: 80%;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  font-size: clamp(1.1rem, 2.3vw, 1.75rem);
  margin: 0;
}
.num { font-variant-numeric: tabular-nums; font-weight: var(--primitive-font-weight-medium); }

/* controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.5em; border-radius: var(--button-radius);
  font-weight: var(--primitive-font-weight-medium); font-size: 1rem; line-height: 1; white-space: nowrap;
  transition: transform var(--primitive-motion-fast) var(--primitive-motion-ease-out), box-shadow var(--primitive-motion-base) var(--primitive-motion-ease-out), background-color var(--primitive-motion-base) ease;
  box-shadow: 0 10px 24px -14px rgba(14,21,51,.5);
}
.btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(14,21,51,.55); } .btn:hover:active { transform: scale(.97); } }
.btn-cream { background: var(--button-primary-bg); color: var(--button-primary-fg); }
.btn-dark { background: var(--button-dark-bg); color: var(--button-dark-fg); }
.btn-accent { background: var(--button-accent-bg); color: var(--button-accent-fg); }
.btn-ghost { background: rgba(255,251,242,.16); color: var(--color-ink-on-flat); box-shadow: inset 0 0 0 2px rgba(255,251,242,.7); }
.btn-long { background: var(--color-long); color: var(--color-ink-strong); }
.btn-short { background: var(--color-short); color: var(--color-ink-on-flat); }
.btn .ic { width: 1.1em; height: 1.1em; }
.btn.xl { font-size: 1.25rem; padding: 1em 1.9em; }

.chip {
  display: inline-flex; align-items: center; gap: .4em; padding: .35em .75em;
  border-radius: var(--chip-radius); background: var(--chip-bg); color: var(--chip-fg);
  font-size: .8125rem; font-weight: var(--primitive-font-weight-medium); line-height: 1.2; white-space: nowrap;
}
.chip.up { background: var(--color-long); }
.chip.down { background: var(--color-short); color: var(--color-ink-on-flat); }
.chip.soft { background: rgba(14,21,51,.06); }

.card { background: var(--card-bg); border-radius: var(--card-radius); box-shadow: var(--card-shadow); }

/* the wordmark and the nav */
.wordmark { display: inline-flex; align-items: center; gap: .45em; font-family: var(--typography-display); font-weight: var(--primitive-font-weight-black); font-stretch: 88%; font-size: 1.35rem; letter-spacing: -0.02em; }
.wordmark svg { width: 1.6em; height: 1.1em; }
.nav { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(16px, 3vw, 40px); pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav .wordmark { transition: color var(--primitive-motion-base) ease, text-shadow var(--primitive-motion-base) ease; }
.nav.ink .wordmark { color: var(--color-ink-strong); text-shadow: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- the dark world: black, light strands, glass ---------- */
.dark { --chart-up: #3DE1A5; --chart-down: #FF5D8F; --chart-line: #FFFFFF; --chart-grid: rgba(255,255,255,.08); background: #06070B; color: #fff; }
.dark ::selection { background: #FFD23F; color: #0E1533; }
.dark * { scrollbar-color: rgba(255,255,255,.25) transparent; }
.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); }
.t2 { color: rgba(255,255,255,.62); }
.g { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 40px 90px -40px rgba(0,0,0,.85); -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); }
.g2 { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.rim { position: relative; }
.rim::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--a), #3B9BFF, #FFD23F, #FF5D8F, #3DE1A5, #B58CFF, #FF8A3D, #3B9BFF); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; animation: rimspin 10s linear infinite; pointer-events: none; opacity: .85; }
@keyframes rimspin { to { --a: 360deg; } }
.bd { --s: 40px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; flex: none; }
.bd i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 210deg, var(--c1), var(--c2), var(--c1)); -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c1) 55%, transparent)); }
.bd b { font-size: calc(var(--s) * .26); font-weight: 800; letter-spacing: .02em; color: #fff; line-height: 1; }
.dark .btn-white { background: #fff; color: #0E1533; }
.dark .btn-glass { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 0 1px 0 rgba(255,255,255,.18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.dark .btn-long { background: #3DE1A5; color: #06120D; }
.dark .btn-short { background: #FF5D8F; color: #fff; }
.dark .chip { background: rgba(255,255,255,.08); color: #fff; }
.dark .chip.up { background: rgba(61,225,165,.16); color: #3DE1A5; }
.dark .chip.down { background: rgba(255,93,143,.16); color: #FF5D8F; }
.dark .chip.soft { background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); }
.dark .nav .wordmark { color: #fff; }
.dark :focus-visible { outline-color: #FFD23F; }
@media (prefers-reduced-motion: reduce) { .rim::before { animation: none; } }
@media (prefers-reduced-transparency: reduce) { .g, .dark .btn-glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(20,22,32,.96); } }

/* ---------- the shared top nav (nav.js) and the glass ---------- */
.glass { background: rgba(255,255,255,.66); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), inset 0 1px 0 #fff, 0 24px 60px -40px rgba(14,21,51,.3); }
.topnav { position: fixed; inset: 0 0 auto 0; z-index: 80; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 clamp(14px, 2.6vw, 32px); font-family: 'Onest', system-ui, sans-serif; color: #0E1533; background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); border-bottom: 1px solid rgba(255,255,255,.7); box-shadow: 0 10px 40px -30px rgba(14,21,51,.35); transition: opacity .3s ease; }
.topnav .tn-wm { display: inline-flex; align-items: center; gap: .55em; font-family: 'Unbounded', 'Onest', system-ui, sans-serif; font-weight: 800; letter-spacing: -0.04em; font-size: 1.02rem; white-space: nowrap; }
.topnav .tn-mark { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(14,21,51,.24)); transition: transform .4s cubic-bezier(.23, 1, .32, 1); }
.topnav .tn-wm:hover .tn-mark { transform: translateY(-2px) rotate(-4deg); }
.topnav.over .tn-mark { filter: drop-shadow(0 0 14px rgba(255,255,255,.55)) drop-shadow(0 8px 18px rgba(14,21,51,.35)); }
.topnav .tn-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(14,21,51,.06); margin-left: 6px; }
.topnav .tn-tabs a { display: inline-flex; align-items: center; height: 36px; padding: 0 1em; border-radius: 999px; font-weight: 600; font-size: .92rem; color: rgba(14,21,51,.64); white-space: nowrap; transition: background-color .2s ease, color .2s ease, transform .16s cubic-bezier(.23,1,.32,1); }
.topnav .tn-tabs a:hover { color: #0E1533; }
.topnav .tn-tabs a:active { transform: scale(.96); }
.topnav .tn-tabs a[aria-current="page"] { background: #fff; color: #0E1533; box-shadow: 0 8px 18px -12px rgba(14,21,51,.5); }
.topnav .tn-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topnav .tn-live { display: inline-flex; align-items: center; gap: .55em; height: 36px; padding: 0 .95em 0 .8em; border-radius: 999px; background: rgba(14,21,51,.06); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.topnav .tn-live i { width: 8px; height: 8px; border-radius: 50%; background: #17C98A; box-shadow: 0 0 0 0 rgba(23,201,138,.6); animation: tn-pulse 2s ease-out infinite; }
.topnav .tn-live img { width: 16px; height: 16px; object-fit: contain; }
@keyframes tn-pulse { 0% { box-shadow: 0 0 0 0 rgba(23,201,138,.6); } 100% { box-shadow: 0 0 0 10px rgba(23,201,138,0); } }
.topnav .tn-wallet { display: inline-flex; align-items: center; gap: .5em; height: 40px; padding: 0 1.05em; border-radius: 999px; background: #0E1533; color: #fff; font-weight: 700; font-size: .9rem; white-space: nowrap; box-shadow: 0 14px 30px -16px rgba(14,21,51,.7); transition: transform .16s cubic-bezier(.23,1,.32,1); }
.topnav .tn-wallet:active { transform: scale(.97); }
.topnav .tn-wallet .dot { width: 8px; height: 8px; border-radius: 50%; background: #17C98A; }
.topnav .tn-burger { display: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(14,21,51,.06); place-items: center; }
.topnav .tn-burger svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
/* over the story: white text, ink glass */
.topnav.over { background: transparent; border-bottom: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
.topnav.over .tn-wm { text-shadow: 0 1px 2px rgba(14,21,51,.3), 0 2px 18px rgba(14,21,51,.4); }
.topnav.over .tn-tabs { background: rgba(14,21,51,.34); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.topnav.over .tn-tabs a { color: rgba(255,255,255,.82); }
.topnav.over .tn-tabs a:hover { color: #fff; }
.topnav.over .tn-tabs a[aria-current="page"] { background: rgba(255,255,255,.92); color: #0E1533; }
.topnav.over .tn-live { background: rgba(14,21,51,.34); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; }
.topnav.over .tn-live img { background: rgba(255,255,255,.92); border-radius: 4px; padding: 2px; }
.topnav.over .tn-wallet { background: rgba(255,255,255,.92); color: #0E1533; }
.topnav.over .tn-burger { background: rgba(14,21,51,.34); color: #fff; }
.topnav.off { opacity: 0; pointer-events: none; }
@media (max-width: 860px) {
  .topnav { height: 58px; gap: 8px; }
  .topnav .tn-tabs { position: fixed; left: 10px; right: 10px; top: 66px; flex-direction: column; padding: 8px; border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 30px 60px -30px rgba(14,21,51,.5); margin: 0; display: none; }
  .topnav.open .tn-tabs { display: flex; }
  .topnav .tn-tabs a { height: 48px; font-size: 1.05rem; color: #0E1533; }
  .topnav.over .tn-tabs a { color: #0E1533; }
  .topnav .tn-live { display: none; }
  .topnav .tn-burger { display: grid; flex: none; }
  .topnav .tn-wm { font-size: .94rem; gap: .4em; min-width: 0; }
  .topnav .tn-mark { width: 36px; height: 36px; flex: none; }
  .topnav .tn-right { flex: none; }
  .topnav .tn-wallet { height: 38px; font-size: .86rem; padding: 0 .9em; }
}
