/* ==================================================================
   webmasterrs.ru — обновлённое оформление темы VertiMagazine.

   Подключается последним (после style.css, responsive.css, reset.css,
   bootstrap.css) и перекрывает старые правила, не трогая их: откатить
   дизайн можно, просто убрав wp_enqueue_style('wm-redesign').
   Картинки в images/design/ сгенерированы FLUX.1-schnell (Hugging Face).
   ================================================================== */

:root {
    --wm-navy: #0b2340;
    --wm-navy-2: #12325a;
    --wm-accent: #14a3c7;
    --wm-accent-dark: #0d7fa0;
    --wm-hot: #e5484d;
    --wm-text: #1f2a37;
    --wm-muted: #64748b;
    --wm-line: #e4e9f0;
    --wm-bg: #f3f6fa;
    --wm-card: #ffffff;
    --wm-radius: 14px;
    --wm-shadow: 0 1px 2px rgba(15, 35, 64, .06), 0 6px 20px rgba(15, 35, 64, .06);
    --wm-shadow-hover: 0 2px 4px rgba(15, 35, 64, .08), 0 14px 32px rgba(15, 35, 64, .12);
    --wm-max: 1200px;
    --wm-font: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- База ---------- */
html body,
html body.custom-background {
    background: var(--wm-bg) !important;
    background-image: none !important;
    color: var(--wm-text);
    font-family: var(--wm-font) !important;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body input, body button, body select, body textarea {
    font-family: var(--wm-font);
}
a { color: var(--wm-accent-dark); transition: color .2s; }
a:hover, a:focus { color: var(--wm-navy); text-decoration: none; }
::selection { background: var(--wm-accent); color: #fff; }
img { max-width: 100%; height: auto; }

/* ---------- Верхнее меню ---------- */
#topnav {
    width: auto;
    height: auto;
    padding: 0;
    background: var(--wm-navy);
    border-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
#topnav .navbar { margin: 0; }
#topnav .navbar-inner {
    background: none;
    border: 0;
    box-shadow: none;
    filter: none;
    min-height: 0;
    padding: 0;
    border-radius: 0;
}
#topnav .container {
    width: auto;
    max-width: var(--wm-max);
    margin: 0 auto;
    padding: 0 24px;
}
#topnav ul.nav { float: none; display: flex; flex-wrap: wrap; }
#topnav ul.nav > li { float: none; }
/* bootstrap.css задаёт пункту меню фон-разделитель, размер и цвета с !important */
#topnav ul.nav > li > a {
    padding: 0 16px !important;
    min-height: 0 !important;
    line-height: 56px;
    font-size: 15px !important;
    font-weight: 500;
    color: rgba(255, 255, 255, .86) !important;
    text-shadow: none !important;
    background: none !important;
    position: relative;
}
#topnav ul.nav li.menu-item-has-children > a { padding-right: 28px !important; }
#topnav ul.nav > li > a:after {
    content: "";
    position: absolute;
    left: 16px; right: 16px; bottom: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--wm-accent);
    transform: scaleX(0);
    transition: transform .2s;
}
#topnav ul.nav > li > a:hover,
#topnav ul.nav > li.current-menu-item > a,
#topnav ul.nav > li.current-menu-parent > a {
    color: #fff !important;
}
#topnav ul.nav > li > a:hover:after,
#topnav ul.nav > li.current-menu-item > a:after,
#topnav ul.nav > li.current-menu-parent > a:after { transform: scaleX(1); }

#topnav ul.nav li.menu-item-has-children > a:before {
    content: "";
    position: absolute;
    right: 12px; top: 50%;
    margin-top: -3px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    opacity: .7;
}
#topnav ul.nav li ul.sub-menu {
    top: 100%;
    left: 4px;
    min-width: 230px;
    padding: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--wm-shadow-hover) !important;
    text-shadow: none !important;
    text-align: left;
    overflow: visible;
}
#topnav ul.nav li ul.sub-menu li { display: block; }
#topnav ul.nav li ul.sub-menu li a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--wm-text);
    white-space: nowrap;
}
#topnav ul.nav li ul.sub-menu li a:hover { background: var(--wm-bg); color: var(--wm-accent-dark); }
#topnav select.tinynav {
    width: 100%;
    margin: 10px 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 0;
    height: auto;
}

/* ---------- Шапка: логотип и поиск ---------- */
header {
    width: auto;
    max-width: var(--wm-max);
    height: auto !important;
    margin: 0 auto;
    padding: 26px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
#logo { width: auto; height: auto; float: none; margin: 0; }
#logo img { display: block; height: 48px; width: auto; max-height: none; }
#respon_socialmedia { display: none !important; }
#search { float: none; width: 100%; max-width: 440px; margin: 0; }
#search #searchform,
.search-form {
    display: flex;
    background: #fff;
    border: 1px solid var(--wm-line);
    border-radius: 999px;
    padding: 4px;
    box-shadow: var(--wm-shadow);
    transition: border-color .2s, box-shadow .2s;
}
#searchform:focus-within,
.search-form:focus-within { border-color: var(--wm-accent); box-shadow: 0 0 0 4px rgba(20, 163, 199, .15); }
#searchform #s,
#search .search,
.search-form .search {
    flex: 1;
    width: auto;
    height: auto;
    float: none;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 15px;
    font-weight: 400;
    color: var(--wm-text);
    font-family: var(--wm-font);
    outline: none;
}
#searchform #searchsubmit,
.searchbutton {
    float: none;
    width: auto;
    padding: 10px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--wm-accent);
    color: #fff;
    font-family: var(--wm-font);
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    text-shadow: none;
    transition: background .2s;
}
#searchform #searchsubmit:hover,
.searchbutton:hover { background: var(--wm-accent-dark); }

#headernav {
    width: auto;
    max-width: var(--wm-max);
    margin: 0 auto 16px;
    padding: 0 24px;
    background: none;
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#headernav a {
    float: none;
    min-height: 0;
    line-height: 1.4;
    padding: 6px 14px;
    border: 1px solid var(--wm-line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    color: var(--wm-muted);
}
#headernav a:hover { color: var(--wm-accent-dark); border-color: var(--wm-accent); }

/* ---------- Hero на главной ---------- */
.wm-hero {
    max-width: var(--wm-max);
    margin: 0 auto 28px;
    box-sizing: border-box;
    border-radius: 20px;
    background-color: var(--wm-navy);
    background-size: cover;
    background-position: right center;
    position: relative;
    overflow: hidden;
    color: #fff;
}
@media (min-width: 1249px) {
    .wm-hero { width: calc(100% - 48px); }
}
.wm-hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(4, 16, 38, .92) 0%, rgba(4, 16, 38, .75) 45%, rgba(4, 16, 38, 0) 75%);
}
.wm-hero__inner {
    position: relative;
    max-width: 640px;
    padding: 56px 48px;
}
.wm-hero__kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(20, 163, 199, .2);
    border: 1px solid rgba(20, 163, 199, .45);
    color: #7fdcf2;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
html body .wm-hero__title {
    margin: 0 0 22px;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
}
.wm-hero__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.wm-hero__cats a {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: background .2s, border-color .2s;
}
.wm-hero__cats a:hover { background: var(--wm-accent); border-color: var(--wm-accent); color: #fff; }

/* ---------- Основная сетка ---------- */
#wrap {
    width: auto;
    max-width: var(--wm-max);
    margin: 0 auto 48px;
    padding: 0 24px;
    background: none;
    box-shadow: none;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    box-sizing: border-box;
}
#content {
    float: none;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
    border: 0;
}
#sidebar,
#wrap > .wm-ad-center {
    float: none;
    flex: 0 0 300px;
    width: 300px;
    margin: 0;
    position: sticky;
    top: 76px;
}

html body .archivetitle,
html body h1.archivetitle,
.wm-section-title {
    width: auto;
    height: auto;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    color: var(--wm-navy);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
}
.wm-section-title { font-size: 22px; display: flex; align-items: center; gap: 12px; }
.wm-section-title:after { content: ""; flex: 1; height: 1px; background: var(--wm-line); }
.archivedesc { width: auto; color: var(--wm-muted); font-size: 15px; }

/* ---------- Карточки записей ---------- */
.post.wm-card,
.wm-card {
    width: auto;
    min-height: 0;
    display: flex;
    gap: 22px;
    margin: 0 0 20px;
    padding: 20px;
    background: var(--wm-card);
    border-radius: var(--wm-radius);
    box-shadow: var(--wm-shadow);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s;
}
.wm-card:hover { box-shadow: var(--wm-shadow-hover); transform: translateY(-2px); }
.wm-card__thumb {
    flex: 0 0 200px;
    width: 200px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--wm-bg);
    display: block;
}
.wm-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    float: none;
    margin: 0;
    transition: transform .4s;
}
.wm-card:hover .wm-card__thumb img { transform: scale(1.05); }
.wm-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wm-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 13px;
    color: var(--wm-muted);
}
.wm-card__meta time:before,
.wm-card__comments:before { content: "·"; margin-right: 12px; color: #c3cbd6; }
.wm-chip + time:before { display: none; }
.wm-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(20, 163, 199, .1);
    color: var(--wm-accent-dark);
    font-size: 12px;
    font-weight: 600;
}
.wm-chip:hover { background: var(--wm-accent); color: #fff; }
html body .post.wm-card h2.title,
html body .wm-card h2.title {
    margin: 8px 0 6px;
    padding: 0;
    border: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
}
html body .wm-card h2.title a { font-size: inherit; line-height: inherit; color: var(--wm-navy); }
html body .wm-card h2.title a:hover { color: var(--wm-accent-dark); }
.wm-card .excerpt,
.wm-card .excerpt p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
    text-align: left;
}
.wm-card .excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wm-card__footer {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.wm-card__tags { font-size: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.wm-card__tags a {
    display: inline-block;
    margin-right: 6px;
    font-size: 12px;
    color: var(--wm-muted);
}
.wm-card__tags a:before { content: "#"; opacity: .6; }
.wm-card__tags a:hover { color: var(--wm-accent-dark); }
.wm-card__more {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--wm-accent-dark);
    white-space: nowrap;
}
.wm-card__more span { display: inline-block; transition: transform .2s; }
.wm-card__more:hover span { transform: translateX(4px); }

/* ---------- Пагинация ---------- */
.navigation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 28px 0 0;
    font-size: 14px;
}
.navigation .pages { margin-right: 8px; color: var(--wm-muted); }
.navigation .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--wm-shadow);
    color: var(--wm-text);
    font-weight: 500;
}
.navigation a.page-numbers:hover { background: var(--wm-accent); color: #fff; }
.navigation .page-numbers.current { background: var(--wm-navy); color: #fff; }
.navigation .page-numbers.dots { background: none; box-shadow: none; }

/* ---------- Сайдбар ---------- */
#sidebar .widget {
    width: auto;
    margin: 0 0 20px;
    padding: 20px;
    background: #fff;
    border-radius: var(--wm-radius);
    box-shadow: var(--wm-shadow);
    font-size: 14px;
}
html body #sidebar h3.widget-title,
#sidebar .widget .stitle {
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--wm-line);
    color: var(--wm-navy);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}
#sidebar .widget ul { margin: 0; padding: 0; list-style: none; }
#sidebar .widget li {
    width: auto;
    padding: 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--wm-line);
    background: none;
}
#sidebar .widget li:last-child { border-bottom: 0; }
#sidebar .widget li a,
#sidebar .widget li a:hover {
    display: block;
    width: auto;
    padding: 9px 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--wm-text);
}
#sidebar .widget li a:hover { color: var(--wm-accent-dark); padding-left: 4px; }
#sidebar .widget p,
#sidebar .textwidget { font-size: 13px; color: var(--wm-muted); }
#sidebar .div_x_b {
    background: linear-gradient(135deg, var(--wm-navy), var(--wm-navy-2)) !important;
    border: 0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    width: auto !important;
}
#sidebar .div_x_b input.input {
    width: 100% !important;
    box-sizing: border-box;
    height: auto;
    padding: 8px 10px !important;
    border: 0;
    border-radius: 8px;
}
#sidebar .div_x_b .button_x_b {
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: var(--wm-accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
#sidebar .div_x_b + br,
#sidebar .div_x_b + br + br { display: none; }

/* ---------- Запись / страница ---------- */
#content > .post:not(.wm-card),
#content > .page {
    width: auto;
    min-height: 0;
    margin: 0 0 24px;
    padding: 32px 36px;
    background: #fff;
    border-radius: var(--wm-radius);
    box-shadow: var(--wm-shadow);
}
#content > .post:not(.wm-card) .date,
#content > .post:not(.wm-card) .author {
    width: auto;
    font-size: 13px;
    text-transform: none;
    color: var(--wm-muted);
}
#content > .post:not(.wm-card) .date a {
    display: inline-block;
    padding: 3px 10px;
    margin-right: 6px;
    border-radius: 999px;
    background: rgba(20, 163, 199, .1);
    color: var(--wm-accent-dark);
    font-size: 12px;
    font-weight: 600;
}
html body .post h1.title {
    margin: 14px 0 20px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--wm-line);
    color: var(--wm-navy);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.015em;
}
.post .content,
.post .content p,
.post .content li {
    font-size: 17px;
    line-height: 1.75;
    color: #334155;
    text-align: left;
}
.post .content p { margin: 0 0 1.1em; }
.post .content h2,
.post .content h3,
.post .content h4 {
    clear: both;
    text-align: left;
    margin: 1.6em 0 .6em;
    color: var(--wm-navy);
    font-weight: 700;
    line-height: 1.3;
}
.post .content h2 { font-size: 24px; }
.post .content h3 { font-size: 20px; }
.post .content h4 { font-size: 18px; }
.post .content ul,
.post .content ol { margin: 0 0 1.1em 1.4em; }
.post .content li { margin-bottom: .35em; }
.post .content img { border-radius: 10px; }
.post .content a { text-decoration: underline; text-decoration-color: rgba(13, 127, 160, .35); text-underline-offset: 3px; }
.post .content a:hover { text-decoration-color: currentColor; }
.post .content blockquote {
    margin: 1.4em 0;
    padding: 14px 20px;
    border-left: 4px solid var(--wm-accent);
    background: var(--wm-bg);
    border-radius: 0 10px 10px 0;
}
.post .content pre,
.post .content code {
    font-family: 'JetBrains Mono', Consolas, Menlo, monospace;
    font-size: 14px;
    border-radius: 8px;
}
.post .content pre {
    padding: 16px;
    background: #0f1b2d;
    color: #e2e8f0;
    border: 0;
    overflow-x: auto;
}
.post .content :not(pre) > code { padding: 2px 6px; background: #eef2f7; color: #b4235a; border: 0; }
.post .content table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; }
.post .content th, .post .content td { padding: 8px 10px; border: 1px solid var(--wm-line); }
.post .content th { background: var(--wm-bg); }
.wmrs-breadcrumbs { margin-top: 12px; font-size: 13px; }
.wmrs-breadcrumbs a { color: var(--wm-accent-dark); }

/* Комментарии */
#comments {
    width: auto;
    margin-top: 0;
    padding: 28px 32px;
    margin-bottom: 24px;
    background: #fff;
    border-radius: var(--wm-radius);
    box-shadow: var(--wm-shadow);
    box-sizing: border-box;
}
.commentsheadline { color: var(--wm-navy); font-size: 20px; font-weight: 700; margin-bottom: 12px; }
#commentform { display: flex; flex-wrap: wrap; gap: 0 16px; }
#commentform > * { flex: 1 1 100%; }
#commentform .fields { display: flex; flex-wrap: wrap; gap: 0 16px; float: none; width: auto; margin: 0; padding: 0; }
#commentform .fields p { flex: 1 1 180px; float: none; width: auto; margin: 0 0 12px; }
#commentform p { float: none; width: auto; margin: 0 0 12px; }
#commentform label { display: block; margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--wm-text); }
#commentform .webmasterrs-privacy label,
#commentform .comment-form-cookies-consent label { display: inline; font-weight: 400; color: var(--wm-muted); }
#commentform input[type="checkbox"] { margin: 0 6px 0 0; vertical-align: middle; }
.wm-hint { font-weight: 400; color: var(--wm-muted); }
#commentform .form-submit { margin: 4px 0 0; }
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: auto;
    padding: 10px 12px;
    border: 1px solid var(--wm-line);
    border-radius: 10px;
    box-shadow: none;
    font-size: 15px;
}
#respond input[type="submit"],
#commentform #submit {
    width: auto;
    height: auto;
    line-height: 1.4;
    padding: 10px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--wm-accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- 404 и пустой поиск ---------- */
.wm-404 { text-align: center; }
.wm-404__img { display: block; width: 100%; max-width: 460px; margin: 0 auto 8px; border-radius: 12px; }
.wm-404 .content p { text-align: center; }
.wm-404 .search-form,
.wm-empty .search-form { max-width: 440px; margin: 16px auto 0; }
.search-form .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wm-empty { padding: 28px; background: #fff; border-radius: var(--wm-radius); box-shadow: var(--wm-shadow); }

/* ---------- Подвал ---------- */
footer {
    width: auto;
    height: auto;
    margin: 0;
    padding: 48px 0 32px;
    background: var(--wm-navy);
    border: 0;
}
#footer_center {
    width: auto;
    max-width: var(--wm-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    box-sizing: border-box;
}
.footer_item { float: none; flex: 1 1 260px; width: auto; margin: 0; }
.footer_item:empty,
.footer_item:not(:has(*)) { display: none; }
.footer_logo { margin-bottom: 16px; }
.footer_logo img { height: 40px; width: auto; max-height: none; }
.copyright,
.webmasterrs-requisites { color: rgba(255, 255, 255, .55); font-size: 13px; line-height: 1.6; }
.webmasterrs-legal { margin: 12px 0; font-size: 13px; color: rgba(255, 255, 255, .35); }
.webmasterrs-legal a { color: rgba(255, 255, 255, .8); }
.webmasterrs-legal a:hover { color: #fff; }
.footer_item .widget .widgettitle,
.footer_item h3.widget-title { color: #fff; font-size: 16px; font-weight: 700; padding-bottom: 12px; }
.footer_item li, .footer_item li a { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .08); }
.footer_item li a:hover { color: #fff; padding: inherit; width: auto; }

/* ---------- Плашка cookie ---------- */
.cookie-holder { left: 16px; right: 16px; bottom: 16px; }
.cookie-disclaimer {
    max-width: 920px;
    margin: 0 auto;
    padding: 18px 22px;
    gap: 20px;
    justify-content: space-between;
    flex-wrap: nowrap;
    background: rgba(11, 35, 64, .97);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.cookie-text { color: rgba(255, 255, 255, .78); line-height: 1.5; }
.cookie-actions { flex-direction: row; }
.cookie-button {
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.cookie-button--accept { background: var(--wm-accent); }
.cookie-button--accept:hover { background: var(--wm-accent-dark); }
.cookie-button--necessary { border-color: rgba(255, 255, 255, .45); }

/* Кнопка «наверх» (плагин totop-link) */
#toTop { border-radius: 12px; }

/* Доступность: видимый фокус с клавиатуры */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--wm-accent);
    outline-offset: 2px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    #wrap { flex-direction: column; align-items: stretch; }
    #sidebar,
    #wrap > .wm-ad-center { position: static; width: auto; flex-basis: auto; }
    #sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
    #sidebar .widget { margin: 0; }
}
@media (max-width: 979px) {
    /* bootstrap сворачивает меню в выпадающий список (tinynav) */
    #topnav { position: relative; }
    #topnav .container { padding: 0 16px; }
}
@media (max-width: 720px) {
    header { flex-direction: column; align-items: stretch; padding: 18px 16px; gap: 14px; }
    #logo { width: auto; margin: 0; }
    #logo img { height: 40px; }
    #search { max-width: none; }
    #search .search { width: auto; }
    .searchbutton { width: auto; font-size: 14px; }
    #wrap { padding: 0 16px; }
    .wm-hero { border-radius: 0; margin-bottom: 20px; background-position: 70% center; }
    .wm-hero:before { background: linear-gradient(180deg, rgba(4, 16, 38, .88), rgba(4, 16, 38, .7)); }
    .wm-hero__inner { padding: 32px 20px; }
    html body .wm-hero__title { font-size: 20px; }
    html body .archivetitle, html body h1.archivetitle { font-size: 22px; }
    .post.wm-card, .wm-card { flex-direction: column; padding: 0; gap: 0; }
    .wm-card__thumb { flex: none; width: 100%; height: 180px; border-radius: 0; }
    .wm-card__body { padding: 16px 18px 18px; }
    html body .wm-card h2.title { font-size: 18px; }
    #content > .post:not(.wm-card), #content > .page { padding: 22px 18px; }
    html body .post h1.title { font-size: 24px; }
    .post .content, .post .content p, .post .content li { font-size: 16px; }
    #comments { padding: 20px 18px; }
    .cookie-holder { left: 8px; right: 8px; bottom: 8px; }
    .cookie-disclaimer { flex-wrap: wrap; padding: 16px; }
    .cookie-actions { width: 100%; }
    .cookie-button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    *, *:before, *:after { transition: none !important; }
}
