/* ===========================================
   PRZEWODNIK (ONBOARDING TOUR)
   Współdzielony komponent dla:
   - dla-rekruterow.ejs   (bundle guide-pages.css)
   - dla-zespolow.ejs     (bundle team.css)
   - rejestracja-sukces.ejs (bundle auth.css)

   Osobny plik, bo komponent żyje na trzech stronach z trzema różnymi bundlami
   (analogicznie do public/css/cmp.css). Paleta, promienie i skala typografii
   celowo powielają guide-pages.css/team.css – modal ma wyglądać jak natywna
   część tych stron, nie jak wklejony gotowiec.

   Wszystkie klasy prefiksowane `onboarding-tour-`, żeby nie kolidowały
   z `.recruiter-*` (guide-pages.css) ani `.team-*`/`.pricing-*` (team.css).

   Bazowe style desktop-first, responsywność w @media na końcu pliku.
   =========================================== */

/* === BLOKADA SCROLLA TŁA (dodawana przez onboardingTour.js) === */
html.onboarding-tour-scroll-lock,
html.onboarding-tour-scroll-lock body {
    overflow: hidden;
}

/* === SEKCJA WEJŚCIOWA NA STRONACH PUBLICZNYCH ===
   Pas `.onboarding-tour-cta-band` używany jest tylko na /dla-zespolow, gdzie sekcje
   są pełnej szerokości i treść trzyma `.container` (rytm jak `.benefits-section`).
   Na /dla-rekruterow sekcja stoi bezpośrednio w kolumnie `.guide-page`. */
.onboarding-tour-cta-band {
    padding: 1.5625rem 0;
    background: #fff;
}

/* Wariant zespołowy (/dla-zespolow): sekcja siedzi w pasie z własnym paddingiem
   pionowym i w `.container`, więc jej własny padding jest celowo mniejszy.
   Selektor jest bardziej specyficzny (0-2-0) niż generyczny (0-1-0), dlatego
   KAŻDY breakpoint musi nadpisywać obie reguły - sama generyczna by tu nie zadziałała. */
.onboarding-tour-cta-band .onboarding-tour-cta-section {
    padding: 1rem;
    margin-bottom: 0;
}

/* Wariant rekruterski (/dla-rekruterow): sekcja stoi samodzielnie w kolumnie
   `.guide-page`, więc trzyma rytm `.guide-section` z guide-pages.css (1.875rem). */
.onboarding-tour-cta-section {
    background: linear-gradient(135deg, #003153 0%, #0B4A73 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 49, 83, 0.15);
    color: #fff;
    padding: 1.875rem;
    margin-bottom: 1.875rem;
}

.onboarding-tour-cta-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 32px;
    max-width: 1140px;
    margin: 0 auto;
}

.onboarding-tour-cta-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #F39C12;
}

.onboarding-tour-cta-section h2 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    padding-bottom: 0;
    border-bottom: none;
}

.onboarding-tour-cta-lead {
    font-size: 17px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 1.125rem;
    max-width: 62ch;
}

.onboarding-tour-cta-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.onboarding-tour-cta-points li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.onboarding-tour-cta-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F39C12;
}

.onboarding-tour-cta-action {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
}

.onboarding-tour-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-height: 56px;
    padding: 1rem 1.5rem;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #fff;
    color: #003153;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.onboarding-tour-cta-btn:hover,
.onboarding-tour-cta-btn:focus {
    background: #f8fbff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 49, 83, 0.28);
}

.onboarding-tour-cta-btn:focus-visible {
    outline: 3px solid #F39C12;
    outline-offset: 3px;
}

.onboarding-tour-cta-btn svg {
    flex-shrink: 0;
}

.onboarding-tour-cta-note {
    margin: 0;
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
}

/* === PONOWNE OTWARCIE PRZEWODNIKA (rejestracja-sukces.ejs) ===
   Modal auto-otwiera sie po rejestracji; ten przycisk jest jedyna droga powrotu
   po jego zamknieciu. Wariant drugorzedny - nie moze konkurowac z glownym CTA
   strony sukcesu. Kontener `.container` na tej stronie ma text-align: center,
   dlatego przycisk sam ustawia sie na srodku bez dodatkowych regul. */
.onboarding-tour-reopen-wrap {
    margin: 1.125rem 0 0;
}

.onboarding-tour-reopen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.625rem 1.25rem;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
    background: #fff;
    color: #0B4A73;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    overflow-wrap: anywhere;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.onboarding-tour-reopen:hover {
    background: #f1f6fb;
    border-color: #003153;
    color: #003153;
}

.onboarding-tour-reopen:focus-visible {
    outline: 3px solid #F39C12;
    outline-offset: 2px;
}

.onboarding-tour-reopen svg {
    flex-shrink: 0;
}

/* ===========================================
   MODAL PRZEWODNIKA
   z-index: ponad badge reCAPTCHA (9999) i .recaptcha-load-notice (10000),
   ale poniżej CMP (baner 10010 / modal 10020) – zgoda zawsze na wierzchu.
   =========================================== */
.onboarding-tour-modal {
    position: fixed;
    inset: 0;
    z-index: 10005;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.62);
    overflow-y: auto;
}

.onboarding-tour-modal[data-visible="true"] {
    display: flex;
}

/* text-align jawnie: rejestracja-sukces.ejs centruje całą kolumnę treści inline,
   a modal nie może dziedziczyć wyrównania strony hosta. */
.onboarding-tour-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 940px;
    max-height: calc(100vh - 3rem);
    margin: auto;
    text-align: left;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

/* === NAGŁÓWEK === */
.onboarding-tour-header {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.625rem 1.75rem 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    border-bottom: 1px solid #e3f2fd;
}

.onboarding-tour-header-copy {
    min-width: 0;
}

.onboarding-tour-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #0B4A73;
    margin-bottom: 0.375rem;
}

.onboarding-tour-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: #003153;
    border-bottom: none;
    padding-bottom: 0;
}

.onboarding-tour-intro {
    margin: 0.5rem 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: #4b5563;
}

.onboarding-tour-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.5rem;
}

/* Kontrolka WCAG 2.2.2 – zatrzymuje/wznawia animacje makiet. */
.onboarding-tour-motion {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.onboarding-tour-motion:hover {
    background: #f1f6fb;
    border-color: #003153;
    color: #003153;
}

.onboarding-tour-motion:focus-visible {
    outline: 3px solid #F39C12;
    outline-offset: 2px;
}

/* Ikona rysowana CSS-em: dwie belki (pauza) → trójkąt (odtwórz), bez dodatkowego SVG. */
.onboarding-tour-motion-icon {
    flex: 0 0 auto;
    width: 2px;
    height: 10px;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.onboarding-tour-modal[data-motion="paused"] .onboarding-tour-motion-icon {
    width: 0;
    height: 0;
    border-left: 9px solid currentColor;
    border-right: 0;
    border-top: 5.5px solid transparent;
    border-bottom: 5.5px solid transparent;
}

/* Pauza = ten sam efekt co reduced-motion: brak ruchu i pełna, statyczna makieta.
   Świadomie NIE używamy animation-play-state: paused – zamroziłoby scenę
   w losowej klatce, np. z elementami w trakcie wygaszania. */
.onboarding-tour-modal[data-motion="paused"] .otm *,
.onboarding-tour-modal[data-motion="paused"] .otm *::before,
.onboarding-tour-modal[data-motion="paused"] .otm *::after,
.onboarding-tour-modal[data-motion="paused"] .otm-cursor {
    animation: none !important;
}

/* Wstrzymanie ruchu obejmuje takze przesuw toru - kto wylacza animacje,
   nie chce tez 0,72 s slajdowania przy zmianie kroku. */
.onboarding-tour-modal[data-motion="paused"] .onboarding-tour-track {
    transition: none;
}

.onboarding-tour-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.onboarding-tour-close:hover {
    background: #f1f6fb;
    border-color: #003153;
    color: #003153;
}

.onboarding-tour-close:focus-visible {
    outline: 3px solid #F39C12;
    outline-offset: 2px;
}

/* === SLAJDER KROKÓW ===
   Model toru, taki sam jak `.home-audience-routes` w promotionStyles.css: slider
   jest oknem (przycina), a wewnetrzny tor przesuwa sie w poziomie. Wczesniej kroki
   lezaly na sobie i przenikaly opacity - zmiana zachodzila W MIEJSCU, wiec swipe
   wygladal jak podmiana tresci, a nie jak przesuniecie.
   overflow-x ukryty przycina sasiednie kroki, overflow-y zostaje na przewijanie
   dluzszych krokow na mobile. */
.onboarding-tour-slider {
    position: relative;
    flex: 1 1 auto;
    min-height: 268px;
    overflow-x: hidden;
    overflow-y: auto;
}

.onboarding-tour-track {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    /* pan-y: gest pionowy zostaje przewijaniem, poziomy trafia do naszego swipe'a */
    touch-action: pan-y;
    transform: translate3d(var(--onboarding-tour-offset, 0%), 0, 0);
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* Krok = jeden slajd toru (pelna szerokosc okna) + wewnetrzna siatka
   „makieta obok opisu". auto-fit zamiast dodatkowego breakpointu: dwie kolumny
   gdy jest na nie miejsce, jedna (opis nad makieta) gdy dialog jest wezszy.
   Padding siedzi na kroku, nie na sliderze - inaczej przesuwany tor odslanialby
   sasiedni krok juz w obszarze paddingu. */
.onboarding-tour-step {
    flex: 0 0 100%;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    /* `start`, nie `center`: opis i makieta muszą zaczynać się na tej samej
       wysokości w KAŻDYM kroku. Przy centrowaniu górna krawędź opisu skakała
       zależnie od liczby punktów (2 vs 3), więc kroki „drgały” przy przewijaniu. */
    align-items: start;
    gap: 1.75rem;
    padding: 1.75rem;
    pointer-events: none;
}

.onboarding-tour-step-active {
    pointer-events: auto;
}

.onboarding-tour-step-visual {
    min-width: 0;
}

.onboarding-tour-step-copy {
    min-width: 0;
}

.onboarding-tour-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f7fd;
    border: 1px solid #dbe7f3;
    color: #0B4A73;
    margin-bottom: 1rem;
}

.onboarding-tour-step-counter {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #6b7c8c;
    margin-bottom: 0.375rem;
}

.onboarding-tour-step-title {
    margin: 0 0 0.625rem;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #003153;
    overflow-wrap: anywhere;
}

/* Lead niesie "co to jest i gdzie", punkty - reguly i wartosci, ktorych makieta
   nie pokaze. Stala struktura wyrownuje wysokosc krokow bez ciecia tresci. */
.onboarding-tour-step-lead {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    font-weight: 600;
    color: #1f3345;
    overflow-wrap: anywhere;
}

.onboarding-tour-step-points {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.875rem 0 0;
    padding: 0;
    list-style: none;
}

.onboarding-tour-step-points li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
    overflow-wrap: anywhere;
}

.onboarding-tour-step-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 11px;
    height: 6px;
    border-left: 2px solid #F39C12;
    border-bottom: 2px solid #F39C12;
    transform: rotate(-45deg);
}

/* === STOPKA: KROPKI + NAWIGACJA === */
.onboarding-tour-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.125rem 1.75rem 1.375rem;
    border-top: 1px solid #eef4fa;
    background: #fcfdff;
}

.onboarding-tour-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.onboarding-tour-dot {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #d8e7f2;
    cursor: pointer;
    transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.42s ease;
}

.onboarding-tour-dot:not(.onboarding-tour-dot-active):hover {
    background: #0B4A73;
}

.onboarding-tour-dot-active {
    width: 34px;
    background: #F39C12;
}

.onboarding-tour-dot:focus-visible {
    outline: 2px solid #003153;
    outline-offset: 3px;
}

.onboarding-tour-nav {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.onboarding-tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
    padding: 0.75rem 1.375rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.onboarding-tour-btn[hidden] {
    display: none;
}

.onboarding-tour-btn:focus-visible {
    outline: 3px solid #F39C12;
    outline-offset: 2px;
}

.onboarding-tour-btn-ghost {
    background: #fff;
    color: #213445;
    border-color: #cbd3dc;
}

.onboarding-tour-btn-ghost:hover:not(:disabled) {
    border-color: #003153;
    color: #003153;
}

.onboarding-tour-btn-ghost:disabled {
    color: #9aa7b4;
    border-color: #e2e8f0;
    background: #f8fafc;
    cursor: not-allowed;
}

.onboarding-tour-btn-primary {
    background: #003153;
    color: #fff;
    border-color: #003153;
}

.onboarding-tour-btn-primary:hover,
.onboarding-tour-btn-primary:focus {
    background: #0B4A73;
    border-color: #0B4A73;
    color: #fff;
}

/* ===========================================
   MAKIETY EKRANÓW (.otm = onboarding tour mockup)
   Animowane mini-sekcje zamiast GIF-ów: pokazują GDZIE w portalu jest dana
   funkcja (pasek adresu) i JAK wygląda (zawartość + ruch).

   Zasady wydajności i dostępności:
   - animujemy wyłącznie transform/opacity (brak layout thrash),
   - animacje odpalają się TYLKO dla aktywnego kroku (.onboarding-tour-step-active),
     a ukryty modal ma display:none, więc nic nie animuje się w tle,
   - wspólny cykl 7s dla wszystkich makiet, żeby ruch był spójny i niespieszny,
   - całość wyłączana w prefers-reduced-motion (blok na końcu pliku).
   =========================================== */
.otm {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 49, 83, 0.08);
    font-size: 11px;
    line-height: 1.35;
    color: #4b5563;
}

.otm-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: #f1f6fb;
    border-bottom: 1px solid #e3f2fd;
}

.otm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cfdcea;
}

.otm-url {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 6px;
    padding: 3px 9px;
    background: #fff;
    border: 1px solid #e3f2fd;
    border-radius: 999px;
    color: #5b6b7a;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otm-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    min-height: 218px;
}

/* --- wspólne prymitywy --- */
.otm-search {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
}

.otm-search-label {
    color: #90a2b3;
    font-size: 9.5px;
    font-weight: 600;
}

/* "Maszyna do pisania" jako MASKA odslaniajaca, nie animacja szerokosci tekstu.
   Animowanie `width: 0 -> 100%` na samym tekscie liczylo procent wzgledem bloku
   zawierajacego (cale pole ~200px), a nie wzgledem napisu (~95px) - karetka jechala
   wiec dalej w prawo, gdy tekst byl juz w calosci widoczny.
   Teraz `.otm-typed` ma szerokosc napisu (align-self: flex-start w kolumnowym
   flexie `.otm-search`), a `::after` przesuwa sie po nim od lewej do prawej.
   `left: 100%` to dokladnie koniec tekstu, wiec karetka zatrzymuje sie na nim. */
/* Monospace jest tu funkcjonalny, nie estetyczny: maska przesuwa sie w 14 rownych
   krokach, wiec przy foncie proporcjonalnym granica regularnie wypadala w SRODKU
   litery (wygladalo, jakby karetka obcinala znaki). Przy stalej szerokosci znaku
   jeden krok = dokladnie jeden glif i zaden nie jest nigdy przecinany. */
.otm-typed {
    position: relative;
    align-self: flex-start;
    max-width: 100%;
    color: #003153;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.otm-typed-text {
    white-space: nowrap;
}

/* Domyslnie maska jest ZA tekstem (stan koncowy) - bez animacji napis jest w calosci
   widoczny, zgodnie z zasada "stan bazowy = stan koncowy" przyjeta dla makiet. */
.otm-typed::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 100%;
    background: #fff;
    border-left: 2px solid transparent;
}

.otm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.otm-chips span {
    padding: 3px 8px;
    background: #f1f7fd;
    border: 1px solid #dbe7f3;
    border-radius: 999px;
    color: #0B4A73;
    font-size: 10px;
    font-weight: 600;
}

.otm-chips--criteria span {
    background: #003153;
    border-color: #003153;
    color: #fff;
}

.otm-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.otm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 9px;
    background: #fff;
    border: 1px solid #e6eef6;
    border-radius: 7px;
}

.otm-item strong {
    color: #003153;
    font-size: 11px;
    font-weight: 700;
}

.otm-item span {
    color: #7b8b9a;
    font-size: 10px;
    white-space: nowrap;
}

.otm-panel {
    padding: 9px 10px;
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 9px;
}

.otm-panel-head {
    margin-bottom: 7px;
    color: #003153;
    font-size: 11px;
}

.otm-note {
    padding: 6px 9px;
    background: #f1f7fd;
    border-left: 3px solid #F39C12;
    border-radius: 0 6px 6px 0;
    color: #4b5563;
    font-size: 10px;
}

.otm-btn {
    display: inline-block;
    align-self: flex-start;
    padding: 5px 11px;
    background: #003153;
    border-radius: 6px;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
}

.otm-cursor {
    position: absolute;
    z-index: 3;
    width: 14px;
    height: 14px;
    margin: -2px 0 0 -2px;
    border-radius: 50%;
    background: rgba(243, 156, 18, 0.28);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.65) inset;
    opacity: 0;
    pointer-events: none;
}

.otm-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 9px;
    background: #fff;
    border: 1px solid #e6eef6;
    border-radius: 7px;
}

.otm-mini-row b {
    color: #003153;
    font-size: 11px;
}

.otm-mini-row em {
    color: #7b8b9a;
    font-size: 10px;
    font-style: normal;
}

/* --- 2. odblokowanie kontaktu i CV --- */
.otm-reveal-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dashed #e6eef6;
}

.otm-reveal-row span {
    color: #90a2b3;
    font-size: 10px;
}

.otm-reveal-row em {
    color: #003153;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
}

/* Statycznie (bez animacji) widoczny jest stan PO odblokowaniu; zamaskowana
   wartosc to nakladka pojawiajaca sie wylacznie na czas animacji. */
.otm-locked {
    position: absolute;
    right: 0;
    opacity: 0;
}

.otm-file {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 6px 8px;
    background: #f8fbff;
    border: 1px solid #e3f2fd;
    border-radius: 7px;
}

.otm-file-icon {
    padding: 2px 5px;
    background: #003153;
    border-radius: 4px;
    color: #fff;
    font-size: 8.5px;
    font-weight: 700;
}

.otm-file-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: #003153;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.otm-file-action {
    color: #0B4A73;
    font-size: 10px;
    font-weight: 700;
}

/* --- 3. CRM (indywidualny i zespołowy) --- */
.otm-crm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #003153;
    font-size: 11px;
}

.otm-avatars {
    display: inline-flex;
}

.otm-avatars i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    margin-left: -6px;
    background: #0B4A73;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
}

.otm-kanban {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.otm-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
    background: #f6fafd;
    border: 1px solid #e6eef6;
    border-radius: 7px;
    min-height: 84px;
}

.otm-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    color: #6b7c8c;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.otm-col-head b {
    color: #003153;
    font-size: 9px;
}

.otm-count {
    position: relative;
    display: inline-block;
    min-width: 7px;
}

.otm-count i {
    font-style: normal;
}

/* j.w. - statycznie widoczny licznik PO przeniesieniu karty */
.otm-count-a {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.otm-mini-card {
    padding: 4px 6px;
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 5px;
    color: #003153;
    font-size: 9.5px;
    font-weight: 600;
}

/* --- 4. powiadomienia --- */
.otm-toasts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.otm-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    background: #fff;
    border: 1px solid #e3f2fd;
    border-left: 3px solid #F39C12;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(0, 49, 83, 0.06);
}

.otm-toast-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background: #f1f7fd;
    border-radius: 50%;
}

.otm-toast span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.otm-toast strong {
    color: #003153;
    font-size: 10.5px;
}

.otm-toast em {
    color: #90a2b3;
    font-size: 9.5px;
    font-style: normal;
}

/* --- 5. zapisane ogłoszenia --- */
.otm-bookmark {
    flex: 0 0 auto;
    width: 12px;
    height: 15px;
    background: #dbe7f3;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}

.otm-item--save .otm-bookmark {
    background: #F39C12;
}

.otm-bookmark--on {
    background: #F39C12;
}

.otm-saved-summary {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding: 7px 9px;
    background: #f1f7fd;
    border-radius: 7px;
    color: #003153;
    font-size: 10.5px;
    font-weight: 600;
}

.otm-saved-summary b {
    margin-left: auto;
}

/* --- 6. raporty / statystyki --- */
.otm-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.otm-kpis--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.otm-kpi {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 7px 8px;
    background: #f8fbff;
    border: 1px solid #e3f2fd;
    border-radius: 7px;
}

.otm-kpi b {
    color: #003153;
    font-size: 15px;
    line-height: 1.1;
}

.otm-kpi em {
    color: #7b8b9a;
    font-size: 9px;
    font-style: normal;
}

/* Podpis nazywa, CO pokazuje wykres pod nim - bez niego slupki na makiecie
   raportow czytaloby sie jako aktywnosc konta, a nie aktywnosc kandydatow.
   Ujemny margines znosi czesc 8px gapu `.otm-body`, zeby podpis trzymal sie
   swojego wykresu, a nie wisial w polowie drogi miedzy blokami. */
.otm-chart-caption {
    margin-bottom: -4px;
    color: #7b8b9a;
    font-size: 9.5px;
    font-weight: 600;
}

.otm-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 7px;
    height: 74px;
    padding-top: 4px;
}

.otm-bar-item {
    height: var(--h, 50%);
    background: linear-gradient(180deg, #0B4A73 0%, #003153 100%);
    border-radius: 4px 4px 2px 2px;
    transform-origin: bottom;
}

.otm-axis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
    color: #a3b1bf;
    font-size: 8.5px;
    text-align: center;
}

.otm-rodo {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding: 7px 9px;
    background: #f1f7fd;
    border-radius: 7px;
    color: #4b5563;
    font-size: 9.5px;
}

.otm-lock {
    flex: 0 0 auto;
    width: 11px;
    height: 12px;
    border: 2px solid #0B4A73;
    border-radius: 2px;
    box-shadow: inset 0 3px 0 #fff;
}

/* --- 7. panel zespołu (zakładki) --- */
.otm-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e3f2fd;
}

.otm-tab {
    padding: 4px 2px;
    color: #7b8b9a;
    font-size: 9.5px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otm-tab-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: calc((100% - 8px) / 3);
    height: 2px;
    background: #F39C12;
    border-radius: 2px;
}

.otm-panes {
    position: relative;
    display: grid;
    flex: 1 1 auto;
}

.otm-pane {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
}

.otm-pane-1 {
    opacity: 1;
}

/* --- 8. dostęp Pro / kontrola dostępu --- */
.otm-item--member .otm-badge {
    padding: 2px 7px;
    background: #003153;
    border-radius: 999px;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

.otm-role {
    padding: 2px 7px;
    background: #f1f7fd;
    border-radius: 999px;
    color: #0B4A73;
    font-size: 9px;
    font-weight: 700;
}

.otm-role--muted {
    color: #7b8b9a;
}

.otm-role--pending {
    background: #fff6e8;
    color: #a5680a;
}

.otm-invite {
    display: flex;
    gap: 6px;
}

.otm-invite-field {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    padding: 6px 9px;
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 7px;
    color: #003153;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 9. faktura --- */
.otm-merge {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.otm-merge-src {
    padding: 5px 6px;
    background: #f6fafd;
    border: 1px dashed #cfdcea;
    border-radius: 6px;
    color: #7b8b9a;
    font-size: 9.5px;
    text-align: center;
}

.otm-doc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding: 9px 10px;
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
}

.otm-doc-head {
    color: #003153;
    font-size: 11px;
    font-weight: 700;
}

.otm-doc-line {
    height: 6px;
    background: #eef4fa;
    border-radius: 3px;
    transform-origin: left;
}

.otm-doc-line.otm-stagger-3 {
    width: 70%;
}

.otm-doc-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid #e6eef6;
}

.otm-doc-total em {
    color: #7b8b9a;
    font-size: 10px;
    font-style: normal;
}

.otm-doc-total b {
    color: #003153;
    font-size: 10.5px;
}

/* --- 10. API --- */
.otm-code {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 10px;
    background: #04263f;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.otm-code-line {
    color: #c8dcec;
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otm-c-req,
.otm-c-key,
.otm-c-ok {
    font-style: normal;
    font-weight: 700;
}

.otm-c-req { color: #F39C12; }
.otm-c-key { color: #6fb2e0; }
.otm-c-ok { color: #4ade80; }

/* --- 11. zmiana planu --- */
.otm-plans {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.otm-plan {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 8px 9px;
    background: #f8fbff;
    border: 1px solid #e3f2fd;
    border-radius: 8px;
    color: #003153;
    font-size: 11px;
    font-weight: 700;
}

.otm-plan em {
    color: #7b8b9a;
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
}

.otm-plan--to {
    background: #003153;
    border-color: #003153;
    color: #fff;
}

.otm-plan--to em {
    color: rgba(255, 255, 255, 0.75);
}

.otm-plan-arrow {
    position: relative;
    height: 2px;
    background: #cfdcea;
}

.otm-plan-arrow::after {
    content: '';
    position: absolute;
    top: -3px;
    right: 0;
    width: 7px;
    height: 7px;
    border-top: 2px solid #F39C12;
    border-right: 2px solid #F39C12;
    transform: rotate(45deg);
}

.otm-switch-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
}

.otm-tag {
    padding: 2px 7px;
    background: #f1f7fd;
    border-radius: 999px;
    color: #0B4A73;
    font-size: 9px;
    font-weight: 700;
}

.otm-tag--now {
    background: #003153;
    color: #fff;
}

/* ===========================================
   ANIMACJE MAKIET – tylko dla aktywnego kroku.
   Wspólny cykl 7s: wejście → akcja → przytrzymanie → reset.
   =========================================== */
@keyframes otm-in {
    0% { opacity: 0; transform: translate3d(0, 7px, 0); }
    10%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translate3d(0, 7px, 0); }
}

/* Maska cofa sie od lewej do prawej: 0% = zakrywa caly napis, 100% = odsloniety.
   15% z cyklu 7s = 1050ms na 14 znakow, czyli 75ms/znak - naturalne tempo pisania.
   Wczesniej reveal konczyl sie na 30% (150ms/znak): za wolno i pokrywalo sie
   z klikiem kursora, ktory `otm-click` odpala okolo 30% cyklu. */
@keyframes otm-type {
    0% { left: 0; }
    15%, 92% { left: 100%; }
    100% { left: 0; }
}

@keyframes otm-caret {
    0%, 100% { border-left-color: #F39C12; }
    50% { border-left-color: transparent; }
}

@keyframes otm-click {
    0%, 24% { opacity: 0; transform: scale(0.6); }
    30% { opacity: 1; transform: scale(1); }
    44% { opacity: 1; transform: scale(1.9); }
    52%, 100% { opacity: 0; transform: scale(1.9); }
}

@keyframes otm-press {
    0%, 26% { transform: none; box-shadow: none; }
    34% { transform: scale(0.95); box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.25); }
    46%, 100% { transform: none; box-shadow: none; }
}

@keyframes otm-mask-out {
    0%, 34% { opacity: 1; }
    44%, 100% { opacity: 0; }
}

@keyframes otm-mask-in {
    0%, 38% { opacity: 0; }
    50%, 92% { opacity: 1; }
    100% { opacity: 0; }
}

/* Wejscie OPOZNIONE wzgledem sceny, bez `animation-delay`. Opoznienie przy
   animacji zapetlonej przesuwa faze, wiec element bylby widoczny na poczatku
   kolejnego cyklu - czyli zanim dane zostana odsloniete. Tu wszystko zostaje
   na tej samej osi 7s: ukryte do 52%, widoczne od 60%. */
@keyframes otm-late-in {
    0%, 52% { opacity: 0; transform: translate3d(0, 5px, 0); }
    60%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translate3d(0, 5px, 0); }
}

@keyframes otm-card-out {
    0%, 30% { opacity: 1; transform: none; }
    44% { opacity: 0; transform: translate3d(26px, 0, 0); }
    100% { opacity: 0; transform: translate3d(26px, 0, 0); }
}

@keyframes otm-card-in {
    0%, 38% { opacity: 0; transform: translate3d(-26px, 0, 0); }
    52%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translate3d(-26px, 0, 0); }
}

@keyframes otm-grow {
    0% { transform: scaleY(0); }
    22%, 92% { transform: scaleY(1); }
    100% { transform: scaleY(0); }
}

@keyframes otm-draw {
    0% { transform: scaleX(0); }
    26%, 92% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

@keyframes otm-tab-slide {
    0%, 22% { transform: translate3d(0, 0, 0); }
    33%, 55% { transform: translate3d(calc(100% + 4px), 0, 0); }
    66%, 88% { transform: translate3d(calc(200% + 8px), 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@keyframes otm-pane-1 { 0%, 26% { opacity: 1; } 31%, 100% { opacity: 0; } }
@keyframes otm-pane-2 { 0%, 28% { opacity: 0; } 33%, 59% { opacity: 1; } 64%, 100% { opacity: 0; } }
@keyframes otm-pane-3 { 0%, 61% { opacity: 0; } 66%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }

@keyframes otm-converge {
    0%, 20% { opacity: 1; transform: none; }
    46% { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.9); }
    100% { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.9); }
}

@keyframes otm-pulse-tag {
    0%, 30% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
    42% { box-shadow: 0 0 0 5px rgba(243, 156, 18, 0.22); }
    56%, 100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

/* Wspólne opóźnienia sceny */
.onboarding-tour-step-active .otm-stagger-1 { animation-delay: 0.15s; }
.onboarding-tour-step-active .otm-stagger-2 { animation-delay: 0.45s; }
.onboarding-tour-step-active .otm-stagger-3 { animation-delay: 0.75s; }
.onboarding-tour-step-active .otm-stagger-4 { animation-delay: 1.05s; }

/* 1. wyszukiwanie – 15 krokow = 15 znakow napisu "obsługa klienta".
   Liczba krokow MUSI odpowiadac dlugosci napisu w onboarding-tour-mockup.ejs,
   inaczej granica maski wypada w srodku glifu (efekt „obcinania liter”). */
.onboarding-tour-step-active .otm-typed::after {
    animation: otm-type 7s steps(15, end) infinite backwards, otm-caret 0.7s step-end infinite backwards;
}

.onboarding-tour-step-active .otm-body--search .otm-chips span {
    animation: otm-in 7s ease-in-out infinite backwards;
    animation-delay: 2.2s;
}

.onboarding-tour-step-active .otm-body--search .otm-item {
    animation: otm-in 7s ease-in-out infinite backwards;
}

.onboarding-tour-step-active .otm-body--search .otm-item.otm-stagger-1 { animation-delay: 2.7s; }
.onboarding-tour-step-active .otm-body--search .otm-item.otm-stagger-2 { animation-delay: 2.95s; }
.onboarding-tour-step-active .otm-body--search .otm-item.otm-stagger-3 { animation-delay: 3.2s; }

.otm-cursor--search { top: 44px; left: 76%; }
.onboarding-tour-step-active .otm-cursor--search { animation: otm-click 7s ease-out infinite backwards; }

/* 2. odblokowanie kontaktu */
.onboarding-tour-step-active .otm-locked { animation: otm-mask-out 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-revealed { animation: otm-mask-in 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-btn--unlock { animation: otm-press 7s ease-in-out infinite backwards; }

/* Dane odslaniaja sie na 38-50% cyklu, wiec akcja CV wchodzi zaraz po nich (60%). */
.onboarding-tour-step-active .otm-file-action { animation: otm-late-in 7s ease-in-out infinite backwards; }

/* Kursor siedzi WEWNATRZ przycisku (patrz markup), wiec `top`/`left` liczy sie
   wzgledem niego, a nie wzgledem ciala makiety z jego min-height. */
.otm-btn--unlock { position: relative; }
.otm-cursor--unlock { top: 5px; left: 70%; }
.onboarding-tour-step-active .otm-cursor--unlock { animation: otm-click 7s ease-out infinite backwards; }

/* 3. CRM – karta przenosi się z kolumny „Nowy” do „Kontakt”, a liczniki
   przełączają się razem z nią. Elementy nie mają stanu startowego w klasie
   bazowej: bierze się on z klatki 0% dzięki animation-fill-mode: backwards. */
.onboarding-tour-step-active .otm-card--leaves { animation: otm-card-out 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-card--enters { animation: otm-card-in 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-count-a { animation: otm-mask-out 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-count-b { animation: otm-mask-in 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-note { animation: otm-in 7s ease-in-out infinite backwards; }

/* Kursor musi wskazywac PIERWSZA karte ("Anna K."), bo to ona przenosi sie do
   kolumny obok. Pierwsza karta zajmuje 55-76px (wariant rekrutera) i 59-80px
   (zespolowy - naglowek jest wyzszy o awatary), wiec 66px trafia w obie. */
.otm-cursor--crm { top: 66px; left: 16%; }
.onboarding-tour-step-active .otm-cursor--crm { animation: otm-click 7s ease-out infinite backwards; }

/* 4. powiadomienia */
.onboarding-tour-step-active .otm-toast { animation: otm-in 7s ease-in-out infinite backwards; }

/* 5. zapisane ogłoszenia */
.onboarding-tour-step-active .otm-item--save .otm-bookmark {
    animation: otm-save 7s ease-in-out infinite backwards;
}

@keyframes otm-save {
    0%, 18% { background: #dbe7f3; transform: none; }
    26% { background: #F39C12; transform: scale(1.22); }
    34%, 92% { background: #F39C12; transform: none; }
    100% { background: #dbe7f3; transform: none; }
}

.onboarding-tour-step-active .otm-item--save.otm-stagger-1 .otm-bookmark { animation-delay: 0.1s; }
.onboarding-tour-step-active .otm-item--save.otm-stagger-2 .otm-bookmark { animation-delay: 0.5s; }
.onboarding-tour-step-active .otm-item--save.otm-stagger-3 .otm-bookmark { animation-delay: 0.9s; }

.otm-cursor--saved { top: 30px; right: 20px; left: auto; }
.onboarding-tour-step-active .otm-cursor--saved { animation: otm-click 7s ease-out infinite backwards; }

/* 6. raporty i statystyki zespołu */
.onboarding-tour-step-active .otm-kpi { animation: otm-in 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-kpi:nth-child(1) { animation-delay: 0.1s; }
.onboarding-tour-step-active .otm-kpi:nth-child(2) { animation-delay: 0.3s; }
.onboarding-tour-step-active .otm-kpi:nth-child(3) { animation-delay: 0.5s; }
.onboarding-tour-step-active .otm-kpi:nth-child(4) { animation-delay: 0.7s; }

.onboarding-tour-step-active .otm-bar-item { animation: otm-grow 7s cubic-bezier(0.22, 1, 0.36, 1) infinite backwards; }
.onboarding-tour-step-active .otm-bar-item:nth-child(1) { animation-delay: 0.55s; }
.onboarding-tour-step-active .otm-bar-item:nth-child(2) { animation-delay: 0.7s; }
.onboarding-tour-step-active .otm-bar-item:nth-child(3) { animation-delay: 0.85s; }
.onboarding-tour-step-active .otm-bar-item:nth-child(4) { animation-delay: 1s; }
.onboarding-tour-step-active .otm-bar-item:nth-child(5) { animation-delay: 1.15s; }
.onboarding-tour-step-active .otm-bar-item:nth-child(6) { animation-delay: 1.3s; }

/* 7. panel zespołu – przełączanie zakładek */
.onboarding-tour-step-active .otm-tab-indicator { animation: otm-tab-slide 7s cubic-bezier(0.22, 1, 0.36, 1) infinite backwards; }
.onboarding-tour-step-active .otm-pane-1 { animation: otm-pane-1 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-pane-2 { animation: otm-pane-2 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-pane-3 { animation: otm-pane-3 7s ease-in-out infinite backwards; }

/* Kursor klika w ZAKLADKE (pasek zajmuje 12-39px), a nie w panel pod nia.
   left: 50% = srodkowa zakladka, zgodnie z animacja wskaznika `otm-tab-slide`. */
.otm-cursor--tabs { top: 26px; left: 50%; }
.onboarding-tour-step-active .otm-cursor--tabs { animation: otm-click 7s ease-out infinite backwards; animation-delay: 0.6s; }

/* 8. dostęp Pro dla każdego członka */
.onboarding-tour-step-active .otm-item--member .otm-badge { animation: otm-in 7s ease-in-out infinite backwards; }

/* 9. kontrola dostępu – zaproszenie */
.onboarding-tour-step-active .otm-btn--invite { animation: otm-press 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-item--incoming { animation: otm-in 7s ease-in-out infinite backwards; animation-delay: 2.4s; }

.otm-cursor--invite { top: 26px; right: 30px; left: auto; }
.onboarding-tour-step-active .otm-cursor--invite { animation: otm-click 7s ease-out infinite backwards; }

/* 10. faktura zbiorcza */
.onboarding-tour-step-active .otm-merge-src { animation: otm-converge 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-doc-line { animation: otm-draw 7s ease-out infinite backwards; }
.onboarding-tour-step-active .otm-doc-total { animation: otm-in 7s ease-in-out infinite backwards; animation-delay: 1.4s; }

/* 11. API */
.onboarding-tour-step-active .otm-code-line { animation: otm-in 7s ease-in-out infinite backwards; }

/* 12. zmiana planu */
.onboarding-tour-step-active .otm-plan--to { animation: otm-pulse-tag 7s ease-in-out infinite backwards; }
.onboarding-tour-step-active .otm-switch-rows .otm-mini-row { animation: otm-in 7s ease-in-out infinite backwards; }

/* ===========================================
   RESPONSYWNOŚĆ
   =========================================== */
@media (max-width: 768px) {
    /* Ten sam krok co `.guide-section` w guide-pages.css na 768px (1.25rem 1rem). */
    .onboarding-tour-cta-section {
        padding: 1.25rem 1rem;
    }

    .onboarding-tour-cta-band {
        padding: 1.25rem 0;
    }

    .onboarding-tour-cta-band .onboarding-tour-cta-section {
        padding: 1rem;
    }

    .onboarding-tour-cta-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .onboarding-tour-cta-section h2 {
        font-size: 24px;
    }

    .onboarding-tour-cta-lead {
        font-size: 15px;
    }

    .onboarding-tour-modal {
        padding: 0;
    }

    .onboarding-tour-dialog {
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    /* Na 375px naglowek zjadal ~300px z ~620px wysokosci: eyebrow duplikujacy tytul,
       tytul lamany na 3 wiersze (bo przyciski zabieraly szerokosc) i 6-wierszowy
       lead. Zostaje sam tytul w pelnej szerokosci - reszta wraca do tresci kroku. */
    .onboarding-tour-header {
        align-items: center;
        padding: 0.75rem 1rem;
    }

    .onboarding-tour-eyebrow,
    .onboarding-tour-intro {
        display: none;
    }

    .onboarding-tour-title {
        font-size: 17px;
    }

    /* Pauza tylko ikona. Etykieta znika WIZUALNIE, ale zostaje w drzewie
       dostepnosci jako nazwa przycisku (JS dalej ja przelacza). Deklaracje jak
       `.visually-hidden` w main.css - klasy nie da sie przypiac w breakpoincie. */
    .onboarding-tour-motion {
        width: 40px;
        padding: 0;
        justify-content: center;
    }

    .onboarding-tour-motion-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -0.0625rem;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Ikona kroku jest dekoracyjna (aria-hidden), a zajmuje caly wiersz. */
    .onboarding-tour-step-icon {
        display: none;
    }

    .onboarding-tour-slider {
        min-height: 0;
        flex: 1 1 auto;
    }

    /* Na mobile zawsze jedna kolumna: opis nad makietą, niezależnie od auto-fit.
       `align-items: start` jest już w regule bazowej, więc tu go nie powtarzamy. */
    .onboarding-tour-step {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.125rem;
        padding: 1.375rem 1.25rem;
    }

    .otm-body {
        min-height: 190px;
    }

    .onboarding-tour-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.875rem;
        padding: 1rem 1.25rem 1.25rem;
    }

    .onboarding-tour-dots {
        justify-content: center;
    }

    .onboarding-tour-nav {
        justify-content: space-between;
        /* `stretch`, nie odziedziczone `center`: gdy na skrajnie wąskim ekranie
           etykieta CTA mimo wszystko złamie się na dwa wiersze, „Wstecz” dorówna
           jej wysokością, zamiast zostawiać w rzędzie dwa przyciski różnej wysokości. */
        align-items: stretch;
    }

    /* Etykiety CTA bywają długie („Zobacz plany zespołowe”). Na wąskim ekranie
       nowrap w flexie nie zszedłby poniżej szerokości tekstu i wypychał layout w poziomie,
       dlatego tekst musi mieć prawo się złamać - ale łamanie ma być OSTATECZNOŚCIĄ.
       Stąd `flex: 1 1 auto`, a nie `1 1 0`: podział startuje od szerokości TREŚCI,
       więc wolne miejsce dokłada się do obu przycisków po równo, a dłuższe CTA
       zostaje szersze od „Wstecz”. Przy `1 1 0` oba dostawały sztywno po połowie
       rzędu i CTA zawijało się, mając tuż obok ~100px niewykorzystanej szerokości.
       Rozwiązanie jest niezależne od długości etykiety - zmniejszanie czcionki
       działałoby tylko do następnego dłuższego CTA. */
    .onboarding-tour-btn {
        flex: 1 1 auto;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    /* Ten sam krok co `.guide-section` w guide-pages.css na 480px (1rem 0.75rem). */
    .onboarding-tour-cta-section {
        padding: 1rem 0.75rem;
        border-radius: 10px;
    }

    .onboarding-tour-cta-band .onboarding-tour-cta-section {
        padding: 0.875rem 0.75rem;
    }

    .onboarding-tour-cta-section h2 {
        font-size: 21px;
    }

    .onboarding-tour-cta-points {
        gap: 8px 16px;
    }

    .onboarding-tour-cta-points li {
        font-size: 13px;
    }

    .onboarding-tour-cta-btn {
        min-height: 52px;
        font-size: 15px;
    }

    .onboarding-tour-step-title {
        font-size: 18px;
    }

    .onboarding-tour-step-lead {
        font-size: 14.5px;
    }

    .onboarding-tour-step-points li {
        font-size: 13px;
    }

    /* Padding poziomy schodzi do 0.875rem nie dla wygladu (przyciski i tak rosna
       do szerokosci rzedu), tylko po to, zeby ich BAZOWA szerokosc byla mniejsza -
       to z niej flex liczy podzial, wiec kazde 4px na bok to 8px zapasu dla etykiety
       przed zawinieciem. Wysokosc dotyku bez zmian: min-height 44px z reguly bazowej. */
    .onboarding-tour-btn {
        padding: 0.75rem 0.875rem;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Tor przeskakuje natychmiast - krok nadal sie zmienia, tylko bez ruchu. */
    .onboarding-tour-track {
        transition: none;
        will-change: auto;
    }

    .onboarding-tour-dot,
    .onboarding-tour-btn,
    .onboarding-tour-close,
    .onboarding-tour-cta-btn {
        transition: none;
    }

    .onboarding-tour-cta-btn:hover,
    .onboarding-tour-cta-btn:focus {
        transform: none;
    }

    /* Makiety: zero ruchu. Stany bazowe to juz stan KONCOWY sceny
       (stan startowy pochodzi z klatki 0% + animation-fill-mode: backwards),
       wiec samo wylaczenie animacji daje kompletna, statyczna makiete.
       Pseudo-elementy MUSZA byc wymienione osobno - `animation` nie jest
       dziedziczone, wiec `.otm *` nie zatrzymaloby maski `.otm-typed::after`. */
    .otm *,
    .otm *::before,
    .otm *::after,
    .otm-cursor {
        animation: none !important;
    }
}
