/* =====================================================================
   ruomi.fi — дизайн «Северный свет» (ноябрь 2026)
   Подключается из шапки (fragments/navbar.html) ПОСЛЕ всех старых слоёв
   (style.css, /theme/css, glass-theme.css, soft-horizon-layout.css),
   поэтому побеждает их при равной специфичности. Где старые слои используют
   !important — здесь тоже !important и селекторы с html body.
   Палитра: озеро #0B1F33 · финский синий #1648D8 · морошка #F5A524 · лёд #F2F5F8
   Шрифты: Unbounded (заголовки, цены, цифры) + Onest (текст, интерфейс)
   ===================================================================== */

html:root {
    --nl-ink: #0B1F33;
    --nl-ink-2: #22364D;
    --nl-text: #1A2E44;
    --nl-muted: #5A6B7E;
    --nl-line: #E2E7EE;
    --nl-line-2: #D5DCE6;
    --nl-bg: #F2F5F8;
    --nl-surface: #FFFFFF;
    --nl-primary: #1648D8;
    --nl-primary-hover: #0E35A8;
    --nl-primary-soft: #E9EFFC;
    --nl-accent: #F5A524;
    --nl-accent-hover: #E6951A;
    --nl-accent-ink: #3B2A06;
    --nl-green: #0E7C66;
    --nl-green-soft: #E3F5EE;
    --nl-danger: #C2341B;
    --nl-navy-2: #13304F;
    --nl-on-navy: #B8C6D8;
    --nl-on-navy-2: #8EA2BA;
    --nl-radius: 16px;
    --nl-radius-lg: 24px;
    --nl-font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --nl-display: 'Unbounded', 'Onest', system-ui, sans-serif;

    /* Bootstrap и старые переменные темы → новая палитра */
    --bs-primary: #1648D8 !important;
    --bs-primary-rgb: 22, 72, 216 !important;
    --bs-link-color: #1648D8;
    --bs-link-color-rgb: 22, 72, 216;
    --bs-link-hover-color: #0E35A8;
    --bs-body-font-family: var(--nl-font);
    --bs-body-color: #1A2E44;
    --bs-body-bg: #F2F5F8;
    --bs-border-color: #E2E7EE;
    --bs-secondary: #5A6B7E !important;
    --bs-success: #0E7C66 !important;
    --bs-danger: #C2341B !important;
    --bs-warning: #F5A524 !important;
    --bs-info: #1648D8 !important;
    --primary-color: #1648D8;
    --border-radius: 16px;
    --box-shadow: none;
    --navbar-height: auto;
}

/* ---------- База ---------- */
html body {
    font-family: var(--nl-font) !important;
    background: var(--nl-bg) !important;
    color: var(--nl-text);
    -webkit-font-smoothing: antialiased;
}
html body h1, html body .h1, html body h2, html body .h2 {
    font-family: var(--nl-display) !important;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--nl-ink);
}
html body h1, html body .h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.15; }
html body h2, html body .h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.2; }
html body h3, html body h4, html body h5, html body h6 { font-family: var(--nl-font) !important; font-weight: 700; color: var(--nl-ink); letter-spacing: 0; }
html body a { color: var(--nl-primary); }
html body a:hover { color: var(--nl-primary-hover); }
html body .text-muted { color: var(--nl-muted) !important; }
html body .text-primary { color: var(--nl-primary) !important; }
html body .bg-primary { background-color: var(--nl-primary) !important; }
html body ::selection { background: #CFDCFB; }
html body :focus-visible { outline: 3px solid #7FA2FF; outline-offset: 2px; }

/* ---------- Кнопки ---------- */
html body .btn {
    font-family: var(--nl-font);
    font-weight: 700;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 0.62rem 1.1rem;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
html body .btn-sm { padding: 0.4rem 0.75rem; border-radius: 10px !important; }
html body .btn-lg { padding: 0.85rem 1.5rem; border-radius: 14px !important; }
html body .btn-primary, html body .btn-teal {
    background: var(--nl-primary) !important; border-color: var(--nl-primary) !important; color: #fff !important;
}
html body .btn-primary:hover, html body .btn-teal:hover { background: var(--nl-primary-hover) !important; border-color: var(--nl-primary-hover) !important; }
html body .btn-coral, html body .btn-warning, html body .btn-post-ad {
    background: var(--nl-accent) !important; border-color: var(--nl-accent) !important; color: var(--nl-ink) !important;
}
html body .btn-coral:hover, html body .btn-warning:hover, html body .btn-post-ad:hover { background: var(--nl-accent-hover) !important; border-color: var(--nl-accent-hover) !important; }
html body .btn-outline-primary, html body .btn-outline-teal, html body .btn-outline-secondary, html body .btn-light {
    background: var(--nl-surface) !important; border: 1px solid var(--nl-line-2) !important; color: var(--nl-ink) !important;
}
html body .btn-outline-primary:hover, html body .btn-outline-teal:hover, html body .btn-outline-secondary:hover, html body .btn-light:hover {
    border-color: var(--nl-primary) !important; color: var(--nl-primary) !important;
}
html body .btn-success { background: var(--nl-green) !important; border-color: var(--nl-green) !important; }
html body .btn-danger { background: var(--nl-danger) !important; border-color: var(--nl-danger) !important; }
html body .btn-secondary { background: var(--nl-ink-2) !important; border-color: var(--nl-ink-2) !important; }

/* ---------- Карточки, формы, таблицы ---------- */
html body .card {
    border: 1px solid var(--nl-line) !important;
    border-radius: var(--nl-radius) !important;
    box-shadow: none !important;
    background: var(--nl-surface);
}
html body .card-header { background: transparent; border-bottom: 1px solid var(--nl-line); font-weight: 700; }
html body .form-control, html body .form-select {
    border-radius: 12px; border: 1px solid var(--nl-line-2); padding: 0.62rem 0.85rem; color: var(--nl-ink); background-color: #fff;
}
html body .form-control:focus, html body .form-select:focus { border-color: var(--nl-primary); box-shadow: 0 0 0 3px rgba(22, 72, 216, 0.18); }
html body .form-label { font-weight: 600; color: var(--nl-ink-2); }
html body .form-check-input:checked { background-color: var(--nl-primary); border-color: var(--nl-primary); }
html body .badge { border-radius: 8px; font-weight: 700; }
html body .badge.bg-primary { background: var(--nl-primary) !important; }
html body .alert { border-radius: var(--nl-radius); border: 0; }
html body .alert-success { background: var(--nl-green-soft); color: #0B5E4D; }
html body .alert-info { background: var(--nl-primary-soft); color: #123A9E; }
html body .alert-warning { background: #FFF1DA; color: #7A4A06; }
html body .alert-danger { background: #FCE8E4; color: #8A2412; }
html body .dropdown-menu {
    border: 1px solid var(--nl-line) !important; border-radius: 14px !important;
    box-shadow: 0 14px 34px rgba(11, 31, 51, 0.12) !important; padding: 0.4rem;
}
html body .dropdown-item { border-radius: 10px; padding: 0.5rem 0.75rem; font-weight: 500; color: var(--nl-ink); }
html body .dropdown-item:hover, html body .dropdown-item:focus { background: var(--nl-primary-soft); color: var(--nl-primary); }
html body .pagination .page-link { border-radius: 10px !important; margin: 0 2px; border: 1px solid var(--nl-line); color: var(--nl-ink); font-weight: 600; }
html body .pagination .page-item.active .page-link { background: var(--nl-primary); border-color: var(--nl-primary); color: #fff; }
html body .table { --bs-table-bg: transparent; }
html body .nav-pills .nav-link.active { background: var(--nl-primary); }
html body .breadcrumb { font-size: 0.9rem; }

/* ---------- Шапка ---------- */
.nl-header {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--nl-line);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    font-family: var(--nl-font);
}
html body .nl-header.navbar { height: auto !important; padding: 0 !important; display: block; }
.nl-header-row {
    max-width: 1240px; margin: 0 auto; padding: 10px 20px;
    display: flex; align-items: center; gap: 10px 22px; flex-wrap: nowrap;
}
.nl-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--nl-ink) !important; flex: 0 0 auto; }
.nl-logo-mark {
    width: 40px; height: 40px; border-radius: 12px; background: var(--nl-ink); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--nl-display); font-weight: 700; font-size: 18px; line-height: 1;
}
.nl-logo-word { font-family: var(--nl-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.nl-logo-word span { color: var(--nl-primary); }
.nl-nav { display: flex; gap: 2px; align-items: center; }
.nl-nav a {
    padding: 9px 13px; border-radius: 10px; font-weight: 600; font-size: 15px;
    color: var(--nl-ink-2) !important; text-decoration: none !important; white-space: nowrap;
}
.nl-nav a:hover { background: var(--nl-bg); }
.nl-nav a.active { background: var(--nl-primary-soft); color: var(--nl-primary) !important; }
.nl-spacer { flex: 1 1 auto; }
.nl-search {
    display: flex; align-items: center; background: var(--nl-bg); border: 1px solid var(--nl-line);
    border-radius: 12px; padding: 2px 4px 2px 12px; flex: 0 1 260px; width: 260px; min-width: 170px; max-width: 100%;
}
.nl-search:focus-within { border-color: var(--nl-primary); background: #fff; }
html body .nl-search input {
    border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0;
    padding: 8px 4px; font-size: 15px; min-width: 0; flex: 1 1 auto; color: var(--nl-ink);
}
.nl-search button {
    width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--nl-muted);
    display: inline-flex; align-items: center; justify-content: center;
}
.nl-search button:hover { color: var(--nl-primary); }
.nl-actions { display: flex; align-items: center; gap: 8px; }
.nl-btn-ghost {
    padding: 9px 14px; border-radius: 12px; border: 1px solid var(--nl-line-2); font-weight: 600;
    color: var(--nl-ink) !important; text-decoration: none !important; white-space: nowrap; background: #fff;
}
.nl-btn-ghost:hover { border-color: var(--nl-primary); color: var(--nl-primary) !important; }
.nl-btn-cta {
    padding: 10px 16px; border-radius: 12px; font-weight: 700; color: var(--nl-ink) !important;
    background: var(--nl-accent); text-decoration: none !important; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 8px; border: 0;
}
.nl-btn-cta:hover { background: var(--nl-accent-hover); }
.nl-user {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px;
    border: 1px solid var(--nl-line-2); background: #fff; color: var(--nl-ink) !important; font-weight: 600;
    text-decoration: none !important; position: relative; max-width: 200px;
}
.nl-user-avatar {
    width: 30px; height: 30px; border-radius: 9px; background: var(--nl-primary-soft); color: var(--nl-primary);
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto;
}
.nl-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-burger {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--nl-line-2); background: #fff;
    color: var(--nl-ink); display: none; align-items: center; justify-content: center; font-size: 18px;
}
/* Вторая строка — только в разделе объявлений */
.nl-subnav { border-top: 1px solid var(--nl-line); }
.nl-subnav-row {
    max-width: 1240px; margin: 0 auto; padding: 6px 20px; display: flex; align-items: center; gap: 6px;
    overflow-x: auto; scrollbar-width: none;
}
.nl-subnav-row::-webkit-scrollbar { display: none; }
.nl-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
    font-size: 14px; font-weight: 600; color: var(--nl-ink-2) !important; background: transparent;
    border: 1px solid transparent; text-decoration: none !important; white-space: nowrap;
}
.nl-chip:hover { background: var(--nl-bg); }
.nl-chip-strong { background: var(--nl-ink) !important; color: #fff !important; }
.nl-chip-strong:hover { background: var(--nl-ink-2) !important; }
.nl-chip-outline { border-color: var(--nl-line-2); background: #fff; }
.nl-chip i { font-size: 13px; }
.nl-subnav .dropdown-menu-mega { left: 50% !important; transform: translateX(-50%); }
/* Мобильное меню */
.nl-mobile-menu { border-top: 1px solid var(--nl-line); background: #fff; }
.nl-mobile-menu-inner { max-width: 1240px; margin: 0 auto; padding: 12px 20px 18px; display: flex; flex-direction: column; gap: 4px; }
.nl-mobile-menu a, .nl-mobile-menu button.nl-mm-link {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; font-weight: 600;
    color: var(--nl-ink) !important; text-decoration: none !important; background: transparent; border: 0; width: 100%; text-align: left;
}
.nl-mobile-menu a:hover { background: var(--nl-bg); }
.nl-mobile-menu i { width: 20px; text-align: center; color: var(--nl-muted); }
.nl-mobile-menu hr { margin: 6px 0; border-color: var(--nl-line); opacity: 1; }
.nl-mobile-menu .nl-search { width: 100%; margin-bottom: 8px; }
@media (max-width: 1199.98px) { .nl-header-row > .nl-search { display: none !important; } }
@media (max-width: 991.98px) {
    .nl-nav, .nl-header .nl-search, .nl-actions .nl-desktop { display: none !important; }
    .nl-burger { display: inline-flex; }
}
@media (min-width: 992px) { .nl-mobile-menu { display: none !important; } }

/* Нижняя панель на телефоне */
html body .ruomi-mobile-bottom {
    left: 10px !important; right: 10px !important; bottom: 10px !important; width: auto !important;
    border-radius: 20px !important; background: #fff !important; border: 1px solid var(--nl-line) !important;
    box-shadow: 0 10px 30px rgba(11, 31, 51, 0.14) !important; backdrop-filter: none !important;
}
html body .ruomi-mobile-bottom-item { color: var(--nl-muted) !important; font-family: var(--nl-font); font-weight: 600; }
html body .ruomi-mobile-bottom-item.active { color: var(--nl-primary) !important; }
html body .ruomi-mobile-bottom-fab span {
    background: var(--nl-accent) !important; color: var(--nl-ink) !important; border-radius: 16px !important;
    box-shadow: none !important;
}

/* ---------- Подвал ---------- */
.nl-footer { margin-top: 64px; background: var(--nl-ink); color: var(--nl-on-navy); font-family: var(--nl-font); }
.nl-footer-inner { max-width: 1240px; margin: 0 auto; padding: 48px 20px 26px; display: flex; flex-direction: column; gap: 32px; }
.nl-footer-cols { display: flex; flex-wrap: wrap; gap: 28px 64px; }
.nl-footer-brand { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.nl-footer-brand .nl-logo-word { color: #fff; font-size: 22px; }
.nl-footer-brand .nl-logo-word span { color: var(--nl-accent); }
.nl-footer-brand p { margin: 0; font-size: 15px; line-height: 1.55; max-width: 330px; }
.nl-footer-col { flex: 1 1 150px; display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.nl-footer-col strong { color: #fff; margin-bottom: 4px; }
html body .nl-footer a { color: var(--nl-on-navy); text-decoration: none; }
html body .nl-footer a:hover { color: #fff; }
.nl-footer-tg { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #13304F; color: #fff !important; font-weight: 600; align-self: flex-start; }
.nl-footer-bottom {
    border-top: 1px solid var(--nl-ink-2); padding-top: 18px; display: flex; flex-wrap: wrap;
    justify-content: space-between; align-items: center; gap: 12px; font-size: 14px;
}
.nl-visits { display: inline-flex; align-items: center; gap: 16px; }
.nl-visits strong { color: #fff; font-family: var(--nl-display); font-size: 16px; font-weight: 700; }
.nl-visits-sep { width: 1px; height: 16px; background: #2E4561; }
html body.ruomi-has-mobile-nav .nl-footer { padding-bottom: 84px; }
@media (min-width: 992px) { html body.ruomi-has-mobile-nav .nl-footer { padding-bottom: 0; } }

/* ---------- Карточки объявлений (главная, список, избранное) ---------- */
html body .ad-card, html body .sh-card {
    background: var(--nl-surface) !important; border: 1px solid var(--nl-line) !important;
    border-radius: 20px !important; overflow: hidden; box-shadow: none !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
html body .ad-card:hover, html body .sh-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11, 31, 51, 0.10) !important; }
html body .ad-card .ad-media, html body .sh-card .ad-media { position: relative; aspect-ratio: 4 / 3; background: var(--nl-primary-soft); overflow: hidden; border-radius: 0 !important; }
html body .ad-card .ad-media img { width: 100%; height: 100%; object-fit: cover; }
html body .ad-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #8FA6D8; font-size: 2rem; background: var(--nl-primary-soft) !important; }
html body .ad-body { padding: 14px 16px 16px !important; display: flex; flex-direction: column; gap: 6px; }
html body .ad-title { color: var(--nl-ink) !important; font-weight: 600 !important; font-size: 15px !important; line-height: 1.35; }
html body .ad-title:hover { color: var(--nl-primary) !important; }
html body .sh-card-price, html body .ad-price {
    font-family: var(--nl-display) !important; font-weight: 700 !important; font-size: 18px !important; color: var(--nl-ink) !important;
}
html body .sh-card-meta { font-size: 13px !important; color: var(--nl-muted) !important; display: flex; justify-content: space-between; align-items: center; }
html body .sh-card-fav { color: var(--nl-muted); }
html body .ad-badge { border-radius: 8px !important; font-weight: 700 !important; font-size: 12px !important; padding: 4px 8px !important; }
html body .sh-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important; gap: 16px !important; }

/* ---------- Главная ---------- */
.nl-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.nl-hero {
    margin-top: 24px; background: var(--nl-ink); color: #fff; border-radius: 28px; padding: 44px;
    display: flex; flex-wrap: wrap; gap: 36px; position: relative; overflow: hidden;
}
.nl-hero-art { position: absolute; right: -40px; bottom: -70px; opacity: 0.12; pointer-events: none; }
.nl-hero-main { flex: 1 1 520px; display: flex; flex-direction: column; gap: 20px; position: relative; min-width: 0; }
.nl-hero-kicker { align-self: flex-start; padding: 7px 12px; border-radius: 999px; background: var(--nl-accent); color: var(--nl-ink); font-weight: 700; font-size: 13px; }
html body .nl-hero h1 { margin: 0; color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.08; }
.nl-hero-lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--nl-on-navy); max-width: 540px; }
.nl-hero-search { display: flex; flex-wrap: wrap; gap: 8px; background: #fff; border-radius: 18px; padding: 8px; max-width: 660px; }
html body .nl-hero-search input {
    flex: 1 1 200px; min-width: 0; border: 0 !important; outline: 0; box-shadow: none !important; font-size: 16px;
    padding: 12px 14px; color: var(--nl-ink); background: transparent !important;
}
html body .nl-hero-search select {
    flex: 0 1 165px; font-size: 15px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--nl-line);
    background-color: var(--nl-bg); color: var(--nl-ink);
}
.nl-hero-search button { border: 0; border-radius: 12px; padding: 12px 26px; font-weight: 700; font-size: 16px; color: #fff; background: var(--nl-primary); }
.nl-hero-search button:hover { background: var(--nl-primary-hover); }
.nl-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; align-items: center; }
.nl-hero-tags span { color: var(--nl-on-navy-2); }
html body .nl-hero-tags a { color: #fff; padding: 6px 12px; border-radius: 999px; border: 1px solid #2E4561; text-decoration: none; }
html body .nl-hero-tags a:hover { border-color: #fff; color: #fff; }
.nl-today { flex: 1 1 320px; max-width: 410px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.nl-border-card { background: var(--nl-navy-2); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.nl-border-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.nl-live { font-size: 12px; color: var(--nl-on-navy-2); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.nl-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3DDC97; }
.nl-border-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nl-border-cell { background: var(--nl-ink); border-radius: 14px; padding: 14px; }
.nl-border-cell small { display: block; font-size: 13px; color: var(--nl-on-navy-2); }
.nl-border-cell b { display: block; font-family: var(--nl-display); font-size: 26px; font-weight: 700; margin: 2px 0; color: #fff; }
html body .nl-border-card a { color: var(--nl-accent); font-weight: 600; font-size: 14px; text-decoration: none; }
html body .nl-today-news { background: #fff; color: var(--nl-ink); border-radius: 20px; padding: 14px; display: flex; gap: 14px; align-items: center; text-decoration: none; }
html body .nl-today-news:hover { color: var(--nl-ink); box-shadow: 0 0 0 3px rgba(245, 165, 36, .55); }
.nl-today-news img, .nl-today-news .nl-thumb { width: 92px; height: 72px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; background: var(--nl-primary-soft); }
.nl-today-news small { display: block; font-size: 12px; font-weight: 700; color: #B45309; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.nl-today-news strong { font-size: 15px; line-height: 1.3; }

.nl-section { margin-top: 48px; }
.nl-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
html body .nl-section-head h2 { margin: 0; }
.nl-section-head a { font-weight: 600; text-decoration: none; }
.nl-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
html body .nl-cat {
    background: #fff; border: 1px solid var(--nl-line); border-radius: 18px; padding: 18px; display: flex;
    flex-direction: column; gap: 14px; color: var(--nl-ink); text-decoration: none; font-weight: 700;
    transition: border-color .15s ease, transform .15s ease;
}
html body .nl-cat:hover { border-color: var(--nl-primary); color: var(--nl-ink); transform: translateY(-2px); }
.nl-cat-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.nl-tint-0 { background: #E9EFFC; color: #1648D8; }
.nl-tint-1 { background: #FFF1DA; color: #B45309; }
.nl-tint-2 { background: #E3F5EE; color: #0E7C66; }
.nl-tint-3 { background: #F1EAFB; color: #6D3FC4; }

.nl-news { display: flex; flex-wrap: wrap; gap: 16px; }
html body .nl-news-lead {
    flex: 999 1 540px; min-width: 0; background: #fff; border: 1px solid var(--nl-line); border-radius: 24px;
    overflow: hidden; color: var(--nl-ink); text-decoration: none; display: flex; flex-direction: column;
}
html body .nl-news-lead:hover { color: var(--nl-ink); border-color: var(--nl-primary); }
.nl-news-lead img, .nl-news-lead .nl-thumb { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: var(--nl-primary-soft); display: block; }
.nl-news-lead-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.nl-news-lead-body b { font-family: var(--nl-display); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.22; letter-spacing: -0.01em; }
.nl-news-lead-body p { margin: 0; font-size: 16px; line-height: 1.55; color: #3A4D63; }
.nl-meta { font-size: 13px; color: var(--nl-muted); }
.nl-meta em { font-style: normal; color: var(--nl-primary); font-weight: 700; }
.nl-news-side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
html body .nl-news-item {
    background: #fff; border: 1px solid var(--nl-line); border-radius: 18px; padding: 16px 18px; color: var(--nl-ink);
    text-decoration: none; display: flex; flex-direction: column; gap: 6px;
}
html body .nl-news-item:hover { color: var(--nl-ink); border-color: var(--nl-primary); }
.nl-news-item b { font-size: 16px; line-height: 1.35; }
html body .nl-tg {
    background: #229ED9; color: #fff; border-radius: 18px; padding: 16px 18px; display: flex; align-items: center;
    gap: 14px; text-decoration: none;
}
html body .nl-tg:hover { color: #fff; background: #1C8CC2; }
.nl-tg i { font-size: 26px; }
.nl-tg span { display: flex; flex-direction: column; font-weight: 700; }
.nl-tg small { font-weight: 500; opacity: .92; }

.nl-promo {
    margin-top: 56px; background: var(--nl-accent); border-radius: 28px; padding: 34px 40px; display: flex;
    flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
html body .nl-promo h2 { margin: 0 0 6px; color: var(--nl-ink); }
.nl-promo p { margin: 0; font-size: 17px; color: var(--nl-accent-ink); }
html body .nl-promo .nl-promo-btn { background: var(--nl-ink); color: #fff; font-weight: 700; padding: 15px 24px; border-radius: 14px; text-decoration: none; white-space: nowrap; }
html body .nl-promo .nl-promo-btn:hover { background: var(--nl-ink-2); color: #fff; }

.nl-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.nl-tool { background: #fff; border: 1px solid var(--nl-line); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.nl-tool h3 { margin: 0; font-size: 18px; }
.nl-tool p { margin: 0; color: var(--nl-muted); line-height: 1.5; }
.nl-tool .nl-tool-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

@media (max-width: 767.98px) {
    .nl-hero { padding: 26px 18px; border-radius: 22px; margin-top: 12px; gap: 22px; }
    .nl-hero-lead { font-size: 16px; }
    .nl-hero-search button { flex: 1 1 100%; }
    html body .nl-hero-search select { flex: 1 1 100%; }
    .nl-section { margin-top: 36px; }
    .nl-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    html body .nl-cat { padding: 12px 4px; align-items: center; text-align: center; font-size: 12px; gap: 8px; border-radius: 16px; }
    .nl-cat-icon { width: 38px; height: 38px; font-size: 16px; }
    html body .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    html body .ad-body { padding: 10px 12px 12px !important; }
    html body .sh-card-price, html body .ad-price { font-size: 15px !important; }
    .nl-promo { padding: 24px 20px; border-radius: 22px; }
}

/* ---------- Старые элементы, которые больше не нужны ---------- */
html body .ruomi-visit-stats { display: none !important; } /* счётчик теперь в .nl-footer */

/* ---------- Новости (/news) в новой системе ---------- */
html body .news-card { border-radius: 20px; border: 1px solid var(--nl-line); box-shadow: none; }
html body .news-card:hover { border-color: var(--nl-primary); box-shadow: 0 12px 28px rgba(11, 31, 51, 0.10); }
html body .news-card-title { font-family: var(--nl-font) !important; font-weight: 700; letter-spacing: 0; font-size: 1.08rem; }
html body .news-card.featured .news-card-title { font-family: var(--nl-display) !important; font-size: clamp(1.2rem, 2.2vw, 1.55rem); letter-spacing: -0.01em; }
html body .news-card-placeholder { background: var(--nl-ink); }
html body .news-cats a { border-color: var(--nl-line-2); background: #fff; font-weight: 600; }
html body .news-cats a.active, html body .news-cats a:hover { background: var(--nl-ink); border-color: var(--nl-ink); color: #fff; }
html body .news-article .news-lead { font-size: 1.2rem; color: var(--nl-ink-2); }
html body .news-body { color: var(--nl-text); font-size: 1.1rem; }
html body .news-body blockquote { border-left: 0; background: #FFF6E5; color: var(--nl-accent-ink); border-radius: 16px; padding: 16px 20px; }
html body .news-sources { background: #fff; border: 1px solid var(--nl-line); }
html body .news-side-item { border-bottom-color: #EEF1F5; }
html body .news-tg-cta { border-radius: 18px; }

/* Порядок в карточке: цена → заголовок → город и дата (старый слой переставлял мету наверх) */
html body .ad-body .sh-card-price, html body .ad-body .ad-price { order: 0 !important; }
html body .ad-body .ad-title { order: 1 !important; }
html body .ad-body .sh-card-meta { order: 2 !important; }

/* Страница объявления */
html body .ad-detail-price { font-family: var(--nl-display) !important; font-weight: 700 !important; color: var(--nl-ink) !important; }
html body .ad-detail-price {
    background: none !important; padding: 0 !important; box-shadow: none !important; border-radius: 0 !important;
    font-size: clamp(1.6rem, 3vw, 2.1rem) !important; -webkit-text-fill-color: currentColor !important;
}
html body .ruomi-mobile-bottom-fab { background: transparent !important; box-shadow: none !important; }

/* Блок «Главное» в статье (те же пункты уходят в Telegram) */
html body .news-keypoints { background: var(--nl-primary-soft); border-radius: 18px; padding: 18px 22px 8px; margin: 4px 0 8px; }
html body .news-keypoints h2 { font-family: var(--nl-font) !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--nl-primary) !important; margin: 0 0 10px; }
html body .news-keypoints ul { list-style: none; padding: 0; margin: 0; }
html body .news-keypoints li { position: relative; padding: 0 0 10px 22px; font-size: 1.02rem; line-height: 1.5; color: var(--nl-ink); font-weight: 500; }
html body .news-keypoints li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 3px; background: var(--nl-accent); }

/* ---------- Поделиться ---------- */
.nl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0; }
.nl-share-label { font-weight: 700; font-size: 14px; color: var(--nl-muted); }
.nl-share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html body .nl-share-btn {
    width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--nl-line); color: var(--c, var(--nl-ink)) !important; font-size: 18px;
    text-decoration: none !important; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
html body .nl-share-btn:hover { background: var(--c, var(--nl-ink)); border-color: var(--c, var(--nl-ink)); color: #fff !important; }
.nl-share-native { --c: var(--nl-primary); }
.nl-share-done { font-size: 13px; color: var(--nl-green); font-weight: 600; }

/* ---------- Оценка статьи ---------- */
.nl-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 22px 0 6px; }
html body .nl-react, html body .nl-react-comments {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px;
    background: #fff; border: 1px solid var(--nl-line); color: var(--nl-ink-2); font-weight: 700; font-size: 15px;
    text-decoration: none; cursor: pointer;
}
html body .nl-react:hover, html body .nl-react-comments:hover { border-color: var(--nl-primary); color: var(--nl-primary); }
html body .nl-react.on { background: var(--nl-primary); border-color: var(--nl-primary); color: #fff; }
html body .nl-react-down.on { background: var(--nl-ink-2); border-color: var(--nl-ink-2); }

/* ---------- Комментарии ---------- */
.nl-comments { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--nl-line); }
.nl-comment-list { list-style: none; padding: 0; margin: 18px 0 24px; display: flex; flex-direction: column; gap: 14px; }
.nl-comment { display: flex; gap: 12px; }
.nl-comment-avatar {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: var(--nl-primary-soft); color: var(--nl-primary);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--nl-display);
}
.nl-comment-body { flex: 1 1 auto; min-width: 0; background: #fff; border: 1px solid var(--nl-line); border-radius: 0 16px 16px 16px; padding: 12px 16px; }
.nl-comment-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 4px; }
.nl-comment-head time { font-size: 13px; color: var(--nl-muted); }
.nl-comment-body p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; }
.nl-comment-form { background: #fff; border: 1px solid var(--nl-line); border-radius: 18px; padding: 18px 20px; }
.nl-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Промо приложения Sisu (изучение финского бесплатно) ---------- */
.nl-sisu-mark {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--nl-primary); color: #fff; font-weight: 800; font-size: 17px; letter-spacing: 0.02em;
}
.nl-sisu-mark-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; }
html body a.nl-sisu-card {
    display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 1.5rem; border-radius: 18px;
    background: var(--nl-primary-soft, #E8EEFC); color: var(--nl-ink); text-decoration: none; border: 1px solid transparent;
}
html body a.nl-sisu-card:hover { border-color: var(--nl-primary); color: var(--nl-ink); }
.nl-sisu-card strong { display: block; font-size: 15px; }
.nl-sisu-card small { display: block; color: var(--nl-muted); line-height: 1.4; margin-top: 2px; }
.nl-sisu-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; margin: 28px 0; padding: 24px 26px;
    border-radius: 24px; background: var(--nl-primary-soft, #E8EEFC); border: 1px solid #D3DEF8;
}
.nl-sisu-text { flex: 1 1 320px; min-width: 0; }
.nl-sisu-text strong { display: block; font-size: 19px; color: var(--nl-ink); margin-bottom: 6px; }
.nl-sisu-text p { margin: 0; color: var(--nl-ink-2); line-height: 1.55; }
.nl-sisu-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html body .nl-sisu-btn { background: var(--nl-primary); color: #fff; font-weight: 700; padding: 12px 20px; border-radius: 12px; text-decoration: none; white-space: nowrap; }
html body .nl-sisu-btn:hover { background: var(--nl-primary-hover); color: #fff; }
html body .nl-sisu-more { color: var(--nl-primary); font-weight: 600; padding: 12px 8px; text-decoration: none; }
@media (max-width: 640px) {
    .nl-sisu-banner { padding: 20px 18px; }
    .nl-sisu-actions, .nl-sisu-btn { flex: 1 1 100%; text-align: center; }
}

/* ---------- Подкатегории в списке объявлений ---------- */
.nl-subchips { display: flex; flex-wrap: wrap; gap: 6px; }
html body .nl-subchips a {
    padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none;
    color: var(--nl-ink-2); background: #fff; border: 1px solid var(--nl-line-2, #D5DDE7);
}
html body .nl-subchips a:hover { border-color: var(--nl-primary); color: var(--nl-primary); }
html body .nl-subchips a.active { background: var(--nl-ink); border-color: var(--nl-ink); color: #fff; }

/* ---------- Форма подачи объявления (fragments/ad-form) ---------- */
.af-page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 56px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.af-page-head { grid-column: 1 / -1; }
html body .af-page-head h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.af-page-head p { margin: 0; color: var(--nl-muted); }
.af { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.af-card { background: #fff; border: 1px solid var(--nl-line); border-radius: 22px; padding: 22px 24px; }
html body .af-card h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 0 0 16px; }
.af-step { width: 28px; height: 28px; border-radius: 9px; background: var(--nl-primary-soft); color: var(--nl-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; flex: 0 0 auto; }
.af-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.af-cat { position: relative; margin: 0; cursor: pointer; }
.af-cat input { position: absolute; opacity: 0; pointer-events: none; }
.af-cat-body { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--nl-line); border-radius: 14px; font-weight: 600; font-size: 14.5px; color: var(--nl-ink-2); background: #fff; height: 100%; transition: border-color .15s, background .15s; }
.af-cat-body i { width: 20px; text-align: center; color: var(--nl-primary); }
.af-cat:hover .af-cat-body { border-color: var(--nl-primary); }
.af-cat input:checked + .af-cat-body { background: var(--nl-ink); border-color: var(--nl-ink); color: #fff; }
.af-cat input:checked + .af-cat-body i { color: var(--nl-accent, #F5A524); }
.af-cat input:focus-visible + .af-cat-body { outline: 3px solid var(--nl-primary-soft); outline-offset: 2px; }
.af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.af-after-cat { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--nl-line); }
.af-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.af-field:last-child { margin-bottom: 0; }
.af-label { font-weight: 700; font-size: 14.5px; color: var(--nl-ink); margin: 0; }
.af-req { color: #C2410C; }
.af-opt { font-weight: 500; color: var(--nl-muted); font-size: 13px; margin-left: 4px; }
.af-hint { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--nl-muted); }
.af-muted { color: var(--nl-muted); margin: -6px 0 12px; }
.af-error { margin: 0; color: #B42318; font-size: 13.5px; font-weight: 600; }
.af-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: #FEF3F2; color: #912018; border: 1px solid #FECDCA; font-weight: 600; }
.af-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.af-seg-item { margin: 0; cursor: pointer; }
.af-seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.af-seg-item span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--nl-line); font-weight: 600; font-size: 14px; color: var(--nl-ink-2); }
.af-seg-item input:checked + span { background: var(--nl-primary); border-color: var(--nl-primary); color: #fff; }
.af-seg-item input:focus-visible + span { outline: 3px solid var(--nl-primary-soft); }
.af-editor { min-height: 180px; }
html body .af .ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; border-color: var(--nl-line); }
html body .af .ql-container.ql-snow { border-radius: 0 0 12px 12px; border-color: var(--nl-line); font-size: 15px; font-family: inherit; min-height: 180px; }
.af-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 8px; }
.af-photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--nl-bg); border: 1px solid var(--nl-line); }
.af-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-photo.is-removed img { opacity: .3; filter: grayscale(1); }
.af-photo-main { position: absolute; left: 6px; bottom: 6px; background: var(--nl-accent, #F5A524); color: var(--nl-ink); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.af-photo-remove { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(11, 31, 51, .78); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin: 0; }
.af-photo.is-removed .af-photo-remove { background: #B42318; }
.af-drop { aspect-ratio: 1; border-radius: 14px; border: 2px dashed #C5D2E3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; cursor: pointer; color: var(--nl-ink-2); padding: 8px; margin: 0; background: #FAFBFD; }
.af-drop i { font-size: 22px; color: var(--nl-primary); }
.af-drop strong { font-size: 13.5px; }
.af-drop small { font-size: 11.5px; color: var(--nl-muted); line-height: 1.25; }
.af-drop:hover, .af-drop.is-over { border-color: var(--nl-primary); background: var(--nl-primary-soft); }
.af-price { display: flex; align-items: center; gap: 8px; }
.af-price input { max-width: 220px; }
.af-price span { font-weight: 700; color: var(--nl-muted); }
.af-submit { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
html body .af-submit .btn { padding: 12px 22px; border-radius: 12px; font-weight: 700; }
.af-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; }
.af-side-card { background: #fff; border: 1px solid var(--nl-line); border-radius: 20px; padding: 20px; }
html body .af-side-card h3 { font-size: 16px; margin: 0 0 10px; }
.af-side-card ul { margin: 0; padding-left: 18px; color: var(--nl-ink-2); line-height: 1.55; font-size: 14.5px; }
.af-side-card li + li { margin-top: 6px; }
.af-side-card p { margin: 0; color: var(--nl-ink-2); font-size: 14.5px; line-height: 1.55; }
.af-side-accent { background: var(--nl-ink); border-color: var(--nl-ink); color: #fff; }
html body .af-side-accent h3, .af-side-accent p { color: #fff; }
.af-side-accent p { color: #C9D6E5; }
@media (max-width: 991.98px) {
    .af-page { grid-template-columns: 1fr; }
    .af-side { position: static; }
}
@media (max-width: 640px) {
    .af-page { padding: 16px 12px 40px; }
    .af-card { padding: 18px 16px; border-radius: 18px; }
    .af-row { grid-template-columns: 1fr; gap: 0; }
    .af-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .af-submit .btn { flex: 1 1 100%; }
}
.nl-cat-intro { max-width: 820px; font-size: 15px; line-height: 1.6; opacity: .9; }
