/* /inzhur-miltech/assets/miltech.css
 *
 * Візуальна система взята з /aktsii-ukrainskyh-kompaniy/ — щоб сторінка не
 * виглядала з іншого сайту. Перенесено (значення один в один, префікс наш):
 *   .stocks-page   → .mt-page      контейнер 1100 / 24px, на 720px 16px
 *   .page-section  → .mt-section   білa картка #e1e5ec, radius 12, padding 24/32
 *   .hero-stocks   → .mt-hero      градієнт #1a1a2e→#16213e, radius 16, Unbounded 900
 *   типографіка    h1 2.4rem / h2 1.6rem / h3 1.25rem / p line-height 1.6
 *   .table-wrapper → .mt-tw        горизонтальний скрол таблиць
 *   .cta-button    → .mt-cta-btn   #0ea5e9, hover #0284c7
 *   .alert-warning → .mt-risk      #fef3c7 + ліва смуга #f59e0b
 *   .note-small    → .mt-note      0.85rem #64748b
 *   .faq-block     → .mt-faq       details/summary з +/− маркером
 * Шрифт Unbounded вантажить includes/header.php глобально — свого @font-face не заводимо.
 */

.mt-page {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 24px;
  box-sizing: border-box;
}
@media (max-width: 720px) { .mt-page { padding: 0 16px; margin: 12px auto; } }

.mt-section {
  background: #fff;
  border: 1px solid #e1e5ec;
  border-radius: 12px;
  padding: 24px 32px;
  margin: 16px 0;
}
@media (max-width: 720px) { .mt-section { padding: 18px 20px; border-radius: 10px; } }
.mt-section > h2:first-child { margin-top: 0; }
.mt-section > *:last-child { margin-bottom: 0; }

.mt-page h1 { font-size: 2.4rem; margin: 24px 0 16px; line-height: 1.2; }
.mt-page h2 { font-size: 1.6rem; margin: 32px 0 16px; line-height: 1.3; }
.mt-page h3 { font-size: 1.25rem; margin: 24px 0 10px; line-height: 1.3; }
.mt-page p  { margin: 0 0 12px; line-height: 1.6; }
.mt-page ul { padding-left: 24px; margin: 12px 0; }
.mt-page li { margin-bottom: 6px; line-height: 1.6; }
.mt-page a  { color: var(--acc, #0ea5e9); }

/* ── HERO ─────────────────────────────────────────────────────────────── */
.mt-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 60px 24px;
  border-radius: 16px;
  margin: 16px 0;
}
.mt-hero h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: 2.4rem;
  margin: 0 0 16px;
  line-height: 1.2;
  color: #fff;
}
.mt-hero p { font-size: 1.15rem; opacity: .92; max-width: 760px; margin: 0 0 12px; }
.mt-hero p:last-of-type { margin-bottom: 0; }
.mt-hero strong { color: #fff; }
@media (max-width: 720px) {
  .mt-hero { padding: 36px 20px; }
  .mt-hero h1 { font-size: 1.8rem; }
  .mt-hero p { font-size: 1rem; }
}

/* h1 на всю ширину, під ним два стовпці: текст ліворуч, картка праворуч.
   align-items:start обов'язковий — інакше картка розтягнеться на всю висоту
   тексту і знову виглядатиме порожньою. */
.mt-hero-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 32px; align-items: start; }
.mt-hero-text > *:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .mt-hero-grid { grid-template-columns: 1fr; gap: 20px; }
}

.mt-pricebox {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
}
.mt-pricebox-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.mt-pricebox-value { font-size: 1.7rem; font-weight: 800; line-height: 1.15; }
.mt-pricebox-date  { font-size: .82rem; opacity: .7; }

/* ── КАЛЬКУЛЯТОР ──────────────────────────────────────────────────────── */
.mt-field { max-width: 320px; }
.mt-field label { display: block; font-size: .82rem; font-weight: 700; color: #64748b; margin-bottom: 6px; }
.mt-input-wrap { position: relative; }
.mt-input-wrap input {
  width: 100%; box-sizing: border-box;
  padding: 12px 40px 12px 14px;
  font: 700 1.15rem/1.2 inherit; color: #0f172a;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
  -moz-appearance: textfield;
}
.mt-input-wrap input::-webkit-outer-spin-button,
.mt-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mt-input-wrap input:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
.mt-input-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: #64748b; pointer-events: none; }

.mt-qty {
  margin: 14px 0 0 !important; padding: 12px 16px;
  background: #f1f5f9; border-radius: 8px;
  font-size: .92rem; color: #334155;
}
.mt-qty--warn { background: #fef3c7; color: #92400e; }

/* ── ТАБЛИЦІ ──────────────────────────────────────────────────────────── */
.mt-tw { overflow-x: auto; margin: 16px 0; -webkit-overflow-scrolling: touch; }

.mt-scen, .mt-cmp { width: 100%; border-collapse: collapse; font-size: .95rem; }
.mt-scen th, .mt-scen td, .mt-cmp th, .mt-cmp td {
  padding: 12px 14px; border-bottom: 1px solid #e5e7eb; vertical-align: top;
}
.mt-scen thead th, .mt-cmp thead th {
  background: #f8fafc; font-size: .78rem; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: #64748b;
  white-space: nowrap; border-bottom: 2px solid #e5e7eb;
}
.mt-scen th, .mt-scen td { text-align: right; }
.mt-scen th:first-child, .mt-scen td:first-child { text-align: left; }
.mt-cmp th, .mt-cmp td { text-align: left; }
.mt-scen tbody tr:last-child td, .mt-scen tbody tr:last-child th,
.mt-cmp  tbody tr:last-child td, .mt-cmp  tbody tr:last-child th { border-bottom: none; }
.mt-scen tbody th, .mt-cmp tbody th { font-weight: 700; color: #0f172a; }
.mt-scen tbody th small, .mt-cmp tbody th small {
  display: block; font-weight: 400; font-size: .8rem; color: #64748b; margin-top: 3px;
}
.mt-cmp td small { display: block; font-size: .8rem; color: #64748b; margin-top: 3px; }
.mt-num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.mt-num--key { color: #0f766e; font-weight: 800; }

@media (max-width: 768px) {
  .mt-scen, .mt-scen tbody, .mt-scen tr, .mt-scen td, .mt-scen th,
  .mt-cmp,  .mt-cmp tbody,  .mt-cmp tr,  .mt-cmp td,  .mt-cmp th { display: block; }
  .mt-scen thead, .mt-cmp thead { display: none; }
  .mt-scen tbody tr, .mt-cmp tbody tr {
    border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 12px 15px; margin-bottom: 12px;
  }
  .mt-scen tbody tr:last-child, .mt-cmp tbody tr:last-child { margin-bottom: 0; }
  .mt-scen tbody th, .mt-cmp tbody th {
    padding: 0 0 9px; border-bottom: 1px solid #e5e7eb; margin-bottom: 8px; text-align: left;
  }
  .mt-scen tbody td, .mt-cmp tbody td { padding: 5px 0; border-bottom: none; }
  .mt-scen tbody td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right;
  }
  .mt-scen tbody td::before, .mt-cmp tbody td::before {
    content: attr(data-label); font-size: .82rem; font-weight: 600; color: #64748b; text-align: left;
  }
  .mt-cmp tbody td::before { content: attr(data-label) ": "; }
}

/* ── ТУЛТИП ───────────────────────────────────────────────────────────────
   Механіка з aktsii/style.css (.akt-tip): чистий CSS, data-tip, focus для
   клавіатури й тапу. Третій механізм тултипів у проєкті не заводимо. */
.mt-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  background: #e2e8f0; color: #64748b;
  border-radius: 50%; font-size: 11px; font-weight: 700;
  cursor: help; position: relative; outline: none;
  vertical-align: middle; text-transform: none; letter-spacing: 0;
}
.mt-tip:focus, .mt-tip:hover { background: #cbd5e1; color: #0f172a; }
/* position: FIXED, а не absolute — і це не стиль, а виправлення.
   Попап живе всередині .mt-tw з overflow-x:auto; будь-який overflow, крім visible,
   створює контекст обрізання, і попап зрізало зверху (а в шапці таблиці не було
   видно взагалі). Фіксований елемент не обрізається жодним предком.
   Координати й напрямок рахує placeTip() у miltech.js — CSS лише читає змінні. */
.mt-tip::after {
  content: attr(data-tip);
  position: fixed;
  left: var(--tip-left, 0);
  top: var(--tip-y, 0);
  width: var(--tip-w, 250px);
  transform: translateY(-100%);
  background: #0f172a; color: #fff;
  padding: 8px 12px; border-radius: 8px;
  font: 400 .82rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  white-space: normal; text-align: left; text-transform: none;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
/* Місця зверху немає — розкриваємо вниз від знака. */
.mt-tip--down::after { transform: none; }
.mt-tip:hover::after, .mt-tip:focus::after, .mt-tip:active::after { opacity: 1; }
/* ── БЛОК «ЗВІДКИ БЕРУТЬСЯ ЦІ ВІДСОТКИ» ───────────────────────────────── */
.mt-step { border-left: 3px solid #0ea5e9; padding: 2px 0 2px 16px; margin-bottom: 20px; }
/* Крок 3 несе головне число сторінки — підкладка й крупніший кегль, щоб він не
   губився між двома однаковими сусідами. Візуально це .page-section у мініатюрі:
   та сама рамка #e1e5ec і radius, що й у карток /aktsii-ukrainskyh-kompaniy/. */
.mt-step--key {
  background: #f0f9ff; border: 1px solid #bae6fd; border-left-width: 3px;
  border-left-color: #0ea5e9; border-radius: 10px; padding: 16px 20px;
}
.mt-step--key h3 { color: #075985; }
.mt-step-growth { margin-bottom: 0 !important; }
.mt-big { font-size: 1.45rem; font-weight: 800; color: #0f766e; line-height: 1.25; }
@media (max-width: 520px) { .mt-big { font-size: 1.25rem; } }
.mt-step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.mt-step p:last-child { margin-bottom: 0; }
.mt-step b { font-variant-numeric: tabular-nums; }

.mt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 16px; }
@media (max-width: 720px) { .mt-two { grid-template-columns: 1fr; gap: 12px; } }
.mt-two-col { background: #f8fafc; border: 1px solid #e1e5ec; border-radius: 10px; padding: 16px 18px; }
.mt-two-head { font-size: .95rem; font-weight: 700; margin: 0 0 6px !important; }
.mt-two-head b { color: #0f766e; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.mt-two-col p:last-child { margin-bottom: 0; font-size: .9rem; color: #475569; }

/* ── ГРАФІК ───────────────────────────────────────────────────────────── */
.mt-chart { position: relative; height: 340px; margin: 16px 0 0; }
@media (max-width: 720px) { .mt-chart { height: 280px; } }

/* ── ЗГОРНУТІ БЛОКИ (припущення + FAQ) ────────────────────────────────── */
.mt-details, .mt-faq details {
  border: 1px solid #e1e5ec; border-radius: 8px;
  padding: 14px 18px; margin-bottom: 10px; background: #fff;
}
.mt-details { background: #f8fafc; margin-top: 16px; }
.mt-details > summary, .mt-faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding-left: 26px; font-weight: 600; color: #0f172a;
}
.mt-details > summary::-webkit-details-marker,
.mt-faq summary::-webkit-details-marker { display: none; }
.mt-details > summary::before, .mt-faq summary::before {
  content: '+'; position: absolute; left: 0; top: -2px;
  font-size: 1.15rem; font-weight: 700; color: #0ea5e9; line-height: 1.4;
}
.mt-details[open] > summary::before, .mt-faq details[open] summary::before { content: '−'; }
.mt-details[open] > summary, .mt-faq details[open] summary { margin-bottom: 12px; }
.mt-details-body p, .mt-faq details > div > p { font-size: .92rem; color: #475569; margin-bottom: 8px; }
.mt-details-body p:last-child, .mt-faq details > div > p:last-child { margin-bottom: 0; }

/* ── РИЗИКИ ───────────────────────────────────────────────────────────── */
.mt-risk {
  background: #fef3c7; border-left: 4px solid #f59e0b;
  padding: 14px 18px; margin: 0 0 12px; border-radius: 6px;
}
.mt-risk:last-child { margin-bottom: 0; }
.mt-risk h3 { margin: 0 0 6px; font-size: 1.02rem; color: #92400e; }
.mt-risk p  { margin: 0; font-size: .93rem; color: #4b3a10; }

/* ── КОМУ ПІДХОДИТЬ ───────────────────────────────────────────────────── */
.mt-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .mt-fit { grid-template-columns: 1fr; gap: 12px; } }
.mt-fit-col { border: 1px solid #e1e5ec; border-radius: 10px; padding: 16px 20px; }
.mt-fit-col--yes { background: #f0fdf4; border-color: #bbf7d0; }
.mt-fit-col--no  { background: #fef2f2; border-color: #fecaca; }
.mt-fit-col h3 { margin: 0 0 8px; font-size: 1.02rem; }
.mt-fit-col--yes h3 { color: #15803d; }
.mt-fit-col--no  h3 { color: #b91c1c; }
.mt-fit-col ul { margin: 0; }
.mt-fit-col li { font-size: .93rem; }

/* ── CTA ──────────────────────────────────────────────────────────────── */
.mt-cta { text-align: center; margin: 0; }
.mt-cta p { font-size: .95rem; color: #475569; margin-bottom: 14px; }
.mt-cta-btn {
  display: inline-block; background: #0ea5e9; color: #fff !important;
  padding: 14px 24px; border-radius: 8px;
  text-decoration: none !important; font-weight: 600;
  transition: background .15s;
}
.mt-cta-btn:hover { background: #0284c7; }

/* ── ПРО ФОНД ─────────────────────────────────────────────────────────── */
.mt-facts { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mt-facts th, .mt-facts td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.mt-facts th { font-weight: 400; color: #64748b; width: 46%; }
.mt-facts td { font-weight: 600; }
.mt-facts tr:last-child th, .mt-facts tr:last-child td { border-bottom: none; }
@media (max-width: 560px) {
  .mt-facts th, .mt-facts td { display: block; padding: 0; }
  .mt-facts th { width: auto; padding-top: 10px; }
  .mt-facts td { padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; }
  .mt-facts tr:last-child td { border-bottom: none; }
}

/* ── ДРІБНИЦІ ─────────────────────────────────────────────────────────── */
.mt-note { font-size: .85rem; color: #64748b; }
.mt-disclaimer {
  margin-top: 16px; padding: 14px 18px;
  background: #f1f5f9; border-radius: 8px;
  font-size: .82rem; line-height: 1.6; color: #64748b;
}
