/* Fáza 3 — #integrace signál (tmavá sekcia ostáva) + #co-prevezmeme list papiera s uzlami.
   Všetko je pod html[data-faze3="new"] (nastaví faze3.js v <head>, len ak beží Fáza 1),
   takže ?faze3=old, ?faze1=old a bez JS = stav po Fáze 2. Trať, uzly a signál sú dekoratívne prvky s aria-hidden bez textu.
   Jazyk: trať #d5def3 / mäkký uzol #8eaaf0 / aktívny #2563eb + halo (svetlá); v tmavej #integrace signál #60a5fa -> #2563eb.
   Mobil (≤ 767 px, rovnaký prah ako Fáza 2): #integrace v jednom stĺpci so zvislou traťou vľavo.
   Taby #co-prevezmeme: 4 v rade s vodorovnou traťou od 1024 px (pôvodný lg prah), pod ním 1 stĺpec so zvislou traťou. */

/* ================= #integrace ================= */
/* pôvodné SVG spojnice + pakety (nekonečná CSS animácia) sa nahrádzajú traťou merané z reálnych kariet */
html[data-faze3="new"] #integrace .f3-int > div[aria-hidden="true"]:first-child{display:none}
html[data-faze3="new"] #integrace .f3-int-lines,
html[data-faze3="new"] #integrace .f3-int-dots{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none}
html[data-faze3="new"] #integrace .f3-int-lines{z-index:0}
html[data-faze3="new"] #integrace .f3-int-dots{z-index:20}
html[data-faze3="new"] #integrace .f3-int-svg{position:absolute;left:0;top:0;overflow:visible}
html[data-faze3="new"] #integrace .f3-trk{fill:none;stroke:rgba(142,170,240,.26);stroke-width:1.5;stroke-linecap:round;
  transition:stroke .45s ease}
html[data-faze3="new"] #integrace .f3-trk.is-act{stroke:rgba(96,165,250,.5)}
html[data-faze3="new"] #integrace .f3-trk.is-hov{stroke:rgba(147,197,253,.7)}
html[data-faze3="new"] #integrace .f3-vfill{fill:none;stroke:#3b82f6;stroke-width:2;stroke-linecap:round;
  filter:drop-shadow(0 0 4px rgba(59,130,246,.55))}
html[data-faze3="new"] #integrace .f3-tail{fill:none;stroke-linecap:round;opacity:0}
html[data-faze3="new"] #integrace .f3-tail-w{stroke:rgba(96,165,250,.28);stroke-width:5}
html[data-faze3="new"] #integrace .f3-tail-n{stroke:rgba(147,197,253,.9);stroke-width:2.2}
/* vodorovne: zvislé prvky skryté a naopak */
html[data-faze3="new"] #integrace .f3-int:not(.f3-v) :is(.f3-vtrk,.f3-vfill,.f3-only-v){display:none}
html[data-faze3="new"] #integrace .f3-int.f3-v :is(.f3-trk:not(.f3-vtrk),.f3-tail,.f3-dot-eng:not(.f3-only-v)){display:none}

/* signál: hlava 11 px s glow (chvost = SVG segmenty za ňou) */
html[data-faze3="new"] #integrace .f3-head{position:absolute;left:0;top:0;width:11px;height:11px;margin:-5.5px 0 0 -5.5px;border-radius:50%;
  background:radial-gradient(circle at 50% 50%,#e0ecff 0 22%,#60a5fa 55%,#2563eb 100%);
  box-shadow:0 0 0 4px rgba(96,165,250,.16),0 0 18px 4px rgba(59,130,246,.55);
  visibility:hidden;will-change:transform}
html[data-faze3="new"] #integrace .f3-head.is-on{visibility:visible}
html[data-faze3="new"] #integrace .f3-v .f3-head{transition:opacity .3s ease}

/* uzly na koncoch spojníc: pokoj (tmavý s mäkkým okrajom) -> rozsvietený (#2563eb + halo) */
html[data-faze3="new"] #integrace .f3-dot{position:absolute;left:0;top:0;box-sizing:border-box;width:12px;height:12px;margin:-6px 0 0 -6px;
  border-radius:50%;background:#0b1120;border:2px solid rgba(142,170,240,.55);
  transition:background-color .45s ease,border-color .45s ease,box-shadow .45s ease}
html[data-faze3="new"] #integrace .f3-dot-eng{width:18px;height:18px;margin:-9px 0 0 -9px}
html[data-faze3="new"] #integrace .f3-dot.is-on{background:#2563eb;border-color:#93c5fd;
  box-shadow:0 0 0 6px rgba(96,165,250,.14),0 0 14px 2px rgba(59,130,246,.5)}

/* karty vstupov/výstupov: jemné rozsvietenie cez ::after (prechod opacity, nie animovaný box-shadow) */
html[data-faze3="new"] #integrace .f3-card{position:relative}
html[data-faze3="new"] #integrace .f3-card::after{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;
  border:1px solid rgba(96,165,250,.55);box-shadow:0 0 0 3px rgba(37,99,235,.1),0 16px 34px -18px rgba(37,99,235,.7);
  opacity:0;transition:opacity .45s ease}
html[data-faze3="new"] #integrace .f3-card.f3-lit::after{opacity:1}
html[data-faze3="new"] #integrace .f3-card.f3-hov::after{opacity:.75}
/* uzol Automak: halo pri príchode signálu + jeden prstenec */
html[data-faze3="new"] #integrace .f3-engine::after{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;
  border:1px solid rgba(147,197,253,.75);box-shadow:0 0 0 6px rgba(96,165,250,.14),0 0 46px 6px rgba(37,99,235,.45);
  opacity:0;transition:opacity .45s ease}
html[data-faze3="new"] #integrace .f3-engine.f3-lit::after{opacity:1}
html[data-faze3="new"] #integrace .f3-engine.is-ping::before{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;
  border:2px solid rgba(96,165,250,.6);animation:f3Ring .9s cubic-bezier(.16,1,.3,1) 1 forwards}
@keyframes f3Ring{from{transform:scale(1);opacity:.9}to{transform:scale(1.12);opacity:0}}

/* reduced-motion / bez IntersectionObserver: trať plne rozsvietená, bez signálu */
html[data-faze3="new"] #integrace .f3-static .f3-trk{stroke:rgba(96,165,250,.55)}

/* mobil: jeden stĺpec (vstupy -> Automak -> výstupy), zvislá trať vľavo */
@media (max-width:767px){
  html[data-faze3="new"] #integrace .f3-int{grid-template-columns:minmax(0,1fr);padding-left:28px}
  html[data-faze3="new"] #integrace .f3-int > div{grid-column:auto}
}

/* ================= #co-prevezmeme ================= */
/* list papiera (ako v recenzii): biela, rádius 3 px, trojvrstvový tieň, náklon -0,3° */
html[data-faze3="new"] #co-prevezmeme .f3-sheet{position:relative;background:#fff;border:1px solid rgb(228 228 221);border-radius:3px;
  padding:52px 28px 8px;transform:rotate(-.3deg);
  box-shadow:0 1px 2px rgba(15,23,42,.06),0 14px 30px -10px rgba(15,23,42,.16),0 34px 70px -30px rgba(15,23,42,.22)}
/* od 1248 px list presahuje do okraja sekcie, aby taby mali rovnakú šírku ako pred Fázou 3 (žiadne nové zalomenie) */
@media (min-width:1024px) and (max-width:1247px){html[data-faze3="new"] #co-prevezmeme .f3-sheet{padding-left:16px;padding-right:16px}}
@media (min-width:1248px){html[data-faze3="new"] #co-prevezmeme .f3-sheet{margin:0 -29px;padding-left:28px;padding-right:28px}}
html[data-faze3="new"] #co-prevezmeme .f3-sheet > #case-tab-buttons{margin-bottom:0}
/* panel je súčasťou listu: bez vlastnej karty, oddelený jemnou linkou */
html[data-faze3="new"] #co-prevezmeme .f3-sheet > #tab-content-panel{background:transparent;border:0;border-top:1px solid #ecece6;
  border-radius:0;box-shadow:none;margin-top:26px;padding:28px 4px 24px}
html[data-faze3="new"] #co-prevezmeme .tab-btn[aria-selected="true"]{background:#f7f9ff}
html[data-faze3="new"] #co-prevezmeme .tab-btn:focus-visible{outline:2px solid #2563eb;outline-offset:3px}

/* trať tabov */
html[data-faze3="new"] #co-prevezmeme .f3-tabrail{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;z-index:1}
html[data-faze3="new"] #co-prevezmeme .f3-tabtrack{position:absolute;display:block;background:#d5def3;border-radius:2px}
html[data-faze3="new"] #co-prevezmeme .f3-tabrail:not(.is-v) .f3-tabtrack{height:2px;margin-top:-1px}
html[data-faze3="new"] #co-prevezmeme .f3-tabrail.is-v .f3-tabtrack{width:2px;margin-left:-1px}
html[data-faze3="new"] #co-prevezmeme .f3-tabnode{position:absolute;box-sizing:border-box;width:18px;height:18px;margin:-9px 0 0 -9px;
  border-radius:50%;background:#fff;border:2px solid #8eaaf0;
  transition:background-color .45s ease,border-color .45s ease,box-shadow .45s ease}
html[data-faze3="new"] #co-prevezmeme .f3-tabnode.is-on{background:#2563eb;border-color:#2563eb;
  box-shadow:0 0 0 6px rgba(37,99,235,.14),0 0 18px 2px rgba(37,99,235,.35)}
html[data-faze3="new"] #co-prevezmeme .f3-tabnode.is-ping::after{content:"";position:absolute;inset:-2px;border-radius:50%;
  border:2px solid rgba(37,99,235,.55);animation:f3Ping .9s cubic-bezier(.16,1,.3,1) 1 forwards}
@keyframes f3Ping{from{transform:scale(1);opacity:.9}to{transform:scale(2.4);opacity:0}}
/* krátky signál pri prepnutí: hlava 12 px s glow + chvost (smer podľa pohybu) */
html[data-faze3="new"] #co-prevezmeme .f3-tabhead{position:absolute;left:0;top:0;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;
  background:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.16),0 0 16px 3px rgba(37,99,235,.45);
  opacity:0;transition:opacity .2s ease;will-change:transform;z-index:2}
html[data-faze3="new"] #co-prevezmeme .f3-tabhead.is-on{opacity:1}
html[data-faze3="new"] #co-prevezmeme .f3-tabhead::before{content:"";position:absolute;border-radius:2px}
html[data-faze3="new"] #co-prevezmeme .f3-tabrail:not(.is-v) .f3-tabhead::before{right:6px;top:50%;width:var(--f3-tail,0px);height:4px;margin-top:-2px;
  background:linear-gradient(90deg,rgba(37,99,235,0),rgba(37,99,235,.85))}
html[data-faze3="new"] #co-prevezmeme .f3-tabrail.is-rev:not(.is-v) .f3-tabhead::before{right:auto;left:6px;
  background:linear-gradient(270deg,rgba(37,99,235,0),rgba(37,99,235,.85))}
html[data-faze3="new"] #co-prevezmeme .f3-tabrail.is-v .f3-tabhead::before{bottom:6px;left:50%;height:var(--f3-tail,0px);width:4px;margin-left:-2px;
  background:linear-gradient(180deg,rgba(37,99,235,0),rgba(37,99,235,.85))}
html[data-faze3="new"] #co-prevezmeme .f3-tabrail.is-rev.is-v .f3-tabhead::before{bottom:auto;top:6px;
  background:linear-gradient(0deg,rgba(37,99,235,0),rgba(37,99,235,.85))}

/* jednorazové odkrytie detailu pri prepnutí tabu */
html[data-faze3="new"] #co-prevezmeme #tab-content-panel.f3-reveal > *{animation:f3Reveal .55s cubic-bezier(.16,1,.3,1) 1 both}
@keyframes f3Reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* pod 1024 px: taby v jednom stĺpci (ikona vľavo), zvislá trať vľavo */
@media (max-width:1023px){
  html[data-faze3="new"] #co-prevezmeme .f3-sheet{padding:24px 20px 4px}
  html[data-faze3="new"] #co-prevezmeme .f3-sheet > #case-tab-buttons{grid-template-columns:minmax(0,1fr);padding-left:26px;gap:10px}
  html[data-faze3="new"] #co-prevezmeme .tab-btn{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:12px;align-items:center}
  /* pevná šírka ikony: kým sa nenačíta font ikon (ligatúra = dlhý text), stĺpec sa nerozťahuje (žiadny posun layoutu) */
  html[data-faze3="new"] #co-prevezmeme .tab-btn > .material-symbols-outlined{grid-row:1 / span 2;margin-bottom:0;width:24px;
    overflow:hidden;white-space:nowrap}
  html[data-faze3="new"] #co-prevezmeme .tab-btn > span:not(.material-symbols-outlined){grid-column:2}
  html[data-faze3="new"] #co-prevezmeme .f3-sheet > #tab-content-panel{margin-top:20px;padding:22px 0 20px}
}
@media (max-width:639px){
  html[data-faze3="new"] #co-prevezmeme .f3-sheet{padding:20px 14px 2px;transform:rotate(-.2deg)}
}

/* ================= reduced motion: statický stav ================= */
@media (prefers-reduced-motion:reduce){
  html[data-faze3="new"] #integrace .f3-head,
  html[data-faze3="new"] #integrace .f3-tail,
  html[data-faze3="new"] #co-prevezmeme .f3-tabhead{display:none}
  html[data-faze3="new"] #integrace .f3-dot,
  html[data-faze3="new"] #integrace .f3-trk,
  html[data-faze3="new"] #integrace .f3-card::after,
  html[data-faze3="new"] #integrace .f3-engine::after,
  html[data-faze3="new"] #co-prevezmeme .f3-tabnode{transition:none}
  html[data-faze3="new"] #integrace .f3-engine.is-ping::before,
  html[data-faze3="new"] #co-prevezmeme .f3-tabnode.is-ping::after{animation:none;display:none}
  html[data-faze3="new"] #co-prevezmeme #tab-content-panel.f3-reveal > *{animation:none}
}
