/*
 * Mooks.ru template skin
 * Inspired by the compact editorial layout of minecraft-inside.ru.
 * Existing site branding is intentionally preserved:
 * - /images/site/logo.gif
 * - /images/site/dark_background.png
 * - /images/site/dark_nav_bg.png
 */

:root {
    --site-bg: #282828;
    --site-bg-deep: #202023;
    --site-surface: #303035;
    --site-surface-raised: #37373d;
    --site-surface-soft: rgba(255, 255, 255, .035);
    --site-border: rgba(255, 255, 255, .105);
    --site-border-strong: rgba(255, 255, 255, .16);
    --site-text: #c4c4c8;
    --site-text-muted: #929298;
    --site-text-faint: #6d6d74;
    --site-heading: #f0f0f2;
    --site-primary: #3d449a;
    --site-primary-light: #7279c8;
    --site-primary-dark: #2f3475;
    --site-accent: #fcee4b;
    --site-shadow: 0 12px 32px rgba(0, 0, 0, .22);
    --site-radius: 4px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { background: var(--site-bg-deep); }

body,
body.site {
    color: var(--site-text) !important;
    background-color: var(--site-bg) !important;
    background-image: url('/images/site/dark_background.png') !important;
    background-repeat: repeat !important;
    background-position: 50% 0 !important;
    font-family: Roboto, "Segoe UI", Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    -webkit-font-smoothing: antialiased;
}

body.site:before {
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    content: "";
    background: linear-gradient(180deg, rgba(16, 16, 19, .22), rgba(16, 16, 19, .04) 42%, rgba(16, 16, 19, .2));
}

.body-wrapper { overflow: hidden; }
.body-innerwrapper { min-height: 100vh; }

.layout-boxed .body-innerwrapper {
    max-width: 1240px !important;
    margin: 0 auto;
    background: rgba(32, 32, 35, .88) !important;
    box-shadow: var(--site-shadow) !important;
}

.container { max-width: 1180px !important; }

::selection { color: #171719; background: var(--site-accent); }

img { max-width: 100%; height: auto; }

a,
a:focus,
a:active {
    color: var(--site-primary-light) !important;
    text-decoration: none !important;
}

a:hover { color: var(--site-accent) !important; }

h1, h2, h3, h4, h5, h6 {
    color: var(--site-heading) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

p { color: var(--site-text) !important; }

/* --------------------------------------------------------------------------
   Top bar and branded header
   -------------------------------------------------------------------------- */
#sp-top-bar {
    min-height: 34px !important;
    padding: 5px 0 !important;
    color: var(--site-text-muted) !important;
    background-color: rgba(28, 28, 31, .94) !important;
    border-bottom: 1px solid var(--site-border) !important;
    font-size: 12px !important;
}

#sp-top-bar .sp-module { margin: 0 !important; }
#sp-top-bar a { color: var(--site-text-muted) !important; }
#sp-top-bar a:hover { color: var(--site-accent) !important; }
#sp-top-bar .sp-contact-info,
#sp-top-bar ul.social-icons { line-height: 22px; }
#sp-top-bar .sp-contact-info li { margin-right: 16px; }
#sp-top-bar .sp-contact-info i { color: var(--site-primary-light); }

#sp-header {
    position: relative;
    z-index: 100;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    background-color: #282828 !important;
    background-image: url('/images/site/dark_nav_bg.png') !important;
    background-repeat: repeat !important;
    border-bottom: 0 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .2);
}

/* Compact 48px header with vertically centered logo and menu. */
#sp-header .container,
#sp-header .row { min-height: 48px !important; height: 48px !important; }
#sp-logo .sp-column {
    display: flex;
    align-items: center;
    min-height: 48px !important;
    height: 48px !important;
}
#sp-header .logo {
    display: flex !important;
    align-items: center !important;
    height: 48px !important;
    margin: 0 !important;
}
#sp-logo .logo { margin: 0 !important; line-height: 1; }
#sp-logo .logo a {
    display: flex !important;
    align-items: center !important;
    height: 48px !important;
}
#sp-logo .logo img,
#sp-logo .sp-default-logo {
    display: block;
    width: auto !important;
    max-width: min(261px, 100%) !important;
    max-height: 42px !important;
    filter: none;
}

#sp-menu .sp-column {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 48px !important;
    height: 48px !important;
}

.sp-megamenu-parent > li > a,
.sp-megamenu-parent > li > span {
    display: flex !important;
    align-items: center !important;
    height: 48px !important;
    min-height: 48px !important;
    line-height: 1.2 !important;
    padding: 0 12px !important;
    color: #d1d1d5 !important;
    border-bottom: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .35px;
    text-transform: uppercase;
    transition: color .18s ease, background-color .18s ease;
}

.sp-megamenu-parent > li > a i { margin-right: 7px; color: var(--site-primary-light); }
.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li:hover > a,
.sp-megamenu-parent > li.active > a {
    color: var(--site-accent) !important;
    background: rgba(255, 255, 255, .045) !important;
    border-bottom: 0 !important;
}

.sp-megamenu-parent .sp-dropdown { padding-top: 4px; }
.sp-megamenu-parent .sp-dropdown .sp-dropdown-inner {
    padding: 8px 0 !important;
    background: var(--site-surface) !important;
    border: 1px solid var(--site-border-strong) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .42) !important;
}

.sp-megamenu-parent .sp-dropdown li.sp-menu-item > a {
    padding: 8px 18px !important;
    color: var(--site-text) !important;
    font-size: 13px !important;
}

.sp-megamenu-parent .sp-dropdown li.sp-menu-item > a:hover,
.sp-megamenu-parent .sp-dropdown li.sp-menu-item.active > a {
    color: #fff !important;
    background: var(--site-primary) !important;
}

#offcanvas-toggler { color: var(--site-heading) !important; }
#offcanvas-toggler > i { color: var(--site-heading) !important; font-size: 22px; }
#offcanvas-toggler:hover > i { color: var(--site-accent) !important; }

/* --------------------------------------------------------------------------
   Page title and featured articles
   -------------------------------------------------------------------------- */
#sp-page-title { min-height: 0 !important; background: transparent !important; }
#sp-page-title .sp-page-title { padding: 0 !important; background: transparent !important; }
#sp-page-title h2 { margin: 0; color: var(--site-heading); font-size: 22px; }

#sp-feature {
    padding: 22px 0 8px !important;
    background: transparent !important;
}

#sp-feature .sp-module {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

#sp-feature .mod-articles-items.mod-articles-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px !important;
    align-items: stretch;
    padding: 0 !important;
    margin: 0 !important;
}

#sp-feature .mod-articles-items > li { min-width: 0; height: 100%; margin: 0 !important; padding: 0 !important; list-style: none; }
#sp-feature .mod-articles-item {
    height: 100%;
    overflow: hidden;
    background: var(--site-surface) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .15);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#sp-feature .mod-articles-item:hover {
    border-color: rgba(114, 121, 200, .65) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
    transform: translateY(-2px);
}

#sp-feature .mod-articles-item-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#sp-feature .mod-articles-item-content > p:last-child { margin-top: auto !important; }
#sp-feature .mod-articles-item-content > p:empty { display: none !important; }
#sp-feature .mod-articles-title { order: 0; margin: 0 !important; padding: 13px 16px 8px; }
#sp-feature .mod-articles-title a { color: var(--site-heading) !important; font-size: 15px; font-weight: 600; }
#sp-feature .mod-articles-title a:hover { color: var(--site-accent) !important; }
#sp-feature .mod-articles-item p { order: 1; margin: 0 !important; }
#sp-feature .mod-articles-item img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    opacity: .92;
    transition: opacity .18s ease;
}
#sp-feature .mod-articles-item:hover img { opacity: 1; }

/* --------------------------------------------------------------------------
   Main content and article cards
   -------------------------------------------------------------------------- */
#sp-main-body {
    padding: 18px 0 34px !important;
    background: transparent !important;
}

#sp-component { padding-right: 18px !important; }
#sp-right { padding-left: 0 !important; }

.blog .article-list > .row {
    margin-right: -9px;
    margin-left: -9px;
    row-gap: 18px !important;
}
.blog .article-list > .row > [class*="col-"] {
    padding-right: 9px;
    padding-left: 9px;
    margin-bottom: 18px !important;
}

.blog .article-list article.item {
    display: flex;
    flex-direction: column;
    height: calc(100% - 18px);
    overflow: hidden;
    margin-bottom: 18px !important;
    padding: 0 !important;
    color: var(--site-text);
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .13);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.blog .article-list article.item:hover {
    border-color: rgba(114, 121, 200, .58) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .27);
    transform: translateY(-2px);
}

.blog .article-list article.item > .system-unpublished {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: transparent !important;
}

.blog .entry-header,
.blog article.item .entry-header {
    order: 0;
    padding: 15px 16px 8px !important;
    background: transparent;
}

.blog article.item .entry-header h2 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.blog article.item .entry-header h2 a { color: var(--site-heading) !important; }
.blog article.item .entry-header h2 a:hover { color: var(--site-accent) !important; }

.blog article.item > .system-unpublished > p,
.blog article.item > .system-unpublished > div:not(.entry-header):not(.article-info) {
    order: 1;
    margin: 0 !important;
    color: var(--site-text) !important;
}

.blog article.item > .system-unpublished > p:has(img) { line-height: 0; }
.blog article.item > .system-unpublished img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    opacity: .94;
    transition: opacity .18s ease, transform .25s ease;
}

.blog article.item:hover > .system-unpublished img { opacity: 1; }
.blog article.item > .system-unpublished > p:not(:has(img)) {
    padding: 0 16px 8px !important;
    font-size: 14px;
    line-height: 1.62;
}

.blog-featured .items-leading,
.blog-featured .article-list > .row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-right: -9px !important;
    margin-left: -9px !important;
}

.blog-featured .items-leading > article,
.blog-featured .article-list > .row > [class*="col-"] {
    display: flex;
    padding-right: 9px !important;
    padding-left: 9px !important;
}

.blog-featured article.item,
.blog-featured .article {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100% - 18px);
    margin-bottom: 18px !important;
    padding: 0 !important;
    overflow: hidden;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .13);
}

.blog-featured article.item > .system-unpublished,
.blog-featured .article > .system-unpublished {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.blog-featured article.item .article-info,
.blog-featured article.item dl.article-info {
    margin-top: auto !important;
}

.blog article.item .article-info,
.blog article.item dl.article-info {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    order: 2;
    margin: auto 0 0 !important;
    padding: 12px 16px 14px !important;
    color: var(--site-text-faint) !important;
    border-top: 1px solid var(--site-border) !important;
    font-size: 11px !important;
}

.blog article.item .article-info dd { margin: 0 !important; }
.blog article.item .article-info i { margin-right: 3px; color: var(--site-primary-light); }
.blog article.item .article-info time,
.blog article.item .article-info span { color: var(--site-text-muted); }

.item-page,
.item-page .entry-content { color: var(--site-text) !important; }
.item-page .page-header,
.item-page .entry-header { padding-bottom: 12px; border-bottom: 1px solid var(--site-border); }
.item-page h1 { font-size: 26px !important; }
.item-page h2 { font-size: 20px !important; }
.item-page img { border-radius: var(--site-radius); }
.item-page blockquote { border-color: var(--site-primary); color: var(--site-text-muted); }

/* --------------------------------------------------------------------------
   Sidebar modules
   -------------------------------------------------------------------------- */
#sp-right .sp-module {
    overflow: hidden;
    margin-bottom: 18px !important;
    padding: 0 !important;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .12);
}

#sp-right .sp-module-title,
#sp-right .sp-module .sp-module-title {
    margin: 0 !important;
    padding: 12px 15px !important;
    color: var(--site-heading) !important;
    background: var(--site-surface-raised) !important;
    border-bottom: 2px solid var(--site-primary) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .5px;
    line-height: 1.3 !important;
    text-transform: uppercase;
}

#sp-right .sp-module-content { padding: 8px 0 !important; }
#sp-right ul.nav.menu,
#sp-right ul.mod-list,
#sp-right ul.mostread,
#sp-right .latestnews { margin: 0 !important; padding: 0 !important; list-style: none; }

#sp-right ul.nav.menu > li,
#sp-right ul.mod-list > li,
#sp-right ul.mostread > li,
#sp-right .latestnews > li,
#sp-right .latestnews > div {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--site-border) !important;
}

#sp-right ul.nav.menu > li:last-child,
#sp-right ul.mod-list > li:last-child,
#sp-right ul.mostread > li:last-child,
#sp-right .latestnews > li:last-child,
#sp-right .latestnews > div:last-child { border-bottom: 0 !important; }

#sp-right ul.nav.menu > li > a,
#sp-right ul.mod-list > li > a,
#sp-right ul.mostread > li > a,
#sp-right .latestnews > li > a,
#sp-right .latestnews > div > a {
    display: block;
    padding: 9px 15px !important;
    color: var(--site-text) !important;
    font-size: 13px;
    line-height: 1.45;
    transition: color .15s ease, background-color .15s ease, padding-left .15s ease;
}

#sp-right ul.nav.menu > li > a:hover,
#sp-right ul.nav.menu > li.active > a,
#sp-right ul.mod-list > li > a:hover,
#sp-right ul.mostread > li > a:hover,
#sp-right .latestnews > li > a:hover,
#sp-right .latestnews > div > a:hover {
    padding-left: 19px !important;
    color: var(--site-accent) !important;
    background: rgba(61, 68, 154, .18) !important;
}

#sp-right .tagscloud { padding: 8px 12px; }
#sp-right .tagscloud .tag-name,
.label,
.badge {
    display: inline-block;
    margin: 3px 2px;
    padding: 3px 8px !important;
    color: var(--site-text) !important;
    background: var(--site-surface-raised) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: 3px !important;
    font-size: 11px !important;
}
#sp-right .tagscloud .tag-name:hover { color: #fff !important; background: var(--site-primary) !important; border-color: var(--site-primary) !important; }

/* --------------------------------------------------------------------------
   Contact form — match the login and registration card style
   -------------------------------------------------------------------------- */
.com-contact__form.contact-form {
    max-width: 640px;
    margin: 0 auto 24px;
    padding: 24px 26px 26px;
    color: var(--site-text) !important;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: var(--site-shadow) !important;
}

.com-contact__form .contact-form,
.com-contact__form form.well {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.com-contact__form fieldset {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.com-contact__form legend {
    margin: 0 0 18px !important;
    padding: 0 0 12px !important;
    color: var(--site-heading) !important;
    border-bottom: 1px solid var(--site-border) !important;
    font-size: 21px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.com-contact__form .control-group {
    display: block !important;
    margin: 0 0 16px !important;
}

.com-contact__form .control-label,
.com-contact__form .control-label label,
.com-contact__form .form-label {
    display: block !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    color: var(--site-text) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.com-contact__form .controls {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.com-contact__form input[type="text"],
.com-contact__form input[type="email"],
.com-contact__form textarea,
.com-contact__form select {
    display: block;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.com-contact__form textarea {
    min-height: 150px;
    resize: vertical;
}

.com-contact__form .field-spacer {
    margin-bottom: 10px !important;
}

.com-contact__form .field-spacer .control-label {
    margin-bottom: 0 !important;
}

.com-contact__form .star,
.com-contact__form .red {
    color: var(--site-accent) !important;
}

.com-contact__form .control-group:last-child {
    margin-bottom: 0 !important;
}

.com-contact__form > form > .control-group:last-child {
    margin-top: 4px !important;
    padding-top: 4px !important;
}

.com-contact__form button[type="submit"] {
    min-width: 130px;
    padding: 9px 18px !important;
}

@media (max-width: 575.98px) {
    .com-contact__form.contact-form {
        margin-right: 12px;
        margin-left: 12px;
        padding: 20px 16px 22px;
    }
}

/* --------------------------------------------------------------------------
   Login and registration cards — same opaque panel as the contact form
   -------------------------------------------------------------------------- */
.row.justify-content-center > [class*="col-lg-4"] {
    width: 100%;
    max-width: 640px;
    flex: 0 0 100%;
}

.login,
.registration {
    margin: 0 auto 24px;
    padding: 24px 26px 26px;
    color: var(--site-text) !important;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: var(--site-shadow) !important;
}

.login form,
.registration form {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.login h1,
.registration h1 {
    margin: 0 0 18px !important;
    padding: 0 0 12px !important;
    color: var(--site-heading) !important;
    border-bottom: 1px solid var(--site-border) !important;
    font-size: 21px !important;
    line-height: 1.35 !important;
}

.login label,
.registration label {
    color: var(--site-text) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.login .mb-3,
.registration .mb-3 {
    margin-bottom: 16px !important;
}

.login .form-check-label {
    font-weight: 400 !important;
}

.login .form-check-input {
    accent-color: var(--site-primary);
}

.login-image,
.login-description img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 18px;
    border-radius: var(--site-radius);
}

.login .form-links {
    margin: -8px auto 24px;
    padding: 14px 26px;
    max-width: 640px;
    color: var(--site-text-muted) !important;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: var(--site-shadow) !important;
}

.form-links li {
    margin: 4px 0;
}

.form-links a {
    color: var(--site-primary-light) !important;
}

.form-links a:hover {
    color: var(--site-accent) !important;
}

@media (max-width: 575.98px) {
    .login,
    .registration {
        margin-right: 12px;
        margin-left: 12px;
        padding: 20px 16px 22px;
    }

    .login .form-links {
        margin-right: 12px;
        margin-left: 12px;
        padding-right: 16px;
        padding-left: 16px;
    }
}

/* --------------------------------------------------------------------------
   User profile — keep the profile and edit/settings screens consistent with
   the registration and contact cards above. These selectors target Joomla's
   com_users markup without changing any CMS files.
   -------------------------------------------------------------------------- */
.com-users-profile.profile,
.com-users-profile__edit.profile-edit {
    max-width: 760px;
    margin: 0 auto 24px;
    color: var(--site-text) !important;
}

.com-users-profile__edit.btn-toolbar {
    display: flex !important;
    justify-content: flex-end;
    float: none !important;
    margin: 0 0 16px !important;
}

.com-users-profile .page-header,
.com-users-profile__edit .page-header {
    margin: 0 0 18px !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid var(--site-border) !important;
}

.com-users-profile .page-header h1,
.com-users-profile__edit .page-header h1 {
    margin: 0 !important;
    color: var(--site-heading) !important;
    font-size: 21px !important;
    line-height: 1.35 !important;
}

.com-users-profile__edit-form,
.com-users-profile__core,
.com-users-profile__custom,
.com-users-profile__params,
.com-users-profile__multifactor {
    box-sizing: border-box;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: var(--site-shadow) !important;
}

.com-users-profile__core,
.com-users-profile__custom,
.com-users-profile__params {
    margin: 0 0 16px !important;
    padding: 20px 24px 22px !important;
}

.com-users-profile__edit-form {
    margin: 0 !important;
    padding: 22px 24px 24px !important;
}

.com-users-profile__core legend,
.com-users-profile__custom legend,
.com-users-profile__params legend,
.com-users-profile__multifactor legend,
.com-users-profile__edit-form > fieldset > legend {
    display: block;
    width: 100%;
    margin: 0 0 16px !important;
    padding: 0 0 10px !important;
    color: var(--site-heading) !important;
    border-bottom: 1px solid var(--site-border) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.com-users-profile__core dl,
.com-users-profile__custom dl,
.com-users-profile__params dl {
    display: grid;
    grid-template-columns: minmax(150px, 34%) 1fr;
    gap: 0;
    margin: 0 !important;
}

.com-users-profile__core dt,
.com-users-profile__custom dt,
.com-users-profile__params dt,
.com-users-profile__core dd,
.com-users-profile__custom dd,
.com-users-profile__params dd {
    margin: 0 !important;
    padding: 10px 0 !important;
    color: var(--site-text) !important;
    border-bottom: 1px solid var(--site-border) !important;
    line-height: 1.5;
}

.com-users-profile__core dt,
.com-users-profile__custom dt,
.com-users-profile__params dt {
    color: var(--site-text-muted) !important;
    font-weight: 600;
}

.com-users-profile__core dl > :nth-last-child(-n+2),
.com-users-profile__custom dl > :nth-last-child(-n+2),
.com-users-profile__params dl > :nth-last-child(-n+2) {
    border-bottom: 0 !important;
}

.com-users-profile__edit-form > fieldset,
.com-users-profile__multifactor {
    margin: 0 0 20px !important;
    padding: 0 0 4px !important;
    border: 0 !important;
}

.com-users-profile__edit-form .control-group,
.com-users-profile__edit-form .form-group {
    display: block !important;
    margin: 0 0 16px !important;
}

.com-users-profile__edit-form .control-label,
.com-users-profile__edit-form .control-label label,
.com-users-profile__edit-form .form-label {
    display: block !important;
    width: auto !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    color: var(--site-text) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: left !important;
}

.com-users-profile__edit-form .controls,
.com-users-profile__edit-form .col-md-9,
.com-users-profile__edit-form .col-md-3 {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.com-users-profile__edit-form .form-control,
.com-users-profile__edit-form input,
.com-users-profile__edit-form select,
.com-users-profile__edit-form textarea {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.com-users-profile__edit-form .password-group,
.com-users-profile__edit-form .password-group .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
}

.com-users-profile__edit-form .password-group .input-group > input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    border-radius: 3px 0 0 3px !important;
}

.com-users-profile__edit-form .password-group .input-password-toggle,
.com-users-profile__edit-form .password-group .input-password-modify {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 44px;
    margin: 0 !important;
    white-space: nowrap;
    border-radius: 0 3px 3px 0 !important;
}

.com-users-profile__edit-form .password-group + .small,
.com-users-profile__edit-form .password-group ~ .small {
    color: var(--site-text-muted) !important;
}

.com-users-profile__edit-form .com-users-profile__multifactor,
.com-users-profile__multifactor,
#multifactorauth-webauthn-missing,
#multifactorauth-webauthn-nothttps {
    color: var(--site-text) !important;
    background: transparent !important;
}

.com-users-profile__multifactor .alert,
#multifactorauth-webauthn-missing .alert,
#multifactorauth-webauthn-nothttps .alert {
    margin: 0 0 14px !important;
    padding: 14px 16px !important;
    color: var(--site-text) !important;
    background: rgba(55, 55, 61, .86) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
}

.com-users-profile__multifactor .alert-heading,
#multifactorauth-webauthn-missing .alert-heading,
#multifactorauth-webauthn-nothttps .alert-heading {
    margin: 0 0 8px !important;
    color: var(--site-heading) !important;
    font-size: 16px !important;
}

.com-users-profile__multifactor .btn,
.com-users-profile__multifactor button,
.com-users-profile__multifactor a,
.com-users-profile__edit-form .passkey,
.com-users-profile__edit-form [id*="passkey"] {
    border-radius: 3px !important;
}

.com-users-profile__edit-submit {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin: 2px 0 0 !important;
    padding-top: 18px !important;
    border-top: 1px solid var(--site-border) !important;
}

.com-users-profile__edit-submit .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.com-users-profile__edit-submit .btn {
    min-width: 120px;
}

.com-users-profile__edit .alert,
.com-users-profile .alert {
    margin-bottom: 16px !important;
    color: var(--site-text) !important;
    background: rgba(61, 68, 154, .16) !important;
    border: 1px solid rgba(114, 121, 200, .4) !important;
    border-radius: var(--site-radius) !important;
}

@media (max-width: 575.98px) {
    .com-users-profile.profile,
    .com-users-profile__edit.profile-edit {
        margin-right: 12px;
        margin-left: 12px;
    }

    .com-users-profile__core,
    .com-users-profile__custom,
    .com-users-profile__params,
    .com-users-profile__edit-form {
        padding: 18px 16px 20px !important;
    }

    .com-users-profile__core dl,
    .com-users-profile__custom dl,
    .com-users-profile__params dl {
        display: block;
    }

    .com-users-profile__core dt,
    .com-users-profile__custom dt,
    .com-users-profile__params dt {
        padding-bottom: 2px !important;
        border-bottom: 0 !important;
    }

    .com-users-profile__core dd,
    .com-users-profile__custom dd,
    .com-users-profile__params dd {
        padding-top: 0 !important;
    }
}

/* --------------------------------------------------------------------------
   Breadcrumbs, forms, buttons and pagination
   -------------------------------------------------------------------------- */
.breadcrumb,
ol.breadcrumb {
    margin: 0 0 18px !important;
    padding: 8px 12px !important;
    color: var(--site-text-muted) !important;
    background: var(--site-surface-soft) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    font-size: 12px !important;
}
.breadcrumb a { color: var(--site-primary-light) !important; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--site-text-faint) !important; }
.breadcrumb .active { color: var(--site-text-muted) !important; }

.btn-primary,
.sppb-btn-primary,
button[type="submit"] {
    color: #fff !important;
    background: var(--site-primary) !important;
    border-color: var(--site-primary) !important;
    border-radius: 3px !important;
    font-weight: 600;
    transition: background-color .15s ease, transform .15s ease;
}
.btn-primary:hover,
.sppb-btn-primary:hover,
button[type="submit"]:hover {
    color: #fff !important;
    background: var(--site-primary-dark) !important;
    border-color: var(--site-primary-dark) !important;
    transform: translateY(-1px);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea,
select {
    color: var(--site-text) !important;
    background: #26262a !important;
    border: 1px solid var(--site-border-strong) !important;
    border-radius: 3px !important;
}
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    color: var(--site-heading) !important;
    background: #29292e !important;
    border-color: var(--site-primary-light) !important;
    box-shadow: 0 0 0 3px rgba(61, 68, 154, .22) !important;
    outline: 0 !important;
}

.pagination-wrapper { clear: both; margin: 12px 0 4px; text-align: center; }
ul.pagination,
ul.pagination-minecraft { display: inline-flex; flex-wrap: wrap; gap: 5px; margin: 0 !important; padding: 0 !important; }
.pagination > li { margin: 0 !important; }
.pagination > li > a,
.pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px !important;
    color: var(--site-text) !important;
    background: var(--site-surface) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: 3px !important;
    font-size: 12px;
}
.pagination > li > a:hover,
.pagination > .active > a,
.pagination > .active > span {
    color: #fff !important;
    background: var(--site-primary) !important;
    border-color: var(--site-primary) !important;
}
.pagination > .disabled > span { color: var(--site-text-faint) !important; background: var(--site-bg-deep) !important; }

/* --------------------------------------------------------------------------
   Bottom, footer and utility elements
   -------------------------------------------------------------------------- */
#sp-bottom {
    padding: 22px 0 !important;
    color: var(--site-text-muted) !important;
    background: rgba(30, 30, 33, .9) !important;
    border-top: 1px solid var(--site-border) !important;
}

#sp-footer {
    padding: 18px 0 !important;
    color: var(--site-text-muted) !important;
    background-color: #332f2c !important;
    background-image: url('/images/site/dark_nav_bg.png') !important;
    background-repeat: repeat !important;
    border-top: 3px solid var(--site-primary) !important;
    font-size: 12px !important;
}
#sp-footer a { color: var(--site-accent) !important; }
#sp-footer a:hover { color: #fff !important; }
#sp-footer .sp-copyright { color: var(--site-text-faint) !important; }

.offcanvas-menu {
    background: #232327 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .32);
}
.offcanvas-menu .close-offcanvas { color: var(--site-heading) !important; }
.offcanvas-menu .nav.menu li a {
    padding: 10px 16px !important;
    color: var(--site-text) !important;
    border-bottom: 1px solid var(--site-border) !important;
}
.offcanvas-menu .nav.menu li a:hover { color: var(--site-accent) !important; background: var(--site-surface-soft) !important; }

.scrollup {
    right: 28px !important;
    bottom: 28px !important;
    width: 38px !important;
    height: 38px !important;
    color: #fff !important;
    background: var(--site-primary) !important;
    border: 0 !important;
    border-radius: 3px !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .35) !important;
    opacity: .88 !important;
}
.scrollup:hover { background: var(--site-primary-dark) !important; opacity: 1 !important; }

.system-unpublished { padding: 0 !important; background: transparent !important; border: 0 !important; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #1d1d20; }
::-webkit-scrollbar-thumb { background: #4a4a55; border: 2px solid #1d1d20; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--site-primary-light); }

/* --------------------------------------------------------------------------
   Site-wide polish: top links, search, logout, comments and spacing
   -------------------------------------------------------------------------- */
#sp-top-bar #sp-top1 .sp-column {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
}

#sp-top-bar #sp-top1 .sp-module {
    margin: 0 !important;
}

#sp-top-bar #sp-top1 .sp-module-content > p {
    margin: 0 !important;
    line-height: 22px !important;
}

#sp-top-bar #sp-top1 .sp-module-content > p:first-child a {
    display: inline-block;
    margin: 0 3px;
}

#sp-top-bar #sp-top1 .sp-module-content > p:first-child a[href*="registration"] {
    margin-left: 7px;
}

#sp-top-bar .mod-languages,
#sp-top-bar .mod-languages__list {
    margin: 0 !important;
    padding: 0 !important;
}

#sp-top-bar .mod-languages__list {
    display: flex;
    align-items: center;
    gap: 7px;
    list-style: none;
}

#sp-top-bar .mod-languages__list img {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
}

#sp-top3 .sp-module,
#sp-top3 .sp-module-content,
#sp-top3 .gcse-searchbox-only {
    margin: 0 !important;
    padding: 0 !important;
}

#sp-top3 .gsc-control-cse {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

#sp-top3 .gsc-control-cse table,
#sp-top3 .gsc-control-cse td {
    border: 0 !important;
}

#sp-top3 input.gsc-input {
    height: 32px !important;
    color: var(--site-text) !important;
    background: #26262a !important;
    border: 1px solid var(--site-border-strong) !important;
    border-radius: 3px 0 0 3px !important;
}

#sp-top3 button.gsc-search-button-v2 {
    min-width: 38px;
    height: 32px;
    margin: 0 !important;
    padding: 6px 10px !important;
    background: var(--site-primary) !important;
    border: 1px solid var(--site-primary) !important;
    border-radius: 0 3px 3px 0 !important;
}

.logout,
#login-form .logout-button {
    padding: 24px 26px 26px;
    color: var(--site-text) !important;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: var(--site-shadow) !important;
}

.logout h1 {
    margin: 0 0 18px !important;
    padding: 0 0 12px !important;
    color: var(--site-heading) !important;
    border-bottom: 1px solid var(--site-border) !important;
    font-size: 21px !important;
}

.logout .logout-button,
#login-form .logout-button {
    margin-top: 16px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Featured and blog cards use the same no-crop image and bottom metadata rules. */
.blog-featured article.item img,
.blog-featured .article img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
}

.blog-featured article.item .entry-header,
.blog-featured .article .entry-header {
    order: 0;
}

.blog-featured article.item > .system-unpublished > p,
.blog-featured .article > .system-unpublished > p,
.blog-featured article.item > .system-unpublished > div:not(.entry-header):not(.article-info),
.blog-featured .article > .system-unpublished > div:not(.entry-header):not(.article-info) {
    order: 1;
    margin: 0 !important;
}

.blog-featured article.item .article-info,
.blog-featured .article .article-info,
.blog-featured article.item dl.article-info,
.blog-featured .article dl.article-info {
    order: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 14px !important;
    color: var(--site-text-faint) !important;
    border-top: 1px solid var(--site-border) !important;
    font-size: 11px !important;
}

.blog-featured article.item .article-info dd,
.blog-featured .article .article-info dd {
    margin: 0 !important;
}

/* Akeeba Engage is intentionally styled by its stable public container id. */
#akengage-comments-section {
    clear: both;
    margin: 24px 0 8px !important;
    padding: 20px 22px 22px !important;
    color: var(--site-text) !important;
    background: rgba(48, 48, 53, .94) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
    box-shadow: var(--site-shadow) !important;
}

#akengage-comments-section .akengage-title {
    margin: 0 0 16px !important;
    padding: 0 0 11px !important;
    color: var(--site-heading) !important;
    border-bottom: 1px solid var(--site-border) !important;
    font-size: 19px !important;
}

#akengage-comments-section input,
#akengage-comments-section textarea,
#akengage-comments-section select {
    color: var(--site-text) !important;
    background: #26262a !important;
    border: 1px solid var(--site-border-strong) !important;
    border-radius: 3px !important;
}

#akengage-comments-section .btn,
#akengage-comments-section button {
    border-radius: 3px !important;
}

#akengage-comments-section article,
#akengage-comments-section .akengage-comment,
#akengage-comments-section [class*="comment"] {
    color: var(--site-text) !important;
}

#akengage-comments-section hr,
#akengage-comments-section .border-bottom {
    border-color: var(--site-border) !important;
}

/* Remove decorative blue rules and excessive pagination tail spacing. */
#sp-footer { border-top: 0 !important; }
#sp-feature + #sp-main-body,
#sp-feature + section { border-top: 0 !important; }
.pagination-wrapper { margin-bottom: 0 !important; }
.pagination,
.blog-featured > .pagination,
.blog > .pagination { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.pagination .counter { margin-bottom: 4px !important; }

/* Joomla's profile plugins can emit different Passkey/MFA class names. */
.com-users-profile__edit-form [id*="passkey"],
.com-users-profile__edit-form [class*="passkey"],
.com-users-profile__edit-form [id*="multifactorauth"],
.com-users-profile__edit-form [class*="multifactorauth"],
.com-users-profile__edit-form [id*="webauthn"] {
    color: var(--site-text) !important;
}

@media (max-width: 575.98px) {
    .logout,
    #login-form .logout-button,
    #akengage-comments-section {
        padding: 18px 16px 20px !important;
    }

    #sp-top-bar #sp-top1 .sp-column {
        gap: 4px 10px;
    }
}

/* --------------------------------------------------------------------------
   Final alignment corrections
   -------------------------------------------------------------------------- */
/* The language module is a sibling of the custom top-bar module. Keep it on
   the same baseline instead of inheriting the social-links paragraph height. */
#sp-top1 > .sp-column {
    position: relative;
    min-height: 26px;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) {
    position: absolute;
    top: 0;
    left: 132px;
    height: 22px;
    display: flex;
    align-items: center;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) .sp-module-content,
#sp-top1 > .sp-column > .sp-module:has(.mod-languages) .mod-languages,
#sp-top1 > .sp-column > .sp-module:has(.mod-languages) .mod-languages__list,
#sp-top1 > .sp-column > .sp-module:has(.mod-languages) li,
#sp-top1 > .sp-column > .sp-module:has(.mod-languages) a {
    display: flex !important;
    align-items: center !important;
    height: 22px;
    margin: 0 !important;
    padding: 0 !important;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) img {
    width: auto !important;
    height: 16px !important;
    margin: 0 0 0 4px !important;
    vertical-align: middle !important;
}

/* Google CSE injects a white input box; normalize every nested wrapper. */
#sp-top3 .gsc-control-cse,
#sp-top3 .gsc-control-cse .gsc-control-wrapper-cse,
#sp-top3 .gsc-control-cse .gsc-search-box,
#sp-top3 .gsc-control-cse .gsc-input-box,
#sp-top3 .gsc-control-cse .gsc-input-box-hover,
#sp-top3 .gsc-control-cse .gsc-input-box-focus {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#sp-top3 .gsc-control-cse .gsc-input-box,
#sp-top3 .gsc-control-cse .gsc-input-box table,
#sp-top3 .gsc-control-cse .gsc-input-box td,
#sp-top3 .gsc-control-cse .gsc-input-box input {
    height: 32px !important;
    background: #26262a !important;
    border: 1px solid var(--site-border-strong) !important;
    border-radius: 3px 0 0 3px !important;
}

#sp-top3 .gsc-control-cse input.gsc-input,
#sp-top3 .gsc-control-cse input.gsc-input:focus,
#sp-top3 .gsc-control-cse .gsc-input-box input.gsc-input {
    height: 30px !important;
    color: var(--site-heading) !important;
    background: #26262a !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

#sp-top3 .gsc-control-cse .gsib_a,
#sp-top3 .gsc-control-cse .gsib_b,
#sp-top3 .gsc-control-cse .gsib_a input {
    background: #26262a !important;
}

#sp-top3 .gsc-control-cse .gsst_a,
#sp-top3 .gsc-control-cse .gsst_b {
    color: var(--site-text-muted) !important;
    background: transparent !important;
}

#sp-top3 .gsc-control-cse .gsib_a {
    padding: 0 8px !important;
}

#sp-top3 .gsc-control-cse .gsc-search-button-v2 {
    height: 32px !important;
    margin-top: 0 !important;
    background: var(--site-primary) !important;
    border-color: var(--site-primary) !important;
}

/* Menu modules and article cards share the same vertical rhythm. */
#sp-right .sp-module + .sp-module {
    margin-top: 18px !important;
}

#sp-right .sp-module {
    margin-bottom: 0 !important;
}

.blog .article-list > .row > [class*="col-"],
.blog-featured .article-list > .row > [class*="col-"] {
    display: flex;
}

.blog .article-list article.item,
.blog-featured .article-list .article {
    width: 100%;
}

.blog .article-list article.item > .system-unpublished,
.blog-featured .article-list .article > .system-unpublished {
    min-height: 100%;
}

.blog .article-list article.item .article-info,
.blog-featured .article-list .article .article-info {
    margin-top: auto !important;
}

/* Remove the separator around the featured section itself, not the card
   borders inside it. */
#sp-feature,
#sp-feature > .container,
#sp-feature > .container > .row,
#sp-feature .sp-column,
#sp-feature .sp-module,
#sp-feature .sp-module-content,
#sp-feature + #sp-main-body,
#sp-feature + #sp-main-body::before,
#sp-feature + #sp-main-body::after {
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

#sp-feature + #sp-main-body {
    margin-top: 0 !important;
    padding-top: 18px !important;
}

#sp-feature + #sp-main-body > .container {
    border-top: 0 !important;
}

/* The title already separates the comments block visually; avoid a second
   dark rule immediately after “Нет комментариев”. */
#akengage-comments-section .akengage-title,
#akengage-comments-section .akengage-title.border-bottom {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 14px !important;
}

#akengage-comments-section #akeeba-engage-login {
    padding-top: 14px !important;
    border-top: 1px solid var(--site-border) !important;
}

/* Passkeys / MFA render their own tables and panels inside the profile form. */
.com-users-profile__edit-form table,
.com-users-profile__edit-form .table,
.com-users-profile__edit-form [role="table"] {
    width: 100% !important;
    margin: 0 0 16px !important;
    color: var(--site-text) !important;
    background: rgba(55, 55, 61, .72) !important;
    border: 1px solid var(--site-border) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: var(--site-radius) !important;
    overflow: hidden;
}

.com-users-profile__edit-form table caption,
.com-users-profile__edit-form table th,
.com-users-profile__edit-form table td,
.com-users-profile__edit-form .table th,
.com-users-profile__edit-form .table td,
.com-users-profile__edit-form [role="row"] > * {
    padding: 10px 12px !important;
    color: var(--site-text) !important;
    background: transparent !important;
    border-color: var(--site-border) !important;
    vertical-align: middle !important;
}

.com-users-profile__edit-form table thead th,
.com-users-profile__edit-form .table thead th {
    color: var(--site-heading) !important;
    background: var(--site-surface-raised) !important;
    font-weight: 600 !important;
}

.com-users-profile__edit-form table tr + tr td,
.com-users-profile__edit-form .table tr + tr td {
    border-top: 1px solid var(--site-border) !important;
}

.com-users-profile__edit-form table .btn,
.com-users-profile__edit-form .table .btn,
.com-users-profile__edit-form [role="table"] .btn {
    margin: 2px 4px 2px 0 !important;
    border-radius: 3px !important;
}

.com-users-profile__edit-form .com-users-profile__multifactor,
.com-users-profile__edit-form fieldset[class*="multifactor"],
.com-users-profile__edit-form fieldset[id*="multifactor"] {
    padding: 16px !important;
    background: rgba(55, 55, 61, .72) !important;
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-radius) !important;
}

/* The requested bottom area is a compact, vertically centered 98px footer. */
#sp-footer {
    height: 98px !important;
    min-height: 98px !important;
    box-sizing: border-box;
    padding: 0 !important;
}

#sp-footer > .container,
#sp-footer > .container > .row,
#sp-footer .sp-column {
    height: 98px !important;
    min-height: 98px !important;
}

#sp-footer > .container > .row {
    display: flex;
    align-items: center;
}

#sp-footer .sp-module-content > p {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
}

#sp-footer .sp-module-content > p:last-child {
    margin-bottom: 0 !important;
}

/* Keep pagination tight to the content. */
.pagination-wrapper,
.blog > .pagination,
.blog-featured > .pagination,
.blog .pagination,
.blog-featured .pagination {
    clear: both;
    margin-top: 18px !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.blog > .pagination > ul,
.blog-featured > .pagination > ul,
.blog .pagination > ul,
.blog-featured .pagination > ul,
.pagination-wrapper > ul {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Password strength meter: Joomla inserts <meter> and its status label
   immediately after .password-group. Keep both on their own full-width rows. */
.com-users-profile__edit-form .password-group {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    margin-top: 6px !important;
}

.com-users-profile__edit-form .password-group + meter,
.com-users-profile__edit-form .password-group + meter + div[id^="password-"] {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box;
}

.com-users-profile__edit-form .password-group + meter {
    height: 8px !important;
    margin: 8px 0 5px !important;
    accent-color: var(--site-primary-light);
}

.com-users-profile__edit-form .password-group + meter + div[id^="password-"] {
    min-height: 18px;
    margin: 0 0 8px !important;
    color: var(--site-text-muted) !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

.com-users-profile__edit-form .password-group + meter + div[id^="password-"]:empty {
    min-height: 0;
    margin: 0 !important;
}

.com-users-profile__edit-form [class*="password-strength"],
.com-users-profile__edit-form [class*="password-meter"],
.com-users-profile__edit-form [class*="password-indicator"] {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* Remove the visual band below featured cards and retain only the normal
   18px card-to-content rhythm. */
#sp-feature {
    padding-bottom: 0 !important;
}

#sp-feature + #sp-main-body {
    position: relative;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
}

#sp-feature + #sp-main-body > .container,
#sp-feature + #sp-main-body > .container > .row,
#sp-feature + #sp-main-body #sp-component,
#sp-feature + #sp-main-body #sp-component > .sp-column {
    border-top: 0 !important;
    box-shadow: none !important;
}

#sp-feature + #sp-main-body::before,
#sp-feature + #sp-main-body::after {
    display: none !important;
    content: none !important;
}

/* One card bottom gap, then the same 18px gap before pagination. */
.blog .article-list > .row:last-child article.item,
.blog-featured .article-list > .row:last-child .article {
    margin-bottom: 0 !important;
}

.blog > .pagination,
.blog-featured > .pagination,
.blog .pagination-wrapper,
.blog-featured .pagination-wrapper {
    margin-top: 18px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Google CSE focus/results state: no white surface in any generated layer. */
#sp-top3 .gsc-control-cse,
#sp-top3 .gsc-control-cse *:not(svg):not(path),
#sp-top3 .gsc-results-wrapper-nooverlay,
#sp-top3 .gsc-results-wrapper-visible,
#sp-top3 .gsc-modal-background-image {
    box-shadow: none !important;
}

#sp-top3 .gsc-control-cse input,
#sp-top3 .gsc-control-cse input:focus,
#sp-top3 .gsc-control-cse .gsc-input-box,
#sp-top3 .gsc-control-cse .gsc-input-box-focus,
#sp-top3 .gsc-control-cse .gsc-input-box-hover {
    color: var(--site-heading) !important;
    background-color: #26262a !important;
    background-image: none !important;
    border-color: var(--site-border-strong) !important;
}

/* Final compact card and pagination alignment. */
.blog .article-list article.item,
.blog .article-list article.item > .system-unpublished,
.blog-featured .article-list .article,
.blog-featured .article-list .article > .system-unpublished {
    height: 100% !important;
}

.blog .article-list article.item .entry-header,
.blog .article-list article.item > .system-unpublished > p,
.blog .article-list article.item > .system-unpublished > div:not(.entry-header):not(.article-info) {
    flex: 0 0 auto !important;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) {
    left: 112px !important;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) img,
#sp-top-bar .mod-languages__list img {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* Google CSE adds these wrappers after load and applies its own white
   active-state surface. Normalize the complete search control. */
#sp-top3 .gsc-control-cse table.gsc-search-box,
#sp-top3 .gsc-control-cse table.gsc-search-box td,
#sp-top3 .gsc-control-cse .gsc-search-box-tools,
#sp-top3 .gsc-control-cse .gsc-search-box,
#sp-top3 .gsc-control-cse .gsc-input-box,
#sp-top3 .gsc-control-cse .gsc-input-box-focus,
#sp-top3 .gsc-control-cse .gsc-input-box-hover,
#sp-top3 .gsc-control-cse .gsc-input-box table,
#sp-top3 .gsc-control-cse .gsc-input-box td {
    background: #26262a !important;
    background-color: #26262a !important;
    border-color: var(--site-border-strong) !important;
    box-shadow: none !important;
}

#sp-top3 .gsc-control-cse input.gsc-input,
#sp-top3 .gsc-control-cse input.gsc-input:focus,
#sp-top3 .gsc-control-cse .gsc-input-box input {
    color: var(--site-heading) !important;
    background: #26262a !important;
    background-color: #26262a !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Each row has equal-height columns. The metadata strip is always the last
   flex item, so short and long previews end on the same baseline. */
.blog .article-list > .row,
.blog-featured .article-list > .row {
    align-items: stretch !important;
}

.blog .article-list > .row > [class*="col-"],
.blog-featured .article-list > .row > [class*="col-"] {
    display: flex !important;
    align-items: stretch !important;
}

.blog .article-list article.item,
.blog .article-list article.item > .system-unpublished,
.blog-featured .article-list .article,
.blog-featured .article-list .article > .system-unpublished {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 100% !important;
}

.blog .article-list article.item .article-info,
.blog .article-list article.item dl.article-info,
.blog-featured .article-list .article .article-info,
.blog-featured .article-list .article dl.article-info {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    align-self: stretch !important;
    min-height: 42px !important;
    margin-top: auto !important;
    box-sizing: border-box !important;
}

/* The last card has no artificial bottom margin; pagination starts after the
   same 18px rhythm used between cards, with no framework counter tail gap. */
.blog .article-list > .row:last-child article.item,
.blog-featured .article-list > .row:last-child .article {
    margin-bottom: 0 !important;
}

#sp-component .pagination-wrapper,
.blog .pagination-wrapper,
.blog-featured .pagination-wrapper {
    clear: both !important;
    margin: 6px 0 0 !important;
    padding: 0 !important;
}

#sp-component .pagination-wrapper > .pagination,
#sp-component .pagination-wrapper > ul,
#sp-component .pagination-wrapper ul.pagination,
.blog .pagination-wrapper > ul,
.blog-featured .pagination-wrapper > ul {
    margin: 0 !important;
    padding: 0 !important;
}

#sp-component .pagination-counter,
#sp-component .pagination-wrapper .counter,
.blog .pagination-counter,
.blog-featured .pagination-counter {
    display: block !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

#sp-main-body {
    padding-bottom: 6px !important;
}

/* --------------------------------------------------------------------------
   Responsive layout
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    #sp-component { padding-right: 0 !important; }
    #sp-right { padding-top: 4px; }
    #sp-logo .logo img,
    #sp-logo .sp-default-logo { max-height: 42px !important; }
    #sp-header,
    #sp-header .container,
    #sp-header .row,
    #sp-logo .sp-column,
    #sp-menu .sp-column { min-height: 48px !important; height: 48px !important; }
    #sp-menu .sp-column { justify-content: flex-end; }
    #sp-feature .mod-articles-items.mod-articles-grid { gap: 12px !important; }
}

@media (max-width: 767.98px) {
    .container { width: 100%; }
    #sp-feature { padding-top: 14px !important; }
    #sp-feature .mod-articles-items.mod-articles-grid { grid-template-columns: 1fr; }
    #sp-feature .mod-articles-item img { max-height: none; }
    #sp-main-body { padding-top: 14px !important; }
    .blog .article-list > .row { margin-right: 0; margin-left: 0; }
    .blog .article-list > .row > [class*="col-"] { padding-right: 0; padding-left: 0; }
    .blog .article-list article.item { height: auto; }
    .blog article.item > .system-unpublished img { max-height: none; }
    #sp-right { padding-top: 0; }
}

@media (max-width: 575.98px) {
    #sp-top-bar { font-size: 11px !important; }
    #sp-logo .logo img,
    #sp-logo .sp-default-logo { max-width: 210px !important; max-height: 42px !important; }
    #sp-header,
    #sp-header .container,
    #sp-header .row,
    #sp-logo .sp-column,
    #sp-menu .sp-column { min-height: 48px !important; height: 48px !important; }
    .blog article.item .entry-header { padding: 13px 13px 7px !important; }
    .blog article.item .article-info { padding: 10px 13px 12px !important; }
    .blog article.item > .system-unpublished > p:not(:has(img)) { padding-right: 13px !important; padding-left: 13px !important; }
    .sp-module-title { font-size: 12px !important; }
    .scrollup { right: 15px !important; bottom: 15px !important; }
}

/* Final compact alignment corrections. */
#sp-top1 > .sp-column > .sp-module:has(.mod-languages) {
    left: 104px !important;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) a {
    display: inline-flex !important;
    align-items: center !important;
    margin-left: 10px !important;
    padding-left: 0 !important;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) li {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

#sp-top1 > .sp-column > .sp-module:has(.mod-languages) img,
#sp-top-bar .mod-languages__list img {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin-left: 0 !important;
    vertical-align: middle !important;
}

#sp-top-bar .mod-languages__list img {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin-left: 0 !important;
    vertical-align: middle !important;
}

/* All article rows stretch equally; metadata is pinned to each card bottom. */
.blog .article-list > .row,
.blog-featured .article-list > .row {
    display: flex !important;
    align-items: stretch !important;
}

.blog .article-list > .row > [class*="col-"],
.blog-featured .article-list > .row > [class*="col-"] {
    display: flex !important;
    align-items: stretch !important;
}

.blog .article-list article.item,
.blog .article-list article.item > .system-unpublished,
.blog-featured .article-list .article,
.blog-featured .article-list .article > .system-unpublished {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 100% !important;
}

.blog article.item .article-info,
.blog article.item dl.article-info,
.blog-featured .article .article-info,
.blog-featured .article dl.article-info {
    display: flex !important;
    flex: 0 0 auto !important;
    align-self: stretch !important;
    margin-top: auto !important;
}

/* Keep pagination close to the last card and remove the browser/framework
   top and bottom margins that made the gap look doubled. */
#sp-component .pagination,
#sp-component .pagination-wrapper,
.blog > .pagination,
.blog .pagination,
.blog-featured > .pagination,
.blog-featured .pagination,
.pagination-wrapper {
    clear: both !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#sp-component .pagination > ul,
#sp-component .pagination ul.pagination,
#sp-component .pagination-wrapper > ul,
#sp-component .pagination-wrapper ul.pagination,
.blog .pagination > ul,
.blog-featured .pagination > ul {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#sp-component .pagination .counter,
.blog .pagination .counter,
.blog-featured .pagination .counter {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
}

/* Measured fixes (headless Chrome):
   1. 18px between the featured block and the article grid (was 0).
   2. Vertical gap between tiles = side gap = 18px (was 18 row-gap + 18 margin). */
#sp-feature + #sp-main-body {
    padding-top: 18px !important;
}

.blog .article-list > .row > [class*="col-"] {
    margin-bottom: 0 !important;
}

/* 3. Some article intros contain pasted wrapper divs (e.g. .n6owBd) that
   swallow dl.article-info. Make every wrapper on the path to the metadata a
   growing flex column so the metadata still lands at the card bottom. */
#sp-component .blog .article-list article.item > .system-unpublished div:has(.article-info):not(.entry-header):not(.article-info),
#sp-component .blog .article-list article.item > .system-unpublished > div:has(.article-info):not(.entry-header):not(.article-info) {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0;
}

/* 4. Featured module: template.css gives every ".sp-module ul > li" a
   1px #e8e8e8 bottom border (all but the last item). In the grid this
   shows up as a light stripe under the featured cards. */
#sp-feature .sp-module ul > li,
#sp-feature .mod-articles-items > li,
#sp-feature .mod-articles-items > li:last-child {
    border: 0 !important;
}

#sp-feature hr {
    display: none !important;
}

/* 5. Pagination after the featured/blog grid: same 18px gap as between
   tiles (an earlier #sp-component rule reduced it to 6px). The nested
   pagination elements (ul / .pagination-toolbar) add no extra offset. */
#sp-component .blog-featured > .pagination,
#sp-component .blog > .pagination,
#sp-component .blog .pagination-wrapper,
#sp-component .blog-featured .pagination-wrapper {
    margin-top: 18px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

#sp-component .blog-featured > .pagination .pagination,
#sp-component .blog > .pagination .pagination,
#sp-component .blog .pagination-wrapper .pagination,
#sp-component .blog-featured .pagination-wrapper .pagination {
    margin-top: 0 !important;
}

/* 6. Gap from the top menu (#sp-header) to the first article block = the
   18px gap between article tiles. #sp-feature had 22px (14px on mobile),
   #sp-main-body without a featured block had 14px on mobile. These rules
   come last, so they also override the earlier @media values. */
#sp-feature {
    padding-top: 18px !important;
}

#sp-header ~ #sp-main-body:not(#sp-feature ~ #sp-main-body) {
    padding-top: 18px !important;
}

#sp-feature .sp-module:first-child,
#sp-feature .sp-module-content > :first-child,
#sp-main-body #sp-component > .sp-column > :first-child {
    margin-top: 0 !important;
}
