/* enhance.css — адаптив + полировка + запасная тема (нейтральная).
   Грузится ПОВЕРХ родного стиля, ничего не переписывая. */
html{-webkit-text-size-adjust:100%}
*{box-sizing:border-box}
img,embed,object,video,iframe,svg{max-width:100%;height:auto}
body{line-height:1.55;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
#content p,#content li,.entry-content p,.post p{line-height:1.65}
a{transition:color .15s ease}
img{border-radius:2px}
table{max-width:100%}
img[data-g1-src-desktop],img[data-g1-src-mobile],img[data-src],img[data-lazy-src],.g1-lazy{opacity:1 !important;visibility:visible !important}
.g1-mediabox--slider .g1-slides li{display:block !important}

/* фиксированную ширину делаем резиновой на узких экранах */
@media (max-width:1000px){
  #pageWrapper,#pageHeader,#content,#leftCol,#rightCol,#wrapper,#page,#main,#container,
  .container,.wrapper{width:auto !important;max-width:1000px !important;float:none !important}
  #pageWrapper,#wrapper,#page,#main{margin-left:auto;margin-right:auto}
  #pageHeader{background-size:cover !important;background-position:top center !important;
    height:auto !important;min-height:0 !important;aspect-ratio:960/120}
  #mainMenu,#nav,.menu{display:flex;flex-wrap:wrap}
  #mainMenu a{flex:1 1 auto;text-align:center}
}
@media (max-width:600px){
  body{font-size:15px}
  blockquote{float:none !important;width:auto !important}
}
@media (max-width:700px){
  #content table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
}

/* ===== ЗАПАСНАЯ ТЕМА (для страниц без сохранившейся родной темы) =====
   Аккуратная светлая «карточка» — хорошо смотрится на любом фоне. */
body.wr-fallback{
  background:#eef1f5;color:#1f2630;
  font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;margin:0;padding:0
}
.wr-fallback #wrapper,.wr-fallback #page,.wr-fallback #main,.wr-fallback #content,
.wr-fallback #container,.wr-fallback .hfeed,.wr-fallback .site{
  max-width:900px;margin:24px auto;background:#fff;padding:28px 32px;
  border:1px solid #e2e6ec;border-radius:8px;box-shadow:0 1px 4px rgba(20,30,50,.06)
}
.wr-fallback h1,.wr-fallback h2,.wr-fallback h3,
.wr-fallback .entry-title,.wr-fallback .post-title{
  color:#16324f;line-height:1.25;margin:1em 0 .4em
}
.wr-fallback .entry-title,.wr-fallback .post-title{font-size:1.5em}
.wr-fallback p,.wr-fallback li,.wr-fallback td{line-height:1.7}
.wr-fallback a{color:#1f6feb}
.wr-fallback a:hover{color:#0b4fc0}
.wr-fallback .post,.wr-fallback .hentry,.wr-fallback article{
  padding-bottom:1.25em;margin-bottom:1.25em;border-bottom:1px solid #edf0f4
}
.wr-fallback .postmetadata,.wr-fallback .entry-meta,.wr-fallback .meta,.wr-fallback small{
  color:#6b7686;font-size:.85em
}
.wr-fallback #sidebar,.wr-fallback .sidebar,.wr-fallback #secondary{
  background:#f6f8fb;border:1px solid #e2e6ec;padding:14px 16px;border-radius:6px;margin-top:16px
}
@media (max-width:1000px){
  .wr-fallback #sidebar,.wr-fallback .sidebar,.wr-fallback #secondary{
    float:none !important;width:auto !important}
}
