/* Слой правок поверх CSS оригинала (подключён последним). Генерируется tools/build.mjs из tools/src/polish.css.
   CSS оригинала не трогаем. У каждого правила комментарий: ключ находки и почему. */

/* a11y-hidden: подпись для значка «Home» (в оригинале ссылка была пустой, читалка не видела её) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; color: #097fb7; padding: 6px 10px; }
.skip-link:focus { left: 8px; top: 8px; }
[hidden] { display: none !important; }

/* breadcrumbs: видимые хлебные крошки, которых в оригинале на карточках и статьях не было */
ol.crumbs { margin: 0 0 8px; padding: 0; list-style: none; font-size: 11px; color: #666; }
ol.crumbs li { display: inline; }
ol.crumbs li + li:before { content: " \203A "; color: #999; }
ol.crumbs a { color: #097fb7; }

/* form-fields: поля форм сайта (контакты, добавить компанию) в стиле оригинала */
.tpl-form label { display: block; margin: 8px 0 3px; font-weight: bold; color: #3c5782; }
.tpl-form input[type=text], .tpl-form input[type=email], .tpl-form input[type=url], .tpl-form select, .tpl-form textarea { width: 96%; max-width: 520px; padding: 6px; border: 1px solid #ccc; font: inherit; box-sizing: border-box; }
.tpl-form textarea { max-width: 100%; width: 96%; }
.tpl-form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.tpl-form .req { color: #c00; }
.thanks-note { padding: 14px 18px; background: #eaf3ec; border: 1px solid #b7d6bd; color: #1d4d2b; margin: 8px 0; }
.archive-note { padding: 10px 14px; background: #fff7df; border: 1px solid #ecd48a; color: #5a4300; margin: 8px 0 14px; font-size: 13px; }

/* results-note: пояснение под счётчиком результатов раздела */
.searchresultsbar .results-note { margin: 4px 0 0; font-size: 12px; color: #666; }
.items .where { color: #555; font-size: 12px; margin: 2px 0; }
.more { text-align: center; margin: 14px 0; }
.az-letters { margin: 6px 0 14px; }
.az-letters a { display: inline-block; padding: 2px 7px; margin: 1px; background: #eef2f7; }
.az-list h3 { margin: 16px 0 4px; }
.az-list ul { margin: 0 0 0 18px; list-style: disc; }
.az-list li { margin: 2px 0; }

/* home-search: на главной у оригинала заголовки вкладок скрыты стилем темы, поэтому обе формы поиска показаны подряд с подписями */
.tabs-label { margin: 10px 5px 0; font-weight: bold; color: #3c5782; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
#tabs .home-search { margin: 4px 0 8px; }
#tabs #gob2 { background: url("/wp-content/plugins/google-map-it/images/search.gif") no-repeat 0 0; border: 0; cursor: pointer; float: right; height: 35px; width: 367px; max-width: 100%; margin: 3px 0; padding: 0; }

/* mobile-layout: оригинал был жёсткой вёрсткой на 960px и на телефоне уезжал вбок; на узких экранах колонки идут друг под другом */
@media (max-width: 980px) {
  body.custom-background { min-width: 0 !important; background-position: left top; background-size: auto 230px; }
  .wrapper.w_960, .w_960, .container_12, .container_16 { width: auto !important; max-width: 100% !important; }
  #header { height: auto; min-height: 90px; }
  #logo { width: auto !important; float: none; padding: 6px 10px; }
  #logo img { max-width: 70%; height: auto; }
  #banner { display: none; }
  #header > div[style] { display: none; }
  #submenubar { height: auto !important; padding: 8px 10px; margin-bottom: 6px; }
  #SearchForm, #SearchForm tr, #SearchForm td { display: block; width: auto !important; }
  #SearchForm td { padding: 3px 0; }
  #SearchForm input#s, #SearchForm select { width: 100% !important; max-width: 100%; box-sizing: border-box; margin-top: 0 !important; }
  #SearchForm .searchBtn { margin-top: 4px !important; }
  #submitButton { float: none; display: inline-block; margin: 8px 0 0 !important; }
  #submitButton img { max-width: 160px; height: auto; }
  #content { display: flex; flex-direction: column; padding: 0 10px; box-sizing: border-box; }
  #content > .middle3cols { order: 1; }
  #content > #sidebar { order: 2; }
  #content > #sidebar-left { order: 3; }
  .left3cols, .middle3cols, .right3cols { float: none !important; width: auto !important; margin: 0 0 12px !important; }
  #sidebar .sidenavbg, #sidebar .sidenavbg1 { display: inline-block; }
  #sidebar-left img, .middle3cols img { max-width: 100%; height: auto; }
  .middle3cols table { max-width: 100%; }
  .middle3cols .entry { overflow-wrap: anywhere; }
  .middle3cols select, .middle3cols input[type=text] { max-width: 100%; box-sizing: border-box; }
  #ch_countries, #ch_home_address, #ch_categories, #ch_categories2 { width: 100% !important; margin: 3px 0 !important; box-sizing: border-box; }
  #gob, #gob2 { width: 100% !important; float: none !important; }
  #footer .left3cols, #footer .middle3cols, #footer .right3cols { margin: 0 0 14px !important; }
  #footer .w_960 { padding: 0 12px; box-sizing: border-box; }
  .itemboxinner, .itembox { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
  .page_tabs li { float: left; }
  ul.items li .preview { float: none; }
}

/* text-invisible:9be8a4 / text-invisible:e060d7: заголовки и ссылки подвала были белыми на светло-сером (1.5:1); цвет текста тёмной гаммы сайта, фон не меняем */
#footer p, #footer .textwidget, #footer li { color: #222; }
#footer h3, #footer h3 a { color: #124f8e; }
#footer a { color: #124f8e; }
#footer #copyright p, #footer #copyright a { color: #222; }
#footer #copyright a { text-decoration: underline; }
/* grid-ragged:4ccb78: в трёх колонках подвала картинка стояла только в одной */
/* contrast-low:8c9f21 / 51893d: серые подписи счётчика и пути на светлом фоне */
.searchresultsbar p, .searchresultsbar .current, ol.path li.current { color: #4a4a4a; }
/* contrast-low:5ed92d: белая надпись на салатовой кнопке «More Info» (2.4:1) - тот же зелёный, темнее */
a.green.button, a.gray.button { }
.featuredlisting .actions a.green.button, li .actions a.green.button { background: #3f6200 !important; background-image: none !important; color: #fff !important; border-color: #324e00 !important; }
/* contrast-low:0d7bba / 8f4b28: ссылка «Home» в крошках светлее нормы */
ol.crumbs a, ol.path a { color: #0a5a86; }
/* img-stretched:a4aa29: картинки левой колонки с жёсткими width/height растягивались */
#sidebar-left img { height: auto; max-width: 100%; }

/* menu: в оригинале верхнее меню скрыто стилем темы (.menu{display:none}), и до Articles, BBC-страниц и Submit можно было добраться только случайно; показываем его полосой под шапкой */
#menubar.menu { display: block; background: #124f8e; }
#menubar.menu ul { margin: 0 auto; padding: 0; }
#menubar.menu li { display: inline-block; float: none; border: 0; list-style: none; }
#menubar.menu li a { display: inline-block; padding: 8px 12px; color: #fff; font-size: 12px; font-weight: bold; background: none; text-decoration: none; }
#menubar.menu li a:hover, #menubar.menu li a:focus { background: #0a3a6e; }
#menubar.menu li.first { display: none; }
.menu-toggle { display: none; }

@media (max-width: 980px) {
  /* menu-phone-missing:0cbe49: на телефоне меню было спрятано без кнопки */
  .menu-toggle { display: block; position: absolute; top: 8px; right: 10px; z-index: 5; margin: 0; padding: 10px 16px; min-height: 44px; font-weight: bold; font-size: 14px; line-height: 1; background: #fff; color: #124f8e; border: 2px solid #124f8e; border-radius: 4px; }
  #menubar.menu { display: none; }
  body.menu-open #menubar.menu { display: block; }
  #menubar.menu li { display: block; }
  #menubar.menu li a { display: block; padding: 12px 14px; font-size: 15px; border-top: 1px solid #3c5782; }
  /* small-text:*: основной текст на телефоне от 14-16 px */
  .middle3cols p, .middle3cols li, .middle3cols .tagline, .middle3cols .excerpt, .where, .results-note, ol.crumbs, .tags1, .searchresultsbar p, .items .title, #sidebar-left, #footer p, #footer li, .tpl-form label { font-size: 15px; line-height: 1.45; }
  /* tap-small:6d0f88: поля и кнопки шапки не мельче 44 px */
  #SearchForm input#s, #SearchForm select, #SearchForm .searchBtn, .tpl-form input[type=text], .tpl-form input[type=email], .tpl-form select, #ch_countries, #ch_home_address, #ch_categories, #ch_categories2 { min-height: 44px; }
  #SearchForm .searchBtn { min-width: 54px; }
}

/* overflow-x: линейки-разделители главной имели жёсткие 530px и давали горизонтальную прокрутку на телефоне */
.middle3cols .aligncenter { max-width: 100%; box-sizing: border-box; }

/* box-cut:33215d: полоса меню имеет высоту по содержимому, пункты переносятся */
#menubar.menu { height: auto !important; min-height: 0; overflow: visible; }
#menubar.menu ul { height: auto; overflow: visible; }
/* contrast-low:8c9f21: серые жирные названия подкатегорий в таблице раздела */
.itemboxinner table b, .itemboxinner table span b { color: #4a4a4a; }
/* tap-small:c36d1c: ссылка «Home» в крошках нажимается пальцем */
@media (max-width: 980px) {
  ol.crumbs a, ol.path a { display: inline-block; padding: 10px 6px; }
  .itemboxinner .searchresultsbar p, .itemboxinner .searchresultsbar .left p, .searchresultsbar .results-note { font-size: 15px !important; }
}

#header { position: relative; }

/* mobile-overflow: жёсткие ширины колонок темы (middle2cols 630-670, middle3cols 540, колонки подвала 300 px) на телефоне давали ширину страницы 652 px */
@media (max-width: 980px) {
  .left2cols, .middle2cols, .right2cols, .left3cols, .middle3cols, .right3cols,
  #footer .left2cols, #footer .middle2cols, #footer .right2cols, #footer .left3cols, #footer .middle3cols, #footer .right3cols,
  #PPTHomePage .middle3cols, #PPTHomePage .middle2cols { width: auto !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; float: none !important; box-sizing: border-box; }
  #footer .w_960, #footer .w_960 > div, #content, #page .w_960, #submenubar .w_960 { width: auto !important; max-width: 100% !important; }
  .FAQ_Content .featured, .FAQ_Content .categoryItem { width: auto !important; }
  #footer ul, #footer li, #footer div, #ppt-widget-article-box, .ppt-widget-featured-box { max-width: 100%; box-sizing: border-box; }
  #footer img { max-width: 100%; height: auto; }
  table { max-width: 100%; }
}
/* img-size: у картинок проставлены width и height (меньше сдвигов вёрстки), а на узких экранах и в колонках их пропорции держит auto */
.middle3cols img, #sidebar-left img, #footer img, #sidebar img { height: auto; }
.middle3cols img[width="200"][height="10"], #sidebar-left img[width="200"][height="10"] { height: 10px; }
/* ids-to-class: повторявшиеся id виджета «Featured» переведены в class, правило темы продублировано */
.ppt-widget-featured-box .imgb { float: left; width: 60px; }

/* img-stretched:0a9533: миниатюра пресс-релиза в подвале на телефоне растягивалась вширь (в разметке теперь есть width и height) */
#ppt-widget-article-box img, #ppt-widget-article-box li img, .ppt-widget-article-box img { height: auto !important; }
/* img-stretched:69aec4 / 854956: тема ограничивает миниатюры по max-width и max-height; с width/height в разметке пропорции держит contain */
.middle3cols img, #sidebar-left img, #footer img, #sidebar img { object-fit: contain; }
/* tap-small:c36d1c: «Home» в пути раздела на телефоне нажимается пальцем */
@media (max-width: 980px) { .searchresultsbar ol.path a, ol.path li a { display: inline-block !important; padding: 10px 8px !important; min-height: 32px; box-sizing: border-box; } }

/* font-fallback: тема просит Century Gothic, которого нет у большинства посетителей, и текст рисовался Verdana или системным шрифтом.
   Свободная замена по метрике (TeX Gyre Adventor под именем TPL Gothic, лицензия GUST рядом, свои файлы, без внешних запросов) стоит в стеке body первой, Century Gothic из стека убран; шрифты, которые тема задаёт элементам сама (Times, Arial и др.), не трогаем */
@font-face { font-family: "TPL Gothic"; src: url("/assets/fonts/tplgothic-regular.woff2") format("woff2"); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: "TPL Gothic"; src: url("/assets/fonts/tplgothic-bold.woff2") format("woff2"); font-weight: bold; font-style: normal; font-display: swap; }

/* grid-ragged:4ccb78: три колонки подвала (Popular, Press Releases, Featured) были разной высоты и с картинкой только в одной.
   Колонки стоят в ряд одной высоты */
@media (min-width: 981px) {
  #footer > .w_960 { display: flex; flex-wrap: wrap; align-items: stretch; }
  #footer > .w_960 > .left3cols, #footer > .w_960 > .middle3cols, #footer > .w_960 > .right3cols { float: none; flex: 1 1 0; min-width: 0; box-sizing: border-box; }
  #footer > .w_960 > .clearfix, #footer > .w_960 > #copyright { flex: 0 0 100%; }
}

/* font-fallback (побочный эффект замены): подписи правого меню в теме с letter-spacing:-1px под Century Gothic слипались */
.sidenavbg span, .sidenavbg1 span { letter-spacing: 0; font-size: 11px; }

/* contrast-low:c6d551: серая кнопка «More Info» (#666 на сером градиенте, 4.47:1) - текст темнее той же гаммы */
a.gray.button, .actions a.gray.button { color: #404040; }

/* font-fallback (следствие): заголовки темы имеют letter-spacing:-1px, рассчитанный на другой шрифт; с TPL Gothic буквы слипались - интервал нормальный */
.itembox h1, .itembox h2, .itembox h3, .itembox h3 a, #footer h3, #footer h3 a, #footer .contentb h3 a, .items .title { letter-spacing: 0; }
/* вводные абзацы главной (Times из строчных стилей оригинала) остаются как в архиве, с интервалом темы */

/* listing-logo: картинки записей версии 2009 на /Camera.html стоят слева от названия */
.items .listing-logo { float: left; margin: 0 12px 6px 0; max-width: 90px; max-height: 90px; height: auto; object-fit: contain; }

/* contrast-low:142533 / text-invisible:c0c33f / contrast-low:1aa807: в витринах разделов вернувшиеся картинки (оригинал большой, миниатюры il150x110 архив не сохранил)
   растягивались под текст карточки; превью держится в рамке 150x110 слева, текст остаётся на своём фоне */
.items .preview { overflow: hidden; }
.items .preview img, ul.items li img { max-width: 150px; max-height: 110px; width: auto; height: auto; object-fit: contain; }

/* h1:4a27b7: второй H1 страницы стал h2.h1like (на странице ровно один H1); правила темы для h1 повторены для него, вид тот же */
h2.h1like{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;}
h2.h1like{padding:5px 0;margin:5px 0;color:#ccc;}
h2.h1like{font-size:32px;line-height:34px;letter-spacing:-1px;}
#description_display h2.h1like{background:none;padding:2px;filter:none;border:0px;}
#begin h2.h1like{background:none!important;filter:none!important;border:0px!important;}
.article h2.h1like{background:none!important;background-image:none;filter:none;border:0px!important;padding-left:0px!important}
#articlepage h2.h1like{border:0px!important;padding-left:0px;}
h2.h1like{color:#097fb7;}
.itembox h2.h1like{color:#404040;font-size:17px;padding:5px 3px 5px 15px;margin:0px;border:1px solid #fff;filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#efefef',EndColorStr='#e0e0e0');background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#efefef),color-stop(1,#e0e0e0));background-image:-webkit-linear-gradient(top,#efefef 0%,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#efefef 0%,#e0e0e0 100%);background-image:-ms-linear-gradient(top,#efefef 0%,#e0e0e0 100%);background-image:-o-linear-gradient(top,#efefef 0%,#e0e0e0 100%);background-image:linear-gradient(top,#efefef 0%,#e0e0e0 100%);border-bottom:1px solid #ddd;}
#PPTSinglePage-post #begin h2.h1like{font-size:25px;margin-top:-10px;color:#666;}
h2.h1like{color:#124f8e;}
