/* ============================================
   БАЗА ЗНАНИЙ Микродозинг.Москва — общие стили
   Версия: 1.4 (мобильная шапка по центру)
   Подключается во всех статьях /base/*.html
   ============================================ */
:root {
    --red: #e63946; --red-dark: #c1121f;
    --ink: #111827; --ink-soft: #374151; --ink-faint: #6b7280;
    --line: #e5e7eb; --bg: #ffffff; --bg-soft: #f9fafb; --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; word-break: break-word; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.read-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--red); z-index: 9999; width: 0; transition: width .1s linear; }

/* Шапка */
.head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.logo-mark { font-size: 22px; }
.head-links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.head-links a { font-size: 14px; color: var(--ink-soft); transition: color .15s; white-space: nowrap; }
.head-links a:hover { color: var(--red); }
.head-links a.cta { background: var(--red); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 600; }

.crumbs { padding: 16px 0 8px; font-size: 13px; color: var(--ink-faint); overflow-wrap: break-word; }
.crumbs a { color: var(--ink-faint); transition: color .15s; }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { margin: 0 6px; }

.main-grid { display: grid; grid-template-columns: 1fr 320px; gap: 48px; padding: 16px 0 60px; }
.article-head { margin-bottom: 32px; }
.article-tag { display: inline-block; background: rgba(230,57,70,.08); color: var(--red); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.article-head h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.5px; font-weight: 800; margin-bottom: 14px; overflow-wrap: break-word; }
.article-meta { font-size: 13px; color: var(--ink-faint); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.article-meta .dot { width: 3px; height: 3px; background: var(--ink-faint); border-radius: 50%; }

.article-content { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); overflow-wrap: break-word; }
.article-content h2 { font-size: 26px; font-weight: 700; color: var(--ink); margin: 42px 0 16px; letter-spacing: -.2px; line-height: 1.25; scroll-margin-top: 90px; overflow-wrap: break-word; }
.article-content h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 28px 0 12px; line-height: 1.3; overflow-wrap: break-word; }
.article-content p { margin-bottom: 18px; overflow-wrap: break-word; }
.article-content ul, .article-content ol { margin: 0 0 18px 22px; overflow-wrap: break-word; }
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--ink); font-weight: 700; }
.article-content a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; transition: color .15s; }
.article-content a:hover { color: var(--red-dark); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; border-radius: 8px; }
.table-wrap table { width: 100%; min-width: 360px; border-collapse: collapse; font-size: 14px; }
.table-wrap th { background: var(--bg-soft); padding: 12px 14px; text-align: left; font-weight: 700; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table-wrap td { padding: 12px 14px; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }

/* Маркеры источников */
.src { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.src.fact { background: #e0f2fe; color: #0369a1; }
.src.reviews { background: #fef3c7; color: #b45309; }
.src.recommend { background: #dcfce7; color: #15803d; }
.src.own { background: #ede9fe; color: #6d28d9; }

/* Карточки признаков */
.sign-card { display: grid; grid-template-columns: 44px 1fr; gap: 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; align-items: start; }
.sign-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; background: rgba(230,57,70,.08); }
.sign-card h4 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.sign-card p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; overflow-wrap: break-word; }

/* Календарь дней */
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; margin: 20px 0; }
.cal-day { padding: 10px 4px; text-align: center; border-radius: 8px; font-size: 13px; font-weight: 600; }
.cal-take { background: var(--red); color: #fff; }
.cal-rest { background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line); }
.cal-head { font-size: 11px; color: var(--ink-faint); font-weight: 700; text-transform: uppercase; }

/* Врезки товаров */
.product-embed { display: block; color: inherit; background: linear-gradient(135deg,#f9fafb 0%,#fff 100%); border: 2px solid var(--line); border-radius: 20px; padding: 24px; margin: 32px 0; box-shadow: 0 4px 20px rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s, border-color .15s; }
.product-embed:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.08); border-color: var(--red); }
.product-embed.green { background: linear-gradient(135deg,#f0fdf4 0%,#fff 100%); border-color: #86efac; box-shadow: 0 4px 20px rgba(134,239,172,.2); }
.product-embed.green:hover { border-color: #22c55e; box-shadow: 0 10px 30px rgba(134,239,172,.3); }
.product-embed-inner { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; }
.product-embed img { width: 100%; height: auto; border-radius: 14px; display: block; max-width: 100%; }
.product-embed .badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.product-embed h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; overflow-wrap: break-word; }
.product-embed .specs { font-size: 14px; color: var(--ink-faint); margin-bottom: 0; overflow-wrap: break-word; }
.product-embed .more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--red); }
.product-embed.green .more { color: #065f46; }

/* Блоки-вставки */
.note-info { background: #f0f9ff; border-left: 4px solid #2563eb; padding: 18px 22px; border-radius: 0 14px 14px 0; margin-bottom: 32px; }
.note-info h4 { font-size: 13px; font-weight: 700; color: #1e40af; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 6px; }
.note-info p { font-size: 15.5px; color: #1e3a8a; line-height: 1.6; margin: 0; }
.note-warn { background: #fffbeb; border-left: 4px solid #f59e0b; padding: 18px 22px; border-radius: 0 14px 14px 0; margin: 24px 0; }
.note-warn h4 { font-size: 13px; font-weight: 700; color: #92400e; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px; }
.note-warn p { font-size: 15px; color: #78350f; line-height: 1.6; margin: 0; }
.note-danger { background: #fef2f2; border-left: 4px solid #dc2626; padding: 18px 22px; border-radius: 0 14px 14px 0; margin: 24px 0; }
.note-danger h4 { font-size: 13px; font-weight: 700; color: #991b1b; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px; }
.note-danger p { font-size: 15px; color: #7f1d1d; line-height: 1.6; margin: 0; }
.note-ok { background: #f0fdf4; border-left: 4px solid #059669; padding: 18px 22px; border-radius: 0 14px 14px 0; margin: 24px 0; }
.note-ok h4 { font-size: 13px; font-weight: 700; color: #065f46; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px; }
.note-ok p { font-size: 15px; color: #064e3b; line-height: 1.6; margin: 0; }

.disclaimer { background: #fffbeb; border: 1px solid #fcd34d; border-left: 4px solid #f59e0b; border-radius: 14px; padding: 22px 26px; margin: 40px 0 32px; }
.disclaimer h4 { font-size: 14px; color: #92400e; font-weight: 800; margin-bottom: 8px; }
.disclaimer p { font-size: 13.5px; color: #78350f; line-height: 1.6; margin: 0; }

.share-row { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.share-row > span { font-weight: 600; }
.share-btns { display: flex; gap: 8px; }
.share-btns a { color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* Сайдбар */
.sidebar { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
.sidebar-block { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.sidebar-block h4 { font-size: 12px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }
.sidebar-block ul { list-style: none; }
.sidebar-block li { margin-bottom: 8px; }
.sidebar-block a { font-size: 14px; color: var(--ink-soft); transition: color .15s; display: block; padding: 4px 0; overflow-wrap: break-word; }
.sidebar-block a:hover { color: var(--red); }
.sidebar-test { background: linear-gradient(135deg,#1a1a2e 0%,#4a1520 100%); border-radius: 14px; padding: 22px; color: #fff; margin-bottom: 20px; }
.sidebar-test h4 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.sidebar-test p { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.5; margin-bottom: 14px; }
.sidebar-test a { display: block; text-align: center; background: #fff; color: #1a1a2e; padding: 10px; border-radius: 10px; font-size: 14px; font-weight: 700; }
.sidebar-products { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.sidebar-products h4 { font-size: 12px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }
.sidebar-products ul { list-style: none; }
.sidebar-products li { margin-bottom: 10px; }
.sidebar-products a { font-size: 14px; color: var(--ink-soft); display: block; padding: 4px 0; }
.sidebar-products a.catalog { font-size: 13px; color: var(--red); font-weight: 700; }

/* Футер, мессенджеры, details */
.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 40px 0 30px; background: var(--bg-soft); }
.foot-bottom { text-align: center; font-size: 12.5px; color: var(--ink-faint); padding-top: 20px; border-top: 1px solid var(--line); overflow-wrap: break-word; }
.mssg-block { position: fixed; right: 20px; bottom: 24px; z-index: 40; display: flex; flex-direction: column; gap: 10px; }
.mssg-block a { display: block; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.15); transition: transform .15s; background: #fff; padding: 4px; }
.mssg-block a:hover { transform: scale(1.08); }
.mssg-block img { width: 100%; height: 100%; object-fit: cover; }
details { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
details summary { font-weight: 700; font-size: 16px; list-style: none; cursor: pointer; color: var(--ink); overflow-wrap: break-word; }
details summary::-webkit-details-marker { display: none; }
details[open] summary { color: var(--red); margin-bottom: 12px; }
details p { font-size: 15px; color: var(--ink-soft); line-height: 1.65; margin: 0; overflow-wrap: break-word; }

/* Три взгляда — v2 (десктоп: 3 колонки, мобильный: столбик) */
.three-views { margin: 42px 0; }
.three-views > h2 { font-size: 26px; font-weight: 700; margin-bottom: 16px; }
.views-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.view-card { border-radius: 14px; padding: 18px 20px; border: 1px solid var(--line); background: var(--bg-soft); display: flex; flex-direction: column; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.view-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #fff; border: 1px solid var(--line); }
.view-who { display: flex; flex-direction: column; line-height: 1.3; }
.view-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.view-role { font-size: 12px; color: var(--ink-faint); }
.view-card > p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; margin: 0; font-style: italic; }
.view-mushroom { border-left: 4px solid #e63946; }
.view-myco { border-left: 4px solid #2563eb; }
.view-stack { border-left: 4px solid #7c3aed; }

/* ===== Адаптив: планшет ===== */
@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; gap: 24px; }
    .sidebar { position: static; max-height: none; }
    .article-head h1 { font-size: 30px; }
    .article-content h2 { font-size: 22px; }
    .head-links { gap: 14px; }
    .views-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
    .view-card > p { font-size: 14px; }
}

/* ===== Адаптив: мобильный ===== */
@media (max-width: 640px) {
    /* ШАПКА: колонка, всё по центру (фикс прилипания к левому краю) */
    .head-in { height: auto; padding: 8px 0; flex-direction: column; align-items: center; gap: 2px; }
    .logo { font-size: 15px; }
    .logo-mark { font-size: 18px; }
    .head-links { gap: 12px; font-size: 12.5px; justify-content: center; flex-wrap: wrap; width: 100%; }
    .head-links a { font-size: 12.5px; }
    .head-links a.cta { padding: 6px 14px; font-size: 12px; }

    .article-head h1 { font-size: 26px; }
    .article-content h2 { font-size: 20px; }
    .article-content h3 { font-size: 18px; }
    .article-content { font-size: 15.5px; }

    .product-embed { padding: 16px; margin: 24px 0; }
    .product-embed-inner { grid-template-columns: 1fr; gap: 14px; }
    .product-embed img { max-width: 200px; margin: 0 auto; }
    .product-embed h3 { font-size: 17px; }
    .product-embed .specs { font-size: 13px; }
    .product-embed .more { font-size: 13px; }

    .sign-card { grid-template-columns: 1fr; gap: 10px; }
    .sign-icon { margin: 0 auto; }
    .calendar-grid { font-size: 11px; }
    .table-wrap table { min-width: 300px; font-size: 13px; }
    .table-wrap th, .table-wrap td { padding: 10px 10px; }

    .share-row { justify-content: center; }

    .mssg-block { right: 12px; bottom: 16px; }
    .mssg-block a { width: 44px; height: 44px; }

    /* Три взгляда на мобильном — столбиком */
    .views-grid { grid-template-columns: 1fr; }
    .view-card > p { font-size: 15px; }
}

/* ===== Очень узкие экраны ===== */
@media (max-width: 360px) {
    .wrap { padding: 0 12px; }
    .article-head h1 { font-size: 24px; }
    .product-embed { padding: 14px; }
    .product-embed-inner { gap: 12px; }
    .head-links { gap: 8px; }
}