/*
Theme Name: Свои за границей
Theme URI: https://ru-poleznye-sovety.info/
Author: Дизайн для проекта «Свои за границей»
Description: Классическая тема-справочник для сайта о жизни в Германии и Польше. Спокойная типографика, читаемые длинные тексты, врезки, таблицы, оглавление и готовые места под партнёрские блоки.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: svoi-za-granicej
*/

/* ==========================================================================
   1. Токены
   ========================================================================== */
:root{
  --szg-bg:#F7F5F0;
  --szg-surface:#FFFFFF;
  --szg-surface-soft:#FBFAF7;
  --szg-ink:#26313A;
  --szg-ink-2:#33404B;
  --szg-muted:#5C6672;
  --szg-muted-2:#8A93A0;
  --szg-faint:#98A1AC;
  --szg-line:#E5E0D5;
  --szg-line-soft:#F1EDE4;
  --szg-accent:#1F5F7A;
  --szg-accent-dark:#17485D;
  --szg-accent-soft:#EAF2F5;
  --szg-accent-line:#D8E7EE;
  --szg-warn-bg:#FBF1DD;
  --szg-warn-line:#F0DFC0;
  --szg-warn-ink:#8A5A0F;
  --szg-warn-text:#5A431A;
  --szg-ok-bg:#E9F2ED;
  --szg-ok-line:#D3E5DB;
  --szg-ok-ink:#1E5C46;
  --szg-ok-text:#254A3B;
  --szg-footer:#24313B;
  --szg-serif:'Lora',Georgia,'Times New Roman',serif;
  --szg-sans:'Golos Text',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --szg-wrap:1200px;
  --szg-radius:14px;
  --szg-radius-sm:9px;
  --szg-flag-pl:linear-gradient(180deg,#FFFFFF 50%,#D4213D 50%);
  --szg-flag-de:linear-gradient(180deg,#2B2B30 33%,#CE2F2F 33%,#CE2F2F 66%,#E8B22A 66%);
}

/* ==========================================================================
   2. База
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--szg-bg);color:var(--szg-ink);font:400 16px/1.6 var(--szg-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img{max-width:100%;height:auto;display:block}
a{color:var(--szg-accent);text-decoration-color:rgba(31,95,122,.35);text-underline-offset:3px}
a:hover{color:var(--szg-accent-dark)}
h1,h2,h3,h4{font-family:var(--szg-serif);font-weight:600;line-height:1.28;margin:0;text-wrap:pretty}
p{margin:0}
ul,ol{margin:0}
button{font-family:inherit}
input,select,textarea{font-family:inherit}
::selection{background:var(--szg-accent-line)}
.szg-wrap{max-width:var(--szg-wrap);margin:0 auto;padding:0 24px}
.szg-narrow{max-width:860px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link{position:absolute;left:-9999px;top:0;z-index:999;background:#fff;padding:12px 18px;border-radius:0 0 8px 0}
.skip-link:focus{left:0}
:focus-visible{outline:2px solid var(--szg-accent);outline-offset:2px}

/* ==========================================================================
   3. Шапка
   ========================================================================== */
.szg-header{background:#fff;border-bottom:1px solid var(--szg-line);position:sticky;top:0;z-index:50}
.admin-bar .szg-header{top:32px}
.szg-header__inner{display:flex;align-items:center;gap:28px;padding-top:14px;padding-bottom:14px}
.szg-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--szg-ink)}
.szg-brand__mark{width:38px;height:38px;border-radius:10px;background:var(--szg-accent);color:var(--szg-bg);display:flex;align-items:center;justify-content:center;font:700 15px var(--szg-serif);flex:none}
.szg-brand__name{font:700 19px/1 var(--szg-serif);display:block}
.szg-brand__tagline{font:500 11px var(--szg-sans);color:var(--szg-muted-2);letter-spacing:.04em;display:block;margin-top:3px}
.szg-nav{margin-left:auto}
.szg-nav ul{list-style:none;display:flex;align-items:center;gap:4px;margin:0;padding:0}
.szg-nav li{position:relative}
.szg-nav a{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--szg-ink);font:500 14.5px var(--szg-sans);padding:8px 12px;border-radius:8px}
.szg-nav a:hover,.szg-nav .current-menu-item>a{background:var(--szg-line-soft)}
.szg-nav .sub-menu{display:none;position:absolute;top:100%;left:0;min-width:230px;background:#fff;border:1px solid var(--szg-line);border-radius:12px;padding:6px;box-shadow:0 14px 34px rgba(31,61,74,.12);flex-direction:column;gap:0}
.szg-nav li:hover>.sub-menu,.szg-nav li:focus-within>.sub-menu{display:flex}
.szg-nav .sub-menu a{padding:9px 12px;font-weight:400}
.szg-icon-btn{width:38px;height:38px;border-radius:var(--szg-radius-sm);border:1px solid var(--szg-line);background:var(--szg-surface-soft);cursor:pointer;display:flex;align-items:center;justify-content:center;color:#4A5561}
.szg-icon-btn:hover{background:var(--szg-accent-soft);border-color:#BFD4DE;color:var(--szg-accent)}
.szg-burger{display:none;flex-direction:column;gap:4px}
.szg-burger span{width:16px;height:1.8px;background:var(--szg-ink);border-radius:2px}
.szg-header__tools{display:flex;gap:8px;align-items:center}

/* Флажок страны */
.szg-flag{width:11px;height:11px;border-radius:50%;border:1px solid #D9D2C4;flex:none;display:inline-block}
.szg-flag--pl{background:var(--szg-flag-pl)}
.szg-flag--de{background:var(--szg-flag-de)}
.szg-flag--lg{width:34px;height:34px;border-color:#E0D9CB}
.szg-flag--md{width:10px;height:10px}

/* Выпадающий поиск */
.szg-searchbar{border-top:1px solid var(--szg-line-soft);background:#FDFCFA;display:none}
.szg-searchbar.is-open{display:block}
.szg-searchbar__inner{max-width:760px;margin:0 auto;padding:16px 24px 18px}
.szg-searchform{display:flex;align-items:center;gap:10px;background:#fff;border:1.5px solid var(--szg-accent);border-radius:10px;padding:11px 14px;box-shadow:0 6px 18px rgba(31,61,74,.08)}
.szg-searchform input[type=search]{border:none;outline:none;flex:1;font:400 15px var(--szg-sans);color:var(--szg-ink);background:transparent}
.szg-searchform button{border:none;background:none;cursor:pointer;color:var(--szg-accent);display:flex;padding:0}
.szg-hints{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;align-items:center}
.szg-hints__label{font:500 12px var(--szg-sans);color:var(--szg-muted-2)}
.szg-hint{font:500 12.5px var(--szg-sans);color:var(--szg-accent);background:var(--szg-accent-soft);border:none;border-radius:99px;padding:5px 12px;text-decoration:none}
.szg-hint:hover{background:var(--szg-accent-line);color:var(--szg-accent)}
.szg-mobile-menu{display:none;border-top:1px solid var(--szg-line-soft);background:#fff;padding:10px 24px 16px}
.szg-mobile-menu.is-open{display:block}
.szg-mobile-menu ul{list-style:none;margin:0;padding:0}
.szg-mobile-menu li{border-bottom:1px solid var(--szg-line-soft)}
.szg-mobile-menu li:last-child{border-bottom:none}
.szg-mobile-menu a{display:block;text-decoration:none;color:var(--szg-ink);font:500 16px var(--szg-sans);padding:11px 8px}
.szg-mobile-menu .sub-menu{padding-left:14px}
.szg-mobile-menu .sub-menu a{font-weight:400;font-size:15px;color:var(--szg-muted)}

/* ==========================================================================
   4. Главная
   ========================================================================== */
.szg-hero{background:linear-gradient(180deg,#FDFCFA 0%,var(--szg-bg) 100%);border-bottom:1px solid var(--szg-line-soft);text-align:center}
.szg-hero__inner{padding:clamp(44px,7vw,76px) 24px clamp(40px,6vw,64px);display:flex;flex-direction:column;align-items:center}
.szg-eyebrow{font:600 11.5px var(--szg-sans);letter-spacing:.1em;text-transform:uppercase;color:var(--szg-accent);background:var(--szg-accent-soft);border-radius:99px;padding:6px 14px;display:inline-flex;align-items:center;gap:8px}
.szg-hero h1{font-size:clamp(30px,4.6vw,48px);line-height:1.15;margin:18px 0 0;max-width:760px;letter-spacing:-.01em}
.szg-hero__lead{font-size:clamp(16px,2vw,18.5px);line-height:1.6;color:var(--szg-muted);max-width:640px;margin:16px 0 0}
.szg-hero .szg-searchform{margin-top:28px;width:100%;max-width:560px;border-color:#DCD6C9;box-shadow:0 8px 24px rgba(38,49,58,.06)}
.szg-hero .szg-searchform:focus-within{border-color:var(--szg-accent)}
.szg-hero .szg-hints{justify-content:center;margin-top:14px}
.szg-hero .szg-hint{background:transparent;border:1px solid #DCD6C9;color:var(--szg-muted)}
.szg-hero .szg-hint:hover{color:var(--szg-accent);border-color:#BFD4DE;background:var(--szg-accent-soft)}

.szg-section{padding-top:clamp(36px,5vw,56px)}
.szg-section__head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}
.szg-section__head h2{font-size:clamp(22px,3vw,28px)}
.szg-section__note{font:400 14px var(--szg-sans);color:var(--szg-muted-2)}
.szg-more{font:500 14px var(--szg-sans);text-decoration:none}

.szg-countries{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:20px}
.szg-country{background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);padding:26px 26px 24px;display:flex;flex-direction:column;gap:14px;transition:box-shadow .2s,transform .2s}
.szg-country:hover{box-shadow:0 14px 34px rgba(31,61,74,.10);transform:translateY(-2px)}
.szg-country__top{display:flex;align-items:center;gap:12px}
.szg-country__name{font:700 24px var(--szg-serif);color:var(--szg-ink);text-decoration:none}
.szg-country__name:hover{color:var(--szg-accent)}
.szg-country__count{margin-left:auto;font:500 12px var(--szg-sans);color:var(--szg-muted-2)}
.szg-country__desc{font-size:14.5px;line-height:1.55;color:var(--szg-muted)}
.szg-country__links{display:flex;flex-direction:column;border-top:1px solid var(--szg-line-soft)}
.szg-country__links a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 2px;text-decoration:none;color:var(--szg-ink);font:500 14px var(--szg-sans);border-bottom:1px solid var(--szg-line-soft)}
.szg-country__links a:last-child{border-bottom:none}
.szg-country__links a:hover{color:var(--szg-accent)}
.szg-country__links span{color:#B3BCC6}

.szg-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--szg-accent);color:var(--szg-bg);border:none;border-radius:var(--szg-radius-sm);padding:12px 20px;font:600 14.5px var(--szg-sans);cursor:pointer;text-decoration:none}
.szg-btn:hover{background:var(--szg-accent-dark);color:var(--szg-bg)}
.szg-btn--ghost{background:#fff;color:var(--szg-accent);border:1px solid #BFD4DE}
.szg-btn--ghost:hover{background:#F3F8FA;color:var(--szg-accent)}
.szg-btn--outline{background:#fff;color:var(--szg-accent);border:1.5px solid var(--szg-accent)}
.szg-btn--outline:hover{background:var(--szg-accent-soft);color:var(--szg-accent)}
.szg-btn--block{width:100%}

.szg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:20px}
.szg-card{background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);overflow:hidden;display:flex;flex-direction:column;transition:box-shadow .2s,transform .2s}
.szg-card:hover{box-shadow:0 14px 34px rgba(31,61,74,.10);transform:translateY(-2px)}
.szg-card__media{aspect-ratio:16/9;background:linear-gradient(135deg,#DCE8ED,#EFEAE0);overflow:hidden}
.szg-card__media img{width:100%;height:100%;object-fit:cover}
.szg-card__body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:10px;flex:1}
.szg-kicker{display:flex;align-items:center;gap:8px;font:600 11px var(--szg-sans);letter-spacing:.07em;text-transform:uppercase;color:var(--szg-accent);text-decoration:none}
.szg-card__title{font:600 18.5px/1.35 var(--szg-serif);margin:0}
.szg-card__title a{color:var(--szg-ink);text-decoration:none}
.szg-card__title a:hover{color:var(--szg-accent)}
.szg-card__excerpt{font-size:14px;line-height:1.55;color:var(--szg-muted)}
.szg-card__meta{margin-top:auto;padding-top:6px;font-size:12.5px;color:var(--szg-faint)}

.szg-trust{background:var(--szg-accent-soft);border:1px solid var(--szg-accent-line);border-radius:16px;padding:clamp(28px,4vw,44px);display:flex;gap:32px;align-items:center;flex-wrap:wrap}
.szg-trust h2{font-size:clamp(21px,2.6vw,26px);margin-bottom:10px}
.szg-trust p{font-size:15px;line-height:1.65;color:#41505C}
.szg-trust__text{flex:1 1 380px;min-width:min(100%,380px)}
.szg-trust__actions{display:flex;gap:12px;flex-wrap:wrap}

/* ==========================================================================
   5. Рекламные места
   ========================================================================== */
.szg-ad{border:1.5px dashed #D5CEBF;border-radius:12px;background:var(--szg-surface-soft);min-height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:20px;text-align:center}
.szg-ad--filled{border:none;background:none;padding:0;min-height:0;display:block}
.szg-ad__label{font:600 10.5px var(--szg-sans);letter-spacing:.14em;text-transform:uppercase;color:#A9A08C}
.szg-ad__hint{font:400 13.5px var(--szg-sans);color:var(--szg-muted-2)}
.szg-ad--side{min-height:250px}
.szg-ad--wide{min-height:120px}

/* ==========================================================================
   6. Хлебные крошки, архивы
   ========================================================================== */
.szg-breadcrumbs{font:400 13px var(--szg-sans);color:var(--szg-muted-2);padding-top:18px;display:flex;gap:7px;flex-wrap:wrap}
.szg-breadcrumbs a{color:var(--szg-muted-2);text-decoration:none}
.szg-breadcrumbs a:hover{color:var(--szg-accent)}
.szg-breadcrumbs span[aria-current]{color:#41505C}

.szg-archive__head{padding:22px 0 0;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.szg-archive__head h1{font-size:clamp(30px,4.5vw,42px);line-height:1.1}
.szg-archive__lead{font-size:16px;line-height:1.6;color:var(--szg-muted);max-width:720px;margin-top:14px}
.szg-switch{margin-left:auto;display:flex;gap:6px;background:#EFEBE1;border-radius:99px;padding:4px}
.szg-switch a{border-radius:99px;padding:7px 15px;font:600 13px var(--szg-sans);text-decoration:none;color:#6C7680}
.szg-switch a.is-active{background:#fff;color:var(--szg-accent)}
.szg-pills{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 0;border-bottom:1px solid var(--szg-line);padding-bottom:18px}
.szg-pill{font:500 13.5px var(--szg-sans);border:1px solid #DCD6C9;background:#fff;color:#41505C;border-radius:99px;padding:8px 16px;text-decoration:none}
.szg-pill:hover{border-color:var(--szg-accent);color:var(--szg-accent)}
.szg-pill.is-active{background:var(--szg-accent);border-color:var(--szg-accent);color:#fff}
.szg-pills__label{font:600 11px var(--szg-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--szg-faint);align-self:center}

.szg-pillar{margin-top:24px;background:var(--szg-accent-soft);border:1px solid var(--szg-accent-line);border-radius:var(--szg-radius);padding:22px 24px;display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.szg-pillar__text{flex:1 1 340px;min-width:min(100%,340px)}
.szg-pillar h2{font-size:21px;margin:8px 0 6px}
.szg-pillar p{font-size:14px;line-height:1.55;color:#41505C}

.szg-list{display:flex;flex-direction:column;gap:16px;padding:26px 0 0}
.szg-item{background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);overflow:hidden;display:flex;flex-wrap:wrap;transition:box-shadow .2s}
.szg-item:hover{box-shadow:0 12px 30px rgba(31,61,74,.10)}
.szg-item__media{flex:0 1 250px;min-width:min(100%,220px);aspect-ratio:16/9;background:linear-gradient(135deg,#DCE8ED,#EFEAE0)}
.szg-item__media img{width:100%;height:100%;object-fit:cover}
.szg-item__body{flex:1 1 380px;padding:18px 22px;display:flex;flex-direction:column;gap:8px;justify-content:center}
.szg-item__title{font:600 19px/1.35 var(--szg-serif);margin:0}
.szg-item__title a{color:var(--szg-ink);text-decoration:none}
.szg-item__title a:hover{color:var(--szg-accent)}
.szg-item__excerpt{font-size:14px;line-height:1.55;color:var(--szg-muted)}
.szg-item__meta{font-size:12.5px;color:var(--szg-faint)}

.szg-rows{display:flex;flex-direction:column;padding-top:8px}
.szg-row{display:flex;gap:18px;align-items:center;padding:16px 4px;border-bottom:1px solid var(--szg-line-soft);flex-wrap:wrap}
.szg-row:hover{background:var(--szg-surface-soft)}
.szg-row__media{width:132px;aspect-ratio:16/9;border-radius:9px;overflow:hidden;background:linear-gradient(135deg,#DCE8ED,#EFEAE0);flex:none}
.szg-row__media img{width:100%;height:100%;object-fit:cover}
.szg-row__body{flex:1;min-width:min(100%,260px)}
.szg-row__title{font:600 17.5px/1.35 var(--szg-serif);margin:6px 0 0}
.szg-row__title a{color:var(--szg-ink);text-decoration:none}
.szg-row__title a:hover{color:var(--szg-accent)}
.szg-row__meta{font-size:12.5px;color:var(--szg-faint);display:block;margin-top:6px}
.szg-row__arrow{color:#B3BCC6;font-size:18px;flex:none}

.szg-pagination{display:flex;gap:8px;justify-content:center;padding:34px 0 60px;flex-wrap:wrap}
.szg-pagination .page-numbers{min-width:38px;height:38px;padding:0 12px;border-radius:var(--szg-radius-sm);border:1px solid var(--szg-line);background:#fff;color:var(--szg-ink);display:flex;align-items:center;justify-content:center;font:500 13.5px var(--szg-sans);text-decoration:none}
.szg-pagination .page-numbers:hover{border-color:var(--szg-accent);color:var(--szg-accent)}
.szg-pagination .page-numbers.current{background:var(--szg-accent);border-color:var(--szg-accent);color:var(--szg-bg);font-weight:600}
.szg-pagination .page-numbers.dots{border:none;background:none;color:var(--szg-faint)}

/* ==========================================================================
   7. Статья
   ========================================================================== */
.szg-post__head{padding:24px 0 0}
.szg-post__head h1{font-size:clamp(28px,4.2vw,40px);line-height:1.2;letter-spacing:-.01em}
.szg-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:18px;font:400 13.5px var(--szg-sans);color:var(--szg-muted-2)}
.szg-meta__author{display:flex;align-items:center;gap:9px}
.szg-avatar{width:32px;height:32px;border-radius:50%;background:var(--szg-accent);color:var(--szg-bg);display:flex;align-items:center;justify-content:center;font:600 14px var(--szg-serif);flex:none;overflow:hidden}
.szg-avatar img{border-radius:50%}
.szg-avatar--lg{width:56px;height:56px;font-size:24px}
.szg-avatar--xl{width:64px;height:64px;font-size:27px}
.szg-meta__name{font:500 14px var(--szg-sans);color:var(--szg-ink)}
.szg-badge{font:500 12px var(--szg-sans);color:var(--szg-ok-ink);background:var(--szg-ok-bg);border-radius:99px;padding:4px 11px}
.szg-meta__time{display:flex;align-items:center;gap:6px}
.szg-featured{margin:22px 0 0;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,#DCE8ED,#EFEAE0);max-height:440px}
.szg-featured img{width:100%;max-height:440px;object-fit:cover}

.szg-layout{display:flex;gap:40px;align-items:flex-start;flex-wrap:wrap;padding:30px 0 60px}
.szg-content{flex:1 1 620px;max-width:760px;min-width:0}
.szg-sidebar{flex:1 1 280px;max-width:340px;min-width:min(100%,280px);position:sticky;top:120px;display:flex;flex-direction:column;gap:16px}
.admin-bar .szg-sidebar{top:152px}

.szg-entry p{font-size:16.5px;line-height:1.75;color:var(--szg-ink-2);margin:16px 0 0}
.szg-entry>p:first-child{font-size:18.5px;line-height:1.75;margin-top:0}
.szg-entry h2{font-size:clamp(23px,3vw,28px);margin:40px 0 0;scroll-margin-top:110px}
.szg-entry h3{font-size:clamp(19px,2.2vw,22px);margin:28px 0 0;scroll-margin-top:110px}
.szg-entry ul,.szg-entry ol{margin:16px 0 0;padding-left:22px;font-size:16.5px;line-height:1.75;color:var(--szg-ink-2)}
.szg-entry li+li{margin-top:8px}
.szg-entry img,.szg-entry figure{border-radius:12px;overflow:hidden}
.szg-entry figure{margin:26px 0 0}
.szg-entry figcaption{font-size:12.5px;color:var(--szg-faint);padding-top:8px;text-align:left}
.szg-entry blockquote{margin:26px 0 0;padding:18px 22px;background:var(--szg-surface-soft);border:1px solid var(--szg-line-soft);border-radius:12px;font:italic 500 17px/1.65 var(--szg-serif);color:var(--szg-ink-2)}
.szg-entry blockquote p{font:inherit;margin:0}
.szg-entry hr{border:none;border-top:1px solid var(--szg-line);margin:36px 0 0}

/* Таблицы */
.szg-entry table,.szg-entry .wp-block-table table{width:100%;border-collapse:collapse;background:#fff;font-size:14.5px}
.szg-entry .wp-block-table{margin:24px 0 0;border:1px solid var(--szg-line);border-radius:12px;overflow:hidden}
.szg-entry .wp-block-table figcaption{padding:10px 16px;background:var(--szg-surface-soft);font-size:12.5px;color:var(--szg-faint);margin:0;border-top:1px solid var(--szg-line-soft)}
.szg-entry table th{background:#F4F1EA;text-align:left;padding:12px 16px;font:600 12px var(--szg-sans);letter-spacing:.06em;text-transform:uppercase;color:var(--szg-muted);border-bottom:1px solid var(--szg-line)}
.szg-entry table td{padding:12px 16px;border-bottom:1px solid var(--szg-line-soft);line-height:1.5;color:#41505C;vertical-align:top}
.szg-entry table td:first-child{font-weight:600;color:var(--szg-ink)}
.szg-entry table tr:last-child td{border-bottom:none}
.szg-entry table tr:hover td{background:var(--szg-surface-soft)}
.szg-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Блоки-врезки: добавьте класс группе/абзацу в редакторе */
.szg-note,.szg-warn,.szg-tip{margin:22px 0 0;border-radius:12px;padding:18px 20px;display:flex;gap:14px;border:1px solid}
.szg-note{background:var(--szg-accent-soft);border-color:var(--szg-accent-line)}
.szg-warn{background:var(--szg-warn-bg);border-color:var(--szg-warn-line)}
.szg-tip{background:var(--szg-ok-bg);border-color:var(--szg-ok-line)}
.szg-note::before,.szg-warn::before,.szg-tip::before{content:'';width:30px;height:30px;border-radius:8px;flex:none;background-repeat:no-repeat;background-position:center;background-size:15px 15px}
.szg-note::before{background-color:var(--szg-accent-line);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' fill='none' stroke='%231F5F7A' stroke-width='1.4'%3E%3Ccircle cx='7.5' cy='7.5' r='6'/%3E%3Cpath d='M7.5 7v3.5' stroke-linecap='round'/%3E%3Ccircle cx='7.5' cy='4.8' r='.8' fill='%231F5F7A' stroke='none'/%3E%3C/svg%3E")}
.szg-warn::before{background-color:#F3E3C4;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' fill='none' stroke='%238A5A0F' stroke-width='1.4'%3E%3Cpath d='M7.5 2l6 10.5h-12z' stroke-linejoin='round'/%3E%3Cpath d='M7.5 6.2v2.6' stroke-linecap='round'/%3E%3Ccircle cx='7.5' cy='10.8' r='.8' fill='%238A5A0F' stroke='none'/%3E%3C/svg%3E")}
.szg-tip::before{background-color:var(--szg-ok-line);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' fill='none' stroke='%231E5C46' stroke-width='1.6'%3E%3Cpath d='M3 8l3 3 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.szg-note>*,.szg-warn>*,.szg-tip>*{margin:0}
.szg-note p,.szg-warn p,.szg-tip p{font-size:15px;line-height:1.6;margin:0}
.szg-note p+p,.szg-warn p+p,.szg-tip p+p{margin-top:8px}
.szg-note p{color:#2B4A4C}
.szg-warn p{color:var(--szg-warn-text)}
.szg-tip p{color:var(--szg-ok-text)}
.szg-note strong:first-child,.szg-warn strong:first-child,.szg-tip strong:first-child{display:block;font:600 11.5px var(--szg-sans);letter-spacing:.1em;text-transform:uppercase;margin-bottom:5px}
.szg-note strong:first-child{color:var(--szg-accent)}
.szg-warn strong:first-child{color:var(--szg-warn-ink)}
.szg-tip strong:first-child{color:var(--szg-ok-ink)}

/* Блок «Коротко» */
.szg-summary{margin-top:26px;background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);padding:22px 24px}
.szg-summary__title{font:700 15px var(--szg-serif);margin-bottom:14px;display:flex;align-items:center;gap:9px}
.szg-summary__title::before{content:'';width:22px;height:22px;border-radius:6px;background:var(--szg-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%231F5F7A' stroke-width='1.8'%3E%3Cpath d='M2 6.5L4.8 9 10 3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;flex:none}
.szg-summary ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.szg-summary li{font-size:15px;line-height:1.55;color:var(--szg-ink-2);display:flex;gap:10px}
.szg-summary li::before{content:'—';color:var(--szg-accent);font-weight:600;flex:none}

/* Оглавление */
.szg-toc{margin-top:18px;background:var(--szg-surface-soft);border:1px solid var(--szg-line-soft);border-radius:var(--szg-radius);padding:20px 24px}
.szg-toc__toggle{width:100%;background:none;border:none;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;font:700 15px var(--szg-serif);color:var(--szg-ink)}
.szg-toc__toggle::after{content:'⌄';font:400 20px var(--szg-sans);color:var(--szg-muted-2);transition:transform .2s}
.szg-toc__toggle[aria-expanded=false]::after{transform:rotate(-90deg)}
.szg-toc__list{margin:14px 0 0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:4px 28px}
.szg-toc__list li{font-size:14.5px;line-height:1.5;display:flex;gap:10px;padding:5px 0;border-bottom:1px solid var(--szg-line-soft)}
.szg-toc__num{font:600 12.5px var(--szg-sans);color:var(--szg-faint);flex:none;padding-top:2px}
.szg-toc__list a{text-decoration:none}
.szg-toc__list a:hover{text-decoration:underline}
.szg-toc[hidden]{display:none}

/* Сайдбар */
.szg-widget{background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);padding:20px 22px}
.szg-widget__title{font:600 11.5px var(--szg-sans);letter-spacing:.1em;text-transform:uppercase;color:var(--szg-muted-2);margin-bottom:12px}
.szg-widget ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.szg-widget li a{font-size:14px;color:var(--szg-ink);text-decoration:none}
.szg-widget li a:hover{color:var(--szg-accent)}
.szg-toc-side{display:flex;flex-direction:column}
.szg-toc-side a{font-size:13.5px;line-height:1.45;color:#41505C;text-decoration:none;padding:7px 0 7px 14px;border-left:2px solid var(--szg-line)}
.szg-toc-side a:hover,.szg-toc-side a.is-current{color:var(--szg-accent);border-left-color:var(--szg-accent)}
.szg-side-cta{background:var(--szg-accent-soft);border:1px solid var(--szg-accent-line);border-radius:var(--szg-radius);padding:20px 22px}
.szg-side-cta__title{font:600 17px/1.35 var(--szg-serif);margin:9px 0 12px}

/* Автор, дальше/раньше, похожее */
.szg-author{margin-top:40px;background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);padding:22px 24px;display:flex;gap:18px;flex-wrap:wrap}
.szg-author__body{flex:1;min-width:min(100%,280px)}
.szg-author__label{font:400 12px var(--szg-sans);color:var(--szg-muted-2);letter-spacing:.05em;text-transform:uppercase;margin-bottom:3px}
.szg-author__name{font:700 17px var(--szg-serif);margin-bottom:6px}
.szg-author p{font-size:14px;line-height:1.6;color:var(--szg-muted)}
.szg-related{margin-top:36px}
.szg-related h2{font-size:21px;margin-bottom:16px}
.szg-related__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:14px}
.szg-related__card{background:#fff;border:1px solid var(--szg-line);border-radius:12px;padding:16px 18px;text-decoration:none;color:var(--szg-ink);display:flex;flex-direction:column;gap:8px;transition:box-shadow .2s}
.szg-related__card:hover{box-shadow:0 10px 26px rgba(31,61,74,.10);color:var(--szg-ink)}
.szg-related__title{font:600 15.5px/1.4 var(--szg-serif)}
.szg-related__meta{font-size:12.5px;color:var(--szg-faint);margin-top:auto}
.szg-adjacent{display:flex;gap:14px;margin-top:36px;flex-wrap:wrap}
.szg-adjacent a{flex:1 1 240px;background:var(--szg-surface-soft);border:1px solid var(--szg-line-soft);border-radius:12px;padding:16px 18px;text-decoration:none;color:var(--szg-ink)}
.szg-adjacent a:hover{border-color:#BFD4DE;background:#F3F8FA;color:var(--szg-ink)}
.szg-adjacent__label{font:400 12px var(--szg-sans);color:var(--szg-muted-2);display:block;margin-bottom:5px}
.szg-adjacent__title{font:600 15px/1.4 var(--szg-serif)}
.szg-adjacent .szg-next{text-align:right}

/* FAQ */
.szg-faq{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.szg-entry details,.szg-faq details{background:#fff;border:1px solid var(--szg-line);border-radius:12px;overflow:hidden;margin-top:10px}
.szg-entry summary,.szg-faq summary{list-style:none;padding:16px 20px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;font:600 15.5px/1.4 var(--szg-sans);color:var(--szg-ink)}
.szg-entry summary::-webkit-details-marker,.szg-faq summary::-webkit-details-marker{display:none}
.szg-entry summary::after,.szg-faq summary::after{content:'⌄';font:400 20px var(--szg-sans);color:var(--szg-muted-2);flex:none;transition:transform .2s}
.szg-entry details[open] summary::after,.szg-faq details[open] summary::after{transform:rotate(180deg)}
.szg-entry details>*:not(summary),.szg-faq details>*:not(summary){padding:0 20px 18px;font-size:15px;line-height:1.65;color:#41505C;margin:0}

/* Гид-путеводитель */
.szg-steps{display:flex;flex-direction:column}
.szg-step{display:flex;gap:22px}
.szg-step__num{display:flex;flex-direction:column;align-items:center;flex:none}
.szg-step__badge{width:40px;height:40px;border-radius:50%;background:var(--szg-accent);color:var(--szg-bg);display:flex;align-items:center;justify-content:center;font:700 16px var(--szg-serif);box-shadow:0 0 0 5px var(--szg-bg)}
.szg-step__line{width:2px;flex:1;background:#D9D2C4;margin:4px 0}
.szg-step:last-child .szg-step__line{background:transparent}
.szg-step__body{padding:6px 0 38px;flex:1;min-width:0}
.szg-step__body h2{font-size:clamp(20px,2.6vw,25px);margin:0}
.szg-step__body p{font-size:15.5px;line-height:1.7;color:#41505C;margin:10px 0 0}
.szg-step__links{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}
.szg-step__links a{font:500 13.5px var(--szg-sans);color:var(--szg-accent);background:#fff;border:1px solid #D8E0E5;border-radius:99px;padding:8px 15px;text-decoration:none;display:inline-flex;align-items:center;gap:7px}
.szg-step__links a:hover{border-color:var(--szg-accent);background:var(--szg-accent-soft)}
.szg-step__links a::after{content:'→';color:#8FB3C4}

/* Страница и 404 */
.szg-page{max-width:760px;padding:26px 0 64px}
.szg-page h1{font-size:clamp(30px,4.5vw,42px);line-height:1.15}
.szg-page .szg-entry>p:first-of-type{font-size:18px;line-height:1.7}
.szg-features{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px;margin-top:32px}
.szg-feature{background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);padding:22px 24px}
.szg-feature h2,.szg-feature h3{font-size:17px;margin-bottom:8px}
.szg-feature p{font-size:14px;line-height:1.6;color:var(--szg-muted)}
.szg-404{max-width:640px;margin:0 auto;padding:clamp(48px,8vw,88px) 0 clamp(48px,8vw,80px);text-align:center}
.szg-404__code{font:700 clamp(72px,14vw,120px)/1 var(--szg-serif);color:#DDE7EC}
.szg-404 h1{font-size:clamp(24px,3.6vw,32px);margin-top:10px}
.szg-404 p{font-size:16px;line-height:1.65;color:var(--szg-muted);margin-top:14px}
.szg-404 .szg-searchform{margin:26px auto 0;max-width:480px}
.szg-404__popular{margin-top:34px;text-align:left;background:#fff;border:1px solid var(--szg-line);border-radius:var(--szg-radius);padding:20px 24px}
.szg-404__popular a{display:flex;align-items:center;gap:12px;padding:10px 2px;text-decoration:none;color:var(--szg-ink);border-bottom:1px solid var(--szg-line-soft);font:500 14.5px/1.4 var(--szg-sans)}
.szg-404__popular a:last-child{border-bottom:none}
.szg-404__popular a:hover{color:var(--szg-accent)}
.szg-404__actions{display:flex;gap:12px;justify-content:center;margin-top:26px;flex-wrap:wrap}

/* ==========================================================================
   8. Подвал
   ========================================================================== */
.szg-footer{background:var(--szg-footer);color:#B9C4CC;margin-top:auto}
.szg-footer__inner{padding:44px 24px 20px}
.szg-footer__cols{display:flex;gap:44px;flex-wrap:wrap;padding-bottom:32px;border-bottom:1px solid rgba(255,255,255,.09)}
.szg-footer__about{flex:2 1 280px;min-width:min(100%,260px)}
.szg-footer__brand{display:flex;align-items:center;gap:11px;margin-bottom:14px}
.szg-footer__brand .szg-brand__mark{width:34px;height:34px;font-size:14px}
.szg-footer__brand span:last-child{font:700 18px var(--szg-serif);color:#F2EFE8}
.szg-footer__about p{font-size:13.5px;line-height:1.65;max-width:340px;color:#93A1AB}
.szg-footer__col{flex:1 1 150px}
.szg-footer__title{font:600 11.5px var(--szg-sans);letter-spacing:.1em;text-transform:uppercase;color:#7E8C96;margin-bottom:12px}
.szg-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.szg-footer a{color:#C9D3DA;text-decoration:none;font-size:14px}
.szg-footer a:hover{color:#fff}
.szg-footer__bottom{padding-top:18px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12.5px;color:#7E8C96}
body{display:flex;flex-direction:column;min-height:100vh}
.szg-site{flex:1}

/* ==========================================================================
   9. Адаптив
   ========================================================================== */
@media (max-width:900px){
  .szg-nav{display:none}
  .szg-burger{display:flex}
  .szg-brand__tagline{display:none}
  .szg-sidebar{position:static;max-width:none;order:2}
  .szg-layout{gap:28px}
  .szg-switch{margin-left:0;width:100%}
  .szg-switch a{flex:1;text-align:center}
}
@media (max-width:600px){
  .szg-wrap{padding:0 18px}
  .szg-entry>p:first-child{font-size:17px}
  .szg-entry p,.szg-entry ul,.szg-entry ol{font-size:16px}
  .szg-item__media{flex:1 1 100%}
  .szg-row__media{width:96px}
  .szg-footer__cols{gap:28px}
  .szg-adjacent .szg-next{text-align:left}
}
@media print{
  .szg-header,.szg-footer,.szg-sidebar,.szg-ad,.szg-adjacent,.szg-related{display:none}
  body{background:#fff}
  .szg-layout{display:block}
}
