/*
 * Self-hosted Inter (variable font, weights 100-900) instead of a Google
 * Fonts @import. The production Content-Security-Policy locks style-src /
 * font-src to 'self', which silently blocked the old @import and caused
 * every page to fall back to the browser's default sans-serif (Arial),
 * making the whole UI look wider/heavier than intended.
 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --white: #ffffff;
  --dune: #32302f;
  --accent: #2f7bff;
  --accent-rgb: 47, 123, 255;
  --good: #1f9d55;
  --warn: #c4841d;
  --bad: #d14343;
  --chart-purple: #7c6cf0;
  --chart-purple-mid: #6d5ce8;
  --chart-purple-deep: #5340c7;
  --panel-radius: 16px;
  --app-sidebar-width: 72px;
  --app-bottom-nav-height: 0px;
  --app-header-height: 0px;
  --app-gutter: 40px;
  --overlay-max-h: min(92dvh, 920px);
  --bg: #f4f3f1;
  --surface: #ffffff;
  --surface-2: #ebe9e6;
  --text: #1c1b1a;
  --muted: #1c1b1a;
  --accent-soft: rgba(47, 123, 255, 0.12);
  --accent-softer: rgba(47, 123, 255, 0.08);
  --border: #e6e3de;
  --border-strong: #d4d0c9;
  --panel-shadow: 0 1px 2px rgba(50, 48, 47, 0.04);
  --overlay: rgba(50, 48, 47, 0.45);
  /* Shared score ramps (green = copy/positive, red = alert/suspicion).
     Single source of truth for hd-, ct- and ms- score tiers. */
  --score-good-0: color-mix(in srgb, var(--good) 32%, #b8c4b8);
  --score-good-1: color-mix(in srgb, var(--good) 42%, #b8c4b8);
  --score-good-2: color-mix(in srgb, var(--good) 58%, #9bb89b);
  --score-good-3: color-mix(in srgb, var(--good) 72%, #4a7a52);
  --score-good-4: color-mix(in srgb, var(--good) 88%, #1a4d2e);
  --score-good-5: var(--good);
  --score-good-6: color-mix(in srgb, var(--good) 62%, #0a2e18);
  --score-bad-1: color-mix(in srgb, var(--bad) 40%, #d4b8b8);
  --score-bad-2: color-mix(in srgb, var(--bad) 56%, #c99a9a);
  --score-bad-3: color-mix(in srgb, var(--bad) 70%, #8a3a3a);
  --score-bad-4: color-mix(in srgb, var(--bad) 86%, #6b2020);
  --score-bad-5: var(--bad);
  --score-bad-6: color-mix(in srgb, var(--bad) 58%, #4a1010);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111111;
  --surface: #1a1a1a;
  --surface-2: #262626;
  --text: #ffffff;
  --muted: #ffffff;
  --accent-soft: rgba(47, 123, 255, 0.18);
  --accent-softer: rgba(47, 123, 255, 0.1);
  --border: #2c2c2c;
  --border-strong: #3a3a3a;
  --panel-shadow: none;
  --overlay: rgba(0, 0, 0, 0.55);
  --good: #22c55e;
  --warn: #f5a524;
  --bad: #ef4444;
  --chart-purple: #a78bfa;
  --chart-purple-mid: #8b5cf6;
  --chart-purple-deep: #6d28d9;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #111111;
    --surface: #1a1a1a;
    --surface-2: #262626;
    --text: #ffffff;
    --muted: #ffffff;
    --accent-soft: rgba(47, 123, 255, 0.18);
    --accent-softer: rgba(47, 123, 255, 0.1);
    --border: #2c2c2c;
    --border-strong: #3a3a3a;
    --panel-shadow: none;
    --overlay: rgba(0, 0, 0, 0.55);
    --good: #22c55e;
    --warn: #f5a524;
    --bad: #ef4444;
    --chart-purple: #a78bfa;
    --chart-purple-mid: #8b5cf6;
    --chart-purple-deep: #6d28d9;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--surface);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--surface);
}

*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--surface);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
  border: 2px solid var(--surface);
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: var(--surface);
}

html {
  scrollbar-gutter: stable;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  max-width: 1280px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 36px 40px 64px;
  padding-left: calc(var(--app-sidebar-width) + 48px);
  padding-bottom: calc(64px + var(--app-bottom-nav-height));
}

img,
video {
  max-width: 100%;
}

canvas {
  max-width: 100%;
}

.app-shell > * {
  min-width: 0;
  max-width: 100%;
}

.app-shell:has(.wp-page) {
  max-width: min(1400px, 100%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* —— Global app shell (Product Design Spec v1 §2) —— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Wealthsimple-style slim rail —— */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  width: var(--app-sidebar-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0 16px;
  background: var(--bg);
}

.app-sidebar__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  flex-shrink: 0;
}

.app-sidebar__brand:hover {
  background: var(--surface-2);
}

.app-sidebar .brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  overflow: visible;
  flex: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.app-sidebar .brand-logo--dark {
  display: none;
}

html[data-theme="dark"] .app-sidebar__brand {
  overflow: visible;
  background: transparent;
}

html[data-theme="dark"] .app-sidebar__brand:hover {
  background: var(--surface-2);
}

html[data-theme="dark"] .app-sidebar .brand-logo--light {
  display: none;
}

html[data-theme="dark"] .app-sidebar .brand-logo--dark {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 0;
}

.app-sidebar .brand-name {
  display: none;
}

.app-sidebar__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.app-sidebar__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  flex-shrink: 0;
}

.app-sidebar__foot > details,
.app-sidebar__foot > .theme-toggle {
  margin: 0;
  flex-shrink: 0;
}

.nav-more {
  position: relative;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.nav-more[hidden] {
  display: none;
}

.nav-more > summary {
  list-style: none;
  cursor: pointer;
}

.nav-more > summary::-webkit-details-marker,
.nav-more > summary::marker {
  display: none;
}

.nav-more[open] > .nav-more__btn .nav-tooltip {
  opacity: 0;
  visibility: hidden;
}

.nav-more__panel {
  position: absolute;
  left: calc(100% + 10px);
  bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 196px;
  max-height: min(70vh, calc(100dvh - 24px));
  overflow: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(50, 48, 47, 0.14);
}

.nav-more__panel.is-viewport-fit {
  position: fixed;
  bottom: auto;
}

[data-theme="dark"] .nav-more__panel {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.app-sidebar .nav-more__panel .nav-link {
  width: auto;
  height: auto;
  min-height: 40px;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

.app-sidebar .nav-more__panel .nav-link__label {
  display: inline;
  font-size: 0.88rem;
  font-weight: 600;
}

.app-sidebar .nav-more__panel .nav-tooltip {
  display: none;
}

@media (min-width: 721px) and (max-height: 700px) {
  .app-sidebar {
    padding: 12px 0 10px;
  }

  .app-sidebar__brand {
    margin-bottom: 10px;
    width: 40px;
    height: 40px;
  }

  .app-sidebar__nav,
  .app-sidebar__foot {
    gap: 4px;
  }

  .app-sidebar__foot {
    padding-top: 8px;
  }

  .app-sidebar .nav-link,
  .app-sidebar .icon-btn {
    width: 40px;
    height: 40px;
  }
}

.app-sidebar .nav-link,
.app-sidebar .icon-btn {
  width: 44px;
  height: 44px;
  min-width: 0;
  flex-shrink: 1;
  border-radius: 12px;
  color: #808080;
}

.app-sidebar .header-icon {
  width: 22px;
  height: 22px;
}

.app-sidebar .header-icon--fill {
  fill: currentColor;
}

.app-sidebar .nav-link:hover,
.app-sidebar .icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: transparent;
}

.app-sidebar .nav-link--active {
  color: var(--text);
  background: var(--surface-2);
  border-color: transparent;
}

[data-theme="dark"] .app-sidebar .nav-link--active {
  background: #262626;
  color: #fff;
}

.app-sidebar .nav-link__label {
  display: none;
}

.app-sidebar .nav-tooltip,
.app-sidebar .icon-btn .nav-tooltip {
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%) translateX(-2px);
}

.app-sidebar .nav-link:hover .nav-tooltip,
.app-sidebar .icon-btn:hover .nav-tooltip,
.app-sidebar .account-summary:hover .nav-tooltip {
  transform: translateY(-50%) translateX(0);
}

.app-sidebar .account-menu__panel,
.app-sidebar .notif-panel {
  top: auto;
  right: auto;
  left: calc(100% + 12px);
  bottom: 0;
}

.app-sidebar .notif-panel {
  bottom: 8px;
  max-height: min(720px, calc(100vh - 24px));
}

.app-sidebar .account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c6cf0, #2f7bff);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
  flex: none;
}

.app-sidebar .account-avatar--photo {
  background: var(--surface-2);
  padding: 0;
}

.app-sidebar .account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.account-menu__heading {
  margin: 8px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-menu__row,
.account-menu__choice,
.account-menu__panel a,
.account-menu__ghost {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.account-menu__row:hover,
.account-menu__choice:hover,
.account-menu__panel a:hover,
.account-menu__ghost:hover {
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  border-color: var(--text);
}

.account-menu__ico,
.account-menu__radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text);
}

.account-menu__ico .header-icon {
  width: 18px;
  height: 18px;
}

.account-menu__label {
  flex: 1;
  min-width: 0;
}

.account-menu__row .header-icon--sm {
  margin-left: auto;
  opacity: 0.55;
}

.account-menu__radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--text) 28%, transparent);
  margin-left: auto;
}

.account-menu__choice.is-on .account-menu__radio {
  border-color: var(--text);
  background: radial-gradient(circle at center, var(--text) 0 5px, transparent 5.5px);
}

.account-menu__group {
  position: static;
}

.account-menu__flyout {
  position: absolute;
  left: 100%;
  right: auto;
  top: auto;
  bottom: 0;
  min-width: 196px;
  max-height: min(280px, calc(100vh - 12px));
  overflow: visible;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(50, 48, 47, 0.14);
  z-index: 41;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.account-menu__group:hover .account-menu__flyout,
.account-menu__group:focus-within .account-menu__flyout {
  display: flex;
}

.account-menu__flyout::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  width: 16px;
}

.account-menu__flyout[hidden] {
  display: none;
}

.account-menu__rule {
  height: 1px;
  margin: 6px 8px;
  background: var(--border);
  border: 0;
}

@media (max-width: 720px) {
  :root {
    --app-sidebar-width: 0px;
    --app-bottom-nav-height: calc(58px + env(safe-area-inset-bottom, 0px));
    --overlay-max-h: calc(100dvh - var(--app-bottom-nav-height) - 16px);
  }

  .app-sidebar {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--app-bottom-nav-height);
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    gap: 0;
    padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 92%, var(--surface));
    box-sizing: border-box;
  }

  .app-sidebar__brand {
    display: none;
  }

  .app-sidebar__nav,
  .app-sidebar__foot {
    flex-direction: row;
    align-items: center;
    min-width: 0;
    padding: 0;
    margin: 0;
    gap: 0;
  }

  .app-sidebar__nav {
    flex: 6 1 0;
    justify-content: space-evenly;
  }

  .app-sidebar__foot {
    flex: 3 1 0;
    justify-content: space-evenly;
  }

  .app-sidebar__foot > details {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    overflow: visible;
  }

  .app-sidebar__foot > .theme-toggle {
    display: none !important;
  }

  .app-sidebar .nav-link,
  .app-sidebar .icon-btn {
    width: auto;
    height: 44px;
    min-width: 0;
    flex: 1 1 0;
    max-width: none;
    border-radius: 12px;
  }

  .app-sidebar__foot .icon-btn {
    width: 100%;
  }

  .app-sidebar .header-icon {
    width: 22px;
    height: 22px;
  }

  .app-sidebar .nav-tooltip,
  .app-sidebar .icon-btn .nav-tooltip {
    top: auto;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(2px);
  }

  .app-sidebar .nav-link:hover .nav-tooltip,
  .app-sidebar .icon-btn:hover .nav-tooltip,
  .app-sidebar .account-summary:hover .nav-tooltip {
    transform: translateX(-50%) translateY(0);
  }

  .app-sidebar .account-menu__panel,
  .app-sidebar .notif-panel {
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: calc(var(--app-bottom-nav-height) + 10px);
    width: auto;
    max-width: none;
    max-height: var(--overlay-max-h);
    z-index: 120;
  }

  .account-menu__flyout {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    margin: 0 0 6px;
    min-width: 0;
    max-height: none;
    padding: 0 0 4px 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .account-menu__flyout[hidden] {
    display: flex;
  }

  .account-menu__flyout::before {
    content: none;
    display: none;
  }

  .account-menu__group > [data-flyout-toggle],
  .account-menu__group > [data-flyout-toggle] * {
    pointer-events: none;
    cursor: default;
  }

  .account-menu__group > [data-flyout-toggle]:hover {
    background: transparent;
    border-color: transparent;
  }

  .account-menu__group > [data-flyout-toggle] .header-icon--sm {
    display: none;
  }

  .app-shell {
    padding: 24px 22px 16px;
    padding-bottom: calc(16px + var(--app-bottom-nav-height));
    max-width: 100%;
  }

  .app-shell:has(.hd-page),
  .app-shell:has(.lb-header),
  .app-shell:has(.wp-page),
  .app-shell:has(.wl-page),
  .app-shell:has(.ms-page),
  .app-shell:has(.tf-page),
  .app-shell:has(.info-page),
  .app-shell:has(.notif-page) {
    padding: 20px 22px 16px;
    padding-bottom: calc(16px + var(--app-bottom-nav-height));
  }

  .lb-header,
  .pg-head,
  .ms-page__head,
  .tf-page__head,
  .ct-head,
  .ia-head {
    padding-top: 8px;
  }
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--app-header-height);
  border-bottom: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  --header-duration: 0.75s;
  --header-ease: cubic-bezier(0.22, 1, 0.36, 1);
  transition: height var(--header-duration) var(--header-ease), box-shadow var(--header-duration) ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-header[data-header-motion="collapse"] {
  --header-duration: 1.05s;
  --header-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.app-header[data-header-motion="expand"] {
  --header-duration: 0.75s;
  --header-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Instant state on load / page change — motion only after first paint. */
.app-header--no-motion,
.app-header--no-motion * {
  transition: none !important;
}

.app-header--collapsed {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Collapse: snap horizontal layout immediately; only header height eases. */
.app-header[data-header-motion="collapse"]:not(.app-header--no-motion) .brand-logo,
.app-header[data-header-motion="collapse"]:not(.app-header--no-motion) .header-icon,
.app-header[data-header-motion="collapse"]:not(.app-header--no-motion) .icon-btn,
.app-header[data-header-motion="collapse"]:not(.app-header--no-motion) .header-badge,
.app-header[data-header-motion="collapse"]:not(.app-header--no-motion) .nav-link {
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

/* Fade labels off-flow — avoids truncated mid-word states; never re-enter flex on cleanup. */
.app-header--collapsed .brand-lockup,
.app-header--collapsing .brand-lockup {
  gap: 0;
}

.app-header--collapsed .brand-name,
.app-header--collapsing .brand-name {
  position: absolute;
  left: 42px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 0;
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  white-space: nowrap;
}

.app-header--collapsing .brand-name {
  max-width: 120px;
  opacity: 1;
  transition: opacity 0.28s ease-out;
}

.app-header--collapsing-fade .brand-name {
  opacity: 0;
}

@media (min-width: 1280px) {
  .app-header--collapsed .nav-link,
  .app-header--collapsing.app-header--collapsed .nav-link {
    width: 42px;
    min-width: 42px;
    gap: 0;
    padding: 0;
    border-radius: 12px;
  }

  .app-header--collapsing .nav-link__label {
    display: inline-block !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 140px;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.28s ease-out;
  }

  .app-header--collapsing-fade .nav-link__label {
    opacity: 0;
  }
}

.app-header__inner {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.app-header__row {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
  flex-wrap: nowrap;
}

.brand-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  transition: width var(--header-duration) var(--header-ease), height var(--header-duration) var(--header-ease);
}

.brand-logo--dark {
  display: none;
}

html[data-theme="dark"] .brand-logo--light {
  display: none;
}

html[data-theme="dark"] .brand-logo--dark {
  display: block;
  object-fit: contain;
  border-radius: 0;
}

.app-header--collapsed .brand-logo {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  white-space: nowrap;
  max-width: 120px;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.45s ease 0.06s;
}

.app-header--collapsed .brand-name {
  transition: none;
}

.app-header[data-header-motion="expand"] .brand-name {
  transition: opacity 0.45s ease 0.08s;
}

.app-header__tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 2;
}

.app-header__utils {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.header-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: width var(--header-duration) var(--header-ease), height var(--header-duration) var(--header-ease);
}

.app-header--collapsed .header-icon {
  width: 16px;
  height: 16px;
}

.header-icon--sm {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    width var(--header-duration) var(--header-ease), height var(--header-duration) var(--header-ease);
}

.app-header--collapsed .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: transparent;
}

.icon-btn:focus-visible {
  outline: none;
  color: var(--text);
  background: var(--surface-2);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.notif-menu[open] > .icon-btn,
.account-menu[open] > .icon-btn {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: height var(--header-duration) var(--header-ease);
}

.app-header--collapsed .header-badge {
  height: 32px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.header-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: var(--surface-2);
}

.polygun-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--dune);
  border-radius: 999px;
  background: var(--dune);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.polygun-btn:hover {
  filter: brightness(1.08);
}

[data-theme="dark"] .polygun-btn {
  background: #fff;
  border-color: #fff;
  color: var(--dune);
}

.polygun-btn__label {
  color: inherit;
  opacity: 0.72;
  font-weight: 600;
}

.polygun-btn__brand {
  color: inherit;
  font-weight: 800;
}

.polygun-btn__mark {
  display: block;
  width: 14px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
}

.app-header--collapsed .polygun-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.app-header--collapsed .polygun-btn__mark {
  width: 12px;
  height: 14px;
}

.account-menu {
  position: relative;
  overflow: visible;
}

.account-summary {
  list-style: none;
  cursor: pointer;
}

.account-summary::-webkit-details-marker {
  display: none;
}

.account-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(50, 48, 47, 0.14);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: visible;
}

[data-theme="dark"] .account-menu__panel {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

@media (min-width: 721px) {
  [data-theme="dark"] .account-menu__flyout {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

.notif-menu {
  position: relative;
}

.notif-summary {
  list-style: none;
  cursor: pointer;
}

.notif-summary::-webkit-details-marker {
  display: none;
}

.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: #e24b4b;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg);
}

.app-header--collapsed .notif-badge {
  top: 2px;
  right: 2px;
  min-width: 12px;
  height: 12px;
  line-height: 12px;
  font-size: 7px;
  padding: 0 2px;
}

.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(400px, calc(100vw - 20px));
  max-height: min(720px, calc(100vh - 72px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(50, 48, 47, 0.14);
  z-index: 50;
  overflow: hidden;
  letter-spacing: -0.011em;
}

[data-theme="dark"] .notif-panel {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.notif-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.notif-panel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.notif-panel__sub {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  color: color-mix(in srgb, var(--text) 42%, transparent);
}

.notif-panel__mark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  padding: 0;
  border: 0;
  background: none;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.notif-panel__mark:hover {
  color: var(--text);
}

.notif-panel__list {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(560px, calc(100vh - 200px));
  max-width: 100%;
}

.notif-panel__empty {
  padding: 36px 24px;
  text-align: center;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.notif-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  min-width: 0;
  max-width: 100%;
  min-height: 56px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.12s ease;
}

a.notif-item {
  color: inherit;
  text-decoration: none;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--surface-2);
}

.notif-item .wallet-avatar {
  width: 36px;
  height: 36px;
  margin-top: 1px;
}

.notif-item__kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 1px;
  border-radius: 9px;
  border: none;
  background: var(--surface-2);
  color: color-mix(in srgb, var(--text) 48%, transparent);
  flex-shrink: 0;
}

.notif-item__kind-badge svg {
  display: block;
  width: 16px;
  height: 16px;
}

.notif-item__kind-badge--warn {
  color: color-mix(in srgb, var(--text) 55%, transparent);
  background: var(--surface-2);
}

.notif-item__kind-badge--critical {
  color: color-mix(in srgb, var(--bad) 62%, var(--text));
  background: var(--surface-2);
}

.notif-item--lead-thumb {
  grid-template-columns: 40px minmax(0, 1fr);
}

.notif-item__market-thumb {
  display: block;
  width: 40px;
  height: 40px;
  margin-top: 1px;
  flex-shrink: 0;
  text-decoration: none;
}

.notif-item__market-img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.notif-item__market-img--placeholder {
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
}

.notif-item__body {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding-top: 1px;
}

.notif-item__kicker {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  color: color-mix(in srgb, var(--text) 42%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item__kicker--warn {
  color: color-mix(in srgb, var(--text) 55%, transparent);
}

.notif-item__line .ms-score {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.notif-item__line,
.notif-item__text {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.4em;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.011em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.notif-item--unread {
  background: color-mix(in srgb, var(--text) 3%, var(--surface));
}

.notif-item--unread .notif-item__body::after {
  content: "";
  position: absolute;
  right: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.notif-item--unread .notif-item__line,
.notif-item--unread .notif-item__kicker {
  padding-right: 12px;
}

.notif-item__dot {
  display: none;
}

.notif-item__wallet {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.014em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item__side {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.notif-item__side--buy {
  color: var(--good);
}

.notif-item__side--sell {
  color: var(--bad);
}

.notif-item__burst {
  flex: none;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  font-weight: 500;
}

.notif-item__outcome {
  flex: none;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item__tag {
  display: inline;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.notif-item__tag--warn {
  color: color-mix(in srgb, var(--text) 55%, transparent);
}

.notif-item__market {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.011em;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item__meta {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  color: color-mix(in srgb, var(--text) 42%, transparent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item__meta .notif-item__time,
.notif-item__time {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.notif-group {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  overflow: hidden;
  max-width: 100%;
}

.notif-group:last-child {
  border-bottom: none;
}

.notif-group > .notif-item {
  border-bottom: none;
}

.notif-item--group {
  cursor: pointer;
  user-select: none;
}

.notif-item--group .notif-item__wallet {
  pointer-events: none;
}

.notif-item--group:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: -2px;
}

.notif-item__chevron {
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  margin-left: 0.15em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translateY(-0.04em);
  opacity: 0.4;
  vertical-align: middle;
  transition: transform 0.15s ease;
}

.notif-group.is-expanded .notif-item__chevron {
  transform: rotate(45deg) translateY(-0.08em);
}

.notif-group__children {
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

.notif-group__children .notif-item {
  grid-template-columns: 28px minmax(0, 1fr) 32px;
  gap: 10px;
  padding: 11px 16px 11px 20px;
  min-height: 48px;
  border-bottom-color: color-mix(in srgb, var(--border) 40%, transparent);
}

.notif-group__children .notif-item:last-child {
  border-bottom: none;
}

.notif-group__children .notif-item .wallet-avatar {
  width: 28px;
  height: 28px;
}

.notif-group__children .notif-item__market-thumb,
.notif-group__children .notif-item__market-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.notif-panel__footer {
  display: block;
  padding: 13px 18px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.notif-panel__footer:hover {
  color: var(--text);
}

.notif-page {
  max-width: 820px;
  min-width: 0;
  margin: 0 auto;
  padding: 8px 0 40px;
}

.notif-page__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 18px;
}

.notif-page__title {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.notif-page__lede {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--text) 48%, transparent);
}

.notif-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notif-page__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.notif-page__btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.notif-page__btn--danger:hover {
  border-color: color-mix(in srgb, var(--bad) 55%, var(--border));
  color: var(--bad);
}

.notif-page__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.notif-page__tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.notif-page__tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.notif-page__tab.is-active {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: none;
}

.notif-page__panel {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.notif-page__list {
  max-height: min(70vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
}

.notif-page__list .notif-item {
  padding: 14px 18px;
  grid-template-columns: 36px minmax(0, 1fr) 40px;
}

@media (max-width: 640px) {
  .notif-page__title {
    font-size: 1.55rem;
  }

  .notif-page__header {
    flex-direction: column;
  }
}

.pill--quiet {
  opacity: 0.85;
  font-size: 12px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  /* Only height eases — width/padding snap so layout does not drift mid-transition. */
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    height var(--header-duration) var(--header-ease);
}

.app-header--expanded .nav-link {
  height: 46px;
  width: 44px;
  min-width: 44px;
}

.nav-link__label {
  display: none;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.nav-link:focus-visible {
  outline: none;
  color: var(--text);
  background: var(--surface-2);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.nav-link--active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
  font-weight: 800;
}

.nav-link--active:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.75);
}

.nav-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

/* Icon-only: tooltips on hover only — never on Tab focus (looks like a second outline). */
.nav-link:hover .nav-tooltip,
.icon-btn:hover .nav-tooltip,
.account-summary:hover .nav-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.account-menu[open] .account-summary .nav-tooltip,
.notif-menu[open] .notif-summary .nav-tooltip {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 720px) {
  html {
    scrollbar-gutter: auto;
    overflow-x: hidden;
  }

  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .app-sidebar {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    gap: 0;
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  .app-sidebar .nav,
  .app-sidebar .nav.app-sidebar__nav {
    display: grid;
    grid-column: 1 / 7;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    flex: none;
    width: auto;
    min-width: 0;
    gap: 0;
    overflow: visible;
  }

  .nav-more {
    display: none !important;
  }

  .app-sidebar__foot {
    display: grid;
    grid-column: 7 / 9;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: none;
    width: auto;
    min-width: 0;
    gap: 0;
    overflow: visible;
    position: relative;
    z-index: 110;
  }

  .app-sidebar .nav-link,
  .app-sidebar .icon-btn,
  .app-header--expanded .app-sidebar .nav-link {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    flex-shrink: 1;
  }

  .app-sidebar__foot > details {
    min-width: 0;
    overflow: visible;
    position: relative;
  }

  .app-sidebar__foot > .theme-toggle {
    display: none !important;
  }

  .app-sidebar .nav-tooltip,
  .app-sidebar .icon-btn .nav-tooltip {
    display: none;
  }
}

/* Hard rule: icons + labels only at ≥1280px when expanded. */
@media (min-width: 1280px) {
  .app-header--expanded .nav-link {
    width: auto;
    min-width: max-content;
    gap: 8px;
    padding: 0 16px;
    border-radius: 999px;
  }

  .app-header--expanded .nav-link__label {
    display: inline-block;
    max-width: 140px;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.45s ease 0.08s;
  }

  .app-header--collapsed .nav-link__label {
    display: none;
    opacity: 0;
    max-width: 0;
    pointer-events: none;
    transition: opacity 0.28s ease-out;
  }

  /* Labels visible — hide nav tooltips (tools still show theirs on hover). */
  .app-header--expanded .nav-link:hover .nav-tooltip {
    opacity: 0;
    visibility: hidden;
  }
}

.pill {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .header-btn span {
    display: none;
  }

  .polygun-btn {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    gap: 5px;
  }

  .polygun-btn__label {
    display: none;
  }

  .polygun-btn__mark {
    width: 12px;
    height: 14px;
  }

  .brand-name {
    max-width: 0 !important;
    opacity: 0 !important;
  }
}

.app-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 56px 32px 48px;
  padding-left: calc(var(--app-sidebar-width) + 36px);
  margin-top: 64px;
}

.app-footer__inner {
  max-width: 720px;
  margin: 0 auto;
}

.app-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
  justify-items: start;
  align-items: start;
}

.app-footer__col {
  min-width: 0;
}

.app-footer__col h3 {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.app-footer__col a {
  display: block;
  color: var(--muted);
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.app-footer__col a:hover {
  color: var(--text);
}

.app-footer__links {
  display: none;
}

.app-footer__sep {
  display: none;
}

@media (max-width: 720px) {
  .app-footer {
    padding: 32px 22px calc(24px + var(--app-bottom-nav-height));
    margin-top: 16px;
  }

  .app-footer__inner {
    max-width: none;
    width: 100%;
  }

  .app-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
  }

  .app-footer__col:last-child {
    grid-column: 1;
  }

  .app-footer__col h3 {
    margin: 0 0 20px;
  }

  .app-footer__col a {
    padding: 11px 0;
  }
}

@media (max-width: 420px) {
  .app-footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .app-footer__col:last-child {
    grid-column: auto;
  }
}

/* —— Informational / legal pages (About, Docs, Privacy, Terms, Contact) —— */
html[data-bare-info] {
  --app-sidebar-width: 0px;
  --app-bottom-nav-height: 0px;
}

.info-bare-head {
  display: flex;
  align-items: center;
  max-width: 720px;
  margin: 0 0 28px;
}

.info-bare-head__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.info-bare-head__brand .brand-logo {
  width: 28px;
  height: 28px;
}

.info-page {
  max-width: 720px;
  min-width: 0;
  padding-bottom: 24px;
  overflow-wrap: break-word;
}

.info-page > h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 8px 0 20px;
  color: var(--text);
}

.info-page__lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 40px;
  max-width: 42em;
}

.info-page__section {
  margin-bottom: 40px;
}

.info-page--account {
  max-width: 560px;
}

.info-page--account .info-page__lead {
  margin-bottom: 28px;
}

.acct-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 20px;
  margin-bottom: 14px;
}

.acct-card h2 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.acct-card p {
  margin: 0 0 8px;
  line-height: 1.5;
  max-width: none;
}

.acct-card p:last-child {
  margin-bottom: 0;
}

.acct-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.acct-card__meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.acct-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.acct-card__actions form {
  margin: 0;
}

.acct-skel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.acct-skel .sk-bone {
  max-width: 100%;
}

.acct-plan-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 12px;
}

.acct-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.acct-plan--current {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}

.acct-plan strong,
.acct-plan span {
  display: block;
}

.acct-plan span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.acct-plan__badge {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--text) !important;
  background: var(--surface);
  font-weight: 700;
}

.acct-billing-notice {
  margin-top: 12px !important;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.acct-btn--danger {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 40%, var(--border));
}

.acct-btn--danger:hover {
  border-color: var(--bad);
}

.acct-legal {
  margin: 8px 2px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.acct-theme {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.acct-billing-plans {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}

.acct-theme .landing__btn.is-on {
  border-color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, var(--surface));
}

.info-page__section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.info-page__section p {
  margin: 0 0 12px;
  line-height: 1.65;
  color: var(--text);
  max-width: 42em;
}

.info-page__section p:last-child {
  margin-bottom: 0;
}

.info-page__section ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.7;
  max-width: 42em;
}

.info-page__section li + li {
  margin-top: 8px;
}

.info-page__section ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.7;
  max-width: 42em;
}

.info-page__section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-page__section a:hover {
  color: var(--text);
}

.info-page--docs {
  max-width: 720px;
}

.info-page--docs > h1 {
  margin-bottom: 12px;
}

.info-page--docs .info-page__lead {
  margin-bottom: 48px;
}

.info-page--docs .info-page__section {
  margin-bottom: 72px;
}

.info-page--docs .info-page__section h3 {
  margin: 32px 0 12px;
}

.info-page--docs .info-page__section li + li {
  margin-top: 12px;
}

.info-page--docs .docs-example {
  margin: 22px 0 24px;
}

.info-page--docs .docs-jump {
  margin-top: 28px !important;
}

.info-page__section h3 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 22px 0 8px;
  color: var(--text);
}

.info-page__section h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--text);
}

.docs-toc {
  margin: 0 0 48px;
  padding: 18px 22px;
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.docs-toc__title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 46%, transparent);
}

.docs-toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 32px;
  max-width: none;
}

.docs-toc li {
  break-inside: avoid;
  margin-top: 6px;
}

.docs-toc a {
  color: var(--text);
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--accent);
}

.docs-block {
  display: flex;
  flex-direction: column;
}

.docs-block__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 28px;
}

.docs-block__head h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.docs-art {
  width: 132px;
  height: 132px;
  flex: none;
  margin: 0;
  position: relative;
  background: transparent;
}

.docs-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.docs-art__light {
  display: block;
}

.docs-art__dark {
  display: none;
}

html[data-theme="dark"] .docs-art__light {
  display: none;
}

html[data-theme="dark"] .docs-art__dark {
  display: block;
}

.docs-example {
  margin: 14px 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  max-width: 42em;
}

.docs-example p,
.docs-example ul {
  max-width: none;
}

.docs-example__label {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 46%, transparent);
}

.docs-jump {
  margin: 16px 0 0 !important;
}

.docs-jump a {
  font-weight: 650;
}

.docs-jump .ui-chevron {
  display: none;
}

@media (max-width: 720px) {
  .docs-toc ol {
    columns: 1;
  }

  .docs-block__head {
    gap: 20px;
    margin-bottom: 22px;
  }

  .docs-art {
    width: 104px;
    height: 104px;
  }
}

.grid {
  display: grid;
  gap: 12px;
}

.cards-6 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--panel-radius);
  padding: 20px;
  box-shadow: var(--panel-shadow);
}

.panel > .small.muted {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.panel > h2 {
  margin: 6px 0 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 26px;
  font-weight: 800;
}

h2 {
  font-size: 18px;
  font-weight: 700;
}

h3 {
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-weight: 500;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
}

.table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.score {
  font-weight: 700;
}

.good {
  color: var(--good);
}

.warn {
  color: var(--warn);
}

.bad {
  color: var(--bad);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

.small {
  font-size: 12px;
}

.section-title {
  margin-top: 28px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-wide {
  grid-column: 1 / -1;
}

.poly-section {
  margin-bottom: 20px;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.table-dense th,
.table-dense td {
  font-size: 12px;
  padding: 6px 5px;
  white-space: nowrap;
}

.mono-sm {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.link-out {
  color: var(--accent);
  text-decoration: underline;
}

/* Polymarket weekly table + live-toolbar (leaderboards.html) */
.live-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.live-toolbar .btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.live-toolbar .btn:hover {
  border-color: var(--accent);
}

.live-toolbar .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}

.live-inp-wallet {
  flex: 1;
  min-width: 200px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.live-dash-split {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 380px);
  gap: 14px;
}

@media (max-width: 1100px) {
  .live-dash-split {
    grid-template-columns: 1fr;
  }
}

.live-detail-panel {
  max-height: 80vh;
  overflow: auto;
}

.trade-row {
  font-size: 11px;
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}

#tbody-live-poly tr.selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Leaderboards page — spec tabs + filters (Product Design Spec §5) */
.ld-lead-intro {
  margin: 0 0 14px;
  max-width: 900px;
}

.ld-toolbar {
  margin-bottom: 16px;
}

.ld-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ld-tab {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ld-tab:hover {
  border-color: var(--accent);
}

.ld-tab.ld-tab--active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: var(--accent-soft);
  font-weight: 700;
}

.ld-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ld-filters .muted {
  margin-right: 6px;
}

.ld-tabpanel {
  display: none;
}

.ld-tabpanel.ld-tabpanel--active {
  display: block;
}

.ld-official-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--accent-softer);
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

/* Unified leaderboard board (leaderboards.html) */
.lb-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 32px 48px;
  margin-bottom: 64px;
  padding-top: 16px;
}

.lb-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.lb-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.lb-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 280px;
  min-width: min(100%, 200px);
  max-width: 320px;
  margin-left: auto;
  height: 42px;
  padding: 0 14px 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-2);
  box-shadow: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.lb-search:hover {
  border-color: var(--border);
  background: var(--surface-2);
}

.lb-search:focus-within {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: none;
}

.lb-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  outline: none;
}

.lb-search input::-webkit-search-decoration,
.lb-search input::-webkit-search-cancel-button,
.lb-search input::-webkit-search-results-button,
.lb-search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.lb-search input::placeholder {
  color: color-mix(in srgb, var(--muted) 55%, transparent);
  font-weight: 500;
}

.lb-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: color-mix(in srgb, var(--muted) 55%, transparent);
  line-height: 0;
  transition: color 0.15s ease;
}

.lb-search-icon svg {
  display: block;
  width: 15px;
  height: 15px;
}

.lb-search:hover .lb-search-icon,
.lb-search:focus-within .lb-search-icon {
  color: var(--muted);
}

@media (max-width: 720px) {
  .lb-search,
  .ms-search {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
    margin-left: 0;
  }
}

.pg-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.lb-header + .pg-toolbar {
  gap: 20px;
  margin-bottom: 48px;
  padding-top: 12px;
  padding-bottom: 32px;
}

.lb-sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 0;
  padding-bottom: 0;
}

.lb-header + .pg-toolbar .lb-sort-bar {
  gap: 10px 20px;
}

.lb-header + .pg-toolbar .lb-sort-group {
  gap: 8px 12px;
}

.lb-header + .pg-toolbar .lb-sort-label {
  margin-right: 6px;
}

.lb-header + .pg-toolbar .lb-sort-pill,
.lb-header + .pg-toolbar .lb-cat-pill {
  padding: 8px 14px;
}

.pg-toolbar .lb-sort-bar + .lb-sort-bar {
  padding-top: 2px;
}

.lb-sort-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.lb-sort-group--end {
  margin-left: auto;
}

.lb-sort-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 42%, transparent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.lb-sort-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

.lb-sort-pill,
.lb-cat-pill {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.lb-sort-pill:hover,
.lb-cat-pill:hover {
  color: var(--text);
  background: var(--surface-2);
}

.lb-sort-pill--active,
.lb-cat-pill--active {
  color: var(--text);
  background: var(--surface-2);
  border-color: transparent;
  font-weight: 650;
}

.lb-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lb-compact-select {
  display: none;
}

.lb-menu {
  display: none;
  position: relative;
  min-width: 0;
  width: 100%;
  z-index: 40;
}

.lb-menu.is-open {
  z-index: 80;
}

.lb-menu__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: none;
}

.lb-menu__btn:hover,
.lb-menu.is-open .lb-menu__btn {
  border-color: var(--border-strong);
  background: var(--surface);
}

.lb-menu__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lb-menu__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-menu__btn .header-icon--sm {
  flex: none;
  width: 16px;
  height: 16px;
  opacity: 0.55;
}

.lb-menu.is-open .lb-menu__btn .header-icon--sm {
  transform: rotate(180deg);
}

.lb-menu__pop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 100%;
  max-height: min(320px, 55vh);
  overflow: auto;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(50, 48, 47, 0.14);
  flex-direction: column;
  gap: 2px;
  z-index: 80;
}

[data-theme="dark"] .lb-menu__pop {
  background: #242424;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.lb-menu.is-open .lb-menu__pop {
  display: flex;
}

.lb-menu__opts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-menu__pop[hidden] {
  display: none !important;
}

.lb-menu__opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.lb-menu__opt:hover {
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  border-color: var(--text);
}

.lb-menu__opt.is-on {
  background: var(--surface-2);
  font-weight: 650;
}

.lb-menu__rule {
  height: 1px;
  margin: 6px 4px;
  background: var(--border);
  border: 0;
}

.lb-menu__check {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.lb-menu__check:hover {
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  border-color: var(--text);
}

.lb-menu__check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.lb-menu__tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid color-mix(in srgb, var(--text) 32%, transparent);
  background: transparent;
}

.lb-menu__tick::after {
  content: "";
  width: 8px;
  height: 5px;
  margin-top: -1px;
  border-left: 1.7px solid var(--surface);
  border-bottom: 1.7px solid var(--surface);
  transform: rotate(-45deg);
  opacity: 0;
}

.lb-menu__check input:checked + .lb-menu__tick {
  border-color: var(--text);
  background: var(--text);
}

.lb-menu__check input:checked + .lb-menu__tick::after {
  opacity: 1;
}

.lb-menu__check input:focus-visible + .lb-menu__tick {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lb-stats {
  display: contents;
}

.lb-active-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.lb-active-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.lb-active-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.lb-active-toggle__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}

.lb-active-toggle:hover .lb-active-toggle__btn {
  color: var(--text);
  background: var(--surface-2);
}

.lb-active-toggle input:checked + .lb-active-toggle__btn {
  background: var(--surface-2);
  border-color: transparent;
  color: var(--text);
  font-weight: 650;
  box-shadow: none;
}

.lb-active-toggle input:checked + .lb-active-toggle__btn .lb-active-toggle__dot {
  opacity: 1;
  background: var(--good);
  box-shadow: none;
}

.lb-active-toggle input:focus-visible + .lb-active-toggle__btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lb-active-toggle input:not(:checked) + .lb-active-toggle__btn {
  background: transparent;
  border-color: transparent;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font-weight: 600;
}

.lb-active-toggle:hover input:not(:checked) + .lb-active-toggle__btn {
  color: var(--text);
  background: var(--surface-2);
  border-color: transparent;
}

.lb-table {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lb-head {
  display: grid;
  grid-template-columns: 48px minmax(220px, 2fr) 110px 118px 140px 128px;
  gap: 16px;
  padding: 10px 20px 18px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--text) 42%, transparent);
}

.lb-head-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lb-col-sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: right;
  cursor: pointer;
  white-space: nowrap;
}

.lb-col-sort:hover {
  color: var(--text);
}

.lb-col-sort.is-active {
  color: var(--text);
}

.lb-col-sort__mark {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0;
  transform: translateY(1px);
}

.lb-col-sort.is-active .lb-col-sort__mark {
  opacity: 0.55;
}

.lb-filter--sort-mobile {
  display: none;
}

.lb-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lb-row {
  display: grid;
  grid-template-columns: 48px minmax(220px, 2fr) 110px 118px 140px 128px;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--panel-radius);
  border: none;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  transition: background 0.12s ease;
}

.lb-row:hover {
  background: var(--surface-2);
}

.lb-cell--score {
  text-align: right;
}

.lb-score {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.lb-score--smart-high {
  color: #b794f6;
  font-weight: 600;
}

.lb-score--smart-mid {
  color: #e8a54b;
}

.lb-score--smart-low {
  color: color-mix(in srgb, var(--text) 48%, transparent);
}

.lb-rank {
  font-weight: 700;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.lb-rank--1,
.lb-rank--2,
.lb-rank--3 {
  color: var(--text);
  font-weight: 750;
}

.lb-trader {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lb-trader-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lb-avatar,
.wp-avatar,
.wallet-avatar {
  width: 40px;
  height: 40px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.lb-row .lb-avatar,
.lb-row .wallet-avatar {
  width: 36px;
  height: 36px;
  border-color: var(--border);
}

.wallet-avatar--lg {
  width: 72px;
  height: 72px;
}

.wallet-avatar--sm {
  width: 28px;
  height: 28px;
}

.wallet-avatar--img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallet-avatar--generated::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(circle at 28% 32%, hsl(var(--avatar-h1, 140) 72% 58%) 0%, transparent 58%),
    radial-gradient(circle at 72% 38%, hsl(var(--avatar-h2, 48) 68% 52%) 0%, transparent 55%),
    radial-gradient(circle at 50% 78%, hsl(var(--avatar-h3, 280) 70% 48%) 0%, transparent 58%);
  filter: blur(10px);
  transform: scale(1.08);
}

.lb-trader-name {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-pending {
  color: color-mix(in srgb, var(--text) 48%, transparent);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.lb-trader-addr {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  line-height: 1.3;
}

.lb-trader-focus {
  font-size: 0.7rem;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  line-height: 1.3;
  margin-top: 2px;
}

.lb-trader-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lb-window-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  border: none;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  vertical-align: middle;
}

.lb-window-badge--90d {
  color: color-mix(in srgb, var(--good) 78%, var(--text));
  background: color-mix(in srgb, var(--good) 12%, transparent);
  border: none;
}

.lb-window-badge--30d {
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: none;
}

.lb-cell {
  text-align: right;
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}

.lb-cell--link {
  text-align: left;
}

.lb-poly-link {
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s ease;
}

.lb-poly-link:hover {
  color: var(--text);
  text-decoration: none;
}

.lb-cell--wr {
  color: color-mix(in srgb, var(--good) 72%, var(--text));
  font-weight: 600;
}

.lb-pnl--pos {
  color: color-mix(in srgb, var(--good) 78%, var(--text));
  font-weight: 650;
}

.lb-pnl--neg {
  color: color-mix(in srgb, var(--bad) 72%, var(--text));
  font-weight: 650;
}

.lb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 0 8px;
}

.lb-pager[hidden] {
  display: none;
}

.lb-pager__pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  align-items: center;
}

.lb-pager__gap {
  min-width: 1.25em;
  padding: 0 2px;
  color: color-mix(in srgb, var(--text) 42%, transparent);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  user-select: none;
}

.lb-pager__btn,
.lb-pager__num {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

.lb-pager__num {
  min-width: 36px;
  padding-left: 10px;
  padding-right: 10px;
}

.lb-pager__btn--icon {
  min-width: 36px;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 16px;
}

.lb-pager__btn:hover:not(:disabled),
.lb-pager__num:hover {
  color: var(--text);
  background: var(--surface-2);
}

.lb-pager__num--active {
  color: var(--text);
  border-color: transparent;
  background: var(--surface-2);
}

.lb-pager__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .lb-pager {
    gap: 4px;
    padding: 16px 0 4px;
  }

  .lb-pager__pages {
    gap: 4px;
  }

  .lb-pager__btn,
  .lb-pager__num {
    min-width: 34px;
    padding: 8px 8px;
  }
}

/* —— Wallet profile header —— */
.wp-page {
  margin-top: 4px;
  width: 100%;
  max-width: 100%;
  --wp-content-gutter: 20px;
}

.wp-page > .wp-scroll-section,
.wp-page > .wp-scroll-body,
.wp-page > .wp-page-end {
  padding-inline: var(--wp-content-gutter);
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .wp-page {
    --wp-content-gutter: 10px;
  }
}

.wp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.wp-back {
  margin-bottom: 0;
}

.wp-nav__step {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.wp-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.wp-nav__btn:hover {
  color: var(--text);
}

.wp-nav__btn.is-disabled,
.wp-back.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.wp-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}

.wp-sticky-shell {
  position: sticky;
  top: 0;
  z-index: 12;
  margin-bottom: 4px;
  margin-inline: -8px;
  padding-top: 14px;
  padding-bottom: 8px;
  padding-inline: 8px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wp-sticky-shell .wp-nav {
  margin-bottom: 12px;
}

.wp-sticky-shell.is-compact .wp-nav {
  display: none;
  margin-bottom: 0;
}

.wp-sticky-shell .wp-header {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.wp-sticky-shell.is-compact .wp-header {
  padding: 8px 14px;
  align-items: center;
}

.wp-sticky-shell.is-compact #wp-labels,
.wp-sticky-shell.is-compact .wp-name-row .wp-icon-btn,
.wp-sticky-shell.is-compact .wp-name-row > .pg-info,
.wp-sticky-shell.is-compact .wp-followers {
  display: none;
}

.wp-sticky-shell.is-compact .wp-identity {
  flex: 1 1 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
  overflow: hidden;
}

.wp-sticky-shell.is-compact .wp-name-row {
  flex-shrink: 0;
}

.wp-sticky-shell.is-compact .wp-address {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 22rem;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

.wp-sticky-shell.is-compact .wp-identity__meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  gap: 0;
}

.wp-sticky-shell.is-compact .wp-last-trade {
  font-size: 0.72rem;
  white-space: nowrap;
}

.wp-sticky-shell.is-compact .wp-avatar {
  width: 32px;
  height: 32px;
}

.wp-sticky-shell.is-compact .wp-name {
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .wp-sticky-shell.is-compact .wp-identity {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .wp-sticky-shell.is-compact .wp-address {
    flex: 1 1 100%;
    max-width: none;
  }
}

.wp-sticky-shell.is-compact .wp-header__main {
  align-items: center;
  gap: 10px;
}

.wp-sticky-shell.is-compact .wp-header__actions .wp-btn {
  padding: 6px 11px;
  font-size: 0.76rem;
}

.wp-sticky-shell.is-compact .wp-section-nav {
  padding-top: 8px;
  padding-bottom: 8px;
}

.wp-section-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--panel-radius) var(--panel-radius);
  box-shadow: var(--panel-shadow);
}

.wp-section-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.wp-section-nav__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.wp-section-nav__btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.wp-section-nav__btn.is-active {
  color: var(--bg);
  background: var(--text);
}

.wp-section-nav__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wp-section-nav .wp-recent-control {
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 10px;
}

.wp-rw-status {
  white-space: nowrap;
}

.wp-scroll-section {
  scroll-margin-top: var(--wp-sticky-offset, 220px);
}

#wp-section-overview {
  margin-top: 0;
}

#wp-section-overview .wp-metrics {
  margin-top: 0;
}

#wp-section-overview > .wp-chart {
  margin-top: 28px;
}

.wp-scroll-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 28px;
}

.wp-scroll-section__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wp-scroll-section .wp-section__title {
  margin-bottom: 12px;
}

.wp-activity.wp-scroll-section {
  margin-top: 28px;
}

.wp-activity.wp-scroll-section > .wp-section__title {
  margin-bottom: 12px;
}

.wp-perf-more-metrics {
  margin-bottom: 16px;
}

.wp-perf-more-metrics > .wp-section__title {
  margin-bottom: 12px;
}

.wp-perf-more-metrics .wp-panel-card {
  margin-top: 0;
}

.wp-page-end > .wp-perf-more-metrics + .wp-highlights {
  margin-top: 0;
}

@media (max-width: 720px) {
  .wp-section-nav {
    align-items: stretch;
  }

  .wp-section-nav__links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .wp-section-nav__links::-webkit-scrollbar {
    display: none;
  }

  .wp-section-nav .wp-recent-control {
    width: 100%;
    justify-content: space-between;
  }
}

.wp-header__main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.wp-avatar {
  flex-shrink: 0;
}

.wp-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.wp-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wp-name-row > .pg-info {
  align-self: center;
  position: relative;
  top: 0.04em;
}

.wp-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  word-break: break-word;
}

.wp-icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.wp-icon-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--border));
}

.wp-address {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.wp-identity__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 2px;
}

.wp-identity__meta .wp-last-trade,
.wp-identity__meta .wp-followers {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.wp-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.wp-header__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
}

.wp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-2);
  transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.wp-btn--ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.wp-btn--ghost:hover {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--border));
  border-color: var(--border-strong);
  color: var(--text);
  filter: none;
}

.wp-btn--follow {
  background: var(--dune);
  border-color: var(--dune);
  color: #fff;
}

.wp-btn--follow:hover {
  filter: brightness(1.08);
}

[data-theme="dark"] .wp-btn--follow {
  background: #fff;
  border-color: #fff;
  color: var(--dune);
}

@media (max-width: 720px) {
  .wp-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .wp-header__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.wp-metrics {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
  width: 100%;
}

.wp-metrics__block {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.wp-metrics__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.wp-metrics__head .wp-section__title {
  margin: 0;
}

.wp-metrics__head .wp-recent-control {
  margin-left: 0;
}

.wp-activity {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
  width: 100%;
}

.wp-activity > .wp-positions {
  margin-top: 0;
}

.wp-main {
  min-width: 0;
}

.wp-main > .wp-metrics-layout {
  margin-top: 0;
}

.wp-metrics-layout .wp-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.wp-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.wp-shell > .wp-positions .wp-positions__list {
  flex: 1 1 auto;
}

.wp-below {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 28px;
  width: 100%;
  min-width: 0;
}

.wp-below > .wp-chart,
.wp-below > .wp-tabs,
.wp-below > .wp-highlights,
.wp-below > .wp-positions,
.wp-below > #wp-perf-cards-slot {
  margin-top: 0;
}

.wp-below > .wp-tabs {
  padding-top: 0;
  border-top: none;
}

.wp-below > #wp-perf-cards-slot:empty {
  display: none;
}

.wp-below #wp-perf-cards-slot > .wp-highlights,
.wp-below #wp-perf-cards-slot > .wp-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.wp-page-end {
  margin-top: 28px;
  width: 100%;
  min-width: 0;
}

.wp-page-end:empty {
  display: none;
}

.wp-page-end > .wp-section {
  margin-top: 0;
}

.wp-highlights-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.wp-highlights-panel__head {
  padding: 18px 20px 0;
}

.wp-highlights-panel__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.wp-highlights-panel__body {
  padding: 14px 0 0;
}

.wp-highlights-panel__row {
  display: grid;
  min-width: 0;
}

.wp-highlights-panel__row--metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.wp-highlights-panel__row--trades {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.wp-highlights-panel__cell,
.wp-highlights-panel__trade {
  padding: 16px 20px 20px;
  min-width: 0;
}

.wp-highlights-panel__cell + .wp-highlights-panel__cell,
.wp-highlights-panel__trade + .wp-highlights-panel__trade {
  border-left: 1px solid var(--border);
}

.wp-highlights-panel .wp-perf-overview__value {
  font-size: 1.35rem;
}

.wp-highlights-panel__trade-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.wp-highlights__trades {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.wp-perf-overview-grid--highlights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wp-highlight-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.wp-highlight-split__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wp-highlight-split__label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wp-highlight-split__value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.wp-highlight-trade-card {
  min-width: 0;
}

.wp-highlight-trade-card .wp-panel-card__title {
  margin-bottom: 12px;
}

.wp-highlight-trade {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.wp-highlight-trade__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.wp-highlight-trade__icon--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  color: var(--muted);
}

.wp-highlight-trade__body {
  flex: 1;
  min-width: 0;
}

.wp-highlight-trade__market {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wp-highlight-trade__outcome {
  display: block;
  margin-top: 4px;
}

.wp-highlight-trade__pnl {
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .wp-summary-grid--overview,
  .wp-perf-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wp-perf-overview-grid--highlights,
  .wp-highlights-panel__row--metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wp-highlights-panel__row--metrics .wp-highlights-panel__cell:nth-child(3) {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

.lb-trader--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
}

.wp-last-trade {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.wp-last-trade__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.wp-last-trade__dot--fresh {
  background: var(--good);
}

.wp-last-trade__dot--recent {
  background: var(--warn);
}

.wp-last-trade__dot--stale {
  background: var(--bad);
}

.wp-last-trade--na {
  color: var(--muted);
}

.wp-last-trade--na .wp-last-trade__dot {
  background: var(--border-strong);
  box-shadow: none;
}

.wp-summary {
  margin-top: 18px;
}

.wp-metrics-layout {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wp-positions {
  margin-top: 28px;
  padding: 12px 14px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}

.wp-positions__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0 20px;
  margin: 0 0 16px;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.wp-positions__tab {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 2px 12px;
  margin: 0 0 -1px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.wp-positions__tab + .wp-positions__tab {
  border-left: none;
}

.wp-positions__tab:hover {
  color: var(--text);
  background: transparent;
}

.wp-positions__tab.is-active {
  color: var(--text);
  background: transparent;
  border-bottom-color: rgb(var(--accent-rgb));
  font-weight: 700;
}

.wp-positions__tab:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

.wp-positions__panel[hidden] {
  display: none !important;
}

.wp-positions__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.wp-positions__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.wp-positions__head .wp-positions__title {
  margin: 0;
}

.wp-positions__head .wp-positions__feed-link {
  margin-left: auto;
}

.wp-positions__sub {
  margin: 0 0 14px;
}

.wp-positions__sub-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.wp-positions__sub-row .wp-positions__sub {
  margin: 0;
}

.wp-positions__feed-link {
  margin-left: auto;
}

.wp-positions__side {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--surface-2);
}

.wp-positions__side--buy {
  color: var(--good);
  background: rgba(34, 197, 94, 0.12);
}

.wp-positions__side--sell {
  color: var(--bad);
  background: rgba(239, 68, 68, 0.12);
}

.wp-positions__time {
  white-space: nowrap;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wp-positions__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.wp-positions__row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 7.5rem 5.75rem;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 12px;
  min-height: 52px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.wp-positions__row:last-child {
  border-bottom: none;
}

.wp-positions__row:hover {
  background: var(--surface-2);
}

.wp-positions__row--rail {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 8px 12px;
  align-items: center;
}

.wp-shell__positions .wp-positions__icon,
.wp-shell__trades .wp-positions__icon,
.wp-rail .wp-positions__icon {
  width: 32px;
  height: 32px;
}

.wp-shell__positions .wp-positions__list,
.wp-shell__trades .wp-positions__list,
.wp-rail .wp-positions__list {
  flex: 1 1 auto;
  max-height: min(38vh, 360px);
  overflow-y: auto;
}

.wp-shell__trades .wp-positions__list,
.wp-rail .wp-positions--trades .wp-positions__list {
  max-height: min(42vh, 400px);
}

.wp-shell__trades .wp-positions__row--trade {
  grid-template-columns: 32px minmax(0, 1fr) minmax(0, 5.5rem) auto;
}

.wp-positions--full {
  margin-top: 0;
}

.wp-trades-feed,
.wp-positions-feed {
  width: 100%;
}

.wp-positions--full .wp-positions__list {
  max-height: none;
}

.wl-head-row--wallet-trades,
.wl-feed-row--wallet {
  grid-template-columns: 44px minmax(0, 1fr) 96px 64px 80px 72px;
  gap: 10px 16px;
  width: 100%;
  min-width: 0;
}

.wl-head-row--wallet-positions,
.wl-feed-row--wallet-positions {
  grid-template-columns: 36px minmax(0, 1fr) minmax(44px, max-content) minmax(72px, max-content) minmax(96px, max-content) minmax(56px, max-content);
  gap: 10px 16px;
  width: 100%;
  min-width: 0;
}

.wl-head-row--wallet-positions span:nth-child(4),
.wl-head-row--wallet-positions span:nth-child(5),
.wl-head-row--wallet-positions span:nth-child(6) {
  text-align: right;
}

.wp-trades-feed .wl-head-row--wallet-trades span:nth-child(n + 3),
.wp-trades-feed .wl-feed-row--wallet > :nth-child(n + 3) {
  text-align: center;
  justify-self: stretch;
}

.wp-trades-feed .wl-feed-row--wallet .wl-feed-num {
  text-align: center;
}

.wp-trades-feed .wl-feed-row--wallet .wl-feed-cell--market,
.wp-positions-feed .wl-feed-row--wallet-positions .wl-feed-cell--market {
  min-width: 0;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.wp-trades-feed .wl-feed-row--wallet .wl-feed-cell--outcome,
.wp-positions-feed .wl-feed-row--wallet-positions .wl-feed-cell--outcome {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-trades-feed .wl-feed-row--wallet .wl-feed-outcome,
.wp-positions-feed .wl-feed-row--wallet-positions .wl-feed-outcome {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-feed-value,
.wl-feed-change {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.wl-feed-value .wl-feed-num,
.wl-feed-change > .wl-feed-num:first-child {
  text-align: right;
  white-space: nowrap;
}

/* Magnitude vs the largest position on this list (top row = full bar). */
.wl-feed-alloc {
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 12%, transparent);
  overflow: hidden;
}

.wl-feed-alloc-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.55), rgba(var(--accent-rgb), 0.95));
}

.wl-feed-row--wallet-positions .wl-feed-num,
.wl-feed-row--wallet .wl-feed-num {
  overflow: visible;
  text-overflow: clip;
}

.wp-trades-feed .wl-head-row,
.wp-positions-feed .wl-head-row {
  border-bottom: 1px solid var(--border);
}

.wp-trades-feed .wl-feed-row--wallet,
.wp-positions-feed .wl-feed-row--wallet-positions {
  padding-left: 16px;
  padding-right: 16px;
}

.wp-trades-feed .wl-feed-skel__title,
.wp-positions-feed .wl-feed-skel__title {
  width: 72%;
  height: 12px;
}

.wl-feed-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.wl-feed-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}

.wl-feed-icon--placeholder {
  display: block;
  border: 1px solid var(--border);
}

.wl-feed-skel__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.wl-feed-num--pos {
  color: var(--good);
}

.wl-feed-num--neg {
  color: var(--bad);
}

.wp-positions__empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
}

.wp-positions__icon {
  width: 32px;
  height: 32px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.wp-positions__icon--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--muted);
}

.wp-positions__body {
  min-width: 0;
}

.wp-positions__title-row {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.wp-positions__market {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-positions__market-link {
  display: block;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-positions__market-link:hover {
  color: var(--accent);
}

.wp-positions__outcome {
  display: block;
  min-width: 0;
  max-width: 100%;
  justify-self: stretch;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
}

.wp-positions__prices {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.wp-positions__capital {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.wp-positions__capital strong {
  color: var(--text);
  font-weight: 600;
}

.wp-positions__capital-hint {
  font-weight: 400;
  opacity: 0.85;
}

.wp-positions__alloc {
  margin-top: 4px;
  height: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.wp-positions__alloc-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.55), rgba(var(--accent-rgb), 0.95));
}

.wp-positions__prices strong {
  color: var(--text);
  font-weight: 600;
}

.wp-positions__sep {
  margin: 0 6px;
  opacity: 0.5;
}

.wp-positions__chg--pos {
  color: var(--good);
  font-weight: 600;
}

.wp-positions__chg--neg {
  color: var(--bad);
  font-weight: 600;
}

.wp-positions__pnl {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wp-positions__pnl--pos {
  color: var(--good);
}

.wp-positions__pnl--neg {
  color: var(--bad);
}

.wp-positions__note {
  margin: 12px 0 0;
}

@media (max-width: 640px) {
  .wp-positions {
    padding: 10px 10px 12px;
  }

  .wp-positions--full .wp-positions__list {
    overflow-x: hidden;
    max-height: none;
  }

  .wp-positions__row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon body body"
      "icon out pnl";
    padding: 8px 10px;
    min-height: 48px;
  }

  .wp-positions__row > :first-child { grid-area: icon; }
  .wp-positions__body { grid-area: body; }
  .wp-positions__outcome { grid-area: out; }
  .wp-positions__pnl,
  .wp-positions__time { grid-area: pnl; }

  .wp-positions__side {
    width: 32px;
    height: 32px;
    font-size: 0.56rem;
  }

  .wp-positions__pnl,
  .wp-positions__time {
    text-align: right;
    margin-top: 0;
  }

  .wp-positions__tabs {
    gap: 0 14px;
  }

  .wp-positions__tab {
    font-size: 0.84rem;
    padding: 8px 0 10px;
  }

  .wp-positions__row--rail {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas: unset;
    padding: 8px 10px;
    min-height: 48px;
  }

  .wp-positions__row--rail > :first-child,
  .wp-positions__row--rail .wp-positions__body,
  .wp-positions__row--rail .wp-positions__pnl {
    grid-area: auto;
  }
}

.wp-summary-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 165, 36, 0.35);
  background: rgba(245, 165, 36, 0.08);
  color: #e8c07a;
  font-size: 0.88rem;
}

.wp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.wp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  padding: 16px 18px;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--panel-shadow);
}

.wp-card__head {
  display: flex;
  align-items: center;
}

.wp-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  line-height: 0;
  flex-shrink: 0;
}

.wp-btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wp-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wp-card__value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.wp-card__value--pos {
  color: var(--good);
}

.wp-card__value--neg {
  color: var(--bad);
}

.wp-card__value--na {
  color: var(--muted);
  font-weight: 500;
}

.wp-card__value--loading {
  display: flex;
  align-items: center;
  min-height: 1.55rem;
}

.wp-card__sub {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.wp-card__foot {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.wp-card__warn {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--warn);
  line-height: 1.35;
}

.wp-chart {
  margin: 20px 0 0;
  padding: 16px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}

.wp-perf {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wp-perf__grid {
  display: grid;
  gap: 12px;
}

.wp-perf__grid--top {
  grid-template-columns: repeat(3, 1fr);
}

.wp-perf__grid--trades {
  grid-template-columns: repeat(2, 1fr);
}

.wp-perf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  box-shadow: var(--panel-shadow);
}

.wp-perf-card__head {
  display: flex;
  align-items: center;
}

.wp-positions__icon--placeholder,
.wp-perf-trade__icon--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wp-perf-card__label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.wp-perf-card__hint {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

.wp-perf-card__big {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.wp-perf-card__mid {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.wp-perf-card__split {
  display: flex;
  gap: 28px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.wp-perf-card--trade {
  gap: 12px;
}

.wp-perf-trade__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wp-perf-trade__icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.wp-perf-trade__icon--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
}

.wp-perf-trade__body {
  min-width: 0;
  flex: 1;
}

.wp-perf-trade__market {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-perf-trade__outcome {
  font-size: 0.78rem;
  color: var(--muted);
}

.wp-perf-trade__pnl {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  margin-left: auto;
}

@media (max-width: 720px) {
  .wp-perf__grid--top,
  .wp-perf__grid--trades,
  .wp-highlights__trades,
  .wp-perf-overview-grid--highlights,
  .wp-highlights-panel__row--metrics,
  .wp-highlights-panel__row--trades {
    grid-template-columns: 1fr;
  }

  .wp-highlights-panel__cell + .wp-highlights-panel__cell,
  .wp-highlights-panel__trade + .wp-highlights-panel__trade {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .wp-highlights-panel__row--metrics .wp-highlights-panel__cell:nth-child(3) {
    grid-column: auto;
  }

  .wp-summary-grid--overview,
  .wp-perf-overview-grid,
  .wp-perf-metrics__grid {
    grid-template-columns: 1fr;
  }

  .wp-header__main {
    flex: 1 1 auto;
  }

  .wp-header__actions {
    justify-content: flex-start;
  }

  .wp-chart__canvas-wrap,
  .wp-chart--ws .wp-chart__canvas-wrap {
    max-width: 100%;
    overflow: hidden;
  }
}

.wp-perf-metrics {
  margin-top: 0;
}

.wp-perf-metrics .wp-panel-card {
  margin-top: 0;
}

.wp-perf-metrics__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 36px;
}

.wp-perf-metrics .wp-metric-col__title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.wp-metric-col {
  min-width: 0;
}

.wp-metric-col__title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

.wp-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}

.wp-metric-row__label {
  font-size: 0.92rem;
  color: var(--muted);
}

.wp-metric-row__value {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.wp-metric-row__value--strong {
  font-weight: 700;
  font-size: 1.02rem;
}

.wp-metric-row__value--na {
  color: var(--muted);
  font-weight: 500;
}

.wp-metric-note {
  margin: 8px 0 0;
}

.wp-metric-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface-2, var(--surface));
}

.wp-metric-status--active {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 45%, transparent);
  background: color-mix(in srgb, var(--good) 14%, transparent);
}

.wp-metric-status--idle {
  color: var(--muted);
}

.wp-chart__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.wp-chart__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.9;
  margin-top: 2px;
}

.wp-chart__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wp-chart__sub {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 40rem;
}

.wp-chart__note {
  color: var(--text);
}

.wp-chart--ws {
  border: none;
  padding: 20px 22px 18px;
}

.wp-chart__change {
  margin: 6px 0 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.wp-chart__change span {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
}

.wp-chart__change--pos {
  color: var(--good);
}

.wp-chart__change--neg {
  color: var(--bad);
}

.wp-chart__canvas-wrap {
  position: relative;
  height: 280px;
  width: 100%;
  touch-action: pan-y;
}

.wp-chart--ws .wp-chart__canvas-wrap {
  height: 360px;
  margin-top: 8px;
}

.wp-chart--behaviour .wp-chart__canvas-wrap {
  height: 240px;
}

.wp-chart--behaviour .wp-chart__head {
  margin-bottom: 18px;
}

.wp-chart--behaviour .wp-chart__sub {
  margin-top: 10px;
  line-height: 1.55;
}

.wp-chart--behaviour .wp-chart__legend {
  margin-top: 14px;
  gap: 10px 18px;
}

.wp-chart--behaviour .wp-chart__note {
  margin-top: 16px;
  line-height: 1.55;
}

.wp-chart--behaviour .wp-chart__canvas-wrap--calib-main {
  height: 220px;
  margin-top: 8px;
  padding-top: 10px;
  overflow: visible;
}

.wp-chart--behaviour .wp-chart__canvas-wrap--calib-bars {
  height: 120px;
  margin-top: 18px;
}

.wp-tab-panel__inner > .wp-chart--behaviour + .wp-chart--behaviour {
  margin-top: 14px;
}

.wp-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.wp-chart__legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wp-chart__legend-swatch {
  display: inline-block;
  width: 16px;
  height: 0;
  border-top: 2px solid var(--accent);
}

.wp-chart__legend-swatch--dash {
  border-top-style: dashed;
  border-top-color: color-mix(in srgb, var(--text) 35%, transparent);
}

.wp-chart__note.muted {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.wp-chart__canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.wp-chart__empty {
  margin: 8px 0 0;
}

.wp-chart__note {
  margin: 10px 0 0;
}

.wp-chart__note--warn {
  color: var(--warn);
}

.wp-chart__note code {
  font-size: 0.85em;
}

.lb-trader--link:hover .lb-trader-name {
  color: var(--text);
}

@media (max-width: 1100px) {
  @media (min-width: 721px) {
    .app-shell {
      padding-left: calc(var(--app-sidebar-width) + 28px);
      padding-right: 24px;
    }
  }

  .lb-header,
  .pg-head,
  .ms-page__head,
  .tf-page__head,
  .ct-head,
  .ia-head {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    margin-bottom: 36px;
    padding-top: 8px;
  }

  .lb-header {
    gap: 24px;
    margin-bottom: 28px;
    padding-top: 12px;
  }

  @media (max-width: 720px) {
    .lb-header {
      gap: 28px;
      margin-bottom: 32px;
      padding-top: 16px;
    }

    .lb-header + .pg-toolbar {
      gap: 22px;
      margin-bottom: 32px;
      padding-top: 14px;
      padding-bottom: 26px;
    }
  }

  .pg-head h1,
  .pg-head .lb-title,
  .ms-page__head h1,
  .tf-page h1,
  .ct-head h1,
  .ia-head h1 {
    font-size: clamp(1.85rem, 5vw, 2.35rem);
  }

  .lb-header .pg-head__title,
  .pg-head__title {
    width: 100%;
  }

  .lb-search,
  .ms-search {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    margin-left: 0;
    height: 56px;
    padding: 0 16px 0 18px;
  }

  .lb-search input,
  .ms-search input {
    font-size: 16px;
  }

  .lb-menu__btn {
    min-height: 56px;
    padding: 10px 18px;
    font-size: 15px;
  }

  .lb-menu__opt,
  .lb-menu__check {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 15px;
  }

  .lb-header + .pg-toolbar,
  .pg-toolbar {
    gap: 20px;
    margin-bottom: 32px;
    padding-top: 12px;
    padding-bottom: 24px;
    overflow: visible;
  }

  .lb-header + .pg-toolbar {
    position: relative;
    z-index: 6;
  }

  .lb-header + .pg-toolbar .lb-sort-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 14px;
    align-items: start;
  }

  .lb-header + .pg-toolbar .lb-sort-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
  }

  .lb-header + .pg-toolbar .lb-sort-label {
    margin-right: 0;
  }

  .lb-header + .pg-toolbar .lb-sort-group--end {
    display: none;
  }

  .lb-sort-group:has(.lb-menu) .lb-cat-pills {
    display: none;
  }

  .lb-menu {
    display: block;
  }

  .ms-filters .lb-sort-group:has(.lb-menu),
  .ct-controls .lb-sort-group:has(.lb-menu) {
    max-width: 280px;
  }

  .lb-filter--sort-mobile {
    display: flex;
  }

  .lb-head {
    display: none;
  }

  .lb-table,
  .lb-body {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .lb-body {
    gap: 14px;
  }

  .lb-row,
  .lb-row--skeleton {
    grid-template-columns: 32px minmax(64px, 0.75fr) minmax(0, 2.2fr);
    grid-template-areas: "rank trader stats";
    gap: 8px 12px;
    align-items: center;
    padding: 18px 16px;
    min-height: 56px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .lb-rank {
    grid-area: rank;
    align-self: center;
    padding-top: 0;
    font-size: 15px;
  }

  .lb-trader,
  .lb-row--skeleton .lb-trader {
    grid-area: trader;
    min-width: 0;
    gap: 8px;
  }

  .lb-trader-addr,
  .lb-trader-focus,
  .lb-cell--link,
  .lb-row--skeleton .sk-bone--addr,
  .lb-row--skeleton .sk-bone--link {
    display: none;
  }

  .lb-trader-meta {
    gap: 0;
    min-width: 0;
    overflow: hidden;
  }

  .lb-trader-name {
    display: block;
    font-size: 15px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-wrap: nowrap;
  }

  .lb-stats {
    display: grid;
    grid-area: stats;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 0.75fr);
    width: 100%;
    justify-self: stretch;
    gap: 0 12px;
    align-items: center;
    min-width: 0;
    padding-top: 0;
  }

  .lb-stats .lb-cell,
  .lb-stats .sk-bone--cell {
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.2;
  }

  .lb-stats .lb-cell--score,
  .lb-row--skeleton .sk-bone--score {
    text-align: right;
    align-self: center;
    padding-top: 0;
    font-size: 15px;
    font-weight: 700;
  }

  .lb-cell[data-label]::before {
    display: none;
  }

  .lb-row--skeleton .sk-bone--cell {
    display: block;
    width: 70%;
    max-width: 100%;
    margin-left: auto;
  }

  .lb-row--skeleton .sk-bone--score {
    width: 40%;
  }
}

@media (max-width: 720px) {
  .lb-stats {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.65fr);
    gap: 0 6px;
  }

  .lb-stats .lb-cell,
  .lb-stats .sk-bone--cell {
    font-size: 13px;
  }

  .lb-stats .lb-cell--score {
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .lb-header,
  .pg-head,
  .ms-page__head,
  .tf-page__head {
    gap: 24px;
    margin-bottom: 32px;
  }

  .lb-row,
  .lb-row--skeleton {
    grid-template-columns: 28px minmax(56px, 0.7fr) minmax(0, 2.3fr);
    padding: 16px 14px;
    gap: 8px 10px;
    min-height: 52px;
    overflow: hidden;
  }

  .lb-stats {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.7fr);
    width: 100%;
    justify-self: stretch;
    gap: 0 8px;
  }

  .lb-stats .lb-cell,
  .lb-stats .sk-bone--cell {
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lb-stats .lb-cell--score {
    font-size: 15px;
  }
}

/* —— Wallet profile: sectioned metrics & tabs —— */
.wp-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.wp-metrics-layout > .wp-score-row + .wp-section {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.wp-section__title {
  margin: 0 0 16px;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.wp-metrics .wp-section__title {
  margin: 0 0 10px;
}

.wp-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 12px;
}

.wp-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  min-height: 0;
}

.wp-score-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 8px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.wp-identity > .wp-score-inline {
  order: -1;
}

.wp-score-inline__label,
.wp-score-pill__label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wp-score-inline__label {
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
}

.wp-score-inline__value,
.wp-score-pill__value {
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.wp-score-inline__value.lb-score--smart-high,
.wp-score-pill__value.lb-score--smart-high,
.wp-card__value.lb-score--smart-high {
  color: #b794f6;
}

.wp-score-inline__value.lb-score--smart-mid,
.wp-score-pill__value.lb-score--smart-mid,
.wp-card__value.lb-score--smart-mid {
  color: #e8a54b;
}

.wp-score-inline__value.lb-score--smart-low,
.wp-score-pill__value.lb-score--smart-low,
.wp-card__value.lb-score--smart-low {
  color: color-mix(in srgb, var(--text) 48%, transparent);
}

.wp-score-inline__value {
  font-size: 0.92rem;
  font-weight: 750;
}

/* Score explainer bubbles (Smart / Whale / Insider) */
.has-score-tip {
  position: relative;
  cursor: help;
}

.score-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  z-index: 40;
  width: min(280px, 72vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #0f131c;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.score-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-strong);
}

.score-tip__title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--text);
}

.score-tip__body {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.has-score-tip:hover .score-tip,
.has-score-tip:focus-visible .score-tip,
.has-score-tip:focus-within .score-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.lb-sort-pill.has-score-tip {
  position: relative;
}

/* Leaderboard sort pills sit near the top — drop tips below so they stay on-screen. */
.lb-sort-pill .score-tip {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
}

.lb-sort-pill .score-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--border-strong);
}

.lb-sort-pill.has-score-tip:hover .score-tip,
.lb-sort-pill.has-score-tip:focus-visible .score-tip {
  transform: translateX(-50%) translateY(0);
}


.wp-stat-stack {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.wp-stat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.wp-stat-row:first-child {
  border-top: none;
}

.wp-stat-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wp-stat-row__label {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wp-stat-row__sub {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.wp-stat-row__value {
  flex: 0 0 auto;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wp-stat-row__value--na {
  color: var(--muted);
  font-weight: 500;
}

.wp-summary-grid--overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wp-perf-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wp-perf-overview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  box-shadow: var(--panel-shadow);
}

.wp-perf-overview__head {
  display: flex;
  align-items: center;
}

.wp-perf-overview__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wp-perf-overview__value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.wp-perf-overview__value--na {
  color: var(--muted);
  font-weight: 500;
  font-size: 1.1rem;
}

.wp-perf-overview__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-top: 2px;
}

.wp-perf-overview__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--good);
}

.wp-perf-overview__sub {
  margin: 0;
}

.wp-placeholder {
  display: inline-block;
  font-style: italic;
  font-size: 0.92em;
  color: var(--muted);
  opacity: 0.85;
}

.wp-tabs {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.wp-tabs__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
}

.wp-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
}

.wp-tabs__bar .wp-recent-control {
  margin-left: auto;
  flex-shrink: 0;
}

.wp-tabs .lb-menu {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
}

.wp-tabs__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.wp-tabs__btn:hover {
  color: var(--text);
}

.wp-tabs__btn.is-active {
  background: var(--text);
  color: var(--bg);
}

.wp-tabs__panel {
  animation: wp-tab-in 0.18s ease;
}

.wp-tabs__panel[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .wp-tabs__bar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    border-radius: 16px;
    padding: 6px;
  }

  .wp-tabs__nav {
    display: none;
  }

  .wp-tabs .lb-menu {
    display: block;
  }

  .wp-tabs .lb-menu__btn {
    min-height: 40px;
  }

  .wp-tabs__bar .wp-recent-control {
    width: auto;
    margin-left: 0;
    flex-shrink: 0;
  }
}

@keyframes wp-tab-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wp-tab-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wp-tab-metrics-grid {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.wp-panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.wp-panel-card--wide {
  grid-column: 1 / -1;
}

.wp-panel-card--centre {
  text-align: center;
  padding: 28px 24px;
}

.wp-panel-card__title {
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 700;
}

.wp-pattern-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wp-pattern-row--wide {
  grid-column: 1 / -1;
}

.wp-pattern-row__label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

.wp-pattern-row__value {
  font-size: 1.15rem;
  font-weight: 700;
}

.wp-pattern-row__value--na {
  font-size: 1rem;
  font-weight: 500;
}

.wp-pattern-row__sub {
  display: block;
  margin-top: 2px;
}

.wp-individual-trades__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
}

.wp-individual-trades__grid--quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wp-individual-trades__grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wp-metric-sheet {
  padding: 20px 24px;
}

.wp-metric-sheet .wp-panel-card__title {
  margin-bottom: 16px;
}

.wp-metric-sheet .wp-pattern-row {
  gap: 8px;
}

.wp-metric-sheet .wp-individual-trades__grid {
  gap: 24px 36px;
}

.wp-metric-sheet .wp-pattern-row__label,
.wp-individual-trades .wp-pattern-row__label {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}

.wp-metric-sheet .wp-pattern-row__value,
.wp-individual-trades .wp-pattern-row__value {
  font-size: 1.45rem;
  margin-top: 4px;
}

.wp-metric-sheet .wp-pattern-row__sub,
.wp-individual-trades .wp-pattern-row__sub {
  margin-top: 4px;
}

.wp-metric-sheet .wp-pattern-hours .wp-hour-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .wp-individual-trades__grid--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wp-individual-trades__grid--triple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wp-individual-trades__grid,
  .wp-individual-trades__grid--quad,
  .wp-individual-trades__grid--triple {
    grid-template-columns: 1fr;
  }

  .wp-panel-card,
  .wp-metric-sheet,
  .wp-tab-metrics-grid,
  .wp-panel-chart {
    padding: 22px 16px 18px;
  }

  .wp-panel-card__title {
    margin-bottom: 14px;
  }

  .wp-metric-sheet .wp-panel-card__title {
    margin-bottom: 16px;
  }

  .wp-metric-sheet .wp-individual-trades__grid {
    gap: 20px;
  }
}

.wp-hour-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wp-hour-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2, var(--surface));
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 0.02em;
}

.wp-panel-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.wp-panel-chart__title {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 700;
}

.wp-panel-chart__sub {
  margin: 0 0 12px;
}

.wp-panel-chart__box {
  min-height: 180px;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--border) 80%, var(--muted));
  background: color-mix(in srgb, var(--surface-2, var(--surface)) 70%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wp-pnlbin-warn {
  margin: 0 0 10px;
  color: var(--warn, #f5a524);
}

.wp-pnlbin-warn--strong {
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: var(--bad);
  font-weight: 600;
}

.wp-pnlbin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 2px 0 14px;
}

.wp-pnlbin-summary:empty {
  display: none;
}

.wp-pnlbin-summary__empty {
  display: block;
}

.wp-pnlbin-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wp-pnlbin-stat__label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.66rem;
}

.wp-pnlbin-stat__val {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wp-pnlbin-stat__val--pos {
  color: var(--good);
}

.wp-pnlbin-stat__val--neg {
  color: var(--bad);
}

.wp-pnlbin-debug {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.wp-pnlbin-debug__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.wp-pnlbin-debug__table-wrap {
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
}

.wp-pnlbin-debug__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.wp-pnlbin-debug__table th,
.wp-pnlbin-debug__table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.wp-pnlbin-debug__table th {
  color: var(--muted);
  font-weight: 500;
}

.wp-pnlbin-debug__table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wp-category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.wp-category-intro {
  margin: 0 0 18px;
  max-width: 62ch;
  line-height: 1.5;
}

.wp-category-layout .wp-table-wrap {
  margin-top: 2px;
}

.wp-data-table--category th,
.wp-data-table--category td {
  padding: 14px 16px;
}

.wp-data-table--category tbody tr:hover td {
  background: color-mix(in srgb, var(--surface-2) 45%, transparent);
}

.wp-data-table--category tbody tr.is-pie-linked td {
  background: color-mix(in srgb, rgb(var(--accent-rgb)) 10%, var(--surface-2));
}

.wp-category-recon {
  margin: 18px 0 0;
}

.wp-category-pie-panel .wp-panel-card__title {
  margin-bottom: 8px;
}

.wp-category-pie-panel .wp-category-intro {
  margin-bottom: 12px;
}

.wp-table-wrap {
  overflow-x: auto;
}

.wp-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.wp-data-table th,
.wp-data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.wp-data-table th.num,
.wp-data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wp-data-table th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wp-data-table tbody tr:last-child td {
  border-bottom: none;
}

.wp-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.wp-category-tag__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.wp-category-pie {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 260px;
  margin-top: 8px;
  padding: 0 0 4px;
  overflow: visible;
}

.wp-category-pie .chart-tip {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: auto;
  right: 8px;
  width: min(220px, calc(100% - 16px));
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.wp-category-pie .chart-tip[hidden] {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.wp-category-pie__svg {
  width: min(100%, 300px);
  height: auto;
  overflow: visible;
  margin-top: 0;
  flex: 0 0 auto;
}

.wp-category-pie__slice {
  cursor: pointer;
  transition: opacity 0.15s ease, filter 0.15s ease;
  outline: none;
}

.wp-category-pie.is-linked .wp-category-pie__slice:not(.is-active) {
  opacity: 0.42;
  filter: none;
}

.wp-category-pie__slice:hover,
.wp-category-pie__slice.is-active,
.wp-category-pie__slice:focus-visible {
  filter: brightness(1.14);
  opacity: 1;
}

.wp-category-pie:not(.is-linked) .wp-category-pie__slice:not(:hover):not(.is-active):not(:focus-visible) {
  opacity: 0.92;
}

.wp-category-pie__labels {
  pointer-events: none;
}

.wp-category-pie__label {
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  pointer-events: none;
}

.wp-category-pie__tooltip {
  z-index: 4;
}

/* Chart / graph hover tooltips (UI v2) */
.chart-tip {
  position: fixed;
  z-index: 120;
  min-width: 176px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: var(--panel-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(50, 48, 47, 0.14);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.011em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

[data-theme="dark"] .chart-tip {
  background: #242424;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.chart-tip__title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.chart-tip__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-tip__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.chart-tip__key {
  color: var(--muted);
  font-weight: 500;
}

.chart-tip__val {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  text-align: right;
  color: var(--text);
}

.chart-tip__val--pos {
  color: var(--good);
}

.chart-tip__val--neg {
  color: var(--bad);
}

.chart-tip__val--muted {
  color: var(--muted);
  font-weight: 500;
}

.wp-category-pie__hint {
  margin: 14px 0 0;
  text-align: center;
  max-width: 36ch;
  line-height: 1.45;
}

.wp-copy-sim {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wp-copy-sim__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wp-copy-sim__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.wp-copy-sim__head-row .wp-panel-card__title {
  margin-bottom: 0;
}

.wp-copy-sim .polygun-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  gap: 5px;
}

.wp-copy-sim .polygun-btn__label {
  display: none;
}

.wp-copy-sim__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 36px;
  align-items: stretch;
}

.wp-copy-sim-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.wp-copy-sim__row {
  display: grid;
  grid-template-columns: minmax(88px, 110px) minmax(0, 1fr);
  align-items: center;
  gap: 10px 16px;
}

.wp-copy-sim__label {
  font-size: 0.92rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.wp-copy-sim__pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: fit-content;
  max-width: 100%;
}

.wp-copy-sim__pill {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.wp-copy-sim__pill:hover {
  color: var(--text);
  background: var(--surface);
}

.wp-copy-sim__pill.is-active {
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.wp-copy-sim__input {
  width: 100%;
  max-width: 220px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.wp-copy-sim__input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--muted);
  background: var(--surface-2);
}

.wp-copy-sim__input--follow:disabled {
  opacity: 1;
  cursor: default;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  background: var(--surface-2);
}

.wp-copy-sim__amount-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 220px;
}

.wp-copy-sim__hint {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  line-height: 1.45;
}

.wp-copy-sim-banner {
  margin: 0;
}

.wp-copy-sim-results {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 10.25rem;
}

.wp-copy-sim-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
  min-height: 10.25rem;
  align-content: start;
}

.wp-copy-sim-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.wp-copy-sim-metric__label {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 1.35rem;
}

.wp-copy-sim-metric__value {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  min-height: 2.15rem;
}

.wp-copy-sim-metric__value--split {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.25;
  min-height: 3.35rem;
}

.wp-copy-sim-metrics--loading .wp-copy-sim-metric__sk-label {
  width: 4.75rem;
  height: 0.85rem;
}

.wp-copy-sim-metrics--loading .wp-copy-sim-metric__sk-value {
  display: block;
  width: 5.75rem;
  height: 1.45rem;
}

.wp-copy-sim-metrics--loading .wp-copy-sim-metric__sk-line {
  display: block;
  width: 5rem;
  height: 1.05rem;
}

.wp-copy-sim-metrics--loading .wp-copy-sim-metric__sk-line:last-child {
  width: 4.75rem;
}

.wp-copy-sim-metrics--loading .wp-copy-sim-metric {
  gap: 8px;
}

.wp-copy-sim__error {
  margin: 0;
  padding: 12px 0;
  text-align: left;
}

@media (max-width: 820px) {
  .wp-copy-sim__head-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .wp-copy-sim__body {
    grid-template-columns: 1fr;
  }

  .wp-copy-sim-results {
    min-height: 0;
  }

  .wp-copy-sim__error {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .wp-copy-sim-metrics {
    grid-template-columns: 1fr;
  }

  .wp-copy-sim__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .wp-summary-grid--overview,
  .wp-perf-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wp-summary-grid--overview,
  .wp-perf-overview-grid {
    grid-template-columns: 1fr;
  }

  .wp-tabs__nav {
    width: 100%;
    border-radius: 12px;
  }

  .wp-tabs__btn {
    flex: 1 1 auto;
    text-align: center;
    padding-inline: 10px;
    min-height: 44px;
  }
}

/* ── Watchlist page (wl-*) ─────────────────────────────────────────── */

.wl-page {
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.wl-page > h1,
.ct-head h1,
.ia-head h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.wl-page > .wl-lede {
  display: none;
}

.wl-section {
  margin-top: 20px;
}

.wl-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.wl-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.wl-section__meta {
  margin-left: auto;
}

.wl-time-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wl-time-pill {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.wl-time-pill:hover {
  color: var(--text);
  background: var(--surface-2);
}

.wl-time-pill--active {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 650;
}

.wl-feed {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--panel-shadow);
  max-height: 520px;
  overflow-y: auto;
}

.wl-feed__empty,
.wl-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.wl-head-row,
.wl-feed-row {
  display: grid;
  grid-template-columns: 48px minmax(88px, 132px) minmax(0, 1.4fr) minmax(72px, 100px) 64px 72px 68px;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  min-height: 44px;
}

.wl-head-row {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: 10px;
  padding-bottom: 8px;
  min-height: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 42%, transparent);
}

.wl-head-row span:nth-child(n + 5) {
  text-align: right;
}

.wl-feed-row {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}

/* Wallet activity tables — must follow base .wl-feed-row grid (same specificity, later wins). */
.wp-trades-feed .wl-head-row--wallet-trades,
.wp-trades-feed .wl-feed-row.wl-feed-row--wallet {
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 140px) 64px 80px 72px;
  gap: 10px 16px;
  width: 100%;
  min-width: 0;
}

.wp-positions-feed .wl-head-row--wallet-positions,
.wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions {
  grid-template-columns: 36px minmax(0, 1fr) minmax(44px, max-content) minmax(72px, max-content) minmax(96px, max-content) minmax(56px, max-content);
  gap: 10px 16px;
  width: 100%;
  min-width: 0;
}

@media (min-width: 1100px) {
  .wp-trades-feed .wl-head-row--wallet-trades,
  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet {
    grid-template-columns: 48px minmax(420px, 1fr) minmax(0, 160px) 68px 88px 72px;
  }

  .wp-positions-feed .wl-head-row--wallet-positions,
  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions {
    grid-template-columns: 36px minmax(420px, 1fr) minmax(48px, max-content) minmax(80px, max-content) minmax(104px, max-content) minmax(60px, max-content);
  }
}

.wp-trades-feed .wl-head-row--wallet-trades span:nth-child(n + 3),
.wp-trades-feed .wl-feed-row.wl-feed-row--wallet > :nth-child(n + 3) {
  text-align: center;
  justify-self: stretch;
}

.wp-trades-feed .wl-feed-row--wallet .wl-feed-num {
  text-align: center;
}

.wl-feed-row:last-child {
  border-bottom: none;
}

.wl-feed-row:hover {
  background: var(--surface-2);
}

.wl-feed-side,
.wl-feed-cell,
.wl-feed-num {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.wp-trades-feed .wl-feed-row--wallet .wl-feed-cell--market,
.wp-positions-feed .wl-feed-row--wallet-positions .wl-feed-cell--market {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.wl-feed-side {
  letter-spacing: 0;
}

.wl-feed-side--buy {
  color: var(--good);
}

.wl-feed-side--sell {
  color: var(--bad);
}

.wl-feed-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wl-feed-wallet {
  display: block;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-feed-wallet:hover {
  color: var(--text);
}

.wl-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wl-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--panel-shadow);
}

.wl-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 68px;
}

.wl-card__identity {
  min-width: 0;
  flex: 1;
}

.wl-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.wl-card__name:hover {
  color: var(--accent);
}

.wl-card__addr {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-card__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wl-card__pin,
.wl-card__unfollow {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.wl-card__unfollow {
  font-size: 16px;
}

.wl-card__pin-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.wl-card__pin:hover,
.wl-card__unfollow:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.wl-card__unfollow-icon {
  width: 13px;
  height: 13px;
  display: block;
}

.wl-card__pin.is-active {
  color: rgb(var(--accent-rgb));
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.12);
}

.wl-card--pinned {
  border-color: rgba(var(--accent-rgb), 0.35);
}

/* Slim, single-row wallet-stat strip - full stats are secondary to the
   recent-trades list below, so this stays compact instead of a big grid. */
.wl-card__stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 45%, transparent);
  overflow: hidden;
}

.wl-card__stat {
  min-width: 0;
  padding: 7px 10px;
  border-right: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wl-card__stat:last-child {
  border-right: none;
}

.wl-card__stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.wl-card__stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-card__stat-value--pos {
  color: var(--good);
}

.wl-card__stat-value--neg {
  color: var(--bad);
}

.wl-card__stat-strip--skeleton .wl-card__stat {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.wl-card__trades {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Recent trades are the focus of the card - show more rows before scrolling. */
  max-height: calc(8 * 46px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.wl-card__trades-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.wl-card__trades-head-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.wl-card__trades-label {
  font-weight: 650;
  font-size: 0.88rem;
  white-space: nowrap;
}

.wl-card__trades-sub {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-card__feed-link {
  white-space: nowrap;
}

.wl-card-trade {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 72px 56px 52px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  font-size: 0.82rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}

.wl-card-trade:last-child {
  border-bottom: none;
}

.wl-card-trade--skeleton {
  pointer-events: none;
}

.wl-card-trade__side {
  letter-spacing: 0;
  font-size: inherit;
  font-weight: 500;
}

.wl-card-trade__side--buy {
  color: var(--good);
}

.wl-card-trade__side--sell {
  color: var(--bad);
}

.wl-card-trade__body {
  min-width: 0;
}

.wl-card-trade__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.wl-card-trade__link,
.wl-card-trade__title-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.wl-card-trade__link:hover {
  color: var(--accent);
}

.wl-card-trade__outcome {
  justify-self: start;
}

.wl-card-trade__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-card-trade__meta strong {
  color: var(--text);
  font-weight: 650;
}

.wl-card-trade__sep {
  margin: 0 0.35em;
}

.wl-card-trade__time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
  text-align: right;
  font-size: 0.74rem;
  font-weight: 600;
}

.wl-suggest {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 16px;
}

.wl-suggest__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.wl-suggest__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.wl-suggest-card {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--panel-shadow);
}

.wl-suggest-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wl-suggest-card__identity {
  min-width: 0;
  flex: 1;
}

.wl-suggest-card__name {
  display: block;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-suggest-card__name:hover {
  color: var(--accent);
}

.wl-suggest-card__addr {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Same boxed strip look as the Followed-wallet stat strip, wrapped to a 2x2
   grid since these cards are narrower (3-up grid vs. a full-width card). */
.wl-suggest-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 45%, transparent);
  overflow: hidden;
}

.wl-suggest-card__stats .wl-card__stat {
  border-right: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.wl-suggest-card__stats .wl-card__stat:nth-child(2n) {
  border-right: none;
}

.wl-suggest-card__stats .wl-card__stat:nth-last-child(-n + 2) {
  border-bottom: none;
}

.wl-suggest-card__follow {
  width: 100%;
  margin-top: 2px;
}

.wl-suggest-card__follow:disabled {
  opacity: 0.55;
  cursor: default;
}

.wl-loading {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .wl-suggest__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wl-cards {
    grid-template-columns: 1fr;
  }

  .wp-positions--full .wp-positions__list {
    overflow-x: hidden;
    max-height: none;
  }

  .wp-positions {
    padding: 10px 10px 12px;
  }

  .wl-head-row {
    display: none;
  }

  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) {
    grid-template-columns: 40px minmax(0, 1fr) minmax(36px, max-content) minmax(52px, max-content);
    grid-template-areas:
      "side who out time"
      "side what what what";
    column-gap: 8px;
    row-gap: 4px;
    padding: 12px 14px;
  }

  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) > :nth-child(1) { grid-area: side; }
  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) > :nth-child(2) { grid-area: who; min-width: 0; max-width: 100%; }
  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) > :nth-child(3) { grid-area: what; }
  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) > :nth-child(4) { grid-area: out; justify-self: end; max-width: 5.5rem; }
  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) > :nth-child(7) { grid-area: time; justify-self: end; }

  .wl-head-row span:nth-child(5),
  .wl-head-row span:nth-child(6),
  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) > :nth-child(5),
  .wl-feed-row:not(.wl-feed-row--wallet):not(.wl-feed-row--wallet-positions) > :nth-child(6) {
    display: none;
  }

  .wl-head-row--wallet-trades,
  .wl-head-row--wallet-positions {
    display: none;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet,
  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    align-items: start;
  }

  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions {
    grid-template-columns: 28px minmax(0, 1fr) auto auto auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 6px;
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions > :nth-child(1) {
    grid-row: 1;
    grid-column: 1;
  }

  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions > :nth-child(2) {
    grid-row: 1;
    grid-column: 2 / -1;
    -webkit-line-clamp: 3;
  }

  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions > :nth-child(3) {
    grid-row: 2;
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions > :nth-child(4) {
    grid-row: 2;
    grid-column: 3;
  }

  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions > :nth-child(5) {
    grid-row: 2;
    grid-column: 4;
  }

  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions > :nth-child(6) {
    grid-row: 2;
    grid-column: 5;
  }

  .wp-positions-feed .wl-feed-value,
  .wp-positions-feed .wl-feed-change {
    align-items: stretch;
    font-size: 0.78rem;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet {
    grid-template-columns: 36px minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 6px;
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet > :nth-child(1) {
    grid-row: 1 / span 2;
    grid-column: 1;
    align-self: start;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet > :nth-child(2) {
    grid-row: 1;
    grid-column: 2 / -1;
    -webkit-line-clamp: 3;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet > :nth-child(3) {
    grid-row: 2;
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet > :nth-child(4) {
    grid-row: 2;
    grid-column: 3;
    text-align: right;
    justify-self: end;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet > :nth-child(5) {
    grid-row: 2;
    grid-column: 4;
    text-align: right;
    justify-self: end;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet > :nth-child(6) {
    display: none;
  }

  .wp-trades-feed .wl-feed-row.wl-feed-row--wallet > *,
  .wp-positions-feed .wl-feed-row.wl-feed-row--wallet-positions > * {
    grid-area: auto;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .wl-suggest__grid {
    grid-template-columns: 1fr;
  }

  .wl-section__meta {
    margin-left: 0;
    width: 100%;
  }
}

.wl-feed-row--btn {
  display: grid;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}

.wl-feed-row--btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.wl-feed-row--active {
  background: var(--accent-softer);
}

.wl-section__link {
  white-space: nowrap;
}

.wl-feed-row--skeleton {
  pointer-events: none;
}

#suggested {
  scroll-margin-top: calc(var(--app-header-height) + 12px);
}

.wl-feed-skel__side {
  width: 44px;
  height: 28px;
}

.wl-feed-skel__wallet {
  width: 88px;
  height: 12px;
}

.wl-feed-skel__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wl-feed-skel__title {
  width: min(72%, 420px);
  height: 12px;
}

.wl-feed-skel__meta {
  width: min(40%, 180px);
  height: 10px;
}

.wl-feed-skel__time {
  width: 48px;
  height: 10px;
  justify-self: end;
}

.wl-card__trades-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.wl-card__loading-label {
  margin: 0;
}

.wp-positions__row--skeleton {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 14px;
  padding: 16px;
  min-height: 72px;
  border-bottom: 1px solid var(--border);
}

.wp-positions__sub-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
}

.wp-positions__feed-link {
  white-space: nowrap;
}

/* ── Full quick trade feed page (tf-*) ─────────────────────────────── */

.tf-page {
  max-width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 8px 0 64px;
}

.ff-sticky {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0;
  padding: 8px 0 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-anchor: none;
}

.ff-sticky:not(:has(.tf-pos-head)) {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.ff-sticky .tf-page__head,
.ff-sticky .ct-full-head {
  margin-bottom: 14px;
}

.ff-sticky .pg-toolbar {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.ff-sticky .tf-feed-meta {
  margin-top: 16px;
  margin-bottom: 0;
}

.ff-sticky .ia-full-sliders {
  margin-bottom: 14px;
}

.ff-sticky .tf-back {
  margin-bottom: 10px;
}

.ff-sticky .tf-pos-head {
  position: static;
  margin: 12px 0 0;
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  box-shadow: none;
}

.ff-sticky + .tf-feed-panel,
.ff-sticky + .ct-full-feed.tf-feed-panel,
.ff-sticky + .ia-full-feed.tf-feed-panel {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.ff-sticky.is-compact {
  padding-top: 6px;
  padding-bottom: 0;
}

.ff-sticky.is-compact .tf-back,
.ff-sticky.is-compact .tf-title-kicker,
.ff-sticky.is-compact .tf-title-name .pg-info,
.ff-sticky.is-compact .pg-head__title > .pg-info,
.ff-sticky.is-compact .ct-mode-tip,
.ff-sticky.is-compact .lb-sort-label,
.ff-sticky.is-compact .lb-sort-divider,
.ff-sticky.is-compact .tf-feed-meta {
  display: none;
}

.ff-sticky.is-compact .tf-page__head,
.ff-sticky.is-compact .ct-full-head {
  margin-bottom: 6px;
}

.ff-sticky.is-compact h1,
.ff-sticky.is-compact .tf-title-row h1 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-bottom: 0;
}

.ff-sticky.is-compact .tf-title-row {
  gap: 10px;
}

.ff-sticky.is-compact .tf-title-row .wallet-avatar {
  width: 32px;
  height: 32px;
}

.ff-sticky.is-compact .tf-title-text {
  gap: 0;
}

.ff-sticky.is-compact .pg-toolbar {
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: none;
}

.ff-sticky.is-compact:not(:has(.tf-pos-head)) {
  padding-top: 16px;
  padding-bottom: 16px;
}

.ff-sticky.is-compact:not(:has(.tf-pos-head)) .tf-page__head,
.ff-sticky.is-compact:not(:has(.tf-pos-head)) .ct-full-head {
  margin-bottom: 12px;
}

.ff-sticky.is-compact:not(:has(.tf-pos-head)) .pg-toolbar {
  padding-bottom: 4px;
}

.ff-sticky.is-compact .tf-pos-head {
  margin-top: 4px;
}

.tf-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 28px;
  padding-top: 0;
}

.tf-page h1 {
  font-size: clamp(2.1rem, 4.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.15;
  margin: 0;
}

.ff-sticky.is-compact h1,
.ff-sticky.is-compact .tf-title-row h1,
.ct-full-page .ff-sticky.is-compact h1 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-bottom: 0;
}

.tf-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  min-width: 0;
}

.tf-title-row .wallet-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.tf-title-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

.tf-title-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--muted);
}

.tf-title-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: visible;
}

.tf-title-row h1 {
  margin: 0;
  min-width: 0;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-bottom: 0.06em;
  padding-right: 0.18em;
}

.tf-title-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  text-decoration: none;
  padding-right: 0.08em;
}

.tf-title-link:hover {
  color: var(--accent);
}

.tf-page .wl-lede {
  display: none;
}

@media (max-width: 560px) {
  .tf-title-row .wallet-avatar {
    width: 40px;
    height: 40px;
  }

  .tf-title-row h1 {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }
}

.tf-feed-panel {
  border: none;
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  min-height: 420px;
  overflow: hidden;
}

.tf-pos-table {
  width: 100%;
}

.tf-pos-head,
.tf-pos-row {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1.55fr) minmax(88px, 120px) minmax(64px, 80px) 72px 72px minmax(120px, 160px);
  gap: 18px;
  align-items: center;
  padding: 13px 24px;
}

.tf-pos-head--solo,
.tf-pos-row--solo {
  grid-template-columns: minmax(0, 1.7fr) minmax(108px, 150px) minmax(72px, 88px) 88px 88px minmax(130px, 170px);
}

.tf-pos-head {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: var(--surface);
  color: color-mix(in srgb, var(--text) 42%, transparent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 14px;
  padding-bottom: 10px;
}

.tf-pos-row {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.tf-pos-head .tf-pos-col {
  color: inherit;
  font-size: inherit;
}

.tf-pos-row--clickable {
  cursor: pointer;
}

.tf-pos-row--clickable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: -2px;
}

.tf-pos-row:last-child {
  border-bottom: none;
}

.tf-pos-row:hover {
  background: var(--surface-2);
}

.tf-pos-col--num,
.tf-pos-col--value,
.tf-pos-col--time {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tf-pos-col--time {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.tf-pos-market {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.tf-pos-icon {
  width: 36px;
  height: 36px;
  aspect-ratio: 1;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}

.tf-pos-icon--placeholder {
  display: inline-block;
}

.tf-pos-market__body {
  min-width: 0;
}

.tf-pos-market__title-row {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 3px;
  min-width: 0;
}

.tf-pos-market__title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.tf-pos-market__link {
  color: inherit;
  text-decoration: none;
}

.tf-pos-market__link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.tf-pos-market__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.tf-pos-outcome {
  display: inline;
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 650;
}

.tf-pos-outcome--win {
  color: var(--good, #22c55e);
  background: transparent;
}

.tf-pos-outcome--loss {
  color: var(--bad, #ef4444);
  background: transparent;
}

.tf-pos-shares {
  font-size: 0.78rem;
}

.tf-pos-wallet-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: 999px;
  padding: 2px 6px 2px 2px;
  margin: -2px;
}

.tf-pos-wallet-link:hover {
  background: var(--surface-2);
}

.tf-pos-wallet-link:hover .tf-pos-wallet {
  color: var(--accent);
}

.tf-pos-wallet-link--static {
  cursor: default;
}

.tf-pos-wallet-link .wallet-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.tf-pos-wallet {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-pos-status {
  display: inline;
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
}

.tf-pos-status--active {
  color: var(--accent);
}

.tf-pos-status--win {
  color: var(--good, #22c55e);
}

.tf-pos-status--loss {
  color: var(--bad, #ef4444);
}

.tf-pos-status--resolved {
  color: var(--muted);
}

.tf-pos-status--sold {
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

/* Legacy badge class kept as plain text status */
.tf-pos-badge {
  display: inline;
  padding: 0;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: normal;
  white-space: nowrap;
  background: transparent !important;
}

.tf-pos-badge--active {
  color: var(--accent);
}

.tf-pos-badge--win {
  color: var(--good, #22c55e);
}

.tf-pos-badge--loss {
  color: var(--bad, #ef4444);
}

.tf-pos-badge--resolved {
  color: var(--muted);
}

.tf-pos-when {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.tf-pos-when--live {
  color: var(--good, #22c55e);
}

.tf-feed-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--text) 48%, transparent);
}

.tf-feed-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tf-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: inherit;
  font-weight: 500;
}

.tf-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good, #22c55e);
}

.tf-pos-value {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
}

.tf-pos-pnl {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 650;
}

.tf-pos-pnl--pos {
  color: var(--good, #22c55e);
}

.tf-pos-pnl--neg {
  color: var(--bad, #ef4444);
}

/* Skeleton rows reuse the live row grid so nothing shifts when data lands. */
.tf-pos-row--skel {
  min-height: 69px;
  pointer-events: none;
}

.tf-pos-row--skel:hover {
  background: transparent;
}

.tf-pos-row--skel .sk-bone {
  height: 12px;
}

.tf-pos-skel__market {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.tf-pos-skel__market-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 3px;
}

.tf-pos-skel__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}

.tf-pos-skel__wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tf-pos-skel__avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.tf-pos-row--skel .tf-pos-col--num .sk-bone,
.tf-pos-row--skel .tf-pos-col--time .sk-bone,
.tf-pos-row--skel .tf-pos-col--value .sk-bone {
  margin-left: auto;
}

@media (max-width: 960px) {
  .tf-pos-head {
    display: none;
  }

  .tf-pos-row,
  .tf-pos-row--solo {
    grid-template-columns: minmax(0, 1fr) minmax(96px, max-content);
    grid-template-areas:
      "wallet time"
      "market market"
      "entry cur"
      "status value";
    gap: 10px 14px;
    align-items: start;
  }

  .tf-pos-row--solo {
    grid-template-areas:
      "market time"
      "entry cur"
      "status value";
  }

  .tf-pos-col--wallet {
    grid-area: wallet;
    display: flex;
    min-width: 0;
  }

  .tf-pos-col--market {
    grid-area: market;
    min-width: 0;
  }

  .tf-pos-col--status {
    grid-area: status;
    align-self: center;
  }

  .tf-pos-col--time {
    grid-area: time;
    text-align: right;
    align-self: center;
  }

  .tf-pos-col--entry {
    grid-area: entry;
    text-align: left;
  }

  .tf-pos-col--cur {
    grid-area: cur;
  }

  .tf-pos-col--value {
    grid-area: value;
  }

  .tf-pos-col--entry::before,
  .tf-pos-col--cur::before {
    content: attr(data-mini-label);
    display: block;
    margin-bottom: 2px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--text) 42%, transparent);
  }

  .tf-pos-row--skel {
    min-height: 132px;
  }
}

.tf-back {
  margin-bottom: 14px;
}

.tf-page__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  .tf-page,
  .ms-page,
  .wl-page,
  .hd-page,
  .info-page,
  .notif-page,
  .landing {
    max-width: 100%;
  }

  .tf-page__controls {
    align-items: stretch;
    width: 100%;
  }

  .tf-page__controls .wl-time-pills {
    width: 100%;
  }

  .tf-pos-head,
  .tf-pos-row,
  .tf-pos-head--solo,
  .tf-pos-row--solo {
    grid-template-columns: minmax(0, 1fr) minmax(72px, max-content);
    padding: 12px 14px;
    gap: 6px 10px;
  }

  .tf-pos-market__title-row {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ── Detail sheet overlays (td-* / ms-*) — Home + wallet v2 chrome ─── */

body.td-open,
body.ms-modal-open {
  overflow: hidden;
}

.td-overlay,
.ms-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px
    max(12px, calc(16px + env(safe-area-inset-bottom, 0px)));
}

.td-backdrop,
.ms-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}

.td-sheet,
.ms-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: var(--overlay-max-h);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius, 16px);
  box-shadow: var(--panel-shadow, 0 24px 64px rgba(0, 0, 0, 0.55));
  animation: td-sheet-in 160ms ease-out;
  overflow: hidden;
}

.td-sheet--wide,
.ms-sheet--wide {
  width: min(920px, 100%);
}

.td-sheet.td-sheet--static,
.ms-sheet.ms-sheet--static {
  animation: none;
}

@keyframes td-sheet-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.td-sheet__bar,
.ms-sheet__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-2));
  flex-shrink: 0;
}

.ms-sheet__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
}

.td-close,
.ms-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.td-close:hover,
.ms-close:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.td-close--icon,
.ms-close--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.td-close--icon svg,
.ms-close--icon svg {
  width: 16px;
  height: 16px;
}

.td-sheet__bar-meta,
.ms-sheet__bar-meta {
  font-size: 0.8rem;
  font-weight: 650;
  text-align: center;
  color: var(--muted);
}

.td-sheet__scroll,
.ms-sheet__scroll {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px 28px 32px;
}

.td-sheet__footer {
  flex-shrink: 0;
  padding: 18px 26px 22px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-2));
}

.td-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.td-hero,
.ms-sheet__hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.td-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 10px;
}

.td-hero__sub {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.td-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.td-side {
  font-weight: 750;
  letter-spacing: 0.02em;
  font-size: 0.86rem;
  text-transform: capitalize;
}

.td-side--buy {
  color: var(--good);
}

.td-side--sell {
  color: var(--bad);
}

.td-outcome {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--text);
}

.td-outcome--win {
  color: var(--good, #22c55e);
}

.td-outcome--loss {
  color: var(--bad, #ef4444);
}

.td-hero__when {
  margin-left: auto;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.td-hero__title,
.ms-sheet__title {
  margin: 0;
  font-size: clamp(1.08rem, 2.2vw, 1.38rem);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.td-hero__slug {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.td-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

.td-panel--times {
  margin-bottom: 24px;
}

@media (min-width: 760px) {
  .td-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .td-grid--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  }
}

.td-panel,
.ms-side {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: var(--panel-radius, 12px);
  background: var(--bg);
  padding: 22px 24px;
  box-shadow: var(--panel-shadow);
  min-width: 0;
}

.td-panel--trader {
  justify-content: flex-start;
}

.td-panel__actions {
  margin-top: auto;
  padding-top: 18px;
}

.td-panel__actions .td-link-btn {
  width: 100%;
  justify-content: center;
}

.td-panel--related {
  margin-top: 24px;
}

.td-panel--related .td-related {
  margin-bottom: 0;
}

.td-panel__title {
  margin: 0 0 18px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.td-trade-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.td-trade-summary__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.td-trade-summary__side {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  min-width: 0;
}

.td-trade-summary__lead .td-side {
  font-size: 1.05rem;
  font-weight: 750;
}

.td-trade-summary__lead .td-outcome {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.td-trade-summary__when {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.td-panel__title:has(.td-panel__count) {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.td-panel__count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.td-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 22px;
}

.td-metrics--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Variable metric counts flow into as many even columns as fit, so the grid
   never looks cramped or ragged when optional metrics are missing. */
.td-metrics--4 {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.td-status-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
}

.td-status-badge.tf-pos-status--active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.td-status-badge.tf-pos-status--win {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 16%, transparent);
}

.td-status-badge.tf-pos-status--loss {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 16%, transparent);
}

.td-status-badge.tf-pos-status--resolved {
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.td-status-badge.tf-pos-status--sold {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.td-trade-summary__exit {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.td-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.td-metric__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.td-metric__value {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  word-break: break-word;
}

.td-fill-note {
  margin: 8px 0 0;
}

/* In-sheet hydration: late metrics render as bones in their final slots so
   the sheet never changes shape while loading. */
.td-metric__value .sk-bone,
.td-kv__value .sk-bone {
  display: inline-block;
  vertical-align: middle;
}

.td-metric__value .sk-bone {
  width: 72px;
  height: 20px;
}

.td-kv__value .sk-bone {
  width: 56px;
  height: 12px;
}

.td-kv {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.td-kv__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

.td-kv__row:first-child {
  padding-top: 0;
}

.td-kv__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.td-kv__label {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}

.td-kv__value {
  margin: 0;
  flex: 0 1 48%;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.35;
  word-break: break-word;
}

.td-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.td-fact {
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.td-fact__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.td-fact__value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.td-fact__value--sm {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.td-links,
.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.td-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.td-link-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.08);
}

.td-link-btn--primary:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: var(--accent-soft);
}

.td-link-btn--lg {
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 650;
}

.td-link-btn--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.td-meta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.td-meta__label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.td-meta__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.td-tx__hash {
  font-size: 0.8rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}

.td-copy {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.td-copy:hover {
  background: var(--accent-softer);
}

.td-ids {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.td-ids > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
}

.td-ids__code {
  font-size: 0.78rem;
  color: var(--text);
  word-break: break-all;
}

.td-trader-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.td-hero .td-trader-head {
  margin-top: 14px;
  margin-bottom: 0;
}

.td-hero + .td-trader-head {
  margin-top: 4px;
  margin-bottom: 22px;
}

.td-panel > .td-trader-head {
  margin-bottom: 16px;
}

.td-trader-head__meta {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.td-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px 22px;
  margin: 0;
}

.td-times:empty {
  display: none;
}

.td-panel--times .td-panel__title {
  margin-bottom: 14px;
}

.td-time {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.td-time__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.td-time__value {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.td-time__abs {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.td-trader-head__name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

a.td-trader-head__name:hover {
  color: var(--accent);
}

.td-trader-head__fresh {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.td-trader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.td-trader__id {
  min-width: 0;
}

.td-trader__name {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}

.td-trader__name:hover {
  text-decoration: underline;
}

.td-trader__addr {
  margin-top: 2px;
  color: var(--muted);
  word-break: break-all;
}

.td-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.td-stat {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.td-stat__label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.td-stat__value {
  font-size: 1rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.td-stat__value--pos {
  color: var(--good);
}

.td-stat__value--neg {
  color: var(--bad);
}

.td-subhead {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
}

.td-related {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.td-related--scroll {
  max-height: min(42dvh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.td-detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.td-detail-list li {
  margin: 4px 0;
}

.td-detail-list li.td-detail-list__risk {
  color: var(--warn);
}

.td-insider {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.td-insider__score {
  display: none;
}

.td-insider__bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}

.td-ibar {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) minmax(48px, 1fr) 28px;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.td-ibar__label {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-ibar__track {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  overflow: hidden;
}

.td-ibar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.td-ibar__val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.78rem;
}

.td-insider__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.td-insider__pills {
  display: none;
}

.td-related__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.td-related__row:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
}

.td-related__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.td-related__wallet {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-related__meta {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-related__time {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .td-overlay,
  .ms-overlay {
    padding: 12px 12px calc(12px + var(--app-bottom-nav-height));
    align-items: flex-end;
  }

  .td-sheet,
  .ms-sheet {
    width: min(100%, calc(100vw - 24px));
    max-height: var(--overlay-max-h);
  }

  .td-grid,
  .td-grid--split {
    grid-template-columns: 1fr;
  }

  .td-hero__when {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .td-overlay,
  .ms-overlay {
    padding: 8px 12px calc(8px + var(--app-bottom-nav-height));
    align-items: flex-end;
  }

  .td-sheet,
  .ms-sheet {
    width: 100%;
    max-height: var(--overlay-max-h);
    border-left: 0;
    border-right: 0;
    border-radius: 16px 16px 10px 10px;
  }

  .td-sheet__scroll,
  .ms-sheet__scroll {
    padding: 20px 18px 24px;
  }

  .td-sheet__footer {
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .td-sheet__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .td-sheet__actions .td-link-btn--lg {
    width: 100%;
    justify-content: center;
  }

  .td-panel,
  .ms-side {
    padding: 18px 16px;
  }

  .td-metrics {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .td-metrics,
  .td-metrics--2,
  .td-metrics--4,
  .td-facts,
  .td-ids,
  .td-insider__bars {
    grid-template-columns: 1fr 1fr;
  }

  .td-links,
  .td-actions {
    flex-direction: column;
  }

  .td-link-btn {
    width: 100%;
  }

  .td-kv__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .td-kv__value {
    text-align: left;
    flex-basis: auto;
  }
}

/* —— Loading skeletons —— */
@keyframes sk-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.sk-bone,
.wp-skeleton-bone {
  display: block;
  border-radius: 8px;
  background: linear-gradient(
    105deg,
    color-mix(in srgb, var(--text) 7%, var(--surface-2)) 0%,
    color-mix(in srgb, var(--text) 7%, var(--surface-2)) 36%,
    color-mix(in srgb, var(--text) 18%, var(--surface)) 50%,
    color-mix(in srgb, var(--text) 7%, var(--surface-2)) 64%,
    color-mix(in srgb, var(--text) 7%, var(--surface-2)) 100%
  );
  background-size: 220% 100%;
  animation: sk-shimmer 1.5s ease-in-out infinite;
}

.sk-bone--circle {
  border-radius: 50%;
}

.sk-bone--pill {
  border-radius: 999px;
}

.sk-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lb-row--skeleton,
.lb-row--skeleton:hover {
  pointer-events: none;
  cursor: default;
  border-color: var(--border);
  background: var(--surface);
}

.lb-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lb-row--skeleton .sk-bone--rank {
  width: 22px;
  height: 18px;
  border-radius: 6px;
}

.lb-row--skeleton .sk-bone--avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.lb-row--skeleton .sk-bone--name {
  width: min(160px, 70%);
  height: 14px;
}

.lb-row--skeleton .sk-bone--addr {
  width: min(110px, 48%);
  height: 11px;
}

.lb-row--skeleton .sk-bone--cell {
  width: 72px;
  height: 14px;
  margin-left: auto;
}

.lb-row--skeleton .sk-bone--link {
  width: 64px;
  height: 14px;
  margin-left: 0;
}

@media (max-width: 960px) {
  .lb-row--skeleton .sk-bone--link,
  .lb-row--skeleton .sk-bone--addr {
    display: none;
  }
}

.wp-skeleton {
  margin-top: 4px;
}

.wp-skeleton .wp-header {
  pointer-events: none;
}

.wp-skeleton__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.wp-skeleton__identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.wp-skeleton__name {
  width: min(180px, 50%);
  height: 16px;
}

.wp-skeleton__line {
  width: min(240px, 62%);
  height: 10px;
}

.wp-skeleton__line--short {
  width: min(120px, 36%);
}

.wp-skeleton__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.wp-skeleton__pill {
  width: 88px;
  height: 28px;
}

.wp-skeleton__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.wp-skeleton__btn {
  width: 76px;
  height: 30px;
  border-radius: 999px;
}

.wp-skeleton .wp-metrics {
  margin-top: 16px;
}

.wp-skeleton .wp-below {
  margin-top: 28px;
}

.wp-skeleton .wp-activity > .wp-positions {
  pointer-events: none;
}

.wp-skeleton__metrics {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.wp-skeleton__section-title {
  width: 150px;
  height: 12px;
  margin-bottom: 8px;
}

.wp-skeleton__card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.wp-skeleton__card-label {
  width: 55%;
  height: 10px;
}

.wp-skeleton__card-value {
  width: 48%;
  height: 20px;
}

.wp-skeleton__card-sub {
  width: 70%;
  height: 10px;
}

.wp-skeleton__tabs {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.wp-skeleton__tab-nav {
  margin: 0 0 16px;
  pointer-events: none;
}

.wp-skeleton__tab-label {
  cursor: default;
}

.wp-skeleton__panel {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  min-height: 280px;
}

.wp-skeleton__panel-title {
  width: 140px;
  height: 14px;
  margin-bottom: 16px;
}

.wp-skeleton__panel-block {
  width: 100%;
  height: 220px;
  border-radius: 10px;
}

.wl-skeleton-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wl-skeleton-card {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--panel-shadow);
  min-height: 168px;
  pointer-events: none;
}

/* Followed-wallet skeletons approximate the loaded card height (metrics,
   ratio bars, stats) so the grid doesn't jump when profiles arrive. */
.wl-skeleton-card--followed {
  min-height: 380px;
}

.wl-skeleton-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wl-skeleton-card__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.wl-skeleton-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.wl-skeleton-card__name {
  width: 55%;
  height: 14px;
}

.wl-skeleton-card__addr {
  width: 38%;
  height: 11px;
}

.wl-skeleton-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wl-skeleton-card__stat {
  height: 12px;
  width: 70%;
}

.wl-skeleton-suggest {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .wl-skeleton-suggest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wl-skeleton-cards,
  .wl-skeleton-suggest {
    grid-template-columns: 1fr;
  }

  .wp-skeleton__actions {
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk-bone,
  .wp-skeleton-bone {
    animation: none;
    background: color-mix(in srgb, var(--text) 8%, var(--surface-2));
  }
}

/* Recent-window performance (feature-flagged serve path) */
.wp-recent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; }
.wp-recent-card { border: none; border-radius: 16px; padding: 16px 18px; background: var(--surface); box-shadow: var(--panel-shadow); }
.wp-recent-card__label { font-weight: 600; margin-bottom: 10px; }
.wp-recent-card__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }

/* Recent-window (90d/30d) compact toggle + window badge */
.wp-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wp-recent-head .wp-section__title {
  margin: 0;
}

.wp-recent-head--end {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.wp-recent-control {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
}

.wp-rw-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: none;
}

.wp-rw-toggle__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.wp-rw-toggle__btn:hover {
  color: var(--text);
  background: var(--surface);
}

.wp-rw-toggle__btn.is-active {
  font-weight: 700;
  color: var(--bg);
  background: var(--text);
  box-shadow: none;
}

.wp-rw-toggle__btn.is-active[data-wp-rw-window="90d"],
.wp-rw-toggle__btn.is-active[data-wp-rw-window="30d"] {
  background: var(--text);
  color: var(--bg);
  box-shadow: none;
}

.wp-rw-toggle__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wp-rw-window-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 8px;
  white-space: nowrap;
}

.wp-window-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.wp-window-badge--90d {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.wp-window-badge--30d {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.wp-window-badge--all {
  color: var(--muted, #9ca9c2);
  background: rgba(148, 163, 194, 0.12);
  border-color: rgba(148, 163, 194, 0.3);
}

/* -- Markets whale-overlap page (ms-*) ------------------------------- */

.ms-page {
  max-width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 8px 0 64px;
}

.ms-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 40px;
  padding-top: 8px;
}

.ms-page__head h1 {
  font-size: clamp(2.1rem, 4.4vw, 2.75rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.045em;
  line-height: 1;
}

.ms-page__head .wl-lede {
  display: none;
}

.ms-search {
  flex: 0 1 280px;
  margin-left: 0;
  margin-top: 0;
  align-self: center;
}

@media (max-width: 1100px) {
  .ms-page__head .ms-search,
  .ms-page__head .lb-search {
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    max-width: none;
    height: 42px;
    padding: 0 14px 0 16px;
  }
}

.ms-search-meta {
  margin: 2px 0 0;
}

.ms-filters.lb-sort-bar {
  width: 100%;
  justify-content: flex-start;
  margin: 0;
  padding-bottom: 0;
}

.ms-filters .lb-sort-group {
  gap: 6px 8px;
}

.ms-filters .lb-cat-pills {
  gap: 4px;
}

.ms-page .lb-header + .pg-toolbar {
  margin-bottom: 28px;
}

.ms-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 28px;
  margin: 4px 0 0;
  padding: 0;
  border: none;
}

.ms-stats__cell {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.ms-stats__k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ms-stats__v {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.ms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ms-more {
  grid-column: 1 / -1;
  min-height: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0 8px;
}

.ms-card {
  border: none;
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

.ms-card__hit {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 18px 18px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
  transition: background 0.12s ease;
}

.ms-card__hit:hover {
  background: var(--surface-2);
}

.ms-card__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.ms-card__icon,
.ms-sheet__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

.ms-sheet__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.ms-card__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.ms-card__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ms-card__identity .pill {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 2px 8px;
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--border) 70%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--text) 55%, transparent);
}

.ms-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.ms-card__meta .ms-score {
  display: inline;
  font-size: inherit;
  font-weight: 650;
  line-height: inherit;
  letter-spacing: 0;
}

.ms-card__stats {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ms-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ms-stat__label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 42%, transparent);
}

.ms-stat__value {
  font-size: 0.88rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.ms-score {
  display: inline-block;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text);
  background: none;
  font-variant-numeric: tabular-nums;
}

.ms-score--low { color: var(--score-bad-1); }
.ms-score--50 { color: var(--score-bad-2); }
.ms-score--60,
.ms-score--mid { color: var(--score-bad-3); }
.ms-score--70,
.ms-score--high { color: var(--score-bad-4); }
.ms-score--80 { color: var(--score-bad-5); font-weight: 600; }
.ms-score--90,
.ms-score--critical { color: var(--score-bad-6); font-weight: 600; }

.ms-card__bars {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: auto;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.ms-bar {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: 0;
  background: transparent;
  font-size: 0.78rem;
}

.ms-bar:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.ms-bar.is-dominant {
  background: transparent;
}

.ms-bar.is-dominant .ms-bar__pct {
  color: var(--text);
  font-weight: 650;
}

.ms-bar__side {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.ms-bar--yes .ms-bar__side {
  color: color-mix(in srgb, var(--good) 78%, var(--text));
}

.ms-bar--no .ms-bar__side {
  color: color-mix(in srgb, var(--bad) 72%, var(--text));
}

.ms-bar__pct {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}

.ms-bar__count {
  min-width: 1.5ch;
  text-align: right;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  background: none;
}

/* Market detail sheet — extends shared detail-sheet rules above */
.ms-sheet__hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ms-sheet__hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ms-sheet__meta {
  margin: 0;
  line-height: 1.45;
}

.ms-poly-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  background: transparent;
  white-space: nowrap;
}

.ms-poly-link:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.08);
}

.ms-ext-icon {
  width: 14px;
  height: 14px;
}

.ms-sheet__sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ms-side {
  padding: 16px 18px;
}

.ms-side__head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-bottom: 10px;
}

.ms-side__label {
  font-weight: 750;
  font-size: 0.95rem;
}

.ms-side--yes .ms-side__label {
  color: var(--good, #22c55e);
}

.ms-side--no .ms-side__label {
  color: var(--bad);
}

.ms-side__price {
  font-variant-numeric: tabular-nums;
}

.ms-side__count {
  width: 100%;
  font-size: 0.78rem;
}

.ms-side__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ms-whale {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}
button.ms-whale {
  width: 100%;
  margin: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ms-whale:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.ms-whale__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-whale__name {
  font-weight: 650;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-whale__addr {
  font-size: 0.72rem;
}

.ms-whale__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.ms-whale__smart {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-weight: 750;
  font-size: 0.9rem;
}

.ms-whale__smart-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.ms-whale__smart-val {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.ms-whale__value {
  font-size: 0.75rem;
}

.ms-insiders {
  margin-top: 16px;
}

.ms-insiders__sub {
  margin: 2px 0 10px;
}

.ms-pick {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.ms-pick--yes {
  color: var(--good, #22c55e);
}

.ms-pick--no {
  color: var(--bad);
}

.ms-insider-exit {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.ms-empty {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 28px 20px;
  text-align: center;
}

.ms-card--skel,
.ms-stats--skel {
  pointer-events: none;
}

.ms-card__hit--skel {
  cursor: default;
}

.ms-card__hit--skel:hover {
  background: transparent;
}

.ms-skel__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .ms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ms-stats {
    gap: 10px 20px;
  }

  .ms-grid {
    grid-template-columns: 1fr;
  }

  .ms-sheet__sides {
    grid-template-columns: 1fr;
  }
}

/* —— Marketing home / account chrome —— */
.landing {
  max-width: 960px;
  padding: 12px 0 48px;
}
.landing__hero {
  padding: 28px 0 12px;
  max-width: 40rem;
}
.landing__kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}
.landing__hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.landing__lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 22px;
}
.landing__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.landing__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid var(--dune);
  color: var(--dune);
  background: var(--surface);
}
.landing__btn--primary {
  background: var(--dune);
  border-color: var(--dune);
  color: #fff;
}
[data-theme="dark"] .landing__btn {
  border-color: #fff;
  color: #fff;
}
[data-theme="dark"] .landing__btn--primary {
  background: #fff;
  border-color: #fff;
  color: var(--dune);
}
.landing__btn--ghost:hover,
.landing__btn--primary:hover {
  filter: brightness(1.08);
}
button.linkish {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.landing__fine {
  margin: 8px 0 0;
}
.landing__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.landing__card {
  display: block;
  padding: 18px 16px;
  border-radius: var(--panel-radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  min-height: 140px;
}
.landing__card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.landing__card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}
.landing__risk ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.6;
}
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.intro-card {
  max-width: 440px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: var(--panel-shadow);
}
.intro-card__kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.intro-card h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.intro-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 20px;
}
.intro-card__nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 840px) {
  .landing__grid {
    grid-template-columns: 1fr;
  }

  .landing__btn {
    max-width: 100%;
  }
}

/* —— Home Dashboard —— */
.hd-page {
  position: relative;
  padding: 8px 0 40px;
}

.hd-page::before,
.hd-page::after {
  display: none;
}

.hd-hero,
.hd-panel,
.hd-split {
  position: relative;
  z-index: 1;
}

.hd-hero {
  margin-bottom: 24px;
  padding-top: 0;
}

.app-shell:has(.hd-page),
.app-shell:has(.ct-head),
.app-shell:has(.ia-head) {
  max-width: 1640px;
}

@media (min-width: 721px) {
  .app-shell:has(.hd-page),
  .app-shell:has(.ia-head) {
    padding-top: 36px;
  }
}

.hd-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px 28px;
  align-items: stretch;
}

.hd-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 100%;
}

.hd-rail .hd-panel--rail {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  margin-top: 0;
}

.hd-rail .hd-mkts {
  flex: 1;
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
}

.hd-rail .hd-mkt {
  flex: 1 1 0;
  align-items: center;
  border-right: none;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.hd-rail .hd-mkt:last-child {
  border-bottom: none;
}

.hd-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.hd-main .hd-panel,
.hd-main .hd-split {
  margin-top: 0;
}

.hd-panel--watch,
.hd-panel--copy,
.hd-panel--alerts {
  display: flex;
  flex-direction: column;
}

.hd-panel--watch {
  flex: 1 1 auto;
}

.hd-panel--watch .hd-list {
  flex: 1 1 auto;
  min-height: calc(10 * 56px);
}

.hd-panel--copy .hd-list,
.hd-panel--alerts .hd-list {
  min-height: calc(3 * 56px);
}

.hd-feat {
  display: block;
  background: var(--surface);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  padding: 16px 18px 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  cursor: pointer;
  transition: background 0.12s ease;
}

.hd-feat:hover {
  background: var(--surface-2);
}

.hd-feat--skel {
  pointer-events: none;
  padding-bottom: 16px;
}

.hd-feat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hd-feat__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hd-feat__id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hd-feat__name {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-feat__rank {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.hd-feat__pnl {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.hd-feat__pnl-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hd-feat__pnl.is-up .hd-feat__pnl-value {
  color: var(--good);
}

.hd-feat__pnl.is-down .hd-feat__pnl-value {
  color: var(--bad);
}

.hd-feat__pnl-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.hd-feat__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hd-feat__stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hd-feat__stat-value {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hd-feat__stat-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hd-feat__chart {
  margin: 0 -6px 8px;
}

.hd-feat__svg {
  display: block;
  width: 100%;
  height: 92px;
}

.hd-feat__area {
  fill: rgba(47, 123, 255, 0.1);
}

.hd-feat__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.hd-feat__dot {
  fill: var(--accent);
}

.hd-feat__chart-empty,
.hd-feat__trades-empty {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.hd-feat__trades {
  border-top: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  padding-top: 8px;
}

.hd-feat__trades-label {
  display: block;
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hd-feat__trade {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 72px auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.hd-feat__trade-title {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-feat__trade-out {
  min-width: 0;
}

.hd-feat__trade-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hd-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hd-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 4.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.hd-lede {
  display: none;
}

.hd-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  background: var(--surface);
  border-radius: var(--panel-radius);
  overflow: hidden;
}

.hd-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  height: 132px;
  padding: 18px 18px 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
  box-sizing: border-box;
}

.hd-stat:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.hd-stat:nth-child(-n + 2) {
  border-bottom: 1px solid var(--border);
}

.hd-stat:hover {
  background: var(--surface-2);
}

.hd-stat__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hd-stat__value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hd-stat__hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-panel {
  margin-top: 16px;
  background: var(--surface);
  border: none;
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.hd-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-2));
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.12s ease;
}

.hd-panel__head:hover,
.hd-panel__head:focus-visible {
  background: color-mix(in srgb, var(--surface) 42%, var(--surface-2));
}

.hd-panel__head:hover .hd-panel__open,
.hd-panel__head:focus-visible .hd-panel__open {
  color: var(--text);
}

.hd-panel__head:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: -2px;
}

.hd-panel__titles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.hd-panel__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hd-panel__sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.ui-chevron {
  display: block;
  flex: none;
}

.hd-panel__open,
.tf-back,
.wp-back,
.wp-nav__btn,
.ct-section__link,
.ia-section__link,
.wl-section__link,
.wl-card__feed-link,
.wp-positions__feed-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  filter: none;
}

.hd-panel__open {
  flex: none;
  align-self: center;
  padding-top: 0;
  color: color-mix(in srgb, var(--text) 38%, transparent);
}

.hd-panel__open:hover,
.tf-back:hover,
.wp-back:hover,
.wp-nav__btn:hover,
.ct-section__link:hover,
.ia-section__link:hover,
.wl-section__link:hover,
.wl-card__feed-link:hover,
.wp-positions__feed-link:hover {
  color: var(--text);
  text-decoration: none;
  filter: none;
}

.hd-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.hd-split .hd-panel {
  margin-top: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hd-split .hd-list {
  flex: 1;
}

.hd-list {
  display: flex;
  flex-direction: column;
}

.hd-list-head {
  display: grid;
  grid-template-columns: 64px minmax(108px, 128px) minmax(0, 1fr) minmax(88px, 108px) 92px;
  gap: 16px;
  padding: 10px 20px 8px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.hd-list-head span:last-child {
  text-align: right;
}

.hd-row {
  display: grid;
  grid-template-columns: 64px minmax(108px, 128px) minmax(0, 1fr) minmax(88px, 108px) 92px;
  gap: 16px;
  align-items: center;
  padding: 12px 20px 12px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  min-width: 0;
  min-height: 56px;
  overflow: hidden;
  transition: background 0.12s ease;
}

.hd-row:last-child {
  border-bottom: none;
}

.hd-row:hover {
  background: var(--surface-2);
}

.hd-row--skel {
  pointer-events: none;
}

.hd-row__who {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-row__what {
  min-width: 0;
  overflow: hidden;
}

.hd-row__title {
  display: block;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outcome-pill,
.hd-pill,
.hd-out,
.wl-card-trade__outcome,
.wl-feed-outcome {
  display: inline;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: inherit;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-row__out {
  min-width: 0;
  justify-self: start;
}

.hd-row__time {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.hd-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hd-row__amt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.hd-score {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
}

.hd-score__n {
  font-size: inherit;
  letter-spacing: 0;
  margin: 0;
}

.hd-score--copy.hd-score--low { color: var(--score-good-1); }
.hd-score--copy.hd-score--50 { color: var(--score-good-2); }
.hd-score--copy.hd-score--60 { color: var(--score-good-3); }
.hd-score--copy.hd-score--70 { color: var(--score-good-4); }
.hd-score--copy.hd-score--80 { color: var(--score-good-5); font-weight: 600; }
.hd-score--copy.hd-score--90 { color: var(--score-good-6); font-weight: 600; }

.hd-score--alert.hd-score--low { color: var(--score-bad-1); }
.hd-score--alert.hd-score--50 { color: var(--score-bad-2); }
.hd-score--alert.hd-score--60 { color: var(--score-bad-3); }
.hd-score--alert.hd-score--70 { color: var(--score-bad-4); }
.hd-score--alert.hd-score--80 { color: var(--score-bad-5); font-weight: 600; }
.hd-score--alert.hd-score--90 { color: var(--score-bad-6); font-weight: 600; }

.hd-side {
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
}

.hd-side--buy {
  color: var(--good);
}

.hd-side--sell {
  color: var(--bad);
}

.hd-row .ms-score {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.84rem;
  font-weight: 500;
}

.pg-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 42vh;
  padding: 48px 24px 64px;
  max-width: 420px;
  margin: 0 auto;
}

.pg-state__mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.pg-state--error .pg-state__mark {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
}

.pg-state__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.pg-state__body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.pg-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.pg-state__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.pg-state__btn:hover {
  background: var(--surface-2);
}

.pg-state__btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.pg-state__btn--primary:hover {
  filter: brightness(1.08);
}

#lb-body .pg-state {
  min-height: 280px;
  padding: 36px 20px 48px;
}

.hd-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 36px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hd-empty p {
  margin: 0;
  max-width: 34em;
}

.hd-empty__lead {
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.hd-empty__hint {
  margin-top: 8px !important;
  font-size: 0.86rem;
}

.hd-empty__cta {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.hd-empty__cta:hover {
  filter: brightness(1.08);
}

.hd-mkts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.hd-mkt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-right: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  min-width: 0;
  transition: background 0.12s ease;
}

.hd-mkt:last-child {
  border-right: none;
}

.hd-mkt:hover {
  background: var(--surface-2);
}

.hd-mkt--skel {
  pointer-events: none;
  flex-direction: column;
}

.hd-mkt__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.hd-mkt__body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.hd-mkt__title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-mkt__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.hd-mkt__meta .ms-score,
.hd-mkt__meta .hd-score {
  display: inline;
  font-size: inherit;
  font-weight: 650;
  line-height: inherit;
  letter-spacing: 0;
  padding: 0;
  border: 0;
  background: none;
}

@media (max-width: 980px) {
  .hd-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .hd-rail,
  .hd-main {
    display: contents;
  }

  .hd-metrics {
    order: 1;
  }

  .hd-panel--watch {
    order: 2;
  }

  .hd-panel--watch .hd-list {
    min-height: 280px;
  }

  .hd-panel--copy {
    order: 3;
  }

  .hd-panel--alerts {
    order: 4;
  }

  .hd-rail .hd-panel--rail {
    order: 5;
    flex: none;
    min-height: 0;
  }

  #hd-featured {
    order: 6;
  }

  .hd-split,
  .hd-mkts {
    grid-template-columns: 1fr;
  }

  .hd-mkt {
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  }

  .hd-mkt:last-child {
    border-bottom: none;
  }
}

@media (max-width: 720px) {
  .hd-page {
    padding: 4px 0 4px;
  }

  .hd-feat__trade {
    grid-template-columns: 48px minmax(0, 1fr) minmax(40px, max-content);
    grid-template-areas:
      "badge title out"
      "badge meta meta";
    column-gap: 8px;
    row-gap: 2px;
  }

  .hd-feat__trade > :first-child { grid-area: badge; }
  .hd-feat__trade-title { grid-area: title; }
  .hd-feat__trade-out { grid-area: out; justify-self: end; }
  .hd-feat__trade-meta { grid-area: meta; }

  .hd-list-head {
    display: none;
  }

  .hd-row {
    grid-template-columns: 52px minmax(0, 1fr) minmax(36px, max-content) minmax(56px, max-content);
    grid-template-areas:
      "badge who out time"
      "badge what what what";
    column-gap: 8px;
    row-gap: 4px;
    padding: 12px 14px;
  }

  .hd-row > :first-child { grid-area: badge; }
  .hd-row__who {
    grid-area: who;
    max-width: 100%;
    padding-right: 6px;
  }
  .hd-row__what { grid-area: what; }
  .hd-row__out {
    grid-area: out;
    justify-self: end;
    max-width: 5.5rem;
  }
  .hd-row__time,
  .hd-row__meta {
    grid-area: time;
    justify-self: end;
  }

  .hd-panel__head {
    padding: 16px 14px;
  }
}

/* Page headers + compact info popups (Home-aligned chrome) */
.pg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 40px;
  padding-top: 8px;
}

.pg-head__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  position: relative;
}

.pg-head__title #lb-explain {
  display: contents;
}

.pg-head h1,
.pg-head .lb-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.pg-head__title .tf-title-row {
  margin: 0;
}

.pg-head__title > .pg-info {
  align-self: center;
  position: relative;
  top: 0.06em;
}

.pg-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.pg-info__btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  opacity: 0.55;
  cursor: help;
  box-shadow: none;
  line-height: 0;
}

.pg-info__btn::-webkit-details-marker,
.pg-info__btn::marker {
  display: none;
  content: "";
}

.pg-info__icon {
  display: block;
}

.pg-info:hover,
.pg-info.is-open,
.pg-info:focus-within {
  z-index: 90;
}

.pg-info.is-open .pg-info__btn,
.pg-info:hover .pg-info__btn,
.pg-info__btn:hover,
.pg-info__btn:focus-visible {
  background: transparent;
  color: var(--text);
  opacity: 1;
}

.pg-info__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pg-info__card {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  width: min(380px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 20px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: 0 16px 40px rgba(50, 48, 47, 0.14);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.011em;
  text-align: left;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.pg-info::after {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 56px;
  height: 14px;
}

[data-theme="dark"] .pg-info__card {
  background: #242424;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.pg-info.is-open .pg-info__card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

@media (hover: hover) {
  .pg-info:hover .pg-info__card,
  .pg-info:focus-within .pg-info__card {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .pg-head__title .pg-info {
    position: static;
  }

  .pg-info__card {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
}

.pg-info__block + .pg-info__block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pg-info__title {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.pg-info__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  font-weight: 400;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));
}

.pg-info__list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));
}

html[data-theme="dark"] .pg-info__body,
html[data-theme="dark"] .pg-info__list {
  color: #eceae6;
}

.pg-info__list li {
  margin: 0 0 10px;
}

.pg-info__list li:last-child {
  margin-bottom: 0;
}

.pg-info__list strong {
  font-weight: 700;
  color: var(--text);
}

.table th.num,
.table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hd-hero__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.hd-hero__row .polygun-btn {
  flex-shrink: 0;
}

.hd-hero__row .pg-head__title {
  align-items: center;
}

.hd-hero__row h1 {
  margin: 0;
}

.hd-guide-link {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0 0 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hd-guide-link:hover {
  color: var(--accent);
}

.hd-guide-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 24px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}

.hd-guide-prompt__copy h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hd-guide-prompt__copy p {
  margin: 0;
  max-width: 42rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.hd-guide-prompt .landing__btn {
  flex: none;
  white-space: nowrap;
}

.hd-guide-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hd-guide-rail:hover {
  background: var(--surface-2);
}

.hd-guide-rail__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hd-guide-rail__text {
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 400;
}

.hd-guide-rail__cta {
  margin-top: 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
}

body.guide-open {
  overflow: hidden;
}

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  overflow: hidden;
}

.guide-sheet {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(90vh, 900px);
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.011em;
}

html[data-theme="dark"] .guide-sheet {
  background: #242424;
}

.guide-sheet__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 26px 56px 20px;
  border-bottom: 0;
  background: inherit;
  flex: none;
  z-index: 3;
}

.guide-sheet__head > div:first-child {
  justify-self: start;
}

.guide-sheet__close {
  justify-self: end;
}

.guide-sheet__progress {
  flex: none;
  height: 2px;
  background: var(--border);
  overflow: hidden;
  z-index: 3;
}

.guide-sheet__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transform-origin: left center;
  transition: width 0.16s linear;
}

@media (prefers-reduced-motion: reduce) {
  .guide-sheet__progress-fill {
    transition: none;
  }
}

.guide-sheet__kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-sheet__head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.guide-sheet__close {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.guide-sheet__close:hover {
  background: var(--accent-softer);
  border-color: var(--accent);
  color: var(--accent);
}

.guide-sheet__body {
  padding: 4px 56px 40px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  background: inherit;
}

.guide-sheet__section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px 40px;
  align-items: center;
  padding: 52px 0 56px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.75s cubic-bezier(0.16, 1, 0.3, 1), transform 1.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-sheet__section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .guide-sheet__section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.guide-sheet__section:last-of-type {
  border-bottom: 0;
}

.guide-sheet__copy {
  min-width: 0;
  max-width: 38rem;
}

.guide-sheet__num {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.guide-sheet__section h3 {
  margin: 0 0 22px;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.guide-sheet__section p {
  margin: 0 0 14px;
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.7;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));
}

html[data-theme="dark"] .guide-sheet__section p {
  color: #eceae6;
}

.guide-sheet__section p:last-child {
  margin-bottom: 0;
}

.guide-sheet__section strong {
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.02em;
}

.guide-sheet__list {
  margin: 4px 0 14px;
  padding-left: 1.2em;
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.7;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));
}

html[data-theme="dark"] .guide-sheet__list {
  color: #eceae6;
}

.guide-sheet__list li {
  margin: 0 0 10px;
}

.guide-sheet__list li:last-child {
  margin-bottom: 0;
}

.guide-sheet__note {
  margin: 2px 0 0 !important;
  font-size: 1.02rem !important;
  line-height: 1.65 !important;
  color: color-mix(in srgb, var(--text) 58%, var(--bg)) !important;
}

html[data-theme="dark"] .guide-sheet__note {
  color: #c8c4be !important;
}

.guide-sheet__art {
  width: 260px;
  height: 260px;
  flex: none;
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  align-self: center;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.guide-sheet__art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  filter: none;
}

html[data-theme="dark"] .guide-sheet__art img {
  filter: none;
}

.guide-sheet__art-dark {
  display: none !important;
}

html[data-theme="dark"] .guide-sheet__art-light {
  display: none !important;
}

html[data-theme="dark"] .guide-sheet__art-dark {
  display: block !important;
}

.guide-sheet__jump {
  margin: 18px 0 0 !important;
  grid-column: 1;
}

.guide-sheet__jump a,
.guide-sheet__docs a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.guide-sheet__jump a:hover,
.guide-sheet__docs a:hover {
  text-decoration: underline;
}

.guide-sheet__docs {
  margin: 4px 0 0;
  padding: 28px 0 8px;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 68%, var(--bg));
}

html[data-theme="dark"] .guide-sheet__docs {
  color: #d5d1cb;
}

@media (max-width: 720px) {
  .guide-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    overflow-x: hidden;
  }

  .guide-sheet {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
  }

  .guide-sheet__head {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 36px 22px;
    padding-top: calc(28px + env(safe-area-inset-top, 0px));
  }

  .guide-sheet__kicker {
    margin-bottom: 10px;
  }

  .guide-sheet__head h2 {
    font-size: 1.7rem;
    max-width: 16ch;
  }

  .guide-sheet__close {
    position: static;
    justify-self: auto;
    margin-top: 4px;
  }

  .guide-sheet__body {
    padding: 8px 36px calc(48px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }

  .guide-sheet__section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
    padding: 52px 0 56px;
  }

  .guide-sheet__copy {
    max-width: 28rem;
    width: 100%;
  }

  .guide-sheet__num {
    margin: 0 0 14px;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .guide-sheet__section h3 {
    margin: 0 0 20px;
    font-size: 1.42rem;
    line-height: 1.25;
  }

  .guide-sheet__section p {
    margin: 0 0 16px;
    font-size: 1.05rem;
    line-height: 1.65;
  }

  .guide-sheet__list {
    margin: 4px 0 18px;
    padding: 0;
    list-style: none;
    text-align: center;
  }

  .guide-sheet__list li {
    margin: 0 0 16px;
    padding: 0;
  }

  .guide-sheet__note {
    margin-top: 8px !important;
  }

  .guide-sheet__jump {
    margin: 22px 0 0 !important;
  }

  .guide-sheet__jump a,
  .guide-sheet__docs a {
    justify-content: center;
  }

  .guide-sheet__art {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    grid-column: auto;
    grid-row: auto;
  }

  .guide-sheet__docs {
    text-align: center;
    padding: 32px 0 16px;
  }
}

@media (max-width: 720px) {
  .hd-hero__row {
    flex-direction: row;
    align-items: center;
  }

  .hd-guide-prompt {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
  }

  .hd-guide-prompt__copy h2 {
    margin: 0;
  }

  .hd-guide-prompt__copy p {
    display: none;
  }
}

/* —— Live Copy page (ct-) —— */
.ct-head { margin-top: 12px; }
.ct-head h1 { margin: 0; }
.ct-controls.lb-sort-bar { margin-bottom: 0; padding-bottom: 0; }
.ct-section { margin-top: 16px; }
.ct-section:first-child { margin-top: 0; }
.ct-section.hd-panel { margin-top: 16px; }
.ct-section.hd-panel:first-child { margin-top: 0; }
.ct-section.hd-panel .hd-panel__titles {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 10px 12px;
}
.ct-section.hd-panel .hd-panel__sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ct-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; align-items: stretch;
}
.ct-split .ct-section {
  margin-top: 0; min-width: 0;
  display: flex; flex-direction: column;
  min-height: 0;
}
.ct-scroll {
  border: 1px solid var(--border); border-radius: var(--panel-radius); background: var(--surface);
  box-shadow: var(--panel-shadow);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
}
.ct-section .ct-scroll {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.ct-section .ct-head-row {
  padding: 12px 24px 10px 22px;
}
.ct-section .ct-row__main {
  padding: 14px 24px 14px 22px;
}
.ct-scroll--active {
  max-height: min(58vh, 580px);
}
.ct-scroll--split {
  flex: 1 1 auto;
  max-height: min(78vh, 880px);
  min-height: 340px;
}
.ct-scroll .ct-empty { border: 0; border-radius: 0; background: transparent; }
.ct-head-row {
  display: grid;
  grid-template-columns: 52px minmax(110px, 150px) minmax(0, 1fr) minmax(64px, 96px) 64px;
  gap: 18px;
  padding: 14px 24px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--text) 42%, transparent);
}
.ct-head-row span:last-child { text-align: right; }
.ct-list { display: flex; flex-direction: column; gap: 0; padding: 0; }
.ct-list--flush { gap: 0; padding: 0; }
.ct-row {
  border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.ct-row:last-child { border-bottom: none; }
.ct-row--resolved_won { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--good) 70%, transparent); }
.ct-row--resolved_lost { opacity: 0.42; filter: grayscale(0.35); }
.ct-row--resolved_lost:hover { opacity: 0.62; }
.ct-row--expired, .ct-row--price_unavailable { opacity: 0.65; }
.ct-row__main {
  display: grid;
  grid-template-columns: 52px minmax(110px, 150px) minmax(0, 1fr) minmax(64px, 96px) 64px;
  gap: 18px;
  align-items: center;
  min-height: 56px;
  padding: 13px 24px;
  cursor: pointer;
}
.ct-row__main:hover { background: var(--surface-2); }
.ct-score-slot { display: flex; align-items: center; justify-content: center; }
.ct-score {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
}
.ct-score__n { font-size: inherit; letter-spacing: 0; margin: 0; }
.ct-score--zero { color: var(--score-good-0); }
.ct-score--low { color: var(--score-good-1); }
.ct-score--50 { color: var(--score-good-2); }
.ct-score--60 { color: var(--score-good-3); }
.ct-score--70 { color: var(--score-good-4); }
.ct-score--80 { color: var(--score-good-5); font-weight: 600; }
.ct-score--90 { color: var(--score-good-6); font-weight: 600; }
.ct-score--won { color: var(--score-good-6); font-weight: 600; }
.ct-trader { min-width: 0; }
.ct-trader__name { display: block; font-weight: 650; color: var(--text); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-trader__meta { color: var(--muted); font-size: 0.72rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-market {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ct-market__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.ct-market__icon--placeholder { display: block; }
.ct-market__body { min-width: 0; }
.ct-market__title-row {
  min-width: 0;
  font-size: 0.88rem; font-weight: 600; line-height: 1.3; margin-bottom: 3px;
}
.ct-market__title {
  display: block;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text);
}
.ct-out { min-width: 0; }
.ct-outcome {
  display: block;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent;
  color: var(--text);
}
.ct-outcome--won { color: var(--good); background: transparent; }
.ct-outcome--lost { color: var(--bad); background: transparent; }
.ct-market__stats {
  margin: 0; color: var(--muted); font-size: 0.76rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.ct-market__stats > span + span::before {
  content: "\00b7";
  margin: 0 6px;
  color: color-mix(in srgb, var(--text) 40%, transparent);
}
.ct-market__stats strong { color: var(--text); font-weight: 650; }
.ct-up { color: var(--good); font-weight: 700; }
.ct-down { color: var(--bad); font-weight: 700; }
.ct-time {
  white-space: nowrap; text-align: right; color: var(--text);
  font-variant-numeric: tabular-nums; font-size: 0.76rem; font-weight: 600;
}
.ct-row--skeleton,
.ct-row--skeleton:hover { pointer-events: none; cursor: default; }
.ct-row--skeleton .ct-row__main:hover { background: transparent; }
.ct-row--skeleton .sk-bone--score { width: 26px; height: 13px; border-radius: 6px; }
.ct-row--skeleton .sk-bone--name { width: min(118px, 86%); height: 12px; margin-bottom: 6px; }
.ct-row--skeleton .sk-bone--meta { width: min(88px, 62%); height: 10px; }
.ct-row--skeleton .sk-bone--title { width: min(280px, 72%); height: 13px; }
.ct-row--skeleton .sk-bone--pill { width: 52px; height: 16px; flex-shrink: 0; }
.ct-row--skeleton .sk-bone--stats { width: min(220px, 58%); height: 10px; margin-top: 6px; }
.ct-row--skeleton .sk-bone--time { width: 42px; height: 11px; margin-left: auto; }
.ct-skel-table .sk-bone { height: 11px; }
.ct-empty { color: var(--muted); text-align: center; padding: 42px 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--panel-radius); }
.ct-note { color: color-mix(in srgb, var(--text) 48%, transparent); font-size: 0.8rem; margin: 16px 0 0; }
.ct-eq { margin: 0 0 36px; overflow: visible; }
[data-ct-feed] .ct-eq,
.ct-eq--home { margin: 20px 0 8px; }
.ct-eq__title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}
.ct-eq .ct-eq__filters.lb-sort-bar { margin-bottom: 10px; }
.ct-eq__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
  overflow: visible;
  padding: 18px 0 0;
}
.ct-eq-card {
  position: relative;
  background: var(--surface);
  border: 0;
  border-radius: var(--panel-radius);
  padding: 20px 22px 14px;
  box-shadow: var(--panel-shadow);
  min-width: 0;
  overflow: visible;
}
.ct-eq-card__icon {
  position: absolute;
  top: -14px;
  right: 10px;
  z-index: 2;
  width: 72px;
  height: 72px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(28, 22, 14, 0.2));
}
html[data-theme="dark"] .ct-eq-card__icon {
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
}
.ct-eq-card__body {
  position: relative;
  z-index: 1;
}
.ct-eq-card__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 4px;
  padding-right: 76px;
}
.ct-eq-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ct-eq-card__sub {
  margin: 0 0 14px;
  padding-right: 76px;
  color: color-mix(in srgb, var(--text) 48%, transparent);
  font-size: 0.8rem;
  line-height: 1.4;
}
.ct-eq-card__warn {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border));
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  color: var(--warn);
  font-size: 0.76rem;
  line-height: 1.4;
  font-weight: 600;
}
.ct-eq-row {
  display: grid;
  grid-template-columns: minmax(56px, 0.8fr) minmax(72px, 1fr) minmax(80px, 1fr) minmax(96px, 1.2fr);
  gap: 12px 16px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  font-variant-numeric: tabular-nums;
}
.ct-eq-row--head {
  border-top: 0;
  padding: 0 0 8px;
  color: color-mix(in srgb, var(--text) 42%, transparent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ct-eq-row__score { font-weight: 700; font-size: 0.86rem; }
.ct-eq-row__wr, .ct-eq-row__roi, .ct-eq-row__n { text-align: right; }
.ct-eq-row__wr { font-weight: 650; font-size: 0.88rem; }
.ct-eq-row__roi { font-weight: 800; font-size: 0.9rem; }
.ct-eq-row__n { color: color-mix(in srgb, var(--text) 48%, transparent); font-size: 0.76rem; }
@media (max-width: 860px) {
  .ct-eq__grid { grid-template-columns: 1fr; padding: 16px 0 0; gap: 28px; }
  .ct-eq-card { padding: 18px 18px 12px; }
  .ct-eq-card__icon { width: 60px; height: 60px; top: -10px; right: 8px; }
  .ct-eq-card__head,
  .ct-eq-card__sub { padding-right: 64px; }
}
.ct-full-page { max-width: min(1440px, calc(100vw - 32px)); margin: 0 auto; padding: 8px 0 64px; }
.ct-full-page .tf-back { margin-bottom: 8px; }
.ct-full-page h1 { font-size: clamp(2.1rem, 4.4vw, 2.75rem); font-weight: 700; letter-spacing: -0.045em; margin: 0; }
.ct-full-page__lede {
  margin: 10px 0 0;
  max-width: 42rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 48%, transparent);
}
.ct-full-page .wl-lede { display: none; }
.ct-full-page .pg-toolbar { margin-top: 4px; }
.ct-full-page .ff-sticky .pg-toolbar {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.ct-full-page .ia-full-controls.lb-sort-bar,
.ct-full-page .lb-sort-group {
  flex-wrap: nowrap;
}
.ct-full-page .ia-full-controls.lb-sort-bar {
  margin-bottom: 0;
  overflow-x: auto;
}
.ct-full-page .ct-full-cats.ia-full-controls.lb-sort-bar,
.ct-full-page .ct-full-cats .lb-sort-group {
  flex-wrap: wrap;
  overflow: visible;
}
.ct-full-page .ct-full-cats {
  margin-top: 8px;
}
.ct-full-page .ct-full-cats .lb-cat-pills {
  flex: 1;
  min-width: 0;
}
.ct-full-page .tf-feed-meta { margin-top: 16px; margin-bottom: 18px; }
.ct-full-page .tf-feed-meta--foot {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.ct-full-head {
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 20px 28px;
}
.ct-mode-tip {
  margin-left: auto;
  align-self: center;
}
.ct-mode-tip__btn.pg-info__btn {
  width: auto;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 3px 5px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  opacity: 1;
  cursor: pointer;
  box-shadow: var(--panel-shadow);
}
.ct-mode-tip__btn.pg-info__btn:hover,
.ct-mode-tip.is-open .ct-mode-tip__btn.pg-info__btn,
.ct-mode-tip:hover .ct-mode-tip__btn.pg-info__btn,
.ct-mode-tip:focus-within .ct-mode-tip__btn.pg-info__btn {
  background: var(--surface-2);
  opacity: 1;
}
.ct-mode-tip__icons {
  display: inline-flex;
  align-items: center;
}
.ct-mode-tip__icons .ct-mode-tip__img:last-child {
  margin-left: -8px;
}
.ct-mode-tip__img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 7px;
  flex: none;
  background: #f3f1ec;
}
/* Same day/night trick as the Tradar Guide art: the source renders are lit for
   light mode, so dark mode inverts + hue-shifts them back into a warm glow
   instead of shipping a second asset per mode. */
html[data-theme="dark"] .ct-mode-tip__img {
  filter: invert(1) hue-rotate(180deg) saturate(0.88) brightness(1.22);
}
.ct-mode-tip__label {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.ct-mode-tip__card.pg-info__card {
  left: auto;
  right: 0;
  width: min(720px, calc(100vw - 32px));
  padding: 26px 28px 24px;
}
.ct-mode-tip::after {
  left: auto;
  right: 12px;
  width: 96px;
}
.ct-mode-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  align-items: start;
}
.ct-mode-panel__col {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.ct-mode-panel__col + .ct-mode-panel__col {
  padding-left: 26px;
  border-left: 1px solid var(--border);
}
.ct-mode-panel__img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 18px;
  flex: none;
  background: #f3f1ec;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 55%, transparent);
}
html[data-theme="dark"] .ct-mode-panel__img {
  filter: invert(1) hue-rotate(180deg) saturate(0.88) brightness(1.22);
}
.ct-mode-panel__copy {
  min-width: 0;
  padding-top: 2px;
}
.ct-mode-panel__title {
  margin: 0 0 3px;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.ct-mode-panel__tag {
  margin: 0 0 7px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: color-mix(in srgb, var(--text) 62%, transparent);
}
.ct-mode-panel__body {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}
.ct-mode-panel__warn {
  margin: 20px 0 0;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--warn);
}
.ct-mode-panel__note {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 48%, transparent);
}
.ct-mode-panel__link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
.ct-mode-panel__link:hover {
  text-decoration: underline;
}
.ct-full-feed.tf-feed-panel {
  margin-top: 0; padding: 0; overflow: hidden;
  border: none; border-radius: var(--panel-radius);
  background: var(--surface); box-shadow: var(--panel-shadow);
}
.ct-full-feed .ct-list { display: flex; flex-direction: column; }
.ct-full-feed .ct-empty { border: 0; border-radius: 0; background: transparent; }
@media (max-width: 720px) {
  .ct-full-head {
    flex-direction: column;
    align-items: stretch;
  }
  .ct-mode-tip {
    margin-left: 0;
    align-self: flex-start;
  }
  .ct-mode-tip__card.pg-info__card {
    left: 0;
    right: auto;
  }
  .ct-mode-panel__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ct-mode-panel__col + .ct-mode-panel__col {
    padding-left: 0;
    padding-top: 16px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .ct-mode-panel__img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }
}
#ct-overlay .td-sheet { width: min(920px, 100%); }
#ct-overlay .td-actions { margin-top: 18px; }
#ct-overlay .td-grid--split { gap: 16px; }
@media (max-width: 900px) {
  .ct-split { grid-template-columns: 1fr; }
  .ct-scroll--active { max-height: min(46vh, 460px); }
  .ct-scroll--split {
    height: min(78vh, 820px);
    max-height: min(78vh, 820px);
    min-height: 360px;
  }
  .ct-row__main {
    grid-template-columns: 48px minmax(0, 1fr) minmax(36px, max-content) minmax(52px, max-content);
    grid-template-areas:
      "score trader out time"
      "score market market market";
    gap: 4px 8px;
  }
  .ct-score-slot { grid-area: score; align-self: start; }
  .ct-trader { grid-area: trader; min-width: 0; max-width: 100%; }
  .ct-market { grid-area: market; }
  .ct-out { grid-area: out; justify-self: end; max-width: 5.5rem; }
  .ct-time { grid-area: time; text-align: right; justify-self: end; }
  .ct-head-row { display: none; }
}
@media (max-width: 720px) {
  #ct-overlay .td-sheet {
    width: 100%;
    max-height: var(--overlay-max-h);
  }
  #ct-overlay .td-grid--split { grid-template-columns: 1fr; }
  .ct-full-page { max-width: 100%; }
}

/* —— Insider Alerts page (ia-) —— */
.ia-head { margin: 4px 0 20px; }
.ia-head h1 { margin: 0; }
#ia-summary-host { margin: 0 0 28px; }
#ia-summary-host .ms-stats { margin: 0; gap: 10px 36px; }
[data-ia-feed] > .ct-split {
  margin-top: 20px;
  gap: 20px;
}
[data-ia-feed] > .ct-split + .ia-section { margin-top: 24px; }
.ia-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 20px;
  background: var(--surface);
  border-radius: var(--panel-radius);
  overflow: hidden;
  box-shadow: var(--panel-shadow);
}
.ia-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 18px 20px;
  box-shadow: none;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.ia-card + .ia-card { border-left: 1px solid var(--border); }
.ia-card__label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0; font-weight: 600; }
.ia-card__value { font-size: 1.85rem; font-weight: 700; margin: 0; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.ia-card__sub { color: var(--muted); font-size: 0.78rem; margin: 0; line-height: 1.35; }
.ia-controls.lb-sort-bar { margin-bottom: 16px; padding-bottom: 0; }
.ia-list { display: flex; flex-direction: column; gap: 0; }
.ia-scroll {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
}
.ia-scroll--active { max-height: min(60vh, 640px); }
.ia-scroll--split { max-height: min(72vh, 820px); }
.ia-scroll .ia-empty { border: 0; border-radius: 0; background: transparent; }
.ia-head-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(220px, 2.2fr) minmax(168px, 1.15fr);
  gap: 12px;
  padding: 0 14px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}
.ia-head-row span:last-child { text-align: right; }
.ia-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(220px, 2.2fr) minmax(168px, 1.15fr);
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: transparent;
}
.ia-row:last-child { border-bottom: none; }
.ia-row--skel { pointer-events: none; min-height: 64px; }
.ia-row--skel .ia-side { gap: 8px; }
.ia-row--clickable { cursor: pointer; }
.ia-row--clickable:hover { background: var(--surface-2); }
.ia-row--clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ia-clusters__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px 22px 16px;
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-2));
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.ia-clusters.hd-panel .hd-panel__titles {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: min(640px, 100%);
}
.ia-clusters.hd-panel .hd-panel__sub {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.45;
}
.ia-clusters__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
}
.ct-scroll--clusters {
  max-height: min(58vh, 580px);
}
.ia-cluster-row .ct-row__main { min-height: 72px; padding-top: 16px; padding-bottom: 16px; }
.ia-cluster-record {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
@media (max-width: 900px) {
  .ia-clusters__head { padding: 18px 16px 14px; }
  .ia-clusters__filters { justify-content: flex-start; width: 100%; }
}
#td-overlay .td-sheet { width: min(920px, 100%); }
.ia-row--resolved_won { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--good) 70%, transparent); }
.ia-row--resolved_lost { opacity: 0.52; filter: grayscale(0.25); }
.ia-row--resolved_lost:hover { opacity: 0.72; filter: grayscale(0.1); }
.ia-wallet { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ia-wallet__meta { min-width: 0; }
.ia-wallet__name { font-weight: 700; text-decoration: none; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.88rem; }
.ia-wallet__name:hover { color: var(--accent); }
.ia-wallet__addr {
  color: var(--muted); font-size: 0.68rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.ia-wallet__links { margin-top: 3px; font-size: 0.72rem; }
.ia-wallet__link { color: var(--accent); text-decoration: none; font-weight: 600; }
.ia-wallet__link:hover { text-decoration: underline; }
.ia-wallet__fresh { color: var(--muted); font-size: 0.74rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-market { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ia-market__icon { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--border); }
.ia-market__body { min-width: 0; }
.ia-market__title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ia-market__title { font-weight: 600; color: var(--text); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.88rem; }
.ia-outcome-col { min-width: 0; }
.ia-market__stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.ia-market__stats strong { color: var(--text); font-weight: 700; }
.ia-odds-up { color: var(--good); font-weight: 700; }
.ia-odds-down { color: var(--bad); font-weight: 700; }
.ia-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; min-width: 0; }
.ia-badges { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px 10px; }
.ia-result {
  display: inline;
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 700;
  border: 0;
  background: transparent;
}
.ia-result--won { color: var(--good); }
.ia-result--lost { color: var(--bad); }
.ia-result--sold { color: var(--accent); }
.ia-result--open { color: var(--accent); }
.ia-outcome {
  display: inline;
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 650;
  border: 0;
  background: transparent;
  color: var(--text);
}
.ia-outcome--bet {
  display: inline;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--accent);
  background: transparent;
  border: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ia-notable { color: var(--warn); border: 0; background: transparent; }
.ia-catch-yes { color: var(--good); border: 0; background: transparent; }
.ia-catch-no { color: var(--bad); border: 0; background: transparent; }
.ia-cluster { color: var(--warn); border: 0; background: transparent; }
/* Single subtle context tag on alert rows (e.g. famous-case label). */
.ia-tag {
  display: inline-block;
  max-width: 160px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ia-row--active { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.ia-time { color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.ia-empty { color: var(--muted); text-align: center; padding: 36px 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--panel-radius); font-size: 0.9rem; line-height: 1.45; }
.ia-row--cluster { grid-template-columns: minmax(280px, 3fr) auto; }
.ia-cluster__members { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ia-cluster__member { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ia-cluster__wallet { color: var(--text); font-weight: 700; text-decoration: none; }
.ia-cluster__wallet:hover { color: var(--accent); }
.ia-note { color: var(--muted); font-size: 0.8rem; margin: 22px 0 0; line-height: 1.45; }
.ia-section { margin-top: 20px; }
.ia-section:first-child { margin-top: 0; }
.ia-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 10px;
}
.ia-section__title { margin: 0; font-size: 1.02rem; font-weight: 800; letter-spacing: 0.01em; }
.ia-section__sub { margin: 0; color: var(--muted); font-size: 0.8rem; }
.ia-section__link {
  font: inherit;
}
.ia-section__meta { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ia-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  align-items: start;
}
.ia-split .ia-section {
  margin-top: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
/* Same header geometry in both rails so the list boxes share a top edge. */
.ia-split .ia-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title link"
    "sub sub";
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 10px;
  min-height: 52px;
}
.ia-split .ia-section__title { grid-area: title; min-width: 0; }
.ia-split .ia-section__link {
  grid-area: link;
  justify-self: end;
  align-self: center;
}
.ia-split .ia-section__sub {
  grid-area: sub;
  line-height: 1.35;
  min-height: calc(1.35em * 2);
}
.ia-split .ia-scroll { flex: 1 1 auto; min-height: 0; }
.ia-split .ia-row {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 14px;
}
.ia-split .ia-side {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.ia-split .ia-badges { justify-content: flex-start; }
.ia-split .ia-market__title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 720px) {
  .ia-cards { grid-template-columns: 1fr; }
  .ia-card + .ia-card { border-left: none; border-top: 1px solid var(--border); }
  .ia-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "wallet side"
      "market market";
    gap: 8px 10px;
    padding: 12px 14px;
  }
  .ia-head-row { display: none; }
  .ia-wallet { grid-area: wallet; min-width: 0; max-width: 100%; }
  .ia-market { grid-area: market; }
  .ia-side {
    grid-area: side;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
  }
  .ia-wallet__name { max-width: 100%; }
  .ia-market__title-row { grid-template-columns: minmax(0, 1fr) minmax(36px, max-content); }
  .ia-section__meta { margin-left: 0; width: 100%; }
  .ia-full-page { max-width: 100%; }
  .ia-row--cluster { grid-template-columns: 1fr; }
  #td-overlay .td-sheet {
    width: 100%;
    max-height: var(--overlay-max-h);
  }
}
@media (max-width: 1100px) {
  .ia-split { grid-template-columns: 1fr; }
}

/* Full feed page (watchlist-style, page scroll - not a nested scroll box) */
.ia-full-page { max-width: min(1440px, calc(100vw - 32px)); margin: 0 auto; padding: 8px 0 64px; }
.ia-full-page .tf-back { margin-bottom: 8px; }
.ia-full-page h1 { font-size: clamp(2.1rem, 4.4vw, 2.75rem); font-weight: 700; letter-spacing: -0.045em; margin: 0; }
.ia-full-page .wl-lede { display: none; }
.ia-full-page .ff-sticky .pg-toolbar {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.ia-full-page .ia-full-controls.lb-sort-bar,
.ia-full-page .lb-sort-group {
  flex-wrap: nowrap;
}
.ia-full-page .ia-full-controls.lb-sort-bar {
  margin-bottom: 0;
  overflow-x: auto;
}
.ia-full-sliders {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px 28px;
  margin: 0 0 16px;
  padding: 16px 20px;
  border: none;
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
@media (max-width: 720px) {
  .ia-full-sliders { grid-template-columns: 1fr; }
}
.ia-slider__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px;
}
.ia-slider__label {
  color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.ia-slider__value {
  color: var(--text); font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.ia-slider__range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--ia-fill, 0%),
    color-mix(in srgb, var(--border) 85%, transparent) var(--ia-fill, 0%),
    color-mix(in srgb, var(--border) 85%, transparent) 100%
  );
  outline: none; margin: 0;
}
.ia-slider__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 55%, var(--white)); border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); cursor: pointer;
}
.ia-slider__range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 55%, var(--white)); border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); cursor: pointer;
}
.ia-slider__foot {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 7px;
  color: var(--muted); font-size: 0.74rem;
}
.ia-full-controls.lb-sort-bar { margin-bottom: 12px; flex-wrap: wrap; }
.ia-full-feed.tf-feed-panel {
  border: none;
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  min-height: 420px;
  max-height: none;
}
.ia-full-feed .ct-list,
.ia-full-feed .ia-list { display: flex; flex-direction: column; }
.ia-full-feed .ct-empty,
.ia-full-feed .ia-empty { border: 0; border-radius: 0; background: transparent; padding: 28px 24px; }
.ia-head-row--full,
.ia-row--stack {
  display: grid;
  grid-template-columns: 52px minmax(110px, 160px) minmax(0, 1fr) minmax(64px, 110px) 72px;
  gap: 18px;
  align-items: center;
  padding: 13px 24px;
}
.ia-head-row--full {
  padding: 14px 24px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  color: color-mix(in srgb, var(--text) 42%, transparent);
}
.ia-head-row--full span:last-child { text-align: right; }
.ia-row--stack .ia-score-slot {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ia-row--stack .ia-wallet__name {
  font-size: 0.82rem;
  font-weight: 650;
}
.ia-row--stack .ia-wallet__addr,
.ia-row--stack .ia-wallet__fresh {
  max-width: 100%;
}
.ia-row--stack .ia-market__title {
  font-size: 0.88rem;
  font-weight: 600;
}
.ia-row--stack .ia-out {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.ia-row--stack .ia-time { text-align: right; justify-self: end; }
.ia-row--stack .ia-market__title-row { display: block; }
@media (max-width: 900px) {
  .ia-head-row--full { display: none; }
  .ia-row--stack {
    grid-template-columns: 48px minmax(0, 1fr) minmax(36px, max-content) minmax(52px, max-content);
    grid-template-areas:
      "score wallet out time"
      "score market market market";
    gap: 4px 8px;
    padding: 12px 16px;
  }
  .ia-row--stack .ia-score-slot { grid-area: score; align-self: start; }
  .ia-row--stack .ia-wallet { grid-area: wallet; }
  .ia-row--stack .ia-market { grid-area: market; }
  .ia-row--stack .ia-out { grid-area: out; justify-self: end; }
  .ia-row--stack .ia-time { grid-area: time; }
}

.wp-field-flash {
  animation: wp-field-fade 0.28s ease;
}

@keyframes wp-field-fade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.hd-feat__pnl-value,
.hd-feat__stat-value {
  min-height: 1.25em;
  display: inline-block;
}

.wp-skeleton__chart,
.hd-feat__chart {
  min-height: 92px;
}

.wp-skeleton__chart {
  min-height: 280px;
}

.wp-skel-slot {
  display: inline-flex;
  align-items: center;
  min-height: 1.2em;
}

.wp-skel--value {
  width: 4.5rem;
  height: 1.2rem;
}

.wp-skel--value-lg {
  width: 5.25rem;
  height: 1.45rem;
}

.wp-skel--sub {
  width: 7.5rem;
  height: 0.72rem;
  display: inline-block;
  vertical-align: middle;
}

.wp-skel--sub-wide {
  width: 11rem;
  height: 0.72rem;
}

.wp-skel--bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  margin-top: 2px;
}

.wp-skel--hour {
  width: 3.1rem;
  height: 1.35rem;
  border-radius: 999px;
}

.wp-skel--cat {
  width: 6.5rem;
  height: 0.85rem;
}

.wp-skel--cell {
  width: 3.2rem;
  height: 0.8rem;
  margin-left: auto;
}

.wp-skel--chart {
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: 12px;
}

.wp-skel--pie {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  margin: 18px auto;
}

.wp-skel--tall {
  min-height: 280px;
}

.wp-card:nth-child(2) .sk-bone,
.wp-perf-overview:nth-child(2) .sk-bone,
.wp-pattern-row:nth-child(2) .sk-bone {
  animation-delay: 0.08s;
}

.wp-card:nth-child(3) .sk-bone,
.wp-perf-overview:nth-child(3) .sk-bone,
.wp-pattern-row:nth-child(3) .sk-bone {
  animation-delay: 0.16s;
}

.wp-card:nth-child(4) .sk-bone,
.wp-perf-overview:nth-child(4) .sk-bone,
.wp-pattern-row:nth-child(4) .sk-bone {
  animation-delay: 0.24s;
}

.wp-pattern-row__value--loading,
.wp-metric-row__value--loading {
  display: flex;
  align-items: center;
  min-height: 1.45rem;
}

.wp-hour-pills--loading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wp-chart__skel {
  display: block;
}

.wp-chart__skel .wp-skel--chart {
  min-height: inherit;
}

.wp-chart__skel--tall,
.wp-chart__skel.wp-chart__skel--tall {
  height: 360px;
}

.wp-category-pie--skel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.wp-load-bar {
  position: relative;
  height: 2px;
  margin: 10px 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
}

.wp-load-bar span {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--accent) 80%, var(--text)),
    transparent
  );
  animation: wp-load-slide 1.15s ease-in-out infinite;
}

@keyframes wp-load-slide {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wp-load-bar span {
    animation: none;
    width: 100%;
    opacity: 0.45;
  }
}

.cookie-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface, #111);
  color: var(--text, #fff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.cookie-notice p { margin: 0; font-size: 0.92rem; line-height: 1.45; }
.disclaimer-callout {
  border-left: 3px solid var(--accent, #c9a227);
  padding: 10px 14px;
  margin: 0 0 24px;
  background: color-mix(in srgb, var(--accent, #c9a227) 8%, transparent);
}

html[data-page="signin"],
html[data-page="signin"] body {
  margin: 0;
  min-height: 100%;
  background: #000;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.signin-body {
  min-height: 100dvh;
}

.signin {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "brand panel";
}

.signin__logo {
  grid-area: brand;
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 40px 56px 0;
  color: #fff;
  text-decoration: none;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  width: max-content;
  z-index: 2;
}

.signin__brand {
  grid-area: brand;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 56px;
  color: #fff;
  background: #0b2135;
  overflow: hidden;
}

.signin__logo img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.signin__copy {
  margin: 0;
  max-width: 560px;
  text-align: center;
}

.signin__copy h1 {
  margin: 0;
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.signin__lede {
  margin: 28px auto 0;
  max-width: 28ch;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 450;
  color: #fff;
}

.signin__panel {
  grid-area: panel;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #000;
  color: #fff;
}

.signin__card {
  width: min(440px, 100%);
  padding: 56px 48px 48px;
  border-radius: 20px;
  background: #1a1a1a;
  text-align: center;
}

.signin__card h2 {
  margin: 0 0 56px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.signin__lead {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
  line-height: 1.5;
}

.signin__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.signin__actions .signin__btn + .signin__btn {
  margin-top: 0;
}
.signin__actions form,
.signin-inline-form {
  display: block;
  margin: 0;
}

.signin__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  text-decoration: none;
}

.signin__btn--primary {
  background: #fff;
  color: #000;
}

.signin__btn--ghost {
  background: #242424;
  color: #fff;
}

.signin__btn:hover {
  filter: brightness(0.94);
}

.signin__hint {
  margin: 28px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}

.signin__plans {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 20px;
}

.signin__plan {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  text-decoration: none;
}

.signin__plan:hover {
  color: #fff;
}

.signin__foot {
  width: min(440px, 100%);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  font-size: 14px;
}

.signin__foot a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

.signin__foot a:hover {
  color: #fff;
}

@media (max-width: 860px) {
  .signin {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
      "top"
      "brand";
  }
  .signin__logo {
    grid-area: top;
    align-self: start;
    margin: 0;
    padding: 24px 24px 0;
    font-size: 26px;
    background: transparent;
  }
  .signin__logo img {
    width: 44px;
    height: 44px;
  }
  .signin__brand {
    grid-area: brand;
    min-height: 0;
    padding: 32px 28px 36px;
    justify-content: center;
  }
  .signin__copy {
    margin: 0 auto;
  }
  .signin__copy h1 {
    font-size: 34px;
  }
  .signin__lede {
    font-size: 16px;
    margin-top: 16px;
  }
  .signin__panel {
    grid-area: top;
    position: static;
    justify-content: center;
    min-height: 0;
    overflow: auto;
    padding: 88px 28px 40px;
  }
  .signin__card {
    padding: 36px 32px 32px;
  }
  .signin__card h2 {
    margin-bottom: 28px;
    font-size: 30px;
  }
  .signin__foot {
    margin-top: 22px;
  }
}
