/* ══ Carousels and tabbed sliders (2026-11-20) ══════════════════════════════
   Presentation only: every card, table and paragraph stays in the page.
   Without JavaScript, carousels are a plain scrollable row and tab panels
   are shown one after another.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Carousel ───────────────────────────────────────────────────────────── */
/* Cards per view are set on the element: style="--per-sm:1.1;--per-md:2;--per-lg:3" */
.wt-carousel { --gap: 16px; --per: var(--per-sm, 1.1); position: relative; }
@media (min-width: 768px) { .wt-carousel { --per: var(--per-md, 2); } }
@media (min-width: 992px) { .wt-carousel { --per: var(--per-lg, 3); } }

.wt-carousel-track {
  display: flex; gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 2px 2px 8px; margin: -2px -2px 0;
}
.wt-carousel.is-ready .wt-carousel-track { scrollbar-width: none; }
.wt-carousel.is-ready .wt-carousel-track::-webkit-scrollbar { display: none; }
.wt-carousel-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r); }
.wt-carousel-track > * {
  flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  min-width: 0; scroll-snap-align: start; display: flex;
}
.wt-carousel-track > * > * { flex: 1 1 auto; width: 100%; }

.wt-carousel-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.wt-carousel.is-static .wt-carousel-nav { display: none; }
.wt-carousel-dots { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wt-carousel-dot {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
  background: var(--line); cursor: pointer; transition: width .25s ease, background-color .25s ease;
}
.wt-carousel-dot[aria-current="true"] { width: 26px; background: var(--accent); }
.wt-carousel-side { display: flex; align-items: center; gap: 10px; }
.wt-carousel-count { font: 500 13px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.wt-carousel-btn {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; transition: border-color .2s ease, color .2s ease, opacity .2s ease;
}
.wt-carousel-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.wt-carousel-btn:disabled { opacity: .35; cursor: default; }

/* ── Tabbed slider ──────────────────────────────────────────────────────── */
.wt-tabs-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 20px; }
.wt-tabs-list {
  position: relative; display: inline-flex; gap: 2px; padding: 4px; max-width: 100%;
  background: var(--sunk); border: 1px solid var(--line); border-radius: 999px;
  overflow-x: auto; scrollbar-width: none;
}
.wt-tabs-list::-webkit-scrollbar { display: none; }
.wt-tab {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer; white-space: nowrap;
  color: var(--muted); font: 600 14px/1.2 var(--body); padding: 9px 16px; border-radius: 999px;
  transition: color .2s ease;
}
.wt-tab:hover { color: var(--fg); }
.wt-tab[aria-selected="true"] { color: var(--fg); }
.wt-tab .n { font: 500 12px/1 var(--mono); color: var(--accent); margin-right: 6px; }
.wt-tabs-ink {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--surface); box-shadow: 0 1px 3px rgba(16, 41, 58, .14);
  transition: transform .3s ease, width .3s ease;
}
.wt-tabs-step { display: flex; gap: 8px; }
.wt-tab-panel.is-entering { animation: wtPanelIn .35s ease both; }
@keyframes wtPanelIn {
  from { opacity: 0; transform: translateX(var(--wt-dir, 18px)); }
  to   { opacity: 1; transform: none; }
}
/* Without JavaScript, panels stack with a little space between them. */
.wt-tabs:not(.is-ready) .wt-tab-panel + .wt-tab-panel { margin-top: 1.5rem; }

@media (max-width: 575.98px) {
  .wt-tabs-bar { flex-direction: column; align-items: stretch; }
  .wt-tabs-step { justify-content: flex-end; }
}

/* ── Section deck (each section is a slide) ─────────────────────────────── */
.wt-deck.is-ready { position: relative; }
.wt-deck-bar {
  position: sticky; top: 0; z-index: 900;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.wt-deck-bar-in { display: flex; align-items: center; gap: 16px; min-height: 58px; }
.wt-deck-list { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 6px 0; }
.wt-deck-list::-webkit-scrollbar { display: none; }
.wt-deck-tab {
  flex: none; border: 0; background: none; cursor: pointer; white-space: nowrap;
  color: var(--muted); font: 600 13.5px/1.2 var(--body); padding: 8px 12px; border-radius: 999px;
  transition: color .2s ease, background-color .2s ease;
}
.wt-deck-tab .n { font: 500 11.5px/1 var(--mono); color: var(--accent); margin-right: 6px; opacity: .85; }
.wt-deck-tab:hover { color: var(--fg); }
.wt-deck-tab[aria-selected="true"] { color: var(--fg); background: var(--accent-soft); }
.wt-deck-side { display: flex; align-items: center; gap: 10px; flex: none; }

.wt-deck-viewport { overflow: hidden; overflow: clip; transition: height .45s ease; }
.wt-deck-track { display: flex; align-items: flex-start; transition: transform .55s cubic-bezier(.22, .61, .36, 1); }
.wt-deck-track > * { flex: 0 0 100%; min-width: 0; transition: opacity .45s ease; }
.wt-deck-track > [aria-hidden="true"] { opacity: .25; }
.wt-arrow { font-size: 1.05em; line-height: 1; }

.wt-deck-foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 28px; }
.wt-deck-step {
  display: inline-flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  border-radius: var(--r); padding: 12px 18px; font: 600 15px/1.25 var(--body);
  transition: border-color .2s ease, color .2s ease;
}
.wt-deck-step small { display: block; font: 600 11px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.wt-deck-step.next { margin-left: auto; text-align: right; }
.wt-deck-step:hover { border-color: var(--accent); color: var(--accent); }
.wt-deck-step[hidden] { display: none; }

@media (max-width: 575.98px) {
  .wt-deck-side .wt-carousel-count { display: none; }
  .wt-deck-step { font-size: 14px; padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .wt-deck-viewport, .wt-deck-track, .wt-deck-track > * { transition: none; }
}

@media print {
  .wt-deck-bar, .wt-deck-foot { display: none !important; }
  .wt-deck-viewport { height: auto !important; overflow: visible; }
  .wt-deck-track { display: block; transform: none !important; }
  .wt-deck-track > * { opacity: 1 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .wt-carousel-track { scroll-behavior: auto; }
  .wt-tab-panel.is-entering { animation: none; }
  .wt-tabs-ink, .wt-carousel-dot { transition: none; }
}

@media print {
  .wt-carousel-track { flex-wrap: wrap; overflow: visible; }
  .wt-carousel-nav, .wt-tabs-bar { display: none !important; }
  .wt-tab-panel[hidden] { display: block !important; }
}
