/*
Theme Name: Reboot Child HG
Template: reboot
Description: Дочерняя тема huaweigid.ru (редизайн 10.2026, макеты — sites/huaweigid.ru/design/mockups/, утв. владельцем 20.10.2026).
Version: 0.2.1
*/

/* ===== 1. Токены (design/mockups/src/base.css) ===== */
:root{
  --hg-ink:#111418; --hg-text:#272c33; --hg-muted:#69707a; --hg-line:#e3e6ea; --hg-bg:#f4f6f8; --hg-card:#fff;
  --hg-acc:#d6262f; --hg-acc-d:#b51d25; --hg-acc-soft:#fdecec; --hg-ok:#1f8a5b; --hg-ok-soft:#e8f5ee;
  --hg-dark:#15181d; --hg-dark-2:#22262d; --hg-r:14px;
  --hg-sh:0 1px 2px rgba(17,20,24,.05),0 6px 20px rgba(17,20,24,.06);
  --hg-f:"Onest",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
html{scroll-behavior:smooth}
body{font-family:var(--hg-f);font-size:17px;line-height:1.6;color:var(--hg-text);background:var(--hg-bg);-webkit-font-smoothing:antialiased}
a{color:var(--hg-acc-d)} a:hover{color:var(--hg-acc)}
.hg-wrap{max-width:1200px;margin:0 auto;padding:0 20px;box-sizing:border-box}
.site{overflow:visible}
.site-content{background:transparent;padding-top:16px}
.hg-tag{display:block;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--hg-muted);margin-bottom:8px}
.hg-card{background:var(--hg-card);border:1px solid var(--hg-line);border-radius:var(--hg-r);box-shadow:var(--hg-sh)}

/* ===== 2. Шапка 56 px ===== */
.site-header.hg-top{position:sticky;top:0;z-index:100;background:var(--hg-dark);color:#fff;padding:0;margin:0;box-shadow:none}
.hg-top__in{display:flex;align-items:center;gap:22px;height:56px}
.hg-logo{display:flex;align-items:center;gap:10px;color:#fff!important;text-decoration:none;font-weight:700;font-size:19px;white-space:nowrap}
.hg-logo b{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--hg-acc);font-size:14px}
.hg-logo small{font-weight:400;font-size:13px;color:#9aa1a8}
.hg-nav{display:flex;gap:18px;font-size:15px;white-space:nowrap;align-items:center}
.hg-nav a,.hg-nav__btn{color:#c9ced3;text-decoration:none;background:none;border:0;font:15px var(--hg-f);cursor:pointer;padding:0}
.hg-nav a:hover,.hg-nav__btn:hover{color:#fff}
.hg-sbtn{margin-left:auto;display:flex;align-items:center;gap:10px;background:var(--hg-dark-2);border:1px solid #333a42;color:#9aa1a8;border-radius:10px;padding:7px 12px;font:14px var(--hg-f);min-width:200px;cursor:pointer;text-align:left;white-space:nowrap;overflow:hidden}
.hg-sbtn em{font-style:normal}
.hg-soc-top{display:flex;gap:8px}
.hg-soc-top a{width:32px;height:32px;border-radius:8px;background:var(--hg-dark-2);border:1px solid #333a42;display:grid;place-items:center;font-size:11px;font-weight:700;color:#c9ced3;text-decoration:none}
.hg-burger{display:none;flex:none;width:38px;height:38px;border:0;border-radius:10px;background:var(--hg-dark-2);padding:11px 9px;cursor:pointer;flex-direction:column;justify-content:space-between}
.hg-burger span{display:block;height:2px;background:#fff;border-radius:2px}
.hg-panel{position:absolute;left:0;right:0;top:56px;background:#fff;color:var(--hg-text);box-shadow:0 20px 40px rgba(0,0,0,.18);z-index:101}
.hg-panel[hidden]{display:none}
.hg-panel__in{display:grid;gap:22px;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));padding:20px}
.hg-panel a{display:block;padding:7px 0;color:var(--hg-ink);text-decoration:none;font-size:16px}
@media (max-width:1300px){.hg-logo small{display:none}}
.entry-image .post-card__category,.entry-image__category{display:none}
@media (max-width:1100px){.hg-nav,.hg-soc-top{display:none}.hg-burger{display:flex}}
@media (max-width:767px){
  .hg-top__in{gap:12px}
  .hg-sbtn{min-width:0;width:38px;height:38px;padding:0;justify-content:center;flex:none}
  .hg-sbtn em{display:none}
}
.search-screen{background:var(--hg-bg)}

/* ===== 3. Контент: колонка, заголовки, крошки ===== */
.site-content.fixed,.fixed.site-content{max-width:1200px;padding-left:20px;padding-right:20px;box-sizing:border-box}
.page .site-main{max-width:1000px}
.breadcrumb{font-size:14px;color:var(--hg-muted);margin:14px 0 8px}
.breadcrumb a,.breadcrumb span{color:var(--hg-muted);text-transform:none}
h1,.h1,.entry-title{font-family:var(--hg-f);font-size:clamp(26px,3.6vw,40px);line-height:1.15;letter-spacing:-.02em;color:var(--hg-ink);font-weight:700;margin:.3em 0 .35em}
.entry-content h2,.page-content h2{font-size:clamp(21px,2.4vw,27px);line-height:1.22;color:var(--hg-ink);margin:1.8em 0 .6em;font-weight:700}
.entry-content h3{font-size:19px;line-height:1.3;color:var(--hg-ink);margin:1.4em 0 .5em}
.entry-content{font-size:17px;line-height:1.65}
.entry-content a{color:var(--hg-acc-d);text-decoration:underline;text-decoration-color:rgba(181,29,37,.35);text-underline-offset:3px}
.entry-content img{border-radius:12px;height:auto}
.entry-content iframe{max-width:100%}
.entry-content iframe[src*="youtu"],.entry-content iframe[src*="vk.com/video"],.entry-content iframe[src*="rutube"]{width:100%!important;height:auto!important;aspect-ratio:16/9}
.entry-content table{border-collapse:collapse;width:100%;font-size:15px;display:block;overflow-x:auto}
.entry-content table th,.entry-content table td{padding:9px 11px;border:0;border-bottom:1px solid var(--hg-line);text-align:left;vertical-align:top}
.entry-content figcaption,.wp-caption-text{font-size:14px;color:var(--hg-muted)}
.wp-caption{max-width:100%}
.hg-meta{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:14px;color:var(--hg-muted);margin:2px 0 16px}
.hg-toc-m{display:none}
@media (max-width:1000px){
  .hg-toc-m:not([hidden]){display:block;background:#fff;border:1px solid var(--hg-line);border-radius:var(--hg-r);margin:0 0 18px}
  .hg-toc-m summary{cursor:pointer;font-weight:600;padding:12px 16px}
  .hg-toc-m nav{padding:0 16px 12px}
  .hg-toc-m nav a{display:block;padding:5px 0;color:var(--hg-text);text-decoration:none;font-size:15px}
}

/* ===== 4. Правая колонка 300 px (статья, рубрика; ПК) ===== */
#secondary.widget-area{width:300px;flex:none}
#secondary .sticky-sidebar{display:flex;flex-direction:column;gap:16px;top:72px!important}
#secondary{padding-top:8px}
/* оглавление плагина Table of Contents Plus в тексте не нужно — своё в колонке и под заголовком (20.10) */
#toc_container{display:none!important}
.hg-toc,.hg-list.hg-card{padding:14px 16px}
.hg-toc[hidden]{display:none}
.hg-toc a{display:block;padding:6px 0 6px 12px;border-left:2px solid var(--hg-line);color:var(--hg-muted);text-decoration:none;font-size:14px;line-height:1.35}
.hg-toc a.on{border-color:var(--hg-acc);color:var(--hg-ink);font-weight:600}
#secondary .hg-list a{display:block;padding:8px 0;border-top:1px solid var(--hg-line);color:var(--hg-ink);text-decoration:none;font-size:14px;line-height:1.35}
#secondary .hg-list .hg-tag+a{border-top:0}
.hg-ad600{min-height:600px;border-radius:10px;display:grid;place-items:center;text-align:center;font-size:13px;color:#9aa1a8}
.hg-ad600:has(span){border:1px dashed #c9ced4;background:#fafbfc}
.hg-ad600:empty{min-height:0}
@media (max-width:1000px){#secondary{display:none!important}}

/* ===== 5. После статьи: «Помогло?», подписка ===== */
.hg-help{display:flex;gap:10px;align-items:center;flex-wrap:nowrap;padding:14px 16px;margin:26px 0 14px}
.hg-help b{flex:1 1 auto;min-width:0}
.hg-help button{flex:0 0 auto}
.hg-help button{border:1px solid var(--hg-line);background:#fff;border-radius:9px;padding:7px 16px;font:600 15px var(--hg-f);cursor:pointer;color:var(--hg-ink)}
.hg-help button:disabled{opacity:.5;cursor:default}
.hg-help__ok{color:var(--hg-ok);font-weight:600}
@media (max-width:400px){.hg-help{gap:8px;padding:12px 14px}.hg-help b{font-size:15px}.hg-help button{padding:6px 11px}}
.hg-sub{display:flex;gap:14px 20px;align-items:center;flex-wrap:wrap;padding:16px 18px;margin:14px 0 26px}
.hg-sub__t{flex:1 1 260px;display:flex;flex-direction:column} .hg-sub__t span{font-size:14px;color:var(--hg-muted)}
.hg-sub__b{display:flex;gap:10px;flex-wrap:wrap}
.hg-sbt{display:inline-flex;align-items:center;border-radius:10px;padding:10px 16px;font-weight:600;font-size:15px;color:#fff!important;text-decoration:none!important}
.hg-sbt--tg{background:#2aabee} .hg-sbt--vk{background:#0077ff}

/* ===== 6. Главная ===== */
.hg-home{max-width:1200px;margin:0 auto}
.hg-hero{padding:14px 0 6px}
.hg-lead{font-size:18px;color:#454c55;max-width:740px;margin:0 0 14px}
.hg-search{display:flex;gap:8px;max-width:720px;background:#fff;border:2px solid var(--hg-ink);border-radius:14px;padding:6px 6px 6px 14px}
.hg-search input{flex:1;min-width:0;border:0;outline:0;font:17px var(--hg-f);background:transparent}
.hg-search button{background:var(--hg-acc);color:#fff;border:0;border-radius:9px;padding:8px 16px;font:600 15px var(--hg-f);cursor:pointer}
.hg-home h2{font-size:clamp(21px,2.4vw,27px);color:var(--hg-ink);margin:36px 0 14px}
.hg-devs{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(min(140px,46%),1fr))}
.hg-dev{padding:14px 10px;text-align:center;font-size:15px;font-weight:600;color:var(--hg-ink)!important;text-decoration:none}
.hg-dev__ic{display:block;font-size:30px;line-height:1;margin-bottom:6px}
.hg-dev small{display:block;font-weight:400;font-size:13px;color:var(--hg-muted)}
.hg-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr))}
.hg-tile{display:flex;gap:13px;align-items:flex-start;padding:15px;text-decoration:none;color:var(--hg-text)!important;transition:.15s}
.hg-tile:hover{border-color:var(--hg-acc);transform:translateY(-2px)}
.hg-tile__ic{flex:none;width:44px;height:44px;border-radius:12px;background:var(--hg-acc-soft);display:grid;place-items:center;font-size:22px}
.hg-tile b{display:block;color:var(--hg-ink);font-size:17px} .hg-tile em{display:block;font-style:normal;font-size:14px;color:var(--hg-muted);line-height:1.45}
.hg-tile small{font-size:13px;color:var(--hg-muted)}
.hg-two{display:grid;gap:22px;grid-template-columns:2fr 1fr}
.hg-two--one{grid-template-columns:1fr}
@media (max-width:860px){.hg-two{grid-template-columns:1fr}}
.hg-home .hg-list a{display:flex;justify-content:space-between;gap:12px;padding:12px 16px;border-top:1px solid var(--hg-line);font-size:16px;color:var(--hg-ink);text-decoration:none}
.hg-home .hg-list a:first-child{border-top:0}
.hg-home .hg-list a:hover{color:var(--hg-acc-d)}
.hg-list em{font-style:normal;font-size:13px;color:var(--hg-muted);white-space:nowrap}

/* ===== 7. Ленты и похожие записи родителя ===== */
.related-posts__header,.section-block__title{font-size:24px;color:var(--hg-ink)}
.post-card__title a{color:var(--hg-ink)}
.post-card__thumbnail img{border-radius:12px}
.post-card__category,.post-card__category a{background:var(--hg-ink)!important;color:#fff!important}
.comment-respond .submit,.btn,button.submit,input[type=submit]{background:var(--hg-acc);border:0;border-radius:10px;color:#fff;font-family:var(--hg-f)}

/* ===== 8. Подвал ===== */
.hg-foot{background:var(--hg-dark);color:#9aa1a8;margin-top:56px;padding:34px 0 22px;font-size:14px}
.hg-foot__grid{display:grid;gap:22px;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))}
.hg-foot b{display:block;color:#fff;margin-bottom:8px}
.hg-foot a{display:block;margin:4px 0;color:#c9ced3;text-decoration:none}
.hg-foot a:hover{color:#fff}
.hg-foot__bottom{margin-top:22px;padding-top:14px;border-top:1px solid #2b3137;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}

/* 20.10 после переключения: на телефоне владельца страница шире экрана (шапка/подвал короче контента), в нашем браузере не воспроизводится —
   расширяет то, что грузится только живому посетителю (реклама РСЯ/Flat PM/Adfinity). Ограничитель: ничто не шире экрана. clip, не hidden — sticky-колонка не ломается */
html,body{max-width:100%;overflow-x:clip}
iframe,ins,video,[id^="yandex_rtb"],[class*="fpm_"],[data-fpm-type]{max-width:100%!important}
/* 20.10 телефон владельца с крупным шрифтом (масштаб текста Android): поле поиска держало «врождённую» ширину (size=20) и распирало главную,
   строки списков и шапка не сжимались. Воспроизведение: temp/hg_minw.py 320 1.3 (zoom 1.3 ≈ крупный текст) */
.hg-search input{width:100%}
.hg-hero,.hg-search,.hg-two>*,.hg-grid>*,.hg-list a{min-width:0}
.hg-list a{flex-wrap:wrap;overflow-wrap:anywhere}
.hg-top__in>*{min-width:0}
.hg-logo{min-width:0;overflow:hidden}
@media (max-width:400px){.hg-logo{font-size:17px;gap:8px}.hg-logo b{width:30px;height:30px}}
/* 20.10: широкие таблицы в старых статьях (top-15-telefonov-2020: 704 px) вылезали за экран 360/390 — прокрутка внутри таблицы */
.entry-content table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

/* 20.10: якоря заголовков — с отступом под закреплённую шапку */
.entry-content h2,.entry-content h3{scroll-margin-top:72px}
/* блок автора: фото фиксированной ширины, имя и описание рядом (в Reboot фото растягивалось и уводило имя вправо) */
.author-box .author-info{align-items:center;width:100%}
.author-box .author-info .author-box__ava{flex:0 0 70px;margin-right:16px}
.author-box .author-info .author-box__body{flex:1 1 auto;min-width:0}
.author-box .author-info .author-box__author{margin-bottom:4px}
.author-box .author-info .author-box__description p{margin:0}
.author-box .author-info .author-box__description a{white-space:nowrap}
