/* ==========================================================================
   Blok „Tonery: sito testów jakości” (.t-test): kilka produktów wchodzi, testy przechodzi jeden.
   Źródło (prototyp): assets/css/podstrony/tonery.css (Sito testów + drobiazgi strony).
   Opóźnienie wiersza (--r) stoi w atrybucie style, więc wierszy może być 2–6.
   ========================================================================== */

.t-test { --section-y: clamp(3.5rem, 6.5vw, 6rem); border-top: 0; }
.t-test .shead { align-items: start; margin-bottom: clamp(2rem, 4vw, 3rem); }
.t-test.t-sep { padding-top: 0; }
.t-test.t-sep > .container::before {
  content: ""; display: block; grid-column: 1 / -1; height: 26px; margin-bottom: clamp(2.75rem, 5.5vw, 4.5rem);
  background:
    radial-gradient(circle, var(--orange) 0 4px, var(--orange-50) 4.5px 7px, #fff 7.5px 12px, transparent 12.5px) center / 26px 26px no-repeat,
    linear-gradient(90deg, rgba(203, 213, 224, 0), var(--line-strong) 28%, var(--line-strong) 72%, rgba(203, 213, 224, 0)) center / 100% 1px no-repeat;
}

.t-test .t-lab {
  margin: 0; font-family: var(--font-ui); font-weight: 500; font-size: .6875rem; line-height: 1.25;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2);
}
.t-test .t-note { margin: 1rem 0 0; font-family: var(--font-ui); font-weight: 500; font-size: .6875rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); text-align: right; }
.t-test .t-tile {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-50); color: var(--navy);
}
.t-test .t-tile .icon { width: 1.15rem; height: 1.15rem; }
/* the soft card of B: white, a hairline ring, a low navy shadow */
.t-test .t-sieve { background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -32px rgba(22, 42, 67, .4); }
/* an orange-50 callout with an orange disc (the closing line of a module) */
.t-test .t-gain {
  display: flex; align-items: center; gap: .9rem; margin: 1.5rem 0 0; padding: .9rem 1.25rem .9rem .9rem;
  border-radius: var(--radius-lg); background: var(--orange-50); box-shadow: inset 0 0 0 1px var(--orange-100);
  color: var(--navy-900); font-size: 1rem; line-height: 1.5; max-width: none;
}
.t-test .t-gain b { font-weight: 600; }
.t-test .t-gain__icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.t-test .t-gain__icon .icon { width: 1.05rem; height: 1.05rem; stroke-width: 2.2; }

/* --------------------------------------------------------------------------
   Sito testów
   -------------------------------------------------------------------------- */

.t-test__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem clamp(2rem, 5vw, 4.5rem); align-items: start; }
.t-sieve {
  --c1: 8.5rem; --gate: 3.25rem; --c5: 10rem;
  display: grid; position: relative; padding: clamp(1.25rem, 2.6vw, 2rem); border-radius: var(--radius-xl);
}
.t-sieve__heads, .t-sieve__row {
  display: grid; grid-template-columns: var(--c1) minmax(0, 1fr) var(--gate) minmax(0, 1fr) var(--c5); align-items: center;
}
.t-sieve__heads { margin-bottom: .9rem; align-items: end; }
.t-sieve__heads > :nth-child(2) { grid-column: 2 / 5; text-align: center; }
.t-sieve__heads > :nth-child(3) { grid-column: 5; padding-left: .25rem; }
.t-sieve__rows { grid-area: 2 / 1; list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.t-sieve__row { min-height: 46px; }
.t-sieve__cand {
  display: inline-flex; align-items: center; gap: .45rem; justify-self: start; position: relative; z-index: 1;
  padding: .45rem .85rem .45rem .6rem; border-radius: var(--radius-pill); background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-family: var(--font-ui); font-weight: 500; font-size: .9375rem; color: var(--navy-900); white-space: nowrap;
}
.t-sieve__cand .icon { width: 1.05rem; height: 1.05rem; color: var(--navy); }
.t-sieve__in { grid-column: 2 / 4; height: 2px; margin-left: -1px; border-radius: 2px; background: var(--line-strong); transform-origin: 0 50%; }
.t-sieve__out { grid-column: 4 / 6; display: flex; align-items: center; min-width: 0; }
.t-sieve__x {
  flex: none; width: 26px; height: 26px; margin-left: .55rem; border-radius: 50%; display: grid; place-items: center;
  background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted-2);
}
.t-sieve__x .icon { width: .8rem; height: .8rem; stroke-width: 2.4; }
.t-sieve .is-pass .t-sieve__cand { box-shadow: inset 0 0 0 1.5px var(--orange); }
.t-sieve .is-pass .t-sieve__in { height: 2.5px; background: var(--orange); }
.t-sieve__line { flex: 1; height: 2.5px; border-radius: 2px; background: var(--orange); transform-origin: 0 50%; }
.t-sieve__ok {
  flex: none; display: inline-flex; align-items: center; gap: .5rem; margin-left: -2px;
  padding: .35rem .85rem .35rem .35rem; border-radius: var(--radius-pill); background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--orange-100);
}
.t-sieve__ok b { font-family: var(--font-ui); font-weight: 600; font-size: .9375rem; color: var(--navy-900); white-space: nowrap; }
.t-sieve__tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; }
.t-sieve__tick .icon { width: .95rem; height: .95rem; stroke-width: 2.6; }
/* the gate lies over the rows, in the third column of the same cell */
.t-sieve__gate {
  grid-area: 2 / 1; position: relative; z-index: 2; align-self: stretch; justify-self: start;
  width: var(--gate); margin: -.5rem 0 -.5rem calc(var(--c1) + (100% - var(--c1) - var(--gate) - var(--c5)) / 2);
  border-radius: var(--radius-pill); display: grid; place-items: center;
  background: repeating-linear-gradient(180deg, rgba(35, 66, 105, .1) 0 1px, transparent 1px 9px), var(--navy-50);
  box-shadow: inset 0 0 0 1px var(--navy-100); color: var(--navy);
}
.t-sieve__gate .icon { width: 1.35rem; height: 1.35rem; padding: .45rem; box-sizing: content-box; border-radius: 50%; background: #fff; box-shadow: 0 6px 14px -8px rgba(22, 42, 67, .5); }
.t-sieve__back {
  display: flex; align-items: center; gap: .9rem; margin: 1.5rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; line-height: 1.55;
}
.t-sieve__loop { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange-ink); box-shadow: inset 0 0 0 1px var(--orange-100); }
.t-sieve__loop .icon { width: 1.1rem; height: 1.1rem; }
.t-sieve .t-note { margin-top: .75rem; }

/* the one authored moment: samples run to the gate, the others stop, one goes through
   (is-armed comes from view.js; without it the resting state is the end state) */
.t-sieve.is-armed .t-sieve__in { transform: scaleX(0); }
.t-sieve.is-armed .t-sieve__x { opacity: 0; transform: scale(.5); }
.t-sieve.is-armed .t-sieve__line { transform: scaleX(0); }
.t-sieve.is-armed .t-sieve__ok { opacity: 0; transform: translateX(-8px); }
.t-sieve.is-armed.is-on .t-sieve__in { transform: none; transition: transform .7s var(--ease) calc(var(--r, 0) * .12s); }
.t-sieve.is-armed.is-on .t-sieve__x { opacity: 1; transform: none; transition: opacity .3s ease calc(.75s + var(--r, 0) * .12s), transform .5s var(--ease) calc(.75s + var(--r, 0) * .12s); }
.t-sieve.is-armed.is-on .t-sieve__line { transform: none; transition: transform .7s var(--ease) 1.1s; }
.t-sieve.is-armed.is-on .t-sieve__ok { opacity: 1; transform: none; transition: opacity .4s ease 1.55s, transform .6s var(--ease) 1.55s; }

/* goals: hairline rows with icon tiles, closed by the gain callout */
.t-test__side h3 { font-size: 1.25rem; margin: .25rem 0 1rem; }
.t-goals { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.t-goals li {
  display: flex; align-items: center; gap: .9rem; padding: .6rem 0; border-bottom: 1px solid var(--line);
  font-size: 1.0625rem; font-weight: 500; line-height: 1.35; color: var(--navy-900);
}

@media (max-width: 900px) {
  .t-test__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .t-sieve { --c1: 6rem; --gate: 2.25rem; --c5: 8.25rem; padding: 1.1rem 1rem 1.15rem; }
  .t-sieve__cand { padding: .4rem .7rem; }
  .t-sieve__cand .icon { display: none; }
  .t-sieve__ok { padding-right: .7rem; gap: .4rem; }
  .t-sieve__tick { width: 24px; height: 24px; }
  .t-sieve__x { margin-left: .4rem; }
  .t-sieve__gate .icon { width: 1.05rem; height: 1.05rem; padding: .3rem; }
  .t-sieve__back { align-items: flex-start; }
  .t-sieve__heads .t-lab { letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  .t-sieve.is-armed .t-sieve__in, .t-sieve.is-armed .t-sieve__line { transform: none; }
  .t-sieve.is-armed .t-sieve__x, .t-sieve.is-armed .t-sieve__ok { opacity: 1; transform: none; }
}
