/* ---------------------------------------------------------------------------
   Inov1 — sky-blue wallet aesthetic (Bridge Wallet / Rainbow / Base inspired).
   Cool-tinted neutrals (never pure black/white), one rationed blue→cyan accent,
   a single soft glow, low density, big rounded shapes, snappy micro-interactions.
--------------------------------------------------------------------------- */

:root {
  /* sky / cyan brand ramp */
  --sky-50: #f0faff;
  --sky-100: #e1f4fe;
  --sky-200: #c3e9fd;
  --sky-300: #93d7fb;
  --sky-400: #4fbef6;
  --sky-500: #12a5ef;
  --sky-600: #0a8bd8;

  --blue-500: #0052ff; /* primary CTA + brand only */
  --blue-600: #014cec;
  --blue-300: #578bfa;

  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;

  /* Bridge Wallet (Mt Pelerin) light system — real values from their CSS:
     faint sky canvas, white cards that FLOAT on soft blue-tinted shadows
     (not hard borders), navy text, one sky-blue accent family */
  --bg: #f7fbfe; /* faint sky-tinted canvas */
  --surface: #ffffff; /* cards float on the canvas */
  --surface-2: #e7f7fd; /* Mt Pelerin's pale-sky tint: soft fills, hover, tiles */
  --border: #e6eef4; /* hairline — dividers only, never a hard card outline */
  --text: #001e32; /* near-black navy */
  --text-2: #3d5566;
  --text-3: #7a8b96;

  /* one sky-blue accent family (their exact brand blues) */
  --sky-400: #59c6f2; /* soft sky / brand */
  --sky-500: #2ab6ee; /* action blue: buttons, links, active */
  --sky-600: #119cd5; /* hover / pressed */
  --sky-100: #e7f7fd;
  --sky-200: #cae8fa;

  --success: #1fa97b;
  --warning: #f5b841;
  --danger: #e5484d;

  --grad-brand: linear-gradient(135deg, #59c6f2 0%, #2ab6ee 100%);
  --grad-glow: radial-gradient(
    60% 60% at 50% 0%,
    rgba(89, 198, 242, 0.16) 0%,
    rgba(89, 198, 242, 0) 70%
  );

  /* the signature: soft blue-tinted lift instead of a border */
  --shadow-card: 0 5px 25px 0 rgba(89, 198, 242, 0.16);
  --shadow-pop: 0 16px 44px 0 rgba(0, 30, 50, 0.14);
  --shadow-cta: 0 5px 22px 0 rgba(42, 182, 238, 0.32);

  --r-chip: 10px;
  --r-input: 14px;
  --r-card: 20px;
  --r-modal: 26px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --glow-color: rgba(89, 198, 242, 0.16);

  /* Bloomberg face: a Haas grotesque — Helvetica Neue on Apple, Inter as the
     webfont fallback everywhere else. Headings use the same face, heavier. */
  --font-sans: "Helvetica Neue", Helvetica, "Inter", "Hanken Grotesk", Arial,
    sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* near-neutral near-black canvas (Uniswap/Rainbow/MetaMask pattern):
       ~0% saturation, elevation by LIGHTNESS steps, not navy or shadow */
    --bg: #0b0d10;
    --surface: #14171b;
    --surface-2: #1c2026;
    --border: rgba(255, 255, 255, 0.09);
    /* text hierarchy = one near-white pushed down by alpha */
    --text: #eaeef3;
    --text-2: rgba(234, 238, 243, 0.64);
    --text-3: rgba(234, 238, 243, 0.4);

    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-300: #7aa5ff;
    --sky-400: #56b7f2;
    --sky-500: #3d9bef; /* calmer sky, not electric cyan */
    --cyan-400: #67e8f9;

    --sky-100: rgba(61, 155, 239, 0.12); /* accent tint, not a solid fill */
    --sky-200: rgba(61, 155, 239, 0.2);

    --success: #2ebd85;
    --warning: #e0a13a;
    --danger: #e5484d;

    /* elevation comes from surface lightness; shadows only for true overlays */
    --shadow-card: none;
    --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.55);
    --shadow-cta: none;
    --glow-color: transparent;
  }
}

/* explicit toggle overrides the media query in both directions */
:root[data-theme="light"] {
  --bg: #f7fbfe;
  --surface: #ffffff;
  --surface-2: #e7f7fd;
  --border: #e6eef4;
  --text: #001e32;
  --text-2: #3d5566;
  --text-3: #7a8b96;
  --blue-500: #2ab6ee;
  --blue-600: #119cd5;
  --blue-300: #59c6f2;
  --sky-100: #e7f7fd;
  --sky-200: #cae8fa;
  --sky-400: #59c6f2;
  --sky-500: #2ab6ee;
  --sky-600: #119cd5;
  --cyan-400: #59c6f2;
  --success: #1fa97b;
  --warning: #f5b841;
  --danger: #e5484d;
  --shadow-card: 0 5px 25px 0 rgba(89, 198, 242, 0.16);
  --shadow-cta: 0 5px 22px 0 rgba(42, 182, 238, 0.32);
  --glow-color: rgba(89, 198, 242, 0.16);
}
:root[data-theme="dark"] {
  --bg: #0b0d10;
  --surface: #14171b;
  --surface-2: #1c2026;
  --border: rgba(255, 255, 255, 0.09);
  --text: #eaeef3;
  --text-2: rgba(234, 238, 243, 0.64);
  --text-3: rgba(234, 238, 243, 0.4);
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-300: #7aa5ff;
  --sky-100: rgba(61, 155, 239, 0.12);
  --sky-200: rgba(61, 155, 239, 0.2);
  --sky-400: #56b7f2;
  --sky-500: #3d9bef;
  --cyan-400: #67e8f9;
  --success: #2ebd85;
  --warning: #e0a13a;
  --danger: #e5484d;
  --shadow-card: none;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-cta: none;
  --glow-color: transparent;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}


/* ------------------------------ Top bar ------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Typographic wordmark — spaced caps, the A is a solid sky triangle.
   The one piece of "logo" on the site; everything else stays quiet. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.34em;
  color: var(--text);
  user-select: none;
  white-space: nowrap;
}
.wordmark .wm-a {
  color: var(--sky-500);
  /* the triangle glyph rides high — nudge it into the baseline rhythm */
  font-size: 0.88em;
  position: relative;
  top: -0.02em;
}
.wordmark-sm { font-size: 13px; opacity: 0.85; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-card);
  background: var(--grad-brand);
  color: #fff;
  font-size: 20px;
  box-shadow: var(--shadow-cta);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.brand-sub {
  font-size: 12px;
  color: var(--text-2);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--sky-600);
  background: var(--sky-100);
  padding: 6px 11px;
  border-radius: 999px;
}
.demo-badge.hidden {
  display: none;
}

.data-fresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}
.data-fresh:empty {
  display: none;
}
.fresh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent);
}
@media (max-width: 640px) {
  .data-fresh {
    display: none;
  }
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  font-size: 17px;
  display: grid;
  place-items: center;
  transition: transform 0.15s var(--ease-out), background 0.15s;
}
.icon-btn:hover {
  background: var(--sky-100);
}
.icon-btn:active {
  transform: scale(0.94);
}

/* ------------------------------ Buttons ------------------------------ */
.btn {
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), filter 0.2s ease,
    box-shadow 0.2s ease, background 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.35);
}

.btn-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  font-size: 14px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-wallet:hover {
  background: var(--sky-100);
}
.wallet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
}
.btn-wallet.connected {
  border-color: transparent;
  background: var(--sky-100);
  color: var(--sky-600);
}
.btn-wallet.connected .wallet-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 24%, transparent);
}

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  height: 52px;
  padding: 0 24px;
  font-size: 16px;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(0, 82, 255, 0.34);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.6);
}
.btn-block {
  width: 100%;
  display: block;
}

.btn-secondary {
  height: 50px;
  padding: 0 24px;
  font-size: 15px;
  background: var(--sky-100);
  color: var(--blue-500);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--sky-200);
}

/* anchor styled as a primary button */
a.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 52px;
}

.link-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ------------------------------ Layout ------------------------------ */
.container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 22px 90px;
}

/* two groups: data (left) · trading (right) */
.tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
/* the trading side reads as "action": white pills on a sky ring */
.tabs-trading {
  background: var(--surface);
  border-color: var(--sky-200);
}
.tabs-trading .tab.active {
  background: var(--sky-500);
  color: #fff;
}
.tab {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
}
.tab.active {
  background: var(--surface);
  color: var(--blue-500);
  box-shadow: var(--shadow-card);
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: rise 0.28s var(--ease-out);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.panel-head h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.muted {
  color: var(--text-2);
  font-size: 15px;
  margin: 0;
  max-width: 46ch;
  line-height: 1.5;
}

.search {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-width: 240px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search::placeholder {
  color: var(--text-3);
}
.search:focus {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

/* ------------------------------ Cards / grid ------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.listing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s var(--ease-out), box-shadow 0.2s ease,
    border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 0.35s var(--ease-out) both;
}
.listing:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
  border-color: var(--sky-300);
}

.listing-top {
  display: flex;
  align-items: center;
  gap: 13px;
}
.prop-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--r-card);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 3px 8px rgba(11, 27, 43, 0.12);
  flex-shrink: 0;
}
.listing-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.listing-loc {
  font-size: 13px;
  color: var(--text-2);
}

.listing-stats {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 3px;
  font-weight: 500;
}
.stat-value {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-value.price {
  color: var(--sky-600);
}

.listing-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.seller {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}
.chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--sky-600);
  background: var(--sky-100);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.btn-buy {
  padding: 11px 22px;
  font-size: 14px;
  background: var(--sky-100);
  color: var(--blue-500);
}
.btn-buy:hover {
  background: var(--sky-200);
}

/* ------------------------- Liquidity pool card ------------------------- */
.pool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--sky-300);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  padding: 24px;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.pool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-glow);
  opacity: 0.5;
  pointer-events: none;
}
.pool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.chip-live {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
}
.pool-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pool-price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sky-600);
  font-variant-numeric: tabular-nums;
}
.pool-actions {
  display: flex;
  gap: 12px;
}
.pool-actions .btn {
  flex: 1;
  height: 50px;
  font-size: 15px;
}
.btn-sell {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
}
.btn-sell:hover {
  background: var(--sky-100);
}

.earn-link {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--sky-600);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: opacity 0.15s;
}
.earn-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

/* --------------------------- Wallet holdings --------------------------- */
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.holdings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 28px;
  max-width: 620px;
}
.holding {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
}
.holding .prop-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-card);
  font-size: 14px;
}
.holding-info {
  flex: 1;
  min-width: 0;
}
.holding-name {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.holding-sub {
  font-size: 12.5px;
  color: var(--text-2);
}
.holding-qty {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
  white-space: nowrap;
}
.holding .btn-buy {
  padding: 9px 18px;
  font-size: 13.5px;
  flex-shrink: 0;
}

.empty {
  text-align: center;
  color: var(--text-2);
  padding: 72px 0;
  font-size: 15px;
}

/* ------------------------------ Earn steps ------------------------------ */
.earn-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 900px;
}
.step-card {
  padding: 24px;
}
.step-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 12px 0 8px;
  letter-spacing: -0.01em;
}
.step-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.earn-note {
  grid-column: 1 / -1;
  max-width: none;
}

/* ------------------------------ Wallet picker ------------------------------ */
.wallet-ico {
  background: var(--grad-brand);
  color: #fff;
}
.wallet-list {
  margin: 0;
}
.wallet-list .holding {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s var(--ease-out);
}
.wallet-list .holding:hover {
  border-color: var(--sky-300);
}
.wallet-list .holding:active {
  transform: scale(0.98);
}
.wallet-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  object-fit: contain;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px;
}
.wallet-fallback-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ------------------------------ FAQ ------------------------------ */
.faq {
  margin-top: 72px;
  max-width: 720px;
}
.faq .section-title {
  margin-bottom: 18px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 0 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 17px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sky-500);
  font-size: 20px;
  font-weight: 500;
  transition: transform 0.2s var(--ease-out);
}
.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.faq details p {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}

/* ------------------------------ Footer ------------------------------ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.footer-brand .brand-name {
  font-size: 17px;
}
.footer-brand p {
  margin: 6px 0 0;
  font-size: 14px;
  max-width: 52ch;
}
.footer-links {
  display: flex;
  gap: 18px;
  margin-top: 12px !important;
}
.footer-links a {
  color: var(--sky-600);
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-disclaimer {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-3);
  max-width: 90ch;
}
.footer-disclaimer a { color: var(--text-3); text-decoration: underline; }
.hidden {
  display: none !important;
}

/* ------------------------------ Forms ------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.form-card {
  padding: 26px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-card {
  max-width: 620px;
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  background: linear-gradient(135deg, var(--sky-100), var(--surface));
}
.info-card strong {
  color: var(--text);
}
.info-card code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--sky-600);
}
.info-ico {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.field input {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  height: 52px;
  padding: 0 16px;
  border-radius: var(--r-input);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  width: 100%;
}
.field input::placeholder {
  color: var(--text-3);
}
.field input:focus {
  border-color: var(--sky-400);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}
.field-hint {
  font-size: 12px;
  color: var(--text-3);
  min-height: 14px;
}
.field-hint.center {
  text-align: center;
}
.field-row {
  display: flex;
  gap: 14px;
}
.field-row .field {
  flex: 1;
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  background: linear-gradient(135deg, var(--sky-100), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--r-input);
}
.summary-amount {
  font-size: 21px;
  font-weight: 700;
  color: var(--sky-600);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ------------------------------ Modal ------------------------------ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 11, 24, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade 0.18s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-modal);
  padding: 26px;
  box-shadow: var(--shadow-pop);
  animation: pop 0.24s var(--ease-out);
  /* phones: the token sheet is taller than the screen — it must scroll
     inside itself, otherwise the bottom half is simply unreachable */
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: none;
  background: var(--surface-2);
  color: var(--text-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, transform 0.15s var(--ease-out);
}
.modal-close:hover {
  background: var(--sky-100);
}
.modal-close:active {
  transform: scale(0.9);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.modal-head h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.kv span:first-child {
  color: var(--text-2);
  flex-shrink: 0;
}
.kv span:last-child {
  text-align: right;
}
.kv .mono {
  font-size: 12px;
  word-break: break-all;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  padding: 6px;
}
.step-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--blue-500);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.12s var(--ease-out), background 0.15s;
}
.step-btn:hover {
  background: var(--sky-100);
}
.step-btn:active {
  transform: scale(0.9);
}
.stepper input {
  flex: 1;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  outline: none;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ------------------------------ Toast ------------------------------ */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  z-index: 60;
  animation: toastin 0.3s var(--ease-out);
}
@keyframes toastin {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}
.toast.error {
  background: var(--danger);
  color: #fff;
}
.toast.success {
  background: var(--success);
  color: #04231a;
}

@media (max-width: 560px) {
  .field-row {
    flex-direction: column;
  }
  .panel-head h1 {
    font-size: 25px;
  }
  .brand-sub {
    display: none;
  }
}

/* --------------------------- Exit scanner --------------------------- */
.portfolio-summary {
  padding: 22px 24px;
  margin-bottom: 20px;
  max-width: 620px;
  background: linear-gradient(135deg, var(--sky-100), var(--surface));
  border-color: var(--sky-300);
}
.portfolio-total {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sky-600);
  font-variant-numeric: tabular-nums;
  margin: 3px 0 6px;
}
.holding-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}
.holding-est {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}
.exit-routes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.exit-routes .btn-buy {
  text-align: center;
}
.btn-swap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.scan-card {
  max-width: 620px;
  gap: 14px;
}
.info-row {
  display: flex;
  gap: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}
.info-row strong {
  color: var(--text);
}
.scan-form {
  display: flex;
  gap: 10px;
}
.scan-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.scan-btn {
  height: 48px;
  padding: 0 26px;
  font-size: 15px;
}

/* --------------------------- Performance chart --------------------------- */
.chart-wrap {
  margin-top: 4px;
  padding: 14px 14px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-input);
}
.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.chart-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.chart-note {
  font-size: 11px;
  color: var(--text-3);
}
.chart-body {
  width: 100%;
}
.chart-body svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-empty {
  font-size: 12.5px;
  color: var(--text-3);
  padding: 14px 2px;
  line-height: 1.5;
}
.disc-down {
  color: var(--success);
  font-weight: 700;
}
.disc-up {
  color: var(--danger);
  font-weight: 700;
}

/* ---- exit-price & offer intents ---- */
.fair-line {
  min-height: 1.2em;
  margin: -4px 0 10px;
  font-size: 0.85rem;
}
.fair-below { color: var(--success); font-weight: 600; }
.fair-above { color: var(--warning); font-weight: 600; }
.fair-ok { color: var(--text-2); font-weight: 600; }

.offer-box {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface-2);
}
.offer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.offer-title { font-weight: 700; font-size: 0.92rem; }
.offer-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}
.offer-form input,
.offer-form select {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
  min-width: 0;
}
.offer-mine {
  font-size: 0.88rem;
  margin-bottom: 10px;
  color: var(--text-2);
}
.offer-del {
  border: none;
  background: none;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  padding: 0 2px;
}
.btn-exit { white-space: nowrap; }
@media (max-width: 560px) {
  .offer-form { grid-template-columns: 1fr; }
}

/* ---- "Real prices" page (the price guide) ---- */
.pg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.pg-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px 16px;
}
.pg-stat-v {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pg-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: baseline;
}
/* market evolution chart */
.pg-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px;
  margin-bottom: 18px;
}
.pg-chart-wrap { position: relative; }
.pg-chart-wrap svg { display: block; width: 100%; height: auto; }
.pg-tip {
  position: absolute;
  top: 8px;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-2);
  box-shadow: 0 6px 18px rgba(10, 40, 80, 0.12);
  max-width: 170px;
}
.pg-tip strong { color: var(--text); }
.pg-issuer {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: var(--r-sm);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  vertical-align: middle;
}
.tab-link { text-decoration: none; display: inline-flex; align-items: center; }
.pg-refkind {
  font-size: 0.65rem;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 4px;
  vertical-align: middle;
}

.panel-head h1 .accent { color: var(--sky-500); }

/* The proof block: one big rounded slab of brand tint — the loudest element
   on the page, so everything else can stay quiet. */
.reality-check {
  border: none;
  border-radius: var(--r-card);
  background: var(--sky-100);
  box-shadow: none;
  padding: 0;
  margin: 0 0 30px;
  cursor: pointer;
  overflow: hidden;
}
.reality-check:hover { background: color-mix(in srgb, var(--sky-200) 55%, var(--sky-100)); }
.rc-tag {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--sky-600); padding: 18px 22px 0; border-bottom: none;
}

/* ---- Wallet reality check ---- */
.wallet-check { margin: 0 0 34px; }
.wallet-check .wc-sub { max-width: 56ch; margin: 2px 0 12px; }
.wallet-check .scan-form { max-width: 560px; }
.wc-card {
  margin-top: 14px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.wc-card.wc-demo { background: var(--surface-2); box-shadow: none; }
.wc-rent { font-size: 0.92rem; color: var(--text-2); margin: 2px 0 12px; }
.wc-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 4px 0 10px; }
.wc-table th {
  text-align: left; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); padding: 6px 8px 6px 0;
}
.wc-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--border); }
.wc-table .num { font-variant-numeric: tabular-nums; text-align: right; }
.wc-table th:nth-child(n+2), .wc-table td:nth-child(n+2) { text-align: right; }
/* Property Health Index — the signature score box */
.health {
  background: var(--surface-2);
  border-radius: var(--r-card);
  padding: 14px 16px;
  margin: 0 0 14px;
}
.health-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.health-score { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.health-score span { font-size: 0.9rem; color: var(--text-3); font-weight: 600; }
.health-band { font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; }
.health-cap { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; margin-top: 2px; }
.health-bars { display: flex; flex-direction: column; gap: 8px; }
.health-bar .hb-l { display: flex; justify-content: space-between; font-size: 0.76rem; margin-bottom: 3px; }
.health-bar .hb-l span:first-child { font-weight: 700; }
.health-bar .hb-l span:last-child { color: var(--text-3); }
.hb-track { height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.hb-fill { height: 100%; border-radius: 999px; }
.wc-muted { color: var(--text-3); font-weight: 600; }
/* tap-to-inspect readout under charts */
.chart-readout {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  padding: 7px 2px 0;
  min-height: 1.3em;
  line-height: 1.4;
}
.chart-readout.on { color: var(--text); font-weight: 600; }
.wc-muted-sm { color: var(--text-3); font-size: 0.82em; }
.wc-note { font-size: 0.8rem; color: var(--text-3); margin: 8px 0 0; }
.wc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.rc-body { padding: 12px 22px 18px; }
.rc-name { font-weight: 700; font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.rc-venue { font-size: 0.74rem; font-weight: 500; color: var(--text-3); }
.rc-nums { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 12px 0 10px; }
.rc-l { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.rc-v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.15; }
.rc-strike { text-decoration: none; color: var(--text-3); font-weight: 700; }
.rc-good { color: #16a34a; }
.rc-bad { color: #dc2626; }
.rc-arrow { font-size: 1.3rem; color: var(--text-3); padding-bottom: 4px; }
.rc-gap { margin-left: auto; text-align: right; }
.rc-foot { font-size: 0.8rem; color: var(--text-3); }
.rc-foot a { color: var(--sky-500); font-weight: 600; }
/* stratefi-style action link: uppercase, letterspaced, arrow — not a pill */
.btn-more {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 16px auto 4px;
  padding: 8px 4px;
  border: none;
  background: none;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  cursor: pointer;
}
.btn-more::after { content: " →"; color: var(--sky-500); }
.btn-more:hover { color: var(--sky-600); }
.pg-back {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: 12px;
}
.pg-back:hover { border-color: var(--sky-400); color: var(--sky-500); }
.pg-detail-title { font-size: 1.3rem; margin: 0 0 14px; letter-spacing: -0.01em; }

/* ===========================================================================
   Bridge Wallet finish (2026-07) — clean, airy, white + sky-blue.
   Cards FLOAT on soft blue-tinted shadows, not hard borders. Numbers are a
   proportional sans with tabular-nums (never monospace — that read techy).
   =========================================================================== */

/* numbers: clean sans, aligned by tabular figures, confident weight */
.pg-stat-v,
.stat-value.price,
.pool-price,
.summary-amount,
#mUnitPrice,
.portfolio-total,
.holding-qty,
.holding-est,
.rep-stat .v {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}
.pg-stat-v,
.rep-stat .v,
.portfolio-total {
  font-weight: 700;
}
/* only genuine hex addresses stay monospace */
.mono,
#mAddr,
#pmAddr {
  font-family: var(--font-mono);
}

/* micro-labels: quiet, uppercase, tracked */
.stat-label,
.rep-stat .l,
.rep-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* headings wear the display face, balanced and tight */
h1, h2, h3,
.listing-title,
.pg-detail-title,
.rep h1, .rep h2 {
  font-family: var(--font-display);
  text-wrap: balance;
  letter-spacing: -0.02em;
}

/* Cards float on soft shadow — drop the hard outlines the user disliked.
   Hairlines survive only where they DIVIDE (table rows, inputs), not frame. */
.listing,
.pg-stat,
.rep-stat,
.pg-chart-card,
.card,
.form-card,
.info-card,
.pool-card,
.portfolio-summary,
.holding,
.offer-box,
.faq details {
  border: none;
  box-shadow: var(--shadow-card);
}
.listing:hover {
  box-shadow: 0 10px 34px 0 rgba(89, 198, 242, 0.26);
}

/* the "Real data" status pill */
.demo-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- real trading panel (Binaryx on-chain venue) ---- */
.trade-box {
  background: var(--surface-2);
  border-radius: var(--r-card);
  padding: 16px;
  margin-bottom: 12px;
}
.trade-tabs {
  display: inline-flex;
  gap: 4px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-radius: var(--r-sm);
  padding: 3px;
  margin-bottom: 14px;
}
.trade-tab {
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-2);
}
.trade-tab.active {
  background: var(--surface);
  color: var(--sky-600);
  box-shadow: var(--shadow-card);
}
/* Trade tab: venue filter chips + card tags */
.trade-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.trade-venue-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.trade-sort-wrap {
  font-size: 0.82rem;
  color: var(--text-3);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.trade-sort {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.trade-cmp {
  font-size: 0.82rem;
  color: var(--text-3);
  margin: 2px 0 10px;
}
.trade-cmp strong {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.cmp-good {
  color: #16a34a;
  font-weight: 700;
}
.cmp-bad {
  color: #dc2626;
  font-weight: 700;
}
.cmp-flat {
  color: var(--text-3);
  font-weight: 700;
}
.cmp-none {
  font-style: italic;
  opacity: 0.7;
}
.stat-value.yield-val {
  color: #16a34a;
}
.rent-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  font-size: 0.76rem;
  color: var(--text-3);
}
.rent-legend .rl-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.rent-legend .rl-green { background: #16a34a; }
.rent-legend .rl-red { background: #dc2626; }
.rent-legend .rl-note { margin-top: 2px; font-style: italic; opacity: 0.85; }
.rent-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 5px;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}
.rent-badge.rb-red { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.rent-badge.rb-amber { background: rgba(217, 119, 6, 0.12); color: #b45309; }
.rent-badge.rb-green { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
.trade-yield-note {
  font-size: 0.82rem;
  line-height: 1.5;
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid #16a34a;
  border-radius: 6px;
  background: var(--surface-2, rgba(22, 163, 74, 0.04));
}
.yield-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
  vertical-align: middle;
  cursor: help;
}
.venue-chip {
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--text-2);
  transition: box-shadow 0.12s var(--ease-out);
}
.venue-chip.active {
  background: var(--surface);
  color: var(--sky-600);
  box-shadow: var(--shadow-card);
}
.venue-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-sm);
}
.venue-binaryx {
  background: color-mix(in srgb, #8247e5 16%, var(--surface));
  color: #8247e5;
}
.venue-realt {
  background: color-mix(in srgb, var(--sky-500) 16%, var(--surface));
  color: var(--sky-600);
}
.kyc-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  margin-left: 4px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, #e8a13a 18%, var(--surface));
  color: #b9741a;
}
.trade-card .listing-loc {
  display: flex;
  align-items: center;
  gap: 2px;
}
.trade-mode {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.trade-mode-title {
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.trade-mode-toggle {
  border: none;
  background: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sky-600);
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.trade-mode-toggle:hover {
  text-decoration: underline;
}
.trade-preview {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-2);
  background: color-mix(in srgb, #e8a13a 14%, var(--surface));
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.trade-preview strong {
  color: #b9741a;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.trade-note {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-2);
  background: color-mix(in srgb, var(--sky-400) 12%, var(--surface));
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.trade-note strong {
  color: var(--sky-600);
}
.trade-note a {
  color: var(--sky-600);
  font-weight: 600;
  white-space: nowrap;
}
.trade-orders-head {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 8px;
}
.ob-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.86rem;
  color: var(--text-2);
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2, rgba(127, 127, 127, 0.04));
}
.ob-head strong { font-variant-numeric: tabular-nums; }
.ob-best { color: #16a34a; }
.tt-fee { font-size: 0.78rem; color: var(--text-3); margin: -4px 0 10px; line-height: 1.4; }
.vacant-tag {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  color: #dc2626; background: rgba(220, 38, 38, 0.1);
  border-radius: 5px; padding: 1px 6px; cursor: help;
}
.paused-tag {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  color: #b45309; background: rgba(217, 119, 6, 0.12);
  border-radius: 5px; padding: 1px 6px; cursor: help;
}
.rent-alert {
  font-size: 0.86rem;
  line-height: 1.55;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid #16a34a;
  border-radius: var(--r-sm);
  background: var(--surface);
  margin: 0 0 18px;
  color: var(--text-2);
}
.rent-alert.alert-red {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}
.rent-alert a { color: var(--sky-500); font-weight: 600; }
.pg-paid-stopped { color: #dc2626; font-weight: 600; }
.trade-paid-ok { color: #16a34a; font-weight: 600; }
.trade-paid {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-2);
  margin: -2px 0 10px;
}
.trade-paid .paid-spark { width: 64px; height: 16px; flex: none; }
.tp-link { color: var(--sky-500); font-weight: 700; white-space: nowrap; margin-left: 4px; }
.trade-order {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 6px;
  background: var(--surface);
  transition: box-shadow 0.12s var(--ease-out);
}
.trade-order.sel {
  box-shadow: 0 0 0 2px var(--sky-400);
}
.trade-order .ob-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.trade-order .ob-take {
  justify-self: end;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sky-600);
  white-space: nowrap;
}
.tt-plan {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.5;
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: -4px 0 10px;
}
.tt-plan-warn { color: #b45309; font-weight: 600; }
/* token has no open orders: keep the sheet informational, hide buy controls */
.tt-noorders .field, .tt-noorders .summary, .tt-noorders .tt-plan,
.tt-noorders .tt-fee, .tt-noorders .tt-proj,
.tt-noorders #ttBuyBtn { display: none !important; }

/* what a sized purchase would mean: income + likely resale, from real data */
.tt-proj {
  background: color-mix(in srgb, var(--sky-500) 7%, var(--surface));
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin: 10px 0 4px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-2);
}
.tt-proj-line + .tt-proj-line { margin-top: 6px; }
.tt-proj strong { color: var(--text); }
/* Reental property cards — numbers stay visible on phones */
.reental-card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 13px 16px;
  margin: 10px 0;
}
.reental-card .reental-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 7px;
  font-size: 0.88rem;
  color: var(--text-2);
  align-items: baseline;
}
.reental-card .reental-nums strong { color: var(--sky-600); }
.reental-card .reental-inc { margin-top: 6px; font-size: 0.86rem; }

.tt-proj-head {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--sky-500) 18%, transparent);
}
.trade-foot {
  color: var(--text-3);
  margin-top: 8px;
}
#ttStatus {
  min-height: 1.2em;
  font-weight: 600;
}
#ttStatus a {
  color: var(--sky-600);
}

/* ===========================================================================
   RESEARCH THEME v2 (2026-07-23) — Bloomberg / Polymarket direction:
   essentially WHITE. Pure white canvas, near-black text, bold grotesque
   headlines (no serif), one crisp product blue, vivid-but-disciplined
   green/red for data, gray hairlines, flat surfaces. Overrides the earlier
   token blocks (including :root[data-theme="light"]).
   =========================================================================== */
:root, :root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f5f6;      /* light gray fills: chips, hovers, tints */
  --border: #e4e7ea;         /* gray hairline — the only card separation */
  --text: #0b0f14;           /* near-black */
  --text-2: #42505c;
  --text-3: #808b95;

  /* one crisp product blue (links, actions, wordmark) */
  --sky-50: #f4f7fe;
  --sky-100: #e9effc;
  --sky-200: #d3e0fa;
  --sky-300: #9fbcf2;
  --sky-400: #5b85e8;
  --sky-500: #2d5be3;
  --sky-600: #1e46c4;
  --blue-500: #2d5be3;
  --blue-600: #1e46c4;
  --blue-300: #5b85e8;
  --cyan-400: #2d5be3;
  --cyan-300: #5b85e8;

  --success: #12a150;        /* market green */
  --warning: #b07d1e;
  --danger: #e0393e;         /* market red */

  --grad-brand: linear-gradient(135deg, #2d5be3 0%, #2d5be3 100%);
  --grad-glow: radial-gradient(60% 60% at 50% 0%, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 70%);

  /* flat white cards separated by hairlines, not glows */
  --shadow-card: 0 0 0 1px var(--border);
  --shadow-pop: 0 0 0 1px var(--border), 0 12px 32px rgba(11, 15, 20, 0.10);
  --shadow-cta: none;

  /* Two radius tokens only — everything collapses to these (critic: kill the
     scattered 10/12/13/14/16/999px). --r-sm: inputs, buttons, small chips;
     --r-card: cards + modals. Legacy vars alias onto the two so old var() uses
     resolve here too. */
  --r-sm: 8px;
  --r-card: 12px;
  --r-chip: var(--r-sm);
  --r-input: var(--r-sm);
  --r-modal: var(--r-card);
}

/* bold grotesque headlines — Bloomberg-style weight, tight tracking */
h1, h2, .pg-detail-title, .modal-title, .big {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.025em;
}

/* kickers read like section rubrics */
.rn-kicker, .stat-label {
  letter-spacing: 0.06em;
}

/* ===========================================================================
   FRONT PAGE (2026-07-23) — Bloomberg.com markets front.
   White canvas, black module rules, ALL-CAPS section labels, black headlines
   that underline on hover, tabular numbers, green/red deltas, hairline rows.
   =========================================================================== */

/* ---- ticker strip: one cell per platform index ---- */
.ticker-cap {
  margin: 6px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-3);
}
.ticker-strip {
  display: flex;
  overflow-x: auto;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--border);
  margin: 2px 0 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ticker-strip::-webkit-scrollbar { display: none; }
.tk-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 0 0 auto;
  padding: 9px 18px 9px 14px;
  border: none;
  border-right: 1px solid var(--border);
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
}
.tk-cell:first-child { padding-left: 2px; }
.tk-cell:last-child { border-right: none; }
.tk-cell:hover .tk-sym { text-decoration: underline; }
.tk-sym {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
}
.tk-val {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.tk-flat { color: var(--text-2); }
.delta-down { color: var(--danger); }
.delta-up { color: var(--success); }

/* ---- slim wallet-check row under the ticker ---- */
.front-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.front-check-k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  flex: 0 0 auto;
}
.front-check .search {
  flex: 1;
  min-width: 0;
  padding: 7px 12px;
  font-size: 0.86rem;
}
.front-check .btn { padding: 7px 16px; font-size: 0.86rem; }
@media (max-width: 560px) { .front-check-k { display: none; } }

/* ---- page title: quiet, dense, black ---- */
.front-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 16px 0 4px;
  max-width: 46ch;
}

/* Plain-language positioning line, shown above the terminal so the "what/who/
   why" lands before any numbers. */
.front-thesis {
  max-width: 68ch;
  margin: 4px 0 20px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-2);
}
.front-thesis strong { color: var(--text); font-weight: 700; }
.front-thesis a { color: var(--sky-500); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---- two-column front: 300px stats rail + companies board ---- */
.front { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 36px; }
@media (min-width: 920px) {
  .front { grid-template-columns: 300px minmax(0, 1fr); }
  .front-rail { grid-column: 1; grid-row: 1; }
  .front-main { grid-column: 2; grid-row: 1; min-width: 0; }
}

/* ---- module chrome: 1px black rule + small caps label ---- */
.fp-module {
  border-top: 1px solid var(--text);
  padding-top: 10px;
  margin: 14px 0 28px;
}
.fp-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 10px;
}

/* ---- COMPANIES board: the markets table ---- */
.fp-table-wrap { overflow-x: auto; }
.fp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 560px;
}
.fp-table th {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.fp-table th.num { text-align: right; }
.fp-table th:first-child,
.fp-table td:first-child { padding-left: 0; }
.fp-table th:last-child,
.fp-table td:last-child { padding-right: 0; }
.fp-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
.fp-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.fp-table tbody tr { cursor: pointer; }
.fp-table tbody tr:hover td { background: var(--surface-2); }
.fp-table tbody tr:hover .fp-co-name { text-decoration: underline; }
.fp-co-name {
  display: block;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}
.fp-co-sub { display: block; font-size: 0.72rem; color: var(--text-3); }
.fp-dim { color: var(--text-3); font-weight: 400; }
.fp-inc { font-size: 0.79rem; }
.inc-ok { color: var(--success); font-weight: 700; }
.inc-bad { color: var(--danger); font-weight: 700; }
.fp-foot { font-size: 0.75rem; color: var(--text-3); margin: 8px 0 0; }

/* Phones: the COMPANIES board can't show 8 columns without the last one being
   silently clipped at the screen edge. Under 480px, drop the four less-critical
   columns — Properties (3), 90d activity (4), Volume (5), Holders (7) — and keep
   the essentials: Company, Real vs official, Mkt cap, Income status. */
@media (max-width: 480px) {
  .co-table { min-width: 0; }
  .co-table th:nth-child(3), .co-table td:nth-child(3),
  .co-table th:nth-child(4), .co-table td:nth-child(4),
  .co-table th:nth-child(5), .co-table td:nth-child(5),
  .co-table th:nth-child(7), .co-table td:nth-child(7) { display: none; }
  /* the Income cell carries the longest text — let it wrap so the four kept
     columns fit the phone width instead of clipping at the screen edge */
  .co-table th:nth-child(8), .co-table td:nth-child(8) { white-space: normal; }
  /* tighten cell padding on phones to reclaim the last few px so the four
     columns sit fully inside the viewport (no residual edge scroll) */
  .co-table th, .co-table td { padding-left: 4px; padding-right: 4px; }
}

/* ---- MARKET STATS rail: stacked stat modules (caps label + big value) ---- */
.fp-stats { display: block; }
.fp-stat-mod {
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--border);
}
.fp-stat-k {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
  white-space: nowrap;
}
.fp-stat-num {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.fp-stat-sub {
  display: block;
  color: var(--text-3);
  font-size: 0.75rem;
  line-height: 1.45;
  margin-top: 2px;
}

/* ---- reality-check card, restyled to match the module chrome ---- */
.front-main .reality-check {
  border-radius: 0;
  background: none;
  border-top: 1px solid var(--text);
  margin: 0 0 28px;
}
.front-main .reality-check:hover { background: var(--surface-2); }
.front-main .rc-tag {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 10px 0 0;
}
.front-main .rc-body { padding: 8px 0 14px; }

/* ---- drill-in header bar (back button + search share one row) ---- */
.pg-detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}
.pg-detail-bar .search { max-width: 280px; flex: 1; }

/* ===========================================================================
   SOBER PASS (2026-07-23) — Bloomberg-nav tabs, hairline chrome, flat charts.
   Kills the leftover wallet-app pills/gradients; the wordmark stays.
   =========================================================================== */

/* flat text tabs with a 2px black underline on the active one */
.tabs-row {
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 4px 20px;
}
.tabs,
.tabs-trading {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  gap: 22px;
}
.tab,
.tabs-trading .tab {
  background: none;
  border-radius: 0;
  padding: 8px 1px 10px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; /* the underline sits ON the row's hairline */
  box-shadow: none;
  transition: color 0.12s ease;
}
.tab:hover {
  color: var(--text);
}
.tab.active,
.tabs-trading .tab.active {
  background: none;
  color: var(--text);
  box-shadow: none;
  border-bottom-color: var(--text);
}

/* pills → squared hairline chrome */
.btn,
.search,
.pg-back,
.trade-sort,
.venue-chip,
.trade-tab,
.demo-badge,
.chip,
.toast {
  border-radius: var(--r-sm);
}
.btn-primary {
  box-shadow: none;
}
.btn-primary:hover {
  box-shadow: none;
}
.search:focus {
  border-color: var(--text-2);
  box-shadow: none;
}
.btn:focus-visible {
  box-shadow: 0 0 0 2px var(--sky-300);
}

/* kill leftover gradient fills — flat gray tints only */
.summary,
.info-card,
.portfolio-summary {
  background: var(--surface-2);
}
.pool-card::before {
  display: none;
}

/* ---- Bloomberg chart chrome ---- */
/* no rounded card behind any plot — hairline separation only */
.chart-wrap {
  background: none;
  border: none;
  border-radius: 0;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
}
.pg-chart-card {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  border-top: 1px solid var(--text);
  padding: 10px 0 6px;
}
/* bold small title above the plot */
.chart-title,
#pgChartTitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
/* value line: big current value + colored delta */
.bb-val-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 6px;
  font-variant-numeric: tabular-nums;
}
.bb-val {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.bb-unit {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.bb-up {
  color: var(--success);
  font-weight: 700;
  font-size: 0.88rem;
}
.bb-down {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.88rem;
}
/* period note next to a delta — says WHICH change this is (e.g. "since Dec 2022
   base"), so a big cumulative move isn't misread as a recent daily tick */
.bb-since {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.01em;
}
/* listed-only rows are informational, not clickable — drop the pointer/underline
   affordance inherited from the tradeable .fp-table above them */
.lo-table tbody tr { cursor: default; }
.lo-table tbody tr:hover .fp-co-name { text-decoration: none; }

/* ---- EstateFi Price Index: the front-page repeat-sales hero chart ---- */
.efpi-hero { margin: 14px 0 26px; }
.efpi-card { padding-top: 10px; }
.efpi-card .bb-val { font-size: 1.7rem; }
.efpi-chart-wrap { margin-top: 2px; }
.efpi-chart-wrap svg { display: block; }
.efpi-cap {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.4;
}
.efpi-cap a { color: var(--blue-500); text-decoration: none; white-space: nowrap; }
.efpi-cap a:hover { text-decoration: underline; }

/* ---- token modal: classic key-stats grid (hairlines only, no cards) ---- */
.key-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 10px;
  border-top: 1px solid var(--text);
  margin: 14px 0 4px;
  padding-top: 8px;
}
.ks-cell {
  padding: 2px 0 8px;
  min-width: 0;
}
.ks-k {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  /* long explicit labels ("ASK VS LAST SALE") wrap instead of bleeding
     into the neighbouring cell of the 4-col grid */
  white-space: normal;
  line-height: 1.2;
}
.ks-v {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--text-3);
}
@media (max-width: 480px) {
  .key-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Days-to-Exit cell: the tier word + days figure must stay fully legible, so
   this one value wraps instead of clipping in the narrow 4-col grid. */
.ks-cell.ks-dte .ks-v {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
}

/* ---- token modal: PRIMARY vs SECONDARY market split (STM-style) ----
   Each block is its own ruled module: ALL-CAPS 11px label over a 1px black
   border-top, the ks-cell grid below. The bridge line (secondary vs issuer
   price) sits at the top of the PRIMARY block, bold, green/red. */
.ks-section { margin: 14px 0 4px; }
.ks-sec-label {
  border-top: 1px solid var(--text);
  padding-top: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.ks-section .key-stats {
  border-top: none;
  margin: 6px 0 0;
  padding-top: 0;
}
.ks-bridge {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 7px 0 6px;
  border-bottom: 1px solid var(--border);
}
.ks-bridge .fp-dim { font-weight: 600; }

/* ---- Markets: the two market bands (secondary trades / listed only) ---- */
.mk-band-label {
  border-top: 1px solid var(--text);
  padding-top: 8px;
  margin: 26px 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.mk-band-label:first-of-type { margin-top: 14px; }
/* the band label already draws the black rule — the table module inside
   band 1 keeps its own, but band 2's wrapper must not double it */
.mk-listed { margin: 0 0 28px; }
.mk-listed .field-hint { margin: 0 0 12px; max-width: 720px; }

/* ---- LISTED-ONLY: one flat table, same language as the main .fp-table.
   Cells wrap (unlike the numeric secondary table) because Backing and
   Why-no-market carry full sentences. ---- */
.lo-table { min-width: 720px; }
.lo-table td {
  white-space: normal;
  vertical-align: top;
  line-height: 1.45;
  font-size: 0.82rem;
}
.lo-table td.num { white-space: normal; }
.lo-c-name { min-width: 150px; }
.lo-c-name .fp-co-sub { font-variant-numeric: tabular-nums; }
.lo-c-asset { min-width: 200px; color: var(--text-2); }
.lo-c-asset .fp-co-sub {
  font-size: 0.76rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  white-space: normal;
}
.lo-c-venue { min-width: 120px; color: var(--text-2); }
.lo-c-price { min-width: 130px; font-variant-numeric: tabular-nums; text-align: right; }
.lo-c-price strong { font-size: 0.95rem; font-weight: 800; }
.lo-c-why { min-width: 200px; color: var(--text-3); }
.lo-links { margin: 6px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- front-page MARKET STATS: primary/secondary sub-groups ---- */
.fp-stat-group { margin: 0 0 6px; }
.fp-stat-group + .fp-stat-group { margin-top: 18px; }
.fp-stat-gl {
  border-top: 1px solid var(--text);
  padding-top: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---- MARKETS tab: the flat all-token table ---- */
.mk-head {
  margin-bottom: 4px;
}
.mk-table {
  min-width: 1290px; /* rank + From-ATH + Days-to-exit + sparkline — the wrapper scrolls, never the body */
}
.mk-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.mk-table th.sortable:hover {
  color: var(--text);
}
.mk-table th.sorted {
  color: var(--text);
}
.mk-table th.sorted::after {
  content: " ↓";
}
.mk-table th.sorted.sorted-asc::after {
  content: " ↑";
}
.mk-table td.mk-name {
  white-space: normal;
  min-width: 220px;
  max-width: 380px;
}
.mk-table td.mk-name {
  display: flex;
  align-items: center;
  gap: 9px;
}
/* per-issuer coloured mark — the honest stand-in for a token logo (real
   third-party brand logos can't be embedded: CSP blocks external hosts and
   they're copyrighted). Same avatar language as the token sheet header. */
.mk-av {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mk-logo {
  flex: 0 0 auto;
  display: block;
}
.mk-table .fp-co-name {
  font-weight: 700;
}
.mk-table .mk-platform {
  color: var(--text-2);
  font-size: 0.8rem;
}
.mk-table td.mk-rank {
  color: var(--text-3);
  font-weight: 600;
  width: 30px;
}
.mk-table td.mk-sparkcell {
  padding-top: 4px;
  padding-bottom: 4px;
  width: 118px;
}
.mk-spark {
  display: inline-block;
  vertical-align: middle;
}
/* ---- Days-to-Exit cell: tiny semantic tier swatch + the days figure ---- */
.mk-table td.mk-exitcell { width: 96px; }
.exit-tier {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.exit-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* ---- platform filter row: flat text buttons, tab-style active underline ---- */
.mk-filter {
  display: flex;
  gap: 20px;
  margin: 2px 0 18px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.mk-fbtn {
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 6px 1px 8px;
  margin-bottom: -1px; /* underline sits ON the row's hairline */
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.12s ease;
}
.mk-fbtn:hover {
  color: var(--text);
}
.mk-fbtn.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---- platform context header (Markets, one platform filtered) ---- */
.mk-plat-head { margin: 6px 0 22px; }
.mk-plat-head .pg-detail-title { margin-bottom: 12px; }
.mk-plat-head .pg-stats { margin-bottom: 14px; }
.mk-plat-head .pg-chart-card { margin-bottom: 0; }

/* ---- top movers strip: two hairline modules, stacked on mobile ---- */
.mk-movers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
  margin: 0 0 4px;
}
@media (max-width: 720px) {
  .mk-movers {
    grid-template-columns: minmax(0, 1fr);
  }
}
.mk-mover-mod {
  border-top: 1px solid var(--text);
  padding-top: 8px;
  margin-bottom: 14px;
}
.mk-mover-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.82rem;
}
.mk-mover-row:hover .mk-mover-name {
  text-decoration: underline;
}
.mk-mover-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: var(--text);
}
.mk-mover-plat {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mk-mover-price {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.mk-mover-chg {
  flex: none;
  min-width: 62px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.mk-mover-empty {
  font-size: 0.78rem;
  color: var(--text-3);
  margin: 4px 0 6px;
}


/* Bloomberg footer: ink bar, caps column heads, quiet links */
.bbf { background: #0b0f14; color: #b9c2cb; margin-top: 48px; padding: 0; }
.bbf .wordmark, .bbf .wordmark .wm-a { color: #ffffff; }
.bbf-inner { display: flex; flex-direction: row; align-items: flex-start; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 36px 20px 26px; }
.bbf-brand { max-width: 360px; }
.bbf-tag { margin: 10px 0 6px; font-size: 0.84rem; line-height: 1.6; color: #8b95a0; }
.bbf-meta { font-size: 0.76rem; color: #6b7681; }
.bbf-cols { display: flex; gap: 56px; }
.bbf-h { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: #ffffff; margin-bottom: 10px; }
.bbf-col a { display: block; color: #b9c2cb; text-decoration: none; font-size: 0.86rem;
  padding: 3px 0; }
.bbf-col a:hover { color: #ffffff; text-decoration: underline; }
.bbf-bottom { border-top: 1px solid rgba(255,255,255,0.14); max-width: 1120px; margin: 0 auto;
  padding: 14px 20px 18px; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between;
  font-size: 0.76rem; color: #6b7681; }
@media (max-width: 640px) { .bbf-cols { gap: 40px; } }
