/* Мини Апп (app-t.me) — тема из макета 12.10.2026. Тёмная по умолчанию, светлая: html[data-theme="light"] */
:root{--ma-bg:#0e1621;--ma-surface:#17212b;--ma-surface2:#1f2c3a;--ma-text:#f5f7fa;--ma-muted:#8fa1b3;--ma-accent:#2aabee;--ma-accent2:#1c64d6;--ma-yellow:#ffd43b;--ma-green:#4fce5d;--ma-red:#ff6b6b;--ma-line:#22303e}
html[data-theme="light"]{--ma-bg:#f1f3f6;--ma-surface:#fff;--ma-surface2:#eef2f6;--ma-text:#0e1621;--ma-muted:#6b7a89;--ma-line:#e2e7ed}
html{--bs-body-bg:var(--ma-bg);--bs-body-color:var(--ma-text);--bs-link-color:var(--ma-accent);--bs-link-color-rgb:42,171,238;--bs-link-hover-color:#6ac6f5;--bs-secondary-color:var(--ma-muted);--bs-border-color:var(--ma-line)}
body{background:var(--ma-bg);color:var(--ma-text)}
#sidebar.bg-dark{background:var(--ma-surface)!important;color:var(--ma-text)!important}
#sidebar .text-light,.logo-panel a.text-light{color:var(--ma-text)!important}
.leftMenu li a{border-radius:10px;color:var(--ma-text)}
.leftMenu li a:hover,.leftMenu li.superActive{background-color:var(--ma-surface2)}
.text-light{color:var(--ma-text)!important}.text-secondary,.text-muted{color:var(--ma-muted)!important}
.simplesearch-search-form .search{background:var(--ma-bg)!important;border-color:var(--ma-line)!important;color:var(--ma-text)!important;border-radius:12px}
.btn-primary{--bs-btn-bg:var(--ma-accent2);--bs-btn-border-color:var(--ma-accent2);--bs-btn-hover-bg:var(--ma-accent);--bs-btn-hover-border-color:var(--ma-accent);background-image:linear-gradient(135deg,var(--ma-accent),var(--ma-accent2));border:0}
.btn-outline-primary{--bs-btn-color:var(--ma-accent);--bs-btn-border-color:var(--ma-line);--bs-btn-hover-bg:var(--ma-surface2);--bs-btn-hover-color:var(--ma-accent);--bs-btn-hover-border-color:var(--ma-line)}
.aiItem,.aiSingle .card,.aiSingle .list-group-item,.category-filter,.blogItem,.blogArticle,.blogMain,.descriptionCat,.lastAIs tr,.lastAIs tr td{background:var(--ma-surface)!important;color:var(--ma-text)}
.descriptionCat{border-radius:18px}
.aiItem .base,.aiItem .roof,.catField{background:var(--ma-surface2)}
.breadcrumb-item,.crumbs{background:transparent!important}
.firstcard .card::before,.additional::before{display:none}
.firstcard .card-header,.firstcard .list-group-item,.lastAIs tr,.aiSingle .list-group-item{border-bottom:1px solid var(--ma-line)}
.app-new-section{background:var(--ma-surface)!important}
.app-new-section .list-group-item{background:var(--ma-surface2)!important}
.app-new-section .list-group-item .fw-semibold{color:var(--ma-text)!important}
.logo-panel-fixed{background:color-mix(in srgb,var(--ma-surface) 80%,transparent);border-color:var(--ma-line)}
footer .red{background:linear-gradient(135deg,#123a63,#0e1621)}
html[data-theme="light"] footer .red{background:linear-gradient(135deg,#d8ecfa,#f1f3f6)}
html[data-theme="light"] footer .text-white,html[data-theme="light"] footer p{color:var(--ma-text)!important}
footer .blob{display:none}
.aiItemTop{border-color:var(--ma-accent)!important}.recommendLabel{background:var(--ma-accent2)}
/* строка приложения (списки) */
.ma-row{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--ma-surface);border-radius:16px;height:100%;position:relative}
.ma-row:hover{background:var(--ma-surface2)}
.ma-row .ma-ic{width:52px;height:52px;border-radius:14px;object-fit:cover;flex:none;background:var(--ma-surface2)}
.ma-row .ma-t{flex:1;min-width:0}
.ma-row .ma-t a.ma-name{display:block;font-weight:700;font-size:15.5px;color:var(--ma-text);text-decoration:none}
.ma-row .ma-t a.ma-name::after{content:"";position:absolute;inset:0}
.ma-row .ma-d{display:block;font-size:13px;color:var(--ma-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ma-meta{display:flex;gap:6px;align-items:center;margin-top:4px;font-size:12px;color:var(--ma-muted);white-space:nowrap;flex-wrap:wrap}
.ma-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:var(--ma-muted)}
.ma-dot.alive{background:var(--ma-green)}.ma-dot.missing{background:var(--ma-red)}.ma-dot.quiet{background:var(--ma-yellow)}
.ma-tag{font-size:11px;padding:2px 7px;border-radius:6px;background:rgba(255,212,59,.16);color:#e0b400;text-decoration:none}
html[data-theme="light"] .ma-tag{color:#9a7a00}
.ma-open{flex:none;position:relative;z-index:2;background:var(--ma-surface2);color:var(--ma-accent);font-weight:700;font-size:13px;padding:7px 14px;border-radius:16px;text-decoration:none}
.ma-row:hover .ma-open{background:var(--ma-bg)}
.ma-cat{font-size:11.5px;color:var(--ma-muted)}
.ma-h{font-size:1.25rem;font-weight:800;margin:18px 0 10px}
/* карточка */
.ma-hero{display:flex;gap:16px;align-items:center;padding:20px 20px 4px}
.ma-hero img{width:88px;height:88px;border-radius:22px;object-fit:cover;flex:none}
.ma-hero h1{font-size:1.7rem;font-weight:800;margin:0 0 4px;line-height:1.15}
.ma-hero .ma-sub{color:var(--ma-muted);font-size:14px}
.ma-cta{display:block;margin:16px 20px 4px;text-align:center;background:linear-gradient(135deg,var(--ma-accent),var(--ma-accent2));color:#fff!important;font-weight:700;padding:14px;border-radius:14px;font-size:16px;text-decoration:none}
.ma-cta:hover{filter:brightness(1.08)}
.ma-cta-note{text-align:center;font-size:12px;color:var(--ma-muted);margin:0 20px 12px}
.ma-status{margin:0 20px 12px;background:var(--ma-surface2);border-radius:14px;padding:12px 14px;font-size:14px;line-height:1.45}
.ma-status .ok{color:var(--ma-green);font-weight:700}.ma-status .warn{color:var(--ma-yellow);font-weight:700}.ma-status .bad{color:var(--ma-red);font-weight:700}
.ma-facts{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--ma-line);margin:0 20px 14px;border-radius:14px;overflow:hidden}
.ma-facts div{background:var(--ma-surface2);padding:10px 13px}.ma-facts span{display:block;font-size:11.5px;color:var(--ma-muted)}.ma-facts b{font-size:14.5px;font-weight:600}
.ma-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 12px;scrollbar-width:none}
.ma-chips::-webkit-scrollbar{display:none}
.ma-chips a{flex:none;padding:7px 12px;border-radius:20px;background:var(--ma-surface);font-size:13.5px;white-space:nowrap;color:var(--ma-text);text-decoration:none}
.ma-theme{background:none;border:0;color:var(--ma-muted);font-size:14px;padding:6px 0;cursor:pointer}
.ma-facts div:last-child:nth-child(odd){grid-column:1/-1}

/* главная: шапка с h1 */
.ma-home-hero{position:relative;display:flex;align-items:center;gap:24px;margin:8px 0 18px;padding:26px 28px;border-radius:22px;overflow:hidden;
  background:radial-gradient(120% 140% at 100% 0%,rgba(42,171,238,.28) 0%,rgba(42,171,238,0) 55%),linear-gradient(135deg,var(--ma-surface) 0%,var(--ma-surface2) 100%);
  border:1px solid rgba(42,171,238,.18)}
.ma-hh-text{flex:1;min-width:0}
.ma-hh-eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:.78rem;font-weight:600;letter-spacing:.01em;color:var(--ma-accent);background:rgba(42,171,238,.12);padding:5px 12px;border-radius:999px;margin-bottom:14px}
.ma-hh-eyebrow .ma-dot{background:var(--ma-green);width:7px;height:7px}
.ma-hh-title{font-size:clamp(1.6rem,3.2vw,2.5rem);line-height:1.12;font-weight:800;margin:0 0 18px;letter-spacing:-.01em}
.ma-hh-paren{display:block;font-size:.62em;font-weight:700;margin-top:6px;background:linear-gradient(90deg,var(--ma-accent),var(--ma-yellow));-webkit-background-clip:text;background-clip:text;color:transparent}
.ma-hh-stats{display:flex;flex-wrap:wrap;gap:10px}
.ma-hh-stats div{display:flex;flex-direction:column;padding:8px 14px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);min-width:120px}
.ma-hh-stats b{font-size:1.3rem;font-weight:800;line-height:1.1}
.ma-hh-stats span{font-size:.78rem;opacity:.7}
.ma-hh-tiles{display:grid;grid-template-columns:repeat(2,64px);gap:12px;transform:rotate(-6deg);flex:none;margin-right:6px}
.ma-hh-tile{width:64px;height:64px;border-radius:18px;overflow:hidden;background:var(--ma-surface2);box-shadow:0 8px 24px rgba(0,0,0,.35)}
.ma-hh-tile:nth-child(2),.ma-hh-tile:nth-child(4){transform:translateY(14px)}
.ma-hh-tile img{width:100%;height:100%;object-fit:cover;display:block}
@media (max-width:767px){.ma-home-hero{padding:20px 16px;border-radius:18px}.ma-hh-tiles{display:none}.ma-hh-stats div{min-width:0;flex:1}}

/* главная: «Что такое мини-приложения ТГ» */
.ma-about{margin:28px 0 8px}
.ma-about-lead{font-size:1.05rem;line-height:1.6;padding:16px 20px;border-left:3px solid var(--ma-accent);background:var(--ma-surface);border-radius:0 14px 14px 0}
.ma-about-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.ma-about-item{background:var(--ma-surface);border-radius:16px;padding:16px 18px;border:1px solid rgba(255,255,255,.05)}
.ma-about-item h3{font-size:1rem;font-weight:700;margin:6px 0}
.ma-about-item p{font-size:.9rem;line-height:1.5;opacity:.8;margin:0}
.ma-about-n{font-family:ui-monospace,Menlo,monospace;font-size:.8rem;color:var(--ma-accent);font-weight:700}
@media (max-width:767px){.ma-about-grid{grid-template-columns:1fr}}

/* подвал: разделы каталога */
.ma-sections-foot{padding:28px 24px 8px}
.ma-sf-title{font-weight:800;font-size:1.15rem;margin-bottom:12px}
.ma-sf-list{display:flex;flex-wrap:wrap;gap:8px}
.ma-sf-list a{padding:7px 14px;border-radius:999px;background:var(--ma-surface);border:1px solid rgba(255,255,255,.06);color:inherit;text-decoration:none;font-size:.9rem}
.ma-sf-list a:hover{border-color:var(--ma-accent);color:var(--ma-accent)}
html[data-theme="light"] .ma-hh-stats div,html[data-theme="light"] .ma-about-item,html[data-theme="light"] .ma-sf-list a{border-color:rgba(0,0,0,.08)}
html[data-theme="light"] .ma-hh-stats div{background:rgba(0,0,0,.03)}

/* раздел: сводка вместо «Последний / Количество» */
.ma-catstats{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:14px 0 4px}
.ma-cs{display:flex;flex-direction:column;justify-content:space-between;gap:6px;padding:14px 16px;border-radius:16px;background:var(--ma-surface2);border:1px solid rgba(255,255,255,.06);color:inherit;text-decoration:none;min-width:0}
.ma-cs-num b{font-size:2rem;font-weight:800;line-height:1}
.ma-cs-num:nth-child(2) b{color:var(--ma-green)}
.ma-cs-l{font-size:.78rem;opacity:.7;line-height:1.3}
.ma-cs-app .ma-cs-l{text-transform:uppercase;letter-spacing:.05em;font-size:.7rem;font-weight:700;color:var(--ma-accent);opacity:1}
a.ma-cs-app:hover{border-color:var(--ma-accent);color:inherit}
.ma-cs-app-row{display:flex;align-items:center;gap:10px;min-width:0}
.ma-cs-app-row img{width:36px;height:36px;border-radius:10px;flex:none;object-fit:cover}
.ma-cs-app-t{display:flex;flex-direction:column;min-width:0}
.ma-cs-app-t b{font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ma-cs-app-t small{font-size:.75rem;opacity:.7}
@media (max-width:991px){.ma-catstats{grid-template-columns:repeat(2,1fr)}.ma-cs-app{grid-column:1/-1}.ma-cs-num b{font-size:1.6rem}}
html[data-theme="light"] .ma-cs{border-color:rgba(0,0,0,.08)}

/* каталожные страницы: шапка, крошки, отступы, пагинация, текст внизу (12.10) */
.rightside .my-2.p-0:has(> .crumbs){margin:2px 0 14px!important}
.rightside .crumbs .breadcrumb{font-size:.88rem;align-items:center}
.descriptionCat{border-radius:22px!important;margin-bottom:16px;
  background:radial-gradient(120% 140% at 100% 0%,rgba(42,171,238,.18) 0%,rgba(42,171,238,0) 55%),linear-gradient(135deg,var(--ma-surface) 0%,var(--ma-surface2) 100%)!important;
  border:1px solid rgba(42,171,238,.14)}
.descriptionCat h1{font-size:clamp(1.5rem,2.8vw,2.3rem);line-height:1.15;letter-spacing:-.01em}
.descriptionCat .ma-catstats{margin-bottom:0}
.descriptionCat + .aiList, .descriptionCat ~ .container .aiList{margin-top:0}
.pagination{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:18px 0 6px;padding:0;width:100%}
.pagination .page-item .page-link{border:0!important;border-radius:12px!important;min-width:40px;height:40px;display:flex;align-items:center;justify-content:center;padding:0 12px;
  background:var(--ma-surface)!important;color:inherit!important;font-weight:600;font-size:.92rem;box-shadow:none!important}
.pagination .page-item .page-link:hover{background:var(--ma-surface2)!important;color:var(--ma-accent)!important}
.pagination .page-item.active .page-link{background:var(--ma-accent)!important;color:#fff!important}
.pagination .page-item.disabled{display:none}
.ma-seo{margin:28px 0 8px;padding:26px 30px;border-radius:20px;background:var(--ma-surface);border:1px solid rgba(255,255,255,.05)}
.ma-seo-h{font-size:1.2rem;font-weight:800;margin:0 0 14px}
.ma-seo-body{font-size:.96rem;line-height:1.7;opacity:.85;max-width:860px}
.ma-seo-body p{margin:0 0 12px}
.ma-seo-body p:last-child{margin-bottom:0}
.ma-seo-body br + br{display:none}
.ma-seo-body.is-clamped{max-height:260px;overflow:hidden;-webkit-mask-image:linear-gradient(#000 60%,transparent);mask-image:linear-gradient(#000 60%,transparent)}
.ma-seo-more{margin-top:12px;border:0;border-radius:12px;padding:9px 16px;background:rgba(42,171,238,.12);color:var(--ma-accent);font-weight:600;font-size:.9rem}
.ma-seo-more:hover{background:rgba(42,171,238,.2)}
@media (max-width:767px){.ma-seo{padding:20px 16px}.descriptionCat{border-radius:18px!important}}
html[data-theme="light"] .ma-seo,html[data-theme="light"] .descriptionCat{border-color:rgba(0,0,0,.08)}
@media (max-width:767px){
  .descriptionCat .row > p{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer;position:relative;margin-bottom:4px}
  .descriptionCat .row > p.is-open{display:block}
  .descriptionCat .row > p:not(.is-open)::after{content:""}
  .ma-intro-more{display:block;text-align:left;margin:0 0 6px;padding:0;border:0;background:none;color:var(--ma-accent);font-weight:600;font-size:.9rem}
}
@media (min-width:768px){.ma-intro-more{display:none}}
