/* Blok Branża lub usługa z rysunkiem: tekst po lewej, rysunek albo zdjęcie po prawej. */
.rg-industry__grid {
  display: grid; grid-template-columns: minmax(0, 20fr) minmax(0, 21fr); column-gap: 57.6px; align-items: start;
}
.rg-industry .section-head { margin-bottom: 12.6px; }
.rg-industry .section-head__lead, .rg-industry__p { line-height: 1.6; }
.rg-industry__p { max-width: 38.2em; }
.rg-industry__p + .rg-industry__p { margin-top: 12.6px; }
.rg-industry__actions { margin-top: 25.2px; }
.rg-industry__visual { margin: 0; }
/* Pod ramką rysunku 56 px na przycisk „Powtórz” (jak main .rg-viz na obecnej stronie, także przy rysunkach bez animacji). */
.rg-industry__visual.rg-viz { margin-bottom: 56px; }
/* Automotive (dwa rysunki jeden pod drugim): ramka jak karta modeli dostaw, bez miejsca na „Powtórz”. */
.rg-industry__visual[data-viz-kind="automotive"].rg-viz { margin-bottom: 0; }
.rg-industry__visual.rg-viz { background-image: none; }
.rg-industry--no-captions :is(.e6-cap2, .rg-viz__cap) { display: none; }
@media (min-width: 1025px) {
  .rg-industry--flip .rg-industry__grid { grid-template-columns: minmax(0, 21fr) minmax(0, 20fr); }
  .rg-industry--flip .rg-industry__visual { order: -1; }
}

/* Zdjęcie z rysunkiem w narożniku (np. naczepa z kręgiem stali) */
.rg-industry__photo { position: relative; min-height: 414px; overflow: hidden; border-radius: var(--radius-card); }
.rg-industry__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rg-industry__inset {
  position: absolute; left: 16px; bottom: 16px; width: min(270px, 58%); padding: 12.6px 12.6px 5.4px;
  border: 1px solid var(--color-line-strong); border-radius: 10.8px; background: var(--color-surface-2);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.rg-industry__inset svg { display: block; width: 100%; height: auto; }
.rg-industry__photo:not(.is-in) .rg-industry__inset { opacity: 0; transform: translateY(14px); }
.rg-industry__photo.is-in .rg-trl__cargo { animation: rg-coil-settle .9s cubic-bezier(.34, 1.3, .64, 1) .8s both; }
@keyframes rg-coil-settle { from { opacity: 0; transform: translateY(-32px); } to { opacity: 1; transform: none; } }

@media (max-width: 1024px) {
  .rg-industry__grid { column-gap: var(--space-8); align-items: center; }
  .rg-industry__grid--photo { align-items: stretch; }
  .rg-industry__actions { margin-top: 28px; }
}
@media (max-width: 1000px) {
  .rg-industry__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-6); }
  .rg-industry__photo { min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-industry__inset { transition: none; }
  .rg-industry__photo.is-in .rg-trl__cargo { animation: none; }
}

/* Rysunki: dopasowania pojedynczych rysunków (jak na obecnej stronie). */
.rg-industry__visual[data-viz-kind="automotive"] .rg-viz__stack { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.rg-industry__visual[data-viz-kind="automotive"] .rg-viz__stack .rg-time__viz { grid-area: auto / 1; width: 100%; min-width: 0; margin: 0; }
.rg-industry__visual[data-viz-kind="automotive"] .rg-time__viz .d5 { width: 100%; min-width: 0; }
.rg-industry__visual[data-viz-kind="automotive"] .rg-time__viz .d5-svg { width: 100%; max-width: 100%; }
.rg-industry__visual[data-viz-kind="fmcg"] svg text.e6-tx,
.rg-industry__visual[data-viz-kind="cold"] svg text[y="284"] { display: block; letter-spacing: 0; font-size: calc(14.5px * var(--d5px, 2)); }
@media (min-width: 1025px) {
  .rg-industry__grid:has(> [data-viz-kind="venn"]) { grid-template-columns: minmax(0, 556fr) minmax(0, 753fr); column-gap: 40px; }
}
.rg-industry__visual[data-viz-kind="venn"] .e6v-h { display: grid; gap: 10px; width: 100%; }
.rg-industry__visual[data-viz-kind="venn"] .e6v-h span { max-width: none; line-height: 1.6; }
@media (max-width: 640px) {
  .rg-industry__visual[data-viz-kind="cold"] svg text[y="284"] { display: none; }
}

/* Rysunki: wspólne ramki, opisy, układy i zmienne są w assets/css/diagram.css. Tu tylko rysunki industry. */
.rg-rail-model{display: grid; gap: 24px; padding: 28px 24px; width: 100%; color: var(--ink); font-size: var(--co-body,16px); line-height: 1.45;}
.rg-rail-model__inputs{display: grid; grid-template-columns: 1fr 1fr; gap: 12px;}
.rg-rail-model__inputs span{padding: 16px 20px; border: 1px solid var(--line2); border-radius: 8px; text-align: center;}
.rg-rail-model__check{display: flex; gap: 16px; align-items: center; justify-content: center; padding: 18px; border-block: 1px solid var(--line2);}
.rg-rail-model__check > span{display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand,#cb2127); color: white; font-size: 24px; flex-shrink: 0;}
.rg-rail-model__outputs{display: grid; grid-template-columns: 1fr 1fr; gap: 16px;}
.rg-rail-model__outputs > div{display: flex; align-items: center; gap: 14px; padding: 18px 12px;}
.rg-rail-model__outputs svg{width: 48px; height: 48px; flex-shrink: 0;}
@media (max-width: 900px){.rg-rail-model{padding: 24px 12px;}}
@media (max-width: 900px){.rg-rail-model__outputs{gap: 8px;}}
@media (max-width: 900px){.rg-rail-model__outputs > div{padding: 12px 0px; flex-direction: column; text-align: center;}}
/* Rysunek „contrast” (logistyka kontraktowa): przerywane połączenia usług i większe podpisy, jak na obecnej stronie. */
.rg-industry__visual[data-viz-kind="contrast"] svg text.e6-tx { font-size: calc(14.5px * var(--d5px, 2)); }

/* Przy ograniczonym ruchu rysunek stoi w stanie końcowym, a „Powtórz” zostaje widoczny (jak na obecnej stronie). */
@media (prefers-reduced-motion: reduce) {
  .rg-industry__visual .d5-replay { display: inline-flex; }
}

/* Rysunek „railjourney” (Transport kolejowy, 27.10): droga ładunku z perspektywy klienta. Samochód odbiera kontener
   z zakładu, w terminalu trafia on na pociąg z innymi ładunkami (większy wolumen), po głównym odcinku koleją drugi
   samochód dowozi go do odbiorcy. Cztery kroki pod rysunkiem zapalają się w rytmie przejazdu. Pętla 14 s, animacja
   tylko w widoku (data-diagram-loop + .is-visible); przy ograniczonym ruchu stan końcowy (wszystkie kroki zaliczone). */
.rg-flowviz svg { display: block; width: 100%; height: auto; overflow: visible; color: var(--color-text-muted, rgba(255, 255, 255, .7)); }
.rg-flowviz text { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); font-family: inherit; font-size: 15px; font-weight: 500; stroke: none; letter-spacing: 0; }
.rg-flowviz .rj-road { stroke-dasharray: 6 6; opacity: .55; }
.rg-flowviz .rj-rail { stroke-width: 2; }
.rg-flowviz .rj-rail--ties { stroke-width: 7; stroke-dasharray: 1.5 7; opacity: .35; }
.rg-flowviz .rj-site { color: var(--color-text-soft, rgba(255, 255, 255, .66)); }
.rg-flowviz .rj-crane { opacity: .5; }
.rg-flowviz .rj-box { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); }
.rg-flowviz .rj-box--other { fill: none; stroke: currentColor; stroke-dasharray: 2.5 2.5; opacity: 0; }
.rg-flowviz .rj-truck, .rg-flowviz .rj-train { color: #fff; }
.rg-flowviz .rj-truck--1 { transform: translateX(52px); }
.rg-flowviz .rj-truck--2 { transform: translateX(416px); opacity: 0; }
.rg-flowviz .rj-truck--2 .rj-box { opacity: 0; }
.rg-flowviz .rj-train { transform: translateX(-22px); }
.rg-flowviz .rj-train .rj-box { opacity: 0; }
.rg-flowviz .rj-step circle { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); stroke-width: 1.5; }
.rg-flowviz .rj-step text { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); font-size: 14px; }
.rg-flowviz .rj-steps__line { stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); }

@media (prefers-reduced-motion: no-preference) {
  .rg-flowviz.is-visible .rj-truck--1 { animation: rj-truck1 14s linear infinite; }
  .rg-flowviz.is-visible .rj-truck--1 .rj-box { animation: rj-box1 14s linear infinite; }
  .rg-flowviz.is-visible .rj-train { animation: rj-train 14s linear infinite; }
  .rg-flowviz.is-visible .rj-train .rj-box--train:not(.rj-box--other) { animation: rj-boxtrain 14s linear infinite; }
  .rg-flowviz.is-visible .rj-train .rj-box--other { animation: rj-boxother 14s linear infinite; }
  .rg-flowviz.is-visible .rj-truck--2 { animation: rj-truck2 14s linear infinite; }
  .rg-flowviz.is-visible .rj-truck--2 .rj-box { animation: rj-box2 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--1 circle { animation: rj-step 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--2 circle { animation: rj-step-22 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--3 circle { animation: rj-step-35 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--4 circle { animation: rj-step-72 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--1 text { animation: rj-step-text 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--2 text { animation: rj-step-text-22 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--3 text { animation: rj-step-text-35 14s linear infinite; }
  .rg-flowviz.is-visible .rj-step--4 text { animation: rj-step-text-72 14s linear infinite; }
}
/* 0-22 %: samochód z zakładu do terminala; 22-30 %: kontener na pociąg; 30-66 %: pociąg; 66-72 %: kontener na samochód;
   72-92 %: dowóz do odbiorcy; 92-100 %: pauza i powrót. */
@keyframes rj-truck1 { 0% { transform: translateX(52px); } 22%, 100% { transform: translateX(132px); } }
@keyframes rj-box1 { 0%, 24% { opacity: 1; } 27%, 100% { opacity: 0; } }
@keyframes rj-boxtrain { 0%, 27% { opacity: 0; } 30%, 66% { opacity: 1; } 69%, 100% { opacity: 0; } }
@keyframes rj-boxother { 0%, 29% { opacity: 0; } 33%, 70% { opacity: .9; } 74%, 100% { opacity: 0; } }
@keyframes rj-train { 0%, 30% { transform: translateX(-22px); } 66%, 100% { transform: translateX(222px); } }
@keyframes rj-truck2 { 0%, 64% { opacity: 0; transform: translateX(416px); } 68%, 72% { opacity: 1; transform: translateX(416px); } 92%, 100% { opacity: 1; transform: translateX(500px); } }
@keyframes rj-box2 { 0%, 69% { opacity: 0; } 72%, 100% { opacity: 1; } }
@keyframes rj-step { 0%, 1% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 4%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-text { 0%, 1% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 4%, 92% { fill: #fff; } 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@media (prefers-reduced-motion: reduce) {
  .rg-flowviz .rj-truck--1 { transform: translateX(132px); }
  .rg-flowviz .rj-truck--1 .rj-box { opacity: 0; }
  .rg-flowviz .rj-train { transform: translateX(222px); }
  .rg-flowviz .rj-truck--2 { opacity: 1; transform: translateX(500px); }
  .rg-flowviz .rj-truck--2 .rj-box { opacity: 1; }
  .rg-flowviz .rj-step circle { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); }
  .rg-flowviz .rj-step text { fill: #fff; }
}
.rg-industry__visual[data-viz-kind="railjourney"].rg-viz { margin-bottom: 0; }


/* Rysunki liniowe w standardzie S (_docs/RYSUNKI-STANDARD.md, 27.10): ramka 24 px wcięcia, jedna kreska (~1,4 px),
   napisy 15 jednostek viewBox (ok. 13 px), pasek kroków jak w railjourney. Wspólne klasy fv-* dla scen e-commerce i OZE. */
.rg-flowviz .fv-ground { stroke-width: 2; }
.rg-flowviz .fv-water { opacity: .5; }
.rg-flowviz .fv-site { color: var(--color-text-soft, rgba(255, 255, 255, .66)); }
.rg-flowviz .fv-return { stroke-dasharray: 5 6; opacity: .55; }
.rg-flowviz .fv-return-arrow { opacity: .55; }
.rg-flowviz .fv-check-bg { fill: var(--color-surface-2, #1b1b1e); }
.rg-flowviz .fv-parcel rect, .rg-flowviz .fv-cargo rect { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); }
.rg-flowviz .fv-parcel path, .rg-flowviz .fv-cargo path { stroke: rgba(255, 255, 255, .55); }
.rg-flowviz .fv-panel path:first-child { fill: var(--color-red, #cb2127); fill-opacity: .18; stroke: var(--color-red-bright, #e9333a); }
.rg-flowviz .fv-panel path + path { stroke: var(--color-red-bright, #e9333a); opacity: .6; }

/* E-commerce: paczka magazyn -> Pick & Pack -> VAS -> wysyłka, auto odjeżdża, zwrot wraca przerywaną linią. */
.rg-flowviz--ecom .fv-parcel { transform: translate(68px, 112px); }
.rg-flowviz--ecom .fv-van { transform: translate(500px, 110px); }
@media (prefers-reduced-motion: no-preference) {
  .rg-flowviz--ecom.is-visible .fv-parcel { animation: fv-ecom-parcel 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .fv-van { animation: fv-ecom-van 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .fv-return { animation: fv-ecom-return 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--1 circle { animation: rj-step 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--2 circle { animation: rj-step-20 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--3 circle { animation: rj-step-40 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--4 circle { animation: rj-step-60 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--1 text { animation: rj-step-text 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--2 text { animation: rj-step-text-20 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--3 text { animation: rj-step-text-40 14s linear infinite; }
  .rg-flowviz--ecom.is-visible .rj-step--4 text { animation: rj-step-text-60 14s linear infinite; }
}
@keyframes fv-ecom-parcel {
  0%, 14% { transform: translate(68px, 112px); opacity: 1; }
  20%, 34% { transform: translate(238px, 110px); }
  40%, 54% { transform: translate(378px, 102px); }
  60%, 70% { transform: translate(530px, 126px); opacity: 1; }
  76% { transform: translate(590px, 126px); opacity: 0; }
  100% { transform: translate(590px, 126px); opacity: 0; }
}
@keyframes fv-ecom-van { 0%, 70% { transform: translate(500px, 110px); opacity: 1; } 76% { transform: translate(560px, 110px); opacity: 0; } 86% { transform: translate(500px, 110px); opacity: 0; } 92%, 100% { transform: translate(500px, 110px); opacity: 1; } }
@keyframes fv-ecom-return { 0%, 76% { stroke-dashoffset: 0; opacity: .55; } 78% { opacity: 1; stroke-dashoffset: 0; } 96% { opacity: 1; stroke-dashoffset: -110; } 100% { opacity: .55; stroke-dashoffset: -110; } }
@media (prefers-reduced-motion: reduce) {
  .rg-flowviz--ecom .fv-parcel { transform: translate(530px, 126px); }
  .rg-flowviz--ecom .rj-step circle { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); }
  .rg-flowviz--ecom .rj-step text { fill: #fff; }
}

/* OZE: kontener ze statku na ciężarówkę, ciężarówka do urzędu celnego i na plac, na placu cztery panele po kolei. */
.rg-flowviz--oze .fv-cargo { transform: translate(104px, 96px); }
.rg-flowviz--oze .fv-truck { transform: translate(214px, 112px); }
.rg-flowviz--oze .fv-panel { opacity: .25; }
@media (prefers-reduced-motion: no-preference) {
  .rg-flowviz--oze.is-visible .fv-cargo { animation: fv-oze-cargo 14s linear infinite; }
  .rg-flowviz--oze.is-visible .fv-truck { animation: fv-oze-truck 14s linear infinite; }
  .rg-flowviz--oze.is-visible .fv-panel--1 { animation: fv-oze-panel 14s linear infinite; animation-delay: 0s; }
  .rg-flowviz--oze.is-visible .fv-panel--2 { animation: fv-oze-panel 14s linear infinite; animation-delay: .5s; }
  .rg-flowviz--oze.is-visible .fv-panel--3 { animation: fv-oze-panel 14s linear infinite; animation-delay: 1s; }
  .rg-flowviz--oze.is-visible .fv-panel--4 { animation: fv-oze-panel 14s linear infinite; animation-delay: 1.5s; }
  .rg-flowviz--oze.is-visible .rj-step--1 circle { animation: rj-step 14s linear infinite; }
  .rg-flowviz--oze.is-visible .rj-step--2 circle { animation: rj-step-24 14s linear infinite; }
  .rg-flowviz--oze.is-visible .rj-step--3 circle { animation: rj-step-46 14s linear infinite; }
  .rg-flowviz--oze.is-visible .rj-step--4 circle { animation: rj-step-68 14s linear infinite; }
  .rg-flowviz--oze.is-visible .rj-step--1 text { animation: rj-step-text 14s linear infinite; }
  .rg-flowviz--oze.is-visible .rj-step--2 text { animation: rj-step-text-24 14s linear infinite; }
  .rg-flowviz--oze.is-visible .rj-step--3 text { animation: rj-step-text-46 14s linear infinite; }
  .rg-flowviz--oze.is-visible .rj-step--4 text { animation: rj-step-text-68 14s linear infinite; }
}
/* 0-18 %: kontener na statku; 18-24 %: na ciężarówkę; 24-46 %: jazda do urzędu; 46-60 %: postój (obsługa celna);
   60-70 %: jazda na plac; 70-92 %: rozładunek, panele; 92-100 %: powrót. */
@keyframes fv-oze-cargo {
  0%, 18% { transform: translate(104px, 96px); opacity: 1; }
  24% { transform: translate(228px, 116px); }
  46%, 60% { transform: translate(284px, 116px); }
  70% { transform: translate(394px, 116px); opacity: 1; }
  74%, 100% { transform: translate(394px, 116px); opacity: 0; }
}
@keyframes fv-oze-truck {
  0%, 24% { transform: translate(214px, 112px); }
  46%, 60% { transform: translate(270px, 112px); }
  70%, 92% { transform: translate(380px, 112px); }
  100% { transform: translate(214px, 112px); }
}
@keyframes fv-oze-panel { 0%, 72% { opacity: .25; } 78%, 94% { opacity: 1; } 100% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .rg-flowviz--oze .fv-cargo { opacity: 0; }
  .rg-flowviz--oze .fv-truck { transform: translate(380px, 112px); }
  .rg-flowviz--oze .fv-panel { opacity: 1; }
  .rg-flowviz--oze .rj-step circle { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); }
  .rg-flowviz--oze .rj-step text { fill: #fff; }
}

/* FMCG i cold chain (rysunki e6 w ramce S): kreska i napisy jak w rysunkach flowviz. */
.rg-viz[data-viz-kind="fmcg"] .e6-o, .rg-viz[data-viz-kind="cold"] .e6-o,
.rg-viz[data-viz-kind="fmcg"] .e6-g, .rg-viz[data-viz-kind="cold"] .e6-g { stroke-width: 2.5; }
.rg-viz[data-viz-kind="fmcg"] .e6-o2, .rg-viz[data-viz-kind="cold"] .e6-o2,
.rg-viz[data-viz-kind="fmcg"] .e6-w, .rg-viz[data-viz-kind="cold"] .e6-w { stroke-width: 2.2; }
.rg-viz[data-viz-kind="fmcg"] .e6-l, .rg-viz[data-viz-kind="cold"] .e6-l,
.rg-viz[data-viz-kind="fmcg"] .e6-dim, .rg-viz[data-viz-kind="cold"] .e6-dim { stroke-width: 1.6; }
.rg-viz[data-viz-kind="fmcg"] .e6-tx, .rg-viz[data-viz-kind="cold"] .e6-tx,
.rg-viz[data-viz-kind="fmcg"] .e6-tx--s, .rg-viz[data-viz-kind="cold"] .e6-tx--s { font-size: 23px; font-weight: 500; fill: #fff; fill-opacity: 1; }

/* Standard S: bez przycisku „Powtórz” pod rysunkami liniowymi (animacja rusza w widoku). */
.rg-viz[data-viz-kind="fmcg"] .d5-replay, .rg-viz[data-viz-kind="cold"] .d5-replay { display: none; }

/* Kroki pod rysunkami w pętli (QA 27.10): każdy krok ma własne keyframes w procentach jednego cyklu 14 s;
   świeci od chwili dojścia ładunku do 92%, wszystkie gasną razem przy powrocie (96-100%). */
@keyframes rj-step-20 { 0%, 20% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 23%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-22 { 0%, 22% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 25%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-24 { 0%, 24% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 27%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-35 { 0%, 35% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 38%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-40 { 0%, 40% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 43%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-46 { 0%, 46% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 49%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-60 { 0%, 60% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 63%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-68 { 0%, 68% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 71%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-72 { 0%, 72% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } 75%, 92% { fill: var(--color-red, #cb2127); stroke: var(--color-red, #cb2127); } 96%, 100% { fill: var(--color-surface-2, #1b1b1e); stroke: var(--color-line-strong, rgba(255, 255, 255, .2)); } }
@keyframes rj-step-text-20 { 0%, 20% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 23%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-22 { 0%, 22% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 25%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-24 { 0%, 24% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 27%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-35 { 0%, 35% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 38%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-40 { 0%, 40% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 43%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-46 { 0%, 46% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 49%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-60 { 0%, 60% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 63%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-68 { 0%, 68% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 71%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }
@keyframes rj-step-text-72 { 0%, 72% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } 75%, 92% { fill: #fff; } 96%, 100% { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); } }

/* ===== Zmiany prototypu 29-31.10 (transport/specjalizacje, kolejowy, lotniczy, intermodalny) ===== */

/* Uwaga 29.10 (A6): ramka rysunku na wysokość kolumny tekstu (od etykiety do przycisku), rysunek wyśrodkowany w pionie;
   przy rysunku wyższym od tekstu przycisk stoi przy dolnej krawędzi kolumny (E7). */
@media (min-width: 1025px) {
  .rg-industry__grid:not(.rg-industry__grid--photo) { align-items: stretch; }
  .rg-industry__grid > .rg-viz {
    display: flex; flex-direction: column; justify-content: center; align-self: stretch;
    height: auto; min-height: 0; margin-block: 0; padding-block: var(--space-6);
  }
  .rg-industry__grid > .rg-industry__copy { display: flex; flex-direction: column; }
  .rg-industry__grid > .rg-industry__copy > .rg-industry__actions { margin-top: auto; padding-top: var(--space-5); }
}

/* Układ szeroki (layout = wide; jak .rg-industry__wide-head w HTML, sekcje przełączone na układ szeroki 29.10):
   etykieta i H2, akapity pod H2 (na komputerze na szerokość H2: pierwsza kolumna ma szerokość nagłówka, akapit jej
   nie poszerza dzięki contain), przycisk w prawym górnym rogu na wysokości pierwszej linii H2, rysunek pod spodem. */
.rg-industry__wide-head { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: var(--space-6); }
.rg-industry__wide-head > div:first-child, .rg-industry__wide-head .section-head { display: contents; }
.rg-industry__wide-head h2 { max-width: none; margin-bottom: 0; }
.rg-industry__wide-head .rg-industry__copy { order: 1; max-width: 760px; margin-top: var(--head-lead-gap); }
.rg-industry__wide-head .rg-industry__copy > p { max-width: none; margin: 0; }
.rg-industry__wide-head .rg-industry__copy > p + p { margin-top: var(--space-2); }
.rg-industry__wide-head .rg-industry__actions { order: 2; margin-top: var(--space-5); }
@media (min-width: 1025px) {
  .rg-industry__wide-head {
    display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto; column-gap: var(--space-7);
    align-items: start; margin-bottom: var(--space-5);
  }
  .rg-industry__wide-head .section-head__label, .rg-industry__wide-head h2 { grid-column: 1; }
  .rg-industry__wide-head > .rg-industry__copy { grid-column: 1; grid-row: 3; max-width: none; contain: inline-size; }
  /* W HTML wiersz H2 zaczyna się 16 px wyżej (górny margines H2), stąd 20 px; tu H2 nie ma marginesu, więc 4 px. */
  .rg-industry__wide-head .rg-industry__actions { grid-column: 3; grid-row: 2; align-self: start; margin-top: 4px; }
}
.rg-industry--wide .rg-industry__visual.rg-viz { margin-bottom: 0; }
.rg-industry--wide .rg-viz > svg { max-height: 324px; width: auto; max-width: 100%; margin-inline: auto; }
/* Napis nad łukiem zwrotu (e-commerce) w skali podpisów kroków (rysunek w układzie szerokim powiększał go do ok. 30 px). */
.rg-industry--wide .rg-flowviz .fv-note { font-size: 14px; }
/* Niski laptop: szerokie rysunki (e-commerce, OZE, łańcuchy) najwyżej 210 px wysokości, wyśrodkowane (sekcja w widoku 1366×768). */
@media (min-width: 1025px) and (max-height: 800px) {
  .rg-industry--wide .rg-flowviz > svg { max-height: 210px; }
}
/* Telefon: rysunek w szerokości ramki (podpisy etapów są listą pod rysunkiem), bez przewijania w bok (QA 31.10). */
@media (max-width: 620px) {
  .rg-industry--wide .rg-viz { overflow-x: visible; }
  .rg-industry--wide .rg-viz > svg { min-width: 0; }
}

/* FMCG i cold chain (uwaga 30.10 J2): bez białych napisów w rysunkach S; podpisy szare, w FMCG „promocja” i „sezon” czerwone,
   bo opisują czerwone, dodatkowe auta własnej floty. */
.rg-industry__visual:is([data-viz-kind="fmcg"], [data-viz-kind="cold"]) .e6-tx--s { fill: var(--color-text-soft, rgba(255, 255, 255, .66)); }
.rg-industry__visual[data-viz-kind="fmcg"] .e6-tx:not(.e6-tx--s) { fill: var(--color-red-bright, #e9333a); }
/* Cold chain (J6): linia temperatury w zakresie delikatnie faluje (przesuwa się o jeden okres w pasie), przy pasie °C. */
@media (prefers-reduced-motion: no-preference) {
  .rg-industry__visual[data-viz-kind="cold"].is-visible .cold-wave { animation: cold-wave 7s linear infinite; }
}
@keyframes cold-wave { from { transform: translateX(0); } to { transform: translateX(200px); } }
.rg-industry__visual[data-viz-kind="cold"] .cold-unit { font-weight: 600; }

/* Reguła 5 (QA 31.10), niski laptop: e-commerce ma trzy akapity i dwuwierszowy H2, więc rysunek niższy (170 px), ciaśniejsza
   ramka i odstęp pod nagłówkiem; łańcuch lotniczy: odstęp 16 px i ciaśniejsza ramka. Podpisy osi w szerokości rysunku. */
@media (min-width: 1025px) and (max-height: 820px) {
  .rg-industry--wide:has(:is(.rg-flowviz--ecom, [data-viz-kind="airchain"])) .rg-industry__wide-head { margin-bottom: var(--space-4); }
  .rg-industry--wide .rg-viz:is(.rg-flowviz--ecom, [data-viz-kind="airchain"]) { padding-block: var(--space-4); }
}
@media (min-width: 1025px) and (max-height: 800px) {
  .rg-industry--wide .rg-flowviz--ecom > svg { max-height: 170px; }
  .rg-industry--wide .rg-flowviz--ecom .fv-steps { max-width: 850px; margin-inline: auto; }
  .rg-industry--wide .rg-flowviz--oze .fv-steps { max-width: 1207px; margin-inline: auto; }
}
/* Laptop 1440×900: rysunek e-commerce najwyżej 220 px (sekcja 826 px przy dostępnych ok. 790 px). */
@media (min-width: 1025px) and (min-height: 801px) and (max-height: 920px) {
  .rg-industry--wide .rg-flowviz--ecom > svg { max-height: 220px; }
  .rg-industry--wide .rg-flowviz--ecom .fv-steps { max-width: 1100px; margin-inline: auto; }
}

/* ===== Uwagi 6.11 ===== */
@media (min-width: 1025px) {
  /* D5: przycisk w połowie między końcem tekstu a dolną krawędzią animacji. */
  .rg-industry__grid:has(> [data-viz-kind="venn"]) > .rg-industry__copy > .rg-industry__actions { margin-block: auto; padding-top: 0; }
  /* F1: rysunek po lewej: nagłówek i akapity do prawej krawędzi siatki, bez pustego pasa. */
  .rg-industry--flip .rg-industry__copy :is(h2, .section-head, .section-head__lead, .rg-industry__p) { max-width: none; }
}
/* F8: certyfikat przy tekście (logo z pola badge_logo, podpis z pola badge_text). */
.rg-industry__badge { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-4); padding: 10px 14px; width: fit-content; border: 1px solid var(--color-line-strong); border-radius: var(--radius-control); color: var(--color-text); font-size: var(--text-small); font-weight: var(--weight-medium); line-height: 1.4; }
.rg-industry__badge img { width: auto; height: 36px; border-radius: 4px; background: #fff; padding: 2px; }

/* F6: układ „dowód” (OZE, makieta Magdy 6.11): nagłówek z przyciskiem, po lewej tekst, liczby, argumenty i mała oś, po prawej zdjęcie. */
.rg-industry--proof .rg-industry__proof-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-4); }
.rg-industry--proof .rg-industry__proof-head .section-head { max-width: none; margin-bottom: 0; }
.rg-industry--proof .rg-industry__proof-head h2 { max-width: none; }
.rg-industry--proof .rg-industry__proof-head .btn { flex: none; margin-top: 30px; }
.rg-industry__proof { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-5); align-items: stretch; }
.rg-industry__proof-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rg-industry__proof-lead { color: var(--color-text-soft); line-height: 1.6; }
.rg-industry__proof-lead strong { color: var(--color-text); font-weight: var(--weight-semibold); }
.rg-industry__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.rg-industry__stat { padding: 12px 14px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-control); background: var(--color-surface-2); }
.rg-industry__stat dt { font-size: 24px; font-weight: var(--weight-bold); letter-spacing: -.02em; line-height: 1.25; }
.rg-industry__stat dd { margin: 2px 0 0; color: var(--color-text-soft); font-size: 13px; line-height: 1.35; }
.rg-industry__checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rg-industry__checks li { position: relative; padding-left: 26px; color: var(--color-text-soft); line-height: 1.45; }
.rg-industry__checks li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 12px; height: 6px; border-bottom: 2px solid var(--color-red-bright); border-left: 2px solid var(--color-red-bright); transform: rotate(-45deg); }
.rg-industry__checks strong { color: var(--color-text); font-weight: var(--weight-semibold); }
.rg-industry__proof-axis { margin-top: auto; padding: 10px 16px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-card); background: var(--color-surface-2); }
.rg-industry__proof-axis .rg-viz { padding: 0; border: 0; background: none; }
.rg-industry__proof-axis .fv-steps { margin-top: 4px; }
.rg-industry__proof-axis .rg-flowviz .fv-steps li { display: block; justify-self: center; max-width: 8.2em; font-size: 13px; line-height: 1.35; text-align: center; }
.rg-industry__proof-axis .rg-flowviz .fv-steps li::before { display: inline-grid; margin-right: 6px; vertical-align: -4px; }
@media (min-width: 1025px) and (max-height: 820px) {
  .rg-industry--proof .rg-industry__proof-head { margin-bottom: 12px; }
  .rg-industry__stat { padding: 8px 12px; }
  .rg-industry__stat dt { font-size: 21px; }
  .rg-industry__checks { gap: 4px; }
  .rg-industry__checks li { line-height: 1.35; }
  .rg-industry__proof-axis svg { max-height: 96px; }
}
.rg-industry__proof-photo { position: relative; min-height: 460px; margin: 0; overflow: hidden; border-radius: var(--radius-card); }
.rg-industry__proof-photo > img:not(.rg-industry__proof-inset) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 100%; transform: scale(1.32); transform-origin: 58% 100%; }
.rg-industry__proof-photo::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(180deg, transparent, rgba(15, 15, 16, .9)); pointer-events: none; }
.rg-industry__proof-inset { position: absolute; z-index: 1; top: 18px; right: 18px; width: 34%; border: 2px solid #fff; border-radius: 6px; aspect-ratio: 16 / 10; object-fit: cover; }
.rg-industry__proof-photo figcaption { position: absolute; z-index: 1; inset: auto 20px 18px; color: #fff; }
.rg-industry__proof-photo figcaption small { display: block; color: var(--color-red-bright); font-size: var(--text-small); font-weight: var(--weight-semibold); letter-spacing: .12em; text-transform: uppercase; }
.rg-industry__proof-photo figcaption strong { display: block; margin-top: 4px; font-size: 20px; font-weight: var(--weight-semibold); line-height: 1.3; }
@media (max-width: 1024px) {
  .rg-industry--proof .rg-industry__proof-head { flex-direction: column; gap: var(--space-3); }
  .rg-industry--proof .rg-industry__proof-head .btn { margin-top: 0; }
  .rg-industry__proof { grid-template-columns: minmax(0, 1fr); }
  .rg-industry__proof-photo { min-height: 380px; }
}
@media (max-width: 560px) { .rg-industry__stats { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1024px) {
  .rg-industry--proof .shell { display: flex; flex-direction: column; }
  .rg-industry--proof .rg-industry__proof-head { display: contents; }
  .rg-industry--proof .rg-industry__proof-head .section-head { order: 1; margin-bottom: var(--space-4); }
  .rg-industry--proof .rg-industry__proof { order: 2; }
  .rg-industry--proof .rg-industry__proof-head .btn { order: 3; align-self: flex-start; margin-top: var(--space-5); }
}
