/* Samouczek „Jak pobrać plan zajęć” (public/tutorial.js). Zmienne z styles.css, ciemny motyw, akcent limonkowy.
   Animacje wyłącznie transform i opacity. Bez atrybutów style (CSP): wszystko klasami. */
.tt { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 560px; margin: 0 auto; color: var(--ink); }
.tt-title { margin: 0; font: 500 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.tt-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-tab { min-height: 44px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--soft); font: 600 13px/1.25 var(--sans); cursor: pointer; }
.tt-tab:hover { background: var(--lift); color: var(--ink); }
.tt-tab.is-on { background: var(--up-bg); border-color: var(--accent); color: var(--accent); }
.tt-tab:focus-visible, .tt-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tt-stage { position: relative; border: 1px solid var(--edge); border-radius: 18px; background: var(--tile); overflow: hidden; }
.tt-step[hidden] { display: none; }
.tt-svg { display: block; width: 100%; height: auto; }
.tt-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lift); }
.tt-prog i { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(0); }

.tt-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tt-btn { min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: 600 15px/1 var(--sans); cursor: pointer; }
.tt-btn:hover { background: var(--lift); color: var(--accent); }
.tt-btn:disabled, .tt-btn.is-off { opacity: .45; cursor: default; }
.tt-play { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.tt-play:hover { background: color-mix(in srgb, var(--accent) 85%, white); color: var(--accent-ink); }
.tt-dots { display: flex; gap: 6px; flex: 1 1 60px; justify-content: center; }
.tt-pip { width: 22px; height: 4px; border-radius: 4px; background: var(--lift); }
.tt-pip.is-done { background: color-mix(in srgb, var(--accent) 45%, var(--lift)); }
.tt-pip.is-on { background: var(--accent); }
.tt-count { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.tt-cap { margin: 0; min-height: 3.2em; font-size: 16px; line-height: 1.4; }
.tt-cap strong { display: block; font-weight: 700; color: var(--accent); }
.tt-note { margin: 0; font-size: 13px; color: var(--soft); }
.tt-note:empty { display: none; }
.tt--compact { gap: 8px; }
.tt--compact .tt-cap { font-size: 15px; }
.tt--compact .tt-tab { min-height: 40px; padding: 6px 10px; font-size: 12.5px; }

/* Makiety: kolory z zmiennych panelu */
.tt-win { fill: var(--tile); stroke: var(--edge); }
.tt-bar { fill: var(--sunk); }
.tt-dot { fill: var(--lift); }
.tt-dot1 { fill: var(--accent); }
.tt-row { fill: var(--sunk); }
.tt-sel { fill: var(--sunk); stroke: var(--hair); }
.tt-line { fill: var(--soft); }
.tt-acc { fill: var(--accent); }
.tt-amb { fill: var(--amber); }
.tt-ok { fill: var(--up-bg); }
.tt-warn { fill: rgb(255 179 92 / .12); stroke: var(--amber); }
.tt-ring { fill: none; stroke: var(--accent); stroke-width: 2; }
.tt-file { fill: var(--lift); stroke: var(--soft); }
.tt-fold { fill: none; stroke: var(--soft); }
.tt-clock { fill: var(--sunk); stroke: var(--edge); stroke-width: 2; }
.tt-hand { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.tt-keyc { fill: none; stroke: var(--amber); stroke-width: 2.5; }
.tt-keyl { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-linecap: round; }
.tt-env { fill: none; stroke: var(--soft); stroke-width: 2; stroke-linejoin: round; }
.tt-no { fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round; }
.tt-chev { fill: none; stroke: var(--soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-curp { fill: var(--ink); stroke: var(--bg); stroke-width: 1.5; stroke-linejoin: round; }
.tt-tx { fill: var(--ink); font: 500 12px var(--sans); }
.tt-sm { font-size: 11px; }
.tt-mono { font-family: var(--mono); font-size: 11px; }
.tt-soft { fill: var(--soft); }
.tt-ink { fill: var(--ink); }
.tt-mid { text-anchor: middle; }
.tt-end { text-anchor: end; }
.tt-accink { fill: var(--accent-ink); font-weight: 700; }
.tt-oktx { fill: var(--accent); font-weight: 600; }
.tt-amtx { fill: var(--amber); font-weight: 700; }

/* Animacje: tylko gdy krok jest aktywny (ukryty krok ma display: none, więc po pokazaniu animacja startuje od zera). */
.tt-in, .tt-pop, .tt-hl, .tt-grow, .tt-press, .tt-cur, .tt-fly, .tt-fly2, .tt-pulse, .tt-spin, .tt-fade { transform-box: fill-box; transform-origin: center; }
.tt-grow { transform-origin: left center; }
.tt-spin { transform-box: view-box; transform-origin: 0 0; }
.tt-step.is-on .tt-in { animation: tt-in .5s ease-out both; }
.tt-step.is-on .tt-pop { animation: tt-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.tt-step.is-on .tt-fade { animation: tt-fade .4s ease-out both; }
.tt-step.is-on .tt-hl { animation: tt-fade .35s ease-out both; }
.tt-step.is-on .tt-grow { animation: tt-grow 1s ease-out both; }
.tt-step.is-on .tt-press { animation: tt-press .45s ease-in-out both; }
.tt-step.is-on .tt-pulse { animation: tt-in .5s ease-out both, tt-pulse 1.4s ease-in-out .9s infinite alternate; }
.tt-step.is-on .tt-spin { animation: tt-spin 3.2s ease-in-out .5s both; }
.tt-step.is-on .tt-fly { animation: tt-fly 1.1s ease-in both; }
.tt-step.is-on .tt-fly2 { animation: tt-fly2 1.8s ease-in-out both; }
.tt-step.is-on .tt-m1 { animation: tt-cur 1.2s ease-in-out both; }
.tt-step.is-on .tt-m2 { animation: tt-cur 1.2s ease-in-out both; }
.tt-step.is-on .tt-m4 { animation: tt-cur 1.2s ease-in-out both; }
.tt-step.is-on .tt-m3 { animation: tt-cur3 2.6s ease-in-out both; }
.tt-step.is-on .tt-prog i { animation: tt-fill 6s linear both; }
.tt-step.is-on .tt-ms8 i { animation-duration: 8s; }
.tt-step.is-on .tt-ms5 i { animation-duration: 4.8s; }
.tt-fly2 { opacity: 0; }
.tt-t1 { animation-delay: .3s !important; } .tt-t2 { animation-delay: .8s !important; } .tt-t3 { animation-delay: 1.3s !important; } .tt-t4 { animation-delay: 1.8s !important; }
.tt-t5 { animation-delay: 2.3s !important; } .tt-t6 { animation-delay: 2.8s !important; } .tt-t7 { animation-delay: 3.3s !important; } .tt-t8 { animation-delay: 3.8s !important; }
.tt-step.is-on .tt-pulse.tt-t2 { animation-delay: .8s, 1.7s !important; }
.tt-step.is-on .tt-spin.tt-t2 { animation-delay: .5s !important; }

/* Zatrzymany (przez użytkownika, poza ekranem, ukryta karta): kroki stoją w stanie końcowym, więc ręczne przełączanie zawsze pokazuje pełną makietę. */
.tt.is-paused .tt-step *, .tt.is-paused .tt-step.is-on * { animation: none !important; }
.tt.is-paused .tt-prog { display: none; }

@keyframes tt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tt-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes tt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tt-grow { from { opacity: .2; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes tt-press { 0%, 100% { transform: none; } 50% { transform: scale(.93); } }
@keyframes tt-pulse { from { transform: none; } to { transform: scale(1.04); } }
@keyframes tt-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes tt-fly { from { opacity: 0; transform: translateY(-52px); } 25% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes tt-fly2 { 0% { opacity: 0; transform: translate(120px, 74px); } 20% { opacity: 1; } 70%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.7); } }
@keyframes tt-cur { from { opacity: 0; transform: translate(70px, 46px); } 25% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes tt-cur3 { 0% { opacity: 0; transform: translate(-30px, -80px); } 10% { opacity: 1; } 35%, 50% { opacity: 1; transform: translate(-110px, -45px); } 100% { opacity: 1; transform: none; } }
@keyframes tt-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Bez animacji: ukryj ruchome elementy i pasek, zostaw statyczne kroki przełączane ręcznie. */
@media (prefers-reduced-motion: reduce) {
  .tt-step *, .tt-step.is-on * { animation: none !important; }
  .tt-prog, .tt-cur, .tt-fly2 { display: none; }
}
.tt.is-reduced .tt-step *, .tt.is-reduced .tt-step.is-on * { animation: none !important; }
.tt.is-reduced .tt-prog, .tt.is-reduced .tt-cur, .tt.is-reduced .tt-fly2 { display: none; }

@media (max-width: 380px) {
  .tt-tab { flex: 1 1 calc(50% - 6px); padding: 8px; font-size: 12.5px; }
  .tt-cap { font-size: 15px; }
  .tt-dots { flex-basis: 100%; order: 5; }
}
