@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&display=swap');

:root {
  --bg: #f4f8f4;
  --panel: #ffffff;
  --line: #d9e6db;
  --text: #172620;
  --muted: #5f7668;
  --brand: #1e8d5b;
  --ghost-bg: #eff7f1;
  --mobile-bottom-nav-height: 0px;
  --modal-layer-z: 700;
}

html[data-theme="dark"] {
  --bg: #262a31;
  --panel: #30353d;
  --line: #444a55;
  --text: #edf0f6;
  --muted: #afb6c3;
  --brand: #4b9cff;
  --ghost-bg: #3a404a;
}

* { box-sizing: border-box; }
html, body {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', sans-serif;
  scrollbar-gutter: stable;
}
html.mobile-nav-open,
html.mobile-tools-open,
body.mobile-nav-open {
  overflow: hidden;
}
body.mobile-tools-open {
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 520;
  isolation: isolate;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, white 10%);
}
.brand {
  position: relative;
  color: var(--text);
  text-decoration: none;
  transition: color .18s ease, text-shadow .18s ease;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 14px;
}
.brand::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at left center, color-mix(in srgb, var(--brand) 18%, transparent) 0%, transparent 58%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 72%);
  opacity: 0;
  transform: scale(.96);
  transition: opacity .22s ease, transform .22s ease, background .22s ease;
  pointer-events: none;
}
.brand-wordmark {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: .94;
  font-weight: 800;
  letter-spacing: -.065em;
  transition: transform .22s ease, filter .22s ease;
}
.brand-wordmark-invest {
  color: #050c17;
  transition: color .22s ease;
}
.brand-wordmark-note {
  color: #27c86d;
  transition: color .22s ease;
}
.brand:hover {
  color: inherit;
}
.brand:hover::before,
.brand:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}
.brand:hover .brand-wordmark,
.brand:focus-visible .brand-wordmark {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 20px color-mix(in srgb, var(--brand) 14%, transparent));
}
.brand:hover .brand-wordmark-invest {
  color: color-mix(in srgb, #050c17 88%, var(--brand) 12%);
}
.brand:hover .brand-wordmark-note {
  color: color-mix(in srgb, #27c86d 90%, white 10%);
}
html[data-theme="dark"] .brand-wordmark-invest {
  color: #edf0f6;
}
html[data-theme="dark"] .brand-wordmark-note {
  color: #32d47a;
}
html[data-theme="dark"] .brand::before {
  background:
    radial-gradient(circle at left center, color-mix(in srgb, var(--brand) 26%, transparent) 0%, transparent 58%),
    linear-gradient(135deg, color-mix(in srgb, #4b9cff 18%, transparent), transparent 72%);
}
html[data-theme="dark"] .brand:hover .brand-wordmark-invest,
html[data-theme="dark"] .brand:focus-visible .brand-wordmark-invest {
  color: color-mix(in srgb, #edf0f6 92%, #4b9cff 8%);
}
html[data-theme="dark"] .brand:hover .brand-wordmark-note,
html[data-theme="dark"] .brand:focus-visible .brand-wordmark-note {
  color: color-mix(in srgb, #32d47a 88%, #8af0b7 12%);
}
.topbar-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.topbar-nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
  white-space: nowrap;
}
.topbar-dropdown-trigger {
  gap: 6px;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: 'Onest', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.topbar-caret {
  font-size: 11px;
  line-height: 1;
  transition: transform .16s ease;
}
.topbar-link:hover {
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in srgb, var(--ghost-bg) 64%, var(--panel));
}
.topbar-link.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
}
.topbar-nav-group.active > .topbar-dropdown-trigger,
.topbar-nav-group.is-open > .topbar-dropdown-trigger {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
}
.topbar-nav-group.is-open .topbar-caret {
  transform: rotate(180deg);
}
.topbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 120;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 94%, var(--ghost-bg));
  box-shadow: 0 18px 36px rgba(0, 0, 0, .16);
  display: grid;
  gap: 6px;
}
.topbar-dropdown-menu--wide {
  min-width: 420px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.topbar-dropdown-section {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.topbar-dropdown-title {
  padding: 4px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.topbar-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.topbar-dropdown-link:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--ghost-bg) 68%, var(--panel));
}
.topbar-dropdown-link.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
}
.topbar-dropdown-link--button {
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.topbar-dropdown-link--soon {
  color: var(--muted);
}
.topbar-dropdown-link--soon:hover {
  color: var(--text);
}
.nav-soon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  background: color-mix(in srgb, var(--brand) 9%, var(--ghost-bg));
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.topbar-link.soon {
  opacity: .62;
  cursor: default;
  pointer-events: none;
}
.mobile-nav-trigger,
.mobile-bottom-nav,
.mobile-nav-overlay,
.mobile-nav-drawer,
.mobile-tools-sheet {
  display: none;
}

.mobile-nav-trigger {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ghost-bg) 70%, var(--panel));
  color: var(--text);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 4px;
  cursor: pointer;
  line-height: 1;
  transition: border-color .16s ease, transform .16s ease;
}
.mobile-nav-trigger span {
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: block;
  transform-origin: center;
  transition: transform .16s ease, opacity .16s ease;
}
.mobile-nav-trigger:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}
.mobile-nav-trigger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-nav-trigger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.mobile-nav-trigger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 598;
  background: rgba(11, 14, 19, .36);
  backdrop-filter: blur(2px);
}
.mobile-nav-drawer {
  position: fixed;
  z-index: 600;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(360px, 92vw);
  max-width: 100vw;
  min-height: 100dvh;
  max-height: 100dvh;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, var(--ghost-bg));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-105%);
  transition: transform .22s cubic-bezier(.2,.7,.2,1);
}
.mobile-nav-open .mobile-nav-overlay {
  display: block;
}
.mobile-tools-open .mobile-nav-overlay {
  display: block;
}
.mobile-nav-open .mobile-nav-drawer {
  display: block;
  transform: translateX(0);
}
.mobile-tools-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(var(--mobile-bottom-nav-height) + 10px);
  z-index: 606;
  padding: 10px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--brand) 16%);
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 96%, var(--ghost-bg));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
  max-height: min(70dvh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mobile-tools-open .mobile-tools-sheet {
  display: block;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-tools-sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 24%, transparent);
}
.mobile-tools-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.mobile-tools-sheet-head strong {
  font-size: 16px;
  font-weight: 800;
}
.mobile-tools-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.mobile-tools-sheet-groups {
  display: grid;
  gap: 10px;
}
.mobile-tools-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--ghost-bg) 58%, var(--panel));
}
.mobile-tools-group-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mobile-tools-links {
  display: grid;
  gap: 8px;
}
.mobile-tools-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, var(--ghost-bg));
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.mobile-tools-link.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
}
.mobile-tools-link--button {
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}
.mobile-tools-link--soon {
  color: var(--muted);
}

.mobile-nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.mobile-nav-drawer-head strong {
  font-size: 18px;
}
.mobile-nav-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ghost-bg);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.mobile-nav-links {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.mobile-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--ghost-bg) 65%, var(--panel));
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.mobile-drawer-link--button {
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}
.mobile-drawer-link.active {
  border-color: color-mix(in srgb, var(--brand) 54%, var(--line));
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
}
.mobile-drawer-link:focus-visible,
.mobile-tools-link:focus-visible,
.mobile-bottom-link:focus-visible,
.mobile-nav-close:focus-visible,
.mobile-tools-close:focus-visible,
.mobile-nav-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 56%, transparent);
  outline-offset: 2px;
}
.mobile-drawer-link.disabled {
  opacity: .66;
  pointer-events: none;
}
.mobile-drawer-link--soon {
  color: var(--muted);
}
.mobile-nav-group {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ghost-bg) 60%, var(--panel));
}
.mobile-nav-group-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mobile-nav-group-links {
  display: grid;
  gap: 8px;
}
.mobile-nav-accordion {
  display: grid;
  gap: 8px;
}
.mobile-drawer-link--accordion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mobile-drawer-caret {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  transition: transform .18s ease, color .18s ease;
}
.mobile-nav-accordion.is-open .mobile-drawer-caret {
  color: var(--brand);
  transform: rotate(180deg);
}
.mobile-nav-accordion-panel {
  display: grid;
  gap: 8px;
  padding: 0 0 0 10px;
  border-left: 1px solid color-mix(in srgb, var(--line) 84%, var(--brand) 16%);
}
.mobile-nav-accordion-panel .mobile-drawer-link {
  min-height: 42px;
  font-size: 14px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--panel) 94%, var(--ghost-bg));
}
.mobile-drawer-settings {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ghost-bg) 62%, var(--panel));
}
.mobile-drawer-auth {
  display: grid;
  gap: 8px;
}
.mobile-drawer-auth .btn {
  min-height: 44px;
  justify-content: center;
  width: 100%;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 510;
  border-top: 1px solid color-mix(in srgb, var(--line) 88%, var(--brand) 12%);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, white 4%), color-mix(in srgb, var(--ghost-bg) 84%, var(--panel)));
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(78px, 1.04fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 3px;
  align-items: stretch;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .14);
  backdrop-filter: blur(18px);
  overflow: hidden;
  min-height: var(--mobile-bottom-nav-height);
}
.mobile-bottom-link {
  position: relative;
  min-height: 60px;
  padding: 7px 2px 8px;
  border-radius: 18px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10.6px;
  font-weight: 700;
  line-height: 1.08;
  touch-action: manipulation;
  min-width: 0;
  transition:
    color .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}
.mobile-bottom-link--button {
  width: 100%;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.mobile-bottom-link--compact {
  justify-content: center;
}
.mobile-bottom-link--compact::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 75%, transparent);
  opacity: 0;
  transform: translateX(-50%) scale(.45);
  transition: opacity .18s ease, transform .18s ease;
}
.mobile-bottom-link--compact:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
}
.mobile-bottom-link--compact.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  background: color-mix(in srgb, var(--brand) 9%, var(--ghost-bg));
}
.mobile-bottom-link--compact.active::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.mobile-bottom-link--portfolio {
  min-height: 60px;
  padding: 7px 2px 8px;
  border-radius: 18px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.mobile-bottom-link--portfolio::before {
  content: none;
}
.mobile-bottom-link--portfolio::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 75%, transparent);
  opacity: 0;
  transform: translateX(-50%) scale(.45);
  transition: opacity .18s ease, transform .18s ease;
}
.mobile-bottom-link--portfolio:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
  transform: none;
}
.mobile-bottom-link--portfolio.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  background: color-mix(in srgb, var(--brand) 9%, var(--ghost-bg));
  box-shadow: none;
}
.mobile-bottom-link--portfolio.active .mobile-bottom-icon--portfolio {
  color: currentColor;
}
.mobile-bottom-link--portfolio.active::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.mobile-bottom-label {
  display: block;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0;
  font-size: 9.3px;
}
.mobile-bottom-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.mobile-bottom-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mobile-bottom-icon--portfolio {
  width: 20px;
  height: 20px;
  color: currentColor;
}
.mobile-bottom-icon--portfolio svg {
  width: 20px;
  height: 20px;
}
.mobile-bottom-link--portfolio .mobile-bottom-label {
  font-size: 9.3px;
  font-weight: 700;
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
}
.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.has-token #auth-actions {
  display: none !important;
}
.has-token #guest-menu-trigger,
.has-token #guest-menu {
  display: none !important;
}
.auth-login-btn {
  background: color-mix(in srgb, var(--ghost-bg) 80%, var(--panel));
  color: var(--text);
  border-color: var(--line);
  min-width: 84px;
  border-radius: 10px;
  padding: 0 12px;
  height: 36px;
  font-size: 12px;
  line-height: 1;
}
.auth-register-btn {
  min-width: 112px;
  border-radius: 10px;
  padding: 0 14px;
  height: 36px;
  font-size: 12px;
  line-height: 1;
}

.settings-trigger {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.settings-trigger .settings-icon {
  display: inline-block;
  font-size: 22px;
  line-height: 1;
}
.settings-trigger:hover,
.settings-trigger:focus-visible {
  background: var(--ghost-bg);
  border-color: var(--line);
  transform: translateY(-1px);
}
.settings-trigger:focus-visible {
  outline: none;
}
.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 232px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
  padding: 10px;
  z-index: 140;
}
.guest-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
#guest-menu {
  left: 0;
  right: auto;
  transform-origin: top left;
  transform: translateX(calc(-100% + 36px));
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px;
}
.settings-row span {
  font-size: 14px;
  color: var(--muted);
}
.settings-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.settings-info {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: help;
  line-height: 1;
}
.settings-info::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(260px, 60vw);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 96%, black 4%);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 6;
}
.settings-info:hover::after,
.settings-info:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.settings-row strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ghost-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  user-select: none;
}
.theme-switch > span { width: 14px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.theme-switch input { display: none; }
.theme-switch .track {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #9eb2a4;
  position: relative;
}
.theme-switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: all .2s ease;
}
.theme-switch input:checked + .track::after { left: 16px; }
.theme-switch input:checked + .track { background: var(--brand); }

.mode-switch > span {
  width: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.mode-switch span:first-child {
  color: var(--text);
}
.mode-switch input:checked ~ span:last-child {
  color: var(--text);
}
.mode-switch input:checked ~ .track ~ span:last-child {
  color: var(--text);
}

.profile-chip {
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, var(--ghost-bg));
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: box-shadow .16s ease, background-color .16s ease;
}
.profile-chip:hover {
  box-shadow: 0 6px 12px color-mix(in srgb, var(--brand) 14%, transparent);
  background: color-mix(in srgb, var(--brand) 20%, var(--ghost-bg));
}
.user-menu-trigger {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, var(--ghost-bg));
  color: var(--text);
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.user-avatar.lg {
  width: 34px;
  height: 34px;
  font-size: 15px;
}
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
  padding: 10px;
  z-index: 140;
}
.user-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}
.user-menu-head-link {
  width: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color .15s ease;
}
.user-menu-head-link:hover,
.user-menu-head-link:focus-visible {
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
}
.user-meta { display: grid; gap: 2px; min-width: 0; }
.user-meta strong,
.user-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-meta strong { font-size: 15px; }
.user-meta span { font-size: 12px; color: var(--muted); }
.user-menu-links {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.user-portfolio-summary {
  margin-top: 8px;
  padding: 8px 6px 6px;
  border-bottom: 1px solid var(--line);
}
.user-portfolio-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ghost-bg) 75%, var(--panel));
  margin-bottom: 8px;
}
.user-portfolio-total-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
}
.user-portfolio-total-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
}
.user-portfolio-total-value {
  justify-self: end;
  font-size: 14px;
  font-weight: 700;
}
.user-portfolio-total-sub,
.user-portfolio-item-sub {
  color: var(--muted);
  font-size: 12px;
}
.user-portfolio-total-day,
.user-portfolio-item-day {
  justify-self: end;
  font-size: 12px;
  font-weight: 600;
}
.user-portfolio-total-day.pos,
.user-portfolio-item-day.pos {
  color: #20b274;
}
.user-portfolio-total-day.neg,
.user-portfolio-item-day.neg {
  color: #dc4e56;
}
.user-portfolio-list {
  display: grid;
}
.user-portfolio-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.user-portfolio-item:hover {
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
}
.user-portfolio-item.active {
  background: color-mix(in srgb, var(--brand) 16%, var(--ghost-bg));
}
.user-portfolio-item + .user-portfolio-item {
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.user-portfolio-item-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.user-portfolio-item-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.user-portfolio-item-value {
  justify-self: end;
  font-size: 13px;
  font-weight: 700;
}
.user-menu-links a,
.user-menu-links button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--ghost-bg);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.container { width: min(1240px, 95%); margin: 16px auto 28px; }
.hero h1 { margin: 0 0 4px; font-size: clamp(26px, 3.2vw, 38px); }
.hero p { margin: 0; color: var(--muted); }
.market-mobile-marquee {
  display: none;
  margin: 6px 0 12px;
}
.market-mobile-marquee-mask {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, var(--ghost-bg)) 0%, color-mix(in srgb, var(--ghost-bg) 88%, transparent) 100%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 8%, transparent);
}
.market-mobile-marquee-mask::before,
.market-mobile-marquee-mask::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  pointer-events: none;
  z-index: 1;
}
.market-mobile-marquee-mask::before {
  left: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--panel) 98%, transparent) 0%, transparent 100%);
}
.market-mobile-marquee-mask::after {
  right: 0;
  background: linear-gradient(270deg, color-mix(in srgb, var(--panel) 98%, transparent) 0%, transparent 100%);
}
.market-mobile-marquee-track {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  min-width: 100%;
  padding: 10px 18px;
  transform: translate3d(0, 0, 0);
}
.market-mobile-marquee-track.is-ready:not(.is-static) {
  animation: market-mobile-marquee 22s linear infinite;
}
.market-mobile-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.market-mobile-marquee-label {
  color: color-mix(in srgb, var(--text) 66%, var(--muted));
}
.market-mobile-marquee-value {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.market-mobile-marquee-meta {
  color: var(--muted);
}
.market-mobile-marquee-item.is-pos .market-mobile-marquee-meta {
  color: #18aa6e;
}
.market-mobile-marquee-item.is-neg .market-mobile-marquee-meta {
  color: #dc4e56;
}
@keyframes market-mobile-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
.widgets {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.widgets .panel {
  padding: 12px 14px;
}
.dashboard-disclosure {
  position: relative;
  margin-top: 10px;
  z-index: 1;
}
.dashboard-disclosure-bar {
  display: flex;
  justify-content: center;
  align-items: center;
}
.dashboard-disclosure-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  background: color-mix(in srgb, var(--panel) 88%, var(--ghost-bg));
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 10%, transparent);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.dashboard-disclosure-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--ghost-bg));
}
.dashboard-disclosure-toggle-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .2s ease;
}
.dashboard-disclosure.is-open .dashboard-disclosure-toggle-icon {
  transform: rotate(90deg);
}
.dashboard-disclosure-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .32s ease, opacity .2s ease, margin-top .2s ease;
}
.dashboard-disclosure.is-open .dashboard-disclosure-content {
  max-height: 1600px;
  opacity: 1;
  margin-top: 12px;
}
.fx-widget {
  min-width: 0;
  min-height: 112px;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.widget-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.widget-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px color-mix(in srgb, var(--brand) 14%, transparent);
}
.fx-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.fx-value { margin-top: 4px; font-size: 22px; font-weight: 800; }
.fx-change { margin-top: 2px; font-size: 14px; font-weight: 700; }
.fx-change.pos { color: #18aa6e; }
.fx-change.neg { color: #dc4e56; }
.sparkline {
  width: 100%;
  height: 18px;
  margin-top: 0;
  display: block;
}
#key-rate-widget {
  position: relative;
  isolation: isolate;
}
#key-rate-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: transparent;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s ease, background-color .24s ease;
  z-index: 0;
}
#key-rate-widget > * {
  position: relative;
  z-index: 1;
}
#key-rate-widget.rate-flat {
  background: var(--panel);
}
#key-rate-widget.rate-down::before {
  background: color-mix(in srgb, #18aa6e 11%, var(--panel));
}
#key-rate-widget.rate-up::before {
  background: color-mix(in srgb, #dc4e56 11%, var(--panel));
}
#key-rate-widget:hover::before {
  transform: scaleX(1);
}
.keyrate-top { display: grid; gap: 2px; }
.keyrate-title { font-size: 15px; font-weight: 700; line-height: 1.2; }
.keyrate-subtitle { color: var(--muted); font-size: 12px; font-weight: 600; }
.keyrate-main {
  margin-top: 5px;
  display: grid;
  gap: 2px;
  align-items: start;
}
.keyrate-left { min-width: 0; }
.keyrate-current {
  font-size: clamp(20px, 1.65vw, 29px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .2px;
}
.keyrate-delta {
  margin-top: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.keyrate-bottom {
  margin-top: 2px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  align-items: start;
  padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.keyrate-next-wrap { display: grid; gap: 2px; align-content: start; }
.keyrate-next-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.keyrate-next-date {
  display: block;
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 800;
  line-height: 1.02;
  white-space: normal;
  overflow-wrap: anywhere;
}

.panel { margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.main-market-shell {
  position: relative;
  margin-top: 10px;
  overflow: visible;
}
.main-market-mobile-switch {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ghost-bg) 68%, var(--panel));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 6%, transparent);
}
.market-panel-mobile-switch {
  flex: 0 0 auto;
}
.main-market-mobile-tab {
  min-width: 88px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.main-market-mobile-tab.is-active {
  background: color-mix(in srgb, var(--brand) 18%, var(--ghost-bg));
  color: var(--text);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--brand) 42%, var(--line)),
    0 4px 12px rgba(0, 0, 0, .12);
}
.main-market-mobile-tab:not(.is-active):hover,
.main-market-mobile-tab:not(.is-active):focus-visible {
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  background: color-mix(in srgb, var(--ghost-bg) 72%, transparent);
  outline: none;
}
.main-market-slider-viewport {
  overflow: hidden;
  border-radius: 14px;
  height: auto;
  transition: height .28s cubic-bezier(.2,.7,.2,1);
}
.main-market-slider {
  display: flex;
  align-items: flex-start;
  min-width: 100%;
  min-height: 1px;
  transform: translate3d(0, 0, 0);
  transition: transform .42s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.main-market-shell.is-ofz-open .main-market-slider {
  transform: translate3d(-100%, 0, 0);
}
.main-market-shell.is-crypto-open .main-market-slider {
  transform: translate3d(-200%, 0, 0);
}
.main-market-pane {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: none;
}
.main-market-pane > .panel {
  margin-top: 0;
}
.main-market-toggle {
  position: absolute;
  right: -82px;
  top: 50%;
  margin-top: -42px;
  width: 46px;
  height: 84px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  background: color-mix(in srgb, var(--panel) 92%, var(--ghost-bg));
  color: var(--text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  transition: transform .18s ease, border-color .18s ease, opacity .14s ease;
  opacity: 0;
  pointer-events: none;
}
.main-market-toggle.is-ready {
  opacity: .98;
  pointer-events: auto;
}
.main-market-toggle:hover {
  transform: scale(1.03);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}
.main-market-toggle span {
  font-size: 24px;
  line-height: 1;
  transition: transform .28s ease;
}
.main-market-shell.is-crypto-open .main-market-toggle span {
  transform: rotate(180deg);
}
.ofz-summary-grid,
.crypto-summary-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ofz-summary-item,
.crypto-summary-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--ghost-bg) 55%, var(--panel));
  display: grid;
  gap: 4px;
}
.ofz-summary-item strong,
.crypto-summary-item strong {
  font-size: 18px;
  line-height: 1.2;
}
.ofz-table-wrap td .ofz-name {
  display: grid;
  gap: 2px;
}
.ofz-table-wrap td .ofz-name small {
  color: var(--muted);
  font-size: 12px;
}
.ofz-cell-pos { color: #18aa6e; font-weight: 700; }
.ofz-footnote {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.crypto-footnote {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.bond-subtype-shell {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.bond-subtype-rail {
  position: relative;
  overflow: hidden;
  padding-inline: 10px;
}
.bond-subtype-rail::before,
.bond-subtype-rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  pointer-events: none;
  z-index: 1;
}
.bond-subtype-rail::before {
  left: -1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--panel) 98%, transparent) 0%, transparent 100%);
}
.bond-subtype-rail::after {
  right: -1px;
  background: linear-gradient(270deg, color-mix(in srgb, var(--panel) 98%, transparent) 0%, transparent 100%);
}
.bond-subtype-filters {
  padding: 2px 26px 4px 10px;
  scroll-padding-inline: 10px 26px;
}
.bond-subtype-empty {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px dashed color-mix(in srgb, var(--brand) 36%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ghost-bg) 88%, var(--panel)) 0%, color-mix(in srgb, var(--panel) 98%, transparent) 100%);
}
.bond-subtype-empty strong {
  font-size: 18px;
  line-height: 1.2;
  color: var(--text);
}
.bond-subtype-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.market-panel-head {
  align-items: flex-start;
  gap: 18px;
}
.market-panel-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.market-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.market-panel-title-row h2 {
  margin: 0;
  min-width: 0;
}
.market-panel-copy h2 {
  margin: 0;
}
.market-panel-note {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.market-panel-actions {
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 320px;
}
.market-toolbar {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}
.market-toolbar--secondary {
  margin-top: 16px;
  padding: 14px 16px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ghost-bg) 82%, var(--panel)) 0%, color-mix(in srgb, var(--panel) 96%, transparent) 100%);
}
.market-toolbar-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.market-toolbar-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 8%, var(--ghost-bg));
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand) 56%, var(--text));
}
.market-toolbar-summary {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.market-sector-rail {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.market-sector-rail::before,
.market-sector-rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  pointer-events: none;
  z-index: 1;
}
.market-sector-rail::before {
  left: 42px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--panel) 98%, transparent) 0%, transparent 100%);
}
.market-sector-rail::after {
  right: 42px;
  background: linear-gradient(270deg, color-mix(in srgb, var(--panel) 98%, transparent) 0%, transparent 100%);
}
.market-sector-scroll {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  background: color-mix(in srgb, var(--ghost-bg) 78%, var(--panel));
  color: var(--text);
  font: inherit;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, opacity .16s ease;
}
.market-sector-scroll:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, var(--ghost-bg));
  color: var(--brand);
}
.market-sector-scroll:disabled {
  opacity: .34;
  cursor: default;
}
.market-sector-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: color-mix(in srgb, var(--brand) 38%, var(--line)) transparent;
  scrollbar-width: thin;
  padding: 2px 10px 8px;
  scroll-padding-inline: 10px;
}
.market-sector-filters::-webkit-scrollbar {
  height: 8px;
}
.market-sector-filters::-webkit-scrollbar-track {
  background: transparent;
}
.market-sector-filters::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand) 38%, var(--line));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.market-sector-chip {
  flex: 0 0 auto;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}
.market-sector-chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
}
.market-sector-chip.active {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, var(--ghost-bg));
  color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent);
}

.btn {
  border: 1px solid color-mix(in srgb, var(--brand) 70%, black 10%);
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn.ghost { background: var(--ghost-bg); color: var(--text); border-color: var(--line); }
.btn:hover {
  box-shadow: 0 6px 12px color-mix(in srgb, var(--brand) 14%, transparent);
}
.btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

/* Keep auth controls compact and aligned with the settings icon */
.auth-actions .auth-login-btn,
.auth-actions .auth-register-btn {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 90%, white 10%) 0%, var(--brand) 100%);
  border-color: color-mix(in srgb, var(--brand) 80%, black 10%);
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}
.sync-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow:
    0 10px 18px color-mix(in srgb, var(--brand) 22%, transparent),
    0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent);
}
.sync-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}
.sync-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2.1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sync-label {
  font-weight: 700;
  letter-spacing: .15px;
}
.sync-btn.is-loading .sync-icon {
  animation: sync-spin 0.8s linear infinite;
}
@keyframes sync-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.table-wrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; }
tr:hover td { background: color-mix(in srgb, var(--ghost-bg) 60%, transparent); }
.asset-row { cursor: pointer; }
.market-change-cell {
  font-weight: 800;
  white-space: nowrap;
  color: var(--muted);
}
.market-change-cell.pos,
.market-mobile-metric-pill--change.pos strong {
  color: #18aa6e;
}
.market-change-cell.neg,
.market-mobile-metric-pill--change.neg strong {
  color: #dc4e56;
}
.asset-ident { display: inline-flex; align-items: center; gap: 10px; }
.asset-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 20%, var(--ghost-bg));
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}
.asset-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-fallback { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1; }
.custom-asset-avatar {
  font-size: 14px;
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: color-mix(in srgb, var(--brand) 18%, var(--panel));
}
.custom-asset-avatar--real-estate { background: color-mix(in srgb, #2f80ed 22%, var(--panel)); }
.custom-asset-avatar--vehicle { background: color-mix(in srgb, #13a58a 22%, var(--panel)); }
.custom-asset-avatar--business { background: color-mix(in srgb, #7c5cff 22%, var(--panel)); }
.custom-asset-avatar--private-debt { background: color-mix(in srgb, #d6a21f 24%, var(--panel)); }
.custom-asset-avatar--collectible { background: color-mix(in srgb, #de4fa1 22%, var(--panel)); }
.custom-asset-avatar--precious-metal { background: color-mix(in srgb, #d7b94c 28%, var(--panel)); }
.custom-asset-avatar--ip { background: color-mix(in srgb, #23a7d8 22%, var(--panel)); }
.custom-asset-avatar--other { background: color-mix(in srgb, #7c8798 24%, var(--panel)); }

.asset-custom-panel {
  display: grid;
  gap: 12px;
}
.custom-asset-form {
  display: grid;
  gap: 10px;
}
.custom-asset-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.custom-category-option {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  padding: 8px 10px;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.custom-category-option:hover,
.custom-category-option.active {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, var(--ghost-bg));
}
.custom-category-option:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 70%, white 30%);
  outline-offset: 2px;
}
.custom-category-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel) 72%, var(--ghost-bg));
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}
.custom-asset-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.custom-valuation-form {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 7%, var(--panel));
}
.tx-balance-preview.ok {
  color: #138a5b;
}
.tx-balance-preview.warn {
  color: #dc4e56;
}

.market-mobile-list,
.ofz-mobile-list,
.crypto-mobile-list {
  display: none;
  margin-top: 8px;
}
.market-mobile-list {
  display: none;
  gap: 0;
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--ghost-bg) 58%, var(--panel));
  overflow: hidden;
}
.market-mobile-list.is-loading,
.ofz-mobile-list.is-loading,
.crypto-mobile-list.is-loading {
  min-height: 324px;
}
.market-mobile-skeleton-list {
  display: grid;
}
.market-mobile-skeleton-row {
  min-height: 64px;
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--ghost-bg) 60%, var(--panel));
}
.market-mobile-skeleton-row + .market-mobile-skeleton-row {
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.market-mobile-skeleton-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, white 18%, transparent) 45%, transparent 80%);
  transform: translateX(-100%);
  animation: market-mobile-skeleton 1.25s linear infinite;
}
@keyframes market-mobile-skeleton {
  to { transform: translateX(100%); }
}
.ofz-mobile-list,
.crypto-mobile-list {
  gap: 0;
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--ghost-bg) 58%, var(--panel));
  overflow: hidden;
}
.market-mobile-empty {
  padding: 14px 16px;
}
.ofz-mobile-swipe-list {
  display: grid;
}
.ofz-mobile-kind {
  min-width: 36px;
  height: 24px;
  padding: 0 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--ghost-bg) 82%, var(--panel));
}
.ofz-mobile-swipe-row .market-mobile-swipe-track {
  gap: 16px;
}
.crypto-mobile-swipe-row {
  cursor: default;
}
.market-mobile-swipe-list {
  display: grid;
}
.market-mobile-swipe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, 42vw);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
  transition: background-color .16s ease;
}
.market-mobile-swipe-row + .market-mobile-swipe-row {
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.market-mobile-swipe-row:hover,
.market-mobile-swipe-row:focus-visible {
  background: color-mix(in srgb, var(--ghost-bg) 72%, transparent);
  outline: none;
}
.market-mobile-swipe-company {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.market-mobile-swipe-rank {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  background: color-mix(in srgb, var(--ghost-bg) 82%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
}
.market-mobile-swipe-company .asset-avatar {
  width: 22px;
  height: 22px;
}
.market-mobile-swipe-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.market-mobile-swipe-copy strong,
.market-mobile-swipe-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-mobile-swipe-copy strong {
  font-size: 13px;
  line-height: 1.12;
}
.market-mobile-swipe-copy span {
  font-size: 10px;
  color: var(--muted);
}
.market-mobile-swipe-metrics {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  min-width: 0;
}
.market-mobile-swipe-metrics::-webkit-scrollbar {
  display: none;
}
.market-mobile-swipe-track {
  display: flex;
  gap: 18px;
  width: max-content;
  min-width: max-content;
  align-items: center;
}
.market-mobile-metric-pill {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
}
.market-mobile-metric-pill small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.market-mobile-metric-pill strong {
  font-size: 12px;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-mobile-metric-pill--price strong {
  font-size: 14px;
  font-weight: 800;
}

.pager {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ofz-pager {
  margin-top: 10px;
}
.pager-drops {
  justify-content: flex-start;
  gap: 8px;
}
.pager-nav,
.pager-page {
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ghost-bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}
.pager-nav:hover,
.pager-page:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
}
.pager-pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pager-page {
  min-width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
}
.pager-page.active {
  border-color: color-mix(in srgb, var(--brand) 75%, var(--line));
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, var(--ghost-bg));
}
.pager-ellipsis {
  color: var(--muted);
  font-weight: 700;
  padding: 0 2px;
}
.pager-summary {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.chart-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.chart-wrap.is-loading {
  position: relative;
}
.chart-wrap.is-loading canvas {
  opacity: .42;
  filter: saturate(.85);
  transition: opacity .2s ease, filter .2s ease;
}
.chart-wrap.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  backdrop-filter: blur(1.5px);
  z-index: 3;
  pointer-events: none;
}
.chart-wrap.is-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 38%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--brand) 16%, transparent) 50%,
    transparent 100%
  );
  z-index: 4;
  pointer-events: none;
  animation: chart-loading-sweep 1.05s ease-in-out infinite;
}
@keyframes chart-loading-sweep {
  0% { left: -40%; }
  100% { left: 102%; }
}

.modal {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, #0a0d12 58%, transparent);
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: var(--modal-layer-z);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
html.modal-open,
body.modal-open {
  overflow: hidden;
}
.modal-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  box-shadow: 0 24px 56px rgba(0, 0, 0, .34);
}
@supports (height: 100svh) {
  .modal-card {
    max-height: calc(100svh - 28px);
  }
}
@media (max-width: 560px) {
  .modal {
    place-items: start center;
    padding: 8px;
  }
  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 16px);
  }
  .custom-asset-category-grid,
  .custom-asset-values-grid {
    grid-template-columns: 1fr;
  }
  @supports (height: 100svh) {
    .modal-card {
      max-height: calc(100svh - 16px);
    }
  }
}
.auth-card {
  width: min(340px, 90vw) !important;
  max-width: 340px;
  background: color-mix(in srgb, var(--panel) 92%, #111 8%);
  border: 1px solid color-mix(in srgb, var(--line) 85%, #fff 15%);
  border-radius: 14px;
  padding: 12px 11px 9px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: .2px;
}
.close {
  position: absolute;
  right: 10px;
  top: 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, color .16s ease;
}
.auth-card .close {
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--ghost-bg) 65%, var(--panel));
  color: var(--muted);
  font-size: 28px;
  transition: transform .16s ease, border-color .16s ease, color .16s ease;
}
.close:hover {
  transform: scale(1.04);
  color: var(--text);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}
.auth-form {
  display: grid;
  gap: 7px;
}
.auth-label {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.auth-form input {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 80%, #5a5f70 20%);
  color: var(--text);
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 9px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-form input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 75%, white 25%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 24%, transparent);
}
.auth-checkbox {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.auth-form .auth-checkbox input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--panel) 80%, #5a5f70 20%);
  box-shadow: none;
  accent-color: var(--brand);
  appearance: auto;
}
.auth-form .auth-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
  outline-offset: 2px;
  box-shadow: none;
}
.auth-checkbox span {
  line-height: 1.35;
}
.auth-password-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.auth-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}
.auth-submit-btn {
  margin-top: 6px;
  width: 100%;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 13px;
}
.auth-terms {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.auth-divider {
  margin: 8px 0;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}
.auth-divider span {
  position: relative;
  background: color-mix(in srgb, var(--panel) 94%, #111 6%);
  padding: 0 12px;
}
.auth-socials {
  display: grid;
  gap: 6px;
}
.auth-social-btn {
  width: 100%;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: color-mix(in srgb, var(--panel) 84%, #1a1f2b 16%);
  color: var(--text);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 500;
}
.auth-social-btn:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.auth-switch {
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.auth-link-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

pre {
  margin: 4px 0 0;
  background: color-mix(in srgb, var(--panel) 80%, black 20%);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 8px;
  padding: 8px;
  color: color-mix(in srgb, var(--text) 88%, #bff3d5 12%);
  overflow: auto;
  max-height: 86px;
  font-size: 12px;
}

/* ── Market search autocomplete ───────────────────────── */
.market-search-wrap {
  position: relative;
}
.market-search-input {
  width: 240px;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ghost-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f7668' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 11px center / 15px no-repeat;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
html[data-theme="dark"] .market-search-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23afb6c3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}
.market-search-input::placeholder { color: var(--muted); opacity: .7; }
.market-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}
.market-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 300px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  z-index: 30;
  padding: 6px;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background .12s ease;
}
.search-item:hover { background: var(--ghost-bg); }
.search-item-info {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.search-item-info strong {
  font-size: 14px;
  font-weight: 700;
}
.search-item-info span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-price {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  margin-left: auto;
}
.search-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ── Loading skeleton ────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-row {
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--ghost-bg) 25%, color-mix(in srgb, var(--ghost-bg) 60%, var(--panel)) 50%, var(--ghost-bg) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease infinite;
  margin-bottom: 8px;
}
.content-list.is-loading {
  display: grid;
  gap: 10px;
}
.content-list.is-loading .skeleton-row {
  height: 72px;
  border-radius: 12px;
}

/* ── Hide sync button for guests ─────────────────────── */
html:not(.has-token) #sync-moex { display: none; }

/* ── Portfolio guest empty state ──────────────────────── */
.portfolio-guest-promo {
  text-align: center;
  padding: 56px 24px;
  max-width: 560px;
  margin: 40px auto;
}
.portfolio-guest-promo .promo-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  color: var(--brand);
}
.portfolio-guest-promo h2 {
  font-size: 28px;
  margin: 0 0 10px;
}
.portfolio-guest-promo p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px;
  line-height: 1.5;
}
.portfolio-guest-promo .promo-features {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
  text-align: left;
}
.portfolio-guest-promo .promo-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ghost-bg) 50%, var(--panel));
  font-size: 14px;
}
.portfolio-guest-promo .promo-feature-icon {
  flex-shrink: 0;
  font-size: 20px;
}
.promo-cta {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── News filter chips ───────────────────────────────── */
.news-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.news-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ghost-bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s ease;
  font-family: inherit;
}
.news-filter-chip:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  color: var(--text);
}
.news-filter-chip.active {
  background: color-mix(in srgb, var(--brand) 12%, var(--ghost-bg));
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  color: var(--brand);
}

/* Dashboard widgets */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  align-items: stretch;
}
.dashboard-panel {
  margin-top: 0;
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
  height: 100%;
  padding: 16px;
}
.dashboard-panel--gainers,
.dashboard-panel--losers,
.dashboard-panel--sectors {
  grid-column: span 4;
  min-width: 0;
}
.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.dashboard-panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dashboard-panel-kicker.up {
  color: #16a34a;
  background: color-mix(in srgb, #16a34a 12%, var(--ghost-bg));
}
.dashboard-panel-kicker.down {
  color: #dc2626;
  background: color-mix(in srgb, #dc2626 12%, var(--ghost-bg));
}
.dashboard-panel h3 {
  margin: 6px 0 0;
  font-size: 20px;
}
.dashboard-panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.dashboard-panel-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--line));
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.dashboard-panel-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 44%, var(--line));
  background: color-mix(in srgb, var(--brand) 9%, var(--ghost-bg));
}
.dashboard-panel-body {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}
.dashboard-sectors-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dashboard-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.dashboard-summary-chip.up { color: #16a34a; }
.dashboard-summary-chip.down { color: #dc2626; }
.dashboard-empty-state {
  color: var(--muted);
  font-size: 13px;
}
.mover-item {
  display: grid;
  grid-template-columns: 18px 32px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--ghost-bg) 62%, var(--panel));
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.mover-item:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--brand) 7%, var(--ghost-bg));
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
}
.mover-item-skeleton,
.sector-row-skeleton {
  pointer-events: none;
}
.mover-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}
.mover-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--ghost-bg) 80%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.mover-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mover-logo-fallback {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
}
.mover-logo-skeleton {
  background: color-mix(in srgb, var(--ghost-bg) 70%, var(--panel));
}
.mover-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.mover-name {
  font-weight: 700;
  font-size: 14px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mover-meta {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mover-price {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.mover-change {
  font-size: 12px;
  font-weight: 700;
  min-width: 58px;
  text-align: right;
}
.mover-change.up { color: #16a34a; }
.mover-change.down { color: #dc2626; }
.mover-text-skeleton {
  display: inline-block;
  min-height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ghost-bg) 72%, var(--panel));
}
.mover-text-skeleton--short {
  width: 70px;
}
.sector-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--ghost-bg) 58%, var(--panel));
}
.sector-card-skeleton {
  pointer-events: none;
}
.sector-card-top,
.sector-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sector-name {
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sector-bar-track {
  height: 8px;
  background: color-mix(in srgb, var(--ghost-bg) 88%, var(--panel));
  border-radius: 999px;
  overflow: hidden;
}
.sector-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 68%, white 16%) 0%, var(--brand, #4caf50) 100%);
  border-radius: 999px;
  transition: width .3s;
}
.sector-cap {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.sector-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.sector-change {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sector-change.up { color: #16a34a; }
.sector-change.down { color: #dc2626; }
.sector-overflow-note {
  padding: 2px 2px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-panel--gainers,
  .dashboard-panel--losers {
    grid-column: auto;
  }
  .dashboard-panel--sectors {
    grid-column: 1 / -1;
  }
}
@media (max-width: 920px) {
  .dashboard-panel-head {
    flex-direction: column;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-panel--gainers,
  .dashboard-panel--losers,
  .dashboard-panel--sectors {
    grid-column: auto;
  }
  .mover-item {
    grid-template-columns: 18px 30px minmax(0, 1fr);
  }
  .mover-price,
  .mover-change {
    grid-column: 3;
    justify-self: start;
    text-align: left;
  }
  .sector-card-top,
  .sector-card-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

.hidden { display: none; }

@media (max-width: 920px) {
  :root {
    --mobile-bottom-nav-height: calc(78px + env(safe-area-inset-bottom, 0px));
  }
  .container {
    width: min(1240px, 98%);
    margin: 12px auto 26px;
    min-width: 0;
  }
  .topbar {
    padding: calc(8px + env(safe-area-inset-top, 0px) * .2) 12px 8px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .topbar-nav {
    display: none;
  }
  .topbar-dropdown-menu {
    display: none !important;
  }
  .mobile-nav-trigger {
    display: inline-flex;
  }
  .top-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
  }
  .topbar .guest-menu-wrap,
  .topbar .profile-chip {
    display: none !important;
  }
  .topbar .auth-actions {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: grid;
  }
  body {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + 18px);
  }
  .user-menu,
  .settings-menu {
    right: 0;
    max-width: min(92vw, 360px);
  }
  .market-mobile-marquee {
    display: block;
  }
  .widgets {
    display: none;
  }
  .market-panel-head,
  .market-toolbar-copy {
    align-items: flex-start;
  }
  .market-panel-actions {
    width: 100%;
    min-width: 0;
    justify-content: stretch;
    gap: 10px;
  }
  .market-panel-actions .market-search-wrap {
    flex: 1 1 100%;
    min-width: 0;
  }
  .market-panel-actions .sync-btn {
    width: 100%;
    justify-content: center;
  }
  .market-toolbar--secondary {
    padding: 12px;
  }
  .market-toolbar-summary {
    width: 100%;
  }
  .market-sector-rail {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-sector-scroll {
    display: none;
  }
  .market-sector-rail::before,
  .market-sector-rail::after {
    width: 18px;
  }
  .market-sector-rail::before {
    left: 0;
  }
  .market-sector-rail::after {
    right: 0;
  }
  .market-sector-filters {
    padding-right: 14px;
    padding-left: 8px;
    scroll-padding-inline: 8px 14px;
  }
  .dashboard-disclosure {
    margin-top: 12px;
  }
  .dashboard-disclosure-toggle {
    width: 100%;
    justify-content: center;
  }
  .market-search-input { width: 100%; }
  .market-search-wrap { flex: 1; min-width: 0; }
  .market-search-results { min-width: 0; }
  .ofz-summary-grid,
  .crypto-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #market-table-wrap,
  #ofz-table-wrap,
  #crypto-table-wrap {
    display: none;
  }
  .market-mobile-list,
  .ofz-mobile-list,
  .crypto-mobile-list {
    display: grid;
  }
  .main-market-shell {
    display: grid;
    gap: 10px;
  }
  .main-market-mobile-switch {
    display: inline-flex;
    margin-left: auto;
    max-width: min(100%, 320px);
  }
  .main-market-toggle {
    display: none;
  }
  .main-market-slider-viewport {
    overflow: hidden;
  }
  .main-market-pane > .panel {
    position: relative;
  }
  .market-panel-copy,
  .ofz-panel .panel-head > :first-child,
  .crypto-panel .panel-head > :first-child {
    max-width: none;
  }
  .market-panel-title-row {
    align-items: flex-start;
  }
  .fx-widget { height: auto; }
  .keyrate-bottom { grid-template-columns: 1fr; }
  .keyrate-next-date { font-size: 17px; }
  .topbar .settings-trigger,
  .topbar .mobile-nav-trigger,
  .topbar .user-menu-trigger {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 12px !important;
    align-self: center;
  }
  .topbar .settings-trigger .settings-icon {
    font-size: 21px !important;
  }
  .pager {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pager-summary {
    width: 100%;
    margin-left: 0;
  }
  .auth-card { width: min(320px, 92vw) !important; max-width: 320px; padding: 11px 10px 8px; border-radius: 13px; }
  .auth-title { font-size: 15px; margin-bottom: 6px; }
  .auth-form input { padding: 10px 12px; font-size: 15px; border-radius: 10px; }
  .auth-checkbox { font-size: 14px; }
  .auth-submit-btn { padding: 10px 12px; font-size: 15px; }
  .auth-switch { font-size: 14px; }
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: hidden;
  }
  .hero h1 {
    font-size: 24px;
    line-height: 1.2;
  }
  .panel {
    padding: 12px;
    border-radius: 12px;
  }
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .actions {
    width: 100%;
  }
  .news-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    margin-inline: -2px;
    padding: 2px 2px 6px;
  }
  .news-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .news-filter-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .sync-btn {
    width: 100%;
    justify-content: center;
  }
  .market-mobile-swipe-row {
    grid-template-columns: minmax(0, 1fr) minmax(132px, 44vw);
    gap: 11px;
  }
  .market-mobile-swipe-track {
    gap: 16px;
  }
  .ofz-mobile-swipe-row .market-mobile-swipe-track {
    gap: 14px;
  }
}

@media (max-width: 560px) {
  :root {
    --mobile-bottom-nav-height: calc(74px + env(safe-area-inset-bottom, 0px));
  }
  .brand {
    max-width: calc(100vw - 132px);
  }
  .brand-wordmark {
    font-size: clamp(18px, 10vw, 28px);
    letter-spacing: -.055em;
  }
  .ofz-summary-grid,
  .crypto-summary-grid {
    grid-template-columns: 1fr;
  }
  .hero p,
  .ofz-footnote,
  .crypto-footnote {
    display: none;
  }
  .market-mobile-marquee-track {
    padding-block: 9px;
    gap: 16px;
  }
  .market-mobile-marquee-item {
    font-size: 11px;
  }
  .market-mobile-marquee-value {
    font-size: 12px;
  }
  .market-mobile-swipe-row {
    grid-template-columns: minmax(0, 1fr) minmax(122px, 43vw);
    padding: 10px 11px;
  }
  .main-market-mobile-switch {
    max-width: min(100%, 292px);
  }
  .main-market-mobile-tab {
    min-width: 78px;
    min-height: 32px;
    padding-inline: 12px;
    font-size: 12px;
  }
  .bond-subtype-empty {
    padding: 14px 15px;
    border-radius: 14px;
  }
  .market-mobile-swipe-copy strong {
    font-size: 12px;
  }
  .market-mobile-swipe-copy span {
    font-size: 9px;
  }
  .market-mobile-swipe-rank {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 11px;
  }
  .market-mobile-swipe-company .asset-avatar {
    width: 20px;
    height: 20px;
  }
  .market-mobile-swipe-track {
    gap: 14px;
  }
  .ofz-mobile-swipe-row .market-mobile-swipe-track {
    gap: 12px;
  }
  .market-mobile-metric-pill strong {
    font-size: 12px;
  }
  .market-mobile-metric-pill--price strong {
    font-size: 13px;
  }
  .mobile-bottom-link {
    font-size: 10px;
  }
  .mobile-tools-sheet {
    left: 8px;
    right: 8px;
    bottom: calc(var(--mobile-bottom-nav-height) + 8px);
    padding: 10px;
  }
  .mobile-bottom-nav {
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 3px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(76px, 1.04fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .mobile-bottom-link--portfolio {
    min-height: 60px;
    border-radius: 18px;
  }
  .mobile-bottom-label {
    font-size: 8.8px;
  }
  .pager-summary {
    display: none;
  }
}

@media (max-width: 420px) {
  :root {
    --mobile-bottom-nav-height: calc(68px + env(safe-area-inset-bottom, 0px));
  }
  .market-panel-title-row {
    gap: 10px;
  }
  .main-market-mobile-switch {
    max-width: min(100%, 260px);
  }
  .main-market-mobile-tab {
    min-width: 70px;
    min-height: 30px;
    padding-inline: 10px;
    font-size: 11px;
  }
  .bond-subtype-shell {
    gap: 8px;
  }
  .bond-subtype-empty {
    padding: 13px 14px;
  }
  .market-mobile-swipe-row {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 41vw);
    gap: 9px;
    padding-inline: 10px;
  }
  .market-mobile-swipe-copy span {
    font-size: 9px;
  }
  .market-mobile-swipe-track {
    gap: 12px;
  }
  .ofz-mobile-kind {
    min-width: 34px;
    height: 22px;
    font-size: 9px;
  }
  .market-mobile-metric-pill small {
    font-size: 8px;
  }
  .market-mobile-metric-pill strong {
    font-size: 11px;
  }
  .market-mobile-metric-pill--price strong {
    font-size: 12px;
  }
  .mobile-bottom-nav {
    padding: 7px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 3px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(72px, 1.02fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .mobile-bottom-link {
    min-height: 54px;
    font-size: 9px;
  }

  .mobile-bottom-link--portfolio {
    min-height: 54px;
    padding: 7px 2px 8px;
    border-radius: 18px;
  }

  .mobile-tools-sheet {
    left: 6px;
    right: 6px;
    bottom: calc(var(--mobile-bottom-nav-height) + 8px);
    padding: 9px;
    border-radius: 20px;
  }

  .mobile-tools-sheet-head strong {
    font-size: 15px;
  }

  .mobile-tools-link {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .mobile-bottom-icon--portfolio {
    font-size: 16px;
  }

  .mobile-bottom-icon,
  .mobile-bottom-icon svg {
    width: 18px;
    height: 18px;
  }

  .mobile-bottom-icon--portfolio,
  .mobile-bottom-icon--portfolio svg {
    width: 19px;
    height: 19px;
  }

  .mobile-bottom-label {
    font-size: 8.2px;
  }

  .mobile-bottom-link--portfolio .mobile-bottom-label {
    font-size: 8.2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-drawer,
  .mobile-tools-sheet,
  .mobile-bottom-link,
  .mobile-bottom-link--compact::after,
  .mobile-bottom-link--portfolio::after,
  .market-mobile-skeleton-row::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 920px) and (max-height: 520px) and (orientation: landscape) {
  .main-market-shell {
    display: grid;
    gap: 10px;
  }

  .main-market-mobile-switch {
    margin-left: auto;
  }

  .market-panel-copy,
  .ofz-panel .panel-head > :first-child,
  .crypto-panel .panel-head > :first-child {
    max-width: none;
  }
}

/* Topbar auth controls must stay compact on all pages (override page-level .btn styles) */
.topbar .top-actions {
  gap: 10px;
}
.topbar .auth-actions {
  align-items: center;
  gap: 8px;
}
.topbar .settings-trigger {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
.topbar .settings-trigger .settings-icon {
  font-size: 23px !important;
}
.topbar .settings-trigger:hover,
.topbar .settings-trigger:focus-visible {
  background: var(--ghost-bg) !important;
  border-color: var(--line) !important;
}
.topbar .auth-actions .auth-login-btn,
.topbar .auth-actions .auth-register-btn {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
}
.topbar .auth-actions .auth-login-btn {
  min-width: 94px !important;
}
.topbar .auth-actions .auth-register-btn {
  min-width: 130px !important;
}

/* Compact auth modal (override generic modal-card styles from page CSS files) */
.modal .modal-card.auth-card {
  width: min(460px, 90vw) !important;
  max-width: 460px !important;
  padding: 14px 14px 12px !important;
  border-radius: 14px !important;
}
.modal .modal-card.auth-card .auth-title {
  font-size: 18px !important;
}
.modal .modal-card.auth-card .auth-form input {
  padding: 9px 11px !important;
  font-size: 14px !important;
}
.modal .modal-card.auth-card .auth-checkbox {
  font-size: 13px !important;
}
.modal .modal-card.auth-card .auth-form .auth-checkbox input[type="checkbox"] {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  font-size: 13px !important;
}
.modal .modal-card.auth-card .auth-submit-btn,
.modal .modal-card.auth-card .auth-social-btn {
  padding: 9px 11px !important;
  font-size: 14px !important;
}

/* ── Widget timestamp label ──────────────────────────── */
.widget-updated-at {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

.fx-head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
