/* warianty układu prac: A = siatka, B = indeks (ładowane przed style.css, więc korzystają z jego zmiennych) */
.aiimg{padding:0 0 clamp(90px,10vw,130px)}
.aiimg .strip{margin-top:0}

/* A */
.wk-grid{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:56px 24px}
.wk a{display:flex;flex-direction:column;gap:10px;text-decoration:none;color:var(--on-dark)}
.wk-art{display:block;aspect-ratio:4/3;border-radius:var(--r);overflow:hidden;background:var(--dark-2);margin-bottom:10px}
.wk-art img,.wk-art video{width:100%;height:100%;object-fit:cover;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.wk a:hover .wk-art img,.wk a:hover .wk-art video{transform:scale(1.03)}
.wk-tags{display:flex;flex-wrap:wrap;gap:6px}
.wk-tags span,.ix-tags span{font-size:12px;padding:4px 11px;border-radius:99px;border:1px solid var(--line-d);color:var(--muted-d)}
.wk-t{font-size:clamp(22px,2.1vw,28px);font-weight:500;line-height:1.2}
.wk a:hover .wk-t{color:var(--lime)}
.wk-d{color:var(--muted-d);font-size:15px;max-width:520px}
.wk-all a{justify-content:flex-end;aspect-ratio:4/3;border-radius:var(--r);background:var(--lime);color:var(--ink);padding:32px}
.wk-all .wk-t{font-size:clamp(28px,2.8vw,38px)}
.wk-all a:hover .wk-t{color:var(--ink)}
.wk-all .wk-d{color:var(--ink-2)}
.wk-go{font-weight:600;font-size:15px;margin-top:6px}

/* B */
.ix{display:grid;grid-template-columns:1.25fr 1fr;gap:56px;align-items:start}
.ix-list{list-style:none;border-top:1px solid var(--line-d)}
.ix-row a{display:grid;grid-template-columns:44px 1fr auto 24px;align-items:center;gap:16px;padding:24px 0;border-bottom:1px solid var(--line-d);text-decoration:none;color:var(--on-dark)}
.ix-thumb{display:none}
.ix-n{font-size:13px;color:var(--muted-d)}
.ix-main{display:flex;flex-direction:column;gap:2px}
.ix-t{font-size:clamp(22px,2.3vw,30px);font-weight:500;line-height:1.15;transition:color .2s ease}
.ix-d{font-size:14.5px;color:var(--muted-d)}
.ix-tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:220px}
.ix-arr{transition:transform .2s ease,color .2s ease;color:var(--muted-d)}
.ix-row.act .ix-t,.ix-row a:hover .ix-t{color:var(--lime)}
.ix-row.act .ix-arr{transform:translateX(4px);color:var(--lime)}
.ix-preview{position:sticky;top:40px;aspect-ratio:4/5;border-radius:var(--r);overflow:hidden;background:var(--dark-2)}
.ix-pv{position:absolute;inset:0;opacity:0;transition:opacity .35s ease}
.ix-pv.on{opacity:1}
.ix-pv img,.ix-pv video{width:100%;height:100%;object-fit:cover}
.ix-all{display:inline-block;margin-top:32px;color:var(--lime);font-weight:600;text-decoration:none}

@media (max-width:1020px){
  .ix{grid-template-columns:1fr}
  .ix-preview{display:none}
  .ix-row a{grid-template-columns:96px 1fr 20px}
  .ix-n,.ix-tags{display:none}
  .ix-thumb{display:block;aspect-ratio:1;border-radius:12px;overflow:hidden}
  .ix-thumb img,.ix-thumb video{width:100%;height:100%;object-fit:cover}
}
@media (max-width:760px){
  .wk-grid{grid-template-columns:1fr;gap:44px}
}
/* 6 prac + karta „All” na pełną szerokość */
.wk-grid .wk-all{grid-column:1/-1}
.wk-all a{aspect-ratio:auto;min-height:220px;flex-direction:row;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 40px}
.wk-all .wk-d{flex:1 1 260px}
/* nieparzysta liczba prac: karta „All” zajmuje wolne miejsce obok ostatniej pracy */
@media (min-width:761px){
  .wk-grid .wk:nth-child(odd):nth-last-child(2) + .wk-all{grid-column:auto}
  .wk-grid .wk:nth-child(odd):nth-last-child(2) + .wk-all a{height:100%;min-height:0;flex-direction:column;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-end;gap:10px}
  .wk-grid .wk:nth-child(odd):nth-last-child(2) + .wk-all .wk-d{flex:0 0 auto}
}
