/*
 * Fixes on top of the v3 design (site check 11.11.2026, report ПРОВЕРКА-ДИЗАЙНА-11.11.md).
 * The v3 pages themselves are not changed; these rules correct them on the site.
 */

/* --- Long words in headings (for example «Пылевыбивающая») never push the page wider than the screen --- */
#dc-root h1, #dc-root h2, #dc-root h3, #dc-root .h1 {
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* --- Item 2: product description as one readable column (about 80 characters per line) --- */
#desc > div > div {
  grid-template-columns: minmax(0, 820px) !important;
  justify-content: center;
  row-gap: 44px !important;
}
#desc ul:not(:has(li)) { display: none; }
/* a heading without its own text is the title of the whole section: a bit larger */
#desc > div > div > div:not(:has(li)) > h2 { font-size: 34px !important; line-height: 1.15 !important; }

/* --- Item 6: contrast --- */
/* grey numbers 02–05 in the catalog list and the ring (were #8A96A3, 3:1) */
#dc-root [style*="color: #8A96A3" i] { color: #6B7785 !important; }
/* «The best path» label on the blue card of the ROI article (was #8FB6F0, 2.5:1) */
#dc-root [style*="color: #8FB6F0" i] { color: #DCE9F7 !important; }

/* --- Item 8: «Other models» with one or two machines: normal-width cards, not one card across the page --- */
#dc-root [style*="repeat(auto-fit, minmax(280px, 1fr))"] {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

/* --- Item 9: tap targets --- */
#dc-root .hdr a[aria-label="RWM"] { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 400px) {
  #dc-root .hdr [role="group"] button { min-width: 44px !important; }
}

/* --- Item 10: one set of sizes --- */
/* buttons: main 54px, small 44px */
#dc-root [style*="min-height: 52px; padding: 0 28px"],
#dc-root [style*="min-height: 52px; padding: 0 30px"],
#dc-root [style*="min-height: 54px; padding: 0 30px"],
#dc-root [style*="min-height: 54px; padding: 0 26px"],
#dc-root [style*="min-height: 50px; padding: 0 24px"] { min-height: 54px !important; padding: 0 32px !important; }
#dc-root [style*="min-height: 48px; padding: 0 24px"],
#dc-root [style*="min-height: 48px; padding: 0 22px"],
#dc-root [style*="min-height: 44px; padding: 0 18px"] { min-height: 44px !important; padding: 0 22px !important; }
/* corners: 14 (small thumbnails), 20, 24 (cards), 28 (large blocks), round */
#dc-root [style*="border-radius: 16px"],
#dc-root [style*="border-radius: 18px"],
#dc-root [style*="border-radius: 22px"] { border-radius: 20px !important; }
/* main headings on computers: 52 (articles, About, catalog), 64 (sections and service pages), 72 (models) */
@media (min-width: 601px) {
  #dc-root h1[style*="font-size: 48px"], #dc-root h1[style*="font-size: 56px"] { font-size: 52px !important; }
  #dc-root h1[style*="font-size: 60px"] { font-size: 64px !important; }
}

/* --- Item 12: month numbers under the calculator chart --- */
#dc-root .bar-m { font-size: 13px !important; }

@media (max-width: 600px) {
  /* active number in the catalog list on phones: darker blue (was #3B83BD, 4:1 at 20px) */
  #dc-root .idx-num[style*="#3B83BD" i] { color: #2470AD !important; }
}

@media (max-width: 420px) {
  /* main headings of articles, About and categories were 40–44px: too big for 320–375px phones */
  #dc-root h1.h1 { font-size: 34px !important; line-height: 1.12 !important; }
  /* grids that asked for columns of at least 220–280px: one full-width column on narrow phones */
  #dc-root [style*="minmax(280px"],
  #dc-root [style*="minmax(260px"],
  #dc-root [style*="minmax(220px"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  /* model tiles on category pages had a 280px minimum width */
  #dc-root .tile[style*="min-width: 280px"] { min-width: 0 !important; }
  #desc > div > div > div:not(:has(li)) > h2 { font-size: 28px !important; }
}
