html, body { overflow-x: hidden; }
:root {
  --brand: #f08440;
  --brand-dark: #c9662a;
  --ink: #2b2b2b;
  --muted: #6b6f72;
}

/* ---------- современная сетка: шире контейнер ---------- */
.main,
.tail-header .main { width: min(1280px, calc(100% - 48px)) !important; }

#content { padding: 32px 40px 0 !important; }

#text a,
.article-text-indent a { color: var(--brand-dark); }

#text img,
.article-text-indent img { max-width: 100%; height: auto; }

/* ---------- мобильная адаптация ---------- */
@media (max-width: 991.98px) {
  .main,
  .tail-header .main { width: calc(100% - 24px) !important; }

  #content { padding: 20px 14px 0 !important; }

  .tail-header { height: auto !important; padding-bottom: 16px; }
  .tail-header .main > table { height: auto !important; }
  .tail-header .main > table,
  .tail-header .main > table > tbody,
  .tail-header .main > table > tbody > tr { display: block; }
  .tail-header .main > table > tbody > tr > td { display: block; width: 100% !important; }

  #logo { height: auto !important; padding: 12px 0 4px; }
  #logo img { max-width: 220px; height: auto; }
  #logo a { display: inline-block; }

  .row-top-menu ul.menu-nav {
    padding: 12px 0 0 !important;
    margin: 0 !important;
    display: block !important;
  }
  .row-top-menu ul.menu-nav > li { width: 100% !important; float: none !important; margin: 0 0 12px; }
  .row-top-menu ul.menu-nav > li > a { float: none; display: block; }
  .row-top-menu ul.menu-nav > li > a > span { padding: 4px 0 !important; }
  .row-top-menu ul.menu-nav > li > ul.submenu { height: auto !important; margin-left: 10px !important; }

  .banner-table, .banner-table .main { width: 100% !important; max-width: 100% !important; }
  .row-banner-clean {
    height: auto !important;
    width: 100% !important;
    aspect-ratio: 1050 / 250;
    background-size: 100% 100% !important;
    background-position: center !important;
  }

  .footer-indent { padding: 0 14px !important; }
}

#text ul li a, .article-text-indent ul li a { color: #c9662a; }

#menu_main_mediagroup > a { cursor: default; }
#menu_main_mediagroup > a:hover > span { color: #FFF !important; }

#text .services-grid {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px;
}
#text .services-grid li {
  padding: 0 !important; margin: 0; background: #fff !important;
  border: 1px solid #e9eaeb; border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
#text .services-grid li:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-1px); border-color: #f3c9a8; }
#text .services-grid li > a {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; height: 100%;
  color: inherit !important; text-decoration: none !important; border: 0;
  font-size: 16px !important; line-height: 1.4 !important;
}
#text .services-grid .title { display: block; color: #1f1f1f; font-weight: 600; font-size: 16px !important; line-height: 1.4; }
#text .services-grid li > a:hover .title { color: #c9662a; }
#text .services-grid .ico svg { width: 24px; height: 24px; stroke: #c9662a; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#text .services-grid .desc { display: block; color: #6b6f72; font-size: 13px; line-height: 1.45; margin-top: 2px; }

/* ---------- фон: белый до низа + фиксированная серая полоса ---------- */
html { background: #fff; }
#body { background: #fff !important; }
.tail-content { border-bottom: 0 !important; background: #fff; }
body { padding-bottom: 20px; }
body::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 20px;
  background: #ced2d3;
  z-index: 9999;
  pointer-events: none;
}

/* ---------- sticky-футер: копирайт + счётчик ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; padding-bottom: 0; }
.tail-content { display: flex; flex-direction: column; flex: 1 0 auto; padding-bottom: 20px !important; }
.tail-content .main { display: flex; flex-direction: column; flex: 1 0 auto; }
.footer-indent {
  position: static !important;
  margin-top: auto !important;
  margin-left: 40px !important; margin-right: 40px !important;
  width: auto;
  box-sizing: border-box;
  background: #fff;
  border-top: 1px solid #e4e4e4;
  padding: 12px 0 0 !important;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-indent .footer {
  float: none !important; padding: 0 !important; border: 0 !important;
  color: #8e8e8e; font-size: 13px !important;
}
.footer-indent > div { float: none !important; padding: 0 !important; }
@media (max-width: 991.98px) {
  .footer-indent { width: auto; margin-left: 14px !important; margin-right: 14px !important; padding: 10px 0 0 !important; gap: 10px; }
  .footer-indent .footer { font-size: 12px !important; }
}

/* ---------- выравнивание логотипа по контенту ---------- */
.tail-header .main { padding: 0 40px; box-sizing: border-box; }
.tail-header .main > table > tbody > tr > td:first-child { display: none; }
.tail-header .main > table > tbody > tr > td:nth-child(2) { width: auto !important; text-align: left !important; }
#logo { justify-content: flex-start !important; }
@media (max-width: 991.98px) {
  .tail-header .main { padding: 0 14px; }
}

/* кнопки-картинки без подчёркивания */
#text a:has(img), .article-text-indent a:has(img), #text table.dictors a { border-bottom: 0 !important; }


/* выравнивание кнопок в строках дикторов */
#text table.dictors a { display: inline-block; vertical-align: middle; line-height: 0; }
#text table.dictors .ico-play,
#text table.dictors .ico-download { display: block; }

/* ---------- CSS-кнопки плеера и скачивания ---------- */
#text table.dictors a.player {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(#ffffff, #e2e3e4);
  border: 1px solid #c9cbcc; border-bottom: 1px solid #c9cbcc !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 #fff;
  vertical-align: middle; line-height: 0; cursor: pointer; text-decoration: none !important;
  transition: box-shadow .12s ease, background .12s ease;
}
#text table.dictors a.player::before {
  content: ""; display: block; width: 0; height: 0;
  border-left: 7px solid #5a5d5f; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  margin-left: 2px;
}
#text table.dictors a.player:hover { background: linear-gradient(#ffffff, #ececec); }
#text table.dictors a.player.is-playing {
  background: linear-gradient(#d9dde0, #c3c8cc);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.28);
}
#text table.dictors a.player.is-playing::before {
  width: 7px; height: 7px; border: 0; margin: 0; background: #45484a; border-radius: 1px;
}
#text table.dictors a.btn-download {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 10px 0 8px; border-radius: 11px;
  background: linear-gradient(#fdfdfd, #e1e2e3);
  border: 1px solid #c9cbcc; border-bottom: 1px solid #c9cbcc !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.10), inset 0 1px 0 #fff;
  font-size: 11px; line-height: 1; color: #555 !important;
  text-decoration: none !important; vertical-align: middle;
}
#text table.dictors a.btn-download::before {
  content: ""; width: 8px; height: 9px; background: #555;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
#text table.dictors a.btn-download::after { content: "Скачать"; }
#text table.dictors a.btn-download:hover { background: linear-gradient(#ffffff, #ececed); }
#text table.dictors a.btn-download:active { box-shadow: inset 0 2px 3px rgba(0,0,0,.2); }

/* ---------- хронометраж: без рамки, на всю ширину ---------- */
#content2, #column_main { width: 100% !important; margin: 0 !important; padding: 0 !important; }
#hronomer { position: relative; margin: 24px 0 0 !important; max-width: none; width: 100%; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
#hr_settings { position: static !important; float: none !important; width: 100% !important; height: auto !important; margin: 0 0 12px !important; background: transparent !important; }
#hr_settings table { width: 100% !important; }
#hr_settings td { font-size: 14px !important; vertical-align: middle !important; }
#hr_history { display: none !important; }
#hr_input { position: static !important; float: none !important; width: 100% !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
#hr_input textarea { width: 100% !important; height: 220px !important; box-sizing: border-box; padding: 12px !important; border: 1px solid #d5d8da !important; border-radius: 10px; font-size: 15px !important; line-height: 1.6 !important; outline: none; resize: vertical; }
#hr_clear { position: relative !important; float: right !important; top: 0 !important; margin: 10px 0 0 !important; }
#hr_comments { position: static !important; float: left !important; width: auto !important; height: auto !important; margin: 12px 0 0 !important; font-size: 13px !important; }
#hr_results { position: static !important; float: none !important; width: 100% !important; height: auto !important; margin: 12px 0 0 !important; clear: both; }
#wordsresult table { width: 100% !important; }
#minhrtxtpanel, #opthrtxtpanel { top: 0 !important; }
@media (max-width: 820px) { #hr_input textarea { height: 180px !important; } }

/* ---------- Bootstrap-форма хронометража ---------- */
#hr_clear { background: none !important; box-shadow: none !important; width: auto !important; height: auto !important; padding: 0 !important; border: 0 !important; float: right !important; margin: 12px 0 0 !important; }
#hr_clear #btn_clear { background-image: none !important; }
#hr_settings { display: flex !important; align-items: center; flex-wrap: wrap; gap: 16px; margin: 0 0 16px !important; }
#hr_settings .form-control { height: 38px; font-size: 15px; }
#hr_settings .form-check-input { width: 18px; height: 18px; margin-top: 0; }
#hr_settings .form-check { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; }
#hr_settings .form-check-label { margin: 0; font-size: 15px; }
.hr-words-row { display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.hr-words-label { font-size: 15px; }
.hr-words-value { font-size: 15px; font-weight: 600; }
.hr-words-action { font-size: 15px; }
#hr_results { clear: both; }

/* ---------- типографика инструкции хронометража ---------- */
.hrono-lead { font-size: 24px !important; line-height: 1.3 !important; font-weight: 600 !important; color: #1f1f1f !important; margin: 28px 0 16px !important; }
.hrono-rules { margin: 0 0 28px !important; padding-left: 1.4em !important; max-width: 980px; }
.hrono-rules li { font-size: 16px !important; line-height: 1.65 !important; color: #2b2b2b !important; margin-bottom: 8px; padding-left: 4px; }
.hrono-rules li::marker { color: #c9662a; font-weight: 600; }
.hrono-rules .example {
    display: block;
    margin-top: 6px;
    padding: 2px 0 2px 12px;
    border-left: 3px solid #d5d8da;
    color: #6b6f72;
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Bootstrap-форма Страницемера ---------- */
#str { display: block; width: 100%; }
#str > table, #str > tbody { width: 100% !important; }
#str table { width: 100% !important; }
#str table.tinput { background: none !important; width: 100% !important; }
#str .textin { width: 100% !important; height: 220px !important; padding: 12px !important; box-sizing: border-box; border: 1px solid #d5d8da !important; border-radius: 10px; font-size: 15px !important; line-height: 1.6 !important; font-family: inherit !important; }
#str .form-select { height: 38px; font-size: 15px; }
#str input[type=radio] { width: 18px; height: 18px; accent-color: #c9662a; vertical-align: middle; }
#str .hrnmtrj { width: 72px !important; height: 38px !important; padding: 0 8px !important; border: 1px solid #d5d8da !important; border-radius: 8px !important; font-size: 15px !important; text-align: center; }
#hmrback, #hmrforward { display: none !important; }
#pagescntlbl, #pagescnt, #pagesfont { font-size: 15px !important; }
#str .btn { white-space: nowrap; }
@media (max-width: 820px) { #str .textin { height: 180px !important; } }

/* Страницемер: мелкие отступы и разделитель */
#str td.label { padding-right: 12px !important; }
#str input[type=radio] { margin-right: 6px; }
#str td[style*="grp.gif"] { background: #e6e8ea !important; height: 1px !important; padding: 0 !important; }
#str td[style*="grp.gif"] img { display: none; }
#pagescntlbl { font-weight: 600; }

/* Страницемер: строка режимов, кнопки, результаты */
html { overflow-y: scroll; }
.str-mode-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; font-size: 15px; }
.str-radio, .str-time { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.str-radio { cursor: pointer; }
.str-actions { display: flex; gap: 10px; flex-wrap: nowrap; width: max-content; }
#str .btn-primary { background: #c9662a !important; border-color: #c9662a !important; }
#str .btn-primary:hover { background: #a84e1c !important; border-color: #a84e1c !important; }
#str .btn-outline-secondary { color: #c9662a !important; border-color: #c9662a !important; }
#str .btn-outline-secondary:hover { background: #c9662a !important; color: #fff !important; }
#str #pagescntlbl, #str #pagescnt, #str #pagesfont {
  font-family: inherit !important;
  font-size: 15px !important;
}
#str #pagescntlbl, #str #pagescnt { font-weight: 600 !important; }

.str-result { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.str-result #pagescntlbl, .str-result #pagescnt, .str-result #pagesfont { font-family: inherit !important; font-size: 15px !important; line-height: 1.6 !important; }
.str-result #pagescntlbl, .str-result #pagescnt { font-weight: 600 !important; }

/* одинаковая ширина меню на всех страницах */
@media (min-width: 1200px) {
  .row-top-menu { width: 100% !important; text-align: right; }
  .row-top-menu ul.menu-nav { display: inline-block !important; width: 660px !important; margin: 0 !important; text-align: left; }
  .row-top-menu ul.menu-nav > li { width: 33.3333% !important; }
  .row-top-menu ul.menu-nav > li > ul.submenu { margin-left: 0 !important; padding-left: 0 !important; }
  .row-top-menu ul.menu-nav > li > ul.submenu li { padding-left: 32px !important; background-position: 10px center !important; }
}

/* ---------- Страницемер: форма на flex ---------- */
#str { display: flex; flex-direction: column; gap: 16px; }
.str-toolbar { display: flex; gap: 12px; flex-wrap: wrap; }
.str-textarea {
  width: 100% !important; min-height: 220px;
  padding: 12px !important; box-sizing: border-box;
  border: 1px solid #d5d8da !important; border-radius: 10px;
  font-size: 15px !important; line-height: 1.6 !important;
  font-family: inherit !important; resize: vertical;
}
.str-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.str-hint { color: #6b6f72; font-size: 13px; }
.str-sep { border: 0; border-top: 1px solid #e6e8ea; margin: 4px 0; width: 100%; }
@media (max-width: 820px) { .str-textarea { min-height: 180px; } }
