/* Сравнение продуктов: страница = набор компактных таблиц, по одной на מסלול */
.msi-funds { margin: 1.8em 0; font-family: var(--ms-font, 'Heebo', Arial, sans-serif); }
@media (min-width: 1100px) {
  .msi-funds { width: min(1240px, calc(100vw - 48px)); margin-inline: calc(50% - min(620px, 50vw - 24px)); }
}

/* панель фильтров — липкая, потому что таблиц много и прокрутка длинная */
.msi-funds-bar { position: sticky; top: 0; z-index: 5; background: #fff; padding: 12px 0 6px; }
.msi-funds-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; padding: 14px 16px; background: var(--ms-bg, #F6F8FB); border: 1px solid var(--ms-border, #E4E8EF); border-radius: 14px; }
.msi-funds-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--ms-navy, #0B1F3A); }
.msi-funds-field input, .msi-funds-field select { padding: 9px 10px; border: 1px solid #CBD5E1; border-radius: 8px; font: inherit; font-weight: 400; background: #fff; }
.msi-funds-field input:focus, .msi-funds-field select:focus { outline: 3px solid rgba(245,179,1,.4); outline-offset: 1px; border-color: var(--ms-navy, #0B1F3A); }
.msi-f-reset { align-self: end; padding: 10px 14px; border: 1px solid var(--ms-border, #E4E8EF); background: #fff; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.msi-f-reset:hover { background: var(--ms-amber, #F5B301); border-color: var(--ms-amber, #F5B301); }
.msi-funds-meta { margin: 8px 2px 0; font-size: 12.5px; color: var(--ms-muted, #5B6778); }
.msi-funds-meta .msi-f-count { font-weight: 800; color: var(--ms-navy, #0B1F3A); }

/* секция одного маслуля */
.msi-fsec { margin: 26px 0 30px; }
.msi-fsec h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--ms-navy, #0B1F3A); }
.msi-fsec-sub { margin: 0 0 10px; font-size: 13px; color: var(--ms-muted, #5B6778); }
.msi-fsec-scroll { overflow-x: auto; border: 1px solid var(--ms-border, #E4E8EF); border-radius: 12px; }
.msi-fsec table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.msi-fsec th { background: var(--ms-navy, #0B1F3A); color: #fff; font-size: 12.5px; font-weight: 700; padding: 9px 8px; text-align: center; white-space: nowrap; }
.msi-fsec th.c-name { text-align: right; }
.msi-fsec td { padding: 9px 8px; text-align: center; border-top: 1px solid var(--ms-border, #E4E8EF); font-variant-numeric: tabular-nums; }
.msi-fsec tbody tr:nth-child(even) { background: #FAFBFD; }
.msi-fsec tbody tr:hover { background: #FFF9E8; }
.msi-fsec tbody tr:first-child td { background: #F3FBF7; }
.msi-fsec .c-rank { width: 34px; color: var(--ms-muted, #5B6778); font-weight: 700; }
.msi-fsec .c-name { text-align: right; min-width: 230px; }
.msi-fsec .c-name strong { display: block; font-weight: 700; color: var(--ms-navy, #0B1F3A); line-height: 1.3; }
.msi-fsec .c-name span { display: block; font-size: 12px; color: var(--ms-muted, #5B6778); margin-top: 1px; }
.msi-fsec .c-main { font-weight: 800; }
.msi-fsec .up { color: #0A7A54; font-weight: 700; }
.msi-fsec .down { color: #C2412A; font-weight: 700; }
.msi-na { color: #B6BECD; }
.msi-more { margin-top: 8px; padding: 8px 14px; border: 1px solid var(--ms-border, #E4E8EF); background: #fff; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ms-navy-2, #14305A); cursor: pointer; }
.msi-more:hover { border-color: var(--ms-amber, #F5B301); background: #FFFBEF; }
.msi-funds-note { margin-top: 14px; font-size: 12.5px; line-height: 1.6; color: var(--ms-muted, #5B6778); }
.msi-funds-empty { padding: 20px; background: var(--ms-bg, #F6F8FB); border-radius: 12px; }

@media (max-width: 900px) { .msi-fsec .c-hide { display: none; } }
/* телефон: таблица из девяти колонок нечитаема — каждая строка становится карточкой */
@media (max-width: 700px) {
  .msi-funds-bar { position: static; }
  .msi-fsec h3 { font-size: 17px; }
  .msi-fsec-scroll { overflow: visible; border: 0; border-radius: 0; }
  .msi-fsec table, .msi-fsec tbody, .msi-fsec tr, .msi-fsec td { display: block; width: auto; }
  .msi-fsec thead { display: none; }
  .msi-fsec tbody tr { position: relative; border: 1px solid var(--ms-border, #E4E8EF); border-radius: 12px; padding: 12px 14px 8px; margin-bottom: 10px; background: #fff !important; }
  .msi-fsec tbody tr:first-child { border-color: #9FD9BF; background: #F7FDFA !important; }
  .msi-fsec td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: baseline; text-align: left; }
  .msi-fsec td[data-t]::before { content: attr(data-t); color: var(--ms-muted, #5B6778); font-size: 12.5px; font-weight: 700; }
  .msi-fsec .c-rank { position: absolute; left: 12px; top: 10px; padding: 0; font-size: 12px; }
  .msi-fsec .c-name { display: block; text-align: right; min-width: 0; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--ms-border, #E4E8EF); }
  .msi-fsec .c-hide { display: flex; }
  .msi-more { width: 100%; }
}
