/* German only (the .de build): long compound words. Linked into every page of site/dist/de by
   site/scripts/i18n_postbuild.py (never part of the .bg or .com build), and scoped by the html lang attribute anyway.
   The translations mark where a long compound may break with a soft hyphen (U+00AD, e.g. "Suchmaschinen­optimierung";
   docs/briefs/TRANSLATION-GUIDE.md); the browser hyphenates only there (hyphens: manual) and, as a last resort, breaks
   a word that still does not fit (overflow-wrap: anywhere) instead of pushing it out of its card or the page wider
   than the screen. "anywhere" (not "break-word") also lets a grid or flex column that holds the word become narrower
   than the word, which is what keeps it inside its card; text that fits is laid out exactly as before.
   Checked with a worst-case pseudo translation of every page (long compounds without soft hyphens) at 320-1920 px:
   docs/briefs/OVERNIGHT-LOG.md, 2026-11-18. */
html[lang="de-DE"] body { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: anywhere; }
html[lang="de-DE"] :is(h1, h2, h3, h4, h5, h6, .btn, .btn__l, .crumbs, .hrow__t, .sub__l, .mnav__row, .mnav__top, .foot__h, .foot__list, .foot__legal,
  p, li, a, td, th, blockquote, label, figcaption, dt, dd) {
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: anywhere;
}
/* the narrowest phones (up to 400 px): the page title one step smaller, so the first part of a long compound
   ("Suchmaschinen-") fits on its line and the word breaks at its soft hyphen, not mid-word */
@media (max-width: 400px) {
  html[lang="de-DE"] :is(.sv-h1, .h-hero) { font-size: clamp(1.85rem, 9.4vw, 2.3rem); }
}

/* the stacked service cards (.pk: Home section 7 "Services", the same cards wherever they are used). Measured before
   this rule (Home, 1280-1680 px wide): "SEO – Suchmaschinen-" ran 30-38 px past the right edge of the dark card and
   was clipped there, with the paragraph under it. Cause: the title is sized in vw (3.6vw, up to 3.6rem) while its
   column is less than half of a card that shares the screen with the 3D column, so the first part of the compound
   alone ("Suchmaschinen-", 7.6 em) was wider than the column; the column's inner grid then took that width as its
   minimum (min-content) and pushed the title and the paragraph out of the card. Fix: the inner column may shrink
   (minmax(0, 1fr)), the title follows the card's own width (container units of .pks) when the card has two columns,
   and a word that still does not fit breaks instead of leaving the card. */
html[lang="de-DE"] .pk__main { min-width: 0; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 761px) {
  html[lang="de-DE"] .pk__name { font-size: min(clamp(2rem, 3.6vw, 3.6rem), 4.4cqi); }
}

/* the header menu: German labels are longer than the Bulgarian ones the header was drawn for. Measured with the real
   labels: from 1101 to about 1180 px a label wrapped to two lines and the logo was squeezed; with longer (plausible)
   labels the bar became wider than the screen up to 1280 px. So for German: the compact menu (the round menu button,
   as on tablets) up to 1240 px; from 1241 to 1500 px a slightly smaller, tighter menu; the logo and the tools keep
   their size; if a menu still cannot fit (labels far longer than today's), its labels wrap inside the bar instead of
   pushing the page wider than the screen. */
@media (max-width: 1240px) {
  html[lang="de-DE"] :is(.hdr__nav-wrap, .hdr__cta) { display: none; }
  html[lang="de-DE"] .mnav { display: block; }
  html[lang="de-DE"] .hdr__tools { margin-left: auto; }
}
@media (min-width: 1241px) and (max-width: 1500px) {
  html[lang="de-DE"] .hdr__nav { gap: clamp(12px, 1.35vw, 22px); font-size: .9375rem; }
}
html[lang="de-DE"] :is(.hdr__logo, .hdr__tools) { flex: none; }
html[lang="de-DE"] .hdr__nav-wrap { min-width: 0; }
html[lang="de-DE"] .hdr__nav > li { min-width: 0; }

/* pills and badges that keep their label on one line (white-space: nowrap) where the Bulgarian label is short: in
   German they may wrap, and a grid column never grows wider than the screen because of them (stress test, 320-390 px:
   the Shopify partner badge of the service heroes widened the hero column, so the H1, the lead and the button ran
   off the screen; the founder's links on Home ran off the screen) */
html[lang="de-DE"] .sv-hero__in > * { min-width: 0; }
html[lang="de-DE"] .home .founder__links a { white-space: normal; max-width: 100%; }
