/* Индекс цен. Independent design for the catalogue, DNS Lab and the account. */
html:root[data-edition="b"] {
  --index-cobalt: #2347d9;
  --index-rail: #141d32;
  --index-rail-ink: #f5f7ff;
  --index-rail-muted: #b9c3dd;
  --index-rail-hover: #26334e;
  --index-title: #141d32;
  --index-mast: #e4ebff;
  --index-graph-track: #c5d3ff;
  --index-blue-bar: #2347d9;
  --index-light-bar: #8ca9f7;
  --bg: #f4f6f9;
  --surface: #fff;
  --surface-soft: #eef1f6;
  --surface-hover: #edf1ff;
  --text: #141d32;
  --muted: #536079;
  --secondary: #414e66;
  --subtle: #5b667a;
  --line: #d3d9e5;
  --line-soft: #e6eaf1;
  --line-strong: #9ca8be;
  --accent: #2347d9;
  --accent-hover: #1534a8;
  --accent-soft: #e4ebff;
  --accent-ink: #fff;
  --positive: #116045;
  --positive-bg: #e6f2ec;
  --positive-line: #afcfbc;
  --negative: #97382e;
  --negative-bg: #f7eae7;
  --negative-line: #dcb1aa;
  --shadow: none;
  --scrim: #141d3280;
  --edition-sans: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --edition-serif: var(--edition-sans);
  --edition-mono: var(--edition-sans);
  --edition-pine: var(--index-cobalt);
  --edition-lime: var(--accent-soft);
  --edition-title: var(--index-title);
  --edition-header: var(--surface);
  --edition-nav-active: var(--accent-soft);
  --edition-nav-ink: var(--accent);
  --border: var(--line);
  --accent-dim: var(--accent-soft);
  --on-accent: var(--accent-ink);
  --accent-on: var(--accent-ink);
  --green: var(--positive);
  --green-soft: var(--positive-bg);
  --green-dim: var(--positive-bg);
  --green-line: var(--positive-line);
  --text-muted: var(--muted);
  --display: var(--edition-sans);
  --figures: var(--edition-sans);
  --pine: var(--index-cobalt);
  --lime: var(--accent-soft);
  --radius: 5px;
  font-family: var(--edition-sans);
}
html:root[data-edition="b"][data-theme="dark"] {
  --index-title: #f3f5ff;
  --index-mast: #1e2c4c;
  --index-graph-track: #405276;
  --index-blue-bar: #91acff;
  --index-light-bar: #536fb0;
  --bg: #111824;
  --surface: #1a2333;
  --surface-soft: #212d41;
  --surface-hover: #263650;
  --text: #f1f4fd;
  --muted: #b4bfd4;
  --subtle: #a6b3cc;
  --secondary: #c4cee1;
  --line: #354258;
  --line-soft: #2a364a;
  --line-strong: #566984;
  --accent: #a0b6ff;
  --accent-hover: #c0cfff;
  --accent-soft: #2a3b61;
  --accent-ink: #111b30;
  --positive: #9cdebf;
  --positive-bg: #233b33;
  --positive-line: #3e6254;
  --negative: #ffb7b1;
  --negative-bg: #442d33;
  --negative-line: #765059;
  --scrim: #090d17bf;
}
html[data-edition="b"] {
  & body { font-family: var(--edition-sans); }
  & :is(a,button,input,select,summary,textarea):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
  & :is(.price-now,.price-current,.public-price,.offer-choice-price,.account-metric,.category-count,.result-count,#result-count) {
    font-variant-numeric: tabular-nums;
  }
  & :is(.public-product, .catalog-panel, .account-page, .public-prose, .main-content) :is(h1,h2,h3) {
    font-family: var(--edition-sans);
  }
  & .topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
  & body .edition-cross-link { color: var(--accent); }
  & .site-footer { background: var(--surface); }
  & .dashboard-sidebar, & .sidebar {
    background: var(--index-rail);
    color: var(--index-rail-ink);
    border-inline-end: 0;
    scrollbar-color: #50607d transparent;
  }
  & :is(.dashboard-sidebar,.sidebar) .brand,
  & :is(.dashboard-sidebar,.sidebar) .brand:hover,
  & .sidebar .brand-copy strong span { color: var(--index-rail-ink); }
  & .dashboard-sidebar .brand { border-bottom-color: #394760; }
  & .sidebar .brand-copy small, & .dashboard-sidebar .brand-caption,
  & .dashboard-sidebar .sidebar-label, & .sidebar .nav-section-label,
  & .dashboard-sidebar .sidebar-bottom, & .dashboard-sidebar .sidebar-all,
  & .sidebar .source-card small, & .sidebar .category-nav :is(a,button) {
    color: var(--index-rail-muted);
  }
  & .sidebar .source-card { border-color: #3e4a63; background: #212e47; color: #fff; }
  & .dashboard-sidebar .sidebar-bottom { border-top-color: #3e4a63; }
  & .dashboard-sidebar :is(.sidebar-nav,.sidebar-categories) a,
  & .sidebar .primary-nav .nav-link { border-radius: 4px; color: #e7ecfa; }
  & .dashboard-sidebar :is(.sidebar-nav,.sidebar-categories) a:hover,
  & .sidebar .category-nav :is(button,a):hover, & .sidebar .nav-link:hover {
    background: var(--index-rail-hover);
    color: #fff;
  }
  & .dashboard-sidebar :is(.sidebar-nav,.sidebar-categories) a[aria-current="page"],
  & .sidebar .primary-nav .nav-link.active {
    background: var(--index-cobalt);
    color: #fff;
    box-shadow: none;
  }
  & .dashboard-sidebar .sidebar-categories small, & .sidebar .nav-link b {
    background: #2b3851;
    color: #dee5fa;
    font-family: var(--edition-sans);
    font-weight: 650;
  }
  & .sidebar .primary-nav .nav-link.active b { background: #fff; color: #1d37a6; }
  & .sidebar .category-nav .category-count { color: #c6d4f5; }
  & .sidebar .category-nav .category-link[aria-pressed="true"] {
    background: var(--index-rail-hover);
    color: var(--index-rail-ink);
    box-shadow: inset 3px 0 #aec3ff;
  }
  & .sidebar .source-monogram, & .sidebar .brand-mark {
    background: var(--index-cobalt);
    color: #fff;
    border-radius: 4px;
  }
  & body .sidebar-close { color: #fff; border-color: #65748d; background: var(--index-rail); }
  & :is(.dashboard-sidebar,.sidebar) :focus-visible { outline-color: #bad2ff; }
  & .brand .brand-symbol, & .topbar .mobile-brand::before, & .site-brand-mark {
    border-radius: 5px;
    background: #2347d9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='white' d='M6 18h5v8H6zm8-6h5v14h-5zm8-6h5v20h-5z'/%3E%3C/svg%3E") center / 94% no-repeat;
  }
  & body .topbar .mobile-brand { font-weight: 700; }
  & body .page-heading h1, & .dashboard-legacy .seo-landing h1,
  & body.account-redesign :is(.account-heading,.account-guest) h1 {
    color: var(--index-title);
    font: 700 clamp(31px,3.25vw,51px)/1.06 var(--edition-sans);
    letter-spacing: -.055em;
  }
  & body .public-main h2, & body .quick-view-header h2,
  & body.account-redesign :is(.account-panel,.settings-card,.account-section-heading) h2 {
    font-family: var(--edition-sans);
    font-weight: 650;
    line-height: 1.17;
    letter-spacing: -.035em;
  }
  & :is(.public-main,body.account-redesign) :is(.catalog-panel,.product-section,.product-purchase,.public-prose,.category-chip,.city-directory-card,.stat-card,.settings-card,.account-panel,.guide-cards) {
    border-radius: 5px;
    box-shadow: none;
  }
  & body .public-main .category-shortcuts a,
  & body .public-main .type-shortcuts a { border-radius: 4px; }
  & body .public-main .type-shortcuts a[aria-current="page"] {
    background: var(--index-cobalt);
    color: white;
    border-color: var(--index-cobalt);
  }
  & body :is(.catalog-panel,.account-page) :is(input,select,.reset-button) { border-radius: 4px; }
  & .public-main .catalog-tabs a[aria-current="page"] { border-bottom: 3px solid var(--accent); color: var(--accent); }
  & body .public-main .public-filters { background: var(--surface-soft); border-block-end: 1px solid var(--line); }
  & body .catalog-results-meta { padding-block-start: 10px; }
  & .public-site .settings-primary, & body.account-redesign .settings-primary,
  & body .topbar .account-link, & body.account-redesign .topbar .account-link,
  & .app-shell .button.primary {
    border-color: var(--index-cobalt);
    border-radius: 4px;
    color: #fff;
    background: var(--index-cobalt);
  }
  & .public-site .settings-primary:hover, & body.account-redesign .settings-primary:hover:not(:disabled) {
    color: #fff;
    background: #1734a4;
  }
  & .product-purchase { border-top: 3px solid var(--accent); }
  & .product-purchase .public-price { color: var(--accent); font-weight: 750; }
  & body .data-table .price-now { font-weight: 700; letter-spacing: -.02em; }
  & .data-table th { border-bottom-color: var(--line-strong); background: var(--surface-soft); }
  & .data-table .discount-chip, & .product-card .discount {
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 3px;
    font-family: var(--edition-sans);
    font-weight: 700;
  }
  & .public-site .quick-view-button { border-radius: 5px; }
  & body.account-redesign :is(.account-avatar,.account-guest-mark) { color: var(--accent); background: var(--accent-soft); }
}
html:root[data-edition="b"] .delivery-badge {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--line-strong);
}
/* DNS catalogue. The share of the two known conditions comes from the API. */
html:root[data-edition="b"][data-dns-base] {
  & .heading-actions { grid-column: 1; }
  & .ticket-art { display: none; }
  & .stats-grid {
    background: var(--surface);
    border: 1px solid var(--line);
    border-width: 0 1px 1px;
    border-radius: 0 0 5px 5px;
  }
  & .stat-card strong {
    color: var(--index-title);
    font: 700 clamp(21px,2vw,32px)/1.05 var(--edition-sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.045em;
  }
  & .catalog-title h2, & .account-welcome h2, & .detail-title { font-family: var(--edition-sans); font-weight: 670; }
  & .catalog-title h2 { font-size: clamp(23px,2.1vw,33px); }
  & .catalog-panel, & .panel-card, & .product-card, & .search-box, & .count-pill, & .view-toggle { border-radius: 5px; }
  & .event-tabs button.active, & .view-toggle button.active, & .condition-tabs button.active {
    color: var(--accent);
    background: var(--accent-soft);
  }
  & .product-card .price-current { color: var(--index-title); font-weight: 750; }
  & .catalog-filter-panel { border-color: var(--line); }
  & .stat-top > span:first-child { color: var(--secondary); }
  & .edition-b-mix { display: none; }
  &:is([data-view="catalog"],:not([data-view])) {
    & .page-heading {
      display: grid;
      grid-template-columns: minmax(0,1.18fr) minmax(220px,.82fr);
      gap: 12px clamp(20px,4vw,66px);
      align-content: center;
      align-items: center;
      min-height: 176px;
      border: 1px solid var(--line);
      border-bottom-color: var(--index-graph-track);
      border-radius: 5px 5px 0 0;
      padding: 22px clamp(17px,2.6vw,36px);
      background: var(--index-mast);
      color: var(--index-title);
    }
    & .heading-copy { grid-column: 1; grid-row: 1; max-width: none; }
    & .page-heading .eyebrow { margin-bottom: 7px; color: var(--accent); }
    & .page-heading .eyebrow-line { width: 14px; height: 3px; transform: none; background: var(--accent); }
    & .page-heading h1 {
      color: var(--index-title);
      font: 700 clamp(32px,3.3vw,55px)/1.03 var(--edition-sans);
      letter-spacing: -.055em;
    }
    & .page-heading .region-scope-note { color: var(--secondary); max-width: 60ch; }
    & .heading-actions { grid-row: 2; margin: 0; }
    & .region-pill, & .region-pill select, & .refresh-button {
      color: var(--index-title); border-color: var(--line-strong); background: var(--surface); color-scheme: inherit;
    }
    & .region-pill > svg, & .refresh-button:hover { color: var(--accent); }
    & .edition-b-mix:not([hidden]) {
      display: grid;
      min-width: 0;
      grid-column: 2;
      grid-row: 1 / span 2;
      gap: 13px;
      align-self: center;
      margin: 0;
      padding: 18px 0 18px clamp(16px,2.3vw,34px);
      border-inline-start: 1px solid var(--index-graph-track);
      font-variant-numeric: tabular-nums;
    }
    & .edition-b-mix-title {
      margin: 0;
      color: var(--index-title);
      font-size: 14px; font-weight: 650;
    }
    & .edition-b-mix-bar {
      display: flex; gap: 2px; width: 100%; height: 16px;
      overflow: hidden; border-radius: 2px;
      background: var(--index-graph-track);
    }
    & .edition-b-mix-bar i { min-width: 0; }
    & .edition-b-mix-bar i[data-mix="new"] { width: var(--mix-new,0%); background: var(--index-blue-bar); }
    & .edition-b-mix-bar i[data-mix="used"] { width: var(--mix-used,0%); background: var(--index-light-bar); }
    & .edition-b-mix-legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 16px; }
    & .edition-b-mix-legend > span {
      display: inline-flex; align-items: baseline; gap: 5px;
      color: var(--secondary); font-size: 12px; line-height: 1.4;
    }
    & .edition-b-mix-legend > span::before {
      content: ""; width: 7px; height: 7px; display: inline-block; align-self: center;
      background: var(--index-blue-bar);
    }
    & .edition-b-mix-legend > span:nth-child(2)::before { background: var(--index-light-bar); }
    & .edition-b-mix-legend strong { color: var(--index-title); font-weight: 700; }
  }
}
@media (max-width: 720px) {
  html:root[data-edition="b"][data-dns-base]:is([data-view="catalog"],:not([data-view])) {
    & .page-heading { grid-template-columns: minmax(0,1fr); padding: 15px 16px; gap: 10px; }
    & .page-heading h1 { font-size: clamp(30px,7vw,43px); }
    & .heading-actions { grid-column: 1; grid-row: 2; }
    & .edition-b-mix:not([hidden]) {
      grid-column: 1; grid-row: 3; gap: 6px; padding: 10px 0 0;
      border-inline-start: 0; border-top: 1px solid var(--index-graph-track);
    }
    & .edition-b-mix-bar { height: 8px; }
    & .edition-b-mix-title { font-size: 12px; }
    & .edition-b-mix-legend { gap: 4px 12px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-edition="b"] { scroll-behavior: auto; }
  html[data-edition="b"] .edition-b-mix * { animation: none; transition: none; }
}
