/* Lean Six Sigma (/metodika-lean-six-sigma) – styly jen pro tuto stránku.
   Načítá <PageStyles name="lean-six-sigma" /> v src/components/pages/(publications)/lean6sigma/page.tsx.
   Čisté CSS (mimo Tailwind), všechny třídy s prefixem l6s-. */

.l6s {
  --l6s-brand: #00a94f;
  --l6s-brand-2: #007a3b;
  --l6s-accent: #3ddc84;
  --l6s-dark: #0f2a1d;
  --l6s-ink: #111111;
  --l6s-text: #3d4744;
  --l6s-muted: #5f6865;
  --l6s-line: #e3e8e5;
  --l6s-soft: #f4f8f5;
  --l6s-mint: #eefaf2;
  --l6s-warn: #b45309;
  --l6s-warn-bg: #fff7e8;
  --l6s-red: #d93f3f;
  --l6s-radius: 16px;
  --l6s-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  color: var(--l6s-ink);
  background: #fff;
  /* Pojistka proti vodorovnému posunu celé stránky na mobilu. `clip` (na rozdíl od `hidden`)
     nevytváří scroll kontejner, takže sticky prvky uvnitř dál fungují. */
  overflow-x: clip;
}

.l6s *,
.l6s *::before,
.l6s *::after { box-sizing: border-box; }

/* Responzivita: položky gridů se nesmí roztáhnout podle obsahu (SVG s min-width, široké tabulky).
   Bez min-width: 0 by se sloupec gridu natáhl na šířku obsahu a stránka by na mobilu přetekla. */
.l6s-layout > *,
.l6s-tool > *,
.l6s-split > *,
.l6s-rpn-split > *,
.l6s-methods > *,
.l6s-duo > *,
.l6s-tabs-list > *,
.l6s-dmaic > li > div { min-width: 0; }
.l6s-tool,
.l6s-split,
.l6s-rpn-split,
.l6s-layout { grid-template-columns: minmax(0, 1fr); }

/* Cover, statistiky a rozcestník: užší rámec (jako .dw). */
.l6s-wrap {
  max-width: 1428px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 1024px) { .l6s-wrap { padding: 0 60px; } }
@media (min-width: 1280px) { .l6s-wrap { padding: 0 90px; } }

/* Tělo článku (obsah vlevo + text): přes celou šířku okna, jen boční odsazení. */
.l6s-wide { width: 100%; padding: 0 20px; }
@media (min-width: 1024px) { .l6s-wide { padding: 0 40px; } }
@media (min-width: 1536px) { .l6s-wide { padding: 0 60px; } }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

/* Světlý cover; tmavě zelená je jen panel se schématem (.l6s-hero-visual). */
.l6s-hero {
  position: relative;
  margin: 12px 0 0;
  padding: 32px 0 8px;
  color: var(--l6s-ink);
}
@media (min-width: 1024px) { .l6s-hero { padding: 48px 0 16px; } }

.l6s-hero-grid {
  position: relative;
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 1100px) {
  .l6s-hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; }
}

.l6s-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--l6s-muted);
}
.l6s-crumbs::before {
  content: "";
  width: 24px;
  height: 2px;
  margin-right: 4px;
  border-radius: 2px;
  background: var(--l6s-brand);
}
.l6s-crumbs li { display: flex; align-items: center; gap: 8px; }
.l6s-crumbs a { color: var(--l6s-muted); text-decoration: none; }
.l6s-crumbs a:hover { color: var(--l6s-ink); }
.l6s-crumbs span[aria-hidden="true"] { color: #b6c1bb; }
.l6s-crumbs li:last-child > span { color: var(--l6s-brand-2); }

.l6s-title {
  margin: 0;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--l6s-ink);
}
@media (min-width: 640px) { .l6s-title { font-size: 56px; } }
@media (min-width: 1280px) { .l6s-title { font-size: 64px; } }
.l6s-title em { font-style: normal; color: var(--l6s-brand); }

.l6s-subtitle {
  margin: 14px 0 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--l6s-ink);
}
.l6s-lead {
  max-width: 640px;
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--l6s-text);
}
.l6s-lead strong { color: var(--l6s-ink); font-weight: 600; }

.l6s-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--l6s-line);
  font-size: 14px;
}
.l6s-meta-item { display: flex; align-items: center; gap: 12px; font-style: normal; }
.l6s-meta-item img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.l6s-meta-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--l6s-muted);
}
.l6s-meta a { color: var(--l6s-ink); text-decoration: underline; text-underline-offset: 3px; }
.l6s-meta a:hover { color: var(--l6s-brand); }
.l6s-meta time { color: var(--l6s-ink); }

/* Schéma přímo na bílém pozadí - zelené jsou jen kruhy (barvy v HeroVenn) */
.l6s-hero-visual { width: 100%; max-width: 560px; margin: 0 auto; }

/* Klikací Vennův diagram v coveru (HeroVenn): každá oblast vede na kapitolu */
.l6s-venn a { cursor: pointer; outline: none; }
.l6s-venn-area { transition: fill 0.2s, stroke 0.2s; }
/* kruhy mají přechody (gradient) - hover je proto zesvětlení filtrem, ne změna barvy */
.l6s-venn { filter: drop-shadow(0 18px 28px rgba(15, 42, 29, 0.16)); }
.l6s-venn-area { transition: filter 0.2s; }
.l6s-venn a:hover .l6s-venn-area,
.l6s-venn a:focus-visible .l6s-venn-area { filter: brightness(1.12); }
.l6s-venn-more { opacity: 0.7; transition: opacity 0.2s; }
.l6s-venn a:hover .l6s-venn-more,
.l6s-venn a:focus-visible .l6s-venn-more { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .l6s-venn-area,
  .l6s-venn-more { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Layout článku + obsah                                               */
/* ------------------------------------------------------------------ */

.l6s-layout {
  display: grid;
  gap: 32px;
  margin: 64px 0 72px;
}
@media (min-width: 1280px) {
  .l6s-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 56px; }
}

.l6s-aside { display: none; }
@media (min-width: 1280px) {
  .l6s-aside {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding-right: 6px;
  }
  .l6s-toc-mobile { display: none; }
}

.l6s-toc-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l6s-brand);
}
.l6s-toc ol { margin: 0; padding: 0; list-style: none; }
/* číslování od 00, aby sedělo s eyebrow kapitol (00 · Úvod, 01 · Lean, …) */
.l6s-toc > ol { counter-reset: l6s-toc -1; }
.l6s-toc > ol > li { counter-increment: l6s-toc; margin: 0 0 10px; }
.l6s-toc > ol > li > a {
  display: flex;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--l6s-ink);
  text-decoration: none;
}
.l6s-toc > ol > li > a::before {
  content: counter(l6s-toc, decimal-leading-zero);
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 20px;
  color: var(--l6s-brand);
}
.l6s-toc > ol > li.is-plain > a::before { content: "·"; }
.l6s-toc ol ol {
  margin: 6px 0 0 14px;
  padding-left: 16px;
  border-left: 1px solid var(--l6s-line);
}
.l6s-toc ol ol li { margin: 4px 0; }
.l6s-toc ol ol a {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--l6s-muted);
  text-decoration: none;
}
.l6s-toc a:hover { color: var(--l6s-brand); }

/* Kde právě jsme (TocSpy.tsx): kapitola zelená, aktivní podkapitola zvýrazněná proužkem na svislé lince */
.l6s-toc > ol > li > a { transition: color 0.15s; }
.l6s-toc > ol > li.is-current > a,
.l6s-toc > ol > li > a.is-active { color: var(--l6s-brand-2); }
.l6s-toc ol ol a { position: relative; transition: color 0.15s; }
.l6s-toc ol ol a.is-active { color: var(--l6s-ink); font-weight: 600; }
.l6s-toc ol ol a.is-active::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: var(--l6s-brand);
}
@media (prefers-reduced-motion: reduce) {
  .l6s-toc a { transition: none; }
}

.l6s-toc-mobile {
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  background: var(--l6s-soft);
}
.l6s-toc-mobile > summary {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}
.l6s-toc-mobile > summary::-webkit-details-marker { display: none; }
.l6s-toc-mobile > summary::after { content: "+"; float: right; color: var(--l6s-brand); font-weight: 400; }
.l6s-toc-mobile[open] > summary::after { content: "–"; }
.l6s-toc-mobile .l6s-toc { padding: 0 18px 16px; }

/* Sekce */
/* Obsahový sloupec: jako v původní verzi omezený a vystředěný ve zbylém prostoru; běžný text drží čitelnou délku řádku. */
.l6s-main { min-width: 0; width: 100%; max-width: 1180px; justify-self: center; }
.l6s-prose > p,
.l6s-prose > h3,
.l6s-prose > h4,
.l6s-prose > ul:not([class]),
.l6s-prose > ol:not([class]),
.l6s-prose > .l6s-lead-in { max-width: 780px; }
.l6s-section { scroll-margin-top: 24px; }
.l6s-section + .l6s-section {
  margin-top: 72px;
  padding-top: 64px;
  border-top: 1px solid var(--l6s-line);
}
.l6s-section [id] { scroll-margin-top: 24px; }

.l6s-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l6s-brand);
}
.l6s-eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }

.l6s-h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
@media (min-width: 768px) { .l6s-h2 { font-size: 38px; } }

.l6s-prose { font-size: 16px; line-height: 1.8; color: var(--l6s-text); }
.l6s-prose > * + * { margin-top: 16px; }
.l6s-prose p { margin: 16px 0 0; }
.l6s-prose h3 {
  margin: 48px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--l6s-ink);
}
.l6s-prose h4 {
  margin: 32px 0 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--l6s-ink);
}
.l6s-prose strong { color: var(--l6s-ink); font-weight: 600; }
.l6s-prose a { color: var(--l6s-brand-2); text-decoration: underline; text-underline-offset: 3px; }
.l6s-prose a:hover { color: var(--l6s-brand); }
.l6s-prose ul,
.l6s-prose ol { margin: 14px 0 0; padding-left: 22px; }
.l6s-prose ul { list-style: disc; }
.l6s-prose ol { list-style: decimal; }
.l6s-prose li { margin: 6px 0; padding-left: 4px; }
.l6s-prose li::marker { color: var(--l6s-brand); }
.l6s-prose abbr { text-decoration: none; border-bottom: 1px dotted var(--l6s-muted); cursor: help; }
.l6s-prose .l6s-intro { font-size: 18px; line-height: 1.75; color: var(--l6s-ink); }

/* Seznam s fajfkami */
.l6s-checks {
  display: grid;
  gap: 10px;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 768px) { .l6s-checks--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.l6s-checks li {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--l6s-line);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  line-height: 1.6;
}
.l6s-checks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a94f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--l6s-mint);
}

/* Karty */
.l6s-cards {
  display: grid;
  gap: 14px;
  margin: 22px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 640px) { .l6s-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .l6s-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .l6s-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.l6s-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 22px !important;
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--l6s-shadow);
}
.l6s-card h4,
.l6s-card h5 {
  margin: 14px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--l6s-ink);
}
.l6s-card p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--l6s-muted); }
.l6s-card ul { margin: 10px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.6; color: var(--l6s-muted); }
.l6s-card li { margin: 4px 0; padding: 0; }
.l6s-card-kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--l6s-brand);
}
.l6s-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.l6s-card-letter {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: #d6e6dc;
}
.l6s-card--soft { background: var(--l6s-soft); box-shadow: none; }
.l6s-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 14px; }
.l6s-tools span {
  padding: 2px 10px;
  border: 1px solid #dcebe2;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--l6s-text);
  background: #fff;
}

.l6s-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--l6s-brand);
  background: var(--l6s-mint);
  box-shadow: inset 0 0 0 1px rgba(0, 169, 79, 0.2);
}
.l6s-icon svg { width: 24px; height: 24px; }
.l6s-icon--dark { color: var(--l6s-accent); background: var(--l6s-dark); box-shadow: none; }

/* Zvýrazněné boxy */
.l6s-callout {
  margin: 24px 0 0 !important;
  padding: 18px 20px;
  border-left: 4px solid var(--l6s-brand);
  border-radius: 0 12px 12px 0;
  background: var(--l6s-mint);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--l6s-ink);
}
.l6s-callout p { margin: 0; }
.l6s-callout p + p { margin-top: 8px; }
.l6s-callout--warn { border-left-color: #f59e0b; background: var(--l6s-warn-bg); }
.l6s-callout-title { display: block; margin-bottom: 4px; font-weight: 700; }

/* Rámečky příručky: Pro představu / Příklad / Zapamatujte si */
.l6s-analogy,
.l6s-example,
.l6s-takeaway {
  position: relative;
  margin: 24px 0 0 !important;
  padding: 20px 22px;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.7;
}
.l6s-analogy p,
.l6s-example p { margin: 0; }
.l6s-analogy p + p,
.l6s-example p + p { margin-top: 8px; }
.l6s-box-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.l6s-box-label::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: currentColor center / 12px no-repeat;
  -webkit-mask: var(--l6s-box-icon) center / 14px no-repeat;
  mask: var(--l6s-box-icon) center / 14px no-repeat;
}

/* Úvodní odstavec kapitoly – bez rámečku, jen o kousek větší a tmavší než běžný text; stejná šířka řádku jako odstavce */
.l6s-lead-in {
  max-width: 780px;
  margin: 20px 0 0 !important;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: #1f2a26;
}
.l6s-lead-in p { margin: 0; }
.l6s-lead-in p + p { margin-top: 10px; }
.l6s-lead-in strong { font-weight: 600; }

/* Legenda stavby kapitol (úvod) */
.l6s-legend {
  display: grid;
  gap: 12px;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 768px) { .l6s-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .l6s-legend { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.l6s-legend li {
  margin: 0 !important;
  padding: 16px 18px !important;
  border: 1px solid var(--l6s-line);
  border-radius: 12px;
  background: #fff;
}
/* Každá karta legendy je zmenšenina skutečného rámečku z kapitol */
.l6s-legend strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.l6s-legend span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.55; }
.l6s-legend--lead strong { font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--l6s-ink); }
.l6s-legend--lead span { color: var(--l6s-text); }
.l6s-legend li.l6s-legend--analogy { border-color: transparent; background: #fff8e6; }
.l6s-legend--analogy strong { color: #a16207; }
.l6s-legend--analogy span { color: #3f3a2c; }
.l6s-legend li.l6s-legend--example { border: 1px dashed #b9d9c6; }
.l6s-legend--example strong { color: var(--l6s-brand); }
.l6s-legend--example span { color: var(--l6s-text); }
.l6s-legend li.l6s-legend--takeaway { border-color: transparent; background: var(--l6s-dark); }
.l6s-legend li.l6s-legend--takeaway strong { color: var(--l6s-accent); }
/* Na tmavém pozadí plná světlá barva (ne průhledná bílá) – dobrý kontrast i při jiném podkladu */
.l6s-legend li.l6s-legend--takeaway span { color: #e8f3ed; }

/* Slovo úvodem – „dopis“ autora */
.l6s-foreword {
  position: relative;
  margin: 28px 0 0 !important;
  /* mobil: ikona citace má vlastní místo nad textem (horní odsazení), nepřekrývá ho */
  padding: 70px 24px 28px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(61, 220, 132, 0.18), transparent 45%),
    linear-gradient(160deg, #eefaf2 0%, #f7fbf8 60%, #ffffff 100%);
  border: 1px solid #dcefe5;
  overflow: hidden;
}
.l6s-foreword-quote {
  position: absolute;
  left: 20px;
  top: 22px;
  width: 36px;
  height: 36px;
  color: rgba(0, 169, 79, 0.35);
  pointer-events: none;
}
/* od 768 px: ikona v levém okraji vedle prvního řádku, text nad ní neleží */
@media (min-width: 768px) {
  .l6s-foreword { padding: 44px 56px 36px 72px; }
  .l6s-foreword-quote { left: 24px; top: 44px; }
}
.l6s-foreword p {
  position: relative;
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--l6s-text);
}
.l6s-foreword .l6s-foreword-lead {
  margin-top: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--l6s-ink);
}

/* Dvě metody vedle sebe */
.l6s-methods { display: grid; gap: 16px; margin: 22px 0 0 !important; }
@media (min-width: 900px) { .l6s-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
.l6s-method {
  display: flex;
  flex-direction: column;
  padding: 24px 26px;
  border-radius: 16px;
  border: 1px solid var(--l6s-line);
  background: #fff;
  box-shadow: var(--l6s-shadow);
  border-top: 4px solid var(--l6s-dark);
}
.l6s-method--sigma { border-top-color: var(--l6s-brand); }
.l6s-method-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l6s-dark);
}
.l6s-method--sigma .l6s-method-tag { color: var(--l6s-brand-2); }
.l6s-method p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.75; color: var(--l6s-text); }
.l6s-method p.l6s-method-gain {
  margin-top: auto;
  padding-top: 16px;
  font-size: 14px;
  color: var(--l6s-muted);
}
.l6s-method-gain strong {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--l6s-dark);
}
.l6s-method--sigma .l6s-method-gain strong { background: var(--l6s-brand); }
.l6s-method a.l6s-method-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--l6s-brand-2);
  text-decoration: none;
  transition: gap 0.15s;
}
.l6s-method a.l6s-method-link:hover { gap: 12px; color: var(--l6s-brand); }
.l6s-prose > p.l6s-methods-sum {
  max-width: none;
  margin: 18px 0 0;
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(15, 42, 29, 0.06), rgba(0, 169, 79, 0.1));
  font-size: 16px;
  line-height: 1.7;
  color: var(--l6s-ink);
  text-align: center;
}

/* Stručná historie – časová osa (od 1100 px vodorovně) */
.l6s-timeline {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 28px 0 0 !important;
  padding: 0 0 0 26px !important;
  list-style: none !important;
}
.l6s-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--l6s-dark), var(--l6s-brand), var(--l6s-accent));
}
.l6s-timeline li { position: relative; margin: 0 !important; padding: 0 !important; }
.l6s-timeline li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 3px solid #fff;
  background: var(--l6s-dark);
  box-shadow: 0 0 0 1px var(--l6s-line);
}
.l6s-timeline li.is-sigma::before { background: var(--l6s-brand); }
.l6s-timeline li.is-both::before { background: var(--l6s-accent); }
.l6s-tl-year {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--l6s-brand-2);
}
.l6s-timeline strong { display: block; margin-top: 2px; font-size: 15px; color: var(--l6s-ink); }
.l6s-timeline span:not(.l6s-tl-year) { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.55; color: var(--l6s-muted); }
@media (min-width: 1100px) {
  .l6s-timeline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; padding: 26px 0 0 !important; }
  .l6s-timeline::before { left: 0; right: 0; top: 7px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--l6s-dark), var(--l6s-brand), var(--l6s-accent)); }
  .l6s-timeline li::before { left: 0; top: -26px; }
}

.l6s-analogy {
  --l6s-box-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3Z'/%3E%3C/svg%3E");
  background: #fff8e6;
  color: #3f3a2c;
}
.l6s-analogy .l6s-box-label { color: #a16207; }

.l6s-example {
  --l6s-box-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7h-9M14 17H5M17 20a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM7 10a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E");
  border: 1px dashed #b9d9c6;
  background: #fff;
  color: var(--l6s-text);
}
.l6s-example .l6s-box-label { color: var(--l6s-brand); }

.l6s-takeaway {
  --l6s-box-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4V3Z'/%3E%3C/svg%3E");
  margin-top: 40px !important;
  padding: 24px 26px;
  background: var(--l6s-dark);
  color: #fff;
}
.l6s-takeaway .l6s-box-label { color: var(--l6s-accent); }
.l6s-takeaway ul {
  display: grid;
  gap: 8px 28px;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 900px) { .l6s-takeaway ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.l6s-takeaway li {
  position: relative;
  margin: 0 !important;
  padding: 0 0 0 26px !important;
  font-size: 15.5px;
  line-height: 1.6;
  color: #e8f3ed;
}
.l6s-takeaway li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f2a1d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 11px no-repeat,
    var(--l6s-accent);
}

/* 5× proč */
.l6s-why { margin: 4px 0 0 !important; padding-left: 22px !important; }
.l6s-why li { margin: 4px 0 !important; }

/* Drobné doplňky */
.l6s-card-ex,
.l6s-step-ex {
  margin-top: 10px !important;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--l6s-soft);
  font-size: 13.5px !important;
  line-height: 1.55;
  color: var(--l6s-text) !important;
}
.l6s-card-ex::before,
.l6s-step-ex::before {
  content: "Příklad: ";
  font-weight: 700;
  color: var(--l6s-brand-2);
}
.l6s-note { font-size: 14px; color: var(--l6s-muted); }

/* DMAIC – svislá osa s písmeny */
.l6s-dmaic {
  position: relative;
  margin: 24px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.l6s-dmaic::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(var(--l6s-dark), var(--l6s-accent));
}
.l6s-dmaic > li {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  margin: 0 0 14px !important;
  padding: 0 !important;
}
.l6s-dmaic > li > div {
  padding: 18px 20px;
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--l6s-shadow);
}
.l6s-dmaic-letter {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: var(--l6s-brand);
  box-shadow: 0 0 0 6px #fff;
}
.l6s-dmaic > li:nth-child(1) .l6s-dmaic-letter { background: var(--l6s-dark); }
.l6s-dmaic > li:nth-child(2) .l6s-dmaic-letter { background: #155c35; }
.l6s-dmaic > li:nth-child(3) .l6s-dmaic-letter { background: var(--l6s-brand-2); }
.l6s-dmaic > li:nth-child(5) .l6s-dmaic-letter { background: var(--l6s-accent); color: var(--l6s-dark); }
.l6s-dmaic h4 { margin: 2px 0 0 !important; font-size: 18px; font-weight: 700; color: var(--l6s-ink); }
.l6s-dmaic h4 span { font-weight: 500; color: var(--l6s-muted); }
.l6s-dmaic p { margin: 6px 0 0 !important; font-size: 15px; line-height: 1.65; }

/* Krok Analyze s vnořeným návodem na hledání příčin (AnalyzeTools v page.tsx) */
.l6s-dmaic > li.is-extended { clear: both; }
.l6s-analyze {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed #cfdcd4;
}
.l6s-dmaic .l6s-analyze-intro { margin: 0 !important; font-size: 15px; color: var(--l6s-text); }
.l6s-tool { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 1100px) {
  .l6s-tool { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
}
.l6s-dmaic h5 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--l6s-ink); }
.l6s-tool .l6s-figure { max-width: none; margin: 0 !important; }
.l6s-tool .l6s-example { margin: 0 !important; }
.l6s-tool .l6s-why { margin-top: 8px !important; font-size: 14.5px; }

/* Rozcestník „problém → nástroj“ */
.l6s-table--finder tbody th { font-weight: 500; }
.l6s-table--finder td { width: 42%; }
.l6s-table--finder a { font-weight: 700; text-decoration: none; }
.l6s-table--finder a:hover { text-decoration: underline; }

/* Slovníček */
.l6s-glossary {
  display: grid;
  gap: 12px;
  margin: 20px 0 0 !important;
}
@media (min-width: 900px) { .l6s-glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.l6s-glossary > div {
  padding: 16px 18px;
  border: 1px solid var(--l6s-line);
  border-radius: 12px;
  background: #fff;
}
.l6s-glossary dt { font-size: 15px; font-weight: 700; color: var(--l6s-ink); }
.l6s-glossary dd { margin: 4px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--l6s-muted); }

/* Ilustrace – zapojené do textu.
   Mobil/tablet: pod nadpisem, max. 560 px, vystředěné (úzký telefon = posun do strany, aby text v SVG zůstal čitelný).
   Od 1100 px: obtékané vpravo (~ 44 % sloupce, max. 500 px), text vysvětlení běží vedle. Figure stojí v DOM před
   odstavci, které vysvětluje. Bloky na celou šířku (karty, tabulky, …) obtékání ukončí (clear níže). */
.l6s-figure {
  max-width: 560px;
  margin: 20px auto 0 !important;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: var(--l6s-soft);
}
.l6s-figure figcaption {
  max-width: 60ch;
  margin: 10px auto 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--l6s-muted);
  text-align: center;
}
.l6s-svg { display: block; width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.l6s-svg text { font-family: inherit; }
.l6s-figure-media { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.l6s-figure-media > .l6s-svg { max-height: 46vh; }
.l6s-figure--m .l6s-svg,
.l6s-figure--l .l6s-svg { min-width: 440px; }
.l6s-figure--s { max-width: 360px; }

@media (min-width: 1100px) {
  /* Poměr text : obrázek ≈ 35 : 65 */
  .l6s-prose > .l6s-figure {
    float: right;
    clear: right;
    width: 63%;
    max-width: 780px;
    margin: 6px 0 16px 32px !important;
  }
  .l6s-prose > .l6s-figure .l6s-svg { max-height: 62vh; }
  .l6s-prose > .l6s-figure--s { width: min(40%, 420px); }
  .l6s-figure--m .l6s-svg,
  .l6s-figure--l .l6s-svg { min-width: 0; }
}

/* Obtékání: sekce floaty obsahuje; rámečky s pozadím se zúží vedle obrázku (flow-root), široké bloky obtékání ukončí. */
.l6s-prose { display: flow-root; }
.l6s-analogy,
.l6s-example,
.l6s-callout { display: flow-root; }
.l6s-steps > li { display: flow-root; }
.l6s-prose > h3,
.l6s-prose > h4,
.l6s-cards,
.l6s-5s,
.l6s-checks,
.l6s-glossary,
.l6s-legend,
.l6s-foreword,
.l6s-methods,
.l6s-timeline,
.l6s-duo,
.l6s-bsc,
.l6s-belts,
.l6s-table-wrap,
.l6s-details,
.l6s-formula,
.l6s-calc,
.l6s-links,
.l6s-split,
.l6s-takeaway { clear: both; }

/* Rozložení obrázek + text (cyklus 5 principů) */
.l6s-split { display: grid; gap: 24px; align-items: start; margin-top: 24px; }
@media (min-width: 1100px) { .l6s-split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; } }
/* Levý sloupec (obrázek + krátký komentář) začíná u prvního kroku a při čtení kroků jede s textem (sticky). */
.l6s-split-side {
  overflow: hidden;
  border-radius: 18px;
  background: var(--l6s-soft);
}
@media (min-width: 1100px) { .l6s-split-side { position: sticky; top: 24px; } }
.l6s-split .l6s-figure { float: none; width: 100%; max-width: none; margin: 0 !important; padding: 24px 24px 8px; background: transparent; }
.l6s-split .l6s-figure .l6s-svg { max-height: none; min-width: 0; max-width: 520px; }
.l6s-split-note {
  margin: 0 !important;
  padding: 16px 24px 22px;
  border-top: 1px solid #e1ebe5;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--l6s-text);
}

/* Kroky (číslované) */
.l6s-steps {
  display: grid;
  gap: 14px;
  margin: 22px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
  counter-reset: l6s-step;
}
@media (min-width: 768px) { .l6s-steps--row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .l6s-steps--row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .l6s-steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* Svislé seznamy kroků s krátkými texty nenatahovat přes celý sloupec. */
.l6s-prose > .l6s-steps:not(.l6s-steps--row) { max-width: 860px; }
.l6s-steps > li {
  counter-increment: l6s-step;
  position: relative;
  margin: 0 !important;
  padding: 18px 18px 18px 64px !important;
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  line-height: 1.65;
}
.l6s-steps > li::before {
  content: counter(l6s-step);
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--l6s-brand);
  box-shadow: 0 0 0 5px rgba(0, 169, 79, 0.12);
}
.l6s-steps--letters > li::before { content: attr(data-letter); }
.l6s-steps--row > li { padding: 62px 18px 18px !important; }
.l6s-steps--row > li::before { left: 18px; }
.l6s-steps strong { display: block; color: var(--l6s-ink); }
/* Přepínač „Co řešíte?“ – DMAIC × DFSS (MethodTabs.tsx) */
.l6s-tabs { margin: 18px 0 0 !important; clear: both; }
.l6s-tabs-list { display: grid; gap: 12px; }
@media (min-width: 768px) { .l6s-tabs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.l6s-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px 18px 54px;
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  background: #fff;
  color: var(--l6s-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.l6s-tab::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 21px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #c7d3cc;
  background: #fff;
}
.l6s-tab:hover { border-color: var(--l6s-brand); }
.l6s-tab:focus-visible { outline: 3px solid rgba(0, 169, 79, 0.4); outline-offset: 2px; }
.l6s-tab[aria-selected="true"] {
  border-color: var(--l6s-dark);
  background: var(--l6s-dark);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 42, 29, 0.18);
}
.l6s-tab[aria-selected="true"]::before {
  border-color: var(--l6s-accent);
  background: radial-gradient(circle, var(--l6s-accent) 0 4px, var(--l6s-dark) 5px);
}
@media (min-width: 768px) {
  .l6s-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: var(--l6s-dark);
    transform: translateX(-50%) rotate(45deg);
  }
}
.l6s-tab-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--l6s-brand-2); }
.l6s-tab[aria-selected="true"] .l6s-tab-kicker { color: var(--l6s-accent); }
.l6s-tab-title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.l6s-tab-text { font-size: 14px; line-height: 1.55; color: var(--l6s-muted); }
.l6s-tab[aria-selected="true"] .l6s-tab-text { color: #cfe3d8; }
.l6s-tabpanel > .l6s-prose > h3:first-child { margin-top: 36px; }
@media (prefers-reduced-motion: reduce) { .l6s-tab { transition: none; } }

/* Mapa toku hodnoty v blocích (VSM): zelené = přidává hodnotu, šedé = čekání/plýtvání */
.l6s-vsm {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 20px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
  clear: both;
}
.l6s-vsm li {
  position: relative;
  flex: 1 1 130px;
  max-width: 200px;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 12px;
  background: #eceeed;
  color: var(--l6s-muted);
}
.l6s-vsm li.is-value { background: var(--l6s-brand); color: #fff; }
.l6s-vsm li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #9aa5a0;
}
.l6s-vsm strong { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: inherit; }
.l6s-vsm li.is-value strong { color: #fff; }
.l6s-vsm span { display: block; margin-top: 6px; font-size: 18px; font-weight: 800; line-height: 1; }
.l6s-vsm li:not(.is-value) span { color: var(--l6s-ink); }
.l6s-prose > p.l6s-vsm-sum { margin-top: 14px; font-size: 15px; }

/* Krátké postupy: bez boxů, čísla spojená svislou linkou (osa) */
.l6s-steps--compact { gap: 0; }
.l6s-steps--compact > li {
  min-height: 34px;
  padding: 5px 0 20px 50px !important;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--l6s-text);
}
.l6s-steps--compact > li:last-child { padding-bottom: 0 !important; }
.l6s-steps--compact > li::before {
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  font-size: 13px;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(0, 169, 79, 0.18);
}
.l6s-steps--compact > li::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(rgba(0, 169, 79, 0.45), rgba(0, 169, 79, 0.15));
}
.l6s-steps--compact > li:last-child::after { display: none; }
.l6s-steps--compact strong { display: inline; }
.l6s-steps p { margin: 4px 0 0; color: var(--l6s-muted); font-size: 14.5px; }

/* 5S – pruhy */
.l6s-5s {
  display: grid;
  gap: 10px;
  margin: 22px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 768px) { .l6s-5s { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.l6s-5s li {
  margin: 0 !important;
  padding: 18px 16px !important;
  border-radius: 14px;
  background: var(--l6s-soft);
  text-align: center;
}
.l6s-5s .l6s-icon { margin: 0 auto; }
.l6s-5s strong { display: block; margin-top: 10px; font-size: 15px; color: var(--l6s-ink); }
.l6s-5s em { display: block; font-style: normal; font-size: 12px; color: var(--l6s-brand-2); }
/* :not(.l6s-icon) – jinak by pravidlo přepsalo i kolečko ikony (display: grid) a ikona by ujela ze středu */
.l6s-5s span:not(.l6s-icon) { display: block; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--l6s-muted); }

/* Belty – pyramida */
.l6s-belts {
  display: grid;
  gap: 8px;
  margin: 24px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.l6s-belts li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 16px;
  margin: 0 !important;
  padding: 16px 18px !important;
  border: 1px solid var(--l6s-line);
  border-radius: 12px;
  background: #fff;
}
@media (min-width: 900px) {
  .l6s-belts li { grid-template-columns: 14px 200px minmax(0, 1fr); align-items: start; }
  .l6s-belts li:nth-child(1) { margin: 0 24% !important; }
  .l6s-belts li:nth-child(2) { margin: 0 20% !important; }
  .l6s-belts li:nth-child(3) { margin: 0 16% !important; }
  .l6s-belts li:nth-child(4) { margin: 0 12% !important; }
  .l6s-belts li:nth-child(5) { margin: 0 8% !important; }
  .l6s-belts li:nth-child(6) { margin: 0 4% !important; }
}
.l6s-belt-swatch {
  grid-row: span 2;
  align-self: stretch;
  width: 14px;
  min-height: 40px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
@media (min-width: 900px) { .l6s-belt-swatch { grid-row: auto; } }
.l6s-belt-name { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--l6s-ink); }
.l6s-belt-name small { display: block; font-size: 12px; font-weight: 500; color: var(--l6s-muted); }
.l6s-belt-text { font-size: 14px; line-height: 1.6; color: var(--l6s-muted); }

/* BSC – 4 perspektivy */
.l6s-bsc {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}
@media (min-width: 768px) { .l6s-bsc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
/* Text je v každé buňce vystředěný; od 768 px má buňka na straně ke kruhu větší odsazení,
   takže se text středí ve volné ploše a kruh ho nepřekryje (třídy --left / --right, ne nth-child – kruh je v DOM mezi buňkami). */
.l6s-bsc-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--l6s-soft);
  text-align: center;
}
.l6s-bsc-cell strong { display: block; font-size: 17px; color: var(--l6s-ink); }
.l6s-bsc-cell em { display: block; margin-top: 4px; font-style: normal; font-size: 14px; color: var(--l6s-brand-2); }
.l6s-bsc-cell span { display: block; margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--l6s-muted); }
@media (min-width: 768px) {
  .l6s-bsc-cell { min-height: 150px; }
  .l6s-bsc-cell--left { padding-right: 92px; }
  .l6s-bsc-cell--right { padding-left: 92px; }
}
.l6s-bsc-center {
  display: grid;
  place-items: center;
  margin: 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 6px solid #fff;
  background: var(--l6s-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  order: -1;
}
@media (min-width: 768px) {
  .l6s-bsc-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 132px;
    height: 132px;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 28px rgba(15, 42, 29, 0.25);
  }
}

/* Vzorec RPN */
.l6s-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin: 24px 0 0 !important;
  padding: 24px;
  border-radius: var(--l6s-radius);
  background: var(--l6s-dark);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.l6s-formula b {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}
.l6s-formula b small { display: block; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, 0.6); }
.l6s-formula .is-result { background: var(--l6s-brand); }
.l6s-formula i { font-style: normal; color: var(--l6s-accent); font-weight: 400; }

/* RPN: vysvětlení + tabulky vlevo, kalkulačka vpravo (od 1100 px, přilepená); na mobilu text → kalkulačka → tabulky */
.l6s-rpn-split {
  display: grid;
  grid-template-areas: "intro" "calc" "tables";
  gap: 0;
  clear: both;
}
.l6s-rpn-intro { grid-area: intro; }
.l6s-rpn-calc { grid-area: calc; }
.l6s-rpn-tables { grid-area: tables; margin-top: 16px; }
.l6s-rpn-intro > p:first-child { margin-top: 0; }
@media (min-width: 1100px) {
  .l6s-rpn-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "intro calc" "tables calc";
    grid-template-rows: auto 1fr;
    column-gap: 32px;
    align-items: start;
    margin-top: 16px;
  }
  .l6s-rpn-calc { position: sticky; top: 24px; }
  .l6s-rpn-calc .l6s-calc { margin-top: 0 !important; }
  /* v polovině šířky jezdce a výsledek pod sebou */
  .l6s-rpn-calc .l6s-calc-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Action Priority: štítky H / M / L, legenda, matice AIAG & VDA, výsledek kalkulačky */
.l6s-ap-badge {
  display: inline-block;
  min-width: 64px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.l6s-ap-badge--H { background: #fdecec; color: #b42323; }
.l6s-ap-badge--M { background: var(--l6s-warn-bg); color: var(--l6s-warn); }
.l6s-ap-badge--L { background: var(--l6s-mint); color: var(--l6s-brand-2); }

.l6s-ap-legend {
  display: grid;
  gap: 8px;
  margin: 16px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.l6s-ap-legend li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px;
  line-height: 1.55;
  color: var(--l6s-text);
}

.l6s-ap-table { font-size: 13.5px; }
.l6s-ap-table td.num,
.l6s-ap-table th.num { text-align: center; }
.l6s-ap-table .l6s-ap-badge { min-width: 56px; }
.l6s-ap-table tbody th[scope="rowgroup"],
.l6s-ap-table tr.l6s-ap-group > th[scope="row"] { vertical-align: middle; text-align: center; font-size: 15px; background: var(--l6s-soft); }
.l6s-ap-table tr.l6s-ap-group > * { border-top: 2px solid #d5e2da; }

.l6s-calc .l6s-ap-result {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
}
.l6s-calc[data-level="high"] .l6s-ap-result { color: #b42323; }
.l6s-calc[data-level="mid"] .l6s-ap-result { color: var(--l6s-warn); }
.l6s-calc[data-level="low"] .l6s-ap-result { color: var(--l6s-brand-2); }
.l6s-ap-scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.l6s-ap-scale span {
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #9aa5a0;
  background: #e9ecea;
}
.l6s-ap-scale span.is-on[data-ap="L"] { background: var(--l6s-brand); color: #fff; }
.l6s-ap-scale span.is-on[data-ap="M"] { background: #f59e0b; color: #fff; }
.l6s-ap-scale span.is-on[data-ap="H"] { background: var(--l6s-red); color: #fff; }
.l6s-calc .l6s-ap-result { margin-top: 0; }
/* Podnadpisy uvnitř rozbalovací sekce „Jak přidělit S, O a D“ */
.l6s-details-h { margin: 22px 0 6px; font-size: 15px; font-weight: 700; color: var(--l6s-ink); }
.l6s-details-body .l6s-details-h + p { margin-top: 0; font-size: 14px; color: var(--l6s-muted); }
.l6s-details-body > .l6s-ap-legend { margin: 0 0 14px !important; }

/* Kalkulačka (ApCalculator.tsx) */
.l6s-calc {
  margin: 24px 0 0 !important;
  padding: 24px;
  border: 1px solid var(--l6s-line);
  border-radius: var(--l6s-radius);
  background: #fff;
  box-shadow: var(--l6s-shadow);
}
.l6s-calc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.l6s-calc-head strong { font-size: 17px; color: var(--l6s-ink); }
.l6s-calc-head span { font-size: 13px; color: var(--l6s-muted); }
.l6s-calc-grid { display: grid; gap: 24px; margin-top: 18px; }
@media (min-width: 900px) { .l6s-calc-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; } }
.l6s-calc-field + .l6s-calc-field { margin-top: 16px; }
.l6s-calc-field label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; color: var(--l6s-ink); }
.l6s-calc-field label output {
  min-width: 34px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--l6s-mint);
  color: var(--l6s-brand-2);
  text-align: center;
}
.l6s-calc-field small { display: block; font-size: 12.5px; color: var(--l6s-muted); }
.l6s-calc-field input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--l6s-brand); cursor: pointer; }
.l6s-calc-result {
  padding: 22px;
  border-radius: 14px;
  text-align: center;
  background: var(--l6s-soft);
}
.l6s-calc-result output { display: block; font-size: 52px; font-weight: 800; line-height: 1; color: var(--l6s-ink); }
.l6s-calc-result .l6s-calc-label { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--l6s-muted); }
.l6s-calc-bar { height: 8px; margin-top: 16px; border-radius: 999px; background: #e3e8e5; overflow: hidden; }
.l6s-calc-bar span { display: block; height: 100%; border-radius: inherit; transition: width 0.2s, background-color 0.2s; }
.l6s-calc-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.l6s-calc[data-level="low"] .l6s-calc-bar span { background: var(--l6s-brand); }
.l6s-calc[data-level="low"] .l6s-calc-badge { background: var(--l6s-mint); color: var(--l6s-brand-2); }
.l6s-calc[data-level="mid"] .l6s-calc-bar span { background: #f59e0b; }
.l6s-calc[data-level="mid"] .l6s-calc-badge { background: var(--l6s-warn-bg); color: var(--l6s-warn); }
.l6s-calc[data-level="high"] .l6s-calc-bar span { background: var(--l6s-red); }
.l6s-calc[data-level="high"] .l6s-calc-badge { background: #fdecec; color: #b42323; }
.l6s-calc-note { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--l6s-muted); }
.l6s-calc-note--warn { color: #b42323; font-weight: 600; }

/* Rozbalovací tabulky */
.l6s-details {
  margin: 14px 0 0 !important;
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  background: #fff;
}
.l6s-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--l6s-ink);
  list-style: none;
}
.l6s-details > summary::-webkit-details-marker { display: none; }
.l6s-details > summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--l6s-brand);
  border-bottom: 2px solid var(--l6s-brand);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.15s;
}
.l6s-details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.l6s-details > summary small { font-weight: 500; color: var(--l6s-muted); }
.l6s-details-body { padding: 0 20px 20px; }
.l6s-details-body > p:first-child { margin-top: 0; }

/* Tabulky */
.l6s-table-wrap {
  margin: 20px 0 0 !important;
  overflow-x: auto;
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}
.l6s-details .l6s-table-wrap { margin-top: 4px !important; }
.l6s-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  color: var(--l6s-text);
}
.l6s-table caption {
  padding: 12px 16px;
  font-size: 13px;
  text-align: left;
  color: var(--l6s-muted);
  caption-side: bottom;
  border-top: 1px solid var(--l6s-line);
}
.l6s-table th,
.l6s-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--l6s-line);
  text-align: left;
  vertical-align: top;
}
.l6s-table thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--l6s-ink);
  background: var(--l6s-soft);
  white-space: nowrap;
}
.l6s-table tbody th { font-weight: 600; color: var(--l6s-ink); }
.l6s-table tbody tr:last-child > * { border-bottom: 0; }
.l6s-table td + td,
.l6s-table th + td,
.l6s-table th + th,
.l6s-table td + th { border-left: 1px solid var(--l6s-line); }
.l6s-table .num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.l6s-table .score {
  font-weight: 700;
  color: var(--l6s-ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.l6s-table .rpn-high { color: #b42323; font-weight: 800; }
.l6s-table .rpn-mid { color: var(--l6s-warn); font-weight: 800; }
.l6s-table .rpn-ok { color: var(--l6s-brand-2); font-weight: 800; }
.l6s-table .is-highlight > * { background: var(--l6s-mint); }
.l6s-table--compare th:first-child { width: 22%; }
.l6s-table--compare td:last-child { background: #f7fbf8; }
.l6s-table--wide { min-width: 760px; }

/* Ukázka vyplněné FMEA tabulky */
.l6s-table--fmea { min-width: 1120px; font-size: 13.5px; }
.l6s-table--fmea thead th { white-space: normal; vertical-align: top; font-size: 11px; line-height: 1.35; }
/* Otázka, na kterou sloupec odpovídá (dřív samostatné kartičky pod tabulkou) */
.l6s-col-q {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  color: var(--l6s-muted);
}
.l6s-table--fmea tbody th { white-space: nowrap; }
.l6s-col-no {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0 0 6px;
  border-radius: 999px;
  font-size: 10.5px;
  color: #fff;
  background: var(--l6s-brand);
}
.l6s-table--fmea thead th.num .l6s-col-no { margin: 0 auto 6px; background: var(--l6s-dark); }

/* Tlačítko ke stažení šablony */
.l6s-prose > p.l6s-download-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  max-width: none;
  margin-top: 16px;
}
.l6s-download-row span { font-size: 13.5px; color: var(--l6s-muted); }
.l6s-prose a.l6s-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--l6s-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0, 169, 79, 0.28);
  transition: background-color 0.15s;
}
.l6s-prose a.l6s-download:hover { background: #00c25a; color: #fff; }
.l6s-download svg { width: 18px; height: 18px; }

/* Dvousloupec (PFMEA / DFMEA) */
.l6s-duo { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 900px) { .l6s-duo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Literatura a citace */
.l6s-refs { margin: 18px 0 0 !important; padding-left: 22px !important; font-size: 14.5px; line-height: 1.7; }
.l6s-refs li { margin: 6px 0 !important; }
.l6s-refs em { font-style: italic; }
.l6s-cite {
  margin: 22px 0 0 !important;
  padding: 18px 20px;
  border: 1px dashed #c9d8cf;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--l6s-text);
  background: #fbfdfc;
}
.l6s-cite strong { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--l6s-brand); }

/* Odkazy na další stránky */
.l6s-links {
  display: grid;
  gap: 12px;
  margin: 24px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 768px) { .l6s-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.l6s-links li { margin: 0 !important; padding: 0 !important; }
.l6s-links a {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--l6s-line);
  border-radius: 14px;
  color: var(--l6s-ink) !important;
  text-decoration: none !important;
  background: #fff;
  transition: border-color 0.15s, transform 0.15s;
}
.l6s-links a:hover { border-color: var(--l6s-brand); transform: translateY(-2px); }
.l6s-links strong { font-size: 15.5px; }
.l6s-links span { font-size: 13.5px; line-height: 1.55; color: var(--l6s-muted); }

@media (prefers-reduced-motion: reduce) {
  .l6s-links a,
  .l6s-eq-link,
  .l6s-calc-bar span { transition: none; }
}

/* CTA na konci: ve sloupci obsahu, stejně široké jako obsah (bez vnitřního odsazení .dw), s mezerou nad sebou */
.l6s-cta { margin-top: 80px; }
.l6s-cta .dw { max-width: none; margin: 0; padding: 0; }

/* ------------------------------------------------------------------ */
/* Mobil: karty jako vodorovný karusel                                 */
/* Místo dlouhého sloupce karet pod sebou se karty posouvají prstem do strany.
   Karusel sahá až k okrajům displeje (záporný okraj = boční odsazení .l6s-wide), karty se zarovnávají
   (scroll-snap) a kraj další karty vykukuje jako nápověda, že je co posouvat. Bez JavaScriptu. */
/* ------------------------------------------------------------------ */

@media (max-width: 639.98px) {
  .l6s-prose :is(.l6s-cards, .l6s-legend, .l6s-links, .l6s-belts, .l6s-glossary) {
    display: flex !important;
    gap: 12px;
    margin: 22px -20px 0 !important;
    padding: 4px 20px 14px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .l6s-prose :is(.l6s-cards, .l6s-legend, .l6s-links, .l6s-belts) > li,
  .l6s-prose .l6s-glossary > div {
    flex: 0 0 min(82%, 320px);
    scroll-snap-align: start;
  }
  /* Pásy: v kartě barevný proužek nahoře místo svislého vlevo */
  .l6s-prose .l6s-belts > li { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; }
  .l6s-prose .l6s-belts .l6s-belt-swatch { grid-row: auto; width: 100%; min-height: 0; height: 10px; }
}

@media (max-width: 767.98px) {
  .l6s-prose :is(.l6s-5s, .l6s-steps--row) {
    display: flex !important;
    gap: 12px;
    margin: 22px -20px 0 !important;
    padding: 4px 20px 14px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .l6s-prose .l6s-5s > li { flex: 0 0 min(62%, 240px); scroll-snap-align: start; }
  .l6s-prose .l6s-steps--row > li { flex: 0 0 min(72%, 280px); scroll-snap-align: start; }

  /* Mapa toku hodnoty: bloky v jedné řadě se šipkami, posun do strany */
  .l6s-prose .l6s-vsm {
    flex-wrap: nowrap;
    margin: 20px -20px 0 !important;
    padding: 4px 20px 14px !important;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
  }
  .l6s-prose .l6s-vsm li { flex: 0 0 140px; max-width: none; scroll-snap-align: start; }
}

.l6s-prose :is(.l6s-cards, .l6s-legend, .l6s-links, .l6s-belts, .l6s-glossary, .l6s-5s, .l6s-steps--row, .l6s-vsm)::-webkit-scrollbar { display: none; }
