#fundsView.hidden { display: none !important; }
#fundsView { background: var(--bg); }

.funds-view .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.funds-page {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0 auto;
  padding: 26px clamp(12px, 1.5vw, 24px) 116px;
  color: var(--text-primary);
}

.funds-page-header {
  margin-bottom: 20px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--panel-border);
}

.funds-page-header h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.funds-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.funds-page-header p { max-width: 850px; margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--text-secondary); }
.funds-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.funds-sort-heading { display: inline-flex; width: 100%; min-height: 28px; align-items: center; padding: 4px 3px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; line-height: inherit; text-align: inherit; cursor: pointer; white-space: normal; }
.funds-sort-heading:hover { background: var(--hover-bg); color: var(--brand); }
.funds-sort-heading.is-active { color: var(--brand); }
.funds-sort-heading:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.funds-identity small { font-size: 10px; color: var(--text-muted); }
.funds-data-warning { color: var(--accent-red); font-size: 12px; }
.funds-chart-container text { font: 10px sans-serif; fill: var(--text-secondary); }
.funds-chart-container text.funds-chart-end-label { fill: #fff; }
.funds-chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 12px; }
.funds-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.funds-chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.funds-chart-legend small, .funds-allocation-date { color: var(--text-muted); }
.funds-comparison-chart { margin: 18px 0; }
@media (max-width: 620px) {
  .funds-state-card button { min-height: 44px; }
  .funds-page-header { flex-direction: column; }
  .funds-header-actions { width: 100%; }
}

.funds-type-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--panel-border);
  border-radius: 15px;
  background: color-mix(in srgb, var(--panel) 78%, var(--bg));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--panel) 75%, transparent);
  overflow-x: auto;
}

.funds-type-tab {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.funds-type-tab:hover { color: var(--text-primary); background: var(--hover-bg); }
.funds-type-tab.is-active { border-color: var(--brand-soft-border); background: var(--panel); color: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.07); }

.funds-toolbar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(170px, .8fr));
  gap: 9px;
  margin-bottom: 14px;
}

.funds-search {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text-muted);
}

.funds-search:focus-within,
.funds-filter:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.funds-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 13px; }
.funds-search input::placeholder { color: var(--text-muted); }

.funds-filter {
  position: relative;
  min-width: 0;
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  background: var(--panel);
}

.funds-filter[open] { z-index: 5; border-color: var(--brand); }
.funds-filter-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px;
  min-height: 46px;
  box-sizing: border-box;
  padding: 5px 12px;
  cursor: pointer;
  list-style: none;
}
.funds-filter-trigger::-webkit-details-marker,
.funds-filter-trigger::marker { display: none; content: none; }
.funds-filter-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 9px; }
.funds-filter-label { color: var(--text-muted); font-size: 10px; font-weight: 650; line-height: 12px; }
.funds-filter-value { overflow: hidden; color: var(--text-primary); font-size: 12px; font-weight: 600; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
.funds-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 190px);
  max-height: min(310px, 50vh);
  box-sizing: border-box;
  padding: 5px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}
.funds-filter-menu button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.funds-filter-menu button:hover,
.funds-filter-menu button:focus-visible { outline: 0; background: var(--hover-bg); }
.funds-filter-menu button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }

.funds-results-header {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 3px 9px;
  color: var(--text-muted);
  font-size: 11px;
}

.funds-results-header > span strong { color: var(--text-primary); }
.funds-data-meta { display: flex; align-items: center; justify-content: flex-end; gap: 13px; color: var(--text-muted); font-size: 10px; }
.funds-data-meta strong { color: var(--text-secondary); }
.funds-demo-badge { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; border: 1px solid rgba(213,169,59,.32); border-radius: 999px; background: rgba(213,169,59,.1); color: #d5a93b; font-weight: 750; letter-spacing: .025em; }

.funds-infinite { min-height: 1px; padding: 12px 0 28px; }

.funds-table-wrap { border: 1px solid var(--panel-border); border-radius: 14px; background: var(--panel); overflow-x: auto; overflow-y: visible; }
.funds-table { width: 100%; min-width: 1360px; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.funds-col-fund { width: 190px; }
.funds-col-category { width: 170px; }
.funds-col-founder { width: 145px; }
.funds-col-risk { width: 60px; }
.funds-col-price { width: 76px; }
.funds-col-size { width: 84px; }
.funds-col-return { width: 65px; }
.funds-table thead { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--panel) 88%, var(--bg)); }
.funds-table th { padding: 14px 8px; color: var(--text-secondary); font-size: 11px; font-weight: 750; letter-spacing: .01em; line-height: 1.3; text-align: left; text-transform: none; white-space: normal; }
.funds-table td { padding: 12px 8px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); vertical-align: middle; }
.funds-table th:nth-child(n+4),
.funds-table td:nth-child(n+4) { text-align: center; }
.funds-table th:nth-child(n+4) .funds-sort-heading { justify-content: center; }
.funds-table th[aria-sort="ascending"],
.funds-table th[aria-sort="descending"] { box-shadow: inset 0 -2px 0 var(--brand); }
.funds-table tbody tr { transition: background-color .15s ease; }
.funds-table tbody tr:hover { background: var(--hover-bg); }
.funds-table .is-numeric { color: var(--text-primary); font-variant-numeric: tabular-nums; font-weight: 650; text-align: center; white-space: nowrap; }
.funds-clickable-row { cursor: pointer; }
.funds-clickable-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--brand-soft); }

.funds-identity { display: flex; width: 100%; min-width: 0; max-width: 190px; padding: 0; flex-direction: column; gap: 3px; color: inherit; text-align: left; }
.funds-identity strong { color: var(--text-primary); font-size: 13px; letter-spacing: .025em; }
.funds-identity span { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.funds-category-cell { overflow-wrap: anywhere; line-height: 1.35; white-space: normal; }
.funds-founder { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funds-detail-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid var(--panel-border); border-radius: 8px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.funds-detail-btn:hover { border-color: var(--brand-soft-border); background: var(--brand-soft); color: var(--brand); }

.fund-risk { display: inline-flex; min-width: 40px; min-height: 27px; align-items: baseline; justify-content: center; gap: 2px; border-radius: 8px; background: var(--tag-bg); color: var(--text-primary); }
.fund-risk strong { font-size: 13px; }
.fund-risk span { color: var(--text-muted); font-size: 9px; }
.fund-risk--1, .fund-risk--2 { background: rgba(16,185,129,.11); color: var(--accent-green); }
.fund-risk--3, .fund-risk--4 { background: rgba(213,169,59,.12); color: #d5a93b; }
.fund-risk--5, .fund-risk--6, .fund-risk--7 { background: rgba(239,68,68,.11); color: var(--accent-red); }
.is-positive { color: var(--accent-green) !important; }
.is-negative { color: var(--accent-red) !important; }
.is-missing, .funds-missing { color: var(--text-muted) !important; font-weight: 450 !important; }

.funds-empty { padding: 54px 16px !important; text-align: center; }
.funds-empty strong, .funds-empty span { display: block; }
.funds-empty strong { color: var(--text-primary); font-size: 15px; }
.funds-empty span { margin-top: 6px; color: var(--text-muted); }

.funds-selected-chips { display: flex; gap: 5px; overflow-x: auto; }
.funds-selected-chips button { padding: 5px 7px; border: 1px solid var(--panel-border); border-radius: 7px; background: var(--tag-bg); color: var(--text-primary); font: inherit; font-size: 10px; cursor: pointer; }
.funds-primary-btn { min-height: 38px; padding: 0 14px; border: 1px solid var(--brand); border-radius: 9px; background: var(--brand); color: white; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.funds-primary-btn:hover { background: var(--brand-deep); }
.funds-primary-btn:disabled { opacity: .45; cursor: not-allowed; }

.funds-ask-bar {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 14px;
  left: 20px;
  display: grid;
  width: min(760px, calc(100% - 40px));
  min-height: 54px;
  margin: auto;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  padding: 7px 8px 7px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 14px 38px rgba(0,0,0,.2);
  backdrop-filter: blur(16px);
}
.funds-ask-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.funds-ask-icon svg { width: 18px; height: 18px; }
.funds-ask-bar input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 13px; }
.funds-ask-bar input::placeholder { color: var(--text-muted); }

.funds-compare-page { max-width: none; }
.funds-compare-periods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.funds-performance-card .funds-compare-periods { margin-top: 12px; }
.funds-compare-periods button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.funds-compare-periods button:hover { color: var(--text-primary); background: var(--hover-bg); }
.funds-compare-periods button.is-active { background: var(--tag-bg); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--panel-border); }
.funds-comparison-chart .funds-performance-chart { height: min(360px, 42vw); margin-top: 8px; }
.funds-compare-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin: 16px 0 18px;
}
.funds-compare-slot, .funds-compare-search-slot, .funds-compare-add-new {
  position: relative;
  display: grid;
  min-width: 0;
  width: 100%;
  min-height: 64px;
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  align-content: center;
  gap: 2px;
}
.funds-compare-slot { border-top: 3px solid var(--slot-color, var(--brand)); }
.funds-compare-slot-index { color: var(--text-muted); font-size: 10px; font-weight: 650; }
.funds-compare-slot strong { color: var(--text-primary); font-size: 14px; letter-spacing: .02em; }
.funds-compare-slot small { max-width: 100%; overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.funds-compare-slot button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.funds-compare-slot button:hover { background: var(--hover-bg); color: var(--accent-red); }
.funds-compare-search-slot { padding-right: 14px; }
.funds-compare-search-slot input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 13px; }
.funds-compare-suggest { position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; width: min(360px, 70vw); max-height: 280px; overflow: auto; padding: 6px; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.funds-compare-suggest button { display: grid; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.funds-compare-suggest button:hover, .funds-compare-suggest button:focus-visible { background: var(--hover-bg); outline: 0; }
.funds-compare-suggest strong { font-size: 12px; }
.funds-compare-suggest span { color: var(--text-secondary); font-size: 11px; }
.funds-compare-suggest-empty { padding: 10px; color: var(--text-muted); font-size: 12px; }
.funds-compare-add-new { place-items: center; padding: 10px 16px; color: var(--brand); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.funds-compare-add-new:hover { border-color: var(--brand); background: var(--brand-soft); }

.funds-subpage { max-width: 1280px; }
.funds-back { display: inline-flex; min-height: 35px; align-items: center; gap: 7px; margin-bottom: 16px; padding: 0 10px; border: 1px solid var(--panel-border); border-radius: 9px; background: var(--panel); color: var(--text-secondary); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.funds-back:hover { color: var(--brand); border-color: var(--brand-soft-border); }
.fund-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 24px; border: 1px solid var(--panel-border); border-radius: 17px; background: var(--panel); }
.fund-detail-hero h1 { max-width: 760px; margin: 10px 0 7px; font-size: clamp(23px, 3vw, 34px); line-height: 1.2; letter-spacing: -.03em; }
.fund-detail-hero p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.funds-code-chip { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; border: 1px solid var(--brand-soft-border); border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.fund-detail-actions { display: flex; align-items: center; gap: 9px; }
.funds-subpage > .fund-detail > .funds-data-meta,
.fund-comparison > .funds-data-meta { margin: 11px 3px 16px; }

.fund-detail-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 13px 0; }
.fund-detail-kpis article { display: flex; min-height: 84px; padding: 14px; flex-direction: column; justify-content: center; border: 1px solid var(--panel-border); border-radius: 13px; background: var(--panel); }
.fund-detail-kpis span { color: var(--text-muted); font-size: 10px; }
.fund-detail-kpis strong { margin-top: 7px; font-size: 17px; }
.fund-detail-kpis small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }

.fund-detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 12px; }
.funds-section-card { border: 1px solid var(--panel-border); border-radius: 15px; background: var(--panel); padding: 18px; }
.funds-section-card h2 { margin: 0; font-size: 15px; }
.funds-returns-card { grid-column: 1 / -1; }
.funds-return-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.funds-return-grid > div { display: flex; min-height: 58px; padding: 10px; flex-direction: column; justify-content: center; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--tag-bg); }
.funds-return-grid span { color: var(--text-muted); font-size: 9px; }
.funds-return-grid strong { margin-top: 6px; font-size: 14px; }
.funds-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.funds-section-heading p { margin: 5px 0 0; color: var(--text-muted); font-size: 10px; }
.funds-section-heading > span { padding: 5px 7px; border-radius: 7px; background: var(--tag-bg); color: var(--text-muted); font-size: 9px; white-space: nowrap; }
.funds-performance-chart { display: block; width: 100%; height: 220px; margin-top: 16px; }
.funds-performance-chart text { font: 10px sans-serif; fill: var(--text-secondary); }
.funds-chart-axis { stroke: var(--panel-border); stroke-width: 1; }
.funds-chart-zero { stroke: var(--text-muted); stroke-width: 1.15; }
.funds-chart-empty { display: grid; min-height: 160px; place-items: center; color: var(--text-muted); font-size: 11px; }
.funds-allocation-bar { display: flex; height: 15px; margin: 20px 0 16px; border-radius: 999px; overflow: hidden; }
.funds-allocation-bar span { min-width: 2px; }
.funds-allocation-legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.funds-allocation-legend li { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 10px; }
.funds-allocation-legend li > span { width: 9px; height: 9px; border-radius: 3px; }
.funds-allocation-legend strong { font-weight: 550; }
.funds-allocation-legend b { color: var(--text-primary); font-variant-numeric: tabular-nums; }

.funds-comparison-wrap { border: 1px solid var(--panel-border); border-radius: 15px; background: var(--panel); overflow: auto; }
.funds-comparison-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.funds-comparison-table th, .funds-comparison-table td { min-width: 0; padding: 13px; border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.funds-comparison-table tr:last-child th, .funds-comparison-table tr:last-child td { border-bottom: 0; }
.funds-comparison-table th:first-child,
.funds-comparison-table td:first-child { width: 140px; }
.funds-comparison-table th:first-child { position: sticky; left: 0; z-index: 2; background: color-mix(in srgb, var(--panel) 93%, var(--bg)); color: var(--text-muted); font-size: 10px; }
.funds-comparison-table thead th { background: color-mix(in srgb, var(--panel) 88%, var(--bg)); border-top: 3px solid var(--slot-color, transparent); }
.funds-comparison-table thead th:first-child { border-top-color: transparent; }
.funds-comparison-table thead th > div { position: relative; display: flex; flex-direction: column; gap: 5px; padding-right: 24px; }
.funds-comparison-table thead strong { color: var(--brand); font-size: 14px; }
.funds-comparison-table thead span { display: -webkit-box; overflow: hidden; color: var(--text-secondary); font-size: 10px; font-weight: 500; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.funds-comparison-table thead button { position: absolute; top: -5px; right: -5px; width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--text-muted); font-size: 17px; cursor: pointer; }
.funds-comparison-table thead button:hover { background: var(--hover-bg); color: var(--accent-red); }
.funds-compare-footnote { margin: 11px 3px 0; color: var(--text-muted); font-size: 10px; }

.funds-state { display: grid; place-items: center; }
.funds-state-card { width: min(440px, calc(100% - 24px)); box-sizing: border-box; padding: 28px; border: 1px solid var(--panel-border); border-radius: 16px; background: var(--panel); text-align: center; }
.funds-state-card h1 { margin: 8px 0; font-size: 22px; }
.funds-state-card p { margin: 0 0 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.funds-state-card button { min-height: 38px; padding: 0 14px; border: 1px solid var(--brand); border-radius: 9px; background: var(--brand); color: white; cursor: pointer; }
.funds-state-icon { color: var(--brand); font-size: 30px; animation: funds-spin 1s linear infinite; }
@keyframes funds-spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .funds-toolbar { grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 1fr)); }
  .funds-search { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .funds-page { padding: 20px 13px 30px; }
  .funds-toolbar { grid-template-columns: 1fr 1fr; }
  .funds-search { grid-column: 1 / -1; }
  .funds-results-header { align-items: flex-start; flex-direction: column; }
  .funds-data-meta { justify-content: flex-start; flex-wrap: wrap; }
  .fund-detail-kpis { grid-template-columns: 1fr 1fr; }
  .fund-detail-grid { grid-template-columns: 1fr; }
  .funds-performance-card, .funds-allocation-card { grid-column: 1; }
  .funds-return-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .funds-filter-menu { right: 0; left: 0; width: 100%; }
  .funds-type-tabs { scroll-snap-type: x proximity; }
  .funds-type-tabs { display: flex; }
  .funds-type-tab { min-width: 145px; scroll-snap-align: start; }
  .funds-toolbar { grid-template-columns: 1fr; }
  .funds-search { grid-column: auto; }
  .funds-table colgroup { display: none; }
  .funds-table { min-width: 0; }
  .funds-table thead { display: none; }
  .funds-table tbody { display: grid; gap: 10px; padding: 10px; }
  .funds-table tr { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); }
  .funds-table td { display: flex; padding: 0; border: 0; align-items: center; justify-content: space-between; gap: 12px; text-align: right; }
  .funds-table td:nth-child(n), .funds-table .is-numeric { text-align: right; }
  .funds-table td::before { color: var(--text-muted); content: attr(data-label); font-size: 9px; text-align: left; text-transform: uppercase; }
  .funds-table td:first-child { grid-column: 1 / -1; }
  .funds-table td:first-child::before { display: none; }
  .funds-table td:first-child { justify-content: flex-start; }
  .funds-table td:not(:first-child) { grid-column: 1 / -1; padding-top: 7px; border-top: 1px solid var(--border-subtle); }
  .funds-identity { min-width: 0; max-width: 100%; }
  .funds-founder { max-width: 210px; }
  .funds-ask-bar { right: 8px; bottom: 8px; left: 8px; width: auto; }
  .funds-compare-add { grid-template-columns: 1fr; }
  .funds-compare-submit { width: 100%; justify-content: center; }
  .fund-detail-hero { flex-direction: column; }
  .fund-detail-actions { width: 100%; justify-content: space-between; }
  .fund-detail-kpis { grid-template-columns: 1fr; }
  .funds-return-grid { grid-template-columns: 1fr 1fr; }
  .funds-section-heading { flex-direction: column; }
}

:root[data-theme="light"] .funds-demo-badge,
:root[data-theme="light"] .fund-risk--3,
:root[data-theme="light"] .fund-risk--4 { color: #946200; }
