/* index.css */

.container {
  width: var(--page-content-width, 90%);
  max-width: none;
  margin: 0 auto;
  padding: 10px 16px;
  flex: 1;
}

.container--narrow { max-width: none; }

.site-header {
  padding: 12px 16px;
  background: rgba(31,45,86,0.95);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  max-width: none;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: .2px; white-space: nowrap; }
.nav-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-link { font-size: 14px; color: #c0cde3; padding: 6px 10px; border-radius: 8px; border: 1px solid transparent; transition: .2s; }
.nav-link:hover { color: #fff; border-color: var(--border); background: rgba(255,255,255,0.03); }
.user-box { display: grid; gap: 4px; justify-items: end; }
.user-greet { display: inline-flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.welcome-label { opacity: 0.9; font-size: 13px; color: #d5e2ff; }
.user-name { font-size: 13px; font-weight: 800; color: #fff; letter-spacing: 0.2px; }
.logout-link { font-size: 12px; color: #fff; text-decoration: underline; text-underline-offset: 3px; opacity: 0.95; }
.logout-link:hover { opacity: 0.8; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr; align-items: start; }
  .header-left { flex-wrap: wrap; }
  .nav-main { order: 2; width: 100%; gap: 8px; }
  .user-box { order: 3; justify-items: start; }
}
@media (max-width: 480px) {
  .welcome-label { display: none; }
  .nav-main { gap: 6px; }
  .nav-link { padding: 6px 8px; font-size: 13px; }
}

h1 { margin: 0; font-size: 2.2rem; }
h2 { margin: 0; }
.subhead { color: var(--muted); margin: 6px 0 24px; font-size: 0.95rem; }
.label { font-weight: 700; font-size: 14px; margin-bottom: 6px; display: block; }
.small { font-size: 15px; line-height: 1.5; }
.meta { font-size: 12px; color: var(--muted); }

.title-with-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-top: 20px;
}
@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* step down gracefully */
@media (max-width: 1100px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.category-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: center;
  justify-content: center;
  height: 120px;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99,102,241,0.7);
  box-shadow: 0 24px 48px rgba(15,23,42,0.7);
}

.launcher-section {
  padding-top: 56px;
}

.launcher-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.launcher-subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.launcher-card {
  min-height: 180px;
  height: auto;
  align-items: flex-start;
  text-align: left;
  padding: 20px;
}

.launcher-card-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .launcher-grid {
    grid-template-columns: 1fr;
  }
}

.category-desc {
  color: var(--muted);
}

.category-cta {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #c7d2fe;
}

.card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .2s ease;
  height: 475px;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(99,102,241,0.7);
  box-shadow: 0 24px 48px rgba(15,23,42,0.7);
}

.category-grid .asset-name { font-weight: 700; font-size: 14px; letter-spacing: 0.4px; margin-bottom: 0px; }

.asset-name { font-weight: 700; font-size: 18px; letter-spacing: 0.5px; margin-bottom: 5px; }
.run-date { font-size: 11px; color: var(--muted); }
.hr { border: none; border-top: 1px solid rgba(255, 255, 255, 0.15); width: 100%; }

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
}
.badge.long { color: #1f7a34; border: 1px solid #1f7a34; }
.badge.neutral { color: #ffffff; border: 1px solid #ffffff; }
.badge.short { color: #b91c1c; border: 1px solid #b91c1c; }

.direction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  position: relative;
}

.conviction-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.conviction-label {
  font-size: 12px;
  color: #e8eeff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  white-space: nowrap;
}
.conviction-label strong { font-weight: 800; }
.conviction-label.long { border: 1px solid #1f7a34; }
.conviction-label.neutral { border: 1px solid #ffffff; }
.conviction-label.short { border: 1px solid #b91c1c; }

.info-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  background: transparent;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}

.info-btn:hover { background: rgba(255,255,255,0.08); }

.info-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 16px 32px rgba(0,0,0,0.35);
  display: none;
  z-index: 9999;
  text-align: left;
}

@media (max-width: 1080px) {
  .info-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
    top: auto;
    /*
    top: calc(env(safe-area-inset-top) + 12px);
    bottom: auto;
    */
    max-height: 60vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}


.info-popover.open { display: block; }

.popover-block { margin-bottom: 10px; }
.popover-block:last-child { margin-bottom: 0; }
.popover-heading { font-weight: 800; margin-bottom: 4px; color: #fff; }
.popover-text { color: #d9e3ff; }
.popover-list { margin: 6px 0 0; padding-left: 16px; color: #d9e3ff; }
.popover-list li { margin: 4px 0; }

.mini-divider { height: 1px; width: 100%; background: rgba(255,255,255,0.10); border-radius: 999px; margin: 10px 0 6px; }
.confidence-wrap { margin-top: 10px; }
.bar-stack { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.bar-row { display: grid; grid-template-columns: 72px 1fr 48px; align-items: center; gap: 8px; }
.bar-left { font-size: 12px; color: #d9e3ff; opacity: 0.95; }
.bar-right { font-size: 12px; text-align: right; color: #d9e3ff; }
.bar-svg { height: 10px; width: 100%; }
.track { fill: rgba(255,255,255,0.06); stroke: rgba(9,32,61,0.8); }
.fill  { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); }
.bar--green { fill: #1f7a34; }
.bar--white  { fill: #ffffff; }
.bar--red   { fill: #b91c1c; }
.bar-svg .fill {
  transition: width 0.8s ease;
}
.stacked-bar .seg {
  width: 0;
  transition: width 0.8s ease;
}
.bar-percentages .pct span {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.bar-percentages.show-labels .pct span {
  opacity: 1;
}
.bar-stack .bar-row .bar-right {
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.bar-values-visible .bar-stack .bar-row .bar-right {
  opacity: 1;
}

.news-list { margin: 6px 0; padding-left: 18px; list-style: disc; color: var(--text); }

.news-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 15px;
  margin-top: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 15px;
  margin-bottom: 15px;
  min-height: 150px;
}

.news-list { flex: 1; overflow: hidden; }

.card .btn { margin-top: auto; align-self: flex-start; }

.perf-link { text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; }

.perf-link:hover { box-shadow: 0 0 0 1px rgba(99,102,241,0.30) inset; }

.stacked-bar {
  display: flex;
  width: 100%;
  height: 15px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 4px rgba(0,0,0,0.3) inset;
}
.stacked-bar--compact { margin-bottom: 10px; }

.stacked-bar .seg { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; height: 100%; }
.stacked-bar .seg-green { background: #1f7a34; }
.stacked-bar .seg-white { background: #ffffff; }
.stacked-bar .seg-red { background: #b91c1c; }

.seg-label--top { position: relative; top: -18px; font-size: 11px; }

@media (max-width: 720px) {
  .conviction-label { padding: 6px 8px; font-size: 12px; }
  .bar-row { grid-template-columns: 64px 1fr 44px; }
}
@media (max-width: 600px) {
  .card { height: auto; }
}

/* Header */

.asset_class_landing_header {
  text-align: center;
}

.asset_class_landing_header .title-with-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.asset_class_landing_header .heatmap-info-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.asset_class_landing_header .heatmap-info-wrap .info-popover {
  right: auto;
  left: 0;
  text-align: left;
}

.asset_class_landing_header .heatmap-info-wrap .info-popover {
  width: 420px;
  max-width: 90vw;
}

@media (max-width: 480px) {
  .asset_class_landing_header .heatmap-info-wrap .info-popover {
    width: 320px;
    max-width: 90vw;
  }
}

.asset_class_header {
  margin-top:20px;
  margin-bottom:10px;
}

.detail-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-header .title-with-filter h2 {
  font-size: 1.6rem;
  line-height: 1.3;
}

.heatmap-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  line-height: 1;
  color: #6b7280;
}

.heatmap-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #ffffff;
}

.heatmap-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  background: transparent;
}

.heatmap-legend-swatch.long {
  background: #1f7a34;
}
.heatmap-legend-swatch.neutral {
  background: rgba(255,255,255,0.48);
}
.heatmap-legend-swatch.short {
  background: #b91c1c;
}

.heatmap-card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: visible;
  margin: 20px 0px;
  padding: 14px 14px 12px;
  position: relative;
  z-index: 1;
}

.heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intel-upgrade-banner {
  margin: 16px 0 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  background: linear-gradient(135deg, rgba(12, 28, 49, 0.98), rgba(18, 45, 73, 0.98) 58%, rgba(20, 52, 84, 0.98));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intel-upgrade-copy {
  font-size: 13px;
  line-height: 1.5;
  color: #dbeafe;
}

.intel-upgrade-copy strong {
  color: #f8fafc;
}

.intel-upgrade-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.intel-upgrade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.intel-upgrade-btn.is-login {
  color: #e2e8f0;
  background: rgba(30, 58, 95, 0.95);
  border-color: rgba(96, 165, 250, 0.55);
}

.intel-upgrade-btn.is-login:hover {
  background: rgba(37, 70, 111, 0.95);
}

.intel-upgrade-btn.is-trial {
  color: #0f172a;
  background: #fbbf24;
  border-color: #fbbf24;
}

.intel-upgrade-btn.is-trial:hover {
  background: #f59e0b;
}

.module-upgrade-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(219, 234, 254, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.module-upgrade-hint a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 700;
}

.module-upgrade-hint a:last-of-type {
  color: #fbbf24;
}

.module-upgrade-hint a:hover {
  text-decoration: underline;
}

.module-upgrade-hint span {
  color: rgba(148, 163, 184, 0.95);
}

.intel-module-lock {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(251, 191, 36, 0.65);
  background: rgba(30, 41, 59, 0.92);
  color: #fbbf24;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.heatmap-card.has-module-controls .heatmap-header-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}

.heatmap-card.has-module-controls .heatmap-header-right .intel-module-lock {
  position: relative;
  top: auto;
  right: auto;
  flex-shrink: 0;
}

.panel-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.heatmap-info-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.home-heatmap {
  width: 100%;
  height: 400px;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
}

.heatmap-footer {
  display: flex;
  gap: 12px;
  margin: 10px 0px 10px 0px;
}

.heatmap-legend-label {
  font-size: 12px;
  line-height: 1;
  color: #9ca3af;
  white-space: nowrap;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  line-height: 1;
  color: #6b7280;
}

.heatmap-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #ffffff;
}

.heatmap-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  background: transparent;
}

@media (max-width: 640px) {
  .intel-upgrade-banner {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .intel-upgrade-copy {
    font-size: 12px;
  }

  .intel-upgrade-btn {
    font-size: 10px;
    padding: 6px 10px;
  }

  .module-upgrade-hint {
    font-size: 11px;
    gap: 6px;
  }

  .intel-module-lock {
    width: 26px;
    height: 26px;
    top: 10px;
    right: 10px;
    font-size: 13px;
  }

  .heatmap-card.has-module-controls .heatmap-header-right {
    gap: 8px;
  }

  .heatmap-card.has-module-controls .heatmap-header-right .intel-module-lock {
    position: relative;
    top: auto;
    right: auto;
  }

  .heatmap-card {
    padding: 12px 12px 10px;
    border-radius: 14px;
  }

  .home-heatmap {
    height: 320px;
    border-radius: 12px;
  }

  .heatmap-footer {
    gap: 10px;
  }
}

.asset-class-grid .card {
  height: auto;
}

.asset-class-grid .asset-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-class-grid .ae-chart-btn {
  padding: 6px 8px;
  min-width: unset;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.asset-class-grid .ae-chart-icon {
  vertical-align: -2px;
}

.asset-class-grid .news-section {
  flex: 0 0 auto;
  min-height: 0;
}

.asset-class-grid .card .btn {
  margin-top: 0;
  align-self: auto;
}

.asset-class-grid .news-expander {
  margin-top: 8px;
}

.asset-class-grid .news-expander summary.label {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  user-select: none;
  font-weight: 600;
  margin-bottom: 0;
}

.asset-class-grid .news-expander summary::-webkit-details-marker {
  display: none;
}

.asset-class-grid .news-expander .kmd-label::after {
  content: "▾";
  display: inline-block;
  margin-left: 8px;
  opacity: 0.9;
  font-size: 1.15em;
  line-height: 1;
  transform: translateY(-1px);
}

.asset-class-grid .news-expander[open] .kmd-label::after {
  content: "▴";
}

.asset-class-grid .news-expander .news-list {
  margin-top: 8px;
  max-height: 96px;
  overflow: hidden;
  position: relative;
}

.asset-class-grid .news-expander .news-list::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background: linear-gradient(to bottom, rgba(23,27,53,0), var(--card));
  pointer-events: none;
}

.asset-class-grid .news-expander[open] .news-list {
  max-height: none;
  overflow: visible;
}

.asset-class-grid .news-expander[open] .news-list::after {
  display: none;
}

.asset-class-grid .card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}

.asset-class-grid .card-actions .btn {
  flex: 1 1 0;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  justify-content: center;
  margin-top: 0;
}

/* Distinct hues for each button */
.asset-class-grid .btn-intel {
  background: rgba(70, 130, 255, 0.18);
  border: 1px solid rgba(70, 130, 255, 0.35);
}

.asset-class-grid .btn-quant {
  background: rgba(140, 90, 255, 0.18);
  border: 1px solid rgba(140, 90, 255, 0.35);
}

.asset-class-grid .btn-intel:hover,
.asset-class-grid .btn-intel:focus {
  background: rgba(70, 130, 255, 0.26);
  border-color: rgba(70, 130, 255, 0.55);
}

.asset-class-grid .btn-quant:hover,
.asset-class-grid .btn-quant:focus {
  background: rgba(140, 90, 255, 0.26);
  border-color: rgba(140, 90, 255, 0.55);
}

.heatmap-card .heatmap-header{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.heatmap-card .heatmap-header-left{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.heatmap-card .heatmap-title-row{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.panel-subtitle{
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: rgba(255,255,255,0.72);
}

.heatmap-rotate-btn{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.heatmap-rotate-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.45);
}

.heatmap-rotate-icon{
  width: 18px;
  height: 18px;
  display: block;
}

.back-row-right{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Gear button */
.filter-btn--gear{
  padding: 6px 10px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.filter-btn--gear:hover,
.filter-btn--gear:focus-visible{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.26);
  outline: none;
}

.filter-btn--gear .gear-icon{
  width: 18px;
  height: 18px;
}

#assetFilterOverlay.overlay-modal--filter-backdrop{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.60);
}
#assetFilterOverlay[hidden] { display: none !important; }

#assetFilterOverlay .overlay-modal--filter{
  max-width: 840px;
  width: calc(100% - 32px);
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.40);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.10);
}

#assetFilterOverlay .overlay-modal--filter-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#assetFilterOverlay .overlay-modal--filter-title{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

#assetFilterOverlay .overlay-modal--filter-subtitle{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
}

#assetFilterOverlay .overlay-modal--filter-close{
  appearance:none;
  border:0;
  background:transparent;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:6px 10px;
  border-radius:10px;
  color: inherit;
}

#assetFilterOverlay .overlay-modal--filter-close:hover{
  background: rgba(255,255,255,0.06);
}

#assetFilterOverlay .overlay-modal--filter-body{
  padding: 0px 16px;
}

#assetFilterOverlay .overlay-modal--filter-footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
  padding: 14px 16px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Prevent background scroll while open */
body.overlay-modal--filter-open{
  overflow:hidden;
}

.ae-filter-section{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0px;
}

.ae-filter-section-title{
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-bottom: 2px;
}

.ae-filter-check{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}

.ae-filter-check input{
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.ae-filter-actions-row{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

.ae-filter-asset-list{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 6px;
}

@media (max-width: 700px){
  .ae-filter-asset-list{
    grid-template-columns: 1fr;
  }
}

.ae-filter-check--asset{
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.ae-filter-check--asset:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
}

.filter-save-btn{
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.filter-save-btn:hover{
  background: var(--primary-hover);
}

/* -----------------------------
   Sankey styling (index.css)
   ----------------------------- */

.sankey-wrap {
  border-radius: 14px;
  overflow: hidden;
}

/* Links */
.sankey-links .sankey-link {
  transition: stroke 120ms ease, stroke-opacity 120ms ease, filter 120ms ease;
}

.sankey-links .sankey-link.is-dim {
  stroke-opacity: 0.12 !important;
}

.sankey-links .sankey-link.is-hover {
  stroke: rgba(255,255,255,0.82) !important;
  stroke-opacity: 1 !important;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.18));
}

/* Nodes */
.sankey-node .sankey-node-rect {
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease, stroke 120ms ease;
  transform-origin: center;
}

.sankey-node.is-hover .sankey-node-rect {
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
  stroke: rgba(255,255,255,0.55);
}

.sankey-node .sankey-node-label {
  user-select: none;
  pointer-events: none; /* prevents label stealing hover */
}

/* Tooltip */
.sankey-tooltip {
  position: absolute;
  display: none;
  z-index: 20;
  min-width: 220px;
  max-width: 360px;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(10, 12, 16, 0.92);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.40);

  color: rgba(255,255,255,0.92);
  font-size: 12px;
  line-height: 1.35;

  pointer-events: none; /* tooltip doesn't interfere */
  backdrop-filter: blur(6px);
}

.sankey-tip-title {
  font-weight: 750;
  font-size: 13px;
  margin-bottom: 6px;
}

.sankey-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0;
}

.sankey-tip-row span {
  color: rgba(255,255,255,0.65);
}

.sankey-tip-sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.78);
  white-space: pre-wrap;
}
