/* ── Color vars: match landing page (dark theme in app.css) ───────────── */
:root {
  --mm-bg:          transparent;
  --mm-panel:       rgba(28,30,34,0.68);
  --mm-panel-hdr:   rgba(28,30,34,0.82);
  --mm-border:      rgba(255,255,255,0.09);
  --mm-text:        #e0e0e0;
  --mm-muted:       #888;
  --mm-good:        #3ad29f;
  --mm-bad:         #dc3545;
  --mm-accent:      #1b68ff;
  --mm-heat-pos:    rgba(58,210,159,0.15);
  --mm-heat-neg:    rgba(220,53,69,0.13);
  --mm-shadow:      0 .0838rem .67rem rgba(0,0,0,0.60);
  --mm-scroll:      rgba(255,255,255,0.22);
  --mm-scroll-hov:  rgba(255,255,255,0.35);
}
html[data-mode="light"] {
  --mm-bg:          #f4f5f7;
  --mm-panel:       #ffffff;
  --mm-panel-hdr:   rgba(27,104,255,0.07);
  --mm-border:      rgba(0,0,0,0.10);
  --mm-text:        #1a1a1a;
  --mm-muted:       #6c757d;
  --mm-good:        #20c997;
  --mm-bad:         #dc3545;
  --mm-heat-pos:    rgba(32,201,151,0.12);
  --mm-heat-neg:    rgba(220,53,69,0.10);
  --mm-shadow:      0 .0838rem .335rem rgba(0,0,0,0.10);
  --mm-scroll:      #1A2B4B;
  --mm-scroll-hov:  rgba(26,43,75,0.80);
}

/* Viewport shell: no horizontal page scroll. Vertical page scroll stays
   available so the site footer below the full-screen wrapper is reachable. */
html, body.horizontal { overflow-x: hidden; overflow-y: visible; }
body.horizontal .wrapper.d-flex.flex-column.min-vh-100 {
  overflow: hidden;
  height: 100vh !important;
  max-height: 100vh;
}
html[data-mode="dark"] body.horizontal .wrapper.d-flex.flex-column.min-vh-100 {
  background-color: #1a1d21;
  background-image: linear-gradient(rgba(26,29,33,0.93), rgba(26,29,33,0.93)),
    url("../../assets/images/cbu-bg-pic-3.2ec7ebae08c6.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}
html[data-mode="light"] body.horizontal .wrapper.d-flex.flex-column.min-vh-100 {
  background-color: #f3f4f6;
  background-image: linear-gradient(rgba(241,245,249,0.91), rgba(241,245,249,0.91)),
    url("../../assets/images/cbu-bg-pic-3.2ec7ebae08c6.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}
.mm-home-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .3769rem;
  padding: .3769rem .6281rem .3769rem;
  background: transparent;
  box-sizing: border-box;
}

/* ── 3-col row ───────────────────────────────────────────────────────── */
.mm-home-content-row {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: .5025rem;
  overflow: hidden;
}

/* ── LEFT col: compare cards ─────────────────────────────────────────── */
.mm-home-kpi-col {
  flex: 0 0 clamp(11.9344rem, 24vw, 24vw);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .2513rem;
  overflow: hidden;
}
@media (min-width: 992px) { .mm-home-kpi-col { flex: 0 0 clamp(11.9344rem, 16.08vw, 16.08vw); } }
.mm-kpi-col-title {
  font-size: .7956rem;
  font-weight: 800;
  color: #e0e0e0;
  padding: .3769rem .5863rem;
  flex-shrink: 0;
  border-radius: .3769rem;
  text-align: center;
  background: var(--mm-panel-hdr);
}
html[data-mode="light"] .mm-kpi-col-title {
  background: #1A2B4B;
  color: #ffffff;
}
.mm-kpi-scroll-outer {
  flex: 1;
  min-height: 0;
  height: 0;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  position: relative;
  isolation: isolate;
}
.mm-kpi-scroll-outer:active { cursor: grabbing; }
.mm-kpi-scroll-outer::before,
.mm-kpi-scroll-outer::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2.5125rem;
  z-index: 2;
  pointer-events: none;
}
.mm-kpi-scroll-outer::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(26,29,33,0.92) 0%, transparent 100%);
}
.mm-kpi-scroll-outer::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(26,29,33,0.92) 0%, transparent 100%);
}
html[data-mode="light"] .mm-kpi-scroll-outer::before {
  background: linear-gradient(to bottom, rgba(241,245,249,0.95) 0%, transparent 100%);
}
html[data-mode="light"] .mm-kpi-scroll-outer::after {
  background: linear-gradient(to top, rgba(241,245,249,0.95) 0%, transparent 100%);
}
.mm-kpi-scroll-inner {
  display: flex;
  flex-direction: column;
  gap: .3769rem;
}

/* ── Compare card ────────────────────────────────────────────────────── */
.mm-cmp-card {
  background: var(--mm-panel);
  border: .0419rem solid var(--mm-border);
  border-radius: .3769rem;
  padding: .5025rem .6281rem .3769rem;
  flex-shrink: 0;
  overflow: hidden;
  transition: border-color 0.2s;
  box-shadow: var(--mm-shadow);
}
.mm-cmp-card:hover { border-color: rgba(255,255,255,0.22); background: rgba(40,43,48,0.82); }
html[data-mode="light"] .mm-cmp-card:hover { border-color: rgba(27,104,255,0.4); background: #f8faff; }
.mm-cmp-title {
  font-size: .6281rem;
  font-weight: 700;
  color: var(--mm-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: .335rem;
}
.mm-cmp-asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .2513rem;
  margin-bottom: .1256rem;
}
.mm-cmp-asset-left {
  display: flex;
  align-items: center;
  gap: .2931rem;
  min-width: 0;
  flex: 1;
}
.mm-cmp-dot {
  width: .4188rem;
  height: .4188rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.mm-cmp-name {
  font-size: .67rem;
  font-weight: 600;
  color: var(--mm-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mm-cmp-badge {
  font-size: .5863rem;
  font-weight: 700;
  padding: .0838rem .335rem;
  border-radius: .4188rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.mm-badge-up   { background: rgba(58,210,159,0.18); color: #3ad29f; }
.mm-badge-down { background: rgba(220,53,69,0.18);  color: #e05261; }
.mm-badge-flat { background: rgba(136,136,136,0.15); color: var(--mm-muted); }
html[data-mode="light"] .mm-badge-up   { background: rgba(32,201,151,0.15); color: #20c997; }
html[data-mode="light"] .mm-badge-down { background: rgba(220,53,69,0.13);  color: #dc3545; }

.mm-cmp-spark {
  height: 2.7638rem;
  margin-top: .2513rem;
  overflow: hidden;
}
.mm-cmp-spark svg { display: block; width: 100%; height: 100%; }

/* ── CENTER — single scroll, 2-col grid ──────────────────────────────── */
.mm-home-carousels-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--mm-scroll) transparent;
  border-radius: .5863rem;
}
.mm-home-carousels-col::before,
.mm-home-carousels-col::after {
  content: "";
  display: block;
  position: sticky;
  left: 0; right: 0;
  height: 1.8425rem;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.mm-home-carousels-col::before {
  top: 0;
  margin-bottom: -1.8425rem;
  background: linear-gradient(to bottom, rgba(26,29,33,0.92) 0%, transparent 100%);
}
.mm-home-carousels-col::after {
  bottom: 0;
  margin-top: -1.8425rem;
  background: linear-gradient(to top, rgba(26,29,33,0.92) 0%, transparent 100%);
}
html[data-mode="light"] .mm-home-carousels-col::before {
  background: linear-gradient(to bottom, rgba(241,245,249,0.95) 0%, transparent 100%);
}
html[data-mode="light"] .mm-home-carousels-col::after {
  background: linear-gradient(to top, rgba(241,245,249,0.95) 0%, transparent 100%);
}
.mm-home-carousels-col.cc-fade-top::before    { opacity: 1; }
.mm-home-carousels-col.cc-fade-bottom::after  { opacity: 1; }
.mm-home-carousels-col::-webkit-scrollbar { width: .2094rem; }
.mm-home-carousels-col::-webkit-scrollbar-track { background: transparent; }
.mm-home-carousels-col::-webkit-scrollbar-thumb { background: var(--mm-scroll); border-radius: .1256rem; }
.mm-home-carousels-col::-webkit-scrollbar-thumb:hover { background: var(--mm-scroll-hov); }
.mm-center-all {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: calc(33.3333vh - 2.9313rem);
  gap: .5025rem;
  padding-bottom: .2513rem;
}
.mm-center-col::-webkit-scrollbar-thumb { background: var(--mm-border); border-radius: .1256rem; }

/* ── Section block ────────────────────────────────────────────────────── */
.mm-section-block {
  background: var(--mm-panel);
  border: .0419rem solid var(--mm-border);
  border-radius: .5863rem;
  overflow: hidden;
  box-shadow: var(--mm-shadow);
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mm-section-scroll-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.mm-section-scroll {
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--mm-scroll) transparent;
}
.mm-section-scroll::-webkit-scrollbar { width: .1675rem; }
.mm-section-scroll::-webkit-scrollbar-thumb { background: var(--mm-scroll); border-radius: .1256rem; }
.mm-section-scroll::-webkit-scrollbar-thumb:hover { background: var(--mm-scroll-hov); }
.mm-section-block:hover { border-color: rgba(76,175,80,0.35); }
html[data-mode="light"] .mm-section-block:hover { border-color: rgba(26,43,75,0.25); }

.mm-section-hdr {
  display: flex;
  align-items: center;
  gap: .4188rem;
  padding: .4188rem .6281rem .3769rem;
  background: var(--mm-panel-hdr);
  border-bottom: .0419rem solid var(--mm-border);
}
html[data-mode="light"] .mm-section-hdr {
  background: #1A2B4B;
  border-bottom-color: rgba(255,255,255,0.10);
}
.mm-section-icon {
  width: 1.1725rem;
  height: 1.1725rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .6281rem;
  color: var(--mm-muted);
  flex-shrink: 0;
}
.mm-section-name {
  font-size: .7956rem;
  font-weight: 800;
  color: var(--mm-text);
  flex: 1;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}
html[data-mode="light"] .mm-section-name { color: #ffffff; }
html[data-mode="light"] .mm-section-icon { color: rgba(255,255,255,0.70); }
html[data-mode="light"] .mm-expand-btn   { color: rgba(255,255,255,0.60); }
html[data-mode="light"] .mm-expand-btn:hover { color: #fff; background: rgba(255,255,255,0.10); }
.mm-expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mm-muted);
  font-size: .7956rem;
  padding: .1256rem .335rem;
  border-radius: .2513rem;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.mm-expand-btn:hover { color: var(--mm-text); background: rgba(255,255,255,0.06); }

/* ── Market table ─────────────────────────────────────────────────────── */
.mm-market-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.mm-market-table thead th {
  text-align: center;
  padding: .335rem .5025rem;
  font-size: .6281rem;
  font-weight: 600;
  color: var(--mm-muted);
  border-bottom: .0419rem solid var(--mm-border);
  white-space: nowrap;
  background: var(--mm-panel);
  letter-spacing: 0.04em;
}
.mm-market-table thead th:first-child { width: 6.7rem; text-align: left; }
.mm-market-table tbody td {
  padding: .2931rem .5025rem;
  border-bottom: .0419rem solid var(--mm-border);
  vertical-align: middle;
  white-space: nowrap;
  font-size: .7538rem;
  color: var(--mm-text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.mm-market-table tbody td:first-child { white-space: normal; }
.mm-row-link:hover td { background: rgba(76,175,80,0.08); }
html[data-mode="light"] .mm-row-link:hover td { background: rgba(26,43,75,0.05); }
.mm-market-table tbody tr:last-child td { border-bottom: none; }
.mm-market-table tbody tr:hover td { background: rgba(76,175,80,0.08); }
html[data-mode="light"] .mm-market-table tbody tr:hover td { background: rgba(26,43,75,0.05); }
.mm-th-r { text-align: center; }
.mm-asset-name { font-weight: 600; font-size: .7956rem; color: var(--mm-text); }
.mm-asset-name a { color: inherit; text-decoration: none; transition: color 0.15s; }
.mm-asset-name a:hover { color: var(--mm-accent); }
.mm-asset-unit { font-size: .67rem; color: var(--mm-muted); margin-top: .0419rem; }
.mm-price-cell { font-variant-numeric: tabular-nums; text-align: center; font-size: .7956rem; }

.mm-pct-up   { color: var(--mm-good); }
.mm-pct-down { color: var(--mm-bad); }
.mm-pct-flat { color: var(--mm-muted); }
.mm-pct-null { color: var(--mm-muted); opacity: 0.5; }
.mm-heat-pos { background: var(--mm-heat-pos); }
.mm-heat-neg { background: var(--mm-heat-neg); }
.mm-pbadge {
  display: inline-flex; align-items: center; gap: .0838rem;
  font-size: .6281rem; font-weight: 700;
  padding: .0838rem .2931rem; border-radius: .2513rem;
  border: .0419rem solid; white-space: nowrap;
}
.mm-pbadge-up { color: #3ad29f; border-color: rgba(58,210,159,0.45); background: rgba(58,210,159,0.10); }
.mm-pbadge-dn { color: #e05261; border-color: rgba(220,53,69,0.40);  background: rgba(220,53,69,0.10); }
.mm-pbadge-fl { color: var(--mm-muted); border-color: rgba(136,136,136,0.30); background: rgba(136,136,136,0.08); }
html[data-mode="light"] .mm-pbadge-up { color: #20c997; border-color: rgba(32,201,151,0.50); background: rgba(32,201,151,0.10); }
html[data-mode="light"] .mm-pbadge-dn { color: #dc3545; border-color: rgba(220,53,69,0.40);  background: rgba(220,53,69,0.08); }
.mm-date-cell { font-size: .6281rem; color: var(--mm-muted); text-align: center; font-variant-numeric: tabular-nums; }

/* ── RIGHT col: news digest ──────────────────────────────────────────── */
.mm-home-news-col {
  flex: 0 0 clamp(19.2625rem, 36vw, 36vw);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .2513rem;
}
@media (min-width: 992px) { .mm-home-news-col { flex: 0 0 clamp(19.2625rem, 24.12vw, 24.12vw); } }
.mm-news-panel {
  flex: 1;
  min-height: 0;
  background: var(--mm-panel);
  border: .0419rem solid var(--mm-border);
  border-radius: .3769rem;
  box-shadow: var(--mm-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mm-news-hdr {
  padding: .3769rem .5863rem;
  border-bottom: .0419rem solid var(--mm-border);
  font-size: .7956rem;
  font-weight: 800;
  color: var(--mm-text);
  flex-shrink: 0;
  background: var(--mm-panel-hdr);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4188rem;
}
html[data-mode="light"] .mm-news-hdr {
  background: #1A2B4B;
  border-bottom-color: rgba(255,255,255,0.10);
  color: #ffffff;
}
html[data-mode="light"] .mm-dig-btn { color: rgba(255,255,255,0.65); border-color: rgba(255,255,255,0.20); }
html[data-mode="light"] .mm-dig-btn:hover { background: rgba(255,255,255,0.10); color: #fff; }
.mm-dig-actions { display: flex; gap: .2094rem; }
.mm-dig-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1306rem; height: 1.1306rem;
  background: transparent;
  border: .0419rem solid var(--mm-border);
  border-radius: .2094rem;
  color: var(--mm-muted);
  font-size: .4606rem;
  cursor: pointer;
  transition: all .14s;
}
.mm-dig-btn:hover { background: rgba(255,255,255,.06); color: var(--mm-text); }
html[data-mode="light"] .mm-dig-btn:hover { background: rgba(0,0,0,.05); }

/* viewport */
.mm-dig-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  --dig-bg: var(--mm-panel);
}
html[data-mode="light"] .mm-dig-viewport { --dig-bg: #fff; }
.mm-dig-viewport::before,
.mm-dig-viewport::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 26%;
  min-height: 2.0938rem;
  max-height: 3.7688rem;
  z-index: 2;
  pointer-events: none;
}
.mm-dig-viewport::before {
  top: 0;
  background: linear-gradient(to bottom, var(--dig-bg) 0%, transparent 100%);
}
.mm-dig-viewport::after {
  bottom: 0;
  background: linear-gradient(to top, var(--dig-bg) 0%, transparent 100%);
}

/* list & items */
.mm-dig-list {
  padding: 0; margin: 0;
  transition: transform 0.55s ease;
}
.mm-dig-item {
  height: 5.025rem;
  display: flex;
  align-items: center;
  gap: .4188rem;
  font-size: .8794rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--mm-muted);
  transition: all 0.4s ease;
  padding: 0 .4188rem;
  box-sizing: border-box;
  overflow: hidden;
}
.mm-dig-icon {
  flex-shrink: 0;
  width: 1.1725rem; height: 1.1725rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7538rem;
  transition: transform .4s;
}
.mm-dig-item { color: #94a3b8; }
.mm-dig-item.up   .mm-dig-icon, .mm-dig-item.up   .mm-hl { color: #4ade80; }
.mm-dig-item.down .mm-dig-icon, .mm-dig-item.down .mm-hl { color: #f87171; }
.mm-hl { font-weight: 700; }
.mm-dig-item:hover { background: rgba(76,175,80,0.07); color: #e2e8f0; cursor: pointer; }
.mm-dig-item.active {
  background: rgba(76,175,80,0.12);
  box-shadow: inset .1256rem 0 0 #4caf50;
  border-radius: .1675rem;
  color: #ffffff;
}
.mm-dig-item.active.up   .mm-dig-icon, .mm-dig-item.active.up   .mm-hl { color: #4ade80; }
.mm-dig-item.active.down .mm-dig-icon, .mm-dig-item.active.down .mm-hl { color: #f87171; }
.mm-dig-item.active .mm-dig-icon { transform: scale(1.15); }

html[data-mode="light"] .mm-dig-item { color: #475569; }
html[data-mode="light"] .mm-dig-item.up   .mm-dig-icon,
html[data-mode="light"] .mm-dig-item.up   .mm-hl { color: #16a34a; }
html[data-mode="light"] .mm-dig-item.down .mm-dig-icon,
html[data-mode="light"] .mm-dig-item.down .mm-hl { color: #dc2626; }
html[data-mode="light"] .mm-dig-item:hover { background: rgba(26,43,75,0.05); color: #1f1f1f; }
html[data-mode="light"] .mm-dig-item.active {
  background: rgba(26,43,75,0.08);
  box-shadow: inset .1256rem 0 0 #1A2B4B;
  color: #1f1f1f;
}
html[data-mode="light"] .mm-dig-item.active.up   .mm-dig-icon,
html[data-mode="light"] .mm-dig-item.active.up   .mm-hl { color: #16a34a; }
html[data-mode="light"] .mm-dig-item.active.down .mm-dig-icon,
html[data-mode="light"] .mm-dig-item.active.down .mm-hl { color: #dc2626; }

/* ── Responsive: mobile ───────────────────────────────────────────────── */
@media (min-width: 901px) and (max-width: 1200px) {
  /* tablet — same vertical layout as mobile */
  html, body.horizontal { overflow: auto; }
  body.horizontal .wrapper.d-flex.flex-column.min-vh-100 {
    overflow: auto;
    height: auto !important;
    max-height: none;
  }

  .mm-home-main {
    height: auto;
    overflow: visible;
    flex-direction: column;
    padding: .4188rem .67rem .8375rem;
    gap: .5025rem;
  }

  .mm-home-content-row {
    flex-direction: column;
    overflow: visible;
    gap: .5025rem;
  }

  /* KPI horizontal scroll */
  .mm-home-kpi-col {
    display: flex;
    flex: none;
    width: 100%;
    flex-direction: column;
    overflow: hidden;
    gap: .2513rem;
  }
  .mm-kpi-scroll-outer {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: default;
    padding-bottom: .2513rem;
    scrollbar-width: thin;
    scrollbar-color: var(--mm-scroll) transparent;
  }
  .mm-kpi-scroll-outer::before,
  .mm-kpi-scroll-outer::after { display: none; }
  .mm-kpi-scroll-inner {
    display: flex;
    flex-direction: row;
    gap: .5025rem;
    width: max-content;
    padding: .0838rem .0838rem .1675rem;
    transform: none !important;
  }
  .mm-cmp-card { width: 10.8875rem; flex-shrink: 0; }

  /* center grid: 2 columns on tablet */
  .mm-home-carousels-col {
    flex: none;
    overflow: visible;
    height: auto;
    min-height: 0;
  }
  .mm-center-all {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: .5025rem;
  }
  .mm-section-block { height: auto; min-height: 0; }
  .mm-section-scroll { max-height: 13.4rem; overflow-y: auto; }

  /* news */
  .mm-home-news-col {
    display: flex;
    flex: none;
    width: 100%;
    height: 17.5875rem;
    min-height: 0;
  }
  .mm-news-panel { width: 100%; }
  .mm-dig-item { height: 3.685rem; font-size: .7956rem; }
}

@media (max-width: 900px) {
  /* unlock scroll */
  html, body.horizontal { overflow: auto; }
  body.horizontal .wrapper.d-flex.flex-column.min-vh-100 {
    overflow: auto;
    height: auto !important;
    max-height: none;
  }

  /* shell — vertical flow, full scroll */
  .mm-home-main {
    height: auto;
    overflow: visible;
    flex-direction: column;
    padding: .335rem .4188rem .67rem;
    gap: .4188rem;
  }

  /* row becomes column */
  .mm-home-content-row {
    flex-direction: column;
    overflow: visible;
    gap: .4188rem;
  }

  /* KPI strip: horizontal scroll at top */
  .mm-home-kpi-col {
    display: flex;
    flex: none;
    width: 100%;
    flex-direction: column;
    overflow: hidden;
    gap: .1675rem;
  }
  .mm-kpi-scroll-outer {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: default;
    padding-bottom: .2513rem;
    scrollbar-width: thin;
    scrollbar-color: var(--mm-scroll) transparent;
  }
  .mm-kpi-scroll-outer::before,
  .mm-kpi-scroll-outer::after { display: none; }
  .mm-kpi-scroll-inner {
    display: flex;
    flex-direction: row;
    gap: .4188rem;
    width: max-content;
    padding: .0838rem .0838rem .1675rem;
    transform: none !important;
  }
  .mm-cmp-card {
    width: 9.6313rem;
    flex-shrink: 0;
  }

  /* center: single column, no fixed height rows */
  .mm-home-carousels-col {
    flex: none;
    overflow: visible;
    height: auto;
    min-height: 0;
  }
  .mm-center-all {
    grid-template-columns: 1fr 1fr;   /* tablets: two columns */
    grid-auto-rows: auto;
    gap: .4188rem;
  }
  .mm-section-block {
    height: auto;
    min-height: 0;
  }
  .mm-section-scroll {
    max-height: 11.725rem;
    overflow-y: auto;
  }

  /* news — compact strip below cards */
  .mm-home-news-col {
    display: flex;
    flex: none;
    width: 100%;
    height: 16.75rem;
    min-height: 0;
  }
  .mm-news-panel {
    width: 100%;
  }
  .mm-dig-item {
    height: 3.35rem;
    font-size: .7119rem;
  }
}

/* ── Skeleton ─────────────────────────────────────────────────────────── */
@keyframes mm-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.mm-skel {
  display: inline-block;
  background: linear-gradient(90deg,rgba(255,255,255,0.04) 0%,rgba(255,255,255,0.10) 45%,rgba(255,255,255,0.04) 90%);
  background-size: 200% 100%;
  animation: mm-shimmer 1.5s ease-in-out infinite;
  border-radius: .1675rem;
}
html[data-mode="light"] .mm-skel {
  background: linear-gradient(90deg,rgba(0,0,0,0.06) 0%,rgba(0,0,0,0.12) 45%,rgba(0,0,0,0.06) 90%);
  background-size: 200% 100%;
}

/* ── Fullscreen modal ──────────────────────────────────────────────────── */
.mm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(.1675rem);
  align-items: center;
  justify-content: center;
}
.mm-overlay.open { display: flex; }
.mm-modal {
  background: #1c1e22;
  border: .0419rem solid var(--mm-border);
  border-radius: .5025rem;
  max-width: 61.1375rem;
  width: calc(100vw - 2.01rem);
  max-height: calc(100vh - 3.35rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 .8375rem 2.5125rem rgba(0,0,0,0.6);
}
html[data-mode="light"] .mm-modal { background: #fff; }
.mm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1306rem 1.675rem;
  border-bottom: .0419rem solid var(--mm-border);
  font-weight: 800;
  font-size: 1.2981rem;
  color: var(--mm-text);
  flex-shrink: 0;
}
.mm-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mm-muted);
  font-size: 1.8844rem;
  line-height: 1;
  padding: .1675rem .5444rem;
  border-radius: .335rem;
  transition: color 0.15s;
}
.mm-modal-close:hover { color: var(--mm-text); }
.mm-modal-body { overflow: auto; flex: 1; }
.mm-modal-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 43.7594rem; }
.mm-modal-table thead th {
  padding: .5444rem .9213rem;
  font-size: .9213rem;
  font-weight: 600;
  color: var(--mm-muted);
  border-bottom: .0419rem solid var(--mm-border);
  position: sticky;
  top: 0;
  background: #1c1e22;
  z-index: 2;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
html[data-mode="light"] .mm-modal-table thead th { background: #f9f9f9; }
.mm-modal-table tbody td {
  padding: .4188rem .9213rem;
  border-bottom: .0419rem solid var(--mm-border);
  font-size: 1.1306rem;
  color: var(--mm-text);
  white-space: nowrap;
  vertical-align: middle;
}
.mm-modal-table tbody tr:last-child td { border-bottom: none; }
.mm-modal-table tbody tr:hover td { background: rgba(27,104,255,0.06); }

/* phones: one column of sections */
@media (max-width: 767.98px) {
  .mm-center-all { grid-template-columns: 1fr; }
}


/* ── moved from inline style attributes ── */
.mm-skel.mm-skel-name { width:70%; height:.4188rem; }
.mm-skel.mm-skel-dot { width:.2931rem; height:.2931rem; border-radius:50%; }
.mm-skel.mm-skel-title { width:75%; height:.4606rem; }
.mm-skel.mm-skel-pill { width:1.675rem; height:.5863rem; border-radius:.335rem; }
.mm-skel.mm-skel-spark { width:100%; height:1.8425rem; display:block; border-radius:.1675rem; }
.mm-section-block.is-inert { pointer-events:none; }
.mm-skel.mm-skel-icon { width:.9213rem; height:.9213rem; border-radius:50%; flex-shrink:0; }
.mm-skel.mm-skel-head { width:55%; height:.5863rem; }
.mm-section-scroll.is-skeleton { padding:.335rem .5863rem; display:flex; flex-direction:column; gap:.3769rem; }
.mm-skel-row { display:flex; align-items:center; gap:.4188rem; }
.mm-skel.mm-skel-fill { flex:1; height:.5025rem; border-radius:.1675rem; }
.mm-skel.mm-skel-num { width:2.1775rem; height:.5025rem; border-radius:.1675rem; }
.mm-skel.mm-skel-num-sm { width:1.8425rem; height:.5025rem; border-radius:.1675rem; }
.mm-skel.mm-skel-num-xs { width:1.675rem; height:.5025rem; border-radius:.1675rem; }
.mm-skel.mm-skel-avatar { width:1.005rem; height:1.005rem; border-radius:50%; display:block; flex-shrink:0; }
.mm-skel-text { flex:1; }
.mm-skel.mm-skel-line { width:88%; height:.7956rem; display:block; margin-bottom:.4188rem; border-radius:.2094rem; }
.mm-skel.mm-skel-line-short { height:.7956rem; display:block; border-radius:.2094rem; }
.mm-modal-table thead th.mm-th-first { padding-left:.67rem; }
.mm-modal-table thead th.mm-th-last { padding-right:.67rem; }


/* ── page end: the same gap above the site footer on every page ── */
.mm-home-main { padding-bottom: .4375rem; }
