:root {
  --vw-blue: #001e50;
  --vw-blue-mid: #0a3a7a;
  --vw-sky: #00b0f0;
  --surface: #f3f6f9;
  --panel: #ffffff;
  --line: #d7dee8;
  --text: #1a2433;
  --muted: #5c6b7e;
  --sidebar-w: 280px;
  --nav-w: 260px;
  --topbar-h: 72px;
  --tabs-h: 46px;
  --footer-h: 48px;
  --font-ui: "Source Sans 3", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Source Sans 3", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0, 176, 240, 0.18), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(0, 30, 80, 0.12), transparent 50%),
    linear-gradient(180deg, #e8eef5 0%, var(--surface) 40%, #eef2f6 100%);
}

.app-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  height: var(--topbar-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(90deg, var(--vw-blue) 0%, var(--vw-blue-mid) 70%, #0d4a8c 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 30, 80, 0.25);
  position: sticky;
  top: 0;
  z-index: 10000;
}

.topbar-row {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

/* Десктоп: бренд | поиск | донат | мета — одна строка */
.topbar-row-main {
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 0 1 auto;
  order: 1;
  color: inherit;
}

a.brand-block:hover,
a.brand-block:focus-visible {
  color: #fff;
  opacity: 0.95;
}

.top-search {
  position: relative;
  flex: 1 1 auto;
  width: auto;
  min-width: 12rem;
  max-width: 520px;
  order: 2;
}

.top-donate {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  order: 3;
  /* Без поиска (extras-страницы) — прижать к блоку мета справа */
  margin-left: auto;
}

.topbar-row-main > .top-search + .top-donate {
  margin-left: 0;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.donate-btn:hover,
.donate-btn:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.donate-btn:focus-visible {
  outline: 2px solid var(--vw-sky);
  outline-offset: 2px;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background:
    radial-gradient(circle at 50% 50%, transparent 42%, #fff 43% 52%, transparent 53%),
    linear-gradient(135deg, var(--vw-sky), #fff);
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.8rem;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-search .input-group-text,
.top-search .form-control {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.top-search .form-control::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.top-search .form-control:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--vw-sky);
  box-shadow: 0 0 0 0.2rem rgba(0, 176, 240, 0.25);
  color: #fff;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(0, 30, 80, 0.18);
  z-index: 40;
}

.search-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  border-bottom: 1px solid #eef2f6;
}

.search-item:hover,
.search-item:focus {
  background: #eef6fb;
}

.search-item .si-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.search-item .si-path {
  font-size: 0.75rem;
  color: var(--muted);
}

.top-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 0;
  flex: 0 0 auto;
  margin-left: auto;
  order: 4;
}

.top-meta-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.35rem;
  overflow: hidden;
}

.user-account {
  position: relative;
  flex: 0 0 auto;
}

.user-account-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.35rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.user-account-btn:hover,
.user-account-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.user-account-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 10050;
  width: min(17.5rem, calc(100vw - 1.5rem));
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 0.45rem;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  text-align: left;
}

.user-account-close {
  position: absolute;
  top: 0.2rem;
  right: 0.35rem;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.user-account-close:hover {
  color: #111;
}

.user-account-email {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0.15rem 1.5rem 0.65rem 0;
  word-break: break-all;
}

.user-account-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-account-links a,
.user-account-link-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--vw-blue, #001e50);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.35rem 0.25rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.user-account-links a:hover,
.user-account-link-btn:hover {
  background: rgba(0, 30, 80, 0.06);
}

.user-account-logout-form {
  margin: 0;
}

.user-login-form .form-label {
  color: #333;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  line-height: 1.3;
  cursor: pointer;
}

.lang-btn + .lang-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.lang-btn.is-active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lang-btn:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.top-meta .meta-count {
  font-weight: 600;
  font-size: 0.95rem;
}

.top-meta .meta-source {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  text-decoration: none;
}

.top-meta .meta-source:hover {
  color: #fff;
  text-decoration: underline;
}

.section-tabs {
  height: var(--tabs-h);
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  flex-wrap: nowrap;
  flex-shrink: 0;
  /* overflow нельзя: обрезает Bootstrap dropdown «Дополнительно» */
  z-index: 9999;
}

.section-tabs .nav-link {
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-weight: 600;
  padding: 0.85rem 1.1rem;
  position: relative;
}

.section-tabs .nav-link.active {
  color: var(--vw-blue);
  background: transparent;
}

.section-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 3px;
  background: var(--vw-sky);
  border-radius: 2px 2px 0 0;
}

.section-tabs .extras-dropdown {
  margin-left: 0.25rem;
  position: relative;
}

.section-tabs .extras-dropdown .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.section-tabs .extras-dropdown .dropdown-menu {
  /* Рядом с кнопкой, без смещения sticky/fixed Popper */
  position: absolute;
  inset: auto auto auto auto;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  margin-top: 0.15rem;
}

.section-tabs .share-nav-item {
  margin-left: auto;
  flex-shrink: 0;
}

.section-tabs .share-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.section-tabs .share-nav-icon {
  display: none;
  line-height: 0;
}

.section-tabs .share-nav-text {
  display: inline;
}

.extras-dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0 10px 28px rgba(0, 30, 80, 0.12);
  padding: 0.35rem;
  min-width: 12rem;
}

.extras-dropdown-menu .dropdown-item {
  border-radius: 0.35rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.45rem 0.75rem;
}

.extras-dropdown-menu .dropdown-item:hover,
.extras-dropdown-menu .dropdown-item:focus {
  background: rgba(0, 176, 240, 0.12);
  color: var(--vw-blue);
}

.extras-dropdown-menu .dropdown-item.active {
  background: rgba(0, 30, 80, 0.08);
  color: var(--vw-blue);
}

.extras-shell {
  padding-bottom: var(--footer-h);
}

.extras-shell .app-topbar {
  position: sticky;
  top: 0;
  z-index: 10000;
}

.extras-shell .section-tabs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 9999;
}

.extras-main {
  flex: 1;
  min-height: 0;
  padding: 1rem 1.25rem 2rem;
  overflow: auto;
}

.extras-header {
  margin-bottom: 1rem;
}

.extras-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--vw-blue);
  margin: 0 0 0.35rem;
}

.extras-lead {
  font-size: 0.95rem;
  max-width: 46rem;
}

.model-tabs {
  border-bottom: 1px solid var(--line);
  gap: 0.15rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.model-tabs .nav-link {
  border: 0;
  border-radius: 0.45rem 0.45rem 0 0;
  color: var(--muted);
  font-weight: 600;
  padding: 0.65rem 0.95rem;
  position: relative;
}

.model-tabs .nav-link.active {
  color: var(--vw-blue);
  background: rgba(255, 255, 255, 0.9);
}

.model-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0;
  height: 3px;
  background: var(--vw-sky);
  border-radius: 2px 2px 0 0;
}

/* Контент CMS-статей (Bootstrap-классы уже есть на сайте) */
.cms-article-body img {
  max-width: 100%;
  height: auto;
}

/* Aftersales в CMS: те же стили, что у .aftersales-doc */
.cms-article-body .aftersales-doc h2,
.cms-article-body .aftersales-doc h3,
.cms-article-body .aftersales-doc h4 {
  scroll-margin-top: calc(var(--topbar-h) + var(--tabs-h) + 1rem);
}

.cms-article-body .aftersales-doc h2 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
}

.cms-article-body .aftersales-doc h3 {
  font-size: 1.15rem;
  margin-top: 1.25rem;
}

.cms-article-body .aftersales-doc h4 {
  font-size: 1.05rem;
  margin-top: 1rem;
}

.cms-article-body .aftersales-doc p {
  margin-bottom: 0.75rem;
}

.cms-article-body .aftersales-doc .alert {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.cms-article-body .aftersales-doc .alert .bi {
  margin-top: 0.15rem;
}

.cms-article-body .aftersales-figure {
  margin: 1rem 0;
}

.cms-article-body .aftersales-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.35rem;
}

.cms-article-body .aftersales-table {
  width: 100%;
  margin-bottom: 1rem;
}

.cms-article-body .trim-table-wrap {
  max-height: calc(100vh - var(--topbar-h) - var(--tabs-h) - 10rem);
}

.trim-table-wrap {
  overflow: auto;
  max-height: calc(100vh - var(--topbar-h) - var(--tabs-h) - 11rem);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 30, 80, 0.06);
}

.trim-table {
  margin: 0;
  min-width: 720px;
  font-size: 0.9rem;
}

.trim-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8fc;
  color: var(--vw-blue);
  font-weight: 700;
  vertical-align: bottom;
  border-bottom-width: 1px;
  min-width: 9.5rem;
  max-width: 14rem;
  white-space: normal;
  line-height: 1.25;
}

.trim-table .trim-label-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  min-width: 13rem;
  max-width: 18rem;
  font-weight: 600;
  color: var(--text);
}

.trim-table thead .trim-label-col {
  z-index: 3;
  background: #f5f8fc;
}

.trim-table td,
.trim-table th {
  padding: 0.45rem 0.7rem;
  vertical-align: middle;
  border-color: #e6edf5;
}

.trim-section-row th {
  background: linear-gradient(90deg, rgba(0, 30, 80, 0.08), rgba(0, 176, 240, 0.08));
  color: var(--vw-blue);
  font-weight: 700;
  position: sticky;
  left: 0;
  z-index: 1;
}

.extras-thanks {
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-size: 0.82rem;
}

.extras-shell .lang-btn {
  text-decoration: none;
}

.info-section {
  max-width: 46rem;
}

.info-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--vw-blue);
  margin: 0 0 0.35rem;
}

.info-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--vw-blue);
  margin: 1.25rem 0 0.5rem;
}

.info-specs {
  margin: 0.85rem 0 1rem;
  display: grid;
  gap: 0.35rem;
}

.info-spec-row {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #eef2f6;
}

.info-spec-row dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.info-spec-row dd {
  margin: 0;
  color: var(--text);
}

.info-table-wrap {
  overflow: auto;
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 30, 80, 0.06);
}

.info-table {
  margin: 0;
  font-size: 0.9rem;
}

.info-table thead th {
  background: #f5f8fc;
  color: var(--vw-blue);
  font-weight: 700;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.info-table td,
.info-table th {
  padding: 0.45rem 0.7rem;
  vertical-align: middle;
  border-color: #e6edf5;
}

.info-notes {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.45;
}

.info-notes > li {
  margin-bottom: 0.45rem;
}

.info-winter-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.info-plain-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .info-spec-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.codings-disclaimer {
  max-width: 52rem;
  border: 1px solid rgba(180, 120, 20, 0.35);
  background: #fff8e8;
  color: #5c4a1e;
  font-size: 0.92rem;
  line-height: 1.45;
}

.cms-article-body .codings-body,
.codings-body {
  max-width: 52rem;
}

.codings-toc {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
  line-height: 1.45;
}

.codings-entry {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eef2f6;
}

.codings-entry:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

.codings-entry-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--vw-blue);
  margin: 0 0 0.45rem;
}

.codings-body p {
  margin-bottom: 0.45rem;
}

.codings-body ul {
  margin: 0.25rem 0 0.55rem;
  padding-left: 1.2rem;
}

.codings-body code {
  font-size: 0.86em;
  color: #123a66;
  word-break: break-word;
}

.codings-body .codings-tooling {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.88rem;
}

.codings-body .extras-thanks {
  margin-top: 0.5rem;
}

.aftersales-model-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  max-width: 36rem;
}

.aftersales-model-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(0, 30, 80, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aftersales-model-card:hover,
.aftersales-model-card:focus {
  border-color: rgba(0, 176, 240, 0.55);
  box-shadow: 0 8px 22px rgba(0, 30, 80, 0.1);
  color: inherit;
}

.aftersales-model-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--vw-blue);
}

.aftersales-model-version {
  font-size: 0.9rem;
  color: var(--muted);
}

.aftersales-doc-shell {
  /* На странице документа нет footer — не даём всей странице уезжать вверх. */
  height: 100vh;
  height: 100dvh;
  padding-bottom: 0;
  overflow: hidden;
}

.aftersales-doc-shell .section-tabs {
  flex-shrink: 0;
}

.aftersales-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) 1fr;
  overflow: hidden;
}

.aftersales-toc {
  border-right: 1px solid var(--line);
  background: #f7fafc;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* На случай, если скролл уйдёт на страницу — TOC остаётся «плавающим». */
  position: sticky;
  top: 0;
  align-self: stretch;
  max-height: 100%;
  z-index: 2;
}

.aftersales-toc-head {
  padding: 0.85rem 1rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.aftersales-back {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vw-blue-mid);
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.aftersales-back:hover {
  text-decoration: underline;
}

.aftersales-toc-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--vw-blue);
}

.aftersales-toc-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.55rem 0.65rem 1rem;
}

.aftersales-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aftersales-toc-list .aftersales-toc-list {
  padding-left: 0.75rem;
  margin-top: 0.15rem;
}

.aftersales-toc-item > a {
  display: block;
  padding: 0.28rem 0.45rem;
  border-radius: 0.35rem;
  text-decoration: none;
  color: var(--text);
  line-height: 1.3;
  font-size: 0.84rem;
}

.aftersales-toc-level-1 > a {
  font-weight: 700;
  color: var(--vw-blue);
  font-size: 0.9rem;
}

.aftersales-toc-level-2 > a {
  font-weight: 600;
}

.aftersales-toc-level-3 > a {
  color: var(--muted);
  font-size: 0.8rem;
}

.aftersales-toc-item > a:hover,
.aftersales-toc-item > a:focus {
  background: rgba(0, 176, 240, 0.12);
  color: var(--vw-blue);
}

.aftersales-toc-item.is-active-chapter > a {
  background: rgba(0, 176, 240, 0.16);
  color: var(--vw-blue);
}

.aftersales-content {
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.aftersales-doc h2,
.aftersales-doc h3,
.aftersales-doc h4 {
  color: var(--vw-blue);
  scroll-margin-top: 1rem;
}

.aftersales-doc h2 {
  font-size: 1.25rem;
  margin: 1.4rem 0 0.55rem;
}

.aftersales-doc h3 {
  font-size: 1.05rem;
  margin: 1.1rem 0 0.45rem;
}

.aftersales-doc h4 {
  font-size: 0.98rem;
  margin: 0.9rem 0 0.35rem;
}

.aftersales-doc p {
  margin: 0 0 0.55rem;
  line-height: 1.45;
  max-width: 52rem;
}

.aftersales-table {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.9rem;
  font-size: 0.9rem;
  background: var(--panel);
}

.aftersales-table th,
.aftersales-table td {
  border: 1px solid #e6edf5;
  padding: 0.35rem 0.6rem;
  vertical-align: top;
}

.aftersales-table th {
  font-weight: 600;
  color: var(--vw-blue);
  background: rgba(0, 30, 80, 0.04);
}

.aftersales-doc .alert {
  max-width: 52rem;
  margin: 0.65rem 0 0.9rem;
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.aftersales-doc .alert .bi {
  margin-top: 0.15rem;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.aftersales-figure {
  margin: 0.75rem 0 1rem;
  max-width: min(100%, 36rem);
}

.aftersales-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.35rem;
  border: 1px solid var(--line);
  background: #fff;
}

.aftersales-page + .aftersales-page {
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .aftersales-doc-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .aftersales-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .aftersales-toc {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: calc(var(--topbar-h) + var(--tabs-h));
    max-height: min(40vh, 18rem);
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 30, 80, 0.08);
  }

  .aftersales-content {
    overflow: visible;
  }
}

.app-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100vh - var(--topbar-h) - var(--tabs-h) - var(--footer-h));
}

.app-footer {
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.35rem 1rem;
  background: linear-gradient(90deg, var(--vw-blue) 0%, var(--vw-blue-mid) 70%, #0d4a8c 100%);
  color: #fff;
  box-shadow: 0 -2px 12px rgba(0, 30, 80, 0.2);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
}

.footer-max-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  line-height: 1.2;
  text-decoration: none;
  color: #fff;
  border-radius: 0.35rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.footer-max-link:hover,
.footer-max-link:focus-visible {
  transform: translateY(-1px);
  opacity: 0.92;
  outline: none;
  color: #fff;
}

.footer-max-link:focus-visible {
  box-shadow: 0 0 0 2px var(--vw-sky);
}

.footer-max-icon {
  display: block;
  height: 1.85rem;
  width: auto;
  max-width: 7.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-max-label {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  min-height: 0;
}

.sidebar-scroll {
  height: 100%;
  overflow: auto;
}

.menu-item-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  background: transparent;
}

.menu-item-btn.active {
  background: #e8f4fb;
  color: var(--vw-blue);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--vw-sky);
}

.menu-thumb {
  width: 2.4rem;
  height: 1.6rem;
  object-fit: cover;
  border-radius: 0.2rem;
  background: #dde5ee;
  flex-shrink: 0;
}

.menu-item-label {
  flex: 1;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.25;
}

.menu-item-count {
  font-size: 0.72rem;
  color: var(--muted);
  background: #eef2f6;
  border-radius: 0.75rem;
  padding: 0.1rem 0.45rem;
}

.app-content {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.content-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  font-size: 0.85rem;
  --bs-breadcrumb-divider-color: var(--muted);
}

.content-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
}

.article-nav {
  overflow: auto;
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid var(--line);
  padding: 0.5rem 0;
}

.article-nav-empty {
  padding: 1rem;
  font-size: 0.88rem;
}

.group-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.65rem 0.9rem 0.25rem;
}

.article-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text);
  border-left: 3px solid transparent;
}

.article-link:hover {
  background: #f0f5fa;
}

.article-link.active {
  background: #e8f4fb;
  border-left-color: var(--vw-sky);
  color: var(--vw-blue);
  font-weight: 600;
}

.article-panel {
  overflow: auto;
  padding: 1.25rem 1.5rem 2.5rem;
  font-family: var(--font-body);
}

.article-welcome {
  max-width: 640px;
  margin: 2rem auto;
  text-align: center;
}

.welcome-car {
  max-width: min(480px, 100%);
  height: auto;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 12px 24px rgba(0, 30, 80, 0.18));
}

.welcome-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--vw-blue);
  margin-bottom: 0.35rem;
}

.welcome-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.article-loading {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.article-body {
  max-width: 920px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 8px 24px rgba(0, 30, 80, 0.06);
}

.article-body img {
  max-width: 100%;
  height: auto;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  word-break: break-word;
}

.article-body .header,
.article-body .right-btn {
  display: none !important;
}

@media (max-width: 991.98px) {
  :root {
    --topbar-h: 112px;
  }

  .app-shell {
    padding-bottom: var(--footer-h);
  }

  .app-topbar {
    height: auto;
    min-height: var(--topbar-h);
    padding: 0.55rem 0.75rem;
    gap: 0.45rem;
  }

  /* Мобилка: строка 1 — бренд | донат | мета; строка 2 — поиск */
  .topbar-row-main {
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .brand-block {
    order: 1;
  }

  .top-donate {
    flex: 1 1 0;
    order: 2;
    margin-left: 0;
  }

  .top-meta {
    gap: 0;
    order: 3;
    margin-left: 0;
  }

  .top-search {
    order: 4;
    flex: 1 0 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .brand-mark {
    width: 1.55rem;
    height: 1.55rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-sub {
    font-size: 0.68rem;
    max-width: 7.5rem;
  }

  .donate-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
  }

  .lang-btn {
    font-size: 0.72rem;
    padding: 0.15rem 0.4rem;
  }

  .app-main {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - var(--topbar-h) - var(--tabs-h) - var(--footer-h));
  }

  .app-sidebar {
    display: none;
    position: fixed;
    inset: calc(var(--topbar-h) + var(--tabs-h)) auto var(--footer-h) 0;
    width: min(86vw, 320px);
    z-index: 25;
    box-shadow: 8px 0 24px rgba(0, 30, 80, 0.2);
  }

  .app-sidebar.is-open {
    display: block;
  }

  .content-split {
    grid-template-columns: 1fr;
  }

  .article-nav {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-tabs .nav-link {
    font-size: 10px;
    padding: 0.85rem 0.55rem;
  }

  .section-tabs .share-nav-text {
    display: none;
  }

  .section-tabs .share-nav-icon {
    display: inline-flex;
  }

  .section-tabs .share-nav-link {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .trim-table .trim-label-col {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    font-size: 10px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.25;
  }
}

@media (max-width: 575.98px) {
  .brand-sub {
    display: none;
  }

  .brand-block {
    gap: 0.4rem;
  }

  .donate-btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
  }

  .donate-btn-label {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-max-label {
    font-size: 0.75rem;
    white-space: normal;
    max-width: 11rem;
  }
}

/* --- Обсуждения --- */

.extras-dropdown-divider {
  margin: 0.35rem 0;
}

.extras-dropdown-nested {
  padding-left: 1.35rem !important;
}

.info-discussions-teaser {
  margin: 0 0 1.25rem;
  max-width: 40rem;
}

.info-discussions-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(0, 30, 80, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.info-discussions-card:hover,
.info-discussions-card:focus {
  border-color: rgba(0, 176, 240, 0.55);
  box-shadow: 0 8px 22px rgba(0, 30, 80, 0.1);
  color: inherit;
}

.info-discussions-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--vw-blue);
}

.info-discussions-card-text {
  font-size: 0.92rem;
  color: var(--muted);
}

.discussions-breadcrumbs {
  margin: 0 0 0.85rem;
}

.discussions-breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.discussions-breadcrumbs-list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.4rem;
  color: var(--muted);
}

.discussions-breadcrumbs-list a {
  color: var(--vw-blue);
  text-decoration: none;
  font-weight: 600;
}

.discussions-breadcrumbs-list a:hover,
.discussions-breadcrumbs-list a:focus {
  text-decoration: underline;
}

.discussions-search {
  margin-bottom: 1.75rem;
}

.discussions-grid {
  margin: 0;
}

/* Bootstrap Card: одинаковая высота в ряду, полный текст без обрезки */
.discussions-topic-card {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: 0 6px 18px rgba(0, 30, 80, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.discussions-topic-card:hover {
  border-color: rgba(0, 176, 240, 0.55);
  box-shadow: 0 8px 22px rgba(0, 30, 80, 0.1);
}

.discussions-topic-card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--vw-blue);
}

.discussions-topic-card .card-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.discussions-topic-card .card-link {
  margin-left: 0;
  text-decoration: none;
}

.discussions-topic-card .card-link.badge {
  --bs-badge-padding-x: 0.65em;
  --bs-badge-padding-y: 0.4em;
  font-weight: 600;
}

.discussions-topic-card .card-link:hover,
.discussions-topic-card .card-link:focus {
  text-decoration: underline;
}

.discussions-results-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.discussions-result-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
}

.discussions-result-title {
  font-weight: 700;
  color: var(--vw-blue);
}

.discussions-result-crumb {
  font-size: 0.84rem;
  color: var(--muted);
}

.discussions-result-snippet {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.35;
}

.discussions-result-snippet mark {
  padding: 0 0.1em;
  background: rgba(0, 176, 240, 0.28);
  color: inherit;
}

.discussions-shell {
  height: 100vh;
  height: 100dvh;
  padding-bottom: 0;
  overflow: hidden;
}

.discussions-shell .section-tabs {
  flex-shrink: 0;
}

.discussions-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) 1fr;
  overflow: hidden;
}

.discussions-nav {
  border-right: 1px solid var(--line);
  background: #f7fafc;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.discussions-nav-head {
  padding: 0.85rem 1rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.discussions-back {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--vw-blue);
  text-decoration: none;
}

.discussions-nav-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Select только на узких экранах; список — основной UI на десктопе. */
.discussions-nav-mobile {
  display: none;
  padding: 0.65rem 0.85rem 0.35rem;
}

.discussions-nav-select {
  font-size: 0.92rem;
  font-weight: 600;
}

.discussions-nav-collapse {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
}

.discussions-nav-summary {
  display: none;
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--vw-blue);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.discussions-nav-summary::-webkit-details-marker {
  display: none;
}

.discussions-nav-summary-hide {
  display: none;
}

.discussions-nav-collapse[open] > .discussions-nav-summary .discussions-nav-summary-show {
  display: none;
}

.discussions-nav-collapse[open] > .discussions-nav-summary .discussions-nav-summary-hide {
  display: inline;
}

.discussions-nav-list-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.5rem 0.65rem 1rem;
}

.discussions-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.discussions-nav-link {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 0.35rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.discussions-nav-link:hover,
.discussions-nav-link:focus {
  background: rgba(0, 176, 240, 0.12);
  color: var(--vw-blue);
}

.discussions-nav-link.is-active {
  background: rgba(0, 30, 80, 0.08);
  color: var(--vw-blue);
}

.discussions-content {
  overflow: auto;
  min-height: 0;
}

.discussions-vehicle-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--vw-blue);
}

.discussions-date {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.discussions-section-index {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.discussions-section-index a {
  font-weight: 700;
  color: var(--vw-blue);
  text-decoration: none;
}

.discussions-section-index a:hover,
.discussions-section-index a:focus {
  text-decoration: underline;
}

.discussions-section-summary {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.discussions-subtitle {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.discussions-subtopic-toc {
  margin: 0 0 1.25rem;
  max-width: 52rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #f7fafc;
}

.discussions-subtopic-toc-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.discussions-subtopic-toc-list a {
  font-weight: 600;
  color: var(--vw-blue);
  text-decoration: none;
}

.discussions-subtopic-toc-list a:hover,
.discussions-subtopic-toc-list a:focus {
  text-decoration: underline;
}

.discussions-anchor-link {
  margin-left: 0.35rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.discussions-level-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.discussions-level-nav a {
  font-weight: 600;
  color: var(--vw-blue);
  text-decoration: none;
}

.discussions-level-nav a:hover,
.discussions-level-nav a:focus {
  text-decoration: underline;
}

.discussions-body {
  width: 100%;
  max-width: none;
}

.discussions-body img,
.discussions-body .kb-photo img {
  max-width: 100%;
  height: auto;
}

.discussions-photo-grid {
  margin: 1rem 0 1.25rem;
}

/* Одинаковая высота карточек в ряду; превью — квадрат с object-fit: cover. */
.discussions-photo-grid > .col {
  display: flex;
}

.discussions-photo-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
}

.discussions-photo-trigger {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
  overflow: hidden;
  flex: 0 0 auto;
}

.discussions-photo-trigger:focus-visible {
  outline: 2px solid var(--vw-blue);
  outline-offset: 2px;
}

.discussions-body img.discussions-photo-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  vertical-align: middle;
}

.discussions-photo-caption {
  flex: 1 1 auto;
  min-height: calc(1.3em * 2);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discussions-body figure:not(.discussions-photo-item),
.discussions-body .kb-photo {
  margin: 1rem 0;
}

.discussions-body figcaption:not(.discussions-photo-caption) {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.discussions-photo-modal-dialog {
  width: 100%;
  max-width: 100%;
  margin: 0.5rem;
}

/* Выше sticky topbar/tabs (z-index ~10000), иначе крестик не кликается. */
#discussions-photo-modal {
  --bs-modal-zindex: 10050;
  z-index: 10050;
}

body:has(#discussions-photo-modal.show) .modal-backdrop {
  z-index: 10040;
}

.discussions-photo-modal-content {
  border: 1px solid var(--line);
  background: #fff;
}

.discussions-photo-modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 36rem);
  background: #f7f8fa;
}

.discussions-photo-modal-img {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
}

@media (min-width: 576px) {
  .discussions-photo-modal-dialog {
    margin: 0.75rem auto;
    max-width: calc(100vw - 1.5rem);
  }
}

.discussions-body .kb-topic {
  margin: 0 0 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.discussions-body .kb-topic:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.discussions-body .kb-topic > h2 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vw-blue);
  scroll-margin-top: 1rem;
}

.discussions-body .kb-meta {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.discussions-body .kb-links {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.discussions-body .kb-links a {
  color: var(--vw-blue);
}

.discussions-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
  max-width: 52rem;
}

.discussions-prevnext a {
  font-weight: 700;
  color: var(--vw-blue);
  text-decoration: none;
}

.discussions-prevnext a:hover,
.discussions-prevnext a:focus {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .discussions-shell {
    height: auto;
    overflow: visible;
  }

  .discussions-layout {
    display: block;
    overflow: visible;
  }

  .discussions-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
    position: sticky;
    top: calc(var(--topbar-h) + var(--tabs-h));
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 30, 80, 0.08);
  }

  /* ← Назад + Разделы + select — одна строка на мобиле. */
  .discussions-nav-head {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
    padding: 0.55rem 0.75rem;
  }

  .discussions-back {
    margin-bottom: 0;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .discussions-nav-title {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.92rem;
  }

  .discussions-nav-mobile {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    padding: 0;
  }

  .discussions-nav-select {
    width: 100%;
    min-width: 0;
    font-size: 0.86rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .discussions-nav-summary {
    display: block;
  }

  .discussions-nav-collapse {
    flex: none;
  }

  .discussions-nav-collapse:not([open]) .discussions-nav-list-wrap {
    display: none;
  }

  .discussions-nav-list-wrap {
    max-height: min(40vh, 16rem);
    overflow: auto;
  }
}

/* Форма «Поделиться» */
.share-page {
  max-width: 40rem;
}

.share-form .smart-captcha {
  max-width: 100%;
}
