/* ==========================================================================
   Blok „Eksplorator pytań” (.ask): pytania po lewej, odpowiedź na białej karcie po prawej
   (pod nią wystają kartki kolejnych pytań). Na telefonie akordeon; bez JS wszystkie
   odpowiedzi widoczne pod pytaniami.
   Źródło (prototyp): assets/css/strona-b.css – „Eksplorator pytań”. Zmiany: liczba pytań
   z atrybutu (--n) zamiast stałych sześciu, kartki pod spodem liczone od końca listy.
   ========================================================================== */

.ask { padding: clamp(4rem, 8vw, 7.5rem) 0; }
/* the eyebrow takes its own row, so the intro on the right starts level with the title */
.ask__head {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: start; margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem);
}
.ask__head > .eyebrow.eyebrow { grid-column: 1 / -1; margin: 0; }
.ask__head h2 { margin: 0; max-width: 17ch; }
.ask__intro p { margin: 0 0 .75rem; color: var(--muted); font-size: 1.0625rem; max-width: 54ch; }
.ask__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.4rem; }

.ask__body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-auto-rows: auto;
  column-gap: clamp(1.25rem, 3vw, 2.5rem); row-gap: 6px; align-items: start;
}
.ask__item { display: contents; }
.ask__q { grid-column: 1; margin: 0; font: inherit; position: relative; }
/* the thread between the question numbers: done up to the open one */
.ask__q::before {
  content: ""; position: absolute; left: 33px; top: 50%; height: calc(100% + 6px); width: 2px;
  background: var(--line); border-radius: 2px; z-index: 0;
}
.ask__item:last-child .ask__q::before { display: none; }
.ask__item.is-done .ask__q::before { background: var(--orange); }
.ask__btn {
  position: relative; z-index: 1; width: 100%;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 32px; align-items: center; gap: .9rem;
  padding: .8rem .9rem .8rem 12px; margin: 0; border: 0; border-radius: 18px; background: transparent;
  font: inherit; color: var(--navy-900); text-align: left; cursor: pointer;
  transition: background-color .25s, box-shadow .4s var(--ease);
}
.ask__btn:hover { background: var(--paper-2); }
.ask__ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy-50); color: var(--navy); box-shadow: 0 0 0 4px #fff;
  transition: background-color .3s, color .3s;
}
.ask__ico .icon { width: 1.25rem; height: 1.25rem; }
.ask__item.is-done .ask__ico { color: var(--orange-ink); }
.ask__text { display: grid; gap: .15rem; min-width: 0; }
.ask__num { font-family: var(--font-ui); font-size: .75rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
.ask__qt { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; text-wrap: pretty; }
.ask__chev {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--navy);
  transition: background-color .3s, color .3s, transform .4s var(--ease);
}
.ask__chev .icon { width: 1rem; height: 1rem; transform: rotate(-90deg); }
.ask__item.is-open .ask__btn { background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float); }
.ask__item.is-open .ask__ico { background: var(--orange); color: #fff; box-shadow: 0 0 0 4px #fff, 0 8px 18px -8px rgba(236, 110, 40, .9); }
.ask__item.is-open .ask__num { color: var(--orange-ink); }
.ask__item.is-open .ask__chev { background: var(--navy-900); color: #fff; }

.ask__panel {
  grid-column: 2; grid-row: 1 / span var(--n, 6); display: grid; align-self: stretch;
  padding-bottom: 18px; /* room for the sheets showing under the card */
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s .6s;
}
.ask__item.is-open .ask__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ask__inner { min-height: 0; display: grid; }
/* a white sheet in a thin frame; the questions still ahead show as sheets underneath,
   two while there are two or more left, one before the last, none on the last */
.ask__card {
  --sheet: var(--line-strong);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  padding: clamp(1.75rem, 3.5vw, 3rem);
  border-radius: var(--radius-xl); color: var(--text);
  background: radial-gradient(55% 50% at 100% 0%, rgba(248, 120, 49, .07), rgba(248, 120, 49, 0) 70%), #fff;
  box-shadow:
    inset 0 0 0 1px var(--sheet),
    0 9px 0 -5px #fff, 0 9px 0 -4px var(--sheet),
    0 18px 0 -10px #fff, 0 18px 0 -9px var(--sheet);
}
.ask__item:nth-last-child(2) .ask__card { box-shadow: inset 0 0 0 1px var(--sheet), 0 9px 0 -5px #fff, 0 9px 0 -4px var(--sheet); }
.ask__item:last-child .ask__card { box-shadow: inset 0 0 0 1px var(--sheet); }
/* the topic's icon, drawn large and quiet in the corner */
.ask__mark { position: absolute; z-index: -1; right: -3.25rem; bottom: -3.75rem; width: 15rem; height: 15rem; color: var(--navy); opacity: .05; }
.ask__mark .icon { width: 100%; height: 100%; stroke-width: 1.2; }
.ask__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ask__count { margin: 0; font-family: var(--font-ui); font-size: .8125rem; font-weight: 500; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.ask__count b { color: var(--orange-ink); font-weight: 600; }
.ask__nav { display: flex; gap: 8px; }
.ask__nav button {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 0; background: #fff; color: var(--navy-900); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color .25s, color .25s, box-shadow .25s, transform .3s var(--ease);
}
.ask__nav button:hover { background: var(--navy-900); color: #fff; box-shadow: inset 0 0 0 1px var(--navy-900); }
.ask__nav button:active { transform: scale(.94); }
.ask__nav .icon { width: 1.1rem; height: 1.1rem; }
.ask__big {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 1rem; max-width: 24ch;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); font-weight: 600; line-height: 1.15; letter-spacing: -.028em; color: var(--navy-900);
  text-wrap: balance;
}
.ask__a { margin: 0 0 2rem; max-width: 58ch; color: var(--text); font-size: 1.0625rem; line-height: 1.65; }
.ask__go { margin-top: auto; align-self: flex-start; }

@media (max-width: 1100px) {
  .ask__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 900px) {
  .ask__body { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .ask__item { display: block; }
  .ask__q::before { display: none; }
  .ask__panel {
    grid-row: auto; grid-column: auto; grid-template-rows: 0fr; transform: none; padding-bottom: 0;
    transition: grid-template-rows .5s var(--ease), opacity .35s, visibility 0s .5s;
  }
  .ask__item.is-open .ask__panel { grid-template-rows: 1fr; }
  .ask__inner { overflow: hidden; }
  .ask__card, .ask__item:nth-child(n) .ask__card { margin-top: 8px; padding: 1.5rem 1.35rem; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--sheet); }
  .ask__big, .ask__nav { display: none; }
  .ask__a { margin: 1rem 0 1.5rem; }
  .ask__item.is-open .ask__chev { transform: rotate(90deg); }
}
.no-js .ask__body { grid-template-columns: minmax(0, 1fr); }
.no-js .ask__item { display: block; }
.no-js .ask__panel { grid-column: auto; grid-row: auto; opacity: 1; visibility: visible; transform: none; margin: 8px 0 1.5rem; }
.no-js .ask__nav { display: none; }
