/* Home: step tabs on phones (Lumart, 15 Nov), in place of the pinned stack.
   Superpower's format: pills that advance on a timer (the active number's ring
   is the progress bar), then heading, subheading, FAQs and the picture.
   Desktop keeps .split-sticky-stack unchanged. */
.stack-tabs { display: none; }
@media (max-width: 960px) {
  .split-sticky-stack { display: none; }
  .stack-tabs { display: block; background: var(--bg); padding: 34px 0 44px; }
}

@property --stp { syntax: '<number>'; inherits: true; initial-value: 0; }

.stack-tabs__pills { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 4px 16px 0; min-height: 40px; box-sizing: border-box; }
.stack-tabs__pill {
  display: inline-flex; align-items: center; gap: 0; flex: none;
  padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-faint);
  font-family: var(--sans); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease, gap 0.35s ease;
}
.stack-tabs__num {
  position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  color: var(--ink-faint); box-shadow: inset 0 0 0 1px rgba(12, 12, 13, 0.16);
}
.stack-tabs__label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width 0.4s ease, opacity 0.3s ease; }
.stack-tabs__pill.is-on {
  gap: 9px; padding: 6px 15px 6px 6px; background: #fff; color: var(--ink);
  box-shadow: 0 10px 26px -10px rgba(12, 12, 13, 0.22), 0 0 0 1px rgba(12, 12, 13, 0.04);
}
.stack-tabs__pill.is-on .stack-tabs__label { max-width: 180px; opacity: 1; }
.stack-tabs__pill.is-on .stack-tabs__num { color: var(--ink); box-shadow: none; }
/* the timer: a ring that fills around the active number */
.stack-tabs__pill.is-on .stack-tabs__num::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--ink) calc(var(--stp) * 1turn), rgba(12, 12, 13, 0.14) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.6px), #000 calc(100% - 1.2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 1.6px), #000 calc(100% - 1.2px));
}
.stack-tabs.is-timed .stack-tabs__pill.is-on { animation: stack-tabs-timer var(--step-ms, 8000ms) linear forwards; }
.stack-tabs.is-paused .stack-tabs__pill.is-on { animation-play-state: paused; }
@keyframes stack-tabs-timer { from { --stp: 0; } to { --stp: 1; } }

.stack-tabs__panels { padding: 0 22px; }
/* All steps sit in one grid cell and fade out then in, in place (Lumart, 15 Nov: smoother, no vertical
   movement). The cell is as tall as the tallest step, so nothing below moves between steps. */
.stack-tabs__panels { display: grid; }
.stack-tabs__panel, .stack-tabs__panel[hidden] {
  display: block; grid-area: 1 / 1; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 1, 1), visibility 0s linear 0.28s;
}
.stack-tabs__panel.is-on {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.5s cubic-bezier(0, 0, 0.2, 1) 0.24s, visibility 0s;
}
@media (prefers-reduced-motion: reduce) { .stack-tabs__panel, .stack-tabs__panel[hidden], .stack-tabs__panel.is-on { transition: none; } }
.stack-tabs__text { min-height: var(--stack-text-h, 0px); padding-top: 34px; }
.stack-tabs__h { font-family: var(--sans); font-size: clamp(24px, 6.9vw, 27px); font-weight: 500; line-height: 1.16; letter-spacing: -0.022em; color: var(--ink); margin: 0 0 12px; text-wrap: balance; }
.stack-tabs__p { font-family: var(--sans); font-size: 17px; font-weight: 400; line-height: 1.5; color: var(--ink-soft); margin: 0 0 18px; text-wrap: pretty; }

.stack-tabs__faqs { display: grid; gap: 6px; }
.stack-tabs__faq { border-radius: 14px; background: rgba(12, 12, 13, 0.035); }
.stack-tabs__q {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 56px;
  padding: 10px 10px 10px 18px; border: 0; background: none; text-align: left; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.35; color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.stack-tabs__plus { position: relative; flex: none; width: 34px; height: 34px; border-radius: 9px; background: rgba(12, 12, 13, 0.05); }
.stack-tabs__plus::before, .stack-tabs__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.6px; border-radius: 1px; background: var(--ink); transform: translate(-50%, -50%); transition: transform 0.3s ease; }
.stack-tabs__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.stack-tabs__q[aria-expanded="true"] .stack-tabs__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.stack-tabs__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.stack-tabs__a > div { overflow: hidden; }
.stack-tabs__a p { margin: 0; padding: 0 18px 16px; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.stack-tabs__q[aria-expanded="true"] + .stack-tabs__a { grid-template-rows: 1fr; }

.stack-tabs__pic { margin: 30px -14px 0; border-radius: 16px; overflow: hidden; aspect-ratio: 15 / 8; background: #e9e6e1; }
.stack-tabs__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (prefers-reduced-motion: reduce) {
  .stack-tabs__panel.is-on, .stack-tabs__pill, .stack-tabs__label, .stack-tabs__a { animation: none; transition: none; }
}
/* Lumart, 15 Nov: every heading on two lines at most (sized for 360-430px phones). */

/* Lumart, 29 Nov (phones): the gap above the picture now matches the gap
   between the subheading and the first question (18px). The grid cell keeps
   the tallest step's height, so nothing below moves between steps; on a
   shorter step the picture grows taller to fill that space instead of
   leaving whitespace above it. */
.stack-tabs__panel, .stack-tabs__panel[hidden] { display: flex; flex-direction: column; }
.stack-tabs__text { min-height: 0; }
.stack-tabs__pic { margin-top: 18px; flex: 1 0 auto; }
/* Lumart, 29 Nov (phones): opening a question made the page wide and the photo
   huge. As a flex item the photo's minimum size followed the image file's own
   pixel size. The image now sits absolutely inside its frame, so only the
   frame's ratio and the free space decide its size. */
.stack-tabs__panel { min-width: 0; }
.stack-tabs__pic { position: relative; min-width: 0; min-height: 0; }
.stack-tabs__pic img { position: absolute; inset: 0; }
