/* Методика индекса цен /ceny/metodologiya (01.11.2026): главное карточками, схема потока, пример, подробности свёрнуты.
   Только токены base.css; цвета схемы - через CSS-переменные, тёмная тема сайта подхватится сама. */

.mt-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-main { scroll-margin-top: 24px; }
.mt-sec { margin-top: 40px; }
.mt-sec > h2 { font: 600 clamp(22px, 2.2vw, 30px)/1.1 var(--display); letter-spacing: -0.025em; margin: 0 0 14px; }
.mt-sub { margin: -6px 0 14px; color: var(--muted); font-size: 15px; }

/* Главное */
.mt-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mt-card { background: var(--surface); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mt-card h3 { font: 600 17px/1.25 var(--display); letter-spacing: -0.015em; margin: 0; }
.mt-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.mt-card p b { color: var(--ink); font-weight: 650; }
.mt-ico { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-ink); }
.mt-card-warn { background: var(--wood-deep); color: var(--wood-soft); }
.mt-card-warn h3 { color: var(--surface); }
.mt-card-warn p { color: var(--wood-soft-2); }
.mt-card-warn .mt-ico { background: var(--wood-ink); color: var(--signal); }
.mt-card .mt-big { font: 600 28px/1.1 var(--display); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.mt-big small { display: block; font: 500 13.5px/1.3 var(--font); letter-spacing: 0; color: var(--muted); margin-top: 4px; }

/* Схема */
.mt-flow { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 24px; }
.mt-flow svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.mt-flow-tall { display: none !important; max-width: 420px; margin: 0 auto; }
.mt-flow figcaption { margin-top: 14px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.mt-f-lane { fill: var(--muted); font-size: 13px; font-weight: 600; }
.mt-f-t { fill: var(--ink); font-size: 15px; font-weight: 650; text-anchor: middle; }
.mt-f-s { fill: var(--ink-2); font-size: 13px; text-anchor: middle; }
.mt-f-num { fill: var(--signal); font: 600 30px var(--display); text-anchor: middle; font-variant-numeric: tabular-nums; }
.mt-f-on { fill: var(--surface); }
.mt-f-src { fill: var(--surface-2); stroke: var(--line-strong); }
.mt-f-clean { fill: var(--brand-soft); stroke: none; }
.mt-f-group { fill: var(--brand-soft-2); stroke: none; }
.mt-f-index { fill: var(--wood-deep); stroke: none; }
.mt-f-pos { fill: var(--signal-soft); stroke: var(--signal); }
.mt-f-arr { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.mt-f-dash { stroke-dasharray: 5 4; }
.mt-f-arrhead { fill: var(--muted); }

/* Пример «было -> стало» */
.mt-ex-wrap { background: var(--surface); border-radius: var(--radius); padding: 6px 20px; overflow-x: auto; }
.mt-ex { width: 100%; border-collapse: collapse; font-size: 15px; }
.mt-ex th, .mt-ex td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.mt-ex thead th { font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom-color: var(--line-strong); }
.mt-ex tbody th { font-weight: 650; color: var(--ink); white-space: nowrap; width: 1%; padding-right: 20px; }
.mt-ex td { color: var(--ink-2); }
.mt-ex tr:last-child th, .mt-ex tr:last-child td { border-bottom: 0; }
.mt-ex b, .mt-comp b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.mt-ex .num, .mt-comp .num, .mt-note .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-q { display: block; }
.mt-ex-res td, .mt-ex-res th { background: var(--brand-soft); }
.mt-ex-res th { border-radius: var(--r-xs) 0 0 var(--r-xs); padding-left: 10px; }
.mt-ex-res td:last-child { border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.mt-ex-res td:last-child b { font: 600 18px/1.2 var(--display); letter-spacing: -0.01em; }
.mt-note { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; max-width: 80ch; }

/* Подробности */
.mt-more { display: flex; flex-direction: column; gap: 8px; }
.mt-d { background: var(--surface); border-radius: var(--radius); }
.mt-d > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 14px 20px; font-weight: 650; font-size: 16px; border-radius: var(--radius); transition: background-color .15s var(--ease); }
.mt-d > summary::-webkit-details-marker { display: none; }
.mt-d > summary:hover { background: var(--surface-2); }
.mt-d > summary .ico { color: var(--muted); flex: none; transition: transform .2s var(--ease); }
.mt-d[open] > summary .ico { transform: rotate(180deg); }
.mt-d-body { padding: 0 20px 18px; max-width: 86ch; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.mt-d-body p { margin: 0 0 10px; }
.mt-d-body ul { margin: 0 0 10px; padding-left: 20px; }
.mt-d-body li { margin-bottom: 6px; }
.mt-d-body li b { color: var(--ink); }
.mt-d-body .mt-ex-wrap { padding: 0; margin: 4px 0 12px; }
.mt-d-body .mt-plain { list-style: none; padding: 0; columns: 2; column-gap: 24px; font-size: 14px; }
.mt-formula { font-family: var(--mono); font-size: 14px; color: var(--ink); background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 14px; overflow-x: auto; }
.mt-comp { width: 100%; border-collapse: collapse; font-size: 14px; }
.mt-comp th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.mt-comp td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.mt-comp td:first-child { color: var(--ink); font-weight: 600; }
.mt-comp .num { text-align: right; }
.mt-comp tfoot td { border-bottom: 0; color: var(--ink); font-weight: 600; }
.mt-ver { margin-top: 14px; }

@media (max-width: 1100px) {
  .mt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mt-flow { padding: 16px; }
  .mt-flow-wide { display: none !important; }
  .mt-flow-tall { display: block !important; }
  .mt-flow-tall .mt-f-t { font-size: 16px; }
  .mt-flow-tall .mt-f-s { font-size: 14px; }
  .mt-comp th, .mt-comp td { padding-right: 8px; }
  .mt-comp td:first-child { font-weight: 550; }
  .mt-ex-wrap { padding: 4px 16px; }
  .mt-ex thead { display: none; }
  .mt-ex, .mt-ex tbody, .mt-ex tr, .mt-ex th, .mt-ex td { display: block; width: auto; }
  .mt-ex tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .mt-ex tr:last-child { border-bottom: 0; }
  .mt-ex tbody th, .mt-ex td { padding: 2px 0; border: 0; white-space: normal; }
  .mt-ex tbody th { margin-bottom: 4px; width: auto; }
  .mt-ex td::before { content: attr(data-l) ": "; color: var(--muted); }
  .mt-ex-res { background: var(--brand-soft); border-radius: var(--r-xs); padding: 12px 10px !important; margin: 0 -10px; }
  .mt-ex-res th, .mt-ex-res td { background: none; padding-left: 0 !important; }
  .mt-d > summary { padding: 14px 16px; }
  .mt-d-body { padding: 0 16px 16px; }
  .mt-d-body .mt-plain { columns: 1; }
}
@media (max-width: 560px) {
  .mt-cards { grid-template-columns: 1fr; gap: 8px; }
  .mt-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 16px; }
  .mt-card > :not(.mt-ico):not(h3) { grid-column: 1 / -1; }
  .mt-card .mt-big { font-size: 24px; }
}
