/* nova:tms Lifted — Instrukcje interaktywne
   Układ: zrzut ekranu (scena) po lewej, panel kroku po prawej, nawigacja na dole. */
:root {
  --ink: #12263a;          /* granat z nagłówków Lifted */
  --ink-2: #4a5d70;        /* tekst pomocniczy */
  --line: #dde4ec;         /* obramowania */
  --paper: #f3f6f9;        /* tło strony */
  --card: #ffffff;         /* panele */
  --accent: #2f6fd0;       /* niebieski przycisków Lifted */
  --accent-soft: #e6effb;
  --new: #0f8a5f;          /* znacznik „Nowe w Lifted” */
  --new-soft: #e3f5ee;
  --warn-soft: #fff4e0;
  --warn-ink: #7a4b00;
  --dim: rgba(9, 22, 38, .58);
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7eef6; --ink-2: #a9b8c8; --line: #2a3a4c; --paper: #0e1824; --card: #152231;
    --accent: #6aa3f2; --accent-soft: #1b3150; --new: #4fd1a0; --new-soft: #12342a;
    --warn-soft: #3a2c12; --warn-ink: #f3c879; --dim: rgba(2, 8, 16, .66); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e7eef6; --ink-2: #a9b8c8; --line: #2a3a4c; --paper: #0e1824; --card: #152231;
  --accent: #6aa3f2; --accent-soft: #1b3150; --new: #4fd1a0; --new-soft: #12342a;
  --warn-soft: #3a2c12; --warn-ink: #f3c879; --dim: rgba(2, 8, 16, .66); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- pasek górny ---------- */
.tp-top {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.tp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; }
.tp-brand svg { width: 26px; height: 26px; flex: none; }
.tp-brand b { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.tp-brand small { color: var(--ink-2); font-weight: 500; }
.tp-title { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-title span { color: var(--ink-2); font-family: var(--font-body); font-weight: 400; font-size: 14px; margin-left: 8px; }
.tp-tools { display: flex; gap: 8px; }
.tp-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid var(--line); background: var(--card); border-radius: 8px; cursor: pointer; font-size: 14px;
  color: var(--ink); text-decoration: none;
}
.tp-btn:hover { border-color: var(--accent); }
.tp-btn svg { width: 16px; height: 16px; }

/* ---------- postęp ---------- */
.tp-progress { display: flex; gap: 3px; padding: 0 20px; height: 5px; background: var(--card); }
.tp-progress i { flex: 1; background: var(--line); border-radius: 3px; transition: background .25s; }
.tp-progress i.done { background: var(--accent); }
.tp-progress i.now { background: var(--accent); opacity: .55; }

/* ---------- układ ---------- */
.tp-main {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px;
  padding: 20px; max-width: 1640px; margin: 0 auto;
}
.tp-stage-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tp-stage {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); background: #e9eef4; border: 1px solid var(--line);
  box-shadow: 0 12px 32px -18px rgba(18, 38, 58, .45);
}
.tp-cam { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .6s cubic-bezier(.3,.7,.2,1); }
.tp-cam img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; }
.tp-cam img.fade { animation: tpfade .35s ease; }
@keyframes tpfade { from { opacity: .35; } to { opacity: 1; } }
.tp-spot {
  position: absolute; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px var(--dim);
  transition: all .5s cubic-bezier(.3,.7,.2,1);
}
.tp-spot.off { box-shadow: 0 0 0 0 transparent, 0 0 0 9999px rgba(0,0,0,0); }
.tp-marker {
  position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: var(--accent); color: #fff; font: 600 14px/30px var(--font-display); text-align: center;
  transition: left .5s cubic-bezier(.3,.7,.2,1), top .5s cubic-bezier(.3,.7,.2,1), opacity .3s;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.tp-marker::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent);
  animation: tppulse 1.8s ease-out infinite;
}
@keyframes tppulse { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.tp-marker.off { opacity: 0; }
.tp-caption { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); font-size: 13px; }
.tp-caption kbd, .tp-panel kbd {
  font: 600 12px/1 var(--font-body); padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; background: var(--card); color: var(--ink);
}

/* ---------- panel kroku ---------- */
.tp-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px; min-height: 100%;
}
.tp-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tp-count { color: var(--accent); }
.tp-new { background: var(--new-soft); color: var(--new); padding: 3px 8px; border-radius: 999px; letter-spacing: .02em; text-transform: none; font-size: 12px; }
.tp-panel h2 { margin: 0; font: 600 22px/1.25 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.tp-body { margin: 0; color: var(--ink); }
.tp-body p { margin: 0 0 10px; }
.tp-body ul { margin: 0 0 10px; padding-left: 18px; }
.tp-body li { margin: 3px 0; }
.ui { /* nazwa elementu interfejsu */
  display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: .94em; white-space: nowrap;
}
.tp-do { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 12px; border-radius: 0 8px 8px 0; }
.tp-do b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.tp-tip { background: var(--warn-soft); color: var(--warn-ink); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.tp-tip b { font-weight: 600; }
.tp-spacer { flex: 1; }

.tp-nav { display: flex; align-items: center; gap: 10px; }
.tp-nav .tp-prev, .tp-nav .tp-next {
  flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600;
}
.tp-nav .tp-next { background: var(--accent); border-color: var(--accent); color: #fff; }
.tp-nav button:disabled { opacity: .4; cursor: default; }
.tp-nav svg { width: 16px; height: 16px; }

/* ---------- spis kroków ---------- */
.tp-toc {
  position: fixed; inset: 0 auto 0 0; width: min(380px, 92vw); background: var(--card); z-index: 40;
  border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .3s; overflow: auto; padding: 18px 18px 30px;
}
.tp-toc.open { transform: none; box-shadow: 0 0 0 9999px rgba(9,22,38,.35); }
.tp-toc h3 { margin: 18px 0 6px; font: 600 12px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tp-toc ol { list-style: none; margin: 0; padding: 0; }
.tp-toc button { width: 100%; text-align: left; display: flex; gap: 10px; padding: 7px 8px; border: 0; background: none; border-radius: 7px; cursor: pointer; }
.tp-toc button:hover { background: var(--paper); }
.tp-toc button.cur { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tp-toc button span { width: 22px; flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tp-toc-head { display: flex; justify-content: space-between; align-items: center; }
.tp-toc-head b { font-family: var(--font-display); font-size: 17px; }

/* ---------- ekran końcowy ---------- */
.tp-end { display: grid; gap: 10px; }
.tp-end a.card { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.tp-end a.card:hover { border-color: var(--accent); }
/* tryb osadzony w nova:tms (aplikacja NRC, T.embed): nawigacja ukryta do nrc:hello, linki zewnętrzne zawsze ukryte */
.tp-embed:not(.tp-linked) .tp-brand { visibility: hidden; }
.tp-embed:not(.tp-linked) .tp-home, .tp-embed:not(.tp-linked) .tp-end { display: none; }
.tp-embed .tp-end a.card[data-external] { display: none; }
.tp-end a.card small { display: block; color: var(--ink-2); }

@media (max-width: 1080px) {
  .tp-main { grid-template-columns: 1fr; padding: 16px; }
  .tp-panel { min-height: 0; }
  .tp-title span { display: none; }
}
@media (max-width: 560px) {
  .tp-top { padding: 10px 16px; gap: 10px; }
  .tp-brand small, .tp-btn .lbl { display: none; }
  .tp-progress { padding: 0 16px; }
  .tp-panel h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .tp-cam, .tp-spot, .tp-marker, .tp-toc { transition: none; }
  .tp-marker::after, .tp-cam img.fade { animation: none; }
}
