/* GadajPo - sciezka nauki i odswiezenie wizualne wg wzorcow LifeCore (2026-10-28).
   Mapa wzorcow i powody odstepstw: docs/implementation/LEARNING_PATH.md.
   Tylko tokeny z styles/tokens.css. Komponent #path-home istnieje wylacznie przy
   flagach learning_path_enabled + scenarios_enabled (js/learning-path.js); reguly ".gp-path" tez. */

/* ── Nawigacja: aktywny element jako miekka pigulka (LifeCore: secondary bg + ink), nie pelny kolor ── */
.hn-btn { border-color:var(--hairline); border-radius:12px; }
.hn-btn:hover { background:var(--brand-soft); border-color:transparent; color:var(--brand-ink); }
.hn-btn.active { background:var(--brand-soft); border-color:transparent; color:var(--brand-ink); box-shadow:none; }
#mob-tabs .tab-btn.active .tb-ico { background:var(--brand-soft); border-radius:999px; padding:2px 12px; }
.hn-btn:focus-visible, #mob-tabs .tab-btn:focus-visible, #voice-start-btn:focus-visible { outline:none; box-shadow:var(--focus-ring); }

/* ── Tryb skupienia: elementy grywalizacji schowane, dane nietkniete ── */
body.gp-focus .hdr-chip.streak, body.gp-focus .hdr-chip.xp, body.gp-focus #xp-progress-wrap,
body.gp-focus #dc-home-btn, body.gp-focus #hn-challenge, body.gp-focus #dc-bar,
body.gp-focus .dc-menu-btn, body.gp-focus .dc-picker-btn { display:none !important; }

/* ── Tryb sciezki przed rozmowa: start jest w karcie zadania, Alex nad sciezka ──
   W trakcie rozmowy albo przy wznawialnej sesji (.gp-live) wraca zwykly pasek glosowy. */
body.gp-path:not(.gp-live) #voice-start-btn,
body.gp-path:not(.gp-live) #voice-orb-row,
body.gp-path:not(.gp-live) #dc-home-btn,
body.gp-path:not(.gp-live) #live-voice-status,
body.gp-path:not(.gp-live) #mob-chat-av,
body.gp-path:not(.gp-live) #session-count-bar { display:none !important; } /* limit pokazuje karta zadania */
/* Lewa kolumna (desktop): przed rozmowa pusta analiza i fiszki tylko rozpraszaja - zostaje sam Alex.
   Analiza po rozmowie (#ac widoczne) zostaje; bez :has() przegladarka po prostu nic nie chowa. */
body.gp-path:not(.gp-live) #desktop-fc,
body.gp-path:not(.gp-live) #left-col .an-wrap:has(#ac[style*="none"]) { display:none !important; }
/* ── Pole ekranu sciezki ── */
#path-home {
  position:relative; display:flex; flex-direction:column; gap:12px;
  width:100%; max-width:560px; align-self:center;
  padding:6px 4px 16px; flex:0 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain;
}
#path-home[hidden] { display:none; }

/* ── Ekran sciezki (v4 "kafelki"): duza karta "Teraz" w kolorze sytuacji, pod nia kolorowa lista ──
   --c = kolor sytuacji ustawiany z JS (stala tabela LOOK, bialy tekst >= 4.5:1). */
.pk-msg { margin:8px 2px 0; font-size:15px; color:var(--text2); }

.pk-hero {
  --c:var(--brand-strong);
  display:flex; flex-direction:column; align-items:flex-start; gap:10px;
  padding:20px 20px 18px; border-radius:24px; background:var(--c); color:#fff;
}
.pk-hero.is-locked { background:color-mix(in srgb, var(--c) 45%, #475569); }
.pk-hero-ico {
  display:flex; align-items:center; justify-content:center; width:64px; height:64px;
  border-radius:20px; background:#fff; font-size:36px; line-height:1;
}
.pk-hero-title { margin:2px 0 0; font-size:24px; line-height:1.2; font-weight:900; letter-spacing:-.3px; color:#fff; }
.pk-hero-title:focus { outline:none; }
.pk-hero-text { margin:0; font-size:16px; line-height:1.45; font-weight:700; color:#fff; }
.pk-hero-sub { margin:-4px 0 0; font-size:14px; line-height:1.45; color:#fff; }

.pk-steps { list-style:none; margin:4px 0 0; padding:0; width:100%; display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.pk-step { position:relative; padding-top:12px; font-size:12px; font-weight:800; color:#fff; }
.pk-step::before {
  content:""; position:absolute; left:0; right:0; top:0; height:6px; border-radius:999px; background:rgba(255,255,255,.32);
}
.pk-step.is-done::before { background:#fff; }
.pk-step.is-now::before { background:#FDE68A; } /* sloneczny: "tu jestes" */
.pk-step.is-now { text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:2px; }

.pk-go {
  width:100%; min-height:56px; margin-top:6px; padding:0 18px; border:0; border-radius:16px;
  background:#fff; color:var(--c); font-family:inherit; font-size:18px; font-weight:900; line-height:1.2; cursor:pointer;
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.12); transition:transform .12s, filter .15s;
}
.pk-go:hover { filter:brightness(.97); }
.pk-go:active { transform:translateY(2px); box-shadow:inset 0 -2px 0 rgba(0,0,0,.12); }
.pk-go:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.pk-hero.is-locked .pk-go { color:#334155; }
.pk-hero .ph-limit { width:100%; color:#fff; }
.pk-hero .ph-limit.is-out { background:#fff; color:#7C2D12; }

.pk-link {
  align-self:center; min-height:44px; padding:0 8px; border:0; background:none; cursor:pointer;
  font-family:inherit; font-size:14px; font-weight:800; color:var(--brand-ink);
  text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px;
}
.pk-link:focus-visible { outline:none; box-shadow:var(--focus-ring); border-radius:10px; }

/* Wskaznik opanowania poziomu (2026-11-10): jedna cienka linia nad karta, jezyna = poziomy i postep */
.pk-level { display:flex; flex-direction:column; gap:6px; padding:2px 4px 0; }
.pk-level-top { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.pk-level-name { font-size:15px; font-weight:900; color:var(--text); }
.pk-level-pct { font-size:15px; font-weight:900; color:var(--purple); font-variant-numeric:tabular-nums; }
.pk-level-bar { height:8px; border-radius:999px; background:var(--surface-2); overflow:hidden; box-shadow:inset 0 0 0 1px var(--border); }
.pk-level-fill { display:block; height:100%; min-width:0; border-radius:999px; background:var(--purple); transition:width .4s ease; }
.pk-level-sub { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:13px; line-height:1.4; color:var(--text2); }
.pk-level-link {
  min-height:32px; padding:0 4px; border:0; background:none; cursor:pointer;
  font-family:inherit; font-size:13px; font-weight:900; color:var(--purple);
  text-decoration:underline; text-underline-offset:3px;
}
.pk-level-link:focus-visible, .pk-hero-link:focus-visible { outline:none; box-shadow:var(--focus-ring); border-radius:8px; }
.pk-hero-link {
  align-self:center; min-height:44px; padding:0 8px; border:0; background:none; cursor:pointer;
  font-family:inherit; font-size:14px; font-weight:800; color:#fff;
  text-decoration:underline; text-underline-offset:3px;
}
@media (prefers-reduced-motion: reduce) { .pk-level-fill { transition:none; } }

/* Lista sytuacji: jedna pod druga, kazda ze swoim kolorem */
.pk-list { display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.pk-ch { display:flex; align-items:center; gap:8px; margin:12px 4px 2px; font-size:15px; font-weight:900; color:var(--text); }
.pk-tiles { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.pk-tile {
  --c:var(--brand-strong);
  display:flex; align-items:center; gap:12px; width:100%; min-height:68px; padding:10px 14px 10px 10px;
  border:2px solid transparent; border-radius:20px; background:var(--surface); box-shadow:var(--sh-card);
  font-family:inherit; color:var(--text); text-align:left; cursor:pointer; transition:transform .12s;
}
.pk-tile:hover { transform:translateY(-1px); }
.pk-tile:focus-visible { outline:none; box-shadow:var(--focus-ring); }
.pk-tile.is-sel { border-color:var(--c); }
.pk-tile-ico {
  flex-shrink:0; display:flex; align-items:center; justify-content:center; width:48px; height:48px;
  border-radius:16px; background:color-mix(in srgb, var(--c) 16%, var(--surface)); font-size:26px; line-height:1;
}
.pk-tile-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.pk-tile-title { font-size:16px; line-height:1.25; font-weight:800; }
.pk-tile-sub { font-size:13px; font-weight:700; color:var(--text2); }
.pk-tile.is-now .pk-tile-sub { color:var(--text); }
.pk-tile-mark {
  flex-shrink:0; display:flex; align-items:center; justify-content:center; width:32px; height:32px;
  border-radius:50%; font-size:15px; font-weight:900; color:#fff;
}
.pk-tile.is-done .pk-tile-mark { background:#15803D; }
.pk-tile.is-now .pk-tile-mark { background:var(--c); font-size:12px; }
.pk-tile.is-locked { background:transparent; box-shadow:0 0 0 1px var(--hairline); }
.pk-tile.is-locked .pk-tile-ico { opacity:.6; }
.pk-more {
  display:flex; flex-direction:column; align-items:flex-start; gap:6px; width:100%; padding:12px 14px;
  border:0; border-radius:20px; background:var(--surface-2); cursor:pointer; text-align:left; font-family:inherit;
}
.pk-more:focus-visible { outline:none; box-shadow:var(--focus-ring); }
.pk-more-ico { font-size:22px; letter-spacing:2px; line-height:1.2; }
.pk-more-text { font-size:14px; font-weight:700; color:var(--text2); }
.pk-tile.is-locked .pk-tile-title { color:var(--text2); }
.pk-tile.is-locked .pk-tile-mark { font-size:14px; filter:grayscale(1); opacity:.6; }
.pk-tile.is-locked.is-sel { border-color:var(--hairline); }

.ph-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.ph-limit { margin:0; font-size:13px; text-align:center; }
.ph-limit:empty { display:none; }
.ph-limit.is-out { padding:8px 10px; border-radius:12px; text-align:left; font-weight:700; }

.ph-foot { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:4px 14px; padding-top:8px; }
.ph-link {
  min-height:40px; padding:0 2px; border:0; background:none; cursor:pointer;
  font-family:inherit; font-weight:800; font-size:13px; line-height:1.2; color:var(--text2);
  text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px;
}
.ph-link:focus-visible { outline:none; box-shadow:var(--focus-ring); }
.ph-link[aria-pressed="true"] { color:var(--brand-ink); }
.ph-hint { font-size:12px; color:var(--text2); text-align:center; }

@media (max-width: 699px) {
  #path-home { gap:10px; padding:4px 0 12px; }
  .pk-hero { padding:18px 16px 16px; }
  .pk-hero-title { font-size:22px; }
}
@media (prefers-reduced-motion: reduce) {
  .pk-go, .pk-tile { transition:none; }
  .pk-tile:hover { transform:none; }
}

/* ── Rozmowa ze sciezki: odliczanie (js/learning-path.js::tick) i bez paska Rozmowa/Cwiczenie/Slowka/Fiszki ── */
.path-timer {
  align-self:center; margin:4px auto 0; padding:4px 14px; border-radius:999px;
  background:var(--brand-soft); color:var(--brand-ink);
  font-size:18px; font-weight:900; font-variant-numeric:tabular-nums; letter-spacing:.5px;
}
.path-timer[hidden] { display:none; }
.path-timer.is-low { background:var(--now-soft); color:var(--now-ink); }
body.gp-path #session-path { display:none !important; }
