/* =============================================================================
   CALIBERTOKEN — GLOBAL STYLESHEET (v2.2)
   -----------------------------------------------------------------------------
   Served as a static asset at /assets/css/global.css (public/, linked from
the root layout — NOT bundled). Pure CSS with zero build-time processing;
a branding or token swap is a file replacement, never a code change.

Loaded by every page. Shared concerns ONLY:
     §1  Design tokens        — color, space, radius, motion, sizing
     §2  Base reset           — typography defaults + the [hidden] invariant
     §3  Layout containers    — safe-area-aware gutters
     §4  Site chrome          — header, ticker, footer, mobile drawer
     §5  Shared components    — buttons, badges, sigil, sparkline, bars,
                                watchlist-star, live-dot, ad-unit, scrim,
                                toast, tooltip, command palette
   Page-specific rules NEVER live here.

   v2.2 fix (root-caused from the deployed file):
     - HAMBURGER SOURCE-ORDER BUG: .icon-button{display:grid} (§5) came AFTER
       .hamburger-button{display:none} (§4). Equal specificity (0,1,0), later
       rule wins — the menu button rendered on desktop. Fixed with the
       COMBINED selector .icon-button.hamburger-button (0,2,0), which beats
       .icon-button regardless of source order, forever.
   v2.1 fixes (retained):
     - [hidden]{display:none!important} invariant (§2).
     - .dimension-bars-compact defaults to display:none (§5); the board page
       owns it (on at <=860px, off again at <=360px). One representation of
       the bars at every viewport width.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   §1 DESIGN TOKENS
   ----------------------------------------------------------------------------- */
:root {
  --neutral-950: #0a0d14;
  --neutral-925: #0e1219;
  --neutral-900: #131822;
  --neutral-850: #1a202c;
  --neutral-800: #222938;
  --paper-0: #ffffff;
  --paper-50: #fafbfc;
  --paper-100: #f3f5f8;
  --paper-200: #e8ecf1;
  --paper-300: #d7dce4;
  --amber-300: #ebc073;
  --amber-400: #e0b366;
  --amber-600: #9d7530;
  --amber-700: #75581e;
  --emerald-400: #4fba8a;
  --emerald-600: #268159;
  --rose-400: #de6c6c;
  --rose-600: #a63b3b;
  --violet-400: #8b7be8;
  --violet-500: #6e5fce;

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Consolas, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 48px;
  --space-12: 64px;

  --radius-1: 6px;
  --radius-2: 10px;
  --radius-3: 14px;
  --radius-4: 20px;

  --page-max-width: 1480px;
  --page-gutter: 24px;
  --gutter-inline: max(var(--page-gutter), env(safe-area-inset-left));
  --gutter-inline-right: max(var(--page-gutter), env(safe-area-inset-right));

  --header-height: 60px;
  --header-control-size: 38px;
  --header-gap: 20px;
  --header-actions-gap: 8px;
  --brand-gap: 10px;
  --segment-button-padding: 6px 12px;
  --segment-button-font: 12.5px;

  --field-font-size: 13.5px;
  --command-input-font: 15px;

  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ticker-duration: 90s;
}

@media (max-width: 1240px) {
  :root {
    --page-gutter: 20px;
  }
}
@media (max-width: 700px) {
  :root {
    --page-gutter: 16px;
    --header-height: 56px;
    --header-control-size: 34px;
    --header-gap: 8px;
    --header-actions-gap: 6px;
    --brand-gap: 8px;
    --segment-button-padding: 5px 10px;
    --segment-button-font: 11.5px;
  }
}
@media (max-width: 420px) {
  :root {
    --segment-button-padding: 5px 8px;
    --segment-button-font: 11px;
  }
}
@media (max-width: 400px) {
  :root {
    --page-gutter: 12px;
  }
}
@media (max-width: 360px) {
  :root {
    --header-height: 52px;
    --header-control-size: 32px;
    --header-gap: 4px;
    --header-actions-gap: 4px;
    --segment-button-padding: 4px 6px;
  }
}
@media (pointer: coarse) {
  :root {
    --field-font-size: 16px;
    --command-input-font: 16px;
  }
}

:root[data-theme="dark"] {
  --background: var(--neutral-950);
  --surface-1: var(--neutral-925);
  --surface-2: var(--neutral-900);
  --surface-3: var(--neutral-850);
  --surface-4: var(--neutral-800);
  --row-hover: #161c27;
  --line-1: rgba(159, 172, 196, 0.075);
  --line-2: rgba(159, 172, 196, 0.13);
  --line-3: rgba(159, 172, 196, 0.22);
  --text-1: #e8ecf2;
  --text-2: #98a3b5;
  --text-3: #697487;
  --text-4: #464f60;
  --accent: var(--amber-400);
  --accent-strong: var(--amber-300);
  --accent-soft: rgba(224, 179, 102, 0.13);
  --accent-line: rgba(224, 179, 102, 0.34);
  --accent-glow: rgba(224, 179, 102, 0.25);
  --positive: var(--emerald-400);
  --positive-soft: rgba(79, 186, 138, 0.13);
  --negative: var(--rose-400);
  --negative-soft: rgba(222, 108, 108, 0.13);
  --info: var(--violet-400);
  --info-soft: rgba(139, 123, 232, 0.13);
  --on-accent: #0a0d14;
  --scrim: rgba(3, 5, 9, 0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.62);
  --fade-left: linear-gradient(90deg, var(--surface-1), transparent);
  --fade-right: linear-gradient(90deg, transparent, var(--surface-1));
}
:root[data-theme="light"] {
  --background: var(--paper-50);
  --surface-1: var(--paper-0);
  --surface-2: var(--paper-100);
  --surface-3: var(--paper-200);
  --surface-4: var(--paper-300);
  --row-hover: #f1f4f8;
  --line-1: rgba(10, 15, 25, 0.06);
  --line-2: rgba(10, 15, 25, 0.11);
  --line-3: rgba(10, 15, 25, 0.2);
  --text-1: #0c111c;
  --text-2: #4c5566;
  --text-3: #727b8c;
  --text-4: #98a0af;
  --accent: var(--amber-600);
  --accent-strong: var(--amber-700);
  --accent-soft: rgba(157, 117, 48, 0.11);
  --accent-line: rgba(157, 117, 48, 0.3);
  --accent-glow: rgba(157, 117, 48, 0.22);
  --positive: var(--emerald-600);
  --positive-soft: rgba(38, 129, 89, 0.1);
  --negative: var(--rose-600);
  --negative-soft: rgba(166, 59, 59, 0.1);
  --info: var(--violet-500);
  --info-soft: rgba(110, 95, 206, 0.1);
  --on-accent: #ffffff;
  --scrim: rgba(20, 26, 38, 0.36);
  --shadow-1: 0 1px 2px rgba(12, 17, 28, 0.07);
  --shadow-2: 0 12px 28px rgba(12, 17, 28, 0.12);
  --shadow-3: 0 28px 72px rgba(12, 17, 28, 0.18);
  --fade-left: linear-gradient(90deg, var(--surface-1), transparent);
  --fade-right: linear-gradient(90deg, transparent, var(--surface-1));
}

/* -----------------------------------------------------------------------------
   §2 BASE RESET
   ----------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  background: var(--background);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
  transition:
    background-color 0.2s var(--ease-standard),
    color 0.2s var(--ease-standard);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}
button {
  cursor: pointer;
}
button,
a,
summary,
[role="button"] {
  touch-action: manipulation;
}
svg {
  display: block;
  flex-shrink: 0;
  max-width: 100%;
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.015em;
}
.eyebrow-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* -----------------------------------------------------------------------------
   §3 LAYOUT CONTAINERS
   ----------------------------------------------------------------------------- */
.page-container,
.header-inner,
.ticker-inner,
.footer-grid,
.legal-inner {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-left: var(--gutter-inline);
  padding-right: var(--gutter-inline-right);
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* -----------------------------------------------------------------------------
   §4 SITE CHROME — HEADER
   ----------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--background) 86%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line-2);
}
.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: var(--header-gap);
}
@media (max-width: 1240px) {
  .header-inner {
    gap: var(--space-4);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--brand-gap);
  flex: 0 1 auto;
  min-width: 0;
  transition: color 0.16s var(--ease-standard);
}
.brand:hover {
  color: var(--accent);
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.brand-wordmark {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-beta-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.main-navigation {
  display: flex;
  gap: 2px;
  flex: 0 1 auto;
  overflow: hidden;
  min-width: 0;
}
.main-navigation a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  padding: 7px 11px;
  border-radius: var(--radius-1);
  transition: 0.14s;
  white-space: nowrap;
}
.main-navigation a:hover {
  color: var(--text-1);
  background: var(--surface-2);
}
.main-navigation a[aria-current="page"] {
  color: var(--text-1);
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--header-actions-gap);
  flex: 0 0 auto;
}

.search-button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: var(--header-control-size);
  padding: 0 10px 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-1);
  color: var(--text-3);
  font-size: 13.5px;
  width: 200px;
  transition: 0.14s;
  background: var(--surface-1);
  flex: 0 0 auto;
}
.search-button:hover {
  border-color: var(--line-3);
  color: var(--text-2);
}
.search-button .search-button-text {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-button kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text-3);
  flex: 0 0 auto;
}
@media (max-width: 1340px) {
  .search-button {
    width: var(--header-control-size);
    padding: 0;
    justify-content: center;
  }
  .search-button .search-button-text,
  .search-button kbd {
    display: none;
  }
}

/* Mobile drawer anchors to the header-height token — no gap on size changes.
   Hamburger visibility uses the COMBINED selector (specificity 0,2,0) so it
   can never be overridden by .icon-button's display:grid in §5, regardless
   of where the two rules sit in the file. */
.icon-button.hamburger-button {
  display: none;
}
@media (max-width: 1080px) {
  .main-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface-1);
    border-bottom: 1px solid var(--line-2);
    padding: var(--space-3) var(--gutter-inline) var(--space-5);
    gap: 2px;
    box-shadow: var(--shadow-2);
    z-index: 41;
    overflow: visible;
  }
  .main-navigation[data-open="true"] {
    display: flex;
  }
  .main-navigation a {
    padding: 12px;
    font-size: 15px;
  }
  .icon-button.hamburger-button {
    display: grid;
  }
}
@media (max-width: 700px) {
  .brand-beta-tag {
    display: none;
  }
}
/* The wordmark never hides — the brand is the site's identity at every
   width. It only gets quieter on very small screens */
@media (max-width: 480px) {
  .brand-wordmark {
    font-size: 14px;
  }
}
@media (max-width: 360px) {
  .brand-wordmark {
    font-size: 13px;
  }
}

/* -----------------------------------------------------------------------------
   §4 SITE CHROME — LIVE TICKER
   ----------------------------------------------------------------------------- */
.live-ticker {
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-1);
}
.ticker-inner {
  display: flex;
  align-items: stretch;
  height: 40px;
  position: relative;
  padding-left: 0;
  padding-right: 0;
}
.ticker-label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 var(--space-4) 0 var(--gutter-inline);
  background: var(--surface-1);
  white-space: nowrap;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--positive);
  border-right: 1px solid var(--line-2);
}
.ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.ticker-viewport::before,
.ticker-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.ticker-viewport::before {
  left: 0;
  background: var(--fade-left);
}
.ticker-viewport::after {
  right: 0;
  background: var(--fade-right);
}
.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  /* animation configured by component style */
  will-change: transform;
}
.live-ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--space-5);
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
  border-right: 1px solid var(--line-1);
  height: 100%;
  flex: 0 0 auto;
}
.ticker-item b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-1);
  font-size: 12.5px;
}
.ticker-item .ticker-change-positive {
  color: var(--positive);
}
.ticker-item .ticker-change-negative {
  color: var(--negative);
}
@media (max-width: 700px) {
  .ticker-label {
    padding: 0 var(--space-3) 0 var(--gutter-inline);
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }
  .ticker-item {
    padding: 0 var(--space-4);
    font-size: 12px;
  }
}
@media (max-width: 420px) {
  .ticker-label span:not(.live-dot) {
    display: none;
  }
}

/* -----------------------------------------------------------------------------
   §4 SITE CHROME — FOOTER
   ----------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line-2);
  background: var(--surface-1);
}
.footer-grid {
  padding-top: var(--space-10);
  padding-bottom: var(--space-9);
  display: grid;
  gap: var(--space-9);
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
}
@media (max-width: 1240px) {
  .footer-grid {
    gap: var(--space-8);
  }
}
@media (max-width: 1099px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }
}
@media (max-width: 459px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-3);
}
.footer-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-link {
  font-size: 13.5px;
  color: var(--text-2);
}
.footer-link:hover {
  color: var(--accent);
}
.footer-blurb {
  font-size: 13.5px;
  color: var(--text-3);
  line-height: 1.7;
  max-width: 44ch;
  margin-top: var(--space-4);
}
.legal-section {
  border-top: 1px solid var(--line-1);
}
.legal-inner {
  padding-top: var(--space-6);
  padding-bottom: var(--space-9);
}
.legal-inner p {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.85;
  color: var(--text-3);
  max-width: 118ch;
  margin-bottom: 11px;
  overflow-wrap: break-word;
}
.legal-inner strong {
  color: var(--text-2);
  font-weight: 500;
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — BUTTONS
   ----------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-1);
  transition: 0.15s;
  white-space: nowrap;
}
.button-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.button-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.button-secondary {
  border: 1px solid var(--line-3);
  color: var(--text-1);
  background: var(--surface-1);
}
.button-secondary:hover {
  background: var(--surface-2);
}
.button-small {
  font-size: 13px;
  padding: 9px 14px;
}

.icon-button {
  width: var(--header-control-size);
  height: var(--header-control-size);
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-1);
  color: var(--text-2);
  transition: 0.14s;
  background: var(--surface-1);
  position: relative;
  flex: 0 0 auto;
}
.icon-button:hover {
  color: var(--text-1);
  border-color: var(--line-3);
}
.icon-button .count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
:root[data-theme="dark"] .icon-sun {
  display: block;
}
:root[data-theme="dark"] .icon-moon {
  display: none;
}
:root[data-theme="light"] .icon-sun {
  display: none;
}
:root[data-theme="light"] .icon-moon {
  display: block;
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — SEGMENTED CONTROL
   ----------------------------------------------------------------------------- */
.segmented-control {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-1);
  padding: 3px;
  gap: 3px;
  flex: 0 0 auto;
}
.segmented-control button {
  font-size: var(--segment-button-font);
  font-weight: 600;
  color: var(--text-3);
  padding: var(--segment-button-padding);
  border-radius: 5px;
  transition: 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.segmented-control button:hover {
  color: var(--text-1);
}
.segmented-control button[aria-pressed="true"] {
  background: var(--surface-1);
  color: var(--text-1);
  box-shadow: var(--shadow-1);
}
.segmented-control button[aria-pressed="true"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  flex: 0 0 auto;
}
@media (max-width: 420px) {
  .segmented-control button[aria-pressed="true"]::before {
    width: 5px;
    height: 5px;
  }
}
@media (max-width: 360px) {
  .segmented-control button[aria-pressed="true"]::before {
    display: none;
  }
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — TOKEN SIGIL / GRADE BADGE / CATEGORY BADGE / CHAIN
   ----------------------------------------------------------------------------- */
.token-sigil {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  flex: 0 0 auto;
  border: 1px solid var(--line-2);
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: var(--radius-1);
  padding: 5px 10px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.grade-badge .grade-letter {
  font-size: 13.5px;
  line-height: 1;
}
.grade-badge .grade-score {
  opacity: 0.72;
  font-size: 11.5px;
  line-height: 1;
}
.grade-a {
  background: var(--accent);
  color: var(--on-accent);
}
.grade-b {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.grade-c {
  background: var(--info-soft);
  color: var(--info);
  box-shadow: inset 0 0 0 1px rgba(139, 123, 232, 0.32);
}
.grade-d {
  background: var(--negative-soft);
  color: var(--negative);
  box-shadow: inset 0 0 0 1px rgba(222, 108, 108, 0.32);
}

.category-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.category-badge-new {
  color: var(--accent);
  background: var(--accent-soft);
}
.category-badge-pre {
  color: var(--info);
  background: var(--info-soft);
}

.chain-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chain-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — SPARKLINE
   ----------------------------------------------------------------------------- */
.sparkline-wrapper {
  display: inline-block;
  width: 100%;
  max-width: 200px;
  min-width: 80px;
  vertical-align: middle;
  line-height: 0;
}
.sparkline-chart {
  display: block;
  width: 100%;
  height: 28px;
  margin-inline: auto;
}
.sparkline-chart polyline {
  fill: none;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sparkline-chart .sparkline-line-up {
  stroke: var(--positive);
}
.sparkline-chart .sparkline-area-up {
  fill: var(--positive-soft);
  stroke: none;
}
.sparkline-chart .sparkline-line-down {
  stroke: var(--negative);
}
.sparkline-chart .sparkline-area-down {
  fill: var(--negative-soft);
  stroke: none;
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — WATCHLIST STAR
   ----------------------------------------------------------------------------- */
.watchlist-star {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-4);
  transition: 0.15s;
  position: relative;
  flex: 0 0 auto;
}
.watchlist-star:hover {
  background: var(--surface-2);
  color: var(--text-2);
}
.watchlist-star svg {
  transition:
    transform 0.3s var(--ease-spring),
    fill 0.22s var(--ease-standard);
}
.watchlist-star[aria-pressed="true"] {
  color: var(--accent);
}
.watchlist-star[aria-pressed="true"] svg {
  fill: currentColor;
}
.watchlist-star[data-animating="pop"] svg {
  transform: scale(1.35);
}
.watchlist-star::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.watchlist-star[data-animating="pop"]::after {
  animation: star-burst 0.5s var(--ease-standard) forwards;
}
@keyframes star-burst {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — LIVE DOT
   ----------------------------------------------------------------------------- */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 3px var(--positive-soft);
  animation: live-dot-pulse 2.2s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes live-dot-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — AD UNITS
   ----------------------------------------------------------------------------- */
.ad-unit {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-3);
  border-radius: var(--radius-2);
  background: var(--surface-1);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.ad-unit::before {
  content: "ADVERTISEMENT";
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  opacity: 0.65;
}
.ad-unit-rail {
  height: 250px;
}
.ad-unit-wide {
  height: 96px;
  margin-top: var(--space-5);
}
@media (max-width: 1240px) {
  .ad-unit-rail {
    height: 120px;
  }
  .ad-unit-wide {
    height: 90px;
  }
}
@media (max-width: 700px) {
  .ad-unit-wide {
    height: 80px;
    font-size: 10.5px;
  }
  .ad-unit-rail {
    height: 100px;
  }
}
@media (max-width: 400px) {
  .ad-unit-wide {
    height: 70px;
    font-size: 9.5px;
  }
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — MODAL SCRIM / TOAST / TOOLTIP
   ----------------------------------------------------------------------------- */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease-standard);
  z-index: 70;
}
.modal-scrim[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
}

.toast-notification {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  z-index: 130;
  background: var(--surface-4);
  color: var(--text-1);
  border: 1px solid var(--line-3);
  border-radius: 100px;
  padding: 11px 20px;
  font-size: 13.5px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: 0.24s var(--ease-standard);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
}
.toast-notification[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.toast-notification .toast-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast-notification button {
  color: var(--accent);
  font-weight: 600;
  font-size: 12.5px;
  border-left: 1px solid var(--line-3);
  padding-left: 14px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.floating-tooltip {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition:
    opacity 0.12s,
    transform 0.12s;
  background: var(--surface-4);
  color: var(--text-1);
  border: 1px solid var(--line-3);
  border-radius: var(--radius-1);
  padding: 8px 11px;
  font-size: 12px;
  max-width: min(260px, calc(100vw - 24px));
  line-height: 1.5;
  box-shadow: var(--shadow-2);
}
.floating-tooltip[data-visible="true"] {
  opacity: 1;
  transform: none;
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — COMMAND PALETTE
   ----------------------------------------------------------------------------- */
.command-palette-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 11vh max(var(--space-4), env(safe-area-inset-right)) var(--space-4)
    max(var(--space-4), env(safe-area-inset-left));
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.17s var(--ease-standard);
}
.command-palette-layer[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}
.command-palette {
  width: min(600px, 100%);
  max-height: min(64vh, 520px);
  max-height: min(64dvh, 520px);
  background: var(--surface-1);
  border: 1px solid var(--line-3);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-8px);
  transition: transform 0.17s var(--ease-standard);
}
.command-palette-layer[data-open="true"] .command-palette {
  transform: none;
}
@media (max-width: 639px) {
  .command-palette-layer {
    padding-top: 6vh;
  }
  .command-palette {
    max-height: 76vh;
    max-height: 76dvh;
  }
}
.command-palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--line-2);
  height: 54px;
  flex: 0 0 auto;
}
.command-palette-input-row input {
  flex: 1;
  font-size: var(--command-input-font);
  outline: none;
  background: none;
}
.command-palette-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-2);
}
.command-palette-group-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 13px 6px;
}
.command-palette-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: var(--radius-1);
  cursor: pointer;
}
.command-palette-item[aria-selected="true"] {
  background: var(--accent-soft);
}
.command-palette-item .token-sigil {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 10.5px;
}
.command-palette-item-text {
  min-width: 0;
  flex: 1;
}
.command-palette-item-name {
  font-size: 13.5px;
  font-weight: 500;
}
.command-palette-item-subline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.command-palette-empty {
  padding: var(--space-9);
  text-align: center;
  color: var(--text-3);
  font-size: 13.5px;
}
.command-palette-footer {
  display: flex;
  gap: var(--space-4);
  padding: 9px var(--space-4);
  border-top: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  flex: 0 0 auto;
  flex-wrap: wrap;
}

/* -----------------------------------------------------------------------------
   §5 SHARED COMPONENTS — SEMANTIC COLOR HELPERS
   ----------------------------------------------------------------------------- */
.value-positive {
  color: var(--positive);
}
.value-negative {
  color: var(--negative);
}

/* -----------------------------------------------------------------------------
   PRINT
   ----------------------------------------------------------------------------- */
@media print {
  .site-header,
  .live-ticker,
  .ad-unit,
  .modal-scrim,
  .command-palette-layer,
  .toast-notification,
  .floating-tooltip {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* ── Universal Scrollbars ──────────────────
   Every scrollable region on the site inherits this treatment: thin
   track, subtle thumb, tuned to match the surface palette. Firefox
   honours scrollbar-width / scrollbar-color; WebKit uses the pseudo
   elements. Components that need to HIDE their scrollbar (segment
   tabs, chip groups) opt out locally with `scrollbar-none`. */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) var(--surface-2);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--surface-2);
}
*::-webkit-scrollbar-thumb {
  background: var(--line-3);
  border-radius: 5px;
  border: 2px solid var(--surface-2);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--text-4);
}
*::-webkit-scrollbar-corner {
  background: var(--surface-2);
}

/* ── Scrollbar Opt-Out ─────────────────────
   Segment tabs, chip groups and any horizontal picker that scrolls
   invisibly on touch surfaces. Add class="scrollbar-none" or use the
   utility inside a component's style.css. */
.scrollbar-none {
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Skip link target — sticky header'ın altına gizlenmesin ve focus
   taşındığında çirkin outline üretmesin (ring skip link'te kalır). */
main#main {
  scroll-margin-top: calc(var(--header-height) + 48px);
}
main#main:focus {
  outline: none;
}

/* ── Drag-scroll surfaces ──────────────────────
   Horizontal strips that support mouse press-and-drag. The hook toggles
   data-dragging; text selection is suppressed so dragging never highlights */
[data-drag-scroll] {
  cursor: grab;
}
[data-drag-scroll][data-dragging="true"] {
  cursor: grabbing;
}
[data-drag-scroll][data-dragging="true"] * {
  user-select: none;
  pointer-events: none;
}

/* Segmented control — data-gated tabs: an option with no data is visibly
   present but inert, so users see what will unlock instead of a gap */
.segmented-control button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.segmented-control button:disabled:hover {
  color: var(--text-3);
}

/* Drag-scroll — native HTML5 link-drag (ghost image) would swallow card
   clicks after a press-and-move; links inside strips are never draggable.
   The hook's click threshold still blocks navigation on release-after-drag */
[data-drag-scroll] a {
  -webkit-user-drag: none;
}
