/* ---------------------------------------------------------------------------
   deck.css — motyw „Panel".

   Scena ma stałe 1920×1080 px i jest skalowana transformem do okna, więc
   wszystkie rozmiary poniżej to piksele slajdu, nie ekranu.

   Układ: lewy rail (akt + źródło) i kolumna treści, tło z siatki kropek,
   etykiety i liczby monospace, wykresy czytają kolory z var(--*).

   Kolory projektów (tylko znaczniki: linie, słupki — tekst zostaje w atramencie):
     GMKtec  #1f66c9   ratsnets  #e0452a   lutllm  #0f8f63
   Status (znaczy dobrze/źle, zawsze z ikoną i etykietą):
     good #0f7a2e   critical #c62f22
   --------------------------------------------------------------------------- */

:root {
  --surface: #f6f7f8;
  --plane: #eaecee;
  --card: #ffffff;
  --ink: #0d1014;
  --ink-2: #404952;
  --muted: #77818c;
  --grid: #d8dde2;
  --axis: #b6bfc8;
  --ring: rgba(13, 16, 20, 0.09);

  --gmk: #1f66c9;
  --rn: #e0452a;
  --ll: #0f8f63;
  --good: #0f7a2e;
  --critical: #c62f22;
  --good-ink: #0b5a22;

  --project: var(--ink);

  --sans: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Noto Sans Mono', ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: #0d1014;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* --- scena ------------------------------------------------------------------ */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

body.notes-open .stage {
  right: 32vw;
}

.viewport {
  position: relative;
  overflow: hidden;
}

.canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: 50% 50%;
  background: var(--surface);
}

/* --- slajd ------------------------------------------------------------------ */

.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 76px 104px 66px 420px;
  font-size: 32px;
  line-height: 1.42;
  background-image: radial-gradient(circle, rgba(13, 16, 20, 0.07) 1.2px, transparent 1.6px);
  background-size: 36px 36px;
}

/* linia oddzielająca rail od treści */
.slide::before {
  content: '';
  position: absolute;
  left: 372px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--grid);
}

.slide.is-active {
  display: flex;
}

.slide[data-project='gmk'] {
  --project: var(--gmk);
}
.slide[data-project='rn'] {
  --project: var(--rn);
}
.slide[data-project='ll'] {
  --project: var(--ll);
}

.slide__act {
  position: absolute;
  left: 104px;
  top: 80px;
  width: 236px;
  display: block;
  margin: 0;
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.slide__act::before {
  content: '';
  display: block;
  width: 26px;
  height: 3px;
  margin-bottom: 12px;
  background: var(--project);
}

.slide__tag {
  position: absolute;
  left: 104px;
  top: 138px;
  width: 236px;
  display: block;
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.slide__title {
  margin: 0 0 38px;
  max-width: 1360px;
  font-size: 62px;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.slide__body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.slide__body > p {
  margin: 0 0 24px;
}

.slide__source {
  position: absolute;
  left: 104px;
  bottom: 66px;
  width: 236px;
  margin: 0;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.45;
  color: var(--muted);
}

.slide__source code {
  font-size: inherit;
}

.slide__source a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 2px;
}

.slide__backup {
  position: absolute;
  top: 40px;
  right: 60px;
  margin: 0;
  padding: 6px 16px;
  border: 2px solid var(--axis);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--muted);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

/* --- helper prelegenta w raile ---------------------------------------------- */

.slide__helper {
  position: absolute;
  left: 104px;
  bottom: 150px;
  width: 236px;
  padding-top: 14px;
  border-top: 1px solid var(--grid);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}

.slide__helper b {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.slide__helper ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.slide__helper li + li {
  margin-top: 2px;
}

.slide__helper a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 2px;
}

/* --- kroki ------------------------------------------------------------------ */

[data-step] {
  opacity: 0;
}

[data-step].is-shown {
  opacity: 1;
}

/* element „ściszony", gdy nie jest już bieżącym krokiem */
[data-step].dim-after.is-shown:not(.is-current) {
  opacity: 0.35;
}

/* --- układy -------------------------------------------------------------------- */

/* tytułowy */
.slide--title {
  padding: 0;
  flex-direction: row;
}

.slide--title::before {
  display: none;
}

.slide--title .slide__body {
  flex-direction: column;
  justify-content: center;
  padding: 0 96px 170px;
}

.title-copy {
  display: flex;
  flex-direction: column;
}

.title-copy h1 {
  margin: 0 0 44px;
  font-size: 148px;
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.title-copy p {
  margin: 0 0 16px;
  font-size: 34px;
  color: var(--ink-2);
  max-width: 1100px;
}

.title-copy .who {
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* przypis na dole slajdu tytułowego */
.title-note {
  position: absolute;
  left: 96px;
  right: 96px;
  bottom: 60px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--grid);
  font-size: 23px;
  line-height: 1.4;
  color: var(--ink-2);
}

.title-note p {
  margin: 0;
  max-width: 1180px;
}

.title-note b {
  color: var(--ink);
}

.title-note .src {
  font-family: var(--mono);
  font-size: 17px;
  color: var(--muted);
  white-space: nowrap;
}

.title-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* zdanie na cały slajd */
.slide--statement .slide__body {
  justify-content: flex-start;
}

.big {
  margin: 0;
  font-size: 92px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.big .soft {
  color: var(--muted);
}

.mark {
  border-bottom: 4px solid var(--project);
  padding: 0;
}

.lead {
  margin: 0;
  font-size: 40px;
  line-height: 1.25;
  color: var(--ink-2);
  text-wrap: pretty;
}

.small {
  font-size: 27px;
  color: var(--ink-2);
}

.muted {
  color: var(--muted);
}

.x {
  text-decoration: line-through;
  text-decoration-thickness: 4px;
  color: var(--muted);
}

/* lista rzeczy, które już były */
.x-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.x-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--grid);
  font-size: 58px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 5px;
}

.x-list li:last-child {
  border-bottom: 0;
}

/* dwie kolumny */
.split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: stretch;
}

.split--wide-left {
  grid-template-columns: 1.4fr 1fr;
}

.split--wide-right {
  grid-template-columns: 1fr 1.4fr;
}

.split > * {
  min-height: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* zdjęcia */
.photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.photo--cover {
  object-fit: cover;
}

.frame {
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 0 1px var(--grid);
}

.caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--muted);
}

/* miejsce na zdjęcie, którego jeszcze nie ma */
.ph {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 1px dashed var(--axis);
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(11, 11, 11, 0.025) 18px 36px);
  font-family: var(--mono);
  font-size: 26px;
  line-height: 1.35;
  text-align: center;
  color: var(--muted);
}

.ph::before {
  content: 'FOTO\a';
  white-space: pre;
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--ink-2);
}

/* liczby */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
}

.stat__v {
  display: block;
  font-family: var(--mono);
  font-size: 104px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat__v small {
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 8px;
}

.stat__l {
  display: block;
  margin-top: 12px;
  font-size: 25px;
  line-height: 1.3;
  color: var(--ink-2);
  max-width: 520px;
}

.hero {
  font-size: 300px;
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.045em;
}

/* karty */
.cards {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 24px;
}

.card {
  position: relative;
  padding: 28px 30px;
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: 0;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 27px;
  line-height: 1.3;
  color: var(--ink-2);
}

.card .k {
  display: block;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card--muted {
  background: transparent;
  border: 1px dashed var(--grid);
}

.card--muted h3,
.card--muted p {
  color: var(--muted);
}

/* statusy: zawsze ikona + etykieta */
.ok,
.fail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.ok::before,
.fail::before {
  display: inline-grid;
  place-items: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  color: #fff;
  font-size: 0.8em;
}

.ok {
  color: var(--good-ink);
}

.ok::before {
  content: '✓';
  background: var(--good);
}

.fail {
  color: var(--critical);
}

.fail::before {
  content: '✕';
  background: var(--critical);
}

/* chipy */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 26px;
  border: 1px solid var(--grid);
  background: var(--card);
  font-family: var(--mono);
  font-size: 30px;
  white-space: nowrap;
}

.chip small {
  font-size: 22px;
  color: var(--muted);
}

/* wariant ciasny: cztery nazwy w jednej linii na dole slajdu */
.chips--compact {
  flex-wrap: nowrap;
  gap: 18px;
}

.chips--compact .chip {
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 24px;
  line-height: 1;
}

.chips--compact .chip small {
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.chips--compact .arrow {
  font-size: 30px;
}

.chip--project::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--project);
}

.chip--x {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 3px;
}

.arrow {
  font-size: 40px;
  color: var(--muted);
}

/* przepływ (pipeline) */
.flow {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.flow__step {
  flex: 1;
  position: relative;
  padding: 28px 30px;
  margin-right: 56px;
  background: var(--card);
  border: 1px solid var(--grid);
  font-size: 30px;
  line-height: 1.25;
}

.flow__step:last-child {
  margin-right: 0;
}

.flow__step::after {
  content: '→';
  position: absolute;
  right: -46px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  color: var(--muted);
}

.flow__step:last-child::after,
.stack > .flow__step::after {
  content: none;
}

.flow__step b {
  display: block;
  margin-bottom: 6px;
  font-size: 34px;
}

.flow__step .eq {
  font-family: var(--mono);
  color: var(--good-ink);
}

.flow--eq .flow__step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 22px 20px;
  margin-right: 40px;
  font-size: 25px;
  line-height: 1.3;
}

.flow--eq .flow__step b {
  margin-bottom: 8px;
  font-size: 27px;
}

.flow--eq .flow__step::after {
  content: '=';
  right: -29px;
  font-family: var(--mono);
  font-weight: 400;
  color: var(--muted);
  font-size: 30px;
}

.flow--eq .flow__step:last-child::after {
  content: none;
}

/* cytat */
.quote {
  margin: 0;
  font-size: 76px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.quote::before {
  content: '„';
  color: var(--project);
}

.quote::after {
  content: '”';
  color: var(--project);
}

.cite {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 24px;
  color: var(--muted);
}

/* terminal — jedyna ciemna wyspa */
.term {
  margin: 0;
  padding: 36px 44px;
  background: #121211;
  color: #e9e8e2;
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1.35;
  white-space: pre;
  overflow: hidden;
}

.term .p {
  color: #6fd08c;
  font-weight: 700;
}

.term .c {
  color: #fff;
}

.term .d {
  color: #8f8e87;
}

.term .hl {
  color: #111;
  background: #f2d45c;
  padding: 0 6px;
}

/* ćwiartka „dane × cel" */
.quad {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  padding: 0 0 56px 64px;
}

.quad__cell {
  position: relative;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--grid);
  font-size: 28px;
  line-height: 1.25;
  color: var(--ink-2);
}

.quad__cell b {
  display: block;
  color: var(--ink);
  font-size: 32px;
  margin-bottom: 6px;
}

.quad__cell--worst {
  background: #fbefe9;
}

.quad__axis {
  position: absolute;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.quad__axis--x {
  left: 64px;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.quad__axis--y {
  left: 0;
  top: 0;
  bottom: 56px;
  width: 56px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  justify-content: space-between;
}

.pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 12px;
  background: var(--card);
  border: 1px solid var(--grid);
  font-family: var(--mono);
  font-size: 26px;
  color: var(--ink);
  white-space: nowrap;
}

.pin::before {
  content: '';
  width: 22px;
  height: 22px;
  background: var(--c);
}

/* tory zawężania zakresu */
.lanes {
  display: grid;
  grid-template-columns: 250px repeat(4, 1fr);
  gap: 0;
  font-size: 28px;
}

.lanes > div {
  padding: 18px 20px;
  border-bottom: 2px solid var(--grid);
  line-height: 1.2;
}

.lanes .h {
  font-family: var(--mono);
  font-size: 24px;
  color: var(--muted);
  border-bottom-color: var(--axis);
}

.lanes .r {
  font-weight: 650;
}

.lanes .same {
  color: var(--muted);
}

.lanes .chg {
  font-weight: 650;
}

.lanes .why {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
}

/* lista „rzeczy, o których nie wiedziałem" */
.cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  align-content: flex-start;
}

.cloud .chip {
  font-size: 28px;
}

/* --- wykresy ----------------------------------------------------------------- */

.comic {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.comic img {
  max-width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: contain;
  object-position: left center;
  align-self: flex-start;
}

.comic figcaption {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--muted);
}

.comic a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wykres {
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.wykres--img img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.wykres svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  font-family: var(--sans);
}

.wykres .empty {
  font-family: var(--mono);
  font-size: 26px;
  color: var(--muted);
}

/* --- HUD --------------------------------------------------------------------- */

.hud {
  position: fixed;
  right: 18px;
  bottom: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  mix-blend-mode: difference;
  pointer-events: none;
}

.hud__bar {
  width: 90px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.hud__bar-fill {
  height: 100%;
  width: 0;
  background: rgba(255, 255, 255, 0.7);
}

body.hud-hidden .hud {
  display: none;
}

/* --- notatki w jednym oknie ---------------------------------------------------- */

.notes {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32vw;
  overflow: auto;
  padding: 28px 30px;
  background: #fffef9;
  border-left: 1px solid var(--grid);
  font-size: 19px;
  line-height: 1.5;
  z-index: 4;
}

.notes p {
  margin: 0 0 12px;
}

.is-empty {
  color: var(--muted);
}

/* --- widok prelegenta ------------------------------------------------------------ */

body.is-presenter {
  background: #111;
  color: #eee;
}

.presenter {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  grid-template-rows: auto 1fr 1fr;
  gap: 16px;
  padding: 16px;
}

.presenter__bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 28px;
  font-family: var(--mono);
  font-size: 20px;
}

.presenter__timer {
  margin-left: auto;
  font-size: 40px;
  font-weight: 700;
}

.presenter__plan {
  color: #aaa;
}

.presenter__plan[data-delta='late'] {
  color: #ff8a7a;
}

.presenter__plan[data-delta='ok'] {
  color: #8fe0a0;
}

.presenter__current {
  grid-row: 2 / 4;
  display: flex;
}

.presenter__current .viewport,
.presenter__next .viewport {
  flex: 1;
  border-radius: 8px;
  background: #000;
}

.presenter__next {
  display: flex;
  flex-direction: column;
}

.presenter__label {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 15px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.presenter__notes {
  overflow: auto;
  padding: 16px 20px;
  border-radius: 8px;
  background: #1c1c1b;
  font-size: 24px;
  line-height: 1.45;
}

.presenter__notes p {
  margin: 0 0 12px;
}

/* --- pomoc ---------------------------------------------------------------------- */

.help {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.help__panel {
  width: min(640px, 92vw);
  padding: 28px 32px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
}

.help__panel h2 {
  margin: 0 0 16px;
}

.help__keys {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
}

.help__keys dt {
  font-family: var(--mono);
  font-weight: 700;
}

.help__keys dd {
  margin: 0;
}

.help__hint {
  margin: 18px 0 0;
  color: var(--ink-2);
}

/* --- druk / PDF: slajd = strona 1920×1080, wszystkie kroki widoczne -------------- */

@page {
  size: 1920px 1080px;
  margin: 0;
}

@media print {
  html,
  body {
    height: auto;
    overflow: visible;
    background: var(--surface);
  }

  .stage,
  .canvas {
    position: static;
    transform: none !important;
    width: auto;
    height: auto;
  }

  .hud,
  .notes,
  .help,
  .presenter {
    display: none !important;
  }

  .slide {
    position: relative;
    display: flex !important;
    width: 1920px;
    height: 1080px;
    page-break-after: always;
    break-after: page;
    background: var(--surface);
  }

  [data-step] {
    opacity: 1 !important;
    transition: none;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-step] {
    transition: none;
  }
}
